Junjie
昨天 a4f07b2a0ddb6c210e05afbbb491feeb466203e7
src/main/java/com/zy/asrs/task/NotifyScheduler.java
@@ -1,6 +1,6 @@
package com.zy.asrs.task;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zy.asrs.domain.NotifyDto;
import com.zy.asrs.entity.DeviceConfig;
import com.zy.asrs.service.DeviceConfigService;
@@ -34,7 +34,7 @@
    @Scheduled(cron = "0/3 * * * * ? ")
    public synchronized void notifyShuttle() {
        List<DeviceConfig> deviceList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>()
        List<DeviceConfig> deviceList = deviceConfigService.list(new QueryWrapper<DeviceConfig>()
                .eq("device_type", String.valueOf(SlaveType.Crn)));
        for (DeviceConfig device : deviceList) {
            notifyMsg(String.valueOf(SlaveType.Crn), device.getDeviceNo());
@@ -43,10 +43,19 @@
    @Scheduled(cron = "0/3 * * * * ? ")
    public synchronized void notifyForkLift() {
        List<DeviceConfig> deviceList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>()
        List<DeviceConfig> deviceList = deviceConfigService.list(new QueryWrapper<DeviceConfig>()
                .eq("device_type", String.valueOf(SlaveType.Rgv)));
        for (DeviceConfig device : deviceList) {
            notifyMsg(String.valueOf(SlaveType.Rgv), device.getDeviceNo());
        }
    }
    @Scheduled(cron = "0/3 * * * * ? ")
    public synchronized void notifyStation() {
        List<DeviceConfig> deviceList = deviceConfigService.list(new QueryWrapper<DeviceConfig>()
                .eq("device_type", String.valueOf(SlaveType.Devp)));
        for (DeviceConfig device : deviceList) {
            notifyMsg(String.valueOf(SlaveType.Devp), device.getDeviceNo());
        }
    }
@@ -66,7 +75,7 @@
    }
    private synchronized void notifyMsg(String notifyType, Integer device) {
        Config notifyEnableConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "notifyEnable"));
        Config notifyEnableConfig = configService.getOne(new QueryWrapper<Config>().eq("code", "notifyEnable"));
        if (notifyEnableConfig == null) {
            return;
        }
@@ -75,13 +84,13 @@
            return;
        }
        Config notifyUriConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "notifyUri"));
        Config notifyUriConfig = configService.getOne(new QueryWrapper<Config>().eq("code", "notifyUri"));
        if (notifyUriConfig == null) {
            return;
        }
        String notifyUri = notifyUriConfig.getValue();
        Config notifyUriPathConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "notifyUriPath"));
        Config notifyUriPathConfig = configService.getOne(new QueryWrapper<Config>().eq("code", "notifyUriPath"));
        if (notifyUriPathConfig == null) {
            return;
        }