From aa759e28b7f93b16c3d8dc5d3313e4bd485e4401 Mon Sep 17 00:00:00 2001 From: yxFwq <1> Date: 星期三, 08 一月 2025 13:57:36 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 62 ++++++++++++++++++++++++------- 1 files changed, 48 insertions(+), 14 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 cc3deef..4451bad 100644 --- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java @@ -5159,16 +5159,23 @@ break; } int count = basJarMastService.selectCount(new EntityWrapper<BasJarMast>().eq("jar_regin", basJar.getRegion()).lt("status", 17).gt("status", 5)); - if (count>0){ + JarThread jarOtherThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getJarOtherId()); + JarProtocol jarOtherProtocol = jarOtherThread.getJarProtocol(); + if (jarOtherProtocol == null) { break; + } + if (count>0){ + if (jarOtherProtocol.getJarTemperature()<jarTemperature){ + break; + } } if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),3)!=0){ if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(), 3).equals(basJarOther.getJarCount())){ - JarThread jarOtherThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getJarOtherId()); - JarProtocol jarOtherProtocol = jarOtherThread.getJarProtocol(); - if (jarOtherProtocol == null) { - break; - } +// 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 { @@ -5427,6 +5434,11 @@ signExecute[i] = true; break;//寮�闂ㄤ换鍔� 鐢熸垚鍏ョ~鍖栫綈浠诲姟 } + case 3: + if (jarWrkMastExecuteGenerate3(jarSlave,sign)){ + signExecute[i] = true; + break;//寮�鍑烘枡闂� + } case 2: if (jarProtocol.getJarTemperature()>jarTemperature){ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo()); @@ -5435,11 +5447,6 @@ if (jarWrkMastExecuteGenerate2(jarSlave,sign)){ signExecute[i] = true; break;//鍏宠繘鏂欓棬 - } - case 3: - if (jarWrkMastExecuteGenerate3(jarSlave,sign)){ - signExecute[i] = true; - break;//寮�鍑烘枡闂� } case 4: if (jarProtocol.getJarTemperature()>jarTemperature){ @@ -7823,8 +7830,10 @@ // 涓嬪彂绔欑偣淇℃伅 if (!MessageQueue.offer(SlaveType.Devp, 2, new Task(9, staProtocol))) { log.error("骞宠 杞gv鍛戒护涓嬪彂澶辫触锛屽爢鍨涙満鍙�={},浠诲姟鏁版嵁={},涓嬪彂鏁版嵁={}", wrkMastExecute.getRgvId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(staProtocol)); + Thread.sleep(500); return false; } + Thread.sleep(500); return true; }catch (Exception e){ log.error("骞宠 杞gv鍛戒护涓嬪彂澶辫触锛孯gv鍙�={},浠诲姟鏁版嵁={},endRow={}", wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(endRow)); @@ -7844,8 +7853,10 @@ // 涓嬪彂绔欑偣淇℃伅 if (!MessageQueue.offer(SlaveType.Devp, 2, new Task(10, staProtocol))) { log.error("骞宠 杞gv鍛戒护涓嬪彂澶辫触锛屽爢鍨涙満鍙�={},浠诲姟鏁版嵁={},涓嬪彂鏁版嵁={}", wrkMastExecute.getRgvId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(staProtocol)); + Thread.sleep(500); return false; } + Thread.sleep(500); return true; }catch (Exception e){ log.error("骞宠 杞gv鍛戒护涓嬪彂澶辫触锛孯gv鍙�={},浠诲姟鏁版嵁={},RGV4={},RGV5={}", wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(RGV4), JSON.toJSON(RGV5)); @@ -7864,8 +7875,10 @@ // 涓嬪彂绔欑偣淇℃伅 if (!MessageQueue.offer(SlaveType.Devp, 2, new Task(11, staProtocol))) { log.error("骞宠 杞gv鍛戒护涓嬪彂澶辫触锛屽爢鍨涙満鍙�={},浠诲姟鏁版嵁={},涓嬪彂鏁版嵁={}", wrkMastExecute.getRgvId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(staProtocol)); + Thread.sleep(500); return false; } + Thread.sleep(500); return true; }catch (Exception e){ log.error("骞宠 杞gv鍛戒护涓嬪彂澶辫触锛孯gv鍙�={},浠诲姟鏁版嵁={},RGV6={}", wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(RGV6)); @@ -7891,8 +7904,10 @@ steCommand.setJarNo(siteId.shortValue()); if (!MessageQueue.offer(SlaveType.Ste, steCommand.getSteNo(), new Task(2, steCommand))) { log.error("绌挎杞te鍛戒护涓嬪彂澶辫触锛屽爢鍨涙満鍙�={},浠诲姟鏁版嵁={},涓嬪彂鏁版嵁={},complete={}", steCommand.getSteNo(), JSON.toJSON(wrkMastExecute), JSON.toJSON(steCommand),complete); + Thread.sleep(500); return false; } + Thread.sleep(500); return true; }catch (Exception e){ log.error("绌挎杞te鍛戒护涓嬪彂澶辫触锛屽爢鍨涙満鍙�={},浠诲姟鏁版嵁={},complete={}", wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(complete)); @@ -7910,8 +7925,10 @@ jarCommand.setTaskModeType(jarTaskModeType); if (!MessageQueue.offer(SlaveType.Jar, jarCommand.getJarNo(), new Task(2, jarCommand))) { log.error("纭寲缃怞ar鍛戒护涓嬪彂澶辫触锛屽爢鍨涙満鍙�={},浠诲姟鏁版嵁={},涓嬪彂鏁版嵁={}", jarCommand.getJarNo(), JSON.toJSON(wrkMastExecute), JSON.toJSON(jarCommand)); + Thread.sleep(500); return false; } + Thread.sleep(500); return true; }catch (Exception e){ log.error("纭寲缃怞ar鍛戒护涓嬪彂澶辫触锛屽爢鍨涙満鍙�={},浠诲姟鏁版嵁={},涓嬪彂鏁版嵁={}", wrkMastExecute.getJarId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(jarTaskModeType)); @@ -8151,6 +8168,11 @@ BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo()); if (Cools.isEmpty(basJar)){ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧妗f鏃犱俊鎭紒锛侊紒",jarProtocol.getJarNo()); + continue; + } + if (jarProtocol.leftDoorOpen==1 || jarProtocol.leftDoorClose==1 || + jarProtocol.rightDoorOpen==1 || jarProtocol.rightDoorClose==1 + ){ continue; } if (jarProtocol.getJarErr()==0 && (jarProtocol.getStatusType().equals(JarStatusType.WAITING1) || jarProtocol.getStatusType().equals(JarStatusType.MOVING)) @@ -8627,7 +8649,11 @@ if (jarProtocol.modeType != JarModeType.AUTO){ continue; } - if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){ + if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2) + || jarProtocol.statusType .equals(JarStatusType.WAITING3) + || jarProtocol.statusType .equals(JarStatusType.WAITING4) + || jarProtocol.statusType .equals(JarStatusType.WAITING5) + || jarProtocol.statusType .equals(JarStatusType.OFF_LINE)){ continue; } if (jarProtocol.getJarTemperature()>jarTemperature){ @@ -8718,7 +8744,11 @@ if (jarProtocol.modeType != JarModeType.AUTO){ continue; } - if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){ + if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2) + || jarProtocol.statusType .equals(JarStatusType.WAITING3) + || jarProtocol.statusType .equals(JarStatusType.WAITING4) + || jarProtocol.statusType .equals(JarStatusType.WAITING5) + || jarProtocol.statusType .equals(JarStatusType.OFF_LINE)){ continue; } if (jarProtocol.getJarTemperature()>jarTemperature){ @@ -8938,7 +8968,11 @@ if (jarProtocol.modeType != JarModeType.AUTO){ continue; } - if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){ + if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2) + || jarProtocol.statusType .equals(JarStatusType.WAITING3) + || jarProtocol.statusType .equals(JarStatusType.WAITING4) + || jarProtocol.statusType .equals(JarStatusType.WAITING5) + || jarProtocol.statusType .equals(JarStatusType.OFF_LINE)){ continue; } if (jarProtocol.getJarTemperature()>jarTemperature){ -- Gitblit v1.9.1