From 11c2bb226b870d2f4958c3ab2cfb0fb92b591349 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期一, 08 四月 2024 16:10:47 +0800
Subject: [PATCH] #

---
 zy-asrs-flow/src/pages/map/utils.js                                             |   31 ++++++++++++++++++-------------
 zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/websocket/MockScheduler.java |   21 ++++++++++++++++++++-
 2 files changed, 38 insertions(+), 14 deletions(-)

diff --git a/zy-asrs-flow/src/pages/map/utils.js b/zy-asrs-flow/src/pages/map/utils.js
index 64df894..553aace 100644
--- a/zy-asrs-flow/src/pages/map/utils.js
+++ b/zy-asrs-flow/src/pages/map/utils.js
@@ -479,20 +479,25 @@
     mapContainer?.children.forEach(child => {
         if (child.data?.uuid) {
             const { type, uuid, no, ...property } = child.data;
-            mapItemList.push({
-                // data
-                type: type,
-                uuid: uuid,
-                no: no,
-                property: property,
+            if (!(
+                type === SENSOR_TYPE.SHUTTLE
+                || type === SENSOR_TYPE.AGV
+            )) {
+                mapItemList.push({
+                    // data
+                    type: type,
+                    uuid: uuid,
+                    no: no,
+                    property: property,
 
-                // graph
-                positionX: child.position.x,
-                positionY: child.position.y,
-                scaleX: child.scale.x,
-                scaleY: child.scale.y,
-                rotation: rotationToNum(child.rotation)
-            })
+                    // graph
+                    positionX: child.position.x,
+                    positionY: child.position.y,
+                    scaleX: child.scale.x,
+                    scaleY: child.scale.y,
+                    rotation: rotationToNum(child.rotation)
+                })
+            }
         }
     })
 
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/websocket/MockScheduler.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/websocket/MockScheduler.java
index 2a048ff..03ba0d5 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/websocket/MockScheduler.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/websocket/MockScheduler.java
@@ -59,7 +59,7 @@
 
 
         shuttleVo.setCurLocNo(Utils.getLocNo(row, bay, lev));
-        List<String> preTravelPath = generatePreTravelPath(row, bay, lev, shouldIncreaseBay, 10);
+        List<String> preTravelPath = generateFullTravelPath(10, 30, lev);
         shuttleVo.setPreTravelPath(preTravelPath);  
 
 
@@ -68,6 +68,25 @@
         MapWebSocket.broadcast(JSON.toJSONString(wsVo));
     }
 
+    private List<String> generateFullTravelPath(int maxRow, int maxBay, int currentLev) {
+        List<String> fullPath = new ArrayList<>();
+        boolean increasingBay = true; // 鍋囪浠� bay = 1 寮�濮嬮�掑
+
+        for (int currentRow = 1; currentRow <= maxRow; currentRow++) {
+            if (increasingBay) {
+                for (int currentBay = 1; currentBay <= maxBay; currentBay++) {
+                    fullPath.add(Utils.getLocNo(currentRow, currentBay, currentLev));
+                }
+            } else {
+                for (int currentBay = maxBay; currentBay >= 1; currentBay--) {
+                    fullPath.add(Utils.getLocNo(currentRow, currentBay, currentLev));
+                }
+            }
+            increasingBay = !increasingBay; // 鍒拌揪姣忚鐨勬湯灏炬椂鏀瑰彉bay鐨勯�掑/閫掑噺鏂瑰悜
+        }
+        return fullPath;
+    }
+
     private List<String> generatePreTravelPath(int currentRow, int currentBay, int currentLev, boolean increasingBay, int pathLength) {
         List<String> path = new ArrayList<>();
         int tempRow = currentRow;

--
Gitblit v1.9.1