|
@@ -1,6 +1,10 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
+import com.diagbot.client.AIServiceClient;
|
|
|
+import com.diagbot.client.bean.Response;
|
|
|
+import com.diagbot.client.bean.ResponseData;
|
|
|
import com.diagbot.dto.LisResult;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import com.diagbot.vo.SearchVo;
|
|
@@ -19,6 +23,9 @@ import java.util.List;
|
|
|
@Component
|
|
|
public class ClinicalFacade {
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private AIServiceClient aiServiceClient;
|
|
|
+
|
|
|
private static String up = "增高";
|
|
|
private static String down = "降低";
|
|
|
private static String normal = "正常";
|
|
@@ -30,14 +37,16 @@ public class ClinicalFacade {
|
|
|
* 处理临床数据
|
|
|
*
|
|
|
* @param searchVo
|
|
|
- * @return SearchVo
|
|
|
+ * @return ResponseData
|
|
|
*/
|
|
|
- public SearchVo processClinicalData(@RequestBody SearchVo searchVo) {
|
|
|
+ public ResponseData processClinicalData(@RequestBody SearchVo searchVo) {
|
|
|
SearchVo sData = searchVo;
|
|
|
|
|
|
sData.setLisArr(processLis(sData.getLisArr()));
|
|
|
|
|
|
- return sData;
|
|
|
+ Response<ResponseData> res = aiServiceClient.bayesPageData(sData);
|
|
|
+
|
|
|
+ return res.getData();
|
|
|
}
|
|
|
|
|
|
private List<LisResult> processLis(List<LisResult> lisArr) {
|