jinpengyong
2024-03-15 c9f757b9cbfcea425179eca92d310319c1aac8b6
screen-api/src/main/java/com/moral/api/controller/MonitorPointController.java
@@ -113,13 +113,36 @@
        /*if(monitorPoint.contains("")){
        }*/
        params.put("monitorPointList", monitorPoint);
        String[] monitorPointIds = monitorPoint.split(",");
        if (monitorPointIds.length > 7) {
            return ResultMessage.ok();
        }
        params.put("monitorPointIds", monitorPointIds);
        List<Object> response = historyFiveMinutelyService.getAreaWindData(params);
        return ResultMessage.ok(response);
    }
    @GetMapping("getWindDataCenter")
    @ApiOperation(value = "获取风场中心数据", notes = "获取风场中心数据")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "token", value = "token", required = true, paramType = "header", dataType = "String"),
            @ApiImplicitParam(name = "monitorPointIds", value = "站点id", required = true, paramType = "query", dataType = "String")
    })
    public ResultMessage getWindDataCenter(HttpServletRequest request) {
        Map<String, Object> params = WebUtils.getParametersStartingWith(request, null);
        if (!params.containsKey("monitorPointIds")) {
            return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg());
        }
        String monitorPoint = params.remove("monitorPointIds").toString();
        params.put("monitorPointList", monitorPoint);
        String[] monitorPointIds = monitorPoint.split(",");
        if (monitorPointIds.length > 3) {
            return ResultMessage.ok();
        }
        params.put("monitorPointIds", monitorPointIds);
        List<Object> response = historyFiveMinutelyService.getAreaWindData(params);
        List<Object> response = historyFiveMinutelyService.getAreaWindDataCenter(params);
        return ResultMessage.ok(response);
    }