From fcb8b8cc392b146aa11bbaab9e497f7f13f29d44 Mon Sep 17 00:00:00 2001 From: ZengTao <2773468879@qq.com> Date: 星期一, 26 五月 2025 11:38:17 +0800 Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/YiWuProject --- hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/OpcCacheGlassNewTask.java | 34 +++++++++++++++++++++++++++++----- 1 files changed, 29 insertions(+), 5 deletions(-) diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/OpcCacheGlassNewTask.java b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/OpcCacheGlassNewTask.java index 0f83952..ca8b290 100644 --- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/OpcCacheGlassNewTask.java +++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/OpcCacheGlassNewTask.java @@ -261,11 +261,14 @@ } int firstLength = minTwoFirstLength; int secondLength = minTwoSecondLength; + int fecondMaxLength = 2300; if (deviceId == 1) { firstLength = minOneFirstLength; secondLength = minOneSecondLength; + fecondMaxLength = 2500; } - if (Math.max(glassInfo.getWidth(), glassInfo.getHeight()) < firstLength || Math.min(glassInfo.getWidth(), glassInfo.getHeight()) < secondLength) { + if (Math.max(glassInfo.getWidth(), glassInfo.getHeight()) < firstLength || Math.min(glassInfo.getWidth(), glassInfo.getHeight()) < secondLength + || Math.max(glassInfo.getWidth(), glassInfo.getHeight()) > fecondMaxLength) { log.info("杩涚墖鐜荤拑灏哄灏忎簬{}*{}锛岀姝㈣繘绗肩幓鐠僫d:{}锛屽昂瀵镐负{}銆亄}", firstLength, secondLength, task.getGlassIdIn(), glassInfo.getWidth(), glassInfo.getHeight()); Date endDate = new Date(); log.info("缁撴潫杩涚墖浠诲姟璁惧涓簕}锛岀粨鏉熸椂闂翠负锛歿}锛屽叡鑰楁椂锛歿}ms", deviceId, endDate, endDate.getTime() - startDate.getTime()); @@ -302,20 +305,41 @@ //鑾峰彇瀵瑰簲鐨勮澶囩姸鎬佷俊鎭� ReadWriteEntity oneOutStateEntity = miloService.readFromOpcUa("WL1.WL1.slotState"); ReadWriteEntity twoOutStateEntity = miloService.readFromOpcUa("WL2.WL2.slotState"); + ReadWriteEntity d06OutStateEntity = miloService.readFromOpcUa("WL2.WL2.d06SlotState"); //鐘舵�佹湁3涓儏鍐碉細0绌洪棽 1蹇欑 2绂佺敤 - String oneOutState = "2"; - String twoOutState = "2"; + String oneOutState = Const.OUT_DISABLE; + String twoOutState = Const.OUT_DISABLE; + String d06OutState = Const.OUT_DISABLE; if (null != oneOutStateEntity && null != oneOutStateEntity.getValue()) { oneOutState = oneOutStateEntity.getValue().toString(); } if (null != twoOutStateEntity && null != twoOutStateEntity.getValue()) { twoOutState = twoOutStateEntity.getValue().toString(); } - - if ((cellFlag == 2 && Const.OUT_BUSY.equals(oneOutState) && Const.OUT_BUSY.equals(twoOutState)) || (Const.OUT_DISABLE.equals(oneOutState) && Const.OUT_DISABLE.equals(twoOutState))) { + //涓ゆ潯绾块兘涓虹鐢ㄥ垯涓嶅嚭鐜荤拑 + if (Const.OUT_DISABLE.equals(oneOutState) && Const.OUT_DISABLE.equals(twoOutState)) { log.info("A09銆丄10涓簕},{}闈炶嚜鍔ㄧ姸鎬侊紝鏃犳硶鍑虹墖", oneOutState, oneOutState); return Boolean.FALSE; } + if (null != d06OutStateEntity && null != d06OutStateEntity.getValue()) { + d06OutState = d06OutStateEntity.getValue().toString(); + } + //鑾峰彇d06鐗囧彴鐘舵�� + // 1:涓�瀵逛竴鐨勬儏鍐典笅涓嶉渶瑕佸垽鏂璬06鐘舵�� + // 2:涓�鍙风嚎涓�瀵瑰鐨勬儏鍐典笅锛岃幏鍙栦簩鍙风嚎纾ㄨ竟鍓嶇墖鍙癉07鐨勭姸鎬侊紝D07闈炵鐢ㄦ椂锛屼簩鍙风嚎灏嗘寜鐓06鐗囧彴鐘舵�佽寰楀嚭鐗� + // 3:浜屽彿绾夸竴瀵瑰鐨勬儏鍐典笅锛岃幏鍙栦竴鍙风嚎纾ㄨ竟鍓嶇墖鍙癈08鐨勭姸鎬侊紝C08闈炵鐢ㄦ椂锛屼竴鍙风嚎灏嗘寜鐓06鐗囧彴鐘舵�佽寰楀嚭鐗� + if (cellFlag == 2) { + if (deviceId == 1) { + twoOutState = Const.OUT_DISABLE.equals(twoOutState) ? Const.OUT_DISABLE : d06OutState; + } else { + oneOutState = Const.OUT_DISABLE.equals(oneOutState) ? Const.OUT_DISABLE : d06OutState; + } + if (Const.OUT_BUSY.equals(oneOutState) && Const.OUT_BUSY.equals(twoOutState)) { + log.info("A09銆丄10涓簕},{}闈炶嚜鍔ㄧ姸鎬侊紝鏃犳硶鍑虹墖", oneOutState, oneOutState); + return Boolean.FALSE; + } + } + log.info("寮�濮嬫墽琛屽嚭鐗�/鐩撮�氫换鍔★紝浠诲姟淇℃伅涓猴細{},琛ㄥ悕涓猴細{},璁惧id:{},寮�濮嬫椂闂达細{},涓�鍙风嚎鐘舵�侊細{}锛屼簩鍙风嚎鐘舵�侊細{}", task, tableName, deviceId, startDate, oneOutState, twoOutState); //鑾峰彇褰撳墠闇�瑕佽蛋閭f潯绾� -- Gitblit v1.8.0