瀏覽代碼

知识图谱和大数据推送结果合并, 远程调用URL配置

louhr 6 年之前
父節點
當前提交
264dccebf5

+ 5 - 2
push-web/src/main/java/org/diagbot/push/controller/AlgorithmController.java

@@ -6,6 +6,7 @@ import org.diagbot.common.work.ResponseData;
 import org.diagbot.common.work.SearchData;
 import org.diagbot.graphWeb.work.GraphCalculate;
 import org.diagbot.pub.api.Response;
+import org.diagbot.pub.utils.PropertiesUtil;
 import org.diagbot.pub.utils.http.HttpApi;
 import org.diagbot.pub.web.BaseController;
 import org.springframework.stereotype.Controller;
@@ -52,16 +53,18 @@ public class AlgorithmController extends BaseController {
 
     public Response<ResponseData> algorithm(HttpServletRequest request, SearchData searchData) throws Exception {
         Response<ResponseData> response = new Response();
+
+        PropertiesUtil propertiesUtil = new PropertiesUtil("push.properties");
         //大数据推送
         HttpApi<Response> api = new HttpApi<Response>();
         // 根据hospitalCode从his获取所有疾病库信息
-        Response bigDataResponse = api.doPost("http://192.168.3.180:5001/bigdata-web/algorithm/neural", searchData,
+        Response bigDataResponse = api.doPost(propertiesUtil.getProperty("bigdata.http.url"), searchData,
                 Response.class);
         LinkedHashMap bigDataLinkedHashMap = (LinkedHashMap) bigDataResponse.getData();
         //转FeatureRate对象
         ResponseData bigDataResponseData = map2ResponseData(bigDataLinkedHashMap);
         //知识图谱推送
-        Response graphResponse = api.doPost("http://192.168.3.180:5003/graph-web/graph/push", searchData,
+        Response graphResponse = api.doPost(propertiesUtil.getProperty("graph.http.url"), searchData,
                 Response.class);
         LinkedHashMap graphLinkedHashMap = (LinkedHashMap) graphResponse.getData();
         //转FeatureRate对象

+ 2 - 0
push-web/src/main/resources/push.properties

@@ -0,0 +1,2 @@
+bigdata.http.url=http://192.168.3.180:5001/bigdata-web/algorithm/neural
+graph.http.url=http://192.168.3.180:5003/graph-web/graph/push

+ 4 - 4
push-web/src/main/resources/static/pages/algorithm/list.html

@@ -343,10 +343,10 @@
     function bayesPage(resourceType) {
         var diag = $("#diag_id").val();
         if (diag == '') {
-//            startDiag('/algorithm/page_neural', '#symptom_list', '1', resourceType, '11');
-//            startDiag('/algorithm/page_neural', '#vital_list', '3', resourceType, '31');
-//            startDiag('/algorithm/page_neural', '#lis_list', '4', resourceType, '41');
-//            startDiag('/algorithm/page_neural', '#pacs_list', '5', resourceType, '51');
+            startDiag('/algorithm/page_neural', '#symptom_list', '1', resourceType, '11');
+            startDiag('/algorithm/page_neural', '#vital_list', '3', resourceType, '31');
+            startDiag('/algorithm/page_neural', '#lis_list', '4', resourceType, '41');
+            startDiag('/algorithm/page_neural', '#pacs_list', '5', resourceType, '51');
 
             startDiagMapping('/algorithm/page_neural', '#diag_list', '2', resourceType, '21');
         } else {