From 6e02d92c3b9c240fa78a343b67ddf0db12d840e6 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期五, 22 八月 2025 17:00:56 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/core/thread/impl/TrafficControlImplThread.java |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/zy/core/thread/impl/TrafficControlImplThread.java b/src/main/java/com/zy/core/thread/impl/TrafficControlImplThread.java
index 721e5ee..f1655fa 100644
--- a/src/main/java/com/zy/core/thread/impl/TrafficControlImplThread.java
+++ b/src/main/java/com/zy/core/thread/impl/TrafficControlImplThread.java
@@ -174,10 +174,14 @@
                         Long idleTime = pathIdleShuttleMap.get(shuttleProtocol.getShuttleNo());
                         if((System.currentTimeMillis() - idleTime) > 1000 * 10) {
                             //妫�娴嬮殰纰嶇墿杞�
-                            boolean checkObstacle = shuttleOperaUtils.checkObstacle(shuttleProtocol.getCurrentLocNo(), new ArrayList<Integer>() {{
+                            int checkObstacle = shuttleOperaUtils.checkObstacle(shuttleProtocol.getCurrentLocNo(), new ArrayList<Integer>() {{
                                 add(shuttleNo);
                             }}, totalNodeList);
                             pathIdleShuttleMap.remove(shuttleProtocol.getShuttleNo());
+
+                            if (checkObstacle == 2) {
+                                pathShuttleThread.restartCalcPath();
+                            }
                         }
                     }else {
                         pathIdleShuttleMap.put(shuttleProtocol.getShuttleNo(), System.currentTimeMillis());
@@ -198,6 +202,10 @@
                 }
 
                 if(totalLocList.contains(locNo)) {
+                    String first = totalLocList.get(0);
+                    if(first.equals(locNo)) {//filter first node
+                       continue;
+                    }
                     return false;
                 }
             }
@@ -211,7 +219,7 @@
 
         applyRecordsMap.remove(shuttleNo);
         redisUtil.set(RedisKeyType.TRAFFIC_CONTROL_SUCCESS_APPLY.key + shuttleNo + "_" + taskNo, 1, 60 * 60);
-        News.info("receipt traffic {},{}", shuttleNo, taskNo);
+        News.info("[RCS Debug] receipt traffic {},{}", shuttleNo, taskNo);
         return true;
     }
 
@@ -335,7 +343,7 @@
     public synchronized boolean operateTrafficControl(OperateTrafficControlParam param) {
         long startTime = System.currentTimeMillis();
         String operaType = param.getOperaType();
-        News.info("Operate Traffic Control is Start " + operaType);
+        News.info("[RCS Debug] Operate Traffic Control is Start " + operaType);
 
         boolean result = false;
         if (operaType.equals("add")) {
@@ -354,7 +362,7 @@
                         new ArrayList<>(model.getTotalNodeList())
                 ))
                 .collect(Collectors.toList());
-        News.info("Operate Traffic Control is end " + (System.currentTimeMillis() - startTime) + "ms");
+        News.info("[RCS Debug] Operate Traffic Control is end " + (System.currentTimeMillis() - startTime) + "ms");
         return result;
     }
 

--
Gitblit v1.9.1