|
@@ -50,14 +50,10 @@ public class RetrievalFacade {
|
|
|
List<String> questionNames = new ArrayList<>();
|
|
|
if (ListUtil.isNotEmpty(conceptInfos.data)) {
|
|
|
for (ConceptRetrievalDTO conceptRetrievalDTO : conceptInfos.data) {
|
|
|
- if (!questionNames.contains(conceptRetrievalDTO.getSameName())
|
|
|
+ if (!questionNames.contains(conceptRetrievalDTO.getSelfName())
|
|
|
&& conceptRetrievalDTO.getSelfName() != null) {
|
|
|
questionNames.add(conceptRetrievalDTO.getSelfName());
|
|
|
}
|
|
|
- if (!questionNames.contains(conceptRetrievalDTO.getParentName())
|
|
|
- && conceptRetrievalDTO.getParentName() != null) {
|
|
|
- questionNames.add(conceptRetrievalDTO.getParentName());
|
|
|
- }
|
|
|
}
|
|
|
QueryWrapper<QuestionInfo> questionInfoQueryWrapper = new QueryWrapper<>();
|
|
|
questionInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
@@ -73,17 +69,8 @@ public class RetrievalFacade {
|
|
|
retrievalDTO = new RetrievalDTO();
|
|
|
retrievalDTO.setConceptId(conceptRetrievalDTO.getSelfId());
|
|
|
retrievalDTO.setName(conceptRetrievalDTO.getSelfName());
|
|
|
- if (StringUtil.isNotEmpty(conceptRetrievalDTO.getParentName())) {//parent不为空时说明有子项,返回父级id
|
|
|
- if (null != questionInfoMap.get(conceptRetrievalDTO.getParentName())) {//如果匹配到就添加questionId
|
|
|
- retrievalDTO.setQuestionId(questionInfoMap.get(conceptRetrievalDTO.getParentName()).getId());
|
|
|
- }
|
|
|
- retrievalDTO.setConceptId(conceptRetrievalDTO.getParentId());
|
|
|
- retrievalDTO.setName(conceptRetrievalDTO.getParentName());
|
|
|
- retrievalDTO.setRetrievalName(conceptRetrievalDTO.getSelfName());
|
|
|
- } else {//parent为空时说明没有子项返回本体id
|
|
|
- if (null != questionInfoMap.get(conceptRetrievalDTO.getSelfName())) {//如果匹配到就添加questionId
|
|
|
- retrievalDTO.setQuestionId(questionInfoMap.get(conceptRetrievalDTO.getSelfName()).getId());
|
|
|
- }
|
|
|
+ if (null != questionInfoMap.get(conceptRetrievalDTO.getSelfName())) {//如果匹配到就添加questionId
|
|
|
+ retrievalDTO.setQuestionId(questionInfoMap.get(conceptRetrievalDTO.getSelfName()).getId());
|
|
|
}
|
|
|
if (StringUtil.isNotEmpty(conceptRetrievalDTO.getSameName())) {//同义词
|
|
|
retrievalDTO.setRetrievalName(conceptRetrievalDTO.getSameName());
|
|
@@ -100,9 +87,7 @@ public class RetrievalFacade {
|
|
|
while (retrievalDTOIterator.hasNext()) {
|
|
|
RetrievalDTO retrievalDTO = new RetrievalDTO();
|
|
|
retrievalDTO = retrievalDTOIterator.next();
|
|
|
- if (retrievalDTO.getQuestionId() == null
|
|
|
- && retrievalDTO.getType().intValue() != QuestionTypeEnum.Pacs.getKey()
|
|
|
- && retrievalDTO.getType().intValue() != QuestionTypeEnum.Disease.getKey()) {
|
|
|
+ if (retrievalDTO.getQuestionId() == null) {
|
|
|
retrievalDTOIterator.remove();
|
|
|
}
|
|
|
}
|