From 8e30c21ed0d07378eafb4996440b9de994d5dcc8 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期五, 11 七月 2025 13:11:27 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 45 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 45 insertions(+), 0 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 2e22ec6..42eeabc 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -2206,13 +2206,16 @@
ArrayList<Integer> list = new ArrayList<Integer>(){{add(2003);add(2002);}};
for (Integer staNo : list) {
Integer devpId = null;
+ Integer rgvStaNoDevpId = null;
Integer rgvStaNo = null;
if (staNo == 2003) {
devpId = 1;
rgvStaNo = 2002;
+ rgvStaNoDevpId = 2;
}else {
devpId = 2;
rgvStaNo = 2003;
+ rgvStaNoDevpId = 1;
}
SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devpId);
@@ -2242,6 +2245,43 @@
continue;
}
+ SiemensDevpThread devpThread2 = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, rgvStaNoDevpId);
+ if (devpThread2 == null) {
+ continue;
+ }
+ StaProtocol staProtocolRgvStaNo = devpThread2.getStation().get(rgvStaNo);
+ if (staProtocolRgvStaNo == null) {
+ continue;
+ }
+
+ if (!staProtocolRgvStaNo.isAutoing()) {
+ continue;
+ }
+
+ if (staProtocolRgvStaNo.isLoading()) {
+ continue;
+ }
+
+ // 鑾峰彇RGV淇℃伅
+ RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, 1);
+ if (rgvThread == null) {
+ continue;
+ }
+
+ RgvProtocol rgvProtocol = rgvThread.getRgvProtocol();
+ if (rgvProtocol == null) {
+ continue;
+ }
+
+ if (rgvProtocol.statusType1 != RgvStatusType.IDLE && rgvProtocol.getTaskNo1() != 0) {
+ continue;
+ }
+
+ Object object = redisUtil.get(RedisConstantType.RGV_MOVE_LOCK + wrkMast.getWrkNo());
+ if (object != null) {
+ continue;
+ }
+
RgvCommand command = new RgvCommand();
command.setRgvNo(1); // RGV缂栧彿
command.setAckFinish1((short) 0); // 浠诲姟瀹屾垚纭浣�
@@ -2259,6 +2299,7 @@
wrkMast.setWrkSts(201L);//201.RGV鎼繍涓�
wrkMast.setModiTime(new Date());
wrkMastService.updateById(wrkMast);
+ redisUtil.set(RedisConstantType.RGV_MOVE_LOCK + wrkMast.getWrkNo(), "lock", 60 * 60);
}
}
}
@@ -2287,6 +2328,10 @@
continue;
}
+ if (wrkMast.getWrkSts() != 201) {
+ continue;
+ }
+
Integer devpId = null;
Integer devpStaNo = null;
String locNo = null;
--
Gitblit v1.9.1