From 52cffc4ab8e9787a6f233295502c7c9788dddae1 Mon Sep 17 00:00:00 2001
From: fxl <473369119@qq.com>
Date: 星期二, 07 三月 2023 10:45:17 +0800
Subject: [PATCH] 3.7

---
 src/main/java/com/hxzkoa/controller/LocationController.java |   70 +++++++++++++++++++++++++++++++++++
 1 files changed, 70 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/hxzkoa/controller/LocationController.java b/src/main/java/com/hxzkoa/controller/LocationController.java
index c6ca239..17a4ba9 100644
--- a/src/main/java/com/hxzkoa/controller/LocationController.java
+++ b/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 })
@@ -269,6 +329,16 @@
 		locationService.tag_time(tag);
 	}
 	
+	@ResponseBody
+	@RequestMapping(value="panduanweiyi.do", method={RequestMethod.POST,RequestMethod.GET})
+	public String panduanweiyi(HttpServletRequest request) {
+		JSONObject json = new JSONObject();
+		String name = request.getParameter("name");
+		List<String> strs = locationService.panduanweiyi(name);
+		json.put("dataList", strs);
+		return json.toString();
+	}
+	
 //	@RequestMapping(value = "/shishi.do", method = { RequestMethod.POST, RequestMethod.GET })
 //	public void shiyan(HttpServletRequest request) throws IOException {
 //		String jsonString = RequestUtils.getRequestJsonString(request, Config.getCharset());

--
Gitblit v1.10.0