| | |
| | | Date date = new Date(System.currentTimeMillis()); |
| | | SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd"); |
| | | String currentDate = formatter.format(date); |
| | | System.out.print(currentDate); |
| | | //System.out.print(currentDate); |
| | | List<tb_track> trackList = locationService.getTrack(currentDate, 1, perPage); |
| | | request.setAttribute("historicalLocationList", trackList); |
| | | int curPage = 1; |
| | | int count = locationService.getRealTimeLocationCount(currentDate); |
| | | System.out.print(count); |
| | | //System.out.print(count); |
| | | int minPage = PageUtil.getMinPage(count); |
| | | request.setAttribute("pageList", PageUtil.getPage(minPage)); |
| | | request.setAttribute("curPage", curPage); |
| | |
| | | json.put("dataList", trackList); |
| | | json.put("pageList", pageList); |
| | | json.put("curPage", page); |
| | | System.out.print(pageList); |
| | | //System.out.print(pageList); |
| | | 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()); |
| | | // System.out.print(jsonString); |
| | | // System.out.print("执行力我"); |
| | | // //System.out.print(jsonString); |
| | | // //System.out.print("执行力我"); |
| | | // tb_tag tag = (tb_tag) JSONObject.toBean(JSONObject.fromObject(jsonString), tb_tag.class); |
| | | // locationService.tag_time(tag); |
| | | // } |