|
|
|
@ -345,7 +345,7 @@ public class MonitorServiceImpl implements MonitorService {
|
|
|
|
|
// 设置站点状态:数据中断
|
|
|
|
|
this.setStationStatus(aborts,station,key,deviceList); |
|
|
|
|
// 运行设备状态设置
|
|
|
|
|
this.deviceState(deviceList,station.getStatus()); |
|
|
|
|
this.deviceState(deviceList); |
|
|
|
|
// 铃铛
|
|
|
|
|
this.stationBell(station,bells); |
|
|
|
|
station.setDeviceList(deviceList.stream().sorted(Comparator.comparing((RealDeviceVo::getDeviceName))).collect(Collectors.toList())); |
|
|
|
@ -420,11 +420,11 @@ public class MonitorServiceImpl implements MonitorService {
|
|
|
|
|
* 设备状态 |
|
|
|
|
* @param deviceList |
|
|
|
|
*/ |
|
|
|
|
private void deviceState(List<RealDeviceVo> deviceList,Integer status) { |
|
|
|
|
private void deviceState(List<RealDeviceVo> deviceList) { |
|
|
|
|
deviceList.forEach(device->{ |
|
|
|
|
// 设备属性列表
|
|
|
|
|
List<RealAttributeVo> attbts = device.getAttbtList(); |
|
|
|
|
if(CollectionUtil.isEmpty(attbts) || status == 1){ |
|
|
|
|
if(CollectionUtil.isEmpty(attbts)){ |
|
|
|
|
device.setState(-1); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|