From b821b6c3719f5eac49bfff58af77a9b4ed97f544 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期三, 09 七月 2025 10:11:36 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/ServerBootstrap.java | 21 +++++----------------
1 files changed, 5 insertions(+), 16 deletions(-)
diff --git a/src/main/java/com/zy/core/ServerBootstrap.java b/src/main/java/com/zy/core/ServerBootstrap.java
index b2a3c33..c4a6471 100644
--- a/src/main/java/com/zy/core/ServerBootstrap.java
+++ b/src/main/java/com/zy/core/ServerBootstrap.java
@@ -7,10 +7,10 @@
import com.zy.core.cache.SlaveConnection;
import com.zy.core.enums.SlaveType;
import com.zy.core.properties.DeviceConfig;
+import com.zy.core.thread.fake.FakeNyShuttleThread;
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;
@@ -31,8 +31,6 @@
private RedisUtil redisUtil;
@Autowired
private DeviceMsgUtils deviceMsgUtils;
- @Autowired
- private FakeDeviceUtils fakeDeviceUtils;
@PostConstruct
@@ -42,10 +40,10 @@
Thread.sleep(2000);
// 鍒濆鍖栨秷鎭槦鍒�
initMq();
- // 鍒濆鍖栦笅浣嶆満绾跨▼
- initThread();
// 鍒濆鍖栬櫄鎷熻澶囩嚎绋�
initFakeThread();
+ // 鍒濆鍖栦笅浣嶆満绾跨▼
+ initThread();
News.info("鏍稿績鎺у埗灞傚凡鍚姩...............................................");
}
@@ -85,17 +83,8 @@
}
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);
- }
- }
- }
+ ThreadHandler thread = new FakeNyShuttleThread(redisUtil);
+ new Thread(thread).start();
}
--
Gitblit v1.9.1