From e19d95da199d0d9e30d14b0a23c0470e37fd1883 Mon Sep 17 00:00:00 2001
From: 严智鑫 <test>
Date: 星期一, 19 八月 2024 08:51:32 +0800
Subject: [PATCH] 工程实体类移到 公共里
---
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/CacheGlassTask.java | 30 ++++++++----------------------
1 files changed, 8 insertions(+), 22 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 813c75d..3dcf2d7 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
@@ -88,7 +88,7 @@
public static String engineerId = "";
- @Scheduled(fixedDelay = 1000)
+// @Scheduled(fixedDelay = 1000)
public void plcHomeEdgTask() {
Date startDate = new Date();
log.info("鏈浠诲姟寮�濮嬫墽琛屾椂闂达細{}", startDate);
@@ -174,23 +174,20 @@
//鏌ヨ鐜荤拑骞惰繘琛屼氦鎹�
GlassInfo glassInfo = queryAndChangeGlass(glassId);
- if (glassInfo == null) {
- return;
- }
- log.info("4銆佸皢鐜荤拑淇℃伅鎻掑叆鍗у紡鐞嗙墖绗�,褰撳墠鐜荤拑淇℃伅:{}", glassInfo);
+ log.info("3銆佸皢鐜荤拑淇℃伅鎻掑叆鍗у紡鐞嗙墖绗�,褰撳墠鐜荤拑淇℃伅:{}", glassInfo);
EdgStorageCageDetails details = new EdgStorageCageDetails();
BeanUtils.copyProperties(glassInfo, details);
details.setState(Const.GLASS_STATE_IN);
details.setSlot(nearestEmpty.getSlot());
details.setDeviceId(nearestEmpty.getDeviceId());
edgStorageCageDetailsService.save(details);
- log.info("5銆佺幓鐠冧俊鎭凡瀛樺叆鐞嗙墖绗艰鎯呰〃锛岀幓鐠冧俊鎭负{}", details);
+ log.info("4銆佺幓鐠冧俊鎭凡瀛樺叆鐞嗙墖绗艰鎯呰〃锛岀幓鐠冧俊鎭负{}", details);
//娣诲姞杩涚墖浠诲姟
boolean taskCache = saveTaskCache(details.getGlassId(), 0, nearestEmpty.getSlot(), Const.GLASS_CACHE_TYPE_IN);
- log.info("6銆佺敓鎴愯繘鐗囦换鍔′俊鎭瓨鍏ヤ换鍔¤〃鏄惁瀹屾垚锛歿}", taskCache);
+ log.info("5銆佺敓鎴愯繘鐗囦换鍔′俊鎭瓨鍏ヤ换鍔¤〃鏄惁瀹屾垚锛歿}", taskCache);
S7object.getinstance().plccontrol.writeWord(confirmationWrodAddress, 1);
- log.info("7銆佸彂閫佺‘璁ゅ瓧瀹屾垚");
+ log.info("6銆佸彂閫佺‘璁ゅ瓧瀹屾垚");
}
@@ -205,10 +202,6 @@
GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>().eq(GlassInfo::getGlassId, glassId));
// .inSql(GlassInfo::getEngineerId, "select engineer_id from engineering where state = 1"));
Assert.isFalse(null == glassInfo, "鐜荤拑淇℃伅涓嶅瓨鍦�");
- if ((glassInfo.getWidth() < Double.parseDouble(minTwoFirstLength) && glassInfo.getHeight() < Double.parseDouble(minTwoSecondLength)) || (glassInfo.getWidth() < Double.parseDouble(minTwoSecondLength) && glassInfo.getHeight() < Double.parseDouble(minTwoFirstLength))) {
- log.info("3銆佺幓鐠冧俊鎭笉绗﹀悎杩涘叆鐞嗙墖绗兼渶灏忓昂瀵革紝鐜荤拑淇℃伅涓簕}", glassInfo);
- return null;
- }
//鎸夌収鐜荤拑灏哄
LambdaQueryWrapper<GlassInfo> queryWrapper = new LambdaQueryWrapper<GlassInfo>()
.eq(GlassInfo::getWidth, glassInfo.getWidth())
@@ -707,14 +700,6 @@
public void CacheGlassTasks() {
JSONObject jsonObject = new JSONObject();
List<Map<String, Object>> currentCutTerritorys = edgStorageCageDetailsService.selectCutTerritory();
-// List<Map<String, Object>> currentCutTerritorys=new ArrayList<>();
-// if(engineerId==null||engineerId.isEmpty()){
-// //璇嗗埆鎽嗙墖 褰撳墠鐗堝浘鏁版嵁
-// currentCutTerritorys = edgStorageCageDetailsService.selectCutTerritory();
-// }else{
-// //璇嗗埆鎽嗙墖 姝ngineerId 宸ョ▼鐗堝浘鏁版嵁
-// currentCutTerritorys = edgStorageCageDetailsService.selectCurrentCutTerritory(engineerId);
-// }
jsonObject.append("currentCutTerritory", currentCutTerritorys);
//log.info("鏈璇嗗埆鐗堝浘{},++++{}",engineerId,currentCutTerritorys);
//纾ㄨ竟淇℃伅
@@ -744,10 +729,10 @@
}
}
@Scheduled(fixedDelay = 1000)
- public void cacheGlassIsRun(){
+ public void cacheGlassIsRun() {
JSONObject jsonObject = new JSONObject();
//姝e湪杩涜鐨勪换鍔�
- List<TaskCache>taskCaches=taskCacheService.selectTaskCacheIsRun();
+ List<TaskCache> taskCaches = taskCacheService.selectTaskCacheIsRun();
jsonObject.append("taskCaches", taskCaches);
ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("cacheGlassIsRun");
if (sendwServer != null) {
@@ -761,4 +746,5 @@
}
}
+
}
--
Gitblit v1.8.0