From 5d68f36fb16c07ea5459a167c9711f681c2f71b2 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期五, 27 三月 2026 17:10:25 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/thread/impl/ZyStationV3Thread.java | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/zy/core/thread/impl/ZyStationV3Thread.java b/src/main/java/com/zy/core/thread/impl/ZyStationV3Thread.java
index 9bf0843..3e2e1f3 100644
--- a/src/main/java/com/zy/core/thread/impl/ZyStationV3Thread.java
+++ b/src/main/java/com/zy/core/thread/impl/ZyStationV3Thread.java
@@ -30,6 +30,7 @@
import com.zy.core.network.DeviceConnectPool;
import com.zy.core.network.ZyStationConnectDriver;
import com.zy.core.network.entity.ZyStationStatusEntity;
+import com.zy.core.thread.support.RecentStationArrivalTracker;
import com.zy.core.utils.DeviceLogRedisKeyBuilder;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
@@ -54,6 +55,7 @@
private int deviceLogCollectTime = 200;
private long deviceDataLogTime = System.currentTimeMillis();
private ExecutorService executor = Executors.newFixedThreadPool(9999);
+ private final RecentStationArrivalTracker recentArrivalTracker = new RecentStationArrivalTracker();
public ZyStationV3Thread(DeviceConfig deviceConfig, RedisUtil redisUtil) {
this.deviceConfig = deviceConfig;
@@ -148,6 +150,7 @@
stationProtocol.setRunBlock(statusEntity.isRunBlock());
stationProtocol.setEnableIn(statusEntity.isEnableIn());
stationProtocol.setWeight(statusEntity.getWeight());
+ recentArrivalTracker.observe(statusEntity.getStationId(), statusEntity.getTaskNo(), statusEntity.isLoading());
}
if (!Cools.isEmpty(stationProtocol.getSystemWarning())) {
@@ -208,6 +211,11 @@
}
@Override
+ public boolean hasRecentArrival(Integer stationId, Integer taskNo) {
+ return recentArrivalTracker.hasRecentArrival(stationId, taskNo);
+ }
+
+ @Override
public StationCommand getCommand(StationCommandType commandType, Integer taskNo, Integer stationId, Integer targetStationId, Integer palletSize) {
return getCommand(commandType, taskNo, stationId, targetStationId, palletSize, null);
}
--
Gitblit v1.9.1