package cn.cecep.talroad.domain;


import cn.cecep.talroad.common.core.annotation.Excel;
import cn.cecep.talroad.common.core.web.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.Version;
import java.util.Date;


/**
 * 固定源产排治--执行报告--有组织废气污染物排放速率监测对象 b_stat_table_zxbg_gas_emission_speed
 *
 * @author szhpt
 * @date 2023-08-01*/
@ApiModel(value = "固定源产排治--执行报告--有组织废气污染物排放速率监测")
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("b_stat_table_zxbg_gas_emission_speed")
public class BStatTableZxbgGasEmissionSpeed extends BStatTableZxbgJbxxInfoFactoryBase
{
    private static final long serialVersionUID = 1L;


    @ApiModelProperty(value = "主键id")
    /** 主键id */
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;


    @ApiModelProperty(value = "企业id")
    /** 企业id */
    private String factoryId;


    @ApiModelProperty(value = "执行报告类型，0：月报，1：季报，2：年报")
    /** 执行报告类型，0：月报，1：季报，2：年报 */
    @Excel(name = "执行报告类型")
    private String zxbgType;


    @ApiModelProperty(value = "执行报告周期")
    /** 执行报告周期 */
    @Excel(name = "报告周期")
    private String zxbgPeriod;


    @ApiModelProperty(value = "排放口编码")
    /** 排放口编码 */
    @Excel(name = "排放口编码")
    private String outletCode;


    @ApiModelProperty(value = "排放口名称")
    /** 排放口名称 */
    @Excel(name = "排放口名称")
    private String outletName;






    @ApiModelProperty(value = "污染物名称")
    /** 污染物名称 */
    @Excel(name = "污染物名称")
    private String pollutantName;


    @ApiModelProperty(value = "污染物编码")
    /** 污染物编码 */
    @Excel(name = "污染物编码")
    private String pollutantCode;

    @ApiModelProperty(value = "有效监测数据(小时值)数量")
    /** 有效监测数据(小时值)数量 */
    @Excel(name = "有效监测数据(小时值)数量")
    private String effectivelyHour;

    @ApiModelProperty(value = "许可排放浓度限值")
    /** 许可排放浓度限值 */
    @Excel(name = "许可排放浓度限值")
    private String emissionConcentration;

    @ApiModelProperty(value = "实际排放速率最小值")
    /** 实际排放速率最小值 */
    @Excel(name = "实际排放速率最小值")
    private String detectionMinHour;


    @ApiModelProperty(value = "实际排放速率最大值")
    /** 实际排放速率最大值 */
    @Excel(name = "实际排放速率最大值")
    private String detectionMaxHour;


    @ApiModelProperty(value = "实际排放速率平均值")
    /** 实际排放速率平均值 */
    @Excel(name = "实际排放速率平均值")
    private String detectionAvgHour;


    @ApiModelProperty(value = "超标数据个数")
    /** 超标数据个数 */
    @Excel(name = "超标数据个数")
    private String exceededData;


    @ApiModelProperty(value = "超标率（%）")
    /** 超标率（%） */
    @Excel(name = "超标率（%）")
    private String exceededRate;


    @ApiModelProperty(value = "超标原因")
    /** 超标原因 */
    @Excel(name = "超标原因")
    private String exceededCause;

    public String getZxbgType() {
        return zxbgType;
    }

    public void setZxbgType(String zxbgType) {
        //0：月报，1：季报，2：年报
        if(StringUtils.isNotBlank(zxbgType)){
            if(zxbgType.equals("0")){this.zxbgType = "月报";}
            if(zxbgType.equals("1")){this.zxbgType = "季报";}
            if(zxbgType.equals("2")){this.zxbgType = "年报";}
        }else {
            this.zxbgType = zxbgType;
        }
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("factoryId", getFactoryId())
            .append("zxbgType", getZxbgType())
            .append("zxbgPeriod", getZxbgPeriod())
            .append("outletCode", getOutletCode())
            .append("outletName", getOutletName())
            .append("remark", getRemark())
            .append("createTime", getCreateTime())
            .append("pollutantName", getPollutantName())
            .append("pollutantCode", getPollutantCode())
            .append("emissionConcentration", getEmissionConcentration())
            .append("effectivelyHour", getEffectivelyHour())
            .append("detectionMinHour", getDetectionMinHour())
            .append("detectionMaxHour", getDetectionMaxHour())
            .append("detectionAvgHour", getDetectionAvgHour())
            .append("exceededData", getExceededData())
            .append("exceededRate", getExceededRate())
            .append("exceededCause", getExceededCause())
            .toString();
    }
}
