|
@@ -4,6 +4,7 @@ import cn.hutool.core.thread.ThreadUtil;
|
|
import cn.hutool.extra.spring.SpringUtil;
|
|
import cn.hutool.extra.spring.SpringUtil;
|
|
import com.gzlh.background.client.BackgroundClientNetty;
|
|
import com.gzlh.background.client.BackgroundClientNetty;
|
|
import com.gzlh.bus.SysConfig;
|
|
import com.gzlh.bus.SysConfig;
|
|
|
|
+import com.gzlh.config.SystemObject;
|
|
import com.gzlh.config.dto.CaputreSetting;
|
|
import com.gzlh.config.dto.CaputreSetting;
|
|
import com.gzlh.config.dto.SerialSetting;
|
|
import com.gzlh.config.dto.SerialSetting;
|
|
import com.gzlh.config.ModuleEnum;
|
|
import com.gzlh.config.ModuleEnum;
|
|
@@ -16,6 +17,7 @@ import com.gzlh.device.led.client.LedNettyConfig;
|
|
import com.gzlh.device.plc.client.PlcNettyConfig;
|
|
import com.gzlh.device.plc.client.PlcNettyConfig;
|
|
import com.gzlh.device.plc.event.PLCEvent;
|
|
import com.gzlh.device.plc.event.PLCEvent;
|
|
import com.gzlh.device.plc.job.SearchJob;
|
|
import com.gzlh.device.plc.job.SearchJob;
|
|
|
|
+import com.gzlh.device.rfid.enums.CardType;
|
|
import com.gzlh.device.weighbridge.client.WeighbridgeNettyConfig;
|
|
import com.gzlh.device.weighbridge.client.WeighbridgeNettyConfig;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.boot.CommandLineRunner;
|
|
import org.springframework.boot.CommandLineRunner;
|
|
@@ -61,6 +63,11 @@ public class StartupRunner implements CommandLineRunner {
|
|
}
|
|
}
|
|
if (serialSetting.getElectron().getEnable()){
|
|
if (serialSetting.getElectron().getEnable()){
|
|
ThreadUtil.execute(() -> electronNettyConfig.connect());
|
|
ThreadUtil.execute(() -> electronNettyConfig.connect());
|
|
|
|
+ ThreadUtil.sleep(3000);
|
|
|
|
+// SystemObject.electronFactory.handler(SysConfig.serialSetting.getElectron().getBrand())
|
|
|
|
+// .setReaderCmdModule(true);
|
|
|
|
+// SystemObject.electronFactory.handler(SysConfig.serialSetting.getElectron().getBrand())
|
|
|
|
+// .startToRead(CardType.TYPE_6C);
|
|
}
|
|
}
|
|
if (SysConfig.managerSetting.isEnable()) {
|
|
if (SysConfig.managerSetting.isEnable()) {
|
|
ThreadUtil.execute(() -> backgroundClientNetty.connect());
|
|
ThreadUtil.execute(() -> backgroundClientNetty.connect());
|