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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;


/**
 * 在线监测排放监控-水污染要素对象 s_ra_online_emissions_water
 *
 * @author szhpt
 * @date 2023-03-24
 */
@ApiModel(value = "在线监测排放监控-水污染要素")
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("s_ra_online_emissions_water")
@NoArgsConstructor
public class SRaOnlineEmissionsWater extends BaseEntity {
    private static final long serialVersionUID = 1L;


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


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


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


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


    @ApiModelProperty(value = "排口类型")
    /** 排口类型 */
    @Excel(name = "排口类型")
    private String outletType;


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

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


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


    @ApiModelProperty(value = "浓度日均值")
    /** 浓度日均值 */
    @Excel(name = "浓度日均值")
    private String dayAvg;


    @ApiModelProperty(value = "浓度单位")
    /** 浓度单位 */
    @Excel(name = "浓度单位")
    private String unit;


    @ApiModelProperty(value = "废水流量（m³/d）")
    /** 废水流量（m³/d） */
    @Excel(name = "废水流量", readConverterExp = "m=³/d")
    private String wasteWaterFlow;


    @ApiModelProperty(value = "污染物排放量（kg）")
    /** 污染物排放量（kg） */
    @Excel(name = "污染物排放量", readConverterExp = "k=g")
    private String pollutantEmissions;


    @ApiModelProperty(value = "是否有效")
    /** 是否有效 */
    @Excel(name = "是否有效")
    private String isValid;


    @ApiModelProperty(value = "修约排放量")
    /** 修约排放量 */
    @Excel(name = "修约排放量")
    private String xyEmissions;


    @ApiModelProperty(value = "修约说明")
    /** 修约说明 */
    @Excel(name = "修约说明")
    private String xyDesc;


    @ApiModelProperty(value = "纳入计算排放量（kg）")
    /** 纳入计算排放量（kg） */
    @Excel(name = "纳入计算排放量", readConverterExp = "k=g")
    private String bringIntoEmissions;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("factoryId", getFactoryId())
                .append("pointName", getPointName())
                .append("outletCode", getOutletCode())
                .append("outletType", getOutletType())
                .append("pollutantName", getPollutantName())
                .append("monitorTime", getMonitorTime())
                .append("dayAvg", getDayAvg())
                .append("unit", getUnit())
                .append("wasteWaterFlow", getWasteWaterFlow())
                .append("pollutantEmissions", getPollutantEmissions())
                .append("isValid", getIsValid())
                .append("xyEmissions", getXyEmissions())
                .append("xyDesc", getXyDesc())
                .append("bringIntoEmissions", getBringIntoEmissions())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }

    public SRaOnlineEmissionsWater(String factoryId,
                                 String outletCode,
                                 String outletType,
                                 Date monitorTime,
                                 String wasteWaterFlow){
        this.factoryId = factoryId;
        this.outletCode = outletCode;
        this.outletType = outletType;
        this.monitorTime = monitorTime;
        this.wasteWaterFlow = wasteWaterFlow;
    }
}
