| | |
| | | public ModelAndView pollutionSource(ModelAndView model, HttpServletRequest request) throws Exception { |
| | | Map<String, Object> parameters = WebUtils.getParametersStartingWith(request, null); |
| | | String timeStr = parameters.get("time").toString(); |
| | | String YearAndDay = timeStr.substring(0, timeStr.lastIndexOf("-")); |
| | | String yearAndDay = timeStr.substring(0, timeStr.lastIndexOf("-")); |
| | | String Hour = timeStr.substring(timeStr.lastIndexOf("-") + 1); |
| | | String time = YearAndDay + " " + Hour + ":00:00"; |
| | | String time = yearAndDay + " " + Hour + ":00:00"; |
| | | DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | LocalDateTime timeLocalDateTime = LocalDateTime.parse(time, dateTimeFormatter); |
| | | int month = timeLocalDateTime.getMonth().getValue(); |
| | | parameters.put("yearAndDay",yearAndDay); |
| | | Point dirPoint = historyHourlyService.getDirPoint(parameters); |
| | | Map<String, Object> getPollutionSourceData = historyHourlyService.getPollutionSourceDataByHour(parameters); |
| | | if (MapUtils.isEmpty(getPollutionSourceData)) { |