From 852664df1caf38831793b341edcada9dd7b6c22a Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期三, 06 五月 2026 19:28:33 +0800
Subject: [PATCH] #dfs
---
src/main/java/com/zy/core/thread/impl/v5/StationV5RunBlockReroutePlanner.java | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/zy/core/thread/impl/v5/StationV5RunBlockReroutePlanner.java b/src/main/java/com/zy/core/thread/impl/v5/StationV5RunBlockReroutePlanner.java
index 7ce54c6..27b253b 100644
--- a/src/main/java/com/zy/core/thread/impl/v5/StationV5RunBlockReroutePlanner.java
+++ b/src/main/java/com/zy/core/thread/impl/v5/StationV5RunBlockReroutePlanner.java
@@ -35,6 +35,13 @@
RunBlockRerouteState rerouteState = loadRunBlockRerouteState(taskNo, blockStationId);
rerouteState.setTaskNo(taskNo);
rerouteState.setBlockStationId(blockStationId);
+ if (!hasSelectableCandidateCommand(candidateCommands)) {
+ return new PlanResult(
+ null,
+ rerouteState.getPlanCount() == null ? 0 : rerouteState.getPlanCount(),
+ copyRoutePathList(rerouteState.getIssuedRoutePathList())
+ );
+ }
rerouteState.setPlanCount((rerouteState.getPlanCount() == null ? 0 : rerouteState.getPlanCount()) + 1);
int currentPlanCount = rerouteState.getPlanCount() == null ? 0 : rerouteState.getPlanCount();
boolean resetForPlanCountLimit = rerouteState.getPlanCount() > PLANNER_RESET_PLAN_COUNT_THRESHOLD;
@@ -318,6 +325,21 @@
return builder.toString();
}
+ private boolean hasSelectableCandidateCommand(List<StationCommand> candidateCommands) {
+ if (candidateCommands == null || candidateCommands.isEmpty()) {
+ return false;
+ }
+ for (StationCommand candidateCommand : candidateCommands) {
+ if (candidateCommand == null || candidateCommand.getNavigatePath() == null || candidateCommand.getNavigatePath().isEmpty()) {
+ continue;
+ }
+ if (!Cools.isEmpty(buildPathSignature(candidateCommand.getNavigatePath()))) {
+ return true;
+ }
+ }
+ return false;
+ }
+
private int safeInt(Integer value) {
return value == null ? 0 : value;
}
--
Gitblit v1.9.1