Selaa lähdekoodia

知识图谱和大数据推送结果合并, 进入调试

louhr 6 vuotta sitten
vanhempi
commit
f3c379d860

+ 2 - 12
bigdata-web/pom.xml

@@ -96,19 +96,9 @@
 
 	<build>
 		<plugins>
-			<!--<plugin>-->
-				<!--<groupId>org.springframework.boot</groupId>-->
-				<!--<artifactId>spring-boot-maven-plugin</artifactId>-->
-			<!--</plugin>-->
 			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-compiler-plugin</artifactId>
-				<version>3.8.0</version>
-				<configuration>
-					<compilerVersion>1.8</compilerVersion>
-					<source>1.8</source>
-					<target>1.8</target>
-				</configuration>
+				<groupId>org.springframework.boot</groupId>
+				<artifactId>spring-boot-maven-plugin</artifactId>
 			</plugin>
 		</plugins>
 

+ 2 - 12
graph-web/pom.xml

@@ -69,19 +69,9 @@
 
 	<build>
 		<plugins>
-			<!--<plugin>-->
-				<!--<groupId>org.springframework.boot</groupId>-->
-				<!--<artifactId>spring-boot-maven-plugin</artifactId>-->
-			<!--</plugin>-->
 			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-compiler-plugin</artifactId>
-				<version>3.8.0</version>
-				<configuration>
-					<compilerVersion>1.8</compilerVersion>
-					<source>1.8</source>
-					<target>1.8</target>
-				</configuration>
+				<groupId>org.springframework.boot</groupId>
+				<artifactId>spring-boot-maven-plugin</artifactId>
 			</plugin>
 		</plugins>
 

+ 2 - 2
public/src/main/java/org/diagbot/pub/utils/http/HttpApi.java

