|
@@ -44,8 +44,6 @@ public class DeptInfoFacade extends DeptInfoServiceImpl {
|
|
|
private UserServiceClient userServiceClient;
|
|
|
@Autowired
|
|
|
private QuestionUsualFacade questionUsualFacade;
|
|
|
- @Autowired
|
|
|
- private QuestionFacade questionFacade;
|
|
|
/**
|
|
|
* 添加科室信息
|
|
|
*
|
|
@@ -182,58 +180,6 @@ public class DeptInfoFacade extends DeptInfoServiceImpl {
|
|
|
.notIn("id",deptIds);
|
|
|
List<DeptInfo> deptInfoList = this.list(queryWrapper);
|
|
|
List<GetDeptNameDTO> getDeptNameDTOS = BeanUtil.listCopyTo(deptInfoList,GetDeptNameDTO.class);
|
|
|
- /*//查询所有科室
|
|
|
- QueryWrapper<DeptInfo> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.eq("is_deleted",IsDeleteEnum.N.getKey());
|
|
|
- List<DeptInfo> deptInfoList = this.list(queryWrapper);
|
|
|
- List<DeptInfoDTO> deptInfoDTOList = BeanUtil.listCopyTo(deptInfoList,DeptInfoDTO.class);
|
|
|
- List<Long> deptIds = new ArrayList<>();
|
|
|
- deptInfoList.stream().forEach(deptInfoDTO -> deptIds.add(deptInfoDTO.getId()));
|
|
|
- //在常用标签中查询所有相关标签
|
|
|
- GetQuestionUsualAndTypeVO getQuestionUsualAndTypeVO = new GetQuestionUsualAndTypeVO();
|
|
|
- getQuestionUsualAndTypeVO.setDeptIds(deptIds);
|
|
|
- List<GetQuestionUsualAndTypeDTO> getQuestionUsualAndTypeDTOS = questionUsualFacade.getQuestionUsualByDeptIds(getQuestionUsualAndTypeVO);
|
|
|
- List<GetQuestionUsualAndTypeDTO> questionUsuals = new ArrayList<>();
|
|
|
- List<DeptInfoDTO> deptInfoDTOS = new ArrayList<>();
|
|
|
- List<QuestionTypeDTO> questionTypeDTOS = new ArrayList<>();
|
|
|
- QuestionTypeDTO questionTypeDTO = null;
|
|
|
- //将标签明细放入科室信息中,并排除类型
|
|
|
- for (DeptInfoDTO deptInfoDTO : deptInfoDTOList) {
|
|
|
- questionUsuals = new ArrayList<>();
|
|
|
- questionTypeDTOS = new ArrayList<>();
|
|
|
- for (GetQuestionUsualAndTypeDTO getQuestionUsualAndTypeDTO : getQuestionUsualAndTypeDTOS) {
|
|
|
- if (deptInfoDTO.getId().intValue() == getQuestionUsualAndTypeDTO.getDeptId().intValue()){
|
|
|
- questionUsuals.add(getQuestionUsualAndTypeDTO);
|
|
|
- }
|
|
|
- }
|
|
|
- deptInfoDTO.setQuestionUsuals(questionUsuals);
|
|
|
- List<Integer> questionType = new ArrayList<>();
|
|
|
- deptInfoDTO.getQuestionUsuals().forEach(getQuestionUsualAndTypeDTO -> questionType.add(getQuestionUsualAndTypeDTO.getType()));
|
|
|
- //对类型进行筛选,已经添加过得类型不再显示
|
|
|
- if(!questionType.contains(QuestionTypeEnum.Symptom.getKey())){
|
|
|
- questionTypeDTO = new QuestionTypeDTO();
|
|
|
- questionTypeDTO.setType(QuestionTypeEnum.Symptom.getKey());
|
|
|
- questionTypeDTO.setTypeName(QuestionTypeEnum.getName(QuestionTypeEnum.Symptom.getKey()));
|
|
|
- questionTypeDTOS.add(questionTypeDTO);
|
|
|
- }
|
|
|
- if(!questionType.contains(QuestionTypeEnum.Lis.getKey())){
|
|
|
- questionTypeDTO = new QuestionTypeDTO();
|
|
|
- questionTypeDTO.setType(QuestionTypeEnum.Lis.getKey());
|
|
|
- questionTypeDTO.setTypeName(QuestionTypeEnum.getName(QuestionTypeEnum.Lis.getKey()));
|
|
|
- questionTypeDTOS.add(questionTypeDTO);
|
|
|
- }
|
|
|
- if(!questionType.contains(QuestionTypeEnum.Pacs.getKey())){
|
|
|
- questionTypeDTO = new QuestionTypeDTO();
|
|
|
- questionTypeDTO.setType(QuestionTypeEnum.Pacs.getKey());
|
|
|
- questionTypeDTO.setTypeName(QuestionTypeEnum.getName(QuestionTypeEnum.Pacs.getKey()));
|
|
|
- questionTypeDTOS.add(questionTypeDTO);
|
|
|
- }
|
|
|
- deptInfoDTO.setTypeDTOList(questionTypeDTOS);
|
|
|
- //对总体类型进行筛选,若该科室已经添加过疾病,化验,复检的常用标签,则该科室不再显示
|
|
|
- if(ListUtil.isNotEmpty(deptInfoDTO.getTypeDTOList())){
|
|
|
- deptInfoDTOS.add(deptInfoDTO);
|
|
|
- }
|
|
|
- }*/
|
|
|
return getDeptNameDTOS;
|
|
|
}
|
|
|
|