kaiyu
2022-03-16 76719337e975f99620aafd16d886f3556a056f76
screen-api
增加市内所有县排名mock数据
1 files added
2 files modified
182 ■■■■■ changed files
screen-api/src/main/java/com/moral/api/controller/AqiController.java 43 ●●●●● patch | view | raw | blame | history
screen-api/src/main/java/com/moral/api/pojo/dto/cityAQI/ConcentrationAndPercent.java 7 ●●●●● patch | view | raw | blame | history
screen-api/src/main/java/com/moral/api/pojo/vo/cityAQI/CityAreaRangeVO.java 132 ●●●●● patch | view | raw | blame | history
screen-api/src/main/java/com/moral/api/controller/AqiController.java
@@ -14,6 +14,7 @@
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
@@ -315,4 +316,46 @@
        return  ResultMessage.ok(result);
    }
    /**
    * @Description: 查询市内所有县的排名 附件7
            * @Param: [regionCode, time]
            * @return: com.moral.constant.ResultMessage
            * @Author: 陈凯裕
            * @Date: 2022/3/16
            */
    @GetMapping("cityAreaRange")
    public ResultMessage cityAreaRange(Integer regionCode,@DateTimeFormat(pattern = "yyyy-MM-dd") Date time){
        if(regionCode==null || time==null){
            return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(),
                    ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg());
        }
        CityAreaRangeVO vo = new CityAreaRangeVO();
        ConcentrationAndPercent cap = new ConcentrationAndPercent();
        cap.setConcentration("浓度/天数/指数");
        cap.setPercent("同比");
        cap.setCompareConcentration("同比浓度");
        ConcentrationAndPercent cap2 = new ConcentrationAndPercent();
        cap2.setConcentration("浓度/天数/指数");
        cap2.setPercent("同比");
        vo.setCityName("xxx");
        vo.setRange(0);
        vo.setCompositeIndex(cap);
        vo.setCO(cap);
        vo.setNO2(cap);
        vo.setSO2(cap);
        vo.setPM10(cap);
        vo.setPM25(cap);
        vo.setO3(cap);
        vo.setServerDays(cap2);
        vo.setFineDays(cap2);
        List<CityAreaRangeVO> vos = new ArrayList<>();
        vos.add(vo);
        vos.add(vo);
        return ResultMessage.ok(vos);
    }
}
screen-api/src/main/java/com/moral/api/pojo/dto/cityAQI/ConcentrationAndPercent.java
@@ -1,5 +1,6 @@
package com.moral.api.pojo.dto.cityAQI;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
/**
@@ -10,6 +11,7 @@
 * @Version TODO
 **/
@Data
@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class ConcentrationAndPercent {
    /*
@@ -18,6 +20,11 @@
    private String concentration;
    /*
     * 同比的浓度
     * */
    private String compareConcentration;
    /*
    * 同比/环比
    * */
    private String percent;
screen-api/src/main/java/com/moral/api/pojo/vo/cityAQI/CityAreaRangeVO.java
New file
@@ -0,0 +1,132 @@
package com.moral.api.pojo.vo.cityAQI;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.moral.api.pojo.dto.cityAQI.ConcentrationAndPercent;
/**
 * @ClassName CityAreaRangeVO
 * @Description 市内所有县排名VO
 * @Author 陈凯裕
 * @Date 2022/3/16 13:15
 * @Version TODO
 **/
public class CityAreaRangeVO {
    public CityAreaRangeVO() {
    }
    private String cityName;
    private int range;
    private ConcentrationAndPercent compositeIndex;
    private ConcentrationAndPercent PM25;
    private ConcentrationAndPercent PM10;
    private ConcentrationAndPercent SO2;
    private ConcentrationAndPercent NO2;
    private ConcentrationAndPercent CO;
    private ConcentrationAndPercent O3;
    private ConcentrationAndPercent fineDays;
    private ConcentrationAndPercent serverDays;
    public String getCityName() {
        return cityName;
    }
    public ConcentrationAndPercent getCompositeIndex() {
        return compositeIndex;
    }
    @JsonProperty("PM2_5")
    public ConcentrationAndPercent getPM25() {
        return PM25;
    }
    @JsonProperty("PM10")
    public ConcentrationAndPercent getPM10() {
        return PM10;
    }
    @JsonProperty("SO2")
    public ConcentrationAndPercent getSO2() {
        return SO2;
    }
    @JsonProperty("NO2")
    public ConcentrationAndPercent getNO2() {
        return NO2;
    }
    @JsonProperty("CO")
    public ConcentrationAndPercent getCO() {
        return CO;
    }
    @JsonProperty("O3_8H")
    public ConcentrationAndPercent getO3() {
        return O3;
    }
    public ConcentrationAndPercent getFineDays() {
        return fineDays;
    }
    public ConcentrationAndPercent getServerDays() {
        return serverDays;
    }
    public void setCityName(String cityName) {
        this.cityName = cityName;
    }
    public void setCompositeIndex(ConcentrationAndPercent compositeIndex) {
        this.compositeIndex = compositeIndex;
    }
    public void setPM25(ConcentrationAndPercent PM25) {
        this.PM25 = PM25;
    }
    public void setPM10(ConcentrationAndPercent PM10) {
        this.PM10 = PM10;
    }
    public void setSO2(ConcentrationAndPercent SO2) {
        this.SO2 = SO2;
    }
    public void setNO2(ConcentrationAndPercent NO2) {
        this.NO2 = NO2;
    }
    public void setCO(ConcentrationAndPercent CO) {
        this.CO = CO;
    }
    public void setO3(ConcentrationAndPercent o3) {
        O3 = o3;
    }
    public void setFineDays(ConcentrationAndPercent fineDays) {
        this.fineDays = fineDays;
    }
    public void setServerDays(ConcentrationAndPercent serverDays) {
        this.serverDays = serverDays;
    }
    public int getRange() {
        return range;
    }
    public void setRange(int range) {
        this.range = range;
    }
}