From d799fbde44cc568a3e15d78dc6e582ff244ffa89 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期六, 29 三月 2025 16:05:44 +0800
Subject: [PATCH] 1、卧式理片重置任务调整,避免无任务情况下无法将任务交互表的数据清掉 2、中空领取任务界面新增产品名称,便于识别产品 3、调整部分定时任务间隔时间 4、定时任务分隔开,按照两个/多个界面的websocket由一个分为多个 5、取消钢化功能开发中z
---
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java | 38 +++++++++++++++++++++++++-------------
1 files changed, 25 insertions(+), 13 deletions(-)
diff --git a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java
index 0b867e9..3b8520f 100644
--- a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java
+++ b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java
@@ -60,31 +60,40 @@
@Resource
RedisUtil redisUtil;
- @Scheduled(fixedDelay = 1000)
- public void hollowGlassTask() {
+ @Scheduled(fixedDelay = 5000)
+ public void hollowGlassTaskOne() {
+ hollowGlassTaskChild(930, "CMJ1.CMJ1.isFree", "HollowGlassOne");
+ }
+
+ @Scheduled(fixedDelay = 5000)
+ public void hollowGlassTaskTwo() {
+ hollowGlassTaskChild(931, "ZKQ2.ZKQ2.isFree", "HollowGlassTwo");
+ }
+
+ @Scheduled(fixedDelay = 5000)
+ public void hollowGlassTaskThree() {
+ //todo:鏆傛棤涓夌嚎鐨勭┖闂茬姸鎬佷俊鍙凤紝涓存椂鏍囩绌洪棽鐘舵��
+ hollowGlassTaskChild(932, "ZKQ3.ZKQ3.isFree", "HollowGlassThree");
+ }
+
+ public void hollowGlassTaskChild(int cell, String isFreeTag, String websocketName) {
List<HollowGlassOutRelationInfo> taskList = hollowGlassOutRelationInfoService.list(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
- .in(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START));
+ .in(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START).eq(HollowGlassOutRelationInfo::getCell, cell));
JSONObject jsonObject = new JSONObject();
if (CollectionUtil.isNotEmpty(taskList)) {
List<Long> taskIdList = taskList.stream().map(HollowGlassOutRelationInfo::getId).collect(Collectors.toList());
List<HollowGlassQueueInfo> list = hollowGlassQueueInfoService.list(new LambdaQueryWrapper<HollowGlassQueueInfo>().in(HollowGlassQueueInfo::getRelationId, taskIdList));
- Map<Integer, List<HollowGlassQueueInfo>> listMap = list.stream().collect(Collectors.groupingBy(HollowGlassQueueInfo::getCell));
- jsonObject.append("930", listMap.get(930));
- jsonObject.append("931", listMap.get(931));
- jsonObject.append("932", listMap.get(932));
+ jsonObject.append("queueInfo", list);
}
try {
//930绌洪棽淇″彿
- ReadWriteEntity freeOneRequestEntity = miloService.readFromOpcUa("CMJ1.CMJ1.isFree");
- jsonObject.append("freeOneRequestEntity", freeOneRequestEntity.getValue());
- //931绌洪棽淇″彿
- ReadWriteEntity freeTwoRequestEntity = miloService.readFromOpcUa("ZKQ2.ZKQ2.isFree");
- jsonObject.append("freeTwoRequestEntity", freeTwoRequestEntity.getValue());
+ ReadWriteEntity freeOneRequestEntity = miloService.readFromOpcUa(isFreeTag);
+ jsonObject.append("freeRequest", freeOneRequestEntity.getValue());
} catch (Exception e) {
log.error("opc瀛樺湪寮傚父", e);
}
- List<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("HollowGlass");
+ List<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get(websocketName);
if (CollectionUtil.isNotEmpty(sendwServer)) {
for (WebSocketServer socketServer : sendwServer) {
if (socketServer != null && socketServer.session.isOpen()) {
@@ -181,6 +190,9 @@
//931绌洪棽淇″彿
ReadWriteEntity freeTwoRequestEntity = miloService.readFromOpcUa("ZKQ2.ZKQ2.isFree");
jsonObject.append("freeTwoRequestEntity", freeTwoRequestEntity.getValue());
+ //932绌洪棽淇″彿
+ ReadWriteEntity freeThreeRequestEntity = miloService.readFromOpcUa("ZKQ3.ZKQ3.isFree");
+ jsonObject.append("freeThreeRequestEntity", freeThreeRequestEntity.getValue());
} catch (Exception e) {
//todo:涓嶅仛浠诲姟澶勭悊
}
--
Gitblit v1.8.0