From f78f7a18a7fc91bea907c5238b788deb1e082364 Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期三, 03 四月 2024 09:19:53 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 46 +++++++++++++++++++++++++++++++++++++---------
1 files changed, 37 insertions(+), 9 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 181516a..1c2fce9 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -4088,6 +4088,7 @@
if (integer==0){
return;
}
+ boolean signRgv = true;
for (RgvSlave rgvSlave:slaveProperties.getRgv()) {
RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, rgvSlave.getId());
RgvProtocol rgvProtocol = rgvThread.getRgvProtocol();
@@ -4101,25 +4102,52 @@
}
// 鍙湁褰揜GV绌洪棽銆佽嚜鍔�,宸ヤ綅涓�鏃犵墿//rgv鍙敤
- if (rgvProtocol.getStatusType() == RgvStatusType.IDLE
+ if (!(rgvProtocol.getStatusType() == RgvStatusType.IDLE
&& rgvProtocol.getModeType() == RgvModeType.AUTO
&& rgvProtocol.getLoaded1()==0 //鐜板満淇敼锛氬彔鐩樻満锛屼笉婊¢兘绠楁棤鐗╋紝鎬庝箞鍒ゆ柇闇�瑕佽窡鐢垫帶瀵规帴
&& rgvProtocol.getTaskNo1()==0
&& rgvProtocol.getTaskNo2()==0
&& rgvProtocol.getStatusType1() == RgvStatusType.IDLE
&& rgvProtocol.getStatusType2() == RgvStatusType.IDLE
- ) {
- BasRgvMap basRgvMap = basRgvMapMapper.selectById(rgvProtocol.getRgvNo());
- if (rgvProtocol.getRgvPosI().equals(basRgvMap.getStartRoute())){
+ )) {
+ signRgv = false;
+ break;
+ }
+ }
+ if (signRgv){
+ for (RgvSlave rgvSlave:slaveProperties.getRgv()) {
+ RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, rgvSlave.getId());
+ RgvProtocol rgvProtocol = rgvThread.getRgvProtocol();
+ if (rgvProtocol == null) {
continue;
}
- if (rgvProtocol.getRgvNo()==1 && (rgvProtocol.getRgvPosI().equals(101) || rgvProtocol.getRgvPosI().equals(102) )){
- continue;
- } else if (rgvProtocol.getRgvNo()==2 && (rgvProtocol.getRgvPosI().equals(116) || rgvProtocol.getRgvPosI().equals(117) ) ){
+ BasRgv basRgv = basRgvService.selectById(rgvSlave.getId());
+ if (basRgv == null) {
+ log.error("{}鍙稲GV灏氭湭鍦ㄦ暟鎹簱杩涜缁存姢锛�", rgvSlave.getId());
continue;
}
- rgvAvoidanceXY(rgvProtocol.getRgvNo());
- rgvMapUpdate(basRgvMap,basRgvMap.getStartRoute(),basRgvMap.getStartRoute());
+
+ // 鍙湁褰揜GV绌洪棽銆佽嚜鍔�,宸ヤ綅涓�鏃犵墿//rgv鍙敤
+ if (rgvProtocol.getStatusType() == RgvStatusType.IDLE
+ && rgvProtocol.getModeType() == RgvModeType.AUTO
+ && rgvProtocol.getLoaded1()==0 //鐜板満淇敼锛氬彔鐩樻満锛屼笉婊¢兘绠楁棤鐗╋紝鎬庝箞鍒ゆ柇闇�瑕佽窡鐢垫帶瀵规帴
+ && rgvProtocol.getTaskNo1()==0
+ && rgvProtocol.getTaskNo2()==0
+ && rgvProtocol.getStatusType1() == RgvStatusType.IDLE
+ && rgvProtocol.getStatusType2() == RgvStatusType.IDLE
+ ) {
+ BasRgvMap basRgvMap = basRgvMapMapper.selectById(rgvProtocol.getRgvNo());
+ if (rgvProtocol.getRgvPosI().equals(basRgvMap.getStartRoute())){
+ continue;
+ }
+ if (rgvProtocol.getRgvNo()==1 && (rgvProtocol.getRgvPosI().equals(101) || rgvProtocol.getRgvPosI().equals(102) )){
+ continue;
+ } else if (rgvProtocol.getRgvNo()==2 && (rgvProtocol.getRgvPosI().equals(116) || rgvProtocol.getRgvPosI().equals(117) ) ){
+ continue;
+ }
+ rgvAvoidanceXY(rgvProtocol.getRgvNo());
+ rgvMapUpdate(basRgvMap,basRgvMap.getStartRoute(),basRgvMap.getStartRoute());
+ }
}
}
}catch (Exception e){
--
Gitblit v1.9.1