|
@@ -2100,6 +2100,14 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
List<BehospitalInfoDeptDTO> records = res.getRecords();
|
|
|
List<BehospitalInfoDeptDTO> resRecords = new ArrayList<>();
|
|
|
|
|
|
+ //非空判断
|
|
|
+ if(res.getTotal() == 0){
|
|
|
+ IPage<BehospitalInfoDeptDTO> emptyPage = new Page<>(1, 15); // 页码为1,每页10条记录
|
|
|
+ emptyPage.setRecords(new ArrayList<>()); // 设置记录为空列表
|
|
|
+ emptyPage.setTotal(0); // 设置总记录数为0
|
|
|
+ return emptyPage;
|
|
|
+ }
|
|
|
+
|
|
|
// 收集所有唯一的病历号
|
|
|
List<String> behospitalCodes = records.stream()
|
|
|
.map(BehospitalInfoDeptDTO::getBehospitalCode)
|
|
@@ -2124,11 +2132,10 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- IPage<BehospitalInfoDeptDTO> resultPage = new Page<>(res.getCurrent(), res.getSize(), res.getTotal());
|
|
|
+ IPage<BehospitalInfoDeptDTO> resultPage = new Page<>(res.getCurrent(), resRecords.size(), resRecords.size());
|
|
|
// 设置记录
|
|
|
resultPage.setRecords(resRecords);
|
|
|
- resultPage.setTotal(resRecords.size());
|
|
|
- resultPage.setSize(resRecords.size());
|
|
|
+
|
|
|
return resultPage;
|
|
|
}
|
|
|
|