From 479744aa9d9e468626583620a85d9039f7c1ea5f Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期一, 23 三月 2026 22:51:52 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/utils/StationOperateProcessUtils.java | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/zy/core/utils/StationOperateProcessUtils.java b/src/main/java/com/zy/core/utils/StationOperateProcessUtils.java
index f988dd1..4cccd79 100644
--- a/src/main/java/com/zy/core/utils/StationOperateProcessUtils.java
+++ b/src/main/java/com/zy/core/utils/StationOperateProcessUtils.java
@@ -27,6 +27,7 @@
import com.zy.core.model.Task;
import com.zy.core.model.command.StationCommand;
import com.zy.core.model.protocol.StationProtocol;
+import com.zy.core.model.protocol.StationTaskBufferItem;
import com.zy.core.service.StationTaskLoopService;
import com.zy.core.thread.StationThread;
import org.springframework.beans.factory.annotation.Autowired;
@@ -1312,6 +1313,17 @@
if (lock != null) {
return;
}
+ int currentTaskBufferCommandCount = countCurrentTaskBufferCommands(
+ stationProtocol.getTaskBufferItems(),
+ stationProtocol.getTaskNo()
+ );
+ if (currentTaskBufferCommandCount > 0) {
+ News.info("杈撻�佺珯鐐逛换鍔″仠鐣欒秴鏃讹紝浣嗙紦瀛樺尯浠嶅瓨鍦ㄥ綋鍓嶄换鍔″懡浠わ紝宸茶烦杩囬噸绠椼�傜珯鐐瑰彿={}锛屽伐浣滃彿={}锛屽綋鍓嶄换鍔″懡浠ゆ暟={}",
+ stationProtocol.getStationId(),
+ stationProtocol.getTaskNo(),
+ currentTaskBufferCommandCount);
+ return;
+ }
Double pathLenFactor = resolveOutboundPathLenFactor(wrkMast);
OutOrderDispatchDecision dispatchDecision = null;
@@ -1375,6 +1387,22 @@
redisUtil.del(key);
}
+ private int countCurrentTaskBufferCommands(List<StationTaskBufferItem> taskBufferItems, Integer currentTaskNo) {
+ if (taskBufferItems == null || taskBufferItems.isEmpty() || currentTaskNo == null || currentTaskNo <= 0) {
+ return 0;
+ }
+ int count = 0;
+ for (StationTaskBufferItem item : taskBufferItems) {
+ if (item == null || item.getTaskNo() == null) {
+ continue;
+ }
+ if (currentTaskNo.equals(item.getTaskNo())) {
+ count++;
+ }
+ }
+ return count;
+ }
+
private int clearIssuedMoveCommandsDuringIdleStay(StationTaskIdleTrack idleTrack,
Integer taskNo,
Integer stationId) {
--
Gitblit v1.9.1