|
@@ -3,15 +3,12 @@ package com.diagbot.facade;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.diagbot.client.UserServiceClient;
|
|
|
-import com.diagbot.dto.DeptInfoDTO;
|
|
|
import com.diagbot.dto.GetDeptInfoDTO;
|
|
|
import com.diagbot.dto.GetQuestionUsualAndTypeDTO;
|
|
|
-import com.diagbot.dto.QuestionTypeDTO;
|
|
|
import com.diagbot.dto.RespDTO;
|
|
|
import com.diagbot.entity.DeptInfo;
|
|
|
import com.diagbot.entity.QuestionUsual;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
-import com.diagbot.enums.QuestionTypeEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
|
import com.diagbot.service.impl.DeptInfoServiceImpl;
|
|
@@ -32,6 +29,7 @@ import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* @Description:
|
|
@@ -173,8 +171,16 @@ public class DeptInfoFacade extends DeptInfoServiceImpl {
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
- public List<DeptInfoDTO> getAllDeptInfo() {
|
|
|
- //查询所有科室
|
|
|
+ public List<DeptInfo> getAllDeptInfo(GetQuestionUsualAndTypeVO getQuestionUsualAndTypeVO) {
|
|
|
+ //查询当前类型已经添加过得常用标签所关联的科室
|
|
|
+ List<GetQuestionUsualAndTypeDTO> getQuestionUsualAndTypeDTOS = questionUsualFacade.getQuestionUsualByDeptIds(getQuestionUsualAndTypeVO);
|
|
|
+ List<Long> deptIds = getQuestionUsualAndTypeDTOS.stream().map(getQuestionUsualAndTypeDTO -> getQuestionUsualAndTypeDTO.getDeptId()).collect(Collectors.toList());
|
|
|
+ //查询科室信息过滤掉已经添加过得科室
|
|
|
+ QueryWrapper<DeptInfo> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq("is_deleted",IsDeleteEnum.N.getKey())
|
|
|
+ .notIn("id",deptIds);
|
|
|
+ List<DeptInfo> deptInfoList = this.list(queryWrapper);
|
|
|
+ /*//查询所有科室
|
|
|
QueryWrapper<DeptInfo> queryWrapper = new QueryWrapper<>();
|
|
|
queryWrapper.eq("is_deleted",IsDeleteEnum.N.getKey());
|
|
|
List<DeptInfo> deptInfoList = this.list(queryWrapper);
|
|
@@ -225,8 +231,8 @@ public class DeptInfoFacade extends DeptInfoServiceImpl {
|
|
|
if(ListUtil.isNotEmpty(deptInfoDTO.getTypeDTOList())){
|
|
|
deptInfoDTOS.add(deptInfoDTO);
|
|
|
}
|
|
|
- }
|
|
|
- return deptInfoDTOS;
|
|
|
+ }*/
|
|
|
+ return deptInfoList;
|
|
|
}
|
|
|
|
|
|
/**
|