From dd60bcc7b38c2a19c02a20550a393987fc5a5a27 Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期三, 07 八月 2024 16:26:04 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/CacheGlassTask.java | 31 +++++++++++++++++++++++--------
1 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/CacheGlassTask.java b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/CacheGlassTask.java
index 4103025..48df75a 100644
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/CacheGlassTask.java
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/CacheGlassTask.java
@@ -21,7 +21,6 @@
import com.mes.glassinfo.service.GlassInfoService;
import com.mes.taskcache.entity.TaskCache;
import com.mes.taskcache.service.TaskCacheService;
-import com.mes.temperingglass.entity.TemperingGlassInfo;
import com.mes.tools.WebSocketServer;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
@@ -325,7 +324,7 @@
BeanUtils.copyProperties(one, resultDetails);
glassInfo = resultDetails;
} else {
- log.info("鑾峰彇绗煎唴鐜荤拑鍜屽甫杩涚墖鐜荤拑涓虹┖鎴栬�呬笉绗﹀悎纾ㄨ竟灏哄");
+ log.info("鑾峰彇绗煎唴鐜荤拑鍜屽緟杩涚墖鐜荤拑涓虹┖鎴栬�呬笉绗﹀悎纾ㄨ竟灏哄");
}
} else {
glassInfo = queryMinGlass(list.get(0).getWidth(), list.get(0).getHeight(), glassId);
@@ -539,12 +538,12 @@
if (endcell == Const.A10_OUT_TARGET_POSITION) {
wrapper.innerJoin("(select glass_id, case when height <= width then width else height end as first_length, " +
"case when width < height then width else height end as second_length from edg_storage_cage_details) t1 " +
- "on t.glass_id = t1.glass_id and (t1.first_length between " + minTwoFirstLength + " and " + firstLength
- + " and t1.second_length between " + minTwoSecondLength + " and " + secondLength + ") ");
+ "on t.glass_id = t1.glass_id and (t1.first_length >= " + minOneFirstLength + " and t1.second_length >= " + minOneSecondLength);
} else {
wrapper.innerJoin("(select glass_id, case when height <= width then width else height end as first_length, " +
"case when width < height then width else height end as second_length from edg_storage_cage_details) t1 " +
- "on t.glass_id = t1.glass_id and (t1.first_length >=" + minOneFirstLength + " and t1.second_length>=" + minOneSecondLength + ") ");
+ "on t.glass_id = t1.glass_id and (t1.first_length between " + minTwoFirstLength + " and " + firstLength
+ + " and t1.second_length between " + minTwoSecondLength + " and " + secondLength + ") ");
}
wrapper.last("order by count(t.glass_id) desc limit 2");
List<EdgStorageCageDetails> list = edgStorageCageDetailsService.list(wrapper);
@@ -719,8 +718,8 @@
jsonObject.append("currentCutTerritory", currentCutTerritorys);
//log.info("鏈璇嗗埆鐗堝浘{},++++{}",engineerId,currentCutTerritorys);
//纾ㄨ竟淇℃伅
- List<Map<String, Object>> EdgTasks1 = taskCacheService.selectEdgInfo("2001");
- List<Map<String, Object>> EdgTasks2 = taskCacheService.selectEdgInfo("2002");
+ List<Map<String, Object>> EdgTasks1 = edgGlassTaskInfoService.selectEdgInfo("2001");
+ List<Map<String, Object>> EdgTasks2 = edgGlassTaskInfoService.selectEdgInfo("2002");
jsonObject.append("EdgTasks1", EdgTasks1);
jsonObject.append("EdgTasks2", EdgTasks2);
@@ -744,6 +743,22 @@
}
}
}
-
+ @Scheduled(fixedDelay = 1000)
+ public void cacheGlassIsRun(){
+ JSONObject jsonObject = new JSONObject();
+ //姝e湪杩涜鐨勪换鍔�
+ List<TaskCache>taskCaches=taskCacheService.selectTaskCacheIsRun();
+ jsonObject.append("taskCaches", taskCaches);
+ ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("cacheGlassIsRun");
+ if (sendwServer != null) {
+ for (WebSocketServer webserver : sendwServer) {
+ if (webserver != null) {
+ webserver.sendMessage(jsonObject.toString());
+ } else {
+ log.info("Home is closed");
+ }
+ }
+ }
+ }
}
--
Gitblit v1.8.0