|
@@ -2,6 +2,7 @@ package com.diagbot.facade;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
+import com.diagbot.client.AiptServiceClient;
|
|
import com.diagbot.client.BigDataServiceClient;
|
|
import com.diagbot.client.BigDataServiceClient;
|
|
import com.diagbot.client.TranServiceClient;
|
|
import com.diagbot.client.TranServiceClient;
|
|
import com.diagbot.client.bean.FeatureRate;
|
|
import com.diagbot.client.bean.FeatureRate;
|
|
@@ -84,6 +85,8 @@ public class PushFacade {
|
|
private EvaluationModuleMappingFacade evaluationModuleMappingFacade;
|
|
private EvaluationModuleMappingFacade evaluationModuleMappingFacade;
|
|
@Autowired
|
|
@Autowired
|
|
private TranServiceClient tranServiceClient;
|
|
private TranServiceClient tranServiceClient;
|
|
|
|
+ @Autowired
|
|
|
|
+ private AiptServiceClient aiptServiceClient;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 拼装数据
|
|
* 拼装数据
|
|
@@ -163,6 +166,20 @@ public class PushFacade {
|
|
return res.getData();
|
|
return res.getData();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 中间层接口
|
|
|
|
+ *
|
|
|
|
+ * @param searchData
|
|
|
|
+ * @return ResponseData
|
|
|
|
+ */
|
|
|
|
+ public ResponseData pushAipt(SearchData searchData) {
|
|
|
|
+ Response<ResponseData> res = aiptServiceClient.aiptData(searchData);
|
|
|
|
+ if (null == res || null == res.getData()) {
|
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "中间层没有返回结果");
|
|
|
|
+ }
|
|
|
|
+ return res.getData();
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 推理接口
|
|
* 推理接口
|
|
*
|
|
*
|
|
@@ -171,7 +188,9 @@ public class PushFacade {
|
|
*/
|
|
*/
|
|
public PushDTO pushInner(PushVO pushVO, Integer mode) {
|
|
public PushDTO pushInner(PushVO pushVO, Integer mode) {
|
|
PushDTO pushDTO = new PushDTO();
|
|
PushDTO pushDTO = new PushDTO();
|
|
- ResponseData data = pushAI(pushVO);
|
|
|
|
|
|
+ SearchData Data = assembleData(pushVO);
|
|
|
|
+ ResponseData data = pushAipt(Data);
|
|
|
|
+
|
|
//大数据返回内容
|
|
//大数据返回内容
|
|
List<FeatureRate> dis = data.getDis();
|
|
List<FeatureRate> dis = data.getDis();
|
|
|
|
|
|
@@ -402,6 +421,7 @@ public class PushFacade {
|
|
return pushDTO;
|
|
return pushDTO;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 获取返回结果标签
|
|
* 获取返回结果标签
|
|
*
|
|
*
|
|
@@ -469,7 +489,8 @@ public class PushFacade {
|
|
}
|
|
}
|
|
pushVO.setLis(lisResultVOList);
|
|
pushVO.setLis(lisResultVOList);
|
|
|
|
|
|
- ResponseData responseData = pushAI(pushVO);
|
|
|
|
|
|
+ SearchData searchData = assembleData(pushVO);
|
|
|
|
+ ResponseData responseData = pushAI(searchData);
|
|
PushKYJDTO pushKYJDTO = new PushKYJDTO();
|
|
PushKYJDTO pushKYJDTO = new PushKYJDTO();
|
|
pushKYJDTO.setLabs(responseData.getLabs());
|
|
pushKYJDTO.setLabs(responseData.getLabs());
|
|
pushKYJDTO.setDis(responseData.getDis());
|
|
pushKYJDTO.setDis(responseData.getDis());
|
|
@@ -583,7 +604,7 @@ public class PushFacade {
|
|
questionVO.setSexType(pushVO.getSex());
|
|
questionVO.setSexType(pushVO.getSex());
|
|
questionVO.setId(deptVital.getVitalId());
|
|
questionVO.setId(deptVital.getVitalId());
|
|
QuestionDTO questionDTO = questionFacade.getById(questionVO);
|
|
QuestionDTO questionDTO = questionFacade.getById(questionVO);
|
|
- if (questionDTO != null) {
|
|
|
|
|
|
+ if (questionDTO != null && questionDTO.getId() != null) {
|
|
vitalDTO.add(questionDTO);
|
|
vitalDTO.add(questionDTO);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -626,7 +647,9 @@ public class PushFacade {
|
|
}
|
|
}
|
|
pushVO.setLis(lisResultVOList);
|
|
pushVO.setLis(lisResultVOList);
|
|
}
|
|
}
|
|
- ResponseData data = pushAI(pushVO);
|
|
|
|
|
|
+
|
|
|
|
+ SearchData searchData = assembleData(pushVO);
|
|
|
|
+ ResponseData data = pushAI(searchData);
|
|
String featureType = pushVO.getFeatureType();
|
|
String featureType = pushVO.getFeatureType();
|
|
String[] featureTypes = featureType.split(",|,");
|
|
String[] featureTypes = featureType.split(",|,");
|
|
Set<String> featureTypeSet = new HashSet(Arrays.asList(featureTypes));
|
|
Set<String> featureTypeSet = new HashSet(Arrays.asList(featureTypes));
|
|
@@ -705,7 +728,7 @@ public class PushFacade {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//警惕
|
|
//警惕
|
|
- SearchData searchData = new SearchData();
|
|
|
|
|
|
+ searchData = new SearchData();
|
|
searchData.setDiag(String.join(",", disNameList));
|
|
searchData.setDiag(String.join(",", disNameList));
|
|
Response<GdbResponse> graphRes = bigDataServiceClient.highRiskPageData(searchData);
|
|
Response<GdbResponse> graphRes = bigDataServiceClient.highRiskPageData(searchData);
|
|
Map<String, String> graphResult = graphRes.getData().getResult();
|
|
Map<String, String> graphResult = graphRes.getData().getResult();
|