解决测值查询时测点为空时报错
parent
8353708120
commit
1a00b6844d
|
|
@ -45,6 +45,10 @@ public class OsmoticPressRService extends ServiceImpl<OsmoticPressRMapper, Osmot
|
|||
* @return
|
||||
*/
|
||||
public List<OsmoticStationVo> queryValue(OsmoticQuerySo osmoticQuerySo,Integer year) {
|
||||
List<OsmoticStationVo> resList = new ArrayList<>();
|
||||
if(CollectionUtils.isEmpty(osmoticQuerySo.getStationCodes())){
|
||||
return resList;
|
||||
}
|
||||
Boolean isDesc = true;
|
||||
//查询测站降雨量
|
||||
Map<String,BigDecimal> drpMap = new HashMap<>();
|
||||
|
|
@ -54,7 +58,7 @@ public class OsmoticPressRService extends ServiceImpl<OsmoticPressRMapper, Osmot
|
|||
drpMap = drpList.stream().collect(Collectors.toMap(StRzVo::getTm, StRzVo::getRz));
|
||||
}
|
||||
List<String> dateList = DateUtil.getDatesBetween(osmoticQuerySo.getDateTimeRangeSo().getStart(), osmoticQuerySo.getDateTimeRangeSo().getEnd(),isDesc);
|
||||
List<OsmoticStationVo> resList = new ArrayList<>();
|
||||
|
||||
//查询库水位
|
||||
List<StRzVo> list = baseMapper.queryRz(osmoticQuerySo);
|
||||
Map<String, BigDecimal> rzMap = list.stream().collect(Collectors.toMap(StRzVo::getTm, StRzVo::getRz));
|
||||
|
|
@ -78,6 +82,9 @@ public class OsmoticPressRService extends ServiceImpl<OsmoticPressRMapper, Osmot
|
|||
public List<OsmoticChartVo> queryChart(OsmoticQuerySo osmoticQuerySo,Integer year) {
|
||||
List<OsmoticChartVo> resList = new ArrayList<>();
|
||||
List<String> stationCodes = osmoticQuerySo.getStationCodes();
|
||||
if(CollectionUtils.isEmpty(stationCodes)){
|
||||
return resList;
|
||||
}
|
||||
//查询库水位
|
||||
List<StRzVo> list = baseMapper.queryRz(osmoticQuerySo);
|
||||
//查询测站管水位
|
||||
|
|
@ -408,6 +415,9 @@ public class OsmoticPressRService extends ServiceImpl<OsmoticPressRMapper, Osmot
|
|||
|
||||
public List<OsmoticPressDetailVo> detailValue(OsmoticDetailQuerySo so) {
|
||||
List<OsmoticPressDetailVo> list = baseMapper.detailValue(so);
|
||||
if(so.getType() == 2){
|
||||
return list;
|
||||
}
|
||||
OsmoticQuerySo osmoticQuerySo = new OsmoticQuerySo();
|
||||
BeanUtils.copyProperties(so,osmoticQuerySo);
|
||||
List<StRzVo> stRzVos = baseMapper.queryLineRz(osmoticQuerySo);
|
||||
|
|
|
|||
Loading…
Reference in New Issue