Browse Source

Merge remote-tracking branch 'origin/master'

main
parent
commit
a17b41e8aa
  1. 16
      src/main/java/com/biutag/supervision/service/ModelClueService.java

16
src/main/java/com/biutag/supervision/service/ModelClueService.java

@ -294,12 +294,17 @@ public class ModelClueService extends ServiceImpl<ModelClueMapper, ModelClue> {
}
private static void filterDataForModel26(List<Map<String, Object>> allData) {
List<Map<String, Object>> filteredData = allData.stream().filter(map -> map.get("ajbh") != null).toList();
Map<String, List<Map<String, Object>>> groupedData = filteredData.stream().collect(Collectors.groupingBy(map -> (String) map.get("ajbh")));
List<Map<String, Object>> filteredData = allData.stream().filter(map -> map.get("ajbh") != null && map.get("zjhm") != null).toList();
Map<String, Map<String, List<Map<String, Object>>>> groupedData = filteredData.stream()
.collect(Collectors.groupingBy(
map -> (String) map.get("ajbh"),
Collectors.groupingBy(map -> (String) map.get("zjhm"))
));
allData.clear();
for (Map.Entry<String, List<Map<String, Object>>> entry : groupedData.entrySet()) {
String ajbh = entry.getKey();
List<Map<String, Object>> records = entry.getValue();
for (Map.Entry<String, Map<String, List<Map<String, Object>>>> entry : groupedData.entrySet()) {
for (Map.Entry<String, List<Map<String, Object>>> entry2 : entry.getValue().entrySet()) {
String ajbh = entry2.getKey();
List<Map<String, Object>> records = entry2.getValue();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
String earliestJRSJ = null;
LocalDateTime earliestDateTime = LocalDateTime.MIN;
@ -338,6 +343,7 @@ public class ModelClueService extends ServiceImpl<ModelClueMapper, ModelClue> {
allData.add(newRecord);
}
}
}
System.out.println("模型26筛选后的alldata数量:" + allData.size());
}

Loading…
Cancel
Save