From 81d537833adcbd5ef5333453e495eae2cac9f496 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期一, 21 七月 2025 15:01:51 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/common/utils/ShuttleOperaUtils.java |   25 +++++++++++++------------
 1 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/src/main/java/com/zy/common/utils/ShuttleOperaUtils.java b/src/main/java/com/zy/common/utils/ShuttleOperaUtils.java
index b9d252e..4ad11e8 100644
--- a/src/main/java/com/zy/common/utils/ShuttleOperaUtils.java
+++ b/src/main/java/com/zy/common/utils/ShuttleOperaUtils.java
@@ -10,6 +10,7 @@
 import com.zy.asrs.utils.Utils;
 import com.zy.common.model.MapNode;
 import com.zy.common.model.NavigateNode;
+import com.zy.common.model.enums.NavigationMapType;
 import com.zy.core.News;
 import com.zy.core.cache.SlaveConnection;
 import com.zy.core.dispatcher.ShuttleDispatchUtils;
@@ -50,11 +51,11 @@
     @Autowired
     private DeviceConfigService deviceConfigService;
 
-    public synchronized List<ShuttleCommand> getStartToTargetCommands(String startLocNo, String endLocNo, Integer mapType, ShuttleAssignCommand assignCommand, ShuttleThread shuttleThread) {
-        return getStartToTargetCommands(startLocNo, endLocNo, mapType, null, assignCommand, shuttleThread);
+    public synchronized List<ShuttleCommand> getStartToTargetCommands(String startLocNo, String endLocNo, List<NavigationMapType> mapTypes, ShuttleAssignCommand assignCommand, ShuttleThread shuttleThread) {
+        return getStartToTargetCommands(startLocNo, endLocNo, mapTypes, null, assignCommand, shuttleThread);
     }
 
-    public synchronized List<ShuttleCommand> getStartToTargetCommands(String startLocNo, String endLocNo, Integer mapType, List<int[]> whites, ShuttleAssignCommand assignCommand, ShuttleThread shuttleThread) {
+    public synchronized List<ShuttleCommand> getStartToTargetCommands(String startLocNo, String endLocNo, List<NavigationMapType> mapTypes, List<int[]> whites, ShuttleAssignCommand assignCommand, ShuttleThread shuttleThread) {
         ShuttleProtocol shuttleProtocol = shuttleThread.getStatus();
         if (shuttleProtocol == null) {
             return null;
@@ -62,7 +63,7 @@
         Integer shuttleNo = shuttleProtocol.getShuttleNo();
         //鑾峰彇灏忚溅绉诲姩閫熷害
         Integer runSpeed = Optional.ofNullable(basShuttleService.selectOne(new EntityWrapper<BasShuttle>().eq("shuttle_no", shuttleNo)).getRunSpeed()).orElse(1000);
-        List<NavigateNode> nodeList = navigateUtils.calc(startLocNo, endLocNo, mapType, Utils.getShuttlePoints(shuttleNo, Utils.getLev(startLocNo)), whites);
+        List<NavigateNode> nodeList = navigateUtils.calc(startLocNo, endLocNo, mapTypes, Utils.getShuttlePoints(shuttleNo, Utils.getLev(startLocNo)), whites);
         if (nodeList == null) {
             News.error("{} dash {} can't find navigate path!", startLocNo, endLocNo);
             shuttleThread.offerSystemMsg("{} dash {} can't find navigate path!", startLocNo, endLocNo);
@@ -92,9 +93,9 @@
 
         List<ShuttleCommand> commands = new ArrayList<>();
         //鑾峰彇鍒嗘璺緞
-        ArrayList<ArrayList<NavigateNode>> data = navigateUtils.getSectionPath(nodeList);
+        List<List<NavigateNode>> data = navigateUtils.getSectionPath(nodeList);
         //灏嗘瘡涓�娈佃矾寰勫垎鎴恈ommand鎸囦护
-        for (ArrayList<NavigateNode> nodes : data) {
+        for (List<NavigateNode> nodes : data) {
             //寮�濮嬭矾寰�
             NavigateNode startPath = nodes.get(0);
 
@@ -122,7 +123,7 @@
         return commands;
     }
 
-    public synchronized List<ShuttleCommand> shuttleInOutLiftCommand(String startLocNo, String endLocNo, Integer mapType, ShuttleAssignCommand assignCommand, ShuttleThread shuttleThread) {
+    public synchronized List<ShuttleCommand> shuttleInOutLiftCommand(String startLocNo, String endLocNo, List<NavigationMapType> mapTypes, ShuttleAssignCommand assignCommand, ShuttleThread shuttleThread) {
         NavigateNode startNode = NavigatePositionConvert.locNoToNode(startLocNo);
         NavigateNode endNode = NavigatePositionConvert.locNoToNode(endLocNo);
         List<NavigateNode> unlockPath = new ArrayList<>();
@@ -145,7 +146,7 @@
 
         //鑾峰彇灏忚溅绉诲姩閫熷害
         Integer runSpeed = Optional.ofNullable(basShuttleService.selectOne(new EntityWrapper<BasShuttle>().eq("shuttle_no", shuttleNo)).getRunSpeed()).orElse(1000);
-        List<NavigateNode> nodeList = navigateUtils.calc(startLocNo, endLocNo, mapType, Utils.getShuttlePoints(shuttleNo, Utils.getLev(startLocNo)), null);
+        List<NavigateNode> nodeList = navigateUtils.calc(startLocNo, endLocNo, mapTypes, Utils.getShuttlePoints(shuttleNo, Utils.getLev(startLocNo)), null);
         if (nodeList == null) {
             News.error("{} dash {} can't find navigate path!", startLocNo, endLocNo);
             shuttleThread.offerSystemMsg("{} dash {} can't find navigate path!", startLocNo, endLocNo);
@@ -159,9 +160,9 @@
 
         List<ShuttleCommand> commands = new ArrayList<>();
         //鑾峰彇鍒嗘璺緞
-        ArrayList<ArrayList<NavigateNode>> data = navigateUtils.getSectionPath(nodeList);
+        List<List<NavigateNode>> data = navigateUtils.getSectionPath(nodeList);
         //灏嗘瘡涓�娈佃矾寰勫垎鎴恈ommand鎸囦护
-        for (ArrayList<NavigateNode> nodes : data) {
+        for (List<NavigateNode> nodes : data) {
             //寮�濮嬭矾寰�
             NavigateNode startPath = nodes.get(0);
 
@@ -330,7 +331,7 @@
         NavigateNode currentNode = new NavigateNode(pointArr[0], pointArr[1]);
         currentNode.setZ(lev);
 
-        List<List<MapNode>> lists = navigateMapData.getJsonData(lev, -1, null, null);//鑾峰彇瀹屾暣鍦板浘
+        List<List<MapNode>> lists = navigateMapData.getJsonData(lev, NavigationMapType.getMapTypes(NavigationMapType.NONE), null, null);//鑾峰彇瀹屾暣鍦板浘
         int[][] map = navigateMapData.parseJsonDataArr(lists);
         int nodeValue = map[pointArr[0]][pointArr[1]];
         currentNode.setNodeValue(nodeValue);
@@ -371,7 +372,7 @@
         currentNode.setZ(lev);
         innerNodes.add(currentNode);
 
-        List<List<MapNode>> lists = navigateMapData.getJsonData(lev, -1, null, null);//鑾峰彇瀹屾暣鍦板浘
+        List<List<MapNode>> lists = navigateMapData.getJsonData(lev, NavigationMapType.getMapTypes(NavigationMapType.NONE), null, null);//鑾峰彇瀹屾暣鍦板浘
         int[][] map = navigateMapData.parseJsonDataArr(lists);
         int nodeValue = map[pointArr[0]][pointArr[1]];
         currentNode.setNodeValue(nodeValue);

--
Gitblit v1.9.1