From 2b9f736dbb4675cae20664adbd0a903c298b7055 Mon Sep 17 00:00:00 2001 From: 25604 Date: Thu, 16 Oct 2025 12:44:10 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E9=A3=8E=E6=9F=9C=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/mh/quartz/task/AHUTask.java | 44 +++++++++++++------ 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/mh-quartz/src/main/java/com/mh/quartz/task/AHUTask.java b/mh-quartz/src/main/java/com/mh/quartz/task/AHUTask.java index da2b062..af026df 100644 --- a/mh-quartz/src/main/java/com/mh/quartz/task/AHUTask.java +++ b/mh-quartz/src/main/java/com/mh/quartz/task/AHUTask.java @@ -103,7 +103,7 @@ public class AHUTask { // 判断远程启停或者时间表启停是否开启来,判断是否存在getCurValue,且当前时间等于今天的时间 if (list.stream().anyMatch(val -> (val.getMtNum().equals("ddc13_1510085") || val.getMtNum().equals("ddc13_1510185")) - && val.getCurValue() != null && val.getCurValue().intValue() == 1)) { + && val.getCurValue() != null)) { // 判断curTime是否为今天 Date now = new Date(); boolean isToday = list.stream().anyMatch(val -> @@ -124,23 +124,39 @@ public class AHUTask { } Thread.sleep(2000); } - } - } else { - for (CollectionParamsManage value : list) { - if (value.getMtNum().contains("ddc13_0211385")) { - if (twoHardParam.getCurValue() != null && twoHardParam.getCurValue().intValue() != 0) { - // 发送值给2号硬件风阀控制点位 - sendOrderToMqtt(List.of(new OrderEntity(twoHardParam.getId(), "0", 0, twoHardParam.getOtherName()))); - } - } else if (value.getMtNum().contains("ddc13_0211485")) { - if (threeHardParam.getCurValue() != null && threeHardParam.getCurValue().intValue() != 0) { - // 发送值给3号硬件风阀控制点位 - sendOrderToMqtt(List.of(new OrderEntity(threeHardParam.getId(), "0", 0, threeHardParam.getOtherName()))); + } else { + for (CollectionParamsManage value : list) { + if (value.getMtNum().contains("ddc13_0211385")) { + if (twoHardParam.getCurValue() != null && twoHardParam.getCurValue().intValue() != 0) { + // 发送值给2号硬件风阀控制点位 + sendOrderToMqtt(List.of(new OrderEntity(twoHardParam.getId(), "0", 0, twoHardParam.getOtherName()))); + } + } else if (value.getMtNum().contains("ddc13_0211485")) { + if (threeHardParam.getCurValue() != null && threeHardParam.getCurValue().intValue() != 0) { + // 发送值给3号硬件风阀控制点位 + sendOrderToMqtt(List.of(new OrderEntity(threeHardParam.getId(), "0", 0, threeHardParam.getOtherName()))); + } } + Thread.sleep(2000); } - Thread.sleep(2000); } } +// else { +// for (CollectionParamsManage value : list) { +// if (value.getMtNum().contains("ddc13_0211385")) { +// if (twoHardParam.getCurValue() != null && twoHardParam.getCurValue().intValue() != 0) { +// // 发送值给2号硬件风阀控制点位 +// sendOrderToMqtt(List.of(new OrderEntity(twoHardParam.getId(), "0", 0, twoHardParam.getOtherName()))); +// } +// } else if (value.getMtNum().contains("ddc13_0211485")) { +// if (threeHardParam.getCurValue() != null && threeHardParam.getCurValue().intValue() != 0) { +// // 发送值给3号硬件风阀控制点位 +// sendOrderToMqtt(List.of(new OrderEntity(threeHardParam.getId(), "0", 0, threeHardParam.getOtherName()))); +// } +// } +// Thread.sleep(2000); +// } +// } }