|
@@ -222,34 +222,36 @@ public class ModuleInfoFacade extends ModuleInfoServiceImpl {
|
|
|
moduleInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("id", getModuleInfoOneVO.getModuleId());
|
|
|
ModuleInfo moduleInfo = this.getOne(moduleInfoQueryWrapper);
|
|
|
- //获取模板类型名称
|
|
|
- if(moduleInfo.getModuleType().intValue() == 1){
|
|
|
- deptId.add(moduleInfo.getRelationId());
|
|
|
- }
|
|
|
- //获取科室名称
|
|
|
- ConceptTypeVO conceptTypeVO = new ConceptTypeVO();
|
|
|
- conceptTypeVO.setType(1);
|
|
|
- RespDTO<List<ConceptBaseDTO>> deptInfoList = knowledgemanServiceClient.getConceptListByType(conceptTypeVO);
|
|
|
- RespDTOUtil.respNGDeal(deptInfoList,"获取科室信息失败");
|
|
|
- Map<Long, ConceptBaseDTO> deptInfoMap = deptInfoList.data.stream().collect(Collectors.toMap(ConceptBaseDTO::getConceptId,conceptBaseDTO -> conceptBaseDTO));
|
|
|
- //获取模板类型
|
|
|
- BeanUtil.copyProperties(moduleInfo, getModuleInfoOneDTO);
|
|
|
- getModuleInfoOneDTO.setAscriptionName(ModuleTypeEnum.getName(Integer.parseInt(moduleInfo.getType())));
|
|
|
- getModuleInfoOneDTO.setModuleTypeName(ModuleInfoTypeEnum.getName(getModuleInfoOneDTO.getModuleType().intValue()));
|
|
|
- if(getModuleInfoOneDTO.getModuleType().intValue() == 1){
|
|
|
- getModuleInfoOneDTO.setRelationName(deptInfoMap.get(getModuleInfoOneDTO.getRelationId()).getName());
|
|
|
- }
|
|
|
-
|
|
|
- //获取模板明细
|
|
|
- List<GetModuleDetailInfoDTO> getModuleDetailInfoDTOList = new ArrayList<>();
|
|
|
- GetModuleDetailInfoDTO getModuleDetailInfoDTO = null;
|
|
|
- QueryWrapper<ModuleDetail> moduleDetailQueryWrapper = new QueryWrapper<>();
|
|
|
- moduleDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .eq("module_id", getModuleInfoOneVO.getModuleId())
|
|
|
- .orderByAsc("order_no");
|
|
|
- List<ModuleDetail> moduleDetailList = moduleDetailFacade.list(moduleDetailQueryWrapper);
|
|
|
- List<Long> questionIdList = moduleDetailList.stream().map(moduleDetail -> moduleDetail.getQuestionId()).collect(Collectors.toList());
|
|
|
- List<Long> moduleIdList = moduleDetailList.stream().map(moduleDetail -> moduleDetail.getRelationModule()).collect(Collectors.toList());
|
|
|
+ if(null != moduleInfo){
|
|
|
+ //获取模板类型名称
|
|
|
+ if(moduleInfo.getModuleType().intValue() == 1){
|
|
|
+ deptId.add(moduleInfo.getRelationId());
|
|
|
+ }
|
|
|
+ //获取科室名称
|
|
|
+ ConceptTypeVO conceptTypeVO = new ConceptTypeVO();
|
|
|
+ conceptTypeVO.setType(1);
|
|
|
+ RespDTO<List<ConceptBaseDTO>> deptInfoList = knowledgemanServiceClient.getConceptListByType(conceptTypeVO);
|
|
|
+ RespDTOUtil.respNGDeal(deptInfoList,"获取科室信息失败");
|
|
|
+ Map<Long, ConceptBaseDTO> deptInfoMap = deptInfoList.data.stream().collect(Collectors.toMap(ConceptBaseDTO::getConceptId,conceptBaseDTO -> conceptBaseDTO));
|
|
|
+ //获取模板类型
|
|
|
+ BeanUtil.copyProperties(moduleInfo, getModuleInfoOneDTO);
|
|
|
+ getModuleInfoOneDTO.setAscriptionName(ModuleTypeEnum.getName(Integer.parseInt(moduleInfo.getType())));
|
|
|
+ getModuleInfoOneDTO.setModuleTypeName(ModuleInfoTypeEnum.getName(getModuleInfoOneDTO.getModuleType().intValue()));
|
|
|
+ if(getModuleInfoOneDTO.getModuleType().intValue() == 1){
|
|
|
+ if(null != deptInfoMap.get(getModuleInfoOneDTO.getRelationId())){
|
|
|
+ getModuleInfoOneDTO.setRelationName(deptInfoMap.get(getModuleInfoOneDTO.getRelationId()).getName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //获取模板明细
|
|
|
+ List<GetModuleDetailInfoDTO> getModuleDetailInfoDTOList = new ArrayList<>();
|
|
|
+ GetModuleDetailInfoDTO getModuleDetailInfoDTO = null;
|
|
|
+ QueryWrapper<ModuleDetail> moduleDetailQueryWrapper = new QueryWrapper<>();
|
|
|
+ moduleDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("module_id", getModuleInfoOneVO.getModuleId())
|
|
|
+ .orderByAsc("order_no");
|
|
|
+ List<ModuleDetail> moduleDetailList = moduleDetailFacade.list(moduleDetailQueryWrapper);
|
|
|
+ List<Long> questionIdList = moduleDetailList.stream().map(moduleDetail -> moduleDetail.getQuestionId()).collect(Collectors.toList());
|
|
|
+ List<Long> moduleIdList = moduleDetailList.stream().map(moduleDetail -> moduleDetail.getRelationModule()).collect(Collectors.toList());
|
|
|
//获取标签信息
|
|
|
QueryWrapper<QuestionInfo> questionInfoQueryWrapper = new QueryWrapper<>();
|
|
|
questionInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
@@ -274,7 +276,8 @@ public class ModuleInfoFacade extends ModuleInfoServiceImpl {
|
|
|
}
|
|
|
getModuleDetailInfoDTOList.add(getModuleDetailInfoDTO);
|
|
|
}
|
|
|
- getModuleInfoOneDTO.setModuleDetail(getModuleDetailInfoDTOList);
|
|
|
+ getModuleInfoOneDTO.setModuleDetail(getModuleDetailInfoDTOList);
|
|
|
+ }
|
|
|
return getModuleInfoOneDTO;
|
|
|
}
|
|
|
|