| | |
| | | @GetMapping("month-sensor-average") |
| | | public Map<String, Object> getMonthAverageBySensor(HttpServletRequest request) { |
| | | Map<String, Object> parameters = getParametersStartingWith(request, null); |
| | | return historyMinutelyService.getMonthAverageBySensor(parameters); |
| | | return historyMinutelyService.getAverageBySensor(parameters); |
| | | } |
| | | |
| | | @GetMapping("check-activate") |
| | |
| | | @GetMapping("/carTrajectory") |
| | | @ApiOperation(value = "显示走航车轨迹", notes = "显示走航车轨迹") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "mac", value = "设备mac(格式:p5dnd7a0392082)", required = true, paramType = "query", dataType = "String"), |
| | | @ApiImplicitParam(name = "mac", value = "设备mac(格式:p5dnd7a0392081)", required = true, paramType = "query", dataType = "String"), |
| | | @ApiImplicitParam(name = "startTime", value = "开始时间(格式:2020-03-19-14)", required = true, paramType = "query", dataType = "String"), |
| | | @ApiImplicitParam(name = "endTime", value = "结束时间(格式:2020-03-19-17)", required = true, paramType = "query", dataType = "String") |
| | | }) |
| | |
| | | String startHour = st.substring(st.lastIndexOf("-") + 1); |
| | | String startTime = startYearAndDay + " " + startHour + ":00:00"; |
| | | String et = parameters.get("endTime").toString(); |
| | | String endYearAndDay = et.substring(0, et.lastIndexOf("-")); |
| | | String endHour = et.substring(et.lastIndexOf("-") + 1); |
| | | String endTime = endYearAndDay + " " + endHour + ":00:00"; |
| | | int endHourValue =Integer.valueOf(endHour); |
| | | int startHourValue =Integer.valueOf(startHour); |
| | | if(endHourValue<=startHourValue){ |
| | | endHourValue=23; |
| | | } |
| | | String endTime = startYearAndDay + " " + endHourValue + ":00:00"; |
| | | parameters.put("startTime", startTime); |
| | | parameters.put("endTime", endTime); |
| | | String mac = parameters.get("mac").toString(); |