From 2a0e1165604cafa91237a8196a4e681e297fbaab Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期一, 02 三月 2026 17:24:36 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/common/utils/NavigateUtils.java | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/main/java/com/zy/common/utils/NavigateUtils.java b/src/main/java/com/zy/common/utils/NavigateUtils.java
index fb734e1..ef8909d 100644
--- a/src/main/java/com/zy/common/utils/NavigateUtils.java
+++ b/src/main/java/com/zy/common/utils/NavigateUtils.java
@@ -45,12 +45,12 @@
List<List<NavigateNode>> stationMap = navigateSolution.getStationMap(lev);
NavigateNode startNode = navigateSolution.findStationNavigateNode(stationMap, startStationId);
- if (startNode == null){
+ if (startNode == null) {
throw new CoolException("鏈壘鍒拌 璧风偣 瀵瑰簲鐨勮妭鐐�");
}
NavigateNode endNode = navigateSolution.findStationNavigateNode(stationMap, endStationId);
- if (endNode == null){
+ if (endNode == null) {
throw new CoolException("鏈壘鍒拌 缁堢偣 瀵瑰簲鐨勮妭鐐�");
}
@@ -58,7 +58,8 @@
News.info("[WCS Debug] 绔欑偣璺緞寮�濮嬭绠�,startStationId={},endStationId={}", startStationId, endStationId);
List<List<NavigateNode>> allList = navigateSolution.allSimplePaths(stationMap, startNode, endNode, 120, 500, 300);
if (allList.isEmpty()) {
- throw new CoolException("鏈壘鍒拌璺緞");
+// throw new CoolException("鏈壘鍒拌璺緞");
+ return new ArrayList<>();
}
News.info("[WCS Debug] 绔欑偣璺緞璁$畻瀹屾垚锛岃�楁椂锛歿}ms", System.currentTimeMillis() - startTime);
@@ -70,9 +71,12 @@
//鍘婚噸
HashSet<Integer> set = new HashSet<>();
List<NavigateNode> fitlerList = new ArrayList<>();
- for(NavigateNode navigateNode : list){
+ for (NavigateNode navigateNode : list) {
JSONObject valuObject = JSON.parseObject(navigateNode.getNodeValue());
- if(set.add(valuObject.getInteger("stationId"))){
+ if (valuObject.containsKey("rgvCalcFlag")) {
+ continue;
+ }
+ if (set.add(valuObject.getInteger("stationId"))) {
fitlerList.add(navigateNode);
}
}
@@ -112,7 +116,8 @@
News.info("[WCS Debug] RGV璺緞寮�濮嬭绠�,startTrackSiteNo:{},endTrackSiteNo={}", startTrackSiteNo, endTrackSiteNo);
NavigateNode res_node = navigateSolution.astarSearchJava(rgvTrackMap, startNode, endNode);
if (res_node == null) {
- throw new CoolException("鏈壘鍒拌璺緞");
+// throw new CoolException("鏈壘鍒拌璺緞");
+ return new ArrayList<>();
}
News.info("[WCS Debug] RGV璺緞璁$畻瀹屾垚锛岃�楁椂锛歿}ms", System.currentTimeMillis() - startTime);
--
Gitblit v1.9.1