From 66b60801db993aab90a62198db07534b6ee129fa Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期五, 25 十月 2024 12:42:50 +0800
Subject: [PATCH] *
---
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 120 ++++++++++++++++++++++++++++++------------------------------
1 files changed, 60 insertions(+), 60 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 c3abf9f..5630fe9 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -5462,13 +5462,13 @@
}
//闂ㄤ綔涓� 鏃�
//鑷姩銆佺┖闂层�佸彸闂ㄥ叧闂�� Other宸﹂棬鍏抽棴
- if (jarProtocol.isAutoing() && jarProtocol.jarErr==0
- && jarProtocol.leftDoorOpen==0 && jarProtocol.leftDoorClose==0 && jarProtocol.rightDoorOpen==0 && jarProtocol.rightDoorClose==0){
+ if (jarProtocol.isAutoing() && jarProtocol.jarErr==0){
if (jarWrkMastExecuteGenerate5(jarSlave,sign)){
signExecute[jarSlave.getId()-5] = true;
return signExecute;
//鍐峰嵈瀹屾垚涓婅緭閫佺嚎
}
+ continue;
}
} catch (Exception e){
log.error("{}鍙风~鍖栫綈JarWrkMastExecute浠诲姟鍒涘缓寮傚父,寮傚父鍘熷洜={}",jarSlave.getId(),e.getMessage());
@@ -5477,65 +5477,65 @@
return signExecute;
}
-// public synchronized boolean[] jarWrkMastExecuteGenerateSte(boolean[] signExecute,Integer sign) {
-// for (JarSlave jarSlave : slaveProperties.getJar()) {
-// if (jarSlave.getId()<5){
-// continue;
-// }
-// try{
-// if (signExecute[jarSlave.getId()-5]){
-// continue;
-// }
-// if (wrkMastExecuteService.getWrkMastExecuteByJarIdCount(jarSlave.getId())!=0){
-// continue;
-// }
-//
-// // 鑾峰彇纭寲缃愪俊鎭�
-// JarThread jarThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getId());
-// JarProtocol jarProtocol = jarThread.getJarProtocol();
-// if (jarProtocol == null) {
-// continue;
-// }
-// if (jarProtocol.modeType != JarModeType.AUTO){
-// continue;
-// }
-// if (jarProtocol.getJarTemperature()>jarTemperature){
-// log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo());
-// continue;
-// }
-//
-// JarThread jarOtherThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getJarOtherId());
-// JarProtocol jarOtherProtocol = jarOtherThread.getJarProtocol();
-// if (jarOtherProtocol == null) {
-// continue;
-// }
-//// if (jarOtherProtocol.modeType != JarModeType.AUTO){
-//// continue;
-//// }
-//
-// BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo());
-// if (Cools.isEmpty(basJar)){
-// log.error("{}鍙风~鍖栫綈鏌ヨ璁惧妗f鏃犱俊鎭紒锛侊紒",jarProtocol.getJarNo());
-// continue;
-// }
-// //闂ㄤ綔涓� 鏃�
-// //鑷姩銆佺┖闂层�佸彸闂ㄥ叧闂�� Other宸﹂棬鍏抽棴
-// if (jarProtocol.isAutoing() && jarProtocol.jarErr==0
-// && jarProtocol.leftDoorOpen==0 && jarProtocol.leftDoorClose==0 && jarProtocol.rightDoorOpen==0 && jarProtocol.rightDoorClose==0){
-// switch (sign){
-// case 5:
-// if (jarWrkMastExecuteGenerate5(jarSlave,sign)){
-// signExecute[jarSlave.getId()-5] = true;
-// break;
-// }
+ public synchronized boolean[] jarWrkMastExecuteGenerateSte(boolean[] signExecute,Integer sign) {
+ for (JarSlave jarSlave : slaveProperties.getJar()) {
+ if (jarSlave.getId()<5){
+ continue;
+ }
+ try{
+ if (signExecute[jarSlave.getId()-5]){
+ continue;
+ }
+ if (wrkMastExecuteService.getWrkMastExecuteByJarIdCount(jarSlave.getId())!=0){
+ continue;
+ }
+
+ // 鑾峰彇纭寲缃愪俊鎭�
+ JarThread jarThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getId());
+ JarProtocol jarProtocol = jarThread.getJarProtocol();
+ if (jarProtocol == null) {
+ continue;
+ }
+ if (jarProtocol.modeType != JarModeType.AUTO){
+ continue;
+ }
+ if (jarProtocol.getJarTemperature()>jarTemperature){
+ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....锛侊紒锛�",jarProtocol.getJarNo());
+ continue;
+ }
+
+ JarThread jarOtherThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getJarOtherId());
+ JarProtocol jarOtherProtocol = jarOtherThread.getJarProtocol();
+ if (jarOtherProtocol == null) {
+ continue;
+ }
+// if (jarOtherProtocol.modeType != JarModeType.AUTO){
+// continue;
// }
-// }
-// } catch (Exception e){
-// log.error("{}鍙风~鍖栫綈JarWrkMastExecute浠诲姟鍒涘缓寮傚父,寮傚父鍘熷洜={}",jarSlave.getId(),e.getMessage());
-// }
-// }
-// return signExecute;
-// }
+
+ BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo());
+ if (Cools.isEmpty(basJar)){
+ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧妗f鏃犱俊鎭紒锛侊紒",jarProtocol.getJarNo());
+ continue;
+ }
+ //闂ㄤ綔涓� 鏃�
+ //鑷姩銆佺┖闂层�佸彸闂ㄥ叧闂�� Other宸﹂棬鍏抽棴
+ if (jarProtocol.isAutoing() && jarProtocol.jarErr==0
+ && jarProtocol.leftDoorOpen==0 && jarProtocol.leftDoorClose==0 && jarProtocol.rightDoorOpen==0 && jarProtocol.rightDoorClose==0){
+ switch (sign){
+ case 5:
+ if (jarWrkMastExecuteGenerate5(jarSlave,sign)){
+ signExecute[jarSlave.getId()-5] = true;
+ break;//鍑虹~鍖栫綈 ===銆� 鍏ュ喎鍗存Ы
+ }
+ }
+ }
+ } catch (Exception e){
+ log.error("{}鍙风~鍖栫綈JarWrkMastExecute浠诲姟鍒涘缓寮傚父,寮傚父鍘熷洜={}",jarSlave.getId(),e.getMessage());
+ }
+ }
+ return signExecute;
+ }
/**
* JarWrkMastExecute浠诲姟鍒涘缓 //瀹屾垚
--
Gitblit v1.9.1