From 0961a4ebfeacaed4787c59e017691775a339616f Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期四, 10 四月 2025 14:51:28 +0800
Subject: [PATCH] 1、中空任务界面改造,新增第三条线任务判
---
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java | 71 +++++++++++++++++------------------
1 files changed, 35 insertions(+), 36 deletions(-)
diff --git a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java
index 7d25456..7e06a03 100644
--- a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java
+++ b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java
@@ -315,44 +315,41 @@
}
//鑾峰彇绌洪棽涓旈鍙栦换鍔$殑鏁版嵁淇℃伅锛屾病鏈変换鍔$洿鎺ヨ蛋鐜荤拑璋冨害
+ HashMap<Integer, ReadWriteEntity> map = new HashMap<>();
ReadWriteEntity oneEntity = miloService.readFromOpcUa("CMJ1.CMJ1.isFree");
+ ReadWriteEntity twoEntity = miloService.readFromOpcUa("ZKQ2.ZKQ2.isFree");
+ ReadWriteEntity threeEntity = miloService.readFromOpcUa("ZKQ3.ZKQ3.isFree");
+ map.put(930, oneEntity);
+ map.put(931, twoEntity);
+ map.put(932, threeEntity);
HollowGlassOutRelationInfo hollowGlassOutRelationInfo = null;
int cell = -1;
- //鏉庤禌鍏嬬嚎闇�瑕佽幏鍙栭煩姹焢lc鐨勭嚎璺┖闂茬姸鎬侊細10000000绗�8浣嶄负 1琛ㄧず蹇欑 0琛ㄧず绌洪棽
- if (null != oneEntity.getValue() && "1".equals(oneEntity.getValue() + "")) {
- cell = 930;
- hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService
- .getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
- .eq(HollowGlassOutRelationInfo::getCell, cell)
- .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START)
- );
+ for (int i = 930; i < 931; i++) {
+ if (null == hollowGlassOutRelationInfo) {
+ ReadWriteEntity entity = map.get(i);
+ cell = i;
+ if (null != entity.getValue() && ("1".equals(entity.getValue() + "") || Boolean.parseBoolean(twoEntity.getValue() + ""))) {
+ hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService
+ .getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
+ .eq(HollowGlassOutRelationInfo::getCell, cell)
+ .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START)
+ );
+ }
+ } else {
+ break;
+ }
}
-
- ReadWriteEntity twoEntity = miloService.readFromOpcUa("ZKQ2.ZKQ2.isFree");
- if (null == hollowGlassOutRelationInfo && null != twoEntity.getValue() && Boolean.parseBoolean(twoEntity.getValue() + "")) {
- cell = 931;
- hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService
- .getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
- .eq(HollowGlassOutRelationInfo::getCell, cell)
- .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START)
- );
- }
- if (null == hollowGlassOutRelationInfo) {
- cell = 930;
- hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService
- .getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
- .eq(HollowGlassOutRelationInfo::getCell, cell)
- .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START)
- );
- }
-
- if (null == hollowGlassOutRelationInfo) {
- cell = 931;
- hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService
- .getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
- .eq(HollowGlassOutRelationInfo::getCell, cell)
- .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START)
- );
+ for (int i = 930; i <= 932; i++) {
+ if (null == hollowGlassOutRelationInfo) {
+ cell = i;
+ hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService
+ .getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
+ .eq(HollowGlassOutRelationInfo::getCell, cell)
+ .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START)
+ );
+ } else {
+ break;
+ }
}
if (null != hollowGlassOutRelationInfo) {
@@ -767,7 +764,8 @@
}
- private <T extends HollowBigStorageCageBaseInfo> Boolean hollowOutGlassByIsPair(List<T> list, int targetSlot, int isPair, int totalLayer, int isForce) throws Exception {
+ private <T extends HollowBigStorageCageBaseInfo> Boolean hollowOutGlassByIsPair(List<T> list,
+ int targetSlot, int isPair, int totalLayer, int isForce) throws Exception {
List<T> resultList = new ArrayList<>();
List<T> tempList = new ArrayList<>();
int taskType = Const.BIG_STORAGE_AFTER_OUT;
@@ -820,7 +818,8 @@
* @param totalLayer
* @return
*/
- private <T extends HollowBigStorageCageBaseInfo> Boolean computeOutGlassInfo(List<T> list, String tableName, int targetSlot, int state, int taskType, int totalLayer, int isForce) {
+ private <T extends HollowBigStorageCageBaseInfo> Boolean computeOutGlassInfo(List<T> list, String tableName,
+ int targetSlot, int state, int taskType, int totalLayer, int isForce) {
//浠诲姟鏁版嵁:鑾峰彇杞﹀瓙瀛樻斁鐜荤拑鏈�澶ф暟閲�,鐜荤拑闂撮殧
List<T> templist = new ArrayList<>();
//鎵撹溅鍓╀綑灏哄
--
Gitblit v1.8.0