|
@@ -355,31 +355,44 @@ public class ModuleInfoFacade extends ModuleInfoServiceImpl {
|
|
|
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())
|
|
|
- .in("id",questionIdList);
|
|
|
- List<QuestionInfo> questionInfoList = questionFacade.list(questionInfoQueryWrapper);
|
|
|
- Map<Long, QuestionInfo> questionInfoMap = questionInfoList.stream().collect(Collectors.toMap(QuestionInfo::getId,questionInfo -> questionInfo));
|
|
|
- //获取模板信息
|
|
|
- QueryWrapper<ModuleInfo> moduleInfoQueryWrapper = new QueryWrapper<>();
|
|
|
- questionInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .in("id",moduleIdList);
|
|
|
- List<ModuleInfo> moduleInfoList = this.list(moduleInfoQueryWrapper);
|
|
|
- Map<Long, ModuleInfo> moduleInfoMap = moduleInfoList.stream().collect(Collectors.toMap(ModuleInfo::getId,moduleInfo -> moduleInfo));
|
|
|
- //循环给出参赋值
|
|
|
- for (ModuleDetail moduleDetail : moduleDetailList) {
|
|
|
- getModuleDetailInfoDTO = new GetModuleDetailInfoDTO();
|
|
|
- BeanUtil.copyProperties(moduleDetail, getModuleDetailInfoDTO);
|
|
|
- if (moduleDetail.getQuestionId() != null) {
|
|
|
- getModuleDetailInfoDTO.setTagName(questionInfoMap.get(moduleDetail.getQuestionId()).getTagName());
|
|
|
- getModuleDetailInfoDTO.setTagType(questionInfoMap.get(moduleDetail.getQuestionId()).getTagType());
|
|
|
- } else {
|
|
|
- getModuleDetailInfoDTO.setRelationModuleName(moduleInfoMap.get(moduleDetail.getRelationModule()).getName());
|
|
|
+
|
|
|
+ if(getModuleDetailInfoVO.getType().intValue() == QuestionTypeEnum.Pacs.getKey()){//如果是辅检,调用knowledgeman获取辅检信息
|
|
|
+ ConceptTypeVO conceptTypeVO = new ConceptTypeVO();
|
|
|
+ conceptTypeVO.setType(2);
|
|
|
+ RespDTO<List<ConceptBaseDTO>> pacsCeptInfo = knowledgemanServiceClient.getConceptListByType(conceptTypeVO);
|
|
|
+ Map<Long,ConceptBaseDTO> pacsCeptMap = pacsCeptInfo.data.stream().collect(Collectors.toMap(ConceptBaseDTO::getConceptId,conceptBaseDTO -> conceptBaseDTO));
|
|
|
+ //循环给出参赋值
|
|
|
+ for (ModuleDetail moduleDetail : moduleDetailList) {
|
|
|
+ getModuleDetailInfoDTO = new GetModuleDetailInfoDTO();
|
|
|
+ BeanUtil.copyProperties(moduleDetail, getModuleDetailInfoDTO);
|
|
|
+ getModuleDetailInfoDTO.setTagName(pacsCeptMap.get(moduleDetail.getQuestionId()).getName());
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ //获取标签信息
|
|
|
+ QueryWrapper<QuestionInfo> questionInfoQueryWrapper = new QueryWrapper<>();
|
|
|
+ questionInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .in("id", questionIdList);
|
|
|
+ List<QuestionInfo> questionInfoList = questionFacade.list(questionInfoQueryWrapper);
|
|
|
+ Map<Long, QuestionInfo> questionInfoMap = questionInfoList.stream().collect(Collectors.toMap(QuestionInfo::getId, questionInfo -> questionInfo));
|
|
|
+ //获取模板信息
|
|
|
+ QueryWrapper<ModuleInfo> moduleInfoQueryWrapper = new QueryWrapper<>();
|
|
|
+ questionInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .in("id", moduleIdList);
|
|
|
+ List<ModuleInfo> moduleInfoList = this.list(moduleInfoQueryWrapper);
|
|
|
+ Map<Long, ModuleInfo> moduleInfoMap = moduleInfoList.stream().collect(Collectors.toMap(ModuleInfo::getId, moduleInfo -> moduleInfo));
|
|
|
+ //循环给出参赋值
|
|
|
+ for (ModuleDetail moduleDetail : moduleDetailList) {
|
|
|
+ getModuleDetailInfoDTO = new GetModuleDetailInfoDTO();
|
|
|
+ BeanUtil.copyProperties(moduleDetail, getModuleDetailInfoDTO);
|
|
|
+ if (moduleDetail.getQuestionId() != null) {
|
|
|
+ getModuleDetailInfoDTO.setTagName(questionInfoMap.get(moduleDetail.getQuestionId()).getTagName());
|
|
|
+ getModuleDetailInfoDTO.setTagType(questionInfoMap.get(moduleDetail.getQuestionId()).getTagType());
|
|
|
+ } else {
|
|
|
+ getModuleDetailInfoDTO.setRelationModuleName(moduleInfoMap.get(moduleDetail.getRelationModule()).getName());
|
|
|
+ }
|
|
|
+ getModuleDetailInfoDTOList.add(getModuleDetailInfoDTO);
|
|
|
}
|
|
|
- getModuleDetailInfoDTOList.add(getModuleDetailInfoDTO);
|
|
|
}
|
|
|
-
|
|
|
return getModuleDetailInfoDTOList;
|
|
|
}
|
|
|
|