#
Junjie
7 天以前 7d6921a3cd3c6bcf04bf5503fa78275d09aa26f9
src/main/java/com/zy/core/ServerBootstrap.java
@@ -10,6 +10,7 @@
import com.zy.core.enums.SlaveType;
import com.zy.core.thread.impl.ZySiemensCrnThread;
import com.zy.core.thread.impl.ZyStationThread;
import com.zy.core.thread.impl.ZyRgvThread;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -112,6 +113,21 @@
            SlaveConnection.put(SlaveType.Devp, deviceConfig.getDeviceNo(), thread);
        }
        News.info("初始化RGV........................................................");
        List<DeviceConfig> rgvList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>()
                .eq("device_type", String.valueOf(SlaveType.Rgv)));
        for (DeviceConfig deviceConfig : rgvList) {
            ThreadHandler thread = null;
            if (deviceConfig.getThreadImpl().equals("ZyRgvThread")) {
                thread = new ZyRgvThread(deviceConfig, redisUtil);
            } else {
                throw new CoolException("未知的线程实现");
            }
            new Thread(thread).start();
            SlaveConnection.put(SlaveType.Rgv, deviceConfig.getDeviceNo(), thread);
        }
    }