From 90da17682814e5ee929d9a57c775047d00f8d449 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期日, 12 一月 2025 16:20:09 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/common/utils/NavigateMapData.java | 146 +++++++++++++++++++++++++-----------------------
1 files changed, 77 insertions(+), 69 deletions(-)
diff --git a/src/main/java/com/zy/common/utils/NavigateMapData.java b/src/main/java/com/zy/common/utils/NavigateMapData.java
index 6e9a3a8..84d4373 100644
--- a/src/main/java/com/zy/common/utils/NavigateMapData.java
+++ b/src/main/java/com/zy/common/utils/NavigateMapData.java
@@ -272,53 +272,57 @@
//杩囨护鏁版嵁
LocMastService locMastService = SpringUtils.getBean(LocMastService.class);
- //鑾峰彇褰撳墠妤煎眰搴撲綅鏁版嵁
- List<LocMast> locMasts = locMastService.selectLocByLev(lev);
- for (LocMast locMast : locMasts) {
- Integer row = locMast.getRow1();
- Integer bay = locMast.getBay1();
+ try {
+ //鑾峰彇褰撳墠妤煎眰搴撲綅鏁版嵁
+ List<LocMast> locMasts = locMastService.selectLocByLev(lev);
+ for (LocMast locMast : locMasts) {
+ Integer row = locMast.getRow1();
+ Integer bay = locMast.getBay1();
- boolean whiteFlag = false;//榛樿涓嶅瓨鍦ㄧ櫧鍚嶅崟
- if (whitePoints != null) {
- for (int[] whitePoint : whitePoints) {
- if (whitePoint[0] == row && whitePoint[1] == bay) {
- //瀛樺湪鐧藉悕鍗�
- whiteFlag = true;
- break;
+ boolean whiteFlag = false;//榛樿涓嶅瓨鍦ㄧ櫧鍚嶅崟
+ if (whitePoints != null) {
+ for (int[] whitePoint : whitePoints) {
+ if (whitePoint[0] == row && whitePoint[1] == bay) {
+ //瀛樺湪鐧藉悕鍗�
+ whiteFlag = true;
+ break;
+ }
}
}
- }
- if (whiteFlag) {
- continue;//瀛樺湪鐧藉悕鍗曪紝涓嶆墽琛屼笅鍒楄繃婊ゆ柟妗�
- }
-
-
- List<MapNode> list = lists.get(row);
- MapNode mapNode = list.get(bay);
-
- if (mapType == NavigationMapType.NONE.id) {
- //涓嶈繃婊や换浣曟暟鎹�
- } else if (mapType == NavigationMapType.DFX.id) {
- //杞﹁締鏈夎揣
- //璇诲彇瀵瑰簲搴撲綅鏁版嵁锛屽皢DFX搴撲綅鐘舵�佺殑鑺傜偣缃负-1(闅滅鐗�)
- if (locMast.getLocSts().equals("F")
- || locMast.getLocSts().equals("D")
- || locMast.getLocSts().equals("X")
- || locMast.getLocSts().equals("R")
- || locMast.getLocSts().equals("P")
- ) {
- mapNode.setValue(MapNodeType.DISABLE.id);//绂佺敤鑺傜偣
+ if (whiteFlag) {
+ continue;//瀛樺湪鐧藉悕鍗曪紝涓嶆墽琛屼笅鍒楄繃婊ゆ柟妗�
}
- } else if (mapType == NavigationMapType.NORMAL.id) {
- //杩囨护搴撲綅鐘舵�乆
- if (locMast.getLocSts().equals("X")) {
- mapNode.setValue(MapNodeType.DISABLE.id);//绂佺敤鑺傜偣
- }
- }
- //鏇存柊list
- list.set(bay, mapNode);
- lists.set(row, list);
+
+ List<MapNode> list = lists.get(row);
+ MapNode mapNode = list.get(bay);
+
+ if (mapType == NavigationMapType.NONE.id) {
+ //涓嶈繃婊や换浣曟暟鎹�
+ } else if (mapType == NavigationMapType.DFX.id) {
+ //杞﹁締鏈夎揣
+ //璇诲彇瀵瑰簲搴撲綅鏁版嵁锛屽皢DFX搴撲綅鐘舵�佺殑鑺傜偣缃负-1(闅滅鐗�)
+ if (locMast.getLocSts().equals("F")
+ || locMast.getLocSts().equals("D")
+ || locMast.getLocSts().equals("X")
+ || locMast.getLocSts().equals("R")
+ || locMast.getLocSts().equals("P")
+ ) {
+ mapNode.setValue(MapNodeType.DISABLE.id);//绂佺敤鑺傜偣
+ }
+ } else if (mapType == NavigationMapType.NORMAL.id) {
+ //杩囨护搴撲綅鐘舵�乆
+ if (locMast.getLocSts().equals("X")) {
+ mapNode.setValue(MapNodeType.DISABLE.id);//绂佺敤鑺傜偣
+ }
+ }
+
+ //鏇存柊list
+ list.set(bay, mapNode);
+ lists.set(row, list);
+ }
+ }catch (Exception e) {
+ e.printStackTrace();
}
//鍔犺浇杞﹁締鍧愭爣鍒板湴鍥句腑
@@ -355,36 +359,40 @@
}
}
- //鍔犺浇璐у弶鎻愬崌鏈烘斁璐х偣浣嶆暟鎹�
- for (ForkLiftSlave forkLiftSlave : slaveProperties.getForkLift()) {
- ForkLiftThread forkLiftThread = (ForkLiftThread) SlaveConnection.get(SlaveType.ForkLift, forkLiftSlave.getId());
- if (forkLiftThread == null) {
- continue;
- }
-
- for (ForkLiftStaProtocol staProtocol : forkLiftThread.getForkLiftStaProtocols()) {
- int row = Utils.getRow(staProtocol.getLocNo());
- int bay = Utils.getBay(staProtocol.getLocNo());
-
- List<MapNode> list = lists.get(row);
- MapNode mapNode = list.get(bay);
-
- if (mapType == NavigationMapType.DFX.id) {
- //杞﹁締鏈夎揣
- if (staProtocol.getHasTray() != null && staProtocol.getHasTray()) {
- mapNode.setValue(MapNodeType.DISABLE.id);
- }
- }else {
- if (staProtocol.getHasCar() != null && staProtocol.getHasCar()) {
- mapNode.setValue(MapNodeType.CAR.id);
- }
+ try {
+ //鍔犺浇璐у弶鎻愬崌鏈烘斁璐х偣浣嶆暟鎹�
+ for (ForkLiftSlave forkLiftSlave : slaveProperties.getForkLift()) {
+ ForkLiftThread forkLiftThread = (ForkLiftThread) SlaveConnection.get(SlaveType.ForkLift, forkLiftSlave.getId());
+ if (forkLiftThread == null) {
+ continue;
}
- //鏇存柊list
- list.set(bay, mapNode);
- lists.set(row, list);
- }
+ for (ForkLiftStaProtocol staProtocol : forkLiftThread.getForkLiftStaProtocols()) {
+ int row = Utils.getRow(staProtocol.getLocNo());
+ int bay = Utils.getBay(staProtocol.getLocNo());
+ List<MapNode> list = lists.get(row);
+ MapNode mapNode = list.get(bay);
+
+ if (mapType == NavigationMapType.DFX.id) {
+ //杞﹁締鏈夎揣
+ if (staProtocol.getHasTray() != null && staProtocol.getHasTray()) {
+ mapNode.setValue(MapNodeType.DISABLE.id);
+ }
+ }else {
+ if (staProtocol.getHasCar() != null && staProtocol.getHasCar()) {
+ mapNode.setValue(MapNodeType.CAR.id);
+ }
+ }
+
+ //鏇存柊list
+ list.set(bay, mapNode);
+ lists.set(row, list);
+ }
+
+ }
+ }catch (Exception e) {
+ e.printStackTrace();
}
return lists;
--
Gitblit v1.9.1