Commit 6ba44a3b authored by 赵啸非's avatar 赵啸非

添加告警统计信息

parent 88897a99
......@@ -91,10 +91,7 @@ public class DeviceAlarmInfoServiceImpl extends AbstractCRUDServiceImpl<DeviceAl
//分站点统计设备今日告警数量
Map<String, Long> siteDeviceAlarmCollect = deviceAlarmInfoList.parallelStream().distinct().collect(groupingBy(x -> x.getSiteId(), counting()))
.entrySet().stream().sorted(Map.Entry.comparingByValue(Comparator.reverseOrder()))
.collect(Collectors.toMap(
x -> siteMap.get(x)==null?"未知站点":siteMap.get(x).getSiteName(),
Map.Entry::getValue,
(oldVal, newVal) -> oldVal));
.collect(Collectors.toMap(x->siteMap.get(x.getKey())==null?"未知站点":siteMap.get(x.getKey()).getSiteName(),y->y.getValue(),(o,n)->n));
deviceAlarmInfo.setSiteDeviceAlarmCollect(siteDeviceAlarmCollect);
//设备类型分布
Map<String, String> deviceConnTypeCollect = deviceList.parallelStream().collect(groupingBy(x -> DeviceSrcEnum.getByValue(x.getDeviceSrc()).getDesc(), Collectors.collectingAndThen(counting(), y ->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment