jinpengyong
2022-01-05 2bd766940afdcb30d63840cea251d3979b332254
screen-api/src/main/java/com/moral/api/controller/AqiController.java
@@ -3,6 +3,7 @@
import com.moral.api.pojo.dto.cityAQI.CityPollutionLevel;
import com.moral.api.pojo.dto.cityAQI.MonthlyPollutionLevel;
import com.moral.api.pojo.form.aqi.AreaPollutionLevelForm;
import com.moral.api.pojo.form.aqi.SpecialCitiesPollutionLevelForm;
import com.moral.api.pojo.vo.cityAQI.BarChartOfPollutionLevelVO;
import com.moral.api.pojo.vo.cityAQI.BarChartTableOfPollutionLevelVO;
import com.moral.api.pojo.vo.cityAQI.PieChartOfPollutionLevelVO;
@@ -176,7 +177,7 @@
            @ApiImplicitParam(name = "time", value = "时间,排名类型为day,month,year是需传此参", required = true, paramType = "query", dataType = "String"),
            @ApiImplicitParam(name = "start", value = "开始时间,排名类型为custom自定义是传此参,精确到日,如:2021-11-02", required = true, paramType = "query", dataType = "String"),
            @ApiImplicitParam(name = "end", value = "结束时间,排名类型为custom自定义是传此参,精确到日,如:2021-11-03", required = true, paramType = "query", dataType = "String"),
            @ApiImplicitParam(name = "cityType", value = "城市类型,省内城市:province,市区排名:city", required = true, paramType = "query", dataType = "String"),
            @ApiImplicitParam(name = "cityType", value = "城市类型,省内城市:province,市区排名:city,2+28城市排名:28", required = true, paramType = "query", dataType = "String"),
    })
    public ResultMessage rankingDetails(HttpServletRequest request) {
        Map<String, Object> params = WebUtils.getParametersStartingWith(request, null);
@@ -213,7 +214,26 @@
                    ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg());
        //查询业务数据
        List<CityPollutionLevel> datas = cityAqiDailyService.queryAreaPollutionLevel(form);
        //返回数据
        return ResultMessage.ok(datas);
    }
    /**
    * @Description: 查询26+2城市优良天气数据
            * @Param: [form]
            * @return: com.moral.constant.ResultMessage
            * @Author: 陈凯裕
            * @Date: 2021/12/31
            */
    @GetMapping("qeury28CitiesPollutionLevel")
    public ResultMessage qeury28CitiesPollutionLevel(SpecialCitiesPollutionLevelForm form){
        //判断是否缺少参数
        if (!form.valid())
            return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(),
                    ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg());
        //查询业务数据
        List<CityPollutionLevel> datas = cityAqiDailyService.querySpecialCitiesPollutionLevel(form);
        //返回数据
        return ResultMessage.ok(datas);
    }