|
@@ -6,6 +6,7 @@ import com.diagbot.client.UserServiceClient;
|
|
import com.diagbot.dto.DeptInfoDTO;
|
|
import com.diagbot.dto.DeptInfoDTO;
|
|
import com.diagbot.dto.GetDeptInfoDTO;
|
|
import com.diagbot.dto.GetDeptInfoDTO;
|
|
import com.diagbot.dto.GetQuestionUsualAndTypeDTO;
|
|
import com.diagbot.dto.GetQuestionUsualAndTypeDTO;
|
|
|
|
+import com.diagbot.dto.QuestionTypeDTO;
|
|
import com.diagbot.dto.RespDTO;
|
|
import com.diagbot.dto.RespDTO;
|
|
import com.diagbot.entity.DeptInfo;
|
|
import com.diagbot.entity.DeptInfo;
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
@@ -159,12 +160,13 @@ public class DeptInfoFacade extends DeptInfoServiceImpl {
|
|
getQuestionUsualAndTypeVO.setDeptIds(deptIds);
|
|
getQuestionUsualAndTypeVO.setDeptIds(deptIds);
|
|
List<GetQuestionUsualAndTypeDTO> getQuestionUsualAndTypeDTOS = questionUsualFacade.getQuestionUsualByDeptIds(getQuestionUsualAndTypeVO);
|
|
List<GetQuestionUsualAndTypeDTO> getQuestionUsualAndTypeDTOS = questionUsualFacade.getQuestionUsualByDeptIds(getQuestionUsualAndTypeVO);
|
|
List<GetQuestionUsualAndTypeDTO> questionUsuals = new ArrayList<>();
|
|
List<GetQuestionUsualAndTypeDTO> questionUsuals = new ArrayList<>();
|
|
- List<Integer> typeList = new ArrayList<>();
|
|
|
|
List<DeptInfoDTO> deptInfoDTOS = new ArrayList<>();
|
|
List<DeptInfoDTO> deptInfoDTOS = new ArrayList<>();
|
|
|
|
+ List<QuestionTypeDTO> questionTypeDTOS = new ArrayList<>();
|
|
|
|
+ QuestionTypeDTO questionTypeDTO = null;
|
|
//将标签明细放入科室信息中,并排除类型
|
|
//将标签明细放入科室信息中,并排除类型
|
|
for (DeptInfoDTO deptInfoDTO : deptInfoDTOList) {
|
|
for (DeptInfoDTO deptInfoDTO : deptInfoDTOList) {
|
|
- typeList = new ArrayList<>();
|
|
|
|
questionUsuals = new ArrayList<>();
|
|
questionUsuals = new ArrayList<>();
|
|
|
|
+ questionTypeDTOS = new ArrayList<>();
|
|
for (GetQuestionUsualAndTypeDTO getQuestionUsualAndTypeDTO : getQuestionUsualAndTypeDTOS) {
|
|
for (GetQuestionUsualAndTypeDTO getQuestionUsualAndTypeDTO : getQuestionUsualAndTypeDTOS) {
|
|
if (deptInfoDTO.getId().intValue() == getQuestionUsualAndTypeDTO.getDeptId().intValue()){
|
|
if (deptInfoDTO.getId().intValue() == getQuestionUsualAndTypeDTO.getDeptId().intValue()){
|
|
questionUsuals.add(getQuestionUsualAndTypeDTO);
|
|
questionUsuals.add(getQuestionUsualAndTypeDTO);
|
|
@@ -175,17 +177,26 @@ public class DeptInfoFacade extends DeptInfoServiceImpl {
|
|
deptInfoDTO.getQuestionUsuals().forEach(getQuestionUsualAndTypeDTO -> questionType.add(getQuestionUsualAndTypeDTO.getType()));
|
|
deptInfoDTO.getQuestionUsuals().forEach(getQuestionUsualAndTypeDTO -> questionType.add(getQuestionUsualAndTypeDTO.getType()));
|
|
//对类型进行筛选,已经添加过得类型不再显示
|
|
//对类型进行筛选,已经添加过得类型不再显示
|
|
if(!questionType.contains(QuestionTypeEnum.Symptom.getKey())){
|
|
if(!questionType.contains(QuestionTypeEnum.Symptom.getKey())){
|
|
- typeList.add(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())){
|
|
if(!questionType.contains(QuestionTypeEnum.Lis.getKey())){
|
|
- typeList.add(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())){
|
|
if(!questionType.contains(QuestionTypeEnum.Pacs.getKey())){
|
|
- typeList.add(QuestionTypeEnum.Pacs.getKey());
|
|
|
|
|
|
+ questionTypeDTO = new QuestionTypeDTO();
|
|
|
|
+ questionTypeDTO.setType(QuestionTypeEnum.Pacs.getKey());
|
|
|
|
+ questionTypeDTO.setTypeName(QuestionTypeEnum.getName(QuestionTypeEnum.Pacs.getKey()));
|
|
|
|
+ questionTypeDTOS.add(questionTypeDTO);
|
|
}
|
|
}
|
|
- deptInfoDTO.setType(typeList);
|
|
|
|
|
|
+ deptInfoDTO.setTypeDTOList(questionTypeDTOS);
|
|
//对总体类型进行筛选,若该科室已经添加过疾病,化验,复检的常用标签,则该科室不再显示
|
|
//对总体类型进行筛选,若该科室已经添加过疾病,化验,复检的常用标签,则该科室不再显示
|
|
- if(ListUtil.isNotEmpty(deptInfoDTO.getType())){
|
|
|
|
|
|
+ if(ListUtil.isNotEmpty(deptInfoDTO.getTypeDTOList())){
|
|
deptInfoDTOS.add(deptInfoDTO);
|
|
deptInfoDTOS.add(deptInfoDTO);
|
|
}
|
|
}
|
|
}
|
|
}
|