From 299e745032a32db6395935ac751c0d3f7be292bf Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期二, 26 八月 2025 15:44:16 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/common/utils/ShuttleOperaUtils.java | 4 ++--
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 4 ++--
src/main/java/com/zy/common/utils/NavigateUtils.java | 19 +++++++++++++++++--
src/main/java/com/zy/asrs/service/impl/ForkMainServiceImpl.java | 2 +-
4 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/ForkMainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/ForkMainServiceImpl.java
index b9ab5de..c67d3f2 100644
--- a/src/main/java/com/zy/asrs/service/impl/ForkMainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/ForkMainServiceImpl.java
@@ -1664,7 +1664,7 @@
assignCommand.setAuto(true);//鑷姩妯″紡
//鑾峰彇灏忚溅鍒版彁鍗囨満琛岃蛋鍛戒护
- List<ShuttleCommand> commands = shuttleOperaUtils.getStartToTargetCommands(shuttleProtocol.getCurrentLocNo(), liftSta.getLocNo(), NavigationMapType.getNormalWithDevice(), assignCommand, shuttleThread);
+ List<ShuttleCommand> commands = shuttleOperaUtils.getStartToTargetCommands(shuttleProtocol.getCurrentLocNo(), liftSta.getLocNo(), NavigationMapType.getMapTypes(NavigationMapType.NORMAL), assignCommand, shuttleThread);
if (commands == null) {
News.taskInfo(wrkMast.getWrkNo(), "{}浠诲姟锛寋}灏忚溅锛岃矾寰勮绠楀け璐�", wrkMast.getWrkNo(), shuttleProtocol.getShuttleNo());
return false;//璺緞瑙i攣澶辫触
diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
index 9f5533e..f2292f5 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -1658,7 +1658,7 @@
assignCommand.setAuto(true);//鑷姩妯″紡
//鑾峰彇灏忚溅鍒版彁鍗囨満琛岃蛋鍛戒护
- List<ShuttleCommand> commands = shuttleOperaUtils.getStartToTargetCommands(shuttleProtocol.getCurrentLocNo(), liftLocNo, NavigationMapType.getNormalWithDevice(), assignCommand, shuttleThread, "inLift");
+ List<ShuttleCommand> commands = shuttleOperaUtils.getStartToTargetCommands(shuttleProtocol.getCurrentLocNo(), liftLocNo, NavigationMapType.getMapTypes(NavigationMapType.NORMAL), assignCommand, shuttleThread, "inLift");
if (commands == null) {
News.taskInfo(wrkMast.getWrkNo(), "{}浠诲姟锛寋}灏忚溅锛岃矾寰勮绠楀け璐�", wrkMast.getWrkNo(), shuttleProtocol.getShuttleNo());
return false;//璺緞瑙i攣澶辫触
@@ -1795,7 +1795,7 @@
return false;
}
- String targetLocNo = navigateUtils.calcFirstLocation(shuttleProtocol.getCurrentLocNo(), wrkMast.getLocNo(), NavigationMapType.getMapTypes(NavigationMapType.NORMAL), null, null, 5);
+ String targetLocNo = navigateUtils.calcFirstLocation(shuttleProtocol.getCurrentLocNo(), wrkMast.getLocNo(), NavigationMapType.getMapTypes(NavigationMapType.NORMAL), null, null, 2);
if (targetLocNo == null) {//鍑烘彁鍗囨満杩戠偣璁$畻澶辫触
News.taskInfo(wrkMast.getWrkNo(), "{}浠诲姟锛寋}灏忚溅锛屽嚭鎻愬崌鏈鸿繎鐐硅绠楀け璐�", wrkMast.getWrkNo(), shuttleProtocol.getShuttleNo());
return false;
diff --git a/src/main/java/com/zy/common/utils/NavigateUtils.java b/src/main/java/com/zy/common/utils/NavigateUtils.java
index 14430c1..eb76e13 100644
--- a/src/main/java/com/zy/common/utils/NavigateUtils.java
+++ b/src/main/java/com/zy/common/utils/NavigateUtils.java
@@ -255,8 +255,23 @@
}
public String findTargetLocation(List<List<NavigateNode>> partList) {
- List<NavigateNode> nodes = partList.get(partList.size() - 1);
- NavigateNode targetNode = nodes.get(0);
+ NavigateNode targetNode = null;
+ for (int i = partList.size(); i > 0; i--) {
+ List<NavigateNode> nodes = partList.get(i - 1);
+ for (NavigateNode node : nodes) {
+ if (node.getNodeValue() == MapNodeType.MAIN_PATH.id) {
+ continue;
+
+ }
+ targetNode = node;
+ break;
+ }
+
+ if(targetNode != null){
+ break;
+ }
+ }
+
String locNo = NavigatePositionConvert.nodeToLocNo(targetNode);
return locNo;
}
diff --git a/src/main/java/com/zy/common/utils/ShuttleOperaUtils.java b/src/main/java/com/zy/common/utils/ShuttleOperaUtils.java
index c7dbe39..a683e32 100644
--- a/src/main/java/com/zy/common/utils/ShuttleOperaUtils.java
+++ b/src/main/java/com/zy/common/utils/ShuttleOperaUtils.java
@@ -59,8 +59,6 @@
}
public synchronized List<ShuttleCommand> getStartToTargetCommands(String startLocNo, String endLocNo, List<NavigationMapType> mapTypes, List<int[]> whites, ShuttleAssignCommand assignCommand, ShuttleThread shuttleThread, String moveType) {
- long getStartTime = System.currentTimeMillis();
-
ShuttleProtocol shuttleProtocol = shuttleThread.getStatus();
if (shuttleProtocol == null) {
return null;
@@ -68,12 +66,14 @@
Integer shuttleNo = shuttleProtocol.getShuttleNo();
//鑾峰彇灏忚溅绉诲姩閫熷害
Integer runSpeed = Optional.ofNullable(basShuttleService.selectOne(new EntityWrapper<BasShuttle>().eq("shuttle_no", shuttleNo)).getRunSpeed()).orElse(1000);
+ long calcStartTime = System.currentTimeMillis();
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);
return null;
}
+ News.info("[RCS Debug] Calc path time:{}", (System.currentTimeMillis() - calcStartTime));
List<NavigateNode> allNode = new ArrayList<>();
List<NavigateNode> lockNode = new ArrayList<>();
--
Gitblit v1.9.1