From 1ef1063281497f32fcfa4f14b07d99399c0bb765 Mon Sep 17 00:00:00 2001
From: jinglun-cloud <jinglun2019@foxmail.com>
Date: 星期四, 07 五月 2026 15:04:17 +0800
Subject: [PATCH] refactor(设备运动): 重构条码设备运动逻辑,提取运动常量并优化代码结构

---
 src/main/java/com/zy/core/thread/StationThread.java |   36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/zy/core/thread/StationThread.java b/src/main/java/com/zy/core/thread/StationThread.java
index 011083c..ddc9b6d 100644
--- a/src/main/java/com/zy/core/thread/StationThread.java
+++ b/src/main/java/com/zy/core/thread/StationThread.java
@@ -14,8 +14,44 @@
 
     Map<Integer, StationProtocol> getStatusMap();
 
+    List<Integer> getAllTaskNoList();
+
+    default boolean hasRecentArrival(Integer stationId, Integer taskNo) {
+        return false;
+    }
+
     StationCommand getCommand(StationCommandType commandType, Integer taskNo, Integer stationId, Integer targetStationId, Integer palletSize);
 
+    default StationCommand getCommand(StationCommandType commandType,
+                                      Integer taskNo,
+                                      Integer stationId,
+                                      Integer targetStationId,
+                                      Integer palletSize,
+                                      Double pathLenFactor) {
+        return getCommand(commandType, taskNo, stationId, targetStationId, palletSize);
+    }
+
+    default StationCommand getRunBlockRerouteCommand(Integer taskNo,
+                                                     Integer stationId,
+                                                     Integer targetStationId,
+                                                     Integer palletSize) {
+        return getCommand(StationCommandType.MOVE, taskNo, stationId, targetStationId, palletSize);
+    }
+
+    default StationCommand getRunBlockRerouteCommand(Integer taskNo,
+                                                     Integer stationId,
+                                                     Integer targetStationId,
+                                                     Integer palletSize,
+                                                     Double pathLenFactor) {
+        return getCommand(StationCommandType.MOVE, taskNo, stationId, targetStationId, palletSize, pathLenFactor);
+    }
+
+    boolean clearPath(Integer taskNo);
+
+    default boolean clearPathByStationSlot(Integer stationId, Integer slotIdx) {
+        return false;
+    }
+
     CommandResponse sendCommand(StationCommand command);
 
     CommandResponse sendOriginCommand(String address, short[] data);

--
Gitblit v1.9.1