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 da76d0d..23c60be 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 @@ -295,8 +295,6 @@ public class MonitorServiceImpl implements MonitorService { List alertList = alertService.list(new LambdaQueryWrapper() {{ orderByDesc(StAlarmRecordEntity::getCreateTime); }}); - // 获取所有故障记录 - List faultList = this.getFdpFaultAll(); // 所有设备分类 Map> deviceClassifyMap = (Map>) redisTemplate.opsForValue().get(device_classify_cache_final); // 所有设备 @@ -309,7 +307,7 @@ public class MonitorServiceImpl implements MonitorService { // 铃铛 List bells = alarmQueryService.bells(stationEntityList.stream().map(StationEntity::getCode).collect(Collectors.toList())); // 数据中断 - List aborts = interruptionAlarmService.aborts(stationEntityList.stream().map(StationEntity::getCode).collect(Collectors.toList())); + List aborts = interruptionAlarmService.aborts(stationEntityList.stream().filter(o->HomePageConstant.HYDROPOWER_SERVETYPE_STR.equals(o.getServeType())).map(StationEntity::getCode).collect(Collectors.toList())); // 隐藏设备列表 List hideList = attrConfigService.getHideList(); // 分割,每个map限制10个长度 @@ -339,7 +337,7 @@ public class MonitorServiceImpl implements MonitorService { deviceVo.setDeviceName(device); deviceVo.setDeviceCode(attbt.get(0).getEmCode()); // 设备处理 - this.handleDevice(attbt, map, deviceVo, alertList, faultList); + this.handleDevice(attbt, map, deviceVo, alertList); deviceList.add(deviceVo); }); // 设备状态 @@ -389,8 +387,7 @@ public class MonitorServiceImpl implements MonitorService { * @param device */ private void handleDevice(List list, Map> map, - RealDeviceVo device, List alertList, - List faultList) { + RealDeviceVo device, List alertList) { if (CollectionUtil.isEmpty(list) || MapUtils.isEmpty(map)) { return; } @@ -410,7 +407,7 @@ public class MonitorServiceImpl implements MonitorService { attbtList.add(realAttributeVo); return; } - realAttributeVo = handleAttbt(item, real, alertList, faultList); + realAttributeVo = handleAttbt(item, real, alertList); if (ObjectUtil.isEmpty(realAttributeVo)) { return; } @@ -536,7 +533,7 @@ public class MonitorServiceImpl implements MonitorService { * @return */ private RealAttributeVo handleAttbt(StationAttributeEntity item, Map real, - List alertList, List faultList) { + List alertList) { RealAttributeVo attest = new RealAttributeVo(); this.setAttbtParam(attest, real); attest.setRealId(item.getMonitorId()); @@ -567,8 +564,6 @@ public class MonitorServiceImpl implements MonitorService { default: throw new IllegalStateException("Unexpected type: " + type); } - // 故障信息设置 - accidentDetails(attest, faultList, value); return attest; } @@ -606,34 +601,6 @@ public class MonitorServiceImpl implements MonitorService { } /** - * 故障信息设置 - * - * @param attest - * @param faultList - * @param value - */ - private void accidentDetails(RealAttributeVo attest, List faultList, String value) { - if (CollectionUtil.isEmpty(faultList) || "-".equals(value)) { - return; - } - List fault = faultList.stream().filter(o -> o.getRealId().equals(attest.getRealId())).collect(Collectors.toList()); - if (CollectionUtil.isEmpty(fault)) { - return; - } - FdpFaultStatusVo fdpFaultStatusVo = fault.get(0); - // 黄色 - if (fdpFaultStatusVo.getValue() > greater_than_cache_final && fdpFaultStatusVo.getValue() < less_than_cache_final) { - attest.setStatus(ConfigStatus.ConfigStatusEnum.YELLOW.getStatus()); - // 橙色 - } else if (fdpFaultStatusVo.getValue() >= be_equa_cache_final) { - attest.setStatus(ConfigStatus.ConfigStatusEnum.ORANGE.getStatus()); - } - attest.setFdpRate(fdpFaultStatusVo.getValue()); - attest.setFdpFaultId(fdpFaultStatusVo.getFaultId()); - attest.setFdpMonitorId(fdpFaultStatusVo.getMonitorId()); - } - - /** * 重点属性类型-遥信 :数据逻辑处理 * * @param attest