| | |
| | | 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 }) |
| | |
| | | } |
| | | 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 }) |
| | |
| | | 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 }) |
| | |
| | | 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 }) |
| | |
| | | } |
| | | 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 }) |
| | |
| | | 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 }) |
| | |
| | | } |
| | | |
| | | @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"); |
| | |
| | | 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 }) |
| | |
| | | } |
| | | |
| | | @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) { |
| | | warningService.Warning_deleteAll(); |
| | | String xieyi = "BSTOCS1,DELETEWARNALL,END"; |
| | | Udp_Out.udp_to_cs(xieyi); |
| | | String input = request.getParameter("fenlei"); |
| | | if (input.equals("全部")) { |
| | | warningService.Warning_deleteAll(); |
| | | String xieyi = "BSTOCS1,DELETEWARNALL,END"; |
| | | Udp_Out.udp_to_cs(xieyi); |
| | | } else { |
| | | 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 |
| | |
| | | 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 }) |
| | |
| | | } |
| | | |
| | | @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(); |
| | |
| | | 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 { |
| | |
| | | String[] checkVal = { realinwarning.getTagid() }; |
| | | warningService.realinWarning_delete(checkVal); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @RequestMapping(value = "/shaileixing.do", method = { RequestMethod.POST, RequestMethod.GET }) |
| | | public String shaileixing(HttpServletRequest request) { |
| | | String fenlei = request.getParameter("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(); |
| | | } |
| | | } |