|
@@ -398,24 +398,23 @@ public class BehospitalInfoServiceImpl extends ServiceImpl<BehospitalInfoMapper,
|
|
|
public IPage<QcResultShortDTO> leaveHosMRPage(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO) {
|
|
|
IPage<QcResultShortDTO> qcResultShortDTOIPage = baseMapper.leaveHosMRPage(qcResultShortPageVO);
|
|
|
List<QcResultShortDTO> records = qcResultShortDTOIPage.getRecords();
|
|
|
+ if (CollectionUtils.isEmpty(records)) {
|
|
|
+ return qcResultShortDTOIPage;
|
|
|
+ }
|
|
|
String hospitalId = qcResultShortPageVO.getHospitalId();
|
|
|
Set<String> behospitalCodes = new HashSet<String>();
|
|
|
-
|
|
|
- if(CollectionUtils.isEmpty(records)){
|
|
|
- return null;
|
|
|
- }
|
|
|
for (QcResultShortDTO record : records) {
|
|
|
- if(StringUtils.isEmpty( record.getAge())){
|
|
|
+ if (StringUtils.isEmpty(record.getAge())) {
|
|
|
String behospitalCode = record.getBehospitalCode();
|
|
|
behospitalCodes.add(behospitalCode);
|
|
|
}
|
|
|
}
|
|
|
//目标数据个数与年龄数据为空个数对比,匹配上说明年龄字段从单独sql查出
|
|
|
- if(records.size() == behospitalCodes.size()){
|
|
|
- List<Map<String,Object>> mapLists = baseMapper.getAge(hospitalId, behospitalCodes);
|
|
|
+ if (records.size() == behospitalCodes.size()) {
|
|
|
+ List<Map<String, Object>> mapLists = baseMapper.getAge(hospitalId, behospitalCodes);
|
|
|
for (Map<String, Object> mapList : mapLists) {
|
|
|
for (QcResultShortDTO record : records) {
|
|
|
- if(record.getBehospitalCode().equals(mapList.get("behospitalCode"))){
|
|
|
+ if (record.getBehospitalCode().equals(mapList.get("behospitalCode"))) {
|
|
|
record.setAge(String.valueOf(mapList.get("age")));
|
|
|
}
|
|
|
}
|
|
@@ -423,7 +422,6 @@ public class BehospitalInfoServiceImpl extends ServiceImpl<BehospitalInfoMapper,
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
return qcResultShortDTOIPage;
|
|
|
|
|
|
}
|