|
@@ -53,30 +53,12 @@ public class RestApi {
|
|
|
return "alarm_websocket_close";
|
|
|
}
|
|
|
|
|
|
- @PostMapping(path = { "/query", "/zkt-sdk/query" }, produces = "application/json;charset=UTF-8")
|
|
|
- public String query(@RequestBody String param) {
|
|
|
- String result = RestUtil.query(param);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @GetMapping(path = { "/showTree" }, produces = "application/json;charset=UTF-8")
|
|
|
- String showTree() {
|
|
|
- String result = RestUtil.showTree();
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
@GetMapping(path = { "/check" }, produces = "application/json;charset=UTF-8")
|
|
|
String check() {
|
|
|
String result = RestUtil.check();
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
- @PostMapping(path = { "/tool" }, produces = "application/json;charset=UTF-8")
|
|
|
- public String tool(@RequestBody String param) {
|
|
|
- String result = ToolUtil.tool(param);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
@PostMapping(path = { "/desc" }, produces = "application/json;charset=UTF-8")
|
|
|
public String desc(@RequestBody String param) {
|
|
|
String result = RestUtil.desc(param);
|
|
@@ -89,6 +71,26 @@ public class RestApi {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+ @GetMapping(path = { "/showTree" }, produces = "application/json;charset=UTF-8")
|
|
|
+ String showTree() {
|
|
|
+ String result = RestUtil.showTree();
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping(path = { "/tool" }, produces = "application/json;charset=UTF-8")
|
|
|
+ public String tool(@RequestBody String param) {
|
|
|
+ String result = ToolUtil.tool(param);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping(path = { "/query", "/zkt-sdk/query" }, produces = "application/json;charset=UTF-8")
|
|
|
+ public String query(@RequestBody String param, HttpServletRequest request) {
|
|
|
+ String ip = RestUtil.getIp(request);
|
|
|
+ log.info("ip:" + ip + " || query: " + param);
|
|
|
+ String result = RestUtil.query(param);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
@PostMapping(path = { "/post", "/zkt-sdk/post" }, produces = "application/json;charset=UTF-8")
|
|
|
public String post(@RequestBody String param, HttpServletRequest request) {
|
|
|
String ip = RestUtil.getIp(request);
|
|
@@ -109,43 +111,57 @@ public class RestApi {
|
|
|
}
|
|
|
|
|
|
@PostMapping(path = { "/post_filter_and_page", "/zkt-sdk/post_filter_and_page" }, produces = "application/json;charset=UTF-8")
|
|
|
- public String post_filter_and_page(@RequestBody String param) {
|
|
|
+ public String post_filter_and_page(@RequestBody String param, HttpServletRequest request) {
|
|
|
+ String ip = RestUtil.getIp(request);
|
|
|
+ log.info("ip:" + ip + " || post_filter_and_page: " + param);
|
|
|
String result = RestUtil.post_filter_and_page(param);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
@PostMapping(path = { "/control", "/zkt-sdk/control" }, produces = "application/json;charset=UTF-8")
|
|
|
- public String control(@RequestBody String param) {
|
|
|
+ public String control(@RequestBody String param, HttpServletRequest request) {
|
|
|
+ String ip = RestUtil.getIp(request);
|
|
|
+ log.info("ip:" + ip + " || control: " + param);
|
|
|
String result = RestUtil.control(param);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
@PostMapping(path = { "/get_control_value", "/zkt-sdk/get_control_value" }, produces = "application/json;charset=UTF-8")
|
|
|
- public String get_control_value(@RequestBody String param) {
|
|
|
+ public String get_control_value(@RequestBody String param, HttpServletRequest request) {
|
|
|
+ String ip = RestUtil.getIp(request);
|
|
|
+ log.info("ip:" + ip + " || get_control_value: " + param);
|
|
|
String result = RestUtil.get_control_value(param);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
@PostMapping(path = { "/fjd_query", "/zkt-sdk/fjd_query" }, produces = "application/json;charset=UTF-8")
|
|
|
- public String fjd_query(@RequestBody String param) {
|
|
|
+ public String fjd_query(@RequestBody String param, HttpServletRequest request) {
|
|
|
+ String ip = RestUtil.getIp(request);
|
|
|
+ log.info("ip:" + ip + " || fjd_query: " + param);
|
|
|
String result = RestUtil.fjd_query(param);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
@PostMapping(path = { "/history_fjd_query", "/zkt-sdk/history_fjd_query" }, produces = "application/json;charset=UTF-8")
|
|
|
- public String fjd_query_history(@RequestBody String param) {
|
|
|
+ public String fjd_query_history(@RequestBody String param, HttpServletRequest request) {
|
|
|
+ String ip = RestUtil.getIp(request);
|
|
|
+ log.info("ip:" + ip + " || fjd_query_history: " + param);
|
|
|
String result = RestUtil.fjd_query_history(param);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
@PostMapping(path = { "/path_array_history_fjd_query", "/zkt-sdk/path_array_history_fjd_query" }, produces = "application/json;charset=UTF-8")
|
|
|
- public String path_array_history_fjd_query(@RequestBody String param) {
|
|
|
+ public String path_array_history_fjd_query(@RequestBody String param, HttpServletRequest request) {
|
|
|
+ String ip = RestUtil.getIp(request);
|
|
|
+ log.info("ip:" + ip + " || path_array_history_fjd_query: " + param);
|
|
|
String result = RestUtil.path_array_history_fjd_query(param);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
@PostMapping(path = { "/getEquipStaticInfo", "/zkt-sdk/getEquipStaticInfo" }, produces = "application/json;charset=UTF-8")
|
|
|
- public String getEquipStaticInfo(@RequestBody String param) {
|
|
|
+ public String getEquipStaticInfo(@RequestBody String param, HttpServletRequest request) {
|
|
|
+ String ip = RestUtil.getIp(request);
|
|
|
+ log.info("ip:" + ip + " || getEquipStaticInfo: " + param);
|
|
|
String result = RestUtil.getEquipStaticInfo(param).toJSONString();
|
|
|
return result;
|
|
|
}
|