| | |
| | | } |
| | | |
| | | @GetMapping("dateInsertHistoryHourlyJKAvg") |
| | | @ApiOperation(value = "小时数据", notes = "小时数据") |
| | | @ApiOperation(value = "疾控中心小时数据", notes = "疾控中心小时数据") |
| | | public ResultMessage dateInsertHistoryHourlyJKAvg(String start, String end) { |
| | | String format = DateUtils.yyyy_MM_dd_HH_mm_EN; |
| | | // String start ="2023-11-19 09:00"; |
| | | // String format = DateUtils.yyyy_MM_dd_HH_mm_EN; |
| | | // String start ="2023-11-19 09:00" |
| | | // String end ="2023-11-19 10:00"; |
| | | // Date start = DateUtils.getDate(s,format); |
| | | // Date end = DateUtils.getDate(s1,format); |
| | | // Date start1 = DateUtils.getDate(start,format); |
| | | // Date end1 = DateUtils.getDate(end,format); |
| | | historyHourlyService.dateInsertHistoryHourlyJKAvg(start, end); |
| | | return new ResultMessage(); |
| | | } |
| | |
| | | } |
| | | //从数据库获取数据参数 |
| | | Map<String, Object> params = new HashMap<>(); |
| | | Date startTime=null; |
| | | Date endTime=null; |
| | | if (!ObjectUtils.isEmpty(start) || !ObjectUtils.isEmpty(end)){ |
| | | Date startTime; |
| | | Date endTime; |
| | | if (!ObjectUtils.isEmpty(start) && !ObjectUtils.isEmpty(end)){ |
| | | startTime = DateUtils.getDate(start, DateUtils.yyyy_MM_dd_HH_mm_ss_EN); |
| | | endTime = DateUtils.getDate(end, DateUtils.yyyy_MM_dd_HH_mm_ss_EN); |
| | | }else { |
| | |
| | | data.forEach((key, value) -> { |
| | | Map<String, Object> historyHourly = new HashMap<>(); |
| | | historyHourly.put("mac", key); |
| | | historyHourly.put("time",start); |
| | | historyHourly.put("time",startTime); |
| | | |
| | | Map<String, Object> jsonMap = new HashMap<>(); |
| | | Map<String, Object> map = new HashMap<>(); |