From a42ae1ffc20459dc46a88590bc4a94f9280f2d3d Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期五, 10 五月 2024 15:31:28 +0800
Subject: [PATCH] #

---
 zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/command/ShuttleCommandService.java |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 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 2669988..a8913bd 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
@@ -73,9 +73,19 @@
         if (null == shuttleProtocol) {
             return false;
         }
-        if (!shuttleThread.isIdle()) {//璁惧涓嶇┖闂�
+
+        if (!shuttleThread.isIdle(new ExecuteSupport() {
+            @Override
+            public Boolean judgement() {
+                if (Objects.equals(MotionCtgType.get(motion.getMotionCtgEl()), MotionCtgType.SHUTTLE_CHARGE_OFF)) {//闈炲叧闂厖鐢祄otion锛岄渶瑕佸垽鏂澶囩姸鎬�
+                    return false;//涓嶉渶瑕佸垽鏂姸鎬�
+                }
+                return true;//闇�瑕佸垽鏂姸鎬�
+            }
+        })) {//璁惧涓嶇┖闂�
             return false;
         }
+
         if (motionService.count(new LambdaQueryWrapper<Motion>()
                 .eq(Motion::getDeviceCtg, DeviceCtgType.SHUTTLE.val())
                 .eq(Motion::getDevice, motion.getDevice())
@@ -514,7 +524,7 @@
             //閫氳繃xy鍧愭爣灏忚溅浜岀淮鐮�
             String distCodeNum = NavigatePositionConvert.xyToPosition(endPath.getX(), endPath.getY(), endPath.getZ(), hostId);
             //鑾峰彇绉诲姩鍛戒护
-            ShuttleCommand command = shuttleThread.getMoveCommand(assignCommand.getDeviceTaskNo(), startCodeNum, distCodeNum, allDistance, ShuttleRunDirection.get(startPath.getDirection()).id.intValue(), runSpeed);
+            ShuttleCommand command = shuttleThread.getMoveCommand(assignCommand.getDeviceTaskNo(), startCodeNum, distCodeNum, allDistance, ShuttleRunDirection.get(startPath.getDirection()).id.intValue(), runSpeed, nodes);
             command.setNodes(nodes);//灏嗚璧拌妭鐐规坊鍔犲埌姣忎竴姝ュ懡浠や腑
             commands.add(command);
         }

--
Gitblit v1.9.1