package cn.cecep.talroad.vo.effective;

import cn.cecep.talroad.common.core.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author zhangshiji
 * @date 2022/7/13
 */
@ApiModel(value = "空气监测数据VO")
@Data
public class AirQualityData implements Serializable {
    /**
     * 空气质量
     */
    @Excel(name = "AQI")
    @ApiModelProperty(value = "aqi")
    private Integer aqi;
    @Excel(name = "PMI")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "pmi")
    private BigDecimal pmi;
    @Excel(name = "PM2.5")
    @ApiModelProperty(value = "pm25 监测值")
    @JsonFormat(shape = JsonFormat.Shape.STRING)

    private BigDecimal pm25;
    @Excel(name = "PM10")
    @ApiModelProperty(value = "pm10 监测值")
    @JsonFormat(shape = JsonFormat.Shape.STRING)

    private BigDecimal pm10;
    @Excel(name = "SO2")
    @ApiModelProperty(value = "so2 监测值")
    @JsonFormat(shape = JsonFormat.Shape.STRING)

    private BigDecimal so2;
    @Excel(name = "NO2")
    @ApiModelProperty(value = "no2 监测值")
    @JsonFormat(shape = JsonFormat.Shape.STRING)

    private BigDecimal no2;
    @Excel(name = "CO")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "co 监测值")
    private BigDecimal co;
    @Excel(name = "O3")
    @ApiModelProperty(value = "o3 监测值")
    @JsonFormat(shape = JsonFormat.Shape.STRING)

    private BigDecimal o3;
    @Excel(name = "O3_8H")
    @ApiModelProperty(value = "臭氧八小时 监测值")
    @JsonFormat(shape = JsonFormat.Shape.STRING)

    private BigDecimal o38h;
    @ApiModelProperty(value = "日最大o3值 监测值")
    private BigDecimal dayMaxO3;
    @ApiModelProperty(value = "o3 95百分位 监测值")
    private BigDecimal co95Percent;
    @ApiModelProperty(value = "o38h 90百分位 监测值")
    private BigDecimal o38h90Percnet;
    @ApiModelProperty(value = "tvoc 监测值")
    private BigDecimal tvoc;
    @ApiModelProperty(value = "tsp 监测值")
    private BigDecimal tsp;
    @ApiModelProperty(value = "nox监测值")
    private BigDecimal nox;
    /**
     * 气象值
     */
    @ApiModelProperty(value = "风速")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private BigDecimal winds;
    @ApiModelProperty(value = "气压")
    private BigDecimal pres;
    @ApiModelProperty(value = "湿度")
    @JsonFormat(shape = JsonFormat.Shape.STRING)

    private BigDecimal humi;
    @ApiModelProperty(value = "温度")
    @JsonFormat(shape = JsonFormat.Shape.STRING)

    private BigDecimal temp;
    @ApiModelProperty(value = "风向")
    @JsonFormat(shape = JsonFormat.Shape.STRING)

    private BigDecimal windd;
    @ApiModelProperty(value = "风力级别")
    private String windLevel;
    @ApiModelProperty(value = "风向 中文")
    private String windDirection;
    /**
     * 分指数值
     */
    @Excel(name = "PM2.5-分指数")
    @ApiModelProperty(value = "pm25 分指数")
    private Integer iaqiPm25;
    @Excel(name = "PM10-分指数")
    @ApiModelProperty(value = "pm10 分指数")
    private Integer iaqiPm10;
    @Excel(name = "SO2-分指数")
    @ApiModelProperty(value = "so2 分指数")
    private Integer iaqiSo2;
    @Excel(name = "NO2-分指数")
    @ApiModelProperty(value = "no2 分指数")
    private Integer iaqiNo2;
    @Excel(name = "CO-分指数")
    @ApiModelProperty(value = "co 分指数")
    private Integer iaqiCo;
    @Excel(name = "O3-分指数")
    @ApiModelProperty(value = "o3 分指数")
    private Integer iaqiO3;
    @Excel(name = "O3_8H-分指数")
    @ApiModelProperty(value = "o38h 分指数")
    private Integer iaqiO38h;
    /**
     * 综合指数值
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "pm25 综合指数")
    private BigDecimal ipmiPm25;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "pm10 综合指数")
    private BigDecimal ipmiPm10;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "so2 综合指数")
    private BigDecimal ipmiSo2;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "no2 综合指数")
    private BigDecimal ipmiNo2;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "co 综合指数")
    private BigDecimal ipmiCo;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "o3 综合指数")
    private BigDecimal ipmiO3;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "o38h 综合指数")
    private BigDecimal ipmiO38h;
    /**
     * 部分业务值
     */
    @ApiModelProperty(value = "首要污染物id")
    private String fkPollutantId;
    @ApiModelProperty(value = "首要污染物名称")
    private String fkPollutantName;
    @ApiModelProperty(value = "空气质量类别 id")
    private Integer fkAqiLevelId;
    @ApiModelProperty(value = "空气质量类别 名称")
    private String fkAqiLevelName;
    @ApiModelProperty(value = "空气质量类别 颜色")
    private String fkAqiLevelColor;
    @ApiModelProperty(value = "空气质量最大指数")
    private Integer maxIpmi;

    @Excel(name = "监测时间")
    @ApiModelProperty(value = "监测时间")
    private String monitorTime;

    @ApiModelProperty(value = "站点id")
    private String stationId;
    @ApiModelProperty(value = "站点名称")
    private String stationName;
    @ApiModelProperty(value = "经度")
    private BigDecimal longitude;
    @ApiModelProperty(value = "纬度")
    private BigDecimal latitude;
    @ApiModelProperty(value = "站点控制级别id")
    private Integer stationLevel;
    @ApiModelProperty(value = "站点控制级别名称")
    private String stationLevelName;

    @ApiModelProperty(value = "区县编号")
    private String regionCode;
    @Excel(name = "区域名称")
    @ApiModelProperty(value = "区县名称")
    private String regionName;
    @ApiModelProperty(value = "省份编号")
    private String provinceCode;
    @ApiModelProperty(value = "省份名称")
    private String provinceName;
    @ApiModelProperty(value = "区域级别")
    private String regionlevel;
    @ApiModelProperty(value = "日期别名")
    private String dateAlias;


    private Integer indexNo;


    public void setPmi(BigDecimal pmi) {
        this.pmi = pmi == null ? null : pmi.setScale(2, BigDecimal.ROUND_HALF_EVEN);
    }

    public void setPm25(BigDecimal pm25) {
        this.pm25 = pm25 == null ? null : pm25.setScale(0, BigDecimal.ROUND_HALF_EVEN);
    }

    public void setPm10(BigDecimal pm10) {
        this.pm10 = pm10 == null ? null : pm10.setScale(0, BigDecimal.ROUND_HALF_EVEN);
    }

    public void setSo2(BigDecimal so2) {
        this.so2 = so2 == null ? null : so2.setScale(0, BigDecimal.ROUND_HALF_EVEN);
    }

    public void setNo2(BigDecimal no2) {
        this.no2 = no2 == null ? null : no2.setScale(0, BigDecimal.ROUND_HALF_EVEN);
    }

    public void setCo(BigDecimal co) {
        this.co = co == null ? null : co.setScale(1, BigDecimal.ROUND_HALF_EVEN);
    }

    public void setO3(BigDecimal o3) {
        this.o3 = o3 == null ? null : o3.setScale(0, BigDecimal.ROUND_HALF_EVEN);
    }

    public void setO38h(BigDecimal o38h) {
        this.o38h = o38h == null ? null : o38h.setScale(0, BigDecimal.ROUND_HALF_EVEN);
    }

    public void setDayMaxO3(BigDecimal dayMaxO3) {
        this.dayMaxO3 = dayMaxO3 == null ? null : dayMaxO3.setScale(0, BigDecimal.ROUND_HALF_EVEN);
    }
}
