From a40b871aa511865d1a7363c88ffb733f6b084d35 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期一, 02 三月 2026 17:14:15 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/network/fake/ZyStationFakeSegConnect.java | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/zy/core/network/fake/ZyStationFakeSegConnect.java b/src/main/java/com/zy/core/network/fake/ZyStationFakeSegConnect.java
index ccf3230..b5a077f 100644
--- a/src/main/java/com/zy/core/network/fake/ZyStationFakeSegConnect.java
+++ b/src/main/java/com/zy/core/network/fake/ZyStationFakeSegConnect.java
@@ -411,6 +411,10 @@
}
if (command.getCommandType() == StationCommandType.WRITE_INFO) {
+ if (command.getBarcode() != null) {
+ updateStationBarcode(deviceNo, stationId, command.getBarcode());
+ return;
+ }
if (taskNo == 9998 && targetStationId == 0) {
// 鐢熸垚鍑哄簱绔欑偣浠跨湡鏁版嵁
generateFakeOutStationData(deviceNo, stationId);
@@ -466,6 +470,23 @@
}
}
+ private void updateStationBarcode(Integer deviceNo, Integer stationId, String barcode) {
+ List<ZyStationStatusEntity> statusList = deviceStatusMap.get(deviceNo);
+ if (statusList == null) {
+ return;
+ }
+
+ ZyStationStatusEntity status = statusList.stream()
+ .filter(item -> item.getStationId().equals(stationId)).findFirst().orElse(null);
+ if (status == null) {
+ return;
+ }
+
+ synchronized (status) {
+ status.setBarcode(barcode);
+ }
+ }
+
// segmentedPathCommand 鏂规硶宸插垹闄わ紝鍔熻兘宸叉暣鍚堝埌 runTaskLoop
private Integer getDeviceNoByStationId(Integer stationId) {
--
Gitblit v1.9.1