From 8a9b0adc7fe0f72c4de8c8e5d14e282f5913d63d Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期五, 06 十二月 2024 14:48:36 +0800
Subject: [PATCH] 1、fixbug:笼内玻璃错乱问题解决 2、中空问题修复:避免多个线程拿到的空格相同 3、swagger名称显示
---
hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java
index 4f71991..c745481 100644
--- a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java
@@ -36,22 +36,23 @@
public void hollowGlassTask() {
List<HollowGlassOutRelationInfo> taskList = hollowGlassOutRelationInfoService.list(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
.in(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START, Const.HOLLOW_FLOW_CARD_PAUSE));
- if (CollectionUtil.isEmpty(taskList)){
+ if (CollectionUtil.isEmpty(taskList)) {
return;
}
JSONObject jsonObject = new JSONObject();
List<String> flowCardIdList = taskList.stream().map(HollowGlassOutRelationInfo::getFlowCardId).collect(Collectors.toList());
List<HollowGlassQueueInfo> list = hollowGlassQueueInfoService.list(new LambdaQueryWrapper<HollowGlassQueueInfo>().in(HollowGlassQueueInfo::getFlowCardId, flowCardIdList));
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("930", listMap.get(930));
+ jsonObject.append("931", listMap.get(931));
+ jsonObject.append("932", listMap.get(932));
List<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("HollowGlass");
if (CollectionUtil.isNotEmpty(sendwServer)) {
- WebSocketServer socketServer = sendwServer.get(0);
+ for (WebSocketServer socketServer : sendwServer) {
if (socketServer != null && socketServer.session.isOpen()) {
socketServer.sendMessage(jsonObject.toString());
}
+ }
}
}
}
--
Gitblit v1.8.0