|
@@ -2,6 +2,8 @@ package org.diagbot.graphWeb.controller;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import org.diagbot.graph.javabean.GdbResponse;
|
|
|
+import org.diagbot.graph.jdbc.DriverManager;
|
|
|
+import org.diagbot.graph.jdbc.Neo4jAPI;
|
|
|
import org.diagbot.graphWeb.dao.BackResponse;
|
|
|
import org.diagbot.graphWeb.work.GraphCalculate;
|
|
|
import org.diagbot.graphWeb.work.HighRiskCalculate;
|
|
@@ -15,6 +17,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+import static org.diagbot.graph.jdbc.DriverManager.propertiesUtil;
|
|
|
|
|
|
@Controller
|
|
|
@RequestMapping("/graph")
|
|
@@ -28,13 +33,15 @@ public class GraphController {
|
|
|
response.setData(responseData);
|
|
|
return response;
|
|
|
}
|
|
|
+
|
|
|
@RequestMapping(value = "/highRisk", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
- public Response<GdbResponse> getHighRisk(HttpServletRequest request, @RequestBody SearchData searchData) throws Exception {
|
|
|
+ public Response<GdbResponse> getHighRisk(HttpServletRequest request, @RequestBody SearchData searchData) throws Exception {
|
|
|
HighRiskCalculate highRiskCalculate = new HighRiskCalculate();
|
|
|
Response<GdbResponse> gdbResponseResponse = highRiskCalculate.calculateHighRisk(request, searchData);
|
|
|
return gdbResponseResponse;
|
|
|
}
|
|
|
+
|
|
|
@RequestMapping(value = "/lisPacs", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
public Response<ResponseData> lisPacsData(HttpServletRequest request, @RequestBody SearchData searchData) throws Exception {
|
|
@@ -44,5 +51,14 @@ public class GraphController {
|
|
|
response.setData(responseData);
|
|
|
return response;
|
|
|
}
|
|
|
+
|
|
|
+ @RequestMapping(value = "/scale", method = RequestMethod.POST)
|
|
|
+ @ResponseBody
|
|
|
+ public Map<String, Object> scale(HttpServletRequest request, @RequestBody SearchData searchData) throws Exception {
|
|
|
+ Neo4jAPI neo4jAPI = new Neo4jAPI(DriverManager.newDrive("192.168.2.233","neo4j","root"));
|
|
|
+ String scaleName = searchData.getScaleName();
|
|
|
+ Map<String, Object> scale = neo4jAPI.getScale(scaleName);
|
|
|
+ return scale;
|
|
|
+ }
|
|
|
}
|
|
|
|