huangzhen
2023-10-19 1f69ad0de4a0abf9b50599146d8f9b6a22e803a3
src/main/java/com/gkhy/fourierSpecialGasMonitor/schedule/HeartbeatSchedule.java
@@ -42,11 +42,10 @@
    private final Logger logger = LoggerFactory.getLogger(this.getClass());
    //@Scheduled(cron = "1 * * * * *") // 每分钟执行一次
    @Scheduled(cron = "1 * * * * ?") // 每天凌晨执行
    @Async(value = "SocketTaskExecutor")
    public void gasConcentrationStatus() {
        GasConcentration gasConcentration = gasConcentrationService.getLastData();
        if (gasConcentration != null){
            LocalDateTime lastReceiveTime = gasConcentration.getDataReceivingTime().plusMinutes(1);
@@ -61,7 +60,7 @@
                    if (save == null)
                        throw new BusinessException(this.getClass(), ResultCode.SYSTEM_ERROR_DATABASE_FAIL.getCode(),"设备异常日志保存失败");
                } catch (IOException e) {
                    e.printStackTrace();
                    throw new BusinessException(this.getClass(), ResultCode.SYSTEM_ERROR_WEBSOCKET_SEND_INFO_FAIL.getCode(),"设备异常消息推送失败");
                }
            }
        }
@@ -84,7 +83,7 @@
                    if (save == null)
                        throw new BusinessException(this.getClass(), ResultCode.SYSTEM_ERROR_DATABASE_FAIL.getCode(),"设备异常日志保存失败");
                } catch (IOException e) {
                    e.printStackTrace();
                    throw new BusinessException(this.getClass(), ResultCode.SYSTEM_ERROR_WEBSOCKET_SEND_INFO_FAIL.getCode(),"设备异常消息推送失败");
                }
            }
        }