测试代码删除

This commit is contained in:
zhuxinyu
2023-05-06 08:52:43 +08:00
parent ab20fa6d84
commit 5e5fc60968

View File

@@ -47,16 +47,9 @@ public class DeviceAbnormaStatisticsServiceImpl implements DeviceAbnormalStatist
// 根据装置id分组
Map<String, List<AlarmPO>> devMap = lines.stream().collect(Collectors.groupingBy(AlarmPO::getDeviceId));
// 监测点集合
// List<String> monotorIds = lines.stream().map(AlarmPO::getId).collect(Collectors.toList());
List<String> monotorIds = lines.stream().map(AlarmPO::getId).collect(Collectors.toList());
// 装置id集合
// List<String> devIds = new ArrayList<>(devMap.keySet());
List<AlarmPO> monitors = devMap.get("f82ab14fd5950ac5f7deaf75af360333");
List<String> monotorIds = monitors.stream().map(AlarmPO::getId).collect(Collectors.toList());
List<String> devIds = new ArrayList(Collections.singleton("f82ab14fd5950ac5f7deaf75af360333"));
Map<String, List<AlarmPO>> map = new HashMap<>();
map.put("f82ab14fd5950ac5f7deaf75af360333",monitors);
List<String> devIds = new ArrayList<>(devMap.keySet());
// 获取异常告警策略
List<AlarmStrategyVO> alarmStrategyVOS = deviceAbnormaStatisticsMapper.selectAlarmStrategy();
Map<Integer, List<AlarmStrategyVO>> levMap = alarmStrategyVOS.stream().collect(Collectors.groupingBy(AlarmStrategyVO::getAlgoDesc));
@@ -91,7 +84,7 @@ public class DeviceAbnormaStatisticsServiceImpl implements DeviceAbnormalStatist
}
// 整合装置信息
List<TopMsgPO> topMsgPOS = new ArrayList<>();
for (Map.Entry<String, List<AlarmPO>> devEntry : map.entrySet()) {
for (Map.Entry<String, List<AlarmPO>> devEntry : devMap.entrySet()) {
TopMsgPO topMsg = new TopMsgPO();
topMsg.setDevId(devEntry.getKey());
int deviceLevel = devEntry.getValue().stream().mapToInt(AlarmPO::getLevel).min().orElse(-1);