From 5f7592e30296aa6c48373befbcbfc8173009a787 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期一, 15 四月 2024 08:44:56 +0800
Subject: [PATCH] #

---
 zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/command/ShuttleCommandService.java |   44 ++++++++++++++++++++++----------------------
 1 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/command/ShuttleCommandService.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/command/ShuttleCommandService.java
index 33e9853..541a762 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/command/ShuttleCommandService.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/command/ShuttleCommandService.java
@@ -81,7 +81,7 @@
 
         ShuttleAssignCommand assignCommand = new ShuttleAssignCommand();
         assignCommand.setShuttleNo(deviceNo);
-        assignCommand.setTaskNo(motion.getWrkNo());
+        assignCommand.setTaskNo(motion.getTaskNo());
         assignCommand.setSourceLocNo(motion.getOrigin());
         assignCommand.setLocNo(motion.getTarget());
         assignCommand.setDeviceId(Integer.parseInt(motion.getDevice()));
@@ -106,12 +106,12 @@
             case SHUTTLE_MOVE_LIFT_PALLET://绌挎杞﹂《鍗囧苟绉诲姩
                 shuttleCommands = this.shuttleAssignCommand(motion.getOrigin(), motion.getTarget(), NavigationMapType.DFX.id, assignCommand, shuttleThread);
                 shuttleTaskModeType = ShuttleTaskModeType.PAK_IN;
-                shuttleCommands.add(0, shuttleThread.getLiftCommand(motion.getWrkNo(), true));
+                shuttleCommands.add(0, shuttleThread.getLiftCommand(motion.getTaskNo(), true));
                 break;
             case SHUTTLE_MOVE_DOWN_PALLET://绌挎杞︾Щ鍔ㄥ苟鎵樼洏涓嬮檷
                 shuttleCommands = this.shuttleAssignCommand(motion.getOrigin(), motion.getTarget(), NavigationMapType.DFX.id, assignCommand, shuttleThread);
                 shuttleTaskModeType = ShuttleTaskModeType.PAK_IN;
-                shuttleCommands.add(shuttleCommands.size(), shuttleThread.getLiftCommand(motion.getWrkNo(), false));
+                shuttleCommands.add(shuttleCommands.size(), shuttleThread.getLiftCommand(motion.getTaskNo(), false));
                 break;
             case SHUTTLE_MOVE_FROM_LIFT://鍑烘彁鍗囨満
                 // 鍒ゆ柇鎻愬崌鏈虹姸鎬�
@@ -151,7 +151,7 @@
 //                }
 
                 //鍒ゆ柇鎻愬崌鏈哄伐浣滃彿鏄惁鍜屽綋鍓嶄换鍔$浉鍚�
