| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.CrossOrigin; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | return ResultMessage.ok(resultList); |
| | | } |
| | | |
| | | /** |
| | | * 监测站点数据导出 |
| | | * @param params |
| | | * @return |
| | | */ |
| | | @PostMapping("getHourlyDataExcel") |
| | | public ResultMessage getHourlyDataExcel(@RequestBody Map<String, Object> params){ |
| | | if (!params.containsKey("macs") || !params.containsKey("sensors") || !params.containsKey("startTime") || !params.containsKey("endTime")) { |
| | | return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg()); |
| | | } |
| | | List<Map<String, Object>> resList = monitorPointService.getHourlyDataDataV3(params); |
| | | return ResultMessage.ok(resList); |
| | | } |
| | | |
| | | |
| | | } |