From bc131131c5c96f8cb3bed679d4a359820c22e335 Mon Sep 17 00:00:00 2001
From: 15832144755 <67030627+15832144755@users.noreply.github.com>
Date: 星期四, 17 三月 2022 09:38:47 +0800
Subject: [PATCH] 3.17
---
src/main/java/com/hxzkoa/controller/WarningController.java | 204 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 201 insertions(+), 3 deletions(-)
diff --git a/src/main/java/com/hxzkoa/controller/WarningController.java b/src/main/java/com/hxzkoa/controller/WarningController.java
index dc0390a..86728fd 100644
--- a/src/main/java/com/hxzkoa/controller/WarningController.java
+++ b/src/main/java/com/hxzkoa/controller/WarningController.java
@@ -49,6 +49,15 @@
request.setAttribute("curPage", curPage);
return toPage;
}
+
+ @ResponseBody
+ @RequestMapping(value = "/warningSummarya.do", method = { RequestMethod.POST, RequestMethod.GET })
+ public JSONObject warningSummarya(HttpServletRequest request) {
+ JSONObject json = new JSONObject();
+ List<tb_warning> warningSummaryList = warningService.getWarningSummarya();
+ json.put("dataList", warningSummaryList);
+ return json;
+ }
@ResponseBody
@RequestMapping(value = "/warningSummary_search.do", method = { RequestMethod.POST, RequestMethod.GET })
@@ -76,6 +85,28 @@
}
return json.toString();
}
+
+ @ResponseBody
+ @RequestMapping(value = "/warningSummary_searcha.do", method = { RequestMethod.POST, RequestMethod.GET })
+ public JSONObject warningSummary_searcha(HttpServletRequest request) throws IOException {
+ JSONObject json = new JSONObject();
+ String input = request.getParameter("tagid");
+ if (("").equals(input) || input == null) {
+ String jsonString = RequestUtils.getRequestJsonString(request, Config.getCharset());
+ tb_tag tag = (tb_tag) JSONObject.toBean(JSONObject.fromObject(jsonString), tb_tag.class);
+ input = tag.getTag_id();
+ List<tb_warning> warningSummaryList = warningService.searchWarningSummary(input);
+ if (warningSummaryList.size()>0){
+ json.put("result", warningSummaryList.get(0));
+ } else {
+ json.put("result", "null");
+ }
+ } else {
+ List<tb_warning> warningSummaryList = warningService.searchWarningSummary(input);
+ json.put("dataList", warningSummaryList);
+ }
+ return json;
+ }
@ResponseBody
@RequestMapping(value = "/warningSummary_page.do", method = { RequestMethod.POST, RequestMethod.GET })
@@ -159,6 +190,15 @@
request.setAttribute("curPage", curPage);
return toPage;
}
+
+ @ResponseBody
+ @RequestMapping(value = "/realTimeWarninga.do", method = { RequestMethod.POST, RequestMethod.GET })
+ public JSONObject realTimeWarninga(HttpServletRequest request) {
+ JSONObject json = new JSONObject();
+ List<tb_realinwarning> realTimeWarningList = warningService.getRealinWarninga();
+ json.put("dataList", realTimeWarningList);
+ return json;
+ }
@ResponseBody
@RequestMapping(value = "/realTimeWarning_delete.do", method = { RequestMethod.POST, RequestMethod.GET })
@@ -168,12 +208,29 @@
String[] checkVal = checkValStr.split(",");
warningService.realinWarning_delete(checkVal);
}
+
+ @ResponseBody
+ @RequestMapping(value = "/realTimeWarning_deletea.do", method = { RequestMethod.POST, RequestMethod.GET })
+ public int realTimeWarning_deletea(HttpServletRequest request) {
+ String checkValStr = request.getParameter("checkVal");
+ checkValStr = checkValStr.replaceAll("\"", "");
+ String[] checkVal = checkValStr.split(",");
+ int aaa = warningService.realinWarning_deletea(checkVal);
+ return aaa;
+ }
@ResponseBody
@RequestMapping(value = "/realTimeWarning_deleteAll.do", method = { RequestMethod.POST, RequestMethod.GET })
public void realTimeWarning_deleteAll(HttpServletRequest request) {
warningService.realinWarning_deleteAll();
}
+
+ @ResponseBody
+ @RequestMapping(value = "/realTimeWarning_deleteAlla.do", method = { RequestMethod.POST, RequestMethod.GET })
+ public int realTimeWarning_deleteAlla(HttpServletRequest request) {
+ int aaa = warningService.realinWarning_deleteAlla();
+ return aaa;
+ }
@ResponseBody
@RequestMapping(value = "/realTimeWarning_search.do", method = { RequestMethod.POST, RequestMethod.GET })
@@ -201,6 +258,28 @@
}
return json.toString();
}
+
+ @ResponseBody
+ @RequestMapping(value = "/realTimeWarning_searcha.do", method = { RequestMethod.POST, RequestMethod.GET })
+ public JSONObject realTimeWarning_searcha(HttpServletRequest request) throws IOException {
+ JSONObject json = new JSONObject();
+ String input = request.getParameter("tagid");
+ if (("").equals(input) || input == null) {
+ String jsonString = RequestUtils.getRequestJsonString(request, Config.getCharset());
+ tb_tag tag = (tb_tag) JSONObject.toBean(JSONObject.fromObject(jsonString), tb_tag.class);
+ input = tag.getTag_id();
+ List<tb_realinwarning> realTimeWarningList = warningService.searchRealinWarning(input);
+ if (realTimeWarningList.size()>0){
+ json.put("result", realTimeWarningList.get(0));
+ } else {
+ json.put("result", "null");
+ }
+ } else {
+ List<tb_realinwarning> realTimeWarningList = warningService.searchRealinWarning(input);
+ json.put("dataList", realTimeWarningList);
+ }
+ return json;
+ }
@ResponseBody
@RequestMapping(value = "/realTimeWarning_page.do", method = { RequestMethod.POST, RequestMethod.GET })
@@ -284,6 +363,15 @@
request.setAttribute("curPage", curPage);
return toPage;
}
+
+ @ResponseBody
+ @RequestMapping(value = "/historicalWarninga.do", method = { RequestMethod.POST, RequestMethod.GET })
+ public JSONObject historicalWarninga(HttpServletRequest request) {
+ JSONObject json = new JSONObject();
+ List<tb_historyinwarning> historicalWarningList = warningService.getHistoricalWarninga();
+ json.put("dataList", historicalWarningList);
+ return json;
+ }
@ResponseBody
@RequestMapping(value = "/historicalWarning_delete.do", method = { RequestMethod.POST, RequestMethod.GET })
@@ -295,6 +383,16 @@
}
@ResponseBody
+ @RequestMapping(value = "/historicalWarning_deletea.do", method = { RequestMethod.POST, RequestMethod.GET })
+ public int historicalWarning_deletea(HttpServletRequest request) {
+ String checkValStr = request.getParameter("checkVal");
+ checkValStr = checkValStr.replaceAll("\"", "");
+ String[] checkVal = checkValStr.split(",");
+ int aaa = warningService.historicalWarning_deletea(checkVal);
+ return aaa;
+ }
+
+ @ResponseBody
@RequestMapping(value = "/Warning_delete.do", method = { RequestMethod.POST, RequestMethod.GET })
public void Warning_delete(HttpServletRequest request) {
String checkValStr = request.getParameter("checkVal");
@@ -312,6 +410,26 @@
Udp_Out.udp_to_cs(xieyi);
}
}
+
+ @ResponseBody
+ @RequestMapping(value = "/Warning_deletea.do", method = { RequestMethod.POST, RequestMethod.GET })
+ public int Warning_deletea(HttpServletRequest request) {
+ String checkValStr = request.getParameter("checkVal");
+ String tagids = request.getParameter("tagids");
+ String types = request.getParameter("types");
+ checkValStr = checkValStr.replaceAll("\"", "");
+ tagids = tagids.replaceAll("\"", "");
+ types = types.replaceAll("\"", "");
+ String[] checkVal = checkValStr.split(",");
+ String[] tagid = tagids.split(",");
+ String[] typess = types.split(",");
+ int aaa = warningService.Warning_deletea(checkVal);
+ for (int i = 0; i < tagid.length; i++) {
+ String xieyi = "BSTOCS1,DELETEWARN," +tagid[i]+ "," +typess[i]+ ",END";
+ Udp_Out.udp_to_cs(xieyi);
+ }
+ return aaa;
+ }
@ResponseBody
@RequestMapping(value = "/historicalWarning_deleteAll.do", method = { RequestMethod.POST, RequestMethod.GET })
@@ -320,6 +438,13 @@
}
@ResponseBody
+ @RequestMapping(value = "/historicalWarning_deleteAlla.do", method = { RequestMethod.POST, RequestMethod.GET })
+ public int historicalWarning_deleteAlla(HttpServletRequest request) {
+ int aaa = warningService.historicalWarning_deleteAlla();
+ return aaa;
+ }
+
+ @ResponseBody
@RequestMapping(value = "/Warning_deleteAll.do", method = { RequestMethod.POST, RequestMethod.GET })
public void Warning_deleteAll(HttpServletRequest request) {
String input = request.getParameter("fenlei");
@@ -331,6 +456,21 @@
warningService.Warning_deletefenlei(input);
}
}
+
+ @ResponseBody
+ @RequestMapping(value = "/Warning_deleteAlla.do", method = { RequestMethod.POST, RequestMethod.GET })
+ public int Warning_deleteAlla(HttpServletRequest request) {
+ String input = request.getParameter("fenlei");
+ int aaa = 0;
+ if (input.equals("鍏ㄩ儴")) {
+ aaa = warningService.Warning_deleteAlla();
+ String xieyi = "BSTOCS1,DELETEWARNALL,END";
+ Udp_Out.udp_to_cs(xieyi);
+ } else {
+ warningService.Warning_deletefenlei(input);
+ }
+ return aaa;
+ }
@ResponseBody
@RequestMapping(value = "/historicalWarning_search.do", method = { RequestMethod.POST, RequestMethod.GET })
@@ -346,6 +486,16 @@
json.put("curPage", curPage);
return json.toString();
}
+
+ @ResponseBody
+ @RequestMapping(value = "/historicalWarning_searcha.do", method = { RequestMethod.POST, RequestMethod.GET })
+ public JSONObject historicalWarning_searcha(HttpServletRequest request) {
+ String input = request.getParameter("tagid");
+ List<tb_historyinwarning> historicalWarningList = warningService.searchHistoricalWarning(input);
+ JSONObject json = new JSONObject();
+ json.put("dataList", historicalWarningList);
+ return json;
+ }
@ResponseBody
@RequestMapping(value = "/historicalWarning_page.do", method = { RequestMethod.POST, RequestMethod.GET })
@@ -438,6 +588,23 @@
}
@ResponseBody
+ @RequestMapping(value = "/historicalWarning_handlea.do", method = { RequestMethod.POST, RequestMethod.GET })
+ public int historicalWarning_handlea(HttpServletRequest request) {
+ String checkValStr = request.getParameter("checkVal");
+ String types = request.getParameter("types");
+ types = types.replaceAll("\"", "");
+ String[] typess = types.split(",");
+ checkValStr = checkValStr.replaceAll("\"", "");
+ String[] checkVal = checkValStr.split(",");
+ int aaa = warningService.historicalWarning_handle(checkVal);
+ for (int i = 0; i < checkVal.length; i++) {
+ String xieyi = "BSTOCS1,DELLWARN," +checkVal[i]+ "," +typess[i]+ ",END";
+ Udp_Out.udp_to_cs(xieyi);
+ }
+ return aaa;
+ }
+
+ @ResponseBody
@RequestMapping(value = "/historicalWarning_handleAll.do", method = { RequestMethod.POST, RequestMethod.GET })
public void historicalWarning_handleAll(HttpServletRequest request) {
warningService.historicalWarning_handleAll();
@@ -445,6 +612,16 @@
String xieyi = "BSTOCS1,DELLWARNALL,END";
Udp_Out.udp_to_cs(xieyi);
}
+
+ @ResponseBody
+ @RequestMapping(value = "/historicalWarning_handleAlla.do", method = { RequestMethod.POST, RequestMethod.GET })
+ public int historicalWarning_handleAlla(HttpServletRequest request) {
+ int aaa = warningService.historicalWarning_handleAll();
+ warningService.historicalWarning_handleAll_realpositoin();
+ String xieyi = "BSTOCS1,DELLWARNALL,END";
+ Udp_Out.udp_to_cs(xieyi);
+ return aaa;
+ }
@RequestMapping(value = "/warning_bw_add.do", method = { RequestMethod.POST, RequestMethod.GET })
public void warning_bw_add(HttpServletRequest request) throws IOException {
@@ -498,10 +675,31 @@
}
@ResponseBody
- @RequestMapping(value = "/fenlei.do", method = { RequestMethod.POST, RequestMethod.GET })
- public String fenlei(HttpServletRequest request) {
+ @RequestMapping(value = "/shaileixing.do", method = { RequestMethod.POST, RequestMethod.GET })
+ public String shaileixing(HttpServletRequest request) {
String fenlei = request.getParameter("fenlei");
- List<tb_warning> labelManagementList = warningService.getfenlei(fenlei);
+ List<tb_warning> labelManagementList = warningService.getleixing(fenlei);
+ JSONObject json = new JSONObject();
+ json.put("dataList", labelManagementList);
+ return json.toString();
+ }
+
+ @ResponseBody
+ @RequestMapping(value = "/shaizhuangtai.do", method = { RequestMethod.POST, RequestMethod.GET })
+ public String shaizhuangtai(HttpServletRequest request) {
+ String fenlei = request.getParameter("fenlei");
+ List<tb_warning> labelManagementList = warningService.getzhuangtai(fenlei);
+ JSONObject json = new JSONObject();
+ json.put("dataList", labelManagementList);
+ return json.toString();
+ }
+
+ @ResponseBody
+ @RequestMapping(value = "/shuangshai.do", method = { RequestMethod.POST, RequestMethod.GET })
+ public String shuangshai(HttpServletRequest request) {
+ String fenlei = request.getParameter("fenlei");
+ String fenlei2 = request.getParameter("fenlei2");
+ List<tb_warning> labelManagementList = warningService.getshuangshai(fenlei,fenlei2);
JSONObject json = new JSONObject();
json.put("dataList", labelManagementList);
return json.toString();
--
Gitblit v1.10.0