|
@@ -46,6 +46,7 @@ import com.diagbot.vo.KlConceptSaveSubVO;
|
|
|
import com.diagbot.vo.KlConceptSaveVO;
|
|
|
import com.diagbot.vo.KlLibraryInfoVO;
|
|
|
import com.diagbot.vo.SearchConceptVO;
|
|
|
+import com.diagbot.vo.SearchVO;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.google.common.collect.Maps;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -107,7 +108,6 @@ public class KlConceptFacade extends KlConceptServiceImpl {
|
|
|
@Autowired
|
|
|
KlTcmSyndromeFacade klTcmSyndromeFacade;
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* @param klConceptInfoVO
|
|
|
* @return
|
|
@@ -443,6 +443,12 @@ public class KlConceptFacade extends KlConceptServiceImpl {
|
|
|
return retList;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 根据类型和名称查找术语,名称和类型不能为空
|
|
|
+ *
|
|
|
+ * @param searchConceptVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
public List<GetAllForRelationDTO> searchConceptByNameAndLibType(SearchConceptVO searchConceptVO) {
|
|
|
List<GetAllForRelationDTO> getAllForRelationDTOS = Lists.newArrayList();
|
|
|
String name = searchConceptVO.getName();
|
|
@@ -469,6 +475,34 @@ public class KlConceptFacade extends KlConceptServiceImpl {
|
|
|
return getAllForRelationDTOS;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 根据类型和名称查找术语,名称可为空
|
|
|
+ *
|
|
|
+ * @param SearchVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<GetAllForRelationDTO> searchConceptByNameAndLibType(SearchVO SearchVO) {
|
|
|
+ List<GetAllForRelationDTO> getAllForRelationDTOS = Lists.newArrayList();
|
|
|
+ List<Long> excludedConceptIds = SearchVO.getExcludedConceptIds();
|
|
|
+ List<KlConcept> conceptList = this.list(new QueryWrapper<KlConcept>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("lib_type", SearchVO.getLibType())
|
|
|
+ .eq("status", StatusEnum.Enable.getKey())
|
|
|
+ .like(StringUtil.isNotBlank(SearchVO.getName()), "lib_name", SearchVO.getName())
|
|
|
+ .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;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 筛选符合类型的概念id
|
|
|
*
|