package com.zcxk.charge.api.dto.homepage;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.zcxk.core.utils.jsonSerializer.BigDecimalJsonSerializer;
import com.zcxk.core.utils.jsonSerializer.BigDecimalJsonSerializerTwo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @description
 * @author  wangli
 * @data 2021/3/1 16:25
 */
@Api("水质安全")
@Data
public class WaterQualityRate {

    @ApiModelProperty("异常数量")
    private Integer abnormal;
    @ApiModelProperty("综合（平均）水质")
    @JsonSerialize(using = BigDecimalJsonSerializerTwo.class)
    private BigDecimal averageQuality;
    @ApiModelProperty("水源水质")
    @JsonSerialize(using = BigDecimalJsonSerializer.class)
    private BigDecimal waterSourceQuality;
    @ApiModelProperty("水厂水质")
    @JsonSerialize(using = BigDecimalJsonSerializer.class)
    private BigDecimal waterFactoryQuality;
    @ApiModelProperty("二供（泵站）水质")
    @JsonSerialize(using = BigDecimalJsonSerializer.class)
    private BigDecimal pumpingStationQuality;
    @ApiModelProperty("管网水质")
    @JsonSerialize(using = BigDecimalJsonSerializer.class)
    private BigDecimal pipeNetworkQuality;

    @ApiModelProperty("水源异常数量")
    private Integer waterSourceAbnormal;
    @ApiModelProperty("水厂异常数量")
    private Integer waterFactoryAbnormal;
    @ApiModelProperty("泵站异常数量")
    private Integer pumpingStationAbnormal;
    @ApiModelProperty("管网异常数量")
    private Integer pipeNetworkAbnormal;

    public WaterQualityRate(){
        this.abnormal=0;
        this.waterSourceAbnormal=0;
        this.waterFactoryAbnormal=0;
        this.pumpingStationAbnormal=0;
        this.pipeNetworkAbnormal=0;
        this.averageQuality=new BigDecimal("100");
        this.waterSourceQuality=new BigDecimal("100");
        this.waterFactoryQuality=new BigDecimal("100");
        this.pumpingStationQuality=new BigDecimal("100");
        this.pipeNetworkQuality=new BigDecimal("100");
    }

}
