解决布置图-渗流查询报错

master
wany 2024-08-26 16:46:29 +08:00
parent 9151c708fa
commit 3702da0c36
1 changed files with 20 additions and 18 deletions

View File

@ -392,6 +392,7 @@ public class OsmoticPressRService extends ServiceImpl<OsmoticPressRMapper, Osmot
}
OsmoticQuerySo so = new OsmoticQuerySo();
List<String> stationCodes = list.stream().map(OsmoticPressVo::getStationCode).collect(Collectors.toList());
if(list.stream().filter(o->o.getTm() != null).collect(Collectors.toList()).size() > 0 ){
String maxTm = list.stream().filter(o->o.getTm() != null).max(Comparator.comparing(OsmoticPressVo::getTm)).get().getTm();
String minTm = list.stream().filter(o->o.getTm() != null).min(Comparator.comparing(OsmoticPressVo::getTm)).get().getTm();
so.setStationCodes(stationCodes);
@ -410,6 +411,7 @@ public class OsmoticPressRService extends ServiceImpl<OsmoticPressRMapper, Osmot
}
return o;
}).collect(Collectors.toList());
}
return list;
}