From 629959675a97b4d41c1c36eaa60ee1671c224e93 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期三, 13 八月 2025 09:12:35 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/common/utils/ShuttleOperaUtils.java |   23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/zy/common/utils/ShuttleOperaUtils.java b/src/main/java/com/zy/common/utils/ShuttleOperaUtils.java
index 0b3fd1f..db9ab33 100644
--- a/src/main/java/com/zy/common/utils/ShuttleOperaUtils.java
+++ b/src/main/java/com/zy/common/utils/ShuttleOperaUtils.java
@@ -51,10 +51,14 @@
     private DeviceConfigService deviceConfigService;
 
     public synchronized List<ShuttleCommand> getStartToTargetCommands(String startLocNo, String endLocNo, List<NavigationMapType> mapTypes, ShuttleAssignCommand assignCommand, ShuttleThread shuttleThread) {
-        return getStartToTargetCommands(startLocNo, endLocNo, mapTypes, null, assignCommand, shuttleThread);
+        return getStartToTargetCommands(startLocNo, endLocNo, mapTypes, null, assignCommand, shuttleThread, "move");
     }
 
-    public synchronized List<ShuttleCommand> getStartToTargetCommands(String startLocNo, String endLocNo, List<NavigationMapType> mapTypes, List<int[]> whites, ShuttleAssignCommand assignCommand, ShuttleThread shuttleThread) {
+    public synchronized List<ShuttleCommand> getStartToTargetCommands(String startLocNo, String endLocNo, List<NavigationMapType> mapTypes, ShuttleAssignCommand assignCommand, ShuttleThread shuttleThread, String moveType) {
+        return getStartToTargetCommands(startLocNo, endLocNo, mapTypes, null, assignCommand, shuttleThread, moveType);
+    }
+
+    public synchronized List<ShuttleCommand> getStartToTargetCommands(String startLocNo, String endLocNo, List<NavigationMapType> mapTypes, List<int[]> whites, ShuttleAssignCommand assignCommand, ShuttleThread shuttleThread, String moveType) {
         ShuttleProtocol shuttleProtocol = shuttleThread.getStatus();
         if (shuttleProtocol == null) {
             return null;
@@ -77,7 +81,7 @@
             if (whites != null) {
                 boolean flag = false;
                 for (int[] white : whites) {
-                    if(white[0] == node.getX() && white[1] == node.getY()) {
+                    if (white[0] == node.getX() && white[1] == node.getY()) {
                         flag = true;
                         break;
                     }
@@ -97,7 +101,9 @@
         long endTime = System.currentTimeMillis();
         News.info("getSection path time:{}", (endTime - startTime));
         //灏嗘瘡涓�娈佃矾寰勫垎鎴恈ommand鎸囦护
-        for (List<NavigateNode> nodes : data) {
+        for (int i = 0; i < data.size(); i++) {
+            List<NavigateNode> nodes = data.get(i);
+
             //寮�濮嬭矾寰�
             NavigateNode startPath = nodes.get(0);
 
@@ -110,6 +116,15 @@
             String distCodeNum = NavigatePositionConvert.xyToPosition(endPath.getX(), endPath.getY(), endPath.getZ());
             //鑾峰彇绉诲姩鍛戒护
             ShuttleCommand command = shuttleThread.getMoveCommand(assignCommand.getDeviceTaskNo(), startCodeNum, distCodeNum, allDistance, ShuttleRunDirection.get(startPath.getDirection()).id.intValue(), runSpeed, nodes);
+
+            if (i + 1 == data.size()) {
+                if (moveType.equals("inLift")) {
+                    command = shuttleThread.getMoveLiftCommand(assignCommand.getDeviceTaskNo(), startCodeNum, distCodeNum, allDistance, ShuttleRunDirection.get(startPath.getDirection()).id.intValue(), runSpeed, nodes, true);
+                }else if (moveType.equals("outLift")) {
+                    command = shuttleThread.getMoveLiftCommand(assignCommand.getDeviceTaskNo(), startCodeNum, distCodeNum, allDistance, ShuttleRunDirection.get(startPath.getDirection()).id.intValue(), runSpeed, nodes, false);
+                }
+            }
+
             command.setNodes(nodes);//灏嗚璧拌妭鐐规坊鍔犲埌姣忎竴姝ュ懡浠や腑
             commands.add(command);
         }

--
Gitblit v1.9.1