|
@@ -78,11 +78,7 @@ public class QcCasesFacade extends QcCasesServiceImpl {
|
|
|
List<QcCasesAllDTO> dataNew = new ArrayList<QcCasesAllDTO>();
|
|
|
dataNew = BeanUtil.listCopyTo(data, QcCasesAllDTO.class);
|
|
|
// 查出所有病例病例类型
|
|
|
- QueryWrapper<QcCasesEntry> qcCasesEntryQuery = new QueryWrapper<>();
|
|
|
- qcCasesEntryQuery
|
|
|
- .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .orderByDesc("level_no");
|
|
|
- List<QcCasesEntry> dataEntry = qcCasesEntryService.list(qcCasesEntryQuery);
|
|
|
+ List<QcCasesEntry> dataEntry = this.getCasesEntryByHospitalId(getAllByHospitalVO.getHospitalId());
|
|
|
// 然后把所有病例类型放进去
|
|
|
Map<Long, List<QcCasesEntry>> map
|
|
|
= EntityUtil.makeEntityListMap(dataEntry, "casesId");
|
|
@@ -93,16 +89,13 @@ public class QcCasesFacade extends QcCasesServiceImpl {
|
|
|
.eq("is_deleted",IsDeleteEnum.N.getKey())
|
|
|
.eq("hospital_id",getAllByHospitalVO.getHospitalId());
|
|
|
Map<Long,CasesEntryHospital> casesEntryHospitalMap = casesEntryHospitalFacade.list(casesEntryHospitalQueryWrapper).stream().collect(Collectors.toMap(CasesEntryHospital::getCasesEntryId,casesEntryHospital -> casesEntryHospital));
|
|
|
- List<QcCasesEntry> tmp = new ArrayList<>();
|
|
|
//把模板放进文件夹中
|
|
|
if (dataNew.size() > 0) {
|
|
|
for (QcCasesAllDTO ts : dataNew) {
|
|
|
- for (QcCasesEntry qcCasesEntry : map.get(ts.getId())) {
|
|
|
- if(casesEntryHospitalMap.get(qcCasesEntry.getId()) != null){
|
|
|
- tmp.add(qcCasesEntry);
|
|
|
- }
|
|
|
+ List<QcCasesEntry> tmp = map.get(ts.getId());
|
|
|
+ if (ListUtil.isNotEmpty(tmp)) {
|
|
|
+ ts.setQcCasesEntry(tmp);
|
|
|
}
|
|
|
- ts.setQcCasesEntry(tmp);
|
|
|
}
|
|
|
}
|
|
|
return dataNew;
|