From 48a28c79c0dc1203cb71147dcff0b4d4bf7bc8d0 Mon Sep 17 00:00:00 2001
From: “djh” <“3298565835@qq.com”>
Date: Tue, 04 Nov 2025 13:18:27 +0800
Subject: [PATCH] 修改

---
 src/main/java/com/gkhy/fourierSpecialGasMonitor/schedule/HeartbeatSchedule.java |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/gkhy/fourierSpecialGasMonitor/schedule/HeartbeatSchedule.java b/src/main/java/com/gkhy/fourierSpecialGasMonitor/schedule/HeartbeatSchedule.java
index f0c9d01..2cdf9ff 100644
--- a/src/main/java/com/gkhy/fourierSpecialGasMonitor/schedule/HeartbeatSchedule.java
+++ b/src/main/java/com/gkhy/fourierSpecialGasMonitor/schedule/HeartbeatSchedule.java
@@ -50,12 +50,12 @@
 
 
 
-    @Scheduled(cron = "0 0/1 * * * ?")
+    @Scheduled(cron = "0 0/10 * * * ?")
     @Async(value = "SocketTaskExecutor")
     public void gasConcentrationStatus() {
         GasConcentration gasConcentration = gasConcentrationService.getLastData();
         if (gasConcentration != null){
-            LocalDateTime lastReceiveTime = gasConcentration.getDataReceivingTime().plusMinutes(2);
+            LocalDateTime lastReceiveTime = gasConcentration.getDataReceivingTime().plusMinutes(10);
             if (LocalDateTime.now().compareTo(lastReceiveTime) > 0){
                 try {
                     heartbeatExcWebsocketServer.sendInfo(HeartbeatExecEnum.GAS_CONCENTRATION.getStatus()+"",null);
@@ -66,6 +66,7 @@
                     deviceExceptionLog.setTime(now);
                     deviceExceptionLog.setContent(content);
                     deviceExceptionLog.setExecDesc(HeartbeatExecEnum.GAS_CONCENTRATION.getDesc());
+                    deviceExceptionLog.setDelFlag(0);
                     DeviceExceptionLog save =  deviceExceptionLogService.save(deviceExceptionLog);
                     if (save == null)
                         throw new BusinessException(this.getClass(), ResultCode.SYSTEM_ERROR_DATABASE_FAIL.getCode(),"设备异常日志保存失败");
@@ -92,6 +93,7 @@
                     deviceExceptionLog.setTime(now);
                     deviceExceptionLog.setContent(content);
                     deviceExceptionLog.setExecDesc(HeartbeatExecEnum.GAS_FLUX.getDesc());
+                    deviceExceptionLog.setDelFlag(0);
                     DeviceExceptionLog save =  deviceExceptionLogService.save(deviceExceptionLog);
                     if (save == null)
                         throw new BusinessException(this.getClass(), ResultCode.SYSTEM_ERROR_DATABASE_FAIL.getCode(),"设备异常日志保存失败");

--
Gitblit v1.9.2