From b53273286915355d81066733f0c5a02da5ed8798 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Sat, 11 May 2024 11:51:45 +0800 Subject: [PATCH] =?UTF-8?q?#=E4=BA=91=E6=9C=8D=E5=8A=A1=E5=8E=BB=E9=99=A4?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=B8=AD=E6=96=AD=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/operation/monitor/impl/MonitorServiceImpl.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/monitor/impl/MonitorServiceImpl.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/monitor/impl/MonitorServiceImpl.java index 23c60be..34ecc71 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/monitor/impl/MonitorServiceImpl.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/monitor/impl/MonitorServiceImpl.java @@ -342,10 +342,10 @@ public class MonitorServiceImpl implements MonitorService { }); // 设备状态 this.getDeviceParam(devices, deviceClassifyMap, deviceList); - // 运行设备状态设置 - this.deviceState(deviceList); // 设置站点状态:数据中断 this.setStationStatus(aborts,station,key,deviceList); + // 运行设备状态设置 + this.deviceState(deviceList,station.getStatus()); // 铃铛 this.stationBell(station,bells); station.setDeviceList(deviceList.stream().sorted(Comparator.comparing((RealDeviceVo::getDeviceName))).collect(Collectors.toList())); @@ -420,14 +420,15 @@ public class MonitorServiceImpl implements MonitorService { * 设备状态 * @param deviceList */ - private void deviceState(List deviceList) { + private void deviceState(List deviceList,Integer status) { deviceList.forEach(device->{ // 设备属性列表 List attbts = device.getAttbtList(); - if(CollectionUtil.isEmpty(attbts)){ + if(CollectionUtil.isEmpty(attbts) || status == 1){ device.setState(-1); return; } + // 功率属性记录 List powers = attbts.stream().filter(att-> HomePageConstant.powerList.contains(att.getName())).collect(Collectors.toList()); if(CollectionUtil.isEmpty(powers)){