From 691f0d4c4836c75fefa1d3b7fba4a72153751dd4 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期三, 09 七月 2025 13:38:37 +0800
Subject: [PATCH] #

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

diff --git a/src/main/java/com/zy/core/ServerBootstrap.java b/src/main/java/com/zy/core/ServerBootstrap.java
index f90de2d..c67e150 100644
--- a/src/main/java/com/zy/core/ServerBootstrap.java
+++ b/src/main/java/com/zy/core/ServerBootstrap.java
@@ -9,13 +9,7 @@
 import com.zy.core.cache.MessageQueue;
 import com.zy.core.cache.SlaveConnection;
 import com.zy.core.enums.SlaveType;
-import com.zy.core.model.*;
-import com.zy.core.properties.SlaveProperties;
-import com.zy.core.thread.*;
-import com.zy.core.thread.impl.LfdZyForkLiftMasterThread;
-import com.zy.core.thread.impl.LfdZyForkLiftSlaveThread;
 import com.zy.core.thread.impl.NyShuttleThread;
-import com.zy.core.thread.impl.ZyForkLiftThread;
 import com.zy.core.utils.DeviceMsgUtils;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -74,6 +68,7 @@
 
     private void initThread(){
         List<DeviceConfig> allDevices = new ArrayList<>();
+        List<DeviceConfig> fakeDevices = new ArrayList<>();
 
 //        // 鍒濆鍖栬揣鍙夋彁鍗囨満
 //        List<DeviceConfig> forkLiftList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>()
@@ -111,7 +106,6 @@
         // 鍒濆鍖栧洓鍚戠┛姊溅
         List<DeviceConfig> shuttleList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>()
                 .eq("device_type", String.valueOf(SlaveType.Shuttle)));
-        allDevices.addAll(shuttleList);
         for (DeviceConfig deviceConfig : shuttleList) {
             News.info("鍒濆鍖栧洓鍚戠┛姊溅......................................................");
             ThreadHandler thread = null;
@@ -123,11 +117,18 @@
 
             new Thread(thread).start();
             SlaveConnection.put(SlaveType.Shuttle, deviceConfig.getDeviceNo(), thread);
+
+            if (deviceConfig.getFake() == 1) {
+                fakeDevices.add(deviceConfig);
+            }else {
+                allDevices.add(deviceConfig);
+            }
         }
 
 
         //璁惧鍒濆鍖栧畬姣�
         deviceMsgUtils.sendDeviceConfig(JSON.toJSONString(allDevices));
+        deviceMsgUtils.sendFakeDeviceConfig(JSON.toJSONString(fakeDevices));
     }
 
 

--
Gitblit v1.9.1