|
@@ -49,9 +49,9 @@ public class ModuleFacade extends ModuleInfoServiceImpl {
|
|
|
Boolean isDefault = false;
|
|
|
if(moduleVO.getMouduleType().intValue() == 1){
|
|
|
//根据科室筛选如果没有,返回通用模板
|
|
|
- List<ModuleInfo> moduleInfoByDept = getModuleInfoByDisType(moduleVO.getMouduleType(),moduleVO.getRelationId());
|
|
|
- if(ListUtil.isNotEmpty(moduleInfoByDept)){
|
|
|
- ids = moduleInfoByDept.stream()
|
|
|
+ list = getModuleInfoByDisType(moduleVO.getMouduleType(),moduleVO.getRelationId());
|
|
|
+ if(ListUtil.isNotEmpty(list)){
|
|
|
+ ids = list.stream()
|
|
|
.map(moduleInfo -> moduleInfo.getId())
|
|
|
.collect(Collectors.toList());
|
|
|
}else {
|
|
@@ -59,9 +59,9 @@ public class ModuleFacade extends ModuleInfoServiceImpl {
|
|
|
}
|
|
|
}else if(moduleVO.getMouduleType().intValue() == 2){
|
|
|
//根据慢病筛选如果没有返回通用模板
|
|
|
- List<ModuleInfo> moduleInfoByDis = getModuleInfoByDisType(moduleVO.getMouduleType(),moduleVO.getRelationId());
|
|
|
- if(ListUtil.isNotEmpty(moduleInfoByDis)){
|
|
|
- ids = moduleInfoByDis.stream()
|
|
|
+ list = getModuleInfoByDisType(moduleVO.getMouduleType(),moduleVO.getRelationId());
|
|
|
+ if(ListUtil.isNotEmpty(list)){
|
|
|
+ ids = list.stream()
|
|
|
.map(moduleDeptMapping -> moduleDeptMapping.getId())
|
|
|
.collect(Collectors.toList());
|
|
|
}else {
|
|
@@ -80,6 +80,8 @@ public class ModuleFacade extends ModuleInfoServiceImpl {
|
|
|
.collect(Collectors.toList());
|
|
|
}
|
|
|
data = BeanUtil.listCopyTo(list, ModuleInfoDTO.class);
|
|
|
+ Map<Long,ModuleInfo> moduleInfoMap
|
|
|
+ = list.stream().collect(Collectors.toMap(ModuleInfo::getId,moduleInfo -> moduleInfo));
|
|
|
Map<Long, List<ModuleDetail>> moduleDetailMap = new LinkedHashMap<>();
|
|
|
//取到所有模板明细
|
|
|
if (ListUtil.isNotEmpty(ids)) {
|