|
@@ -46,6 +46,7 @@ public class ModuleFacade extends ModuleInfoServiceImpl {
|
|
|
//取到所有模板信息
|
|
|
List<ModuleInfo> list = new ArrayList<>();
|
|
|
List<Long> ids = new ArrayList<>();
|
|
|
+ Boolean isDefault = false;
|
|
|
if(moduleVO.getMouduleType().intValue() == 1){
|
|
|
//根据科室筛选如果没有,返回通用模板
|
|
|
List<ModuleInfo> moduleInfoByDept = getModuleInfoByDisType(moduleVO.getMouduleType(),moduleVO.getRelationId());
|
|
@@ -54,10 +55,7 @@ public class ModuleFacade extends ModuleInfoServiceImpl {
|
|
|
.map(moduleInfo -> moduleInfo.getId())
|
|
|
.collect(Collectors.toList());
|
|
|
}else {
|
|
|
- list = getModuleInfoByDisType(0,0L);
|
|
|
- ids = list.stream()
|
|
|
- .map(moduleInfo -> moduleInfo.getId())
|
|
|
- .collect(Collectors.toList());
|
|
|
+ isDefault = true;
|
|
|
}
|
|
|
}else if(moduleVO.getMouduleType().intValue() == 2){
|
|
|
//根据慢病筛选如果没有返回通用模板
|
|
@@ -67,16 +65,18 @@ public class ModuleFacade extends ModuleInfoServiceImpl {
|
|
|
.map(moduleDeptMapping -> moduleDeptMapping.getId())
|
|
|
.collect(Collectors.toList());
|
|
|
}else {
|
|
|
- list = getModuleInfoByDisType(0,0L);
|
|
|
- ids = list.stream()
|
|
|
- .map(moduleInfo -> moduleInfo.getId())
|
|
|
- .collect(Collectors.toList());
|
|
|
+ isDefault = true;
|
|
|
}
|
|
|
}else {
|
|
|
+ isDefault = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ //科室和慢病没有内容,或者默认情况下,需要推测出默认模板
|
|
|
+ if (isDefault){
|
|
|
//默认
|
|
|
- list = this.getModuleInfoByDisType(moduleVO.getMouduleType(),moduleVO.getRelationId());
|
|
|
+ list = getModuleInfoByDisType(0,0L);
|
|
|
ids = list.stream()
|
|
|
- .map(artist -> artist.getId())
|
|
|
+ .map(moduleInfo -> moduleInfo.getId())
|
|
|
.collect(Collectors.toList());
|
|
|
}
|
|
|
data = BeanUtil.listCopyTo(list, ModuleInfoDTO.class);
|