Browse Source

计算接口

Zhaops 6 năm trước cách đây
mục cha
commit
f909b0a180

+ 1 - 2
aipt-service/src/main/java/com/diagbot/client/AIServiceClient.java

@@ -1,6 +1,5 @@
 package com.diagbot.client;
 
-import com.alibaba.fastjson.JSONObject;
 import com.diagbot.client.bean.CalculateData;
 import com.diagbot.client.bean.GdbResponse;
 import com.diagbot.client.bean.Response;
@@ -30,5 +29,5 @@ public interface AIServiceClient {
     Response<GdbResponse> highRiskPageData(@RequestBody SearchVo searchVo);
 
     @PostMapping(value = "/push-web/graph/scaleCalc")
-    Response<Map<String, Object>> scaleCalc(@RequestBody CalculateData calculateData);
+    Map<String, Object> scaleCalc(@RequestBody CalculateData calculateData);
 }

+ 1 - 2
aipt-service/src/main/java/com/diagbot/client/hystrix/AIServiceHystrix.java

@@ -1,6 +1,5 @@
 package com.diagbot.client.hystrix;
 
-import com.alibaba.fastjson.JSONObject;
 import com.diagbot.client.AIServiceClient;
 import com.diagbot.client.bean.CalculateData;
 import com.diagbot.client.bean.GdbResponse;
@@ -40,7 +39,7 @@ public class AIServiceHystrix implements AIServiceClient {
     }
 
     @Override
-    public Response<Map<String, Object>> scaleCalc(@RequestBody CalculateData calculateData) {
+    public Map<String, Object> scaleCalc(@RequestBody CalculateData calculateData) {
         log.error("【hystrix】调用{}异常", "scaleCalc");
         return null;
     }

+ 4 - 5
aipt-service/src/main/java/com/diagbot/facade/ClinicalFacade.java

@@ -14,7 +14,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 import org.springframework.web.bind.annotation.RequestBody;
 
-import javax.print.attribute.standard.MediaSize;
 import java.util.List;
 import java.util.Map;
 
@@ -119,15 +118,15 @@ public class ClinicalFacade {
 
     /**
      * 计算接口
+     *
      * @param calculateData
      * @return
      */
     public Map<String, Object> scaleCalc(CalculateData calculateData) {
-        Response<Map<String, Object>> response = aiServiceClient.scaleCalc(calculateData);
-        if (response == null || response.getData() == null) {
+        Map<String, Object> response = aiServiceClient.scaleCalc(calculateData);
+        if (response == null) {
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "计算没有返回结构");
         }
-
-        return response.getData();
+        return response;
     }
 }

+ 0 - 2
icss-service/src/main/java/com/diagbot/facade/CalculateFacade.java

@@ -2,8 +2,6 @@ package com.diagbot.facade;
 
 import com.diagbot.client.AiptServiceClient;
 import com.diagbot.client.bean.Response;
-import com.diagbot.dto.CalculateDTO;
-import com.diagbot.dto.RespDTO;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
 import com.diagbot.vo.CalculateVO;