From 4afa88987f466893800a83ba4767a8f59811473a Mon Sep 17 00:00:00 2001
From: Junjie <DELL@qq.com>
Date: 星期六, 20 十二月 2025 09:39:32 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/network/fake/ZyStationFakeConnect.java | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/zy/core/network/fake/ZyStationFakeConnect.java b/src/main/java/com/zy/core/network/fake/ZyStationFakeConnect.java
index faf66f7..55e1371 100644
--- a/src/main/java/com/zy/core/network/fake/ZyStationFakeConnect.java
+++ b/src/main/java/com/zy/core/network/fake/ZyStationFakeConnect.java
@@ -4,12 +4,14 @@
import com.alibaba.fastjson.JSONObject;
import com.core.common.SpringUtils;
import com.zy.asrs.entity.DeviceConfig;
+import com.zy.asrs.service.BasDevpService;
import com.zy.common.model.NavigateNode;
import com.zy.common.utils.NavigateUtils;
import com.zy.common.utils.RedisUtil;
import com.zy.core.News;
import com.zy.core.enums.RedisKeyType;
import com.zy.core.model.CommandResponse;
+import com.zy.core.model.StationObjModel;
import com.zy.core.model.command.StationCommand;
import com.zy.core.network.api.ZyStationConnectApi;
import com.zy.core.network.entity.ZyStationStatusEntity;
@@ -18,6 +20,7 @@
import java.util.HashMap;
import java.util.List;
+import java.util.Random;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@@ -305,8 +308,9 @@
Integer nextStationId = null;
Integer nextStationDeviceNo = null;
+ NavigateNode nextNode = null;
try {
- NavigateNode nextNode = navigateNodes.get(i + 1);
+ nextNode = navigateNodes.get(i + 1);
JSONObject nextValueObject = JSON.parseObject(nextNode.getNodeValue());
nextStationId = nextValueObject.getInteger("stationId");
nextStationDeviceNo = nextValueObject.getInteger("deviceNo");
@@ -351,6 +355,10 @@
continue;
}
lastStationId = currentStationId;
+
+ if (nextNode.getIsInflectionPoint()) {
+ sleep(4000);
+ }
}
i++;
@@ -553,8 +561,10 @@
return false;
}
+ Random random = new Random();
+
String barcodeTime = String.valueOf(System.currentTimeMillis());
- String barcode = barcodeTime.substring(5);
+ String barcode = String.valueOf(random.nextInt(10)) + String.valueOf(random.nextInt(10)) + barcodeTime.substring(7);
boolean result = updateStationData(lockTaskNo, currentStationId, currentStationDeviceNo, null, null, null, barcode, null);
if (!result) {
--
Gitblit v1.9.1