package cn.cecep.talroad.domain.analysis;


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 com.fasterxml.jackson.annotation.JsonFormat;
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;


/**
 * 关联分析系统-企业自行监测数据对象 s_ra_self_monitoring_data
 *
 * @author szhpt
 * @date 2023-06-27*/
@ApiModel(value = "关联分析系统-企业自行监测数据")
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("s_ra_self_monitoring_data")
public class SRaSelfMonitoringData extends BaseEntity
{
    private static final long serialVersionUID = 1L;


    @ApiModelProperty(value = "数据主键")
    /** 数据主键 */
    @TableId(value = "data_id",type = IdType.AUTO)
    private String dataId;


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

    @Excel(name = "污染物类型")
    private String pollutantsType;

    @ApiModelProperty(value = "企业名称")
    /** 企业名称 */
    @Excel(name = "企业名称")
    private String factoryName;

    @ApiModelProperty(value = "所在区县名称")
    /** 所在区县名称 */
    @Excel(name = "区县名称")
    private String districtName;


    @ApiModelProperty(value = "所在区县编码")
    /** 所在区县编码 */
    private String districtCode;

    @ApiModelProperty(value = "存企业表排污许可行业字段类别名称(多个使用'、'拼接)")
    /** 存企业表排污许可行业字段类别名称(多个使用'、'拼接) */
    @Excel(name = "行业名称")
    private String industryCategoryName;


    @ApiModelProperty(value = "存企业表排污许可行业字段类别编码(多个使用'、'拼接)")
    /** 存企业表排污许可行业字段类别编码(多个使用'、'拼接) */
    private String industryCategoryCode;


    @ApiModelProperty(value = "采样时间")
    /** 采样时间 */
    @Excel(name = "采样时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date monitorTime;

    @ApiModelProperty(value = "监测点名称")
    /** 监测点名称 */
    @Excel(name = "监测点名称")
    private String monitoringName;

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


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



    @ApiModelProperty(value = "监测点id")
    /** 监测点id */
    private String monitorId;


    @ApiModelProperty(value = "温度（%）")
    /** 温度（%） */
    @Excel(name = "温度")
    private String temperatureHumidity;

    @ApiModelProperty(value = "流速（m/s）")
    /** 流速（m/s） */
    @Excel(name = "流速")
    private String velocity;

    @ApiModelProperty(value = "生产负荷（%）")
    /** 生产负荷（%） */
    @Excel(name = "生产负荷")
    private String productionLoad;

    @ApiModelProperty(value = "含氧量（%）")
    /** 含氧量（%） */
    @Excel(name = "含氧量")
    private String oxygenContent;

    @ApiModelProperty(value = "湿度")
    /** 湿度 */
    @Excel(name = "湿度")
    private String humidity;

    @ApiModelProperty(value = "流量（m3/h）")
    /** 流量（m3/h） */
    @Excel(name = "流量")
    private String flow;

    @ApiModelProperty(value = "实测浓度")
    /** 实测浓度 */
    @Excel(name = "实测浓度")
    private String actualConcentration;


    @ApiModelProperty(value = "折算浓度")
    /** 折算浓度 */
    @Excel(name = "折算浓度")
    private String obversionConcentration;


    @ApiModelProperty(value = "限值上限")
    /** 限值上限 */
    @Excel(name = "限值上限")
    private String upperValue;


    @ApiModelProperty(value = "限值下限")
    /** 限值下限 */
    @Excel(name = "限值下限")
    private String lowerValue;


    @ApiModelProperty(value = "是否超标；0---否，1----是")
    /** 是否超标；0---否，1----是 */
    @Excel(name = "是否超标")
    private String exceedingStandard;

    @ApiModelProperty(value = "超标倍数")
    /** 超标倍数 */
    @Excel(name = "超标倍数")
    private String exceedingMultiple;


    @ApiModelProperty(value = "频次单位")
    /** 频次单位 */
    @Excel(name = "频次单位")
    private String frequencyUnit;

    @ApiModelProperty(value = "频次值")
    /** 频次值 */
    @Excel(name = "频次值")
    private String frequencyValue;

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


    public String getExceedingStandard() {
        return exceedingStandard;
    }

    public void setExceedingStandard(String exceedingStandard) {
        if(StringUtils.isNotBlank(exceedingStandard)){
            this.exceedingStandard = exceedingStandard.equals("1")?"是":"否";
        }else {
            this.exceedingStandard = exceedingStandard;
        }
    }

    public String getPollutantsType() {
        return pollutantsType;
    }

    public void setPollutantsType(String pollutantsType) {
        if(StringUtils.isNotBlank(pollutantsType)){
            this.pollutantsType = pollutantsType.equals("1")?"水":"气";
        }else {
            this.pollutantsType = pollutantsType;
        }
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("dataId", getDataId())
            .append("factoryId", getFactoryId())
            .append("factoryName", getFactoryName())
            .append("industryCategoryName", getIndustryCategoryName())
            .append("industryCategoryCode", getIndustryCategoryCode())
            .append("districtName", getDistrictName())
            .append("districtCode", getDistrictCode())
            .append("pollutantsName", getPollutantsName())
            .append("pollutantsCode", getPollutantsCode())
            .append("monitorTime", getMonitorTime())
            .append("createTime", getCreateTime())
            .append("monitorId", getMonitorId())
            .append("monitoringName", getMonitoringName())
            .append("flow", getFlow())
            .append("temperatureHumidity", getTemperatureHumidity())
            .append("oxygenContent", getOxygenContent())
            .append("velocity", getVelocity())
            .append("productionLoad", getProductionLoad())
            .append("actualConcentration", getActualConcentration())
            .append("obversionConcentration", getObversionConcentration())
            .append("upperValue", getUpperValue())
            .append("lowerValue", getLowerValue())
            .append("frequencyUnit", getFrequencyUnit())
            .append("exceedingStandard", getExceedingStandard())
            .append("exceedingMultiple", getExceedingMultiple())
            .append("humidity", getHumidity())
            .append("frequencyValue", getFrequencyValue())
            .append("reason", getReason())
            .toString();
    }
}
