From c20baabe480137a7dabfbe804a4fb72d95b46724 Mon Sep 17 00:00:00 2001 From: zhoushihao <zsh19950802@163.com> Date: 星期四, 05 十二月 2024 16:36:43 +0800 Subject: [PATCH] 1、修改推送数据格式类型,便于前端展示 --- hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java | 6 ++++-- 1 files changed, 4 insertions(+), 2 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 e5c23e5..53f3631 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 @@ -33,7 +33,7 @@ @Resource HollowGlassOutRelationInfoService hollowGlassOutRelationInfoService; @Scheduled(fixedDelay = 1000) - public void CacheGlassTasks() { + 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)){ @@ -43,7 +43,9 @@ 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("HollowGlass",listMap); + 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); -- Gitblit v1.8.0