Browse Source

在集合业务中,搜索术语

kongwz 3 years ago
parent
commit
16933f9b81

+ 3 - 0
cdssman-service/src/main/java/com/diagbot/client/CdssCoreClient.java

@@ -221,4 +221,7 @@ public interface CdssCoreClient {
     @PostMapping("/klDisease/searchConceptRuleClass")
     RespDTO<List<GetAllForRelationDTO>> searchConceptRuleClass(@Valid @RequestBody SearchConceptVO searchConceptVO);
 
+    //在集合业务中,搜索术语
+    @PostMapping("/klDisease/searchCollectionConceptVO")
+    RespDTO<List<GetAllForRelationDTO>> searchCollectionConcept(SearchCollectionConceptVO searchCollectionConceptVO);
 }

+ 6 - 0
cdssman-service/src/main/java/com/diagbot/client/hystrix/CdssCoreHystrix.java

@@ -302,4 +302,10 @@ public class CdssCoreHystrix implements CdssCoreClient {
         log.error("【hystrix】调用{}异常", "searchConceptRuleClass");
         return null;
     }
+
+    @Override
+    public RespDTO<List<GetAllForRelationDTO>> searchCollectionConcept(SearchCollectionConceptVO searchCollectionConceptVO) {
+        log.error("【hystrix】调用{}异常", "searchConceptRuleClass");
+        return null;
+    }
 }

+ 7 - 11
cdssman-service/src/main/java/com/diagbot/facade/KlConceptFacade.java

@@ -38,17 +38,7 @@ import com.diagbot.util.ListUtil;
 import com.diagbot.util.RespDTOUtil;
 import com.diagbot.util.StringUtil;
 import com.diagbot.util.UserUtils;
-import com.diagbot.vo.ConceptRelationVO;
-import com.diagbot.vo.GetAllForRelationVO;
-import com.diagbot.vo.KlConceptAllVO;
-import com.diagbot.vo.KlConceptClearVO;
-import com.diagbot.vo.KlConceptInfoVO;
-import com.diagbot.vo.KlConceptSatarOrdisaVO;
-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.diagbot.vo.*;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import org.apache.commons.lang3.StringUtils;
@@ -693,4 +683,10 @@ public class KlConceptFacade extends KlConceptServiceImpl {
         param.setPerson(person);
         return param;
     }
+
+    public List<GetAllForRelationDTO> searchCollectionConceptFac(SearchCollectionConceptVO searchCollectionConceptVO) {
+        RespDTO<List<GetAllForRelationDTO>> relationDTORespDTO = cdssCoreClient.searchCollectionConcept(searchCollectionConceptVO);
+        RespDTOUtil.respNGDeal(relationDTORespDTO, "在集合业务中,搜索术语失败");
+        return relationDTORespDTO.data;
+    }
 }

+ 49 - 0
cdssman-service/src/main/java/com/diagbot/vo/SearchCollectionConceptVO.java

@@ -0,0 +1,49 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * @className: com.diagbot.vo-> SearchCollectionConceptVO
+ * @description: 在集合业务中,搜索术语
+ * @author: kongwz
+ * @createDate: 2021-08-18 16:07
+ * @version: 1.0
+ * @todo:
+ */
+@Setter
+@Getter
+public class SearchCollectionConceptVO {
+    /**
+     * 词性id
+     */
+    @ApiModelProperty(value="词性id")
+    @NotNull(message ="请输入搜索词的词性" )
+    private Integer libType;
+    /**
+     * 需要排除的概念id集合
+     */
+    @ApiModelProperty(value="需要排除的概念id集合")
+    private List<Long> excludedConceptIds;
+
+    @ApiModelProperty(value="搜索关键词")
+    private List<String> names;
+
+    @ApiModelProperty(value="逻辑运算符")
+    @NotNull(message ="请输入逻辑运算符" )
+    private Integer logicalOperator;
+
+    @Override
+    public String toString() {
+        return "SearchCollectionConceptVO{" +
+                "libType=" + libType +
+                ", excludedConceptIds=" + excludedConceptIds +
+                ", names=" + names +
+                ", logicalOperator=" + logicalOperator +
+                '}';
+    }
+}

+ 12 - 0
cdssman-service/src/main/java/com/diagbot/web/KlDiseaseController.java

@@ -132,4 +132,16 @@ public class KlDiseaseController {
         return RespDTO.onSuc(getAllForRelationDTOS);
     }
 
+    @ApiOperation(value = "在集合业务中,搜索术语[by:kongwz]",
+            notes = "names: 搜索关键词集合<br>" +
+                    "libType: 查询术语的词性<br>" +
+                    "excludedConceptIds: 需要排除的概念id集合<br>" +
+                    "logicalOperator: 逻辑运算符 0:and 1:or")
+    @PostMapping("/searchCollectionConceptVO")
+    @SysLogger("searchCollectionConceptVO")
+    public RespDTO<List<GetAllForRelationDTO>> searchCollectionConcept(@Valid @RequestBody SearchCollectionConceptVO searchCollectionConceptVO) {
+        List<GetAllForRelationDTO> getAllForRelationDTOS = klConceptFacade.searchCollectionConceptFac(searchCollectionConceptVO);
+        return RespDTO.onSuc(getAllForRelationDTOS);
+    }
+
 }