| | |
| | | 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; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * @Description: 查询组织下所有的站点id以及name |
| | | * @Param: [organizationId] |
| | | * @return: com.moral.constant.ResultMessage |
| | | * @Author: 陈凯裕 |
| | | * @Date: 2021/9/26 |
| | | */ |
| | | * @Description: 查询组织下所有的站点id以及name |
| | | * @Param: [organizationId] |
| | | * @return: com.moral.constant.ResultMessage |
| | | * @Author: 陈凯裕 |
| | | * @Date: 2021/9/26 |
| | | */ |
| | | @GetMapping("queryAllMonitorPoints") |
| | | public ResultMessage queryAllMonitorPoints(Integer organizationId){ |
| | | public ResultMessage queryAllMonitorPoints(Integer organizationId) { |
| | | //处理查询业务 |
| | | List<MonitorPoint> monitorPoints = monitorPointService.queryAllMonitorPoints(organizationId); |
| | | //返回数据 |
| | |
| | | } |
| | | |
| | | /** |
| | | *@Description: 监测站点数据显示导出 |
| | | *@Param: [request] |
| | | *@return: com.moral.constant.ResultMessage |
| | | *@Author: lizijie |
| | | *@Date: 2022-10-10 14:00 |
| | | * @Description: 监测站点数据显示导出 |
| | | * @Param: [request] |
| | | * @return: com.moral.constant.ResultMessage |
| | | * @Author: lizijie |
| | | * @Date: 2022-10-10 14:00 |
| | | **/ |
| | | @GetMapping("getHourlyDataByMonitorPoint") |
| | | public ResultMessage getHourlyDataByMonitorPoint(HttpServletRequest request) { |
| | |
| | | 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); |
| | | } |
| | | |
| | | |
| | | } |