From 649f2e387786c86e248a8e031979c3fb67a5e39d Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期二, 20 八月 2024 14:43:56 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 199 ++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 152 insertions(+), 47 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java index 6bea44b..02db0a4 100644 --- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java @@ -59,7 +59,8 @@ // private static final int[][] execute = new int[][]{{1,4},{2,4},{3,4},{4,4},{5,6},{6,6},{7,4},{8,4},{9,3},{10,4},{11,4}}; private static final int[][] execute = new int[][]{{1,4},{2,4},{3,4},{4,4},{5,6},{6,6},{7,4},{8,4},{9,3},{10,4},{11,4}}; - private static final Integer jarMaxLoc = 6; + private static final Integer jarMaxLoc = 7; + private static final Float jarTemperature = 50F; @Autowired private CommonService commonService; @Autowired @@ -502,6 +503,15 @@ if (!Cools.isEmpty(barcode)) { // log.info("{}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", inSta.getBarcode(), barcode); if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || !CodeDetectionUtil.barcodeDetection(barcode)) { + continue; + } + if ("00000000".equals(barcode)){ + log.error(inSta+"绔欑偣锛屾壂鐮佸け璐ワ紝barcode锛�"+barcode); + // led 寮傚父鏄剧ず +// LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, inSta.getLed()); +// if (ledThread != null) { +// MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(5, inSta+"绔欑偣锛屾壂鐮佸け璐ワ紝barcode锛�"+barcode)); +// } continue; } } else { @@ -2546,7 +2556,7 @@ } //閫�搴撴ā寮忚烦杩�118銆�119鍑哄簱浠诲姟 if (wrkMast.getStaNo()==118 || wrkMast.getStaNo()==119){ - RgvOneSign rgvOneSign = rgvOneSignMapper.selectOneSign(); + RgvOneSign rgvOneSign = rgvOneSignMapper.selectOneSign("oneSign"); if (Cools.isEmpty(rgvOneSign) || rgvOneSign.getRgvOneSign()==1){ continue; } @@ -2851,7 +2861,7 @@ } //閫�搴撴ā寮忚烦杩�118銆�119鍑哄簱浠诲姟 if (wrkMast.getStaNo()==118 || wrkMast.getStaNo()==119){ - RgvOneSign rgvOneSign = rgvOneSignMapper.selectOneSign(); + RgvOneSign rgvOneSign = rgvOneSignMapper.selectOneSign("oneSign"); if (Cools.isEmpty(rgvOneSign) || rgvOneSign.getRgvOneSign()==1){ continue; } @@ -3839,7 +3849,13 @@ // 绔欑偣鏉′欢鍒ゆ柇 if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInEnable() && staProtocol.isEmptyMk() && ((staProtocol.getWorkNo() > 32222 && staProtocol.getWorkNo() <= 63333) || staProtocol.getWorkNo()==0) && staProtocol.isPakMk()) { - + //鍥炲簱鏍囪 + if (emptyInSta.getStaNo()==126 || emptyInSta.getStaNo()==131){ + RgvOneSign rgvOneSign = rgvOneSignMapper.selectOneSign("sign"+emptyInSta.getStaNo()); + if (Cools.isEmpty(rgvOneSign) || rgvOneSign.getRgvOneSign()!=1){ + continue; + } + } try { LocTypeDto locTypeDto = new LocTypeDto(staProtocol); @@ -3896,7 +3912,13 @@ // 绔欑偣鏉′欢鍒ゆ柇 if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInEnable() && staProtocol.isEmptyMk() && ((staProtocol.getWorkNo() > 32222 && staProtocol.getWorkNo() <= 63333) || staProtocol.getWorkNo()==0) && staProtocol.isPakMk()) { - + //鍥炲簱鏍囪 + if (emptyInSta.getStaNo()==310 || emptyInSta.getStaNo()==312){ + RgvOneSign rgvOneSign = rgvOneSignMapper.selectOneSign("sign"+emptyInSta.getStaNo()); + if (Cools.isEmpty(rgvOneSign) || rgvOneSign.getRgvOneSign()!=1){ + continue; + } + } try { LocTypeDto locTypeDto = new LocTypeDto(staProtocol); @@ -3976,7 +3998,7 @@ */ public synchronized void storeEmptyPlt3() { try{ - RgvOneSign rgvOneSign = rgvOneSignMapper.selectOneSign(); + RgvOneSign rgvOneSign = rgvOneSignMapper.selectOneSign("oneSign"); if (Cools.isEmpty(rgvOneSign) || rgvOneSign.getRgvOneSign()==1){ return; } @@ -4813,8 +4835,28 @@ if (basJarMastService.selectJarMastOperation(jarSlave.getId(),2)!=0){ break; } - if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),3)!=0){ + BasJar basJar = basJarMapper.selectById(jarSlave.getId()); + int count = basJarMastService.selectCount(new EntityWrapper<BasJarMast>().eq("jar_regin", basJar.getRegion()).lt("status", 17).gt("status", 11)); + if (count>0){ break; + } + if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),3)!=0){ + if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),3)==7){ + JarThread jarOtherThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getJarOtherId()); + JarProtocol jarOtherProtocol = jarOtherThread.getJarProtocol(); + if (jarOtherProtocol == null) { + break; + } + if (jarOtherProtocol.getJarTemperature()>jarTemperature){ + log.info("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....鍏堟墽琛屽叆缃愪换鍔★紒锛侊紒",jarOtherProtocol.getJarNo()); + } else { + if (basJarMastService.getJarMastByJarIdCount(jarSlave.getId())>0){ + log.info("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛屽厛鎵ц浜嗗叆缃愪换鍔★紝鎵ц瀹屾瘯鍐嶈繘琛屽喎鍗达紒锛侊紒",jarOtherProtocol.getJarNo()); + } else { + break; + } + } + } } if (basJarMastService.getJarMastByJarIdCount(jarSlave.getId())>=jarMaxLoc*2){ break; @@ -4889,7 +4931,7 @@ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧姝e湪纭寲涓紝浠诲姟寮傚父锛侊紒锛�",jarProtocol.getJarNo()); return false; } - if (jarProtocol.getJarTemperature()>50){ + if (jarProtocol.getJarTemperature()>jarTemperature){ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo()); return false; } @@ -5034,10 +5076,7 @@ if (jarProtocol.modeType != JarModeType.AUTO){ continue; } - if (jarProtocol.getJarTemperature()>50){ - log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo()); - continue; - } + JarThread jarOtherThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getJarOtherId()); JarProtocol jarOtherProtocol = jarOtherThread.getJarProtocol(); @@ -5065,6 +5104,10 @@ break;//寮�闂ㄤ换鍔� 鐢熸垚鍏ョ~鍖栫綈浠诲姟 } case 2: + if (jarProtocol.getJarTemperature()>jarTemperature){ + log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo()); + continue; + } if (jarWrkMastExecuteGenerate2(jarSlave,sign)){ signExecute[i] = true; break;//鍏宠繘鏂欓棬 @@ -5075,6 +5118,10 @@ break;//寮�鍑烘枡闂� } case 4: + if (jarProtocol.getJarTemperature()>jarTemperature){ + log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo()); + continue; + } if (jarWrkMastExecuteGenerate4(jarSlave,sign)){ signExecute[i] = true; break;//鍑虹~鍖栫綈 ===銆� 鍏ュ喎鍗存Ы @@ -5113,7 +5160,7 @@ signExecute[jarSlave.getId()-5] = true; continue; } - if (jarProtocol.getJarTemperature()>50){ + if (jarProtocol.getJarTemperature()>jarTemperature){ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo()); continue; } @@ -5129,7 +5176,7 @@ if (jarWrkMastExecuteGenerate5(jarSlave,sign)){ signExecute[jarSlave.getId()-5] = true; return signExecute; - //鍑虹~鍖栫綈 ===銆� 鍏ュ喎鍗存Ы + //鍐峰嵈瀹屾垚涓婅緭閫佺嚎 } continue; } @@ -5162,7 +5209,7 @@ if (jarProtocol.modeType != JarModeType.AUTO){ continue; } - if (jarProtocol.getJarTemperature()>50){ + if (jarProtocol.getJarTemperature()>jarTemperature){ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo()); continue; } @@ -5260,7 +5307,7 @@ if (jarProtocol.statusType .equals(JarStatusType.WAITING2) || jarProtocol.statusType .equals(JarStatusType.SOS)){ return false; } - if (jarProtocol.getJarTemperature()>50){ + if (jarProtocol.getJarTemperature()>jarTemperature){ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo()); continue; } @@ -5280,6 +5327,11 @@ } if (wrkMastExecuteService.getWrkMastExecuteByjarReginCount(basJar.getRegion())!=0){ + return false; + } + + int count = basJarMastService.selectCount(new EntityWrapper<BasJarMast>().eq("jar_regin", basJar.getRegion()).lt("status", 17).gt("status", 11)); + if (count>0){ return false; } @@ -5364,7 +5416,7 @@ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧姝e湪纭寲涓紝浠诲姟寮傚父锛侊紒锛�",jarProtocol.getJarNo()); return false; } - if (jarProtocol.getJarTemperature()>50){ + if (jarProtocol.getJarTemperature()>jarTemperature){ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo()); return false; } @@ -5414,9 +5466,11 @@ if (basJarMastList.size() != jarMaxLoc){ return false; } - if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),5)!=0){ - return false; - } +// if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),5)!=0 +// && basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),5)!=7 +// && basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),5)!=14){ +// return false; +// } BasJarMast basJarMastSign = basJarMastList.get(0); if (Cools.isEmpty(basJarMastSign)){ @@ -5449,10 +5503,10 @@ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧姝e湪纭寲涓紝浠诲姟寮傚父锛侊紒锛�",jarProtocol.getJarNo()); return false; } - if (jarProtocol.getJarTemperature()>50){ - log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo()); - return false; - } +// if (jarProtocol.getJarTemperature()>jarTemperature){ +// log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo()); +// return false; +// } BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo()); if (Cools.isEmpty(basJar)){ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧妗f鏃犱俊鎭紒锛侊紒",jarProtocol.getJarNo()); @@ -5501,7 +5555,7 @@ if (basJarMastList10.size()==jarMaxLoc){ return false; } - if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),4)!=0){ + if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),4)!=0 && basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),4)!=7){ return false; } @@ -5545,6 +5599,22 @@ if (Cools.isEmpty(basJar)){ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧妗f鏃犱俊鎭紒锛侊紒",jarProtocol.getJarNo()); return false; + } + + //涓存椂 + if (basJar.getJarCode()==1){ + JarThread jarOtherThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getJarOtherId()); + JarProtocol jarOtherProtocol = jarOtherThread.getJarProtocol(); + if (jarOtherProtocol == null) { + return false; + } + + if (!jarOtherProtocol.isAutoing() || jarOtherProtocol.jarErr!=0 + || !jarOtherProtocol.isLeftDoor() || !jarOtherProtocol.isRightDoor() + || jarOtherProtocol.leftDoorOpen==1 || jarOtherProtocol.leftDoorClose==1 || jarOtherProtocol.rightDoorOpen==1 || jarOtherProtocol.rightDoorClose==1){ + log.error("{}鍙风~鍖栫綈鏌ヨ璁惧涓嶆弧瓒冲墠寰�鍐峰嵈姹犳潯浠讹紝浠e彿2纭寲缃愰棬娌″紑锛侊紒锛�",jarOtherProtocol.getJarNo()); + return false; + } } //闂ㄤ綔涓� 鏃� @@ -5621,7 +5691,7 @@ if (jarProtocol.modeType != JarModeType.AUTO){ return false; } - if (jarProtocol.getJarTemperature()>50){ + if (jarProtocol.getJarTemperature()>jarTemperature){ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo()); return false; } @@ -6064,10 +6134,10 @@ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧姝e湪纭寲涓紝浠诲姟寮傚父锛侊紒锛�",jarProtocol.getJarNo()); return false; } - if (jarProtocol.getJarTemperature()>50){ - log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo()); - return false; - } +// if (jarProtocol.getJarTemperature()>jarTemperature){ +// log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo()); +// return false; +// } BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo()); if (Cools.isEmpty(basJar)){ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧妗f鏃犱俊鎭紒锛侊紒",jarProtocol.getJarNo()); @@ -6192,7 +6262,7 @@ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧姝e湪纭寲涓紝浠诲姟寮傚父锛侊紒锛�",jarProtocol.getJarNo()); return false; } - if (jarProtocol.getJarTemperature()>50){ + if (jarProtocol.getJarTemperature()>jarTemperature){ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo()); return false; } @@ -6320,7 +6390,7 @@ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧姝e湪纭寲涓紝浠诲姟寮傚父锛侊紒锛�",jarProtocol.getJarNo()); return false; } - if (jarProtocol.getJarTemperature()>50){ + if (jarProtocol.getJarTemperature()>jarTemperature){ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo()); return false; } @@ -6436,7 +6506,7 @@ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧姝e湪纭寲涓紝浠诲姟寮傚父锛侊紒锛�",jarProtocol.getJarNo()); return false; } - if (jarProtocol.getJarTemperature()>50){ + if (jarProtocol.getJarTemperature()>jarTemperature){ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo()); return false; } @@ -6552,7 +6622,7 @@ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧姝e湪纭寲涓紝浠诲姟寮傚父锛侊紒锛�",jarProtocol.getJarNo()); return false; } - if (jarProtocol.getJarTemperature()>50){ + if (jarProtocol.getJarTemperature()>jarTemperature){ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo()); return false; } @@ -6688,7 +6758,7 @@ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧姝e湪纭寲涓紝浠诲姟寮傚父锛侊紒锛�",jarProtocol.getJarNo()); return false; } - if (jarProtocol.getJarTemperature()>50){ + if (jarProtocol.getJarTemperature()>jarTemperature){ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo()); return false; } @@ -6820,7 +6890,7 @@ if (jarProtocol.modeType != JarModeType.AUTO){ return false; } - if (jarProtocol.getJarTemperature()>50){ + if (jarProtocol.getJarTemperature()>jarTemperature){ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo()); return false; } @@ -6984,7 +7054,7 @@ // if (jarProtocol.modeType != JarModeType.AUTO){ // return false; // } -// if (jarProtocol.getJarTemperature()>50){ +// if (jarProtocol.getJarTemperature()>jarTemperature){ // log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo()); // return false; // } @@ -7160,7 +7230,7 @@ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧姝e湪纭寲涓紝浠诲姟寮傚父锛侊紒锛�",jarProtocol.getJarNo()); return false; } - if (jarProtocol.getJarTemperature()>50){ + if (jarProtocol.getJarTemperature()>jarTemperature){ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo()); return false; } @@ -7618,10 +7688,6 @@ if (jarProtocol.modeType != JarModeType.AUTO){ continue; } - if (jarProtocol.getJarTemperature()>50){ - log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo()); - return false; - } BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo()); if (Cools.isEmpty(basJar)){ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧妗f鏃犱俊鎭紒锛侊紒",jarProtocol.getJarNo()); @@ -7647,6 +7713,10 @@ && jarProtocol.leftDoorOpen!=1 && jarProtocol.leftDoorOpen!=3 && jarProtocol.rightDoorOpen!=1 && jarProtocol.rightDoorOpen!=3 && (jarProtocol.leftDoorOpen==2 || jarProtocol.rightDoorOpen==2)){ + if (jarProtocol.getJarTemperature()>jarTemperature){ + log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo()); + return false; + } WrkMastExecute wrkMastExecuteSou = new WrkMastExecute(); wrkMastExecuteSou.setWrkSts(3); List<WrkMastExecute> wrkMastExecuteList = wrkMastExecuteService.selectWrkMastExecuteByWrk(wrkMastExecuteSou); @@ -7681,6 +7751,10 @@ && jarProtocol.leftDoorClose!=1 && jarProtocol.leftDoorClose!=3 && jarProtocol.rightDoorClose!=1 && jarProtocol.rightDoorClose!=3 && (jarProtocol.leftDoorClose==2 || jarProtocol.rightDoorClose==2)){ + if (jarProtocol.getJarTemperature()>jarTemperature){ + log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo()); + return false; + } WrkMastExecute wrkMastExecuteSou = new WrkMastExecute(); wrkMastExecuteSou.setWrkSts(3); List<WrkMastExecute> wrkMastExecuteList = wrkMastExecuteService.selectWrkMastExecuteByWrk(wrkMastExecuteSou); @@ -8055,7 +8129,7 @@ if (jarProtocol.statusType .equals(JarStatusType.SOS)){ continue; } - if (jarProtocol.getJarTemperature()>50){ + if (jarProtocol.getJarTemperature()>jarTemperature){ continue; } if (jarProtocol.leftDoorOpen != 0 || jarProtocol.rightDoorOpen != 0){ @@ -8082,7 +8156,7 @@ } } } catch (Exception e){ - log.error("纭寲鍖哄煙鍒嗘浠诲姟瀹屾垚寮傚父,寮傚父淇℃伅={}",e.getMessage()); + log.error("纭寲鍖哄煙鍒嗘鍏呯數浠诲姟鍒涘缓寮傚父,寮傚父淇℃伅={}",e.getMessage()); } return false; } @@ -8113,7 +8187,38 @@ if(basJarMastList.isEmpty()){ if (wrkMastExecuteService.selectNoStartCharge(steSlave.getId())==0){ if (wrkMastExecuteService.selectMoveStart(steSlave.getId())==0){ - continue; + boolean sign = true; + for (SteSlave.InStn inStn : steSlave.getSteInStn()){ + //妫�娴嬬珯鐐圭姸鎬� + DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, inStn.getDevpPlcId()); + StaProtocol staProtocol = devpThread.getStation().get(inStn.getStaNo()); + if (staProtocol == null) { + continue; + } else { + staProtocol = staProtocol.clone(); + } + if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.getWorkNo() > 0) { + // 鑾峰彇纭寲缃愪俊鎭� + JarThread jarThread = (JarThread) SlaveConnection.get(SlaveType.Jar, inStn.getJarNo()); + JarProtocol jarProtocol = jarThread.getJarProtocol(); + if (jarProtocol == null) { + continue; + } + if (jarProtocol.modeType != JarModeType.AUTO){ + continue; + } + if (jarProtocol.statusType .equals(JarStatusType.SOS)){ + continue; + } + if (jarProtocol.getJarTemperature()>jarTemperature){ + continue; + } + sign = false; + } + } + if(sign){ + continue; + } } } } @@ -8159,7 +8264,7 @@ } } } catch (Exception e){ - log.error("纭寲鍖哄煙鍒嗘浠诲姟瀹屾垚寮傚父,寮傚父淇℃伅={}",e.getMessage()); + log.error("纭寲鍖哄煙鍒嗘浠诲姟鍏呯數浠诲姟瀹屾垚寮傚父,寮傚父淇℃伅={}",e.getMessage()); } return false; } @@ -8251,7 +8356,7 @@ if (jarProtocol.statusType .equals(JarStatusType.SOS)){ continue; } - if (jarProtocol.getJarTemperature()>50){ + if (jarProtocol.getJarTemperature()>jarTemperature){ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo()); continue; } -- Gitblit v1.9.1