From ff55f15de19cb5bf02fa4d2313f4882ef9b3a452 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期三, 30 四月 2025 10:47:34 +0800
Subject: [PATCH] 表阀一体机上报心跳数据最小间隔经常改动,时常不通知软件开发人员,所以通信中间件根据最小上报数据间隔会切断设备网络连接,为此改变中间件配置,最小心跳间隔改为在properties文件中配置。

---
 pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanSv.java |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanSv.java
index 79c42dc..2a3bbf3 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanSv.java
@@ -69,13 +69,13 @@
     @Autowired
     private CommandSv commandSv;
 
-    @Value("${webchat.irr.plan.delay}")
+    @Value("${wechat.irr.plan.delay:5}")
     private Integer irrPlanDelay ;//杞亴涓鍒掑紑闃�鐨勫欢杩熸椂闀�
 
     private static final Integer irrPlanDelayDefault = 5 ;//杞亴涓鍒掑紑闃�鐨勯粯璁ゅ欢杩熸椂闀�
 
-    @Value("${rotation.preOpeningTime}")
-    private Long preOpeningTime;
+    @Value("${wechat.irr.plan.preOpeningTime:10}")
+    private Integer preOpeningTime;
 
     /**
      * 娣诲姞鐏屾簤璁″垝
@@ -223,6 +223,11 @@
             LocalscheduleStartTime = LocalscheduleStartTime.plusMinutes(schedule.getDuration());
             LocalscheduleStartTime = LocalscheduleStartTime.minusMinutes(preOpeningTime);
             scheduleStartTime = Date.from(LocalscheduleStartTime.atZone(ZoneId.systemDefault()).toInstant());
+            
+            // 纭繚涓嬩竴缁勭殑寮�濮嬫椂闂翠笉鏃╀簬璁″垝寮�濮嬫椂闂�
+            if(scheduleStartTime.before(planStartTime)) {
+                scheduleStartTime = planStartTime;
+            }
         }
 
         // 娣诲姞鐏屾簤璁″垝鎿嶄綔璁板綍

--
Gitblit v1.8.0