Kaynağa Gözat

查询术语调用cdss-core

kongwz 3 yıl önce
ebeveyn
işleme
c343461d95

+ 5 - 16
cdssman-service/src/main/java/com/diagbot/client/CdssCoreClient.java

@@ -2,21 +2,7 @@ package com.diagbot.client;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.diagbot.client.hystrix.CdssCoreHystrix;
-import com.diagbot.dto.DiagnosesFindDTO;
-import com.diagbot.dto.DictionaryInfoDTO;
-import com.diagbot.dto.IndexBatchDTO;
-import com.diagbot.dto.IndicationDTO;
-import com.diagbot.dto.KlConceptStaticDTO;
-import com.diagbot.dto.KlDiagnoseInfoDTO;
-import com.diagbot.dto.KlDiagnoseTypeDTO;
-import com.diagbot.dto.KlRuleByIdParDTO;
-import com.diagbot.dto.KlRuleInfoDTO;
-import com.diagbot.dto.RegulationIndexDTO;
-import com.diagbot.dto.RespDTO;
-import com.diagbot.dto.RetrievalDTO;
-import com.diagbot.dto.StaticKnowledgeDTO;
-import com.diagbot.dto.StaticKnowledgeIndexDTO;
-import com.diagbot.dto.TermConceptDTO;
+import com.diagbot.dto.*;
 import com.diagbot.entity.KlRuleMenuWrapper;
 import com.diagbot.vo.*;
 import org.springframework.cloud.openfeign.FeignClient;
@@ -224,4 +210,7 @@ public interface CdssCoreClient {
     @PostMapping("/klRegulation/index")
     public RespDTO<List<RegulationIndexDTO>> index(@RequestBody RegulationIndexVO regulationIndexVO);
 
-}
+    @PostMapping("/klDisease/searchConcept")
+    RespDTO<List<GetAllForRelationDTO>> searchConcept(@Valid @RequestBody SearchConceptVO searchConceptVO);
+
+}

+ 8 - 16
cdssman-service/src/main/java/com/diagbot/client/hystrix/CdssCoreHystrix.java

@@ -2,21 +2,7 @@ package com.diagbot.client.hystrix;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.diagbot.client.CdssCoreClient;
-import com.diagbot.dto.DiagnosesFindDTO;
-import com.diagbot.dto.DictionaryInfoDTO;
-import com.diagbot.dto.IndexBatchDTO;
-import com.diagbot.dto.IndicationDTO;
-import com.diagbot.dto.KlConceptStaticDTO;
-import com.diagbot.dto.KlDiagnoseInfoDTO;
-import com.diagbot.dto.KlDiagnoseTypeDTO;
-import com.diagbot.dto.KlRuleByIdParDTO;
-import com.diagbot.dto.KlRuleInfoDTO;
-import com.diagbot.dto.RegulationIndexDTO;
-import com.diagbot.dto.RespDTO;
-import com.diagbot.dto.RetrievalDTO;
-import com.diagbot.dto.StaticKnowledgeDTO;
-import com.diagbot.dto.StaticKnowledgeIndexDTO;
-import com.diagbot.dto.TermConceptDTO;
+import com.diagbot.dto.*;
 import com.diagbot.entity.KlRuleMenuWrapper;
 import com.diagbot.vo.*;
 import lombok.extern.slf4j.Slf4j;
@@ -298,4 +284,10 @@ public class CdssCoreHystrix implements CdssCoreClient {
         log.error("【hystrix】调用{}异常", "index");
         return null;
     }
-}
+
+    @Override
+    public RespDTO<List<GetAllForRelationDTO>> searchConcept(@Valid SearchConceptVO searchConceptVO) {
+        log.error("【hystrix】调用{}异常", "searchConcept");
+        return null;
+    }
+}

+ 15 - 4
cdssman-service/src/main/java/com/diagbot/facade/KlConceptFacade.java

@@ -3,6 +3,7 @@ package com.diagbot.facade;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.client.CdssCoreClient;
 import com.diagbot.client.UserServiceClient;
 import com.diagbot.dto.GetAllForRelationDTO;
 import com.diagbot.dto.KlConceptAllDTO;
@@ -71,6 +72,8 @@ public class KlConceptFacade extends KlConceptServiceImpl {
     @Autowired
     private UserServiceClient userServiceClient;
     @Autowired
+    private CdssCoreClient cdssCoreClient;
+    @Autowired
     private KlLibraryInfoFacade klLibraryInfoFacade;
     @Autowired
     private KlConceptCommonFacade klConceptCommonFacade;
@@ -453,7 +456,10 @@ public class KlConceptFacade extends KlConceptServiceImpl {
      * @return
      */
     public List<GetAllForRelationDTO> searchConceptByNameAndLibType(SearchConceptVO searchConceptVO) {
-        List<GetAllForRelationDTO> getAllForRelationDTOS = Lists.newArrayList();
+        RespDTO<List<GetAllForRelationDTO>> relationDTORespDTO = cdssCoreClient.searchConcept(searchConceptVO);
+        RespDTOUtil.respNGDeal(relationDTORespDTO, "查询术语失败");
+        return relationDTORespDTO.data;
+        /*List<GetAllForRelationDTO> getAllForRelationDTOS = Lists.newArrayList();
         String name = searchConceptVO.getName();
         Integer libType = searchConceptVO.getLibType();
         List<Long> excludedConceptIds = searchConceptVO.getExcludedConceptIds();
@@ -475,7 +481,7 @@ public class KlConceptFacade extends KlConceptServiceImpl {
                 }).collect(Collectors.toList());
             }
         }
-        return getAllForRelationDTOS;
+        return getAllForRelationDTOS;*/
     }
 
     /**
@@ -485,7 +491,12 @@ public class KlConceptFacade extends KlConceptServiceImpl {
      * @return
      */
     public List<GetAllForRelationDTO> searchConceptByNameAndLibType(SearchVO SearchVO) {
-        List<GetAllForRelationDTO> getAllForRelationDTOS = Lists.newArrayList();
+        SearchConceptVO searchConceptVO = new SearchConceptVO();
+        BeanUtil.copyProperties(SearchVO,searchConceptVO);
+        RespDTO<List<GetAllForRelationDTO>> relationDTORespDTO = cdssCoreClient.searchConcept(searchConceptVO);
+        RespDTOUtil.respNGDeal(relationDTORespDTO, "查询术语失败");
+        return relationDTORespDTO.data;
+        /*List<GetAllForRelationDTO> getAllForRelationDTOS = Lists.newArrayList();
         List<Long> excludedConceptIds = SearchVO.getExcludedConceptIds();
         List<KlConcept> conceptList = this.list(new QueryWrapper<KlConcept>()
                 .eq("is_deleted", IsDeleteEnum.N.getKey())
@@ -503,7 +514,7 @@ public class KlConceptFacade extends KlConceptServiceImpl {
                 return getAllForRelationDTO;
             }).collect(Collectors.toList());
         }
-        return getAllForRelationDTOS;
+        return getAllForRelationDTOS;*/
     }
 
     /**