From e75603cc12fb0e066474f73623192a1bb27065e8 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期四, 19 十月 2023 16:51:18 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 6 ++++--
src/main/java/com/zy/common/utils/ShuttleDispatchUtils.java | 14 ++++++++++++--
2 files changed, 16 insertions(+), 4 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 1d88139..c54ab87 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -528,6 +528,7 @@
wrkMast.setStaNo(liftStaProtocol.getStaNo());//鐩爣绔�
wrkMast.setLocNo(sourceLocNo); // 鐩爣搴撲綅 = 鍑哄簱鏃剁殑婧愬簱浣�
wrkMast.setShuttleNo(null); // 绌挎杞︽竻绌�
+ wrkMast.setLiftNo(null);// 鎻愬崌鏈烘竻绌�
wrkMast.setModiTime(new Date());
if (wrkMastMapper.updateById(wrkMast) == 0) {
throw new CoolException(wrkMast.getWrkNo() + "鏇存柊宸ヤ綔妗f暟鎹姸鎬佸け璐�");
@@ -1501,7 +1502,7 @@
}
//鑾峰彇绌挎杞︽渶杩戜笖绌洪棽鐨勬彁鍗囨満杈撻�佺珯鐐�
- LiftStaProtocol liftSta = shuttleDispatchUtils.getRecentLiftSta(shuttleThread.getSlave().getId());
+ LiftStaProtocol liftSta = shuttleDispatchUtils.getRecentLiftSta(shuttleThread.getSlave().getId(), Utils.getLev(wrkMast.getLocNo()));
if (liftSta == null) {
return false;//娌℃湁鍙敤涓旂┖闂茬殑杈撻�佺珯鐐�
}
@@ -2223,7 +2224,7 @@
continue;
}
- if (wrkMast.getWrkSts() != 25) {//25.鎻愬崌鏈烘惉杩愬畬鎴�
+ if (wrkMast.getWrkSts() != 29) {//29.鍑哄簱瀹屾垚
continue;
}
@@ -2233,6 +2234,7 @@
//瑕嗙洊宸ヤ綔妗g洰鏍囩珯
wrkMast.setStaNo(sourceStaNo);
wrkMast.setSourceStaNo(staNo);
+ wrkMast.setMk("N");
if (wrkMastMapper.updateById(wrkMast) > 0) {
//鍚�300绔欏啓鍏ョ洰鏍囩珯
staProtocol = staProtocol.clone();
diff --git a/src/main/java/com/zy/common/utils/ShuttleDispatchUtils.java b/src/main/java/com/zy/common/utils/ShuttleDispatchUtils.java
index 603d742..e13f369 100644
--- a/src/main/java/com/zy/common/utils/ShuttleDispatchUtils.java
+++ b/src/main/java/com/zy/common/utils/ShuttleDispatchUtils.java
@@ -236,7 +236,7 @@
if (Utils.getLev(locNo) != shuttleProtocol.getPoint().getZ()) {
//鐩爣搴撲綅鍜屽皬杞﹀簱浣嶅浜庝笉鍚屼竴妤煎眰锛岄渶瑕侀�氳繃鎻愬崌鏈鸿皟搴�
//鑾峰彇绌挎杞︽渶杩戜笖绌洪棽鐨勬彁鍗囨満杈撻�佺珯鐐�
- LiftStaProtocol liftSta = this.getRecentLiftSta(shuttleNo);
+ LiftStaProtocol liftSta = this.getRecentLiftSta(shuttleNo, Utils.getLev(locNo));
if (liftSta == null) {
return false;//娌℃湁鍙敤涓旂┖闂茬殑杈撻�佺珯鐐�
}
@@ -344,7 +344,7 @@
/**
* 鑾峰彇绌挎杞︽渶杩戜笖绌洪棽鐨勬彁鍗囨満杈撻�佺珯鐐�
*/
- public LiftStaProtocol getRecentLiftSta(Integer shuttleNo) {
+ public LiftStaProtocol getRecentLiftSta(Integer shuttleNo, Integer targetLev) {
//鑾峰彇鍥涘悜绌挎杞︾嚎绋�
NyShuttleThread shuttleThread = (NyShuttleThread) SlaveConnection.get(SlaveType.Shuttle, shuttleNo);
if (shuttleThread == null) {
@@ -376,6 +376,16 @@
continue;
}
+ //鍒ゆ柇鐩爣妤煎眰绔欑偣鏄惁鏃犳墭鐩�
+ LiftStaProtocol targetLiftStaProtocol = NyLiftUtils.getLiftStaByLev(slave.getId(), targetLev);
+ if (targetLiftStaProtocol == null) {
+ continue;
+ }
+
+ if (targetLiftStaProtocol.getHasTray()) {
+ continue;//鏈夋墭鐩樿烦杩�
+ }
+
list.add(liftStaProtocol);
}
--
Gitblit v1.9.1