kaiyu
2022-02-25 a0224894fcc89500a701f39ccaf4322a03231ff6
screen-api/src/main/java/com/moral/api/controller/AqiController.java
@@ -2,15 +2,9 @@
import com.moral.api.config.properties.SpecialCitiesProperties;
import com.moral.api.entity.SysArea;
import com.moral.api.pojo.dto.cityAQI.CityPollutionLevel;
import com.moral.api.pojo.dto.cityAQI.ConcentrationAndPercent;
import com.moral.api.pojo.dto.cityAQI.DataPercentRange;
import com.moral.api.pojo.dto.cityAQI.MonthlyPollutionLevel;
import com.moral.api.pojo.dto.cityAQI.*;
import com.moral.api.pojo.form.aqi.*;
import com.moral.api.pojo.vo.cityAQI.AirQualityComparisonVO;
import com.moral.api.pojo.vo.cityAQI.BarChartOfPollutionLevelVO;
import com.moral.api.pojo.vo.cityAQI.BarChartTableOfPollutionLevelVO;
import com.moral.api.pojo.vo.cityAQI.PieChartOfPollutionLevelVO;
import com.moral.api.pojo.vo.cityAQI.*;
import com.moral.api.service.CityAqiDailyService;
import com.moral.api.service.CityAqiYearlyService;
@@ -47,6 +41,10 @@
    private CityAqiService cityAqiService;
    @Autowired
    private CityAqiDailyService cityAqiDailyService;
    @Autowired
    SpecialCitiesProperties specialCitiesProperties;
    @Autowired
    CityAqiYearlyService cityAqiYearlyService;
    @GetMapping("compareO3")
    @ApiOperation(value = "预测和实测臭氧对比", notes = "预测和实测臭氧对比")
@@ -282,10 +280,6 @@
        return ResultMessage.ok(datas);
    }
    @Autowired
    SpecialCitiesProperties specialCitiesProperties;
    @Autowired
    CityAqiYearlyService cityAqiYearlyService;
    /**
    * @Description: 优良天变化率分析
            * @Param: [year, cityCode]
@@ -302,4 +296,13 @@
        return ResultMessage.ok(result);
    }
    @GetMapping("queryComplianceDaysAnalysis")
    public ResultMessage queryComplianceDaysAnalysis( String year, Integer cityCode){
        if(year==null||cityCode==null)
            return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(),
                    ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg());
        List<ComplianceDaysDTO> dtos = cityAqiYearlyService.analysisComplianceDays(year, cityCode);
        return  ResultMessage.ok(ComplianceDaysVO.convert(dtos));
    }
}