From 7a3193a3d0a94daff257cb13764a83b9863bad22 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期三, 04 十月 2023 14:20:49 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/controller/LiftController.java |   26 ++++++++++----------------
 1 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/LiftController.java b/src/main/java/com/zy/asrs/controller/LiftController.java
index a2199df..50f8d46 100644
--- a/src/main/java/com/zy/asrs/controller/LiftController.java
+++ b/src/main/java/com/zy/asrs/controller/LiftController.java
@@ -234,24 +234,14 @@
                     //绉诲姩鎵樼洏
                     int workNo = commonService.getWorkNo(3);//鑾峰彇浠诲姟鍙�
 
-                    Integer startSta = null;
-                    Integer targetSta = null;
-                    for (LiftStaProtocol liftStaProtocol : liftThread.getLiftStaProtocols()) {
-                        if (liftStaProtocol.getStaNo() == param.getSourceStaNo()) {
-                            startSta = liftStaProtocol.getStaNo();
-                        }
-
-                        if (liftStaProtocol.getLev() == param.getStaNo()) {
-                            targetSta = liftStaProtocol.getStaNo();
-                        }
-                    }
-
-                    if (startSta == null || targetSta == null) {
-                        throw new CoolException("璧风偣鎴栫洰鏍囩偣涓嶅瓨鍦�");
-                    }
+//                    LiftStaProtocol sourceLiftSta = NyLiftUtils.getLiftStaByStaNo(param.getSourceStaNo());
+//                    LiftStaProtocol liftSta = NyLiftUtils.getLiftStaByStaNo(param.getStaNo());
+//                    if (sourceLiftSta == null || liftSta == null) {
+//                        throw new CoolException("婧愮珯鎴栫洰鏍囩珯涓嶅瓨鍦�");
+//                    }
 
                     //鑾峰彇鎻愬崌鏈哄懡浠�
-                    NyLiftCommand liftCommand = NyLiftUtils.getLiftCommand(liftProtocol.getLiftNo().intValue(), NyLiftTaskModelType.MOVE_TRAY.id, startSta, targetSta, workNo);
+                    NyLiftCommand liftCommand = NyLiftUtils.getLiftCommand(liftProtocol.getLiftNo().intValue(), NyLiftTaskModelType.MOVE_TRAY.id, param.getSourceStaNo(), param.getStaNo(), workNo);
                     ArrayList<NyLiftCommand> commands = new ArrayList<>();
                     commands.add(liftCommand);
 
@@ -268,6 +258,10 @@
                     } else {
                         throw new CoolException("鍛戒护涓嬪彂澶辫触");
                     }
+                } else if (param.getLiftTaskMode() == 0) {
+                    //鎻愬崌鏈哄浣�
+                    liftProtocol.setToken(0);
+                    liftProtocol.setProtocolStatusType(LiftProtocolStatusType.IDLE);
                 } else {
                     throw new CoolException("鏈煡鍛戒护");
                 }

--
Gitblit v1.9.1