From a36b5b1833290b01822d80f2e31a88f9197bf6dc Mon Sep 17 00:00:00 2001
From: yxFwq <1>
Date: 星期六, 20 七月 2024 00:46:03 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 43 +++++++++++++++++++++++++++++++++++--------
1 files changed, 35 insertions(+), 8 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 97c0c6d..22150b9 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -4958,6 +4958,17 @@
if (basJarMastList.size()!=integer){
log.error("{}鍙风~鍖栫綈纭寲瀹屾垚鍚庡紑闂ㄥ畬鎴愪慨鏀圭~鍖栨。妗堢姸鎬佺粨鏋滄暟閲忎笉涓�鑷达紒锛侊紒鏌ヨ璧勬枡鏁伴噺={}锛屾洿鏂拌繑鍥炴暟閲�={}",jarMastByWrkNo.getJarId(),basJarMastList.size(),integer);
}
+ } else if (wrkMastExecute.getIoType()==2 && jarMastByWrkNo.getStatus()==5){
+ List<BasJarMast> basJarMastList = basJarMastService.getJarMastByJarIdAndStatusList(jarMastByWrkNo.getJarId(), new ArrayList<Integer>() {{
+ add(4);//纭寲瀹屾垚
+ }});
+ if (basJarMastList.isEmpty()){
+ continue;
+ }
+ Integer integer = basJarMastService.updateStatus(jarMastByWrkNo.getJarId(), 4, 5);
+ if (basJarMastList.size()!=integer){
+ log.error("{}鍙风~鍖栫綈纭寲瀹屾垚鍚庡紑闂ㄥ畬鎴愪慨鏀圭~鍖栨。妗堢姸鎬佺粨鏋滄暟閲忎笉涓�鑷达紒锛侊紒鏌ヨ璧勬枡鏁伴噺={}锛屾洿鏂拌繑鍥炴暟閲�={}",jarMastByWrkNo.getJarId(),basJarMastList.size(),integer);
+ }
} else {
if (!basJarMastService.updateById(jarMastByWrkNo)){
log.error("纭寲鍖哄煙鍒嗘浠诲姟瀹屾垚寮傚父,BasJarMast={},寮傚父淇℃伅={}",JSON.toJSONString(jarMastByWrkNo),"鏇存柊basJarMast澶辫触");
@@ -5314,7 +5325,7 @@
List<BasJarMast> basJarMastList = basJarMastService.getJarMastByJarIdAndStatusList(jarSlave.getId(), new ArrayList<Integer>() {{
add(4);
}});
- if (basJarMastList.size() != 7){
+ if (basJarMastList.size() != jarMaxLoc){
return false;
}
@@ -5353,7 +5364,7 @@
log.error("{}鍙风~鍖栫綈鏌ヨ璁惧妗f鏃犱俊鎭紒锛侊紒",jarProtocol.getJarNo());
return false;
}
- if (basJar.getJarCount()!=7){
+ if (!basJar.getJarCount().equals(jarMaxLoc)){
log.error("{}鍙风~鍖栫綈鏌ヨ璁惧搴撳瓨鏁板紓甯革紒锛侊紒搴撳瓨寰呭叆鏁帮細{}",jarProtocol.getJarNo(),basJar.getJarCount());
return false;
}
@@ -5391,7 +5402,7 @@
List<BasJarMast> basJarMastList = basJarMastService.getJarMastByJarIdAndStatusList(jarSlave.getId(), new ArrayList<Integer>() {{
add(6);
}});
- if (basJarMastList.size() != 7){
+ if (basJarMastList.size() != jarMaxLoc){
return false;
}
if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),5)!=0){
@@ -6617,6 +6628,22 @@
return false;
}
+ // 鑾峰彇纭寲缃愪俊鎭�
+ JarThread jarThreadOther = (JarThread) SlaveConnection.get(SlaveType.Jar, SteAndJarUtil.getRgvJarNo(wrkMastExecute.getJarId()));
+ JarProtocol jarProtocolOther = jarThreadOther.getJarProtocol();
+ if (jarProtocolOther == null) {
+ return false;
+ }
+ if (jarProtocolOther.modeType != JarModeType.AUTO){
+ return false;
+ }
+
+ BasJar basJarOther = basJarMapper.selectById(jarProtocolOther.getJarNo());
+ if (Cools.isEmpty(basJarOther)){
+ log.error("{}鍙风~鍖栫綈鏌ヨ璁惧妗f鏃犱俊鎭紒锛侊紒",jarProtocolOther.getJarNo());
+ return false;
+ }
+
// //鍒ゆ柇灏忚溅鐘舵��
// if (!jarWrkMastExecuteGenerateSteStatus(basJar.getEnterSteNo(),1)){
// return false;
@@ -6659,7 +6686,7 @@
&& jarProtocol.leftDoorOpen==0 && jarProtocol.leftDoorClose==0 && jarProtocol.rightDoorOpen==0 && jarProtocol.rightDoorClose==0){
log.error("6:鍏ュ喎鍗存Ы Three==>浠诲姟涓嬪彂===>琛�={}",6115);
- if (SteAndJarUtil.steAndJarNowRow(staProtocolRGV.getNowRow() , jarProtocol.getJarNo())){
+ if (SteAndJarUtil.steAndJarNowRow(staProtocolRGV.getNowRow() , jarProtocolOther.getJarNo())){
//鍒ゆ柇灏忚溅鐘舵��
if (!jarWrkMastExecuteGenerateSteStatus(basJar.getEnterSteNo(),2,SteStatusType.WAITING2,false)){
return false;
@@ -6677,7 +6704,7 @@
}
} else {
//璋冭溅 == > endRow
- if (!jarRgvMoveTake(wrkMastExecute,1)){
+ if (!jarRgvMoveTake(wrkMastExecute,SteAndJarUtil.getJarNoEndRow(jarProtocolOther.getJarNo()))){
log.error("骞宠 杞GV鍛戒护涓嬪彂澶辫触锛宺gv鍙�={},浠诲姟鏁版嵁={},纭寲缃愭暟鎹�={},sign={}",
wrkMastExecute.getJarId(), JSON.toJSONString(wrkMastExecute), JSON.toJSONString(jarProtocol),sign);
}
@@ -8080,7 +8107,7 @@
}
public synchronized Integer jarGetStartStaNo(Integer staNo) {
try {
- int[] jarNos=new int[]{1,2,3,4};//(607鍒嗛厤纭寲缃�)
+ int[] jarNos=new int[]{4,2,3,1};//(607鍒嗛厤纭寲缃�)
ArrayList<Integer> staNos = new ArrayList<Integer>() {{
add(607);add(608);add(609);add(610);add(611);add(612);
add(613);add(614);add(615);add(616);add(617);add(618);
@@ -8099,7 +8126,7 @@
if (basJarMastList.isEmpty()){
continue;
}
- if (basJarMastList.size()>0 && basJarMastList.size()<7){
+ if (basJarMastList.size()>0 && basJarMastList.size()<jarMaxLoc){
jarNoList.add(jarNo);
}
}
@@ -8153,7 +8180,7 @@
}
}
}
- if (count<7){
+ if (count<jarMaxLoc){
return basJar.getEntStaNo$();
}
}
--
Gitblit v1.9.1