谐波畸变bug修复&&区域统计bug修复

This commit is contained in:
zhuxinyu
2023-04-12 18:15:32 +08:00
parent f49134860b
commit 7c6a129ac0
6 changed files with 65 additions and 91 deletions

View File

@@ -87,7 +87,7 @@ public class AreaAnalysisServiceImpl implements AreaAnalysisService {
List<String> dicIdsDouble = dicTypeList.stream().filter(item->item.getName().contains("双相接地")).map(DictData::getId).collect(Collectors.toList());
Map<String, List<String>> stringListMap = new HashMap<>();
stringListMap.put("单相接地",dicIdsOne);
stringListMap.put("相接地",dicIdsDouble);
stringListMap.put("相接地",dicIdsDouble);
stringListMap.put("三相短路",dicIdsThree);
stringListMap.put("相间故障",dicIdsXi);
stringListMap.put("未知",dicIdsOther);
@@ -217,7 +217,7 @@ public class AreaAnalysisServiceImpl implements AreaAnalysisService {
Integer allCount = 0;
for (Map.Entry<String, List<String>> stringListEntry : stringListMap.entrySet()) {
List<String> value = stringListEntry.getValue();
Integer count = Math.toIntExact(reasons.stream().filter(x -> value.contains(x)).count());
Integer count = Math.toIntExact(reasons.stream().filter(x -> value.contains(x.getAdvanceType())).count());
AreaAnalysisVO.Children allType = new AreaAnalysisVO.Children();
allType.setName(stringListEntry.getKey());
allType.setValue(count);