-                if (liftProtocol.getTaskNo().intValue() != motion.getWrkNo()) {
+                if (liftProtocol.getTaskNo().intValue() != motion.getTaskNo()) {
                     return false;
                 }
 
@@ -188,7 +188,7 @@
 //                }
 
                 //鍒ゆ柇鎻愬崌鏈哄伐浣滃彿鏄惁鍜屽綋鍓嶄换鍔$浉鍚�
-                if (liftProtocol.getTaskNo().intValue() != motion.getWrkNo()) {
+                if (liftProtocol.getTaskNo().intValue() != motion.getTaskNo()) {
                     return false;
                 }
 
@@ -197,21 +197,21 @@
                 break;
             case SHUTTLE_CHARGE_ON://鍏呯數寮�
                 shuttleTaskModeType = ShuttleTaskModeType.CHARGE;
-                shuttleCommands.add(shuttleThread.getChargeCommand(motion.getWrkNo(), true));
+                shuttleCommands.add(shuttleThread.getChargeCommand(motion.getTaskNo(), true));
                 assignCommand.setCharge(Boolean.TRUE);
                 break;
             case SHUTTLE_CHARGE_OFF://鍏呯數鍏�
                 shuttleTaskModeType = ShuttleTaskModeType.CHARGE;
-                shuttleCommands.add(shuttleThread.getChargeCommand(motion.getWrkNo(), false));
+                shuttleCommands.add(shuttleThread.getChargeCommand(motion.getTaskNo(), false));
                 assignCommand.setCharge(Boolean.TRUE);
                 break;
             case SHUTTLE_PALLET_LIFT://鎵樼洏椤跺崌
                 shuttleTaskModeType = ShuttleTaskModeType.PALLET_LIFT;
-                shuttleCommands.add(shuttleThread.getLiftCommand(motion.getWrkNo(), true));
+                shuttleCommands.add(shuttleThread.getLiftCommand(motion.getTaskNo(), true));
                 break;
             case SHUTTLE_PALLET_DOWN://鎵樼洏涓嬮檷
                 shuttleTaskModeType = ShuttleTaskModeType.PALLET_DOWN;
-                shuttleCommands.add(shuttleThread.getLiftCommand(motion.getWrkNo(), false));
+                shuttleCommands.add(shuttleThread.getLiftCommand(motion.getTaskNo(), false));
                 break;
             default:
                 throw new CoolException(motion.getMotionCtgEl() + "娌℃湁鎸囧畾浠诲姟浣滀笟娴佺▼锛侊紒锛�");
@@ -245,24 +245,24 @@
             return false;
         }
 
-        if (shuttleProtocol.getTaskNo() != 0 && shuttleProtocol.getTaskNo().intValue() != motion.getWrkNo()) {
+        if (shuttleProtocol.getTaskNo() != 0 && shuttleProtocol.getTaskNo().intValue() != motion.getTaskNo()) {
             return false;
         }
 
         //鍏呯數浠诲姟
         if (Objects.requireNonNull(MotionCtgType.get(motion.getMotionCtgEl())).equals(MotionCtgType.SHUTTLE_CHARGE_ON)) {
             // 澶嶄綅绌挎杞�
-            shuttleProtocol.setTaskNo(0);
-            shuttleProtocol.setProtocolStatus(ShuttleProtocolStatusType.IDLE);
-            shuttleProtocol.setPakMk(true);
+            shuttleThread.setSyncTaskNo(0);
+            shuttleThread.setProtocolStatus(ShuttleProtocolStatusType.IDLE);
+            shuttleThread.setPakMk(true);
             return true;
         }
 
-//        if (!shuttleProtocol.getProtocolStatusType().equals(ShuttleProtocolStatusType.WAITING)
-//            && !shuttleProtocol.getProtocolStatusType().equals(ShuttleProtocolStatusType.CHARGING_WAITING)
-//        ) {
-//            return false;
-//        }
+        if (!shuttleProtocol.getProtocolStatusType().equals(ShuttleProtocolStatusType.WAITING)
+            && !shuttleProtocol.getProtocolStatusType().equals(ShuttleProtocolStatusType.CHARGING_WAITING)
+        ) {
+            return false;
+        }
 
         //鍒ゆ柇璁惧鏄惁绌洪棽
         if (!shuttleThread.isIdle()) {
@@ -308,7 +308,7 @@
 //                }
 
                 //鍒ゆ柇鎻愬崌鏈哄伐浣滃彿鏄惁鍜屽綋鍓嶄换鍔$浉鍚�
-                if (liftProtocol.getTaskNo().intValue() != motion.getWrkNo()) {
+                if (liftProtocol.getTaskNo().intValue() != motion.getTaskNo()) {
                     return false;
                 }
 
@@ -323,9 +323,9 @@
         }
 
         // 澶嶄綅绌挎杞�
-        shuttleProtocol.setTaskNo(0);
-        shuttleProtocol.setProtocolStatus(ShuttleProtocolStatusType.IDLE);
-        shuttleProtocol.setPakMk(true);
+        shuttleThread.setSyncTaskNo(0);
+        shuttleThread.setProtocolStatus(ShuttleProtocolStatusType.IDLE);
+        shuttleThread.setPakMk(true);
 
         return true;
     }

--
Gitblit v1.9.1