|
@@ -4,17 +4,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.diagbot.dto.GetAllForRelationDTO;
|
|
|
import com.diagbot.dto.IndexBatchDTO;
|
|
|
import com.diagbot.dto.KllisDetailDTO;
|
|
|
-import com.diagbot.entity.KlConcept;
|
|
|
-import com.diagbot.entity.KlDisease;
|
|
|
-import com.diagbot.entity.KlLibraryInfo;
|
|
|
-import com.diagbot.entity.KlOperation;
|
|
|
-import com.diagbot.entity.TcmDisease;
|
|
|
-import com.diagbot.entity.TcmSyndrome;
|
|
|
-import com.diagbot.enums.ConceptTypeEnum;
|
|
|
-import com.diagbot.enums.IsDeleteEnum;
|
|
|
-import com.diagbot.enums.LexiconEnum;
|
|
|
-import com.diagbot.enums.MatchSourceEnum;
|
|
|
-import com.diagbot.enums.StatusEnum;
|
|
|
+import com.diagbot.entity.*;
|
|
|
+import com.diagbot.enums.*;
|
|
|
import com.diagbot.service.impl.KlConceptServiceImpl;
|
|
|
import com.diagbot.util.EntityUtil;
|
|
|
import com.diagbot.util.ListUtil;
|
|
@@ -398,22 +389,27 @@ public class KlConceptFacade extends KlConceptServiceImpl {
|
|
|
Integer libType = searchConceptVO.getLibType();
|
|
|
List<Long> excludedConceptIds = searchConceptVO.getExcludedConceptIds();
|
|
|
if (StringUtils.isNotBlank(name) && libType != null) {
|
|
|
- List<KlConcept> conceptList = this.list(new QueryWrapper<KlConcept>()
|
|
|
- .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .like(StringUtil.isNotBlank(name), "lib_name", name.trim())
|
|
|
- .eq("lib_type", libType)
|
|
|
- .eq("status", StatusEnum.Enable.getKey())
|
|
|
- .notIn(ListUtil.isNotEmpty(excludedConceptIds), "id", excludedConceptIds));
|
|
|
- if (ListUtil.isNotEmpty(conceptList)) {
|
|
|
- getAllForRelationDTOS = conceptList.stream().map(x -> {
|
|
|
- GetAllForRelationDTO getAllForRelationDTO = new GetAllForRelationDTO();
|
|
|
- getAllForRelationDTO.setConceptNameType(x.getLibName());
|
|
|
- getAllForRelationDTO.setConceptName(x.getLibName());
|
|
|
- getAllForRelationDTO.setConceptId(x.getId());
|
|
|
- getAllForRelationDTO.setLibType(x.getLibType());
|
|
|
- return getAllForRelationDTO;
|
|
|
- }).collect(Collectors.toList());
|
|
|
+ if(libType >= 308 && libType <= 328){
|
|
|
+ getAllForRelationDTOS = this.searchByTypeAndName(searchConceptVO);
|
|
|
+ }else {
|
|
|
+ List<KlConcept> conceptList = this.list(new QueryWrapper<KlConcept>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .like(StringUtil.isNotBlank(name), "lib_name", name.trim())
|
|
|
+ .eq("lib_type", libType)
|
|
|
+ .eq("status", StatusEnum.Enable.getKey())
|
|
|
+ .notIn(ListUtil.isNotEmpty(excludedConceptIds), "id", excludedConceptIds));
|
|
|
+ if (ListUtil.isNotEmpty(conceptList)) {
|
|
|
+ getAllForRelationDTOS = conceptList.stream().map(x -> {
|
|
|
+ GetAllForRelationDTO getAllForRelationDTO = new GetAllForRelationDTO();
|
|
|
+ getAllForRelationDTO.setConceptNameType(x.getLibName());
|
|
|
+ getAllForRelationDTO.setConceptName(x.getLibName());
|
|
|
+ getAllForRelationDTO.setConceptId(x.getId());
|
|
|
+ getAllForRelationDTO.setLibType(x.getLibType());
|
|
|
+ return getAllForRelationDTO;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
return getAllForRelationDTOS;
|
|
|
}
|
|
@@ -423,4 +419,6 @@ public class KlConceptFacade extends KlConceptServiceImpl {
|
|
|
Map<String, KllisDetailDTO> res = EntityUtil.makeEntityMap(list, "libName");
|
|
|
return res;
|
|
|
}
|
|
|
-}
|
|
|
+
|
|
|
+
|
|
|
+}
|