From c34747e73010e893dfd04344fcbc8848c13eb717 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期日, 12 一月 2025 16:12:20 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/ServerBootstrap.java | 24 ++++++++++++++----------
1 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/src/main/java/com/zy/core/ServerBootstrap.java b/src/main/java/com/zy/core/ServerBootstrap.java
index 781ce85..5f00670 100644
--- a/src/main/java/com/zy/core/ServerBootstrap.java
+++ b/src/main/java/com/zy/core/ServerBootstrap.java
@@ -7,6 +7,8 @@
import com.zy.core.model.*;
import com.zy.core.properties.SlaveProperties;
import com.zy.core.thread.*;
+import com.zy.core.thread.impl.NyShuttleThread;
+import com.zy.core.thread.impl.ZyForkLiftThread;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
@@ -65,9 +67,9 @@
for (Slave car : slaveProperties.getCar()) {
MessageQueue.init(SlaveType.Car, car);
}
- // 鍒濆鍖栨彁鍗囨満mq
- for (Slave lift : slaveProperties.getLift()) {
- MessageQueue.init(SlaveType.Lift, lift);
+ // 鍒濆鍖栬揣鍙夋彁鍗囨満mq
+ for (Slave forkLift : slaveProperties.getForkLift()) {
+ MessageQueue.init(SlaveType.ForkLift, forkLift);
}
// 鍒濆鍖栧洓鍚戠┛姊溅mq
for (Slave shuttle : slaveProperties.getShuttle()) {
@@ -83,12 +85,12 @@
new Thread((Runnable) devpThread).start();
SlaveConnection.put(SlaveType.Devp, devp.getId(), devpThread);
}
- // 鍒濆鍖栨彁鍗囨満
- News.info("鍒濆鍖栨彁鍗囨満........................................................");
- for (LiftSlave liftSlave : slaveProperties.getLift()) {
- LiftThread liftThread = new LiftThread(liftSlave, redisUtil);
- new Thread(liftThread).start();
- SlaveConnection.put(SlaveType.Lift, liftSlave.getId(), liftThread);
+ // 鍒濆鍖栬揣鍙夋彁鍗囨満
+ News.info("鍒濆鍖栬揣鍙夋彁鍗囨満........................................................");
+ for (ForkLiftSlave forkLiftSlave : slaveProperties.getForkLift()) {
+ ZyForkLiftThread forkLiftThread = new ZyForkLiftThread(forkLiftSlave, redisUtil);
+ new Thread(forkLiftThread).start();
+ SlaveConnection.put(SlaveType.ForkLift, forkLiftSlave.getId(), forkLiftThread);
}
// 鍒濆鍖栧洓鍚戠┛姊溅
News.info("鍒濆鍖栧洓鍚戠┛姊溅......................................................");
@@ -101,7 +103,9 @@
News.info("鍒濆鍖栨潯鐮佹壂鎻忎华绾跨▼...................................................");
for (Slave barcode : slaveProperties.getBarcode()) {
BarcodeThread barcodeThread = new BarcodeThread(barcode);
- new Thread(barcodeThread).start();
+ if (barcode.getId() >= 11) {
+ new Thread(barcodeThread).start();
+ }
SlaveConnection.put(SlaveType.Barcode, barcode.getId(), barcodeThread);
}
// 鍒濆鍖朙ED绾跨▼
--
Gitblit v1.9.1