|
|
@ -342,10 +342,10 @@ public class MonitorServiceImpl implements MonitorService { |
|
|
|
}); |
|
|
|
}); |
|
|
|
// 设备状态
|
|
|
|
// 设备状态
|
|
|
|
this.getDeviceParam(devices, deviceClassifyMap, deviceList); |
|
|
|
this.getDeviceParam(devices, deviceClassifyMap, deviceList); |
|
|
|
// 运行设备状态设置
|
|
|
|
|
|
|
|
this.deviceState(deviceList); |
|
|
|
|
|
|
|
// 设置站点状态:数据中断
|
|
|
|
// 设置站点状态:数据中断
|
|
|
|
this.setStationStatus(aborts,station,key,deviceList); |
|
|
|
this.setStationStatus(aborts,station,key,deviceList); |
|
|
|
|
|
|
|
// 运行设备状态设置
|
|
|
|
|
|
|
|
this.deviceState(deviceList,station.getStatus()); |
|
|
|
// 铃铛
|
|
|
|
// 铃铛
|
|
|
|
this.stationBell(station,bells); |
|
|
|
this.stationBell(station,bells); |
|
|
|
station.setDeviceList(deviceList.stream().sorted(Comparator.comparing((RealDeviceVo::getDeviceName))).collect(Collectors.toList())); |
|
|
|
station.setDeviceList(deviceList.stream().sorted(Comparator.comparing((RealDeviceVo::getDeviceName))).collect(Collectors.toList())); |
|
|
@ -420,14 +420,15 @@ public class MonitorServiceImpl implements MonitorService { |
|
|
|
* 设备状态 |
|
|
|
* 设备状态 |
|
|
|
* @param deviceList |
|
|
|
* @param deviceList |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private void deviceState(List<RealDeviceVo> deviceList) { |
|
|
|
private void deviceState(List<RealDeviceVo> deviceList,Integer status) { |
|
|
|
deviceList.forEach(device->{ |
|
|
|
deviceList.forEach(device->{ |
|
|
|
// 设备属性列表
|
|
|
|
// 设备属性列表
|
|
|
|
List<RealAttributeVo> attbts = device.getAttbtList(); |
|
|
|
List<RealAttributeVo> attbts = device.getAttbtList(); |
|
|
|
if(CollectionUtil.isEmpty(attbts)){ |
|
|
|
if(CollectionUtil.isEmpty(attbts) || status == 1){ |
|
|
|
device.setState(-1); |
|
|
|
device.setState(-1); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 功率属性记录
|
|
|
|
// 功率属性记录
|
|
|
|
List<RealAttributeVo> powers = attbts.stream().filter(att-> HomePageConstant.powerList.contains(att.getName())).collect(Collectors.toList()); |
|
|
|
List<RealAttributeVo> powers = attbts.stream().filter(att-> HomePageConstant.powerList.contains(att.getName())).collect(Collectors.toList()); |
|
|
|
if(CollectionUtil.isEmpty(powers)){ |
|
|
|
if(CollectionUtil.isEmpty(powers)){ |
|
|
|