From 2b6156951c18ea9ff60ed5578db633cebbe99fa7 Mon Sep 17 00:00:00 2001
From: Junjie <xjj@123>
Date: 星期四, 25 九月 2025 10:46:16 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/thread/fake/FakeZyForkLiftThread.java | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/src/main/java/com/zy/core/thread/fake/FakeZyForkLiftThread.java b/src/main/java/com/zy/core/thread/fake/FakeZyForkLiftThread.java
index c26e5ce..52a85d0 100644
--- a/src/main/java/com/zy/core/thread/fake/FakeZyForkLiftThread.java
+++ b/src/main/java/com/zy/core/thread/fake/FakeZyForkLiftThread.java
@@ -11,6 +11,7 @@
import com.zy.core.enums.SlaveType;
import com.zy.core.model.DeviceCommandMsgModel;
import com.zy.core.model.DeviceMsgModel;
+import com.zy.core.model.param.UpdateFakeThreadStatusParam;
import com.zy.core.properties.DeviceConfig;
import com.zy.core.thread.FakeThread;
import com.zy.core.thread.impl.ZyForkLiftThread;
@@ -154,7 +155,7 @@
Thread.sleep(5000);
fakeStatus.put("protocolStatus", 98);//绛夊緟纭
- fakeStatus.put("lev", command.getInteger("put"));
+ fakeStatus.put("lev", commandBody.getInteger("put"));
fakeStatusMap.put(key, fakeStatus);
} else if (commandType == 4) {
//灏忚溅鎹㈠眰
@@ -376,4 +377,17 @@
public ConcurrentHashMap<String, JSONObject> getFakeCommandMap() {
return this.fakeCommandMap;
}
+
+ @Override
+ public boolean updateFakeStatus(UpdateFakeThreadStatusParam param) {
+ String key = param.getDeviceType() + param.getDeviceNo();
+ JSONObject result = fakeStatusMap.get(key);
+ if (result == null) {
+ return false;
+ }
+
+ JSONObject newData = JSON.parseObject(param.getData());
+ this.fakeStatusMap.put(key, newData);
+ return true;
+ }
}
--
Gitblit v1.9.1