Browse Source

#云服务去除数据中断校验

zhongwei
yang_shj 7 months ago
parent
commit
b532732869
  1. 9
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/monitor/impl/MonitorServiceImpl.java

9
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<RealDeviceVo> deviceList) {
private void deviceState(List<RealDeviceVo> deviceList,Integer status) {
deviceList.forEach(device->{
// 设备属性列表
List<RealAttributeVo> attbts = device.getAttbtList();
if(CollectionUtil.isEmpty(attbts)){
if(CollectionUtil.isEmpty(attbts) || status == 1){
device.setState(-1);
return;
}
// 功率属性记录
List<RealAttributeVo> powers = attbts.stream().filter(att-> HomePageConstant.powerList.contains(att.getName())).collect(Collectors.toList());
if(CollectionUtil.isEmpty(powers)){

Loading…
Cancel
Save