From 4dffa48ed02f4d2e52d12614d693366fc77a3c33 Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期五, 25 十月 2024 12:43:10 +0800
Subject: [PATCH] *
---
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 134 +++++++++++++++++++++++---------------------
1 files changed, 69 insertions(+), 65 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 e3743a4..37ab5ea 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -3112,7 +3112,11 @@
continue;
}
- if (wrkMast.getStaNo()>300){
+ if (wrkMast.getStaNo()>309){
+ int wrkCount = wrkMastMapper.selectCount(new EntityWrapper<WrkMast>().eq("io_type", 110).gt("sta_no", 309).lt("sta_no", 314).gt("wrk_sts",11L));
+ if (wrkCount>=12){
+ continue;
+ }
DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, 1);
StaProtocol staProtocolEnt = devpThread.getStation().get(212);
if (staProtocolEnt.isLoading() || staProtocolEnt.getWorkNo()!=0){
@@ -5329,11 +5333,11 @@
case 3:
case 4:
signExecute = jarWrkMastExecuteGenerateJar(signExecute,sign);//纭寲缃愪换鍔�
-// case 5:
-// signExecute = jarWrkMastExecuteGenerateBurial(signExecute, sign);//鍐峰嵈妲藉彇杈撻�佺嚎
- default:
-// jarWrkMastExecuteGenerateSte(signExecute,sign);//灏忚溅绉诲姩
+ case 5:
signExecute = jarWrkMastExecuteGenerateBurial(signExecute, sign);//鍐峰嵈妲藉彇杈撻�佺嚎
+ default:
+ jarWrkMastExecuteGenerateSte(signExecute,sign);//灏忚溅绉诲姩
+// signExecute = jarWrkMastExecuteGenerateBurial(signExecute, sign);//鍐峰嵈妲藉彇杈撻�佺嚎
}
if (!signExecute[0] && !signExecute[1]){
@@ -5458,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());
@@ -5473,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