Selaa lähdekoodia

警惕诊断接口修改

Zhaops 6 vuotta sitten
vanhempi
commit
8a440b6b2a

+ 4 - 0
icss-service/src/main/java/com/diagbot/client/BigDataServiceClient.java

@@ -1,5 +1,6 @@
 package com.diagbot.client;
 
+import com.diagbot.client.bean.GdbResponse;
 import com.diagbot.client.bean.Response;
 import com.diagbot.client.bean.ResponseData;
 import com.diagbot.client.bean.SearchData;
@@ -17,4 +18,7 @@ import org.springframework.web.bind.annotation.RequestBody;
 public interface BigDataServiceClient {
     @PostMapping(value = "/push-web/algorithm/neural")
     Response<ResponseData> bayesPageData(@RequestBody SearchData searchData);
+
+    @PostMapping(value = "/push-web/graph/highRisk")
+    Response<GdbResponse> highRiskPageData(@RequestBody SearchData searchData);
 }

+ 8 - 0
icss-service/src/main/java/com/diagbot/client/hystrix/BigDataServiceHystrix.java

@@ -1,11 +1,13 @@
 package com.diagbot.client.hystrix;
 
 import com.diagbot.client.BigDataServiceClient;
+import com.diagbot.client.bean.GdbResponse;
 import com.diagbot.client.bean.Response;
 import com.diagbot.client.bean.ResponseData;
 import com.diagbot.client.bean.SearchData;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
 
 /**
  * @Description:调用大数据对接层服务
@@ -20,4 +22,10 @@ public class BigDataServiceHystrix implements BigDataServiceClient {
         log.error("【hystrix】调用{}异常", "bayesPageData");
         return null;
     }
+
+    @Override
+    public Response<GdbResponse> highRiskPageData(@RequestBody SearchData searchData) {
+        log.error("【hystrix】调用{}异常", "highRiskPageData");
+        return null;
+    }
 }

+ 3 - 5
icss-service/src/main/java/com/diagbot/facade/PushFacade.java

@@ -63,8 +63,6 @@ public class PushFacade {
     @Autowired
     private TreatmentFacade treatmentFacade;
     @Autowired
-    private GraphServiceClient graphServiceClient;
-    @Autowired
     private LisMappingFacade lisMappingFacade;
     @Autowired
     private TranServiceClient tranServiceClient;
@@ -167,7 +165,7 @@ public class PushFacade {
     public PushDTO pushInner(PushVO pushVO, Integer mode) {
         PushDTO pushDTO = new PushDTO();
         SearchData Data = assembleData(pushVO);
-//        ResponseData data = pushAI(searchData);
+        //        ResponseData data = pushAI(searchData);
         ResponseData data = pushAipt(Data);
 
         String featureType = pushVO.getFeatureType();
@@ -230,7 +228,7 @@ public class PushFacade {
             highRiskMap.put("disease", String.join(",", diseaseNameList));
             SearchData searchData = new SearchData();
             searchData.setDiag(String.join(",", diseaseNameList));
-            Response<GdbResponse> graphRes = graphServiceClient.highRiskPageData(searchData);
+            Response<GdbResponse> graphRes = bigDataServiceClient.highRiskPageData(searchData);
             if (graphRes != null) {
                 Map<String, String> graphResult = graphRes.getData().getResult();
                 if (graphResult.size() > 0) {
@@ -602,7 +600,7 @@ public class PushFacade {
             //警惕
             searchData = new SearchData();
             searchData.setDiag(String.join(",", disNameList));
-            Response<GdbResponse> graphRes = graphServiceClient.highRiskPageData(searchData);
+            Response<GdbResponse> graphRes = bigDataServiceClient.highRiskPageData(searchData);
             Map<String, String> graphResult = graphRes.getData().getResult();
             if (graphResult.size() > 0) {
                 List<EMRQuestionDTO> highRiskDisList = Lists.newLinkedList();