|
@@ -521,37 +521,39 @@ public class BusinessPerceptionMonitorAlarmServiceImpl implements IBusinessPerce
|
|
|
|
|
|
@Override
|
|
|
public MessageInfo<List<MonitorPointVO>> earlyWarningMonitoringPointStatistic(BaseParam param) {
|
|
|
- List<MonitorPointVO> monitorPointVOS = new ArrayList<>();
|
|
|
- List<ProcessParameterTag> processParameterTags = processParameterTagMapper.selectList(Wrappers.lambdaQuery(ProcessParameterTag.class).eq(StringUtil.isNotBlank(param.getAppId()), ProcessParameterTag::getAppId, param.getAppId()));
|
|
|
- Map<String, List<ProcessParameterTag>> processParameterByAppId = processParameterTags.stream()
|
|
|
- .filter(processParameterTag -> processParameterTag.getTagType() != null)
|
|
|
- .filter(processParameterTag -> processParameterTag.getStatus() != null)
|
|
|
- .filter(processParameterTag -> !processParameterTag.getTagType().equals("6"))
|
|
|
- .filter(processParameterTag -> !processParameterTag.getTagType().equals("7"))
|
|
|
- .filter(processParameterTag -> !processParameterTag.getTagType().equals("8"))
|
|
|
- .filter(processParameterTag -> processParameterTag.getStatus().equals("0"))
|
|
|
- .collect(Collectors.groupingBy(ProcessParameterTag::getAppId));
|
|
|
-
|
|
|
- for (Map.Entry<String, List<ProcessParameterTag>> appId : processParameterByAppId.entrySet()) {
|
|
|
-
|
|
|
- switch (appId.getKey()) {
|
|
|
- case "zhongshiyou":
|
|
|
- MonitorPointVO monitorPointVO = new MonitorPointVO().setAppName("中石油").setPointNum((long) appId.getValue().size());
|
|
|
- monitorPointVOS.add(monitorPointVO);
|
|
|
- break;
|
|
|
- case "zhonghaiyou":
|
|
|
- MonitorPointVO monitorPointVO1 = new MonitorPointVO().setAppName("中海油").setPointNum((long) appId.getValue().size());
|
|
|
- monitorPointVOS.add(monitorPointVO1);
|
|
|
- break;
|
|
|
- case "zhongshihua":
|
|
|
- MonitorPointVO monitorPointVO2 = new MonitorPointVO().setAppName("中石化").setPointNum((long) appId.getValue().size());
|
|
|
- monitorPointVOS.add(monitorPointVO2);
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
+// List<MonitorPointVO> monitorPointVOS = new ArrayList<>();
|
|
|
+// List<ProcessParameterTag> processParameterTags = processParameterTagMapper.selectList(Wrappers.lambdaQuery(ProcessParameterTag.class).eq(StringUtil.isNotBlank(param.getAppId()), ProcessParameterTag::getAppId, param.getAppId()));
|
|
|
+// Map<String, List<ProcessParameterTag>> processParameterByAppId = processParameterTags.stream()
|
|
|
+// .filter(processParameterTag -> processParameterTag.getTagType() != null)
|
|
|
+// .filter(processParameterTag -> processParameterTag.getStatus() != null)
|
|
|
+// .filter(processParameterTag -> !processParameterTag.getTagType().equals("6"))
|
|
|
+// .filter(processParameterTag -> !processParameterTag.getTagType().equals("7"))
|
|
|
+// .filter(processParameterTag -> !processParameterTag.getTagType().equals("8"))
|
|
|
+// .filter(processParameterTag -> processParameterTag.getStatus().equals("0"))
|
|
|
+// .collect(Collectors.groupingBy(ProcessParameterTag::getAppId));
|
|
|
+//
|
|
|
+// for (Map.Entry<String, List<ProcessParameterTag>> appId : processParameterByAppId.entrySet()) {
|
|
|
+//
|
|
|
+// switch (appId.getKey()) {
|
|
|
+// case "zhongshiyou":
|
|
|
+// MonitorPointVO monitorPointVO = new MonitorPointVO().setAppName("中石油").setPointNum((long) appId.getValue().size());
|
|
|
+// monitorPointVOS.add(monitorPointVO);
|
|
|
+// break;
|
|
|
+// case "zhonghaiyou":
|
|
|
+// MonitorPointVO monitorPointVO1 = new MonitorPointVO().setAppName("中海油").setPointNum((long) appId.getValue().size());
|
|
|
+// monitorPointVOS.add(monitorPointVO1);
|
|
|
+// break;
|
|
|
+// case "zhongshihua":
|
|
|
+// MonitorPointVO monitorPointVO2 = new MonitorPointVO().setAppName("中石化").setPointNum((long) appId.getValue().size());
|
|
|
+// monitorPointVOS.add(monitorPointVO2);
|
|
|
+// break;
|
|
|
+// default:
|
|
|
+// break;
|
|
|
+// }
|
|
|
+//
|
|
|
+// }
|
|
|
+ List<MonitorPointVO> monitorPointVOS = processParameterTagMapper.earlyWarningMonitoringPointStatistic(param);
|
|
|
|
|
|
- }
|
|
|
|
|
|
return MessageInfo.ok(monitorPointVOS);
|
|
|
}
|