|
@@ -1253,15 +1253,17 @@ public class ConsoleFacade {
|
|
|
filterFacade.filterVOSet(filterVO);
|
|
|
List<NumDTO> records = behospitalInfoFacade.beHosCount(filterVO);
|
|
|
|
|
|
- NumDTO globleRecord = new NumDTO();
|
|
|
- globleRecord.setName("全院");
|
|
|
- Integer num = records.stream()
|
|
|
- .map(NumDTO::getNum)
|
|
|
- .reduce(0, Integer::sum);
|
|
|
- globleRecord.setNum(num);
|
|
|
- records.add(0, globleRecord);
|
|
|
+ if (ListUtil.isNotEmpty(records)) {
|
|
|
+ NumDTO globleRecord = new NumDTO();
|
|
|
+ globleRecord.setName("全院");
|
|
|
+ Integer num = records.stream()
|
|
|
+ .map(NumDTO::getNum)
|
|
|
+ .reduce(0, Integer::sum);
|
|
|
+ globleRecord.setNum(num);
|
|
|
+ records.add(0, globleRecord);
|
|
|
+ }
|
|
|
|
|
|
- if (records.size() > filterVO.getLimitCount()) {
|
|
|
+ if (ListUtil.isNotEmpty(records) && records.size() > filterVO.getLimitCount()) {
|
|
|
records = records.subList(0, 10);
|
|
|
}
|
|
|
return records;
|
|
@@ -1277,15 +1279,17 @@ public class ConsoleFacade {
|
|
|
filterFacade.filterVOSet(filterVO);
|
|
|
List<NumDTO> records = behospitalInfoFacade.casesEntryStatisticsById(filterVO);
|
|
|
|
|
|
- NumDTO globleRecord = new NumDTO();
|
|
|
- globleRecord.setName("全院");
|
|
|
- Integer num = records.stream()
|
|
|
- .map(NumDTO::getNum)
|
|
|
- .reduce(0, Integer::sum);
|
|
|
- globleRecord.setNum(num);
|
|
|
- records.add(0, globleRecord);
|
|
|
+ if (ListUtil.isNotEmpty(records)) {
|
|
|
+ NumDTO globleRecord = new NumDTO();
|
|
|
+ globleRecord.setName("全院");
|
|
|
+ Integer num = records.stream()
|
|
|
+ .map(NumDTO::getNum)
|
|
|
+ .reduce(0, Integer::sum);
|
|
|
+ globleRecord.setNum(num);
|
|
|
+ records.add(0, globleRecord);
|
|
|
+ }
|
|
|
|
|
|
- if (records.size() > filterVO.getLimitCount()) {
|
|
|
+ if (ListUtil.isNotEmpty(records) && records.size() > filterVO.getLimitCount()) {
|
|
|
records = records.subList(0, 10);
|
|
|
}
|
|
|
return records;
|