From a757961fc5b8f5ee5b79cc30615bd22d321d0d72 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期六, 05 七月 2025 17:01:46 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/core/ServerBootstrap.java |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/zy/core/ServerBootstrap.java b/src/main/java/com/zy/core/ServerBootstrap.java
index 35a6250..b2a3c33 100644
--- a/src/main/java/com/zy/core/ServerBootstrap.java
+++ b/src/main/java/com/zy/core/ServerBootstrap.java
@@ -10,6 +10,7 @@
 import com.zy.core.thread.impl.LfdZyForkLiftMasterThread;
 import com.zy.core.thread.impl.NyShuttleThread;
 import com.zy.core.utils.DeviceMsgUtils;
+import com.zy.core.utils.FakeDeviceUtils;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Async;
@@ -30,6 +31,8 @@
     private RedisUtil redisUtil;
     @Autowired
     private DeviceMsgUtils deviceMsgUtils;
+    @Autowired
+    private FakeDeviceUtils fakeDeviceUtils;
 
 
     @PostConstruct
@@ -41,6 +44,8 @@
         initMq();
         // 鍒濆鍖栦笅浣嶆満绾跨▼
         initThread();
+        // 鍒濆鍖栬櫄鎷熻澶囩嚎绋�
+        initFakeThread();
         News.info("鏍稿績鎺у埗灞傚凡鍚姩...............................................");
     }
 
@@ -79,6 +84,20 @@
         }
     }
 
+    private void initFakeThread(){
+        String fakeDeviceConfig = fakeDeviceUtils.getFakeDeviceConfig();
+        if(null != fakeDeviceConfig){
+            List<DeviceConfig> deviceConfigs = JSON.parseArray(fakeDeviceConfig, DeviceConfig.class);
+            for (DeviceConfig device : deviceConfigs) {
+                if (device.getDeviceType().equals(String.valueOf(SlaveType.ForkLift))) {
+                    initForkLiftThread(device);
+                } else if (device.getDeviceType().equals(String.valueOf(SlaveType.Shuttle))) {
+                    initShuttleThread(device);
+                }
+            }
+        }
+    }
+
 
     @PreDestroy
     public void destroy() {

--
Gitblit v1.9.1