1.代码调整

This commit is contained in:
wr
2024-02-19 15:02:29 +08:00
parent 06c2cf095c
commit 0bee509621
4 changed files with 29 additions and 10 deletions

View File

@@ -254,12 +254,13 @@ public class PollutionSubstationServiceImpl extends ServiceImpl<RStatPollutionSu
subPollutionVO.add(pollutionsubVO);
});
pollutionVO.setChildren(subPollutionVO);
list.add(pollutionVO);
}
}
if (!CollectionUtils.isEmpty(list)){
return list.stream().sorted(Comparator.comparing(PollutionVO::getData).reversed().thenComparing(PollutionVO::getName)).collect(Collectors.toList());
List<PollutionVO> listSort = list.stream().filter(x -> x.getData() != 3.14159).sorted(Comparator.comparing(PollutionVO::getData).reversed().thenComparing(PollutionVO::getName)).collect(Collectors.toList());
listSort.addAll(list.stream().filter(x -> x.getData() == 3.14159).collect(Collectors.toList()));
return listSort;
}
return list;
}