@@ -49,7 +49,7 @@ public class HttpApi<T> {
 			HttpPost httppost = new HttpPost(httpUrl);
 			if (obj != null) {
 				String post = mapper.toJson(obj);
-				log.info("开始发起远程请求Param String:" + post);
+//				log.info("开始发起远程请求Param String:" + post);
 				StringEntity se = new StringEntity(post, HTTP.UTF_8);
 				se.setContentType("application/json");
 				se.setContentEncoding("utf-8");
@@ -60,7 +60,7 @@ public class HttpApi<T> {
 			int code = response.getStatusLine().getStatusCode();
 			HttpEntity entity = response.getEntity();
 			String receive = EntityUtils.toString(entity, "UTF-8").trim();
-			log.info("服务器返回Response String:" + receive);
+//			log.info("服务器返回Response String:" + receive);
 			return mapper.fromJson(receive, type);
 		} catch (ConnectException connException) {
 			throw connException;

+ 0 - 12
push-web/pom.xml

@@ -49,18 +49,6 @@
 			<version>1.0.0</version>
 		</dependency>
 
-		<dependency>
-			<groupId>org.diagbot</groupId>
-			<artifactId>bigdata-web</artifactId>
-			<version>0.0.1</version>
-		</dependency>
-
-		<dependency>
-			<groupId>org.diagbot</groupId>
-			<artifactId>graph-web</artifactId>
-			<version>0.0.1</version>
-		</dependency>
-
 		<dependency>
 			<groupId>org.springframework.boot</groupId>
 			<artifactId>spring-boot-starter-web</artifactId>

+ 18 - 13
push-web/src/main/java/org/diagbot/push/controller/AlgorithmController.java

@@ -1,10 +1,8 @@
 package org.diagbot.push.controller;
 
-import org.diagbot.bigdata.work.AlgorithmCore;
 import org.diagbot.common.work.FeatureRate;
 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;
@@ -69,6 +67,8 @@ public class AlgorithmController extends BaseController {
         LinkedHashMap graphLinkedHashMap = (LinkedHashMap) graphResponse.getData();
         //转FeatureRate对象
         ResponseData graphResponseData = map2ResponseData(graphLinkedHashMap);
+        //添加治疗信息
+        graphResponseData = addTreat(graphResponseData, graphLinkedHashMap);
         if (graphResponseData.getDis().size() > 0) {
             List<FeatureRate> disFeatureRates = new ArrayList<>();
             boolean isFind = false;
@@ -93,22 +93,22 @@ public class AlgorithmController extends BaseController {
         return response;
     }
 
-    private ResponseData map2ResponseData(LinkedHashMap bigDataLinkedHashMap) {
+    private ResponseData map2ResponseData(LinkedHashMap linkedHashMap) {
         ResponseData responseData = new ResponseData();
-        if (bigDataLinkedHashMap.get("dis") != null) {
-            responseData.setDis(map2FeatureRates((List<LinkedHashMap<String, String>>)bigDataLinkedHashMap.get("dis")));
+        if (linkedHashMap.get("dis") != null) {
+            responseData.setDis(map2FeatureRates((List<LinkedHashMap<String, String>>)linkedHashMap.get("dis")));
         }
-        if (bigDataLinkedHashMap.get("symptom") != null) {
-            responseData.setSymptom(map2FeatureRates((List<LinkedHashMap<String, String>>)bigDataLinkedHashMap.get("symptom")));
+        if (linkedHashMap.get("symptom") != null) {
+            responseData.setSymptom(map2FeatureRates((List<LinkedHashMap<String, String>>)linkedHashMap.get("symptom")));
         }
-        if (bigDataLinkedHashMap.get("vitals") != null) {
-            responseData.setVitals(map2FeatureRates((List<LinkedHashMap<String, String>>)bigDataLinkedHashMap.get("vitals")));
+        if (linkedHashMap.get("vitals") != null) {
+            responseData.setVitals(map2FeatureRates((List<LinkedHashMap<String, String>>)linkedHashMap.get("vitals")));
         }
-        if (bigDataLinkedHashMap.get("labs") != null) {
-            responseData.setLabs(map2FeatureRates((List<LinkedHashMap<String, String>>)bigDataLinkedHashMap.get("labs")));
+        if (linkedHashMap.get("labs") != null) {
+            responseData.setLabs(map2FeatureRates((List<LinkedHashMap<String, String>>)linkedHashMap.get("labs")));
         }
-        if (bigDataLinkedHashMap.get("pacs") != null) {
-            responseData.setPacs(map2FeatureRates((List<LinkedHashMap<String, String>>)bigDataLinkedHashMap.get("pacs")));
+        if (linkedHashMap.get("pacs") != null) {
+            responseData.setPacs(map2FeatureRates((List<LinkedHashMap<String, String>>)linkedHashMap.get("pacs")));
         }
         return responseData;
     }
@@ -124,4 +124,9 @@ public class AlgorithmController extends BaseController {
         }
         return featureRates;
     }
+
+    private ResponseData addTreat(ResponseData graphResponseData, LinkedHashMap linkedHashMap) {
+//        LinkedHashMap<String, String>)linkedHashMap.get("treat"));
+        return null;
+    }
 }

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

@@ -1,2 +1,5 @@
+#bigdata.http.url=http://192.168.2.234:5001/bigdata-web/algorithm/neural
+#graph.http.url=http://192.168.2.234:5003/graph-web/graph/push
+
 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

+ 9 - 4
push-web/src/main/resources/static/dist/js/push.js

@@ -1,4 +1,9 @@
-var nlp_web_url = "http://localhost:5002/nlp-web";
-var bigdata_web_url = "http://localhost:5001/bigdata-web";
-var graph_web_url = "http://localhost:5003/graph-web";
-var push_web_url = "http://localhost:5008/push-web";
+// var nlp_web_url = "http://192.168.2.234:5002/nlp-web";
+// var bigdata_web_url = "http://192.168.2.234:5001/bigdata-web";
+// var graph_web_url = "http://192.168.2.234:5003/graph-web";
+// var push_web_url = "http://192.168.2.234:5008/push-web";
+
+var nlp_web_url = "http://192.168.3.180:5002/nlp-web";
+var bigdata_web_url = "http://192.168.3.180:5001/bigdata-web";
+var graph_web_url = "http://192.168.3.180:5003/graph-web";
+var push_web_url = "http://192.168.3.180:5008/push-web";

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

@@ -344,11 +344,11 @@
         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');
-
-            startDiagMapping('/algorithm/page_neural', '#diag_list', '2', resourceType, '21');
+//            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 {
             $('#diag_list').html("");
             startDiag('/algorithm/page_neural', '#symptom_list', '1', resourceType, '111');