package cn.cecep.talroad.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;


@Data
public class BasTarget {
    @ApiModelProperty(value = "aqi 现状")
    private BigDecimal aqi;
    @ApiModelProperty(value = "pm25 现状")
    private BigDecimal pm25;
    @ApiModelProperty(value = "pm10 现状")
    private BigDecimal pm10;
    @ApiModelProperty(value = "so2 现状")
    private BigDecimal so2;
    @ApiModelProperty(value = "no2 现状")
    private BigDecimal no2;
    @ApiModelProperty(value = "co 现状")
    private BigDecimal co;
    @ApiModelProperty(value = "o3 现状")
    private BigDecimal o3;
    @ApiModelProperty(value = "pmi 现状")
    private BigDecimal pmi;
    @ApiModelProperty(value = "o3超标天数 现状")
    private Integer o3Days;
    @ApiModelProperty(value = "co超标天数 现状")
    private Integer coDays;
    @ApiModelProperty(value = "优良天数 现状")
    private Integer goodDays;
    @ApiModelProperty(value = "重污染天数 现状")
    private Integer heavyDays;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "aqi 目标值")
    private BigDecimal aqiTarget;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "pm25 目标值")
    private BigDecimal pm25Target;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "pm10 目标值")
    private BigDecimal pm10Target;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "so2 目标值")
    private BigDecimal so2Target;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "no2 目标值")
    private BigDecimal no2Target;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "co 目标值")
    private BigDecimal coTarget;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "o3 目标值")
    private BigDecimal o3Target;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "pmi 目标值")
    private BigDecimal pmiTarget;
    @ApiModelProperty(value = "o3超标天数 目标值")
    private Integer o3DaysTarget;
    @ApiModelProperty(value = "co超标天数 目标值")
    private Integer coDaysTarget;
    @ApiModelProperty(value = "优良天数 目标值")
    private Integer goodDaysTarget;
    @ApiModelProperty(value = "重污染天数 目标值")
    private Integer heavyDaysTarget;


    public void setTargetNumber(Integer timeType) {
        if(timeType == 2){
            this.pm25Target = new BigDecimal(18);
            this.aqiTarget = new BigDecimal(10);
            this.pm10Target = new BigDecimal(30);
            this.so2Target = new BigDecimal(8);
            this.no2Target = new BigDecimal(21);
            this.coTarget = new BigDecimal(0.9);
            this.o3Target = new BigDecimal(160);
            this.pmiTarget = new BigDecimal(2.83);
            this.o3DaysTarget = 10;
            this.coDaysTarget = 10;
            this.goodDaysTarget = 1;
            this.heavyDaysTarget = 10;
        }
        if(timeType == 3){
            this.pm25Target = new BigDecimal(20);
            this.aqiTarget = new BigDecimal(10);
            this.pm10Target = new BigDecimal(35);
            this.so2Target = new BigDecimal(8);
            this.no2Target = new BigDecimal(18);
            this.coTarget = new BigDecimal(0.8);
            this.o3Target = new BigDecimal(160);
            this.pmiTarget = new BigDecimal(2.85);
            this.o3DaysTarget = 3;
            this.coDaysTarget = 10;
            this.goodDaysTarget = 28;
            this.heavyDaysTarget = 0;
        }
        if(timeType == 4){
            this.pm25Target = new BigDecimal(35);
            this.aqiTarget = new BigDecimal(10);
            this.pm10Target = new BigDecimal(65);
            this.so2Target = new BigDecimal(10);
            this.no2Target = new BigDecimal(20);
            this.coTarget = new BigDecimal(1);
            this.o3Target = new BigDecimal(160);
            this.pmiTarget = new BigDecimal(3.85);
            this.o3DaysTarget = 10;
            this.coDaysTarget = 10;
            this.goodDaysTarget = 330;
            this.heavyDaysTarget = 2;
        }
    }
}
