15832144755
2022-03-17 bc131131c5c96f8cb3bed679d4a359820c22e335
src/main/java/com/hxzkoa/controller/LocationController.java
@@ -129,6 +129,22 @@
      request.setAttribute("dateList", trackDateReList);
      return toPage;
   }
   @ResponseBody
   @RequestMapping(value = "/historicalLocationa.do", method = { RequestMethod.POST, RequestMethod.GET })
   public JSONObject historicalLocationa(HttpServletRequest request) throws SQLException {
      JSONObject json = new JSONObject();
      String date = request.getParameter("date");
      int aaa = locationService.searchtablenameLocation("tb_track_"+date);
      if (aaa != 0) {
         List<tb_track> trackList = locationService.getTracka(date);
         json.put("dataList", trackList);
      } else {
         List<tb_track> trackList = new ArrayList<>();
         json.put("dataList", trackList);
      }
      return json;
   }
   @ResponseBody
   @RequestMapping(value = "/historicalLocation_delete.do", method = { RequestMethod.POST, RequestMethod.GET })
@@ -139,6 +155,21 @@
      String[] checkVal = checkValStr.split(",");
      locationService.realTimeLocation_delete(checkVal,date);
   }
   @ResponseBody
   @RequestMapping(value = "/historicalLocation_deletea.do", method = { RequestMethod.POST, RequestMethod.GET })
   public int historicalLocation_deletea(HttpServletRequest request) {
      String checkValStr = request.getParameter("checkVal");
      String date = request.getParameter("datea");
      checkValStr = checkValStr.replaceAll("\"", "");
      String[] checkVal = checkValStr.split(",");
      int bbb = locationService.searchtablenameLocation("tb_track_"+date);
      int aaa = 0;
      if (bbb != 0) {
         aaa = locationService.realTimeLocation_deletea(checkVal,date);
      }
      return aaa;
   }
   @ResponseBody
   @RequestMapping(value = "/historicalLocation_deleteAll.do", method = { RequestMethod.POST, RequestMethod.GET })
@@ -146,6 +177,18 @@
      String date = request.getParameter("aaaa");
      locationService.realTimeLocation_deleteAll(date);
   }
   @ResponseBody
   @RequestMapping(value = "/historicalLocation_deleteAlla.do", method = { RequestMethod.POST, RequestMethod.GET })
   public int historicalLocation_deleteAlla(HttpServletRequest request) {
      String date = request.getParameter("date");
      int bbb = locationService.searchtablenameLocation("tb_track_"+date);
      int aaa = 0;
      if (bbb != 0) {
         aaa = locationService.realTimeLocation_deleteAlla(date);
      }
      return aaa;
   }
   @ResponseBody
   @RequestMapping(value = "/historicalLocation_search.do", method = { RequestMethod.POST, RequestMethod.GET })
@@ -162,6 +205,23 @@
      json.put("curPage", curPage);
      return json.toString();
   }
   @ResponseBody
   @RequestMapping(value = "/historicalLocation_searcha.do", method = { RequestMethod.POST, RequestMethod.GET })
   public JSONObject historicalLocation_searcha(HttpServletRequest request) {
      String input = request.getParameter("tagid");
      String date = request.getParameter("date");
      JSONObject json = new JSONObject();
      int aaa = locationService.searchtablenameLocation("tb_track_"+date);
      if (aaa != 0) {
         List<tb_realocation> historicalLocationList = locationService.searchRealTimeLocation(input,date);
         json.put("dataList", historicalLocationList);
      } else {
         List<tb_realocation> abc = new ArrayList<>();
         json.put("dataList", abc);
      }
      return json;
   }
   @ResponseBody
   @RequestMapping(value = "/historicalLocation_page.do", method = { RequestMethod.POST, RequestMethod.GET })