From c6ac196d7207e64b8591f84932439214561fc446 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期五, 29 八月 2025 15:56:52 +0800
Subject: [PATCH] 1
---
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 50 +++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 41 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 627c8a8..a9f0dbf 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -602,7 +602,7 @@
/**
* 鍑哄簱鍒板嚭搴撳彛
*/
- public synchronized void stnToOutStn() {
+ public synchronized void stnToOutStn(int i) {
ShuttleThread shuttleThread1 = (ShuttleThread) SlaveConnection.get(SlaveType.Shuttle, 1);
ShuttleThread shuttleThread2 = (ShuttleThread) SlaveConnection.get(SlaveType.Shuttle, 2);
ShuttleProtocol status1 = shuttleThread1.getStatus();
@@ -633,19 +633,35 @@
if (wrkMast == null) {
continue;
}
-
String sourceLocNo = "1200305";
- String locNo = "1300105";
- if (wrkMast.getStaNo() == 1013) {
- sourceLocNo = "1200301";
- locNo = "1300101";
- if (loc.contains(locNo)) {
+ String locNo = "1100105";
+ if (wrkMast.getShuttleNo() == 1) {
+ if (wrkMast.getStaNo() == 1013) {
+ sourceLocNo = "1200301";
locNo = "1100101";
+ if (loc.contains(locNo)) {
+ locNo = "1100101";
+ }
+ } else {
+ if (loc.contains(locNo)) {
+ locNo = "1100105";
+ }
}
} else {
- if (loc.contains(locNo)) {
- locNo = "1100105";
+ if (wrkMast.getStaNo() == 1013) {
+ sourceLocNo = "1200301";
+ locNo = "1000101";
+ if (loc.contains(locNo)) {
+ locNo = "1000101";
+ }
+ } else {
+ if (loc.contains(locNo)) {
+ locNo = "1000105";
+ }
}
+ }
+ if (loc.contains(locNo)) {
+ locNo = "0900105";
}
boolean dispatchShuttle = shuttleDispatchUtils.shuttleMoveGenerate(wrkMast.getWrkNo(), sourceLocNo, locNo, wrkMast.getShuttleNo(), null, false);
@@ -2484,6 +2500,22 @@
if (basShuttleCharge == null) {
return false;
}
+ try {
+ ShuttleThread shuttleThread2 = (ShuttleThread) SlaveConnection.get(SlaveType.Shuttle, wrkMast.getShuttleNo() == 1 ? 2 : 1);
+ if (shuttleThread2 == null) {
+ return false;
+ }
+ ShuttleProtocol shuttleProtocol2 = shuttleThread2.getStatus();
+ if (shuttleProtocol2 == null) {
+ return false;
+ }
+ if (shuttleProtocol2.getCurrentLocNo().equals(basShuttleCharge.getWaitLocNo())) {
+ String locNo = Utils.getLocNo(Utils.getRow(basShuttleCharge.getWaitLocNo()) + 1, Utils.getBay(basShuttleCharge.getWaitLocNo()), Utils.getLev(basShuttleCharge.getWaitLocNo()));
+ basShuttleCharge.setWaitLocNo(locNo);
+ }
+ } catch (Exception e) {
+ log.error("瀵绘壘鏂扮殑寰呮満浣�,{}", e);
+ }
//璋冨害灏忚溅鍘诲緟鏈轰綅
boolean dispatched = shuttleDispatchUtils.dispatchShuttle(wrkMast.getWrkNo(), basShuttleCharge.getWaitLocNo(), wrkMast.getShuttleNo());
--
Gitblit v1.9.1