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.lang.StringUtils;

import java.util.Arrays;
import java.util.Date;


/**
 * 废气监测数据对象 s_env_gas_mon_real
 */
@ApiModel(value = "废气监测数据")
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("s_env_gas_mon_real")
public class SEnvGasMonReal extends BaseEntity
{
    private static final long serialVersionUID = 1L;


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


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


    @ApiModelProperty(value = "排口id")
    /** 排口id */
    @Excel(name = "排口id")
    private String outletId;


    @ApiModelProperty(value = "数据类型（日：d；小时：h；分钟：m）")
    /** 数据类型（日：d；小时：h；分钟：m） */
    @Excel(name = "数据类型", readConverterExp = "日=：d；小时：h；分钟：m")
    private String dataType;


    @ApiModelProperty(value = "日期")
    /** 日期 */
    @Excel(name = "日期")
    private String monitoringTime;


    @ApiModelProperty(value = "二氧化硫")
    /** 二氧化硫 */
    @Excel(name = "二氧化硫")
    private String so2;


    @ApiModelProperty(value = "二氧化硫折算")
    /** 二氧化硫折算 */
    @Excel(name = "二氧化硫折算")
    private String so2Convert;


    @ApiModelProperty(value = "二氧化硫排放量")
    /** 二氧化硫排放量 */
    @Excel(name = "二氧化硫排放量")
    private String so2Emission;


    @ApiModelProperty(value = "氮氧化物")
    /** 氮氧化物 */
    @Excel(name = "氮氧化物")
    private String nox;


    @ApiModelProperty(value = "氮氧化物折算")
    /** 氮氧化物折算 */
    @Excel(name = "氮氧化物折算")
    private String noxConvert;


    @ApiModelProperty(value = "氮氧化物排放量")
    /** 氮氧化物排放量 */
    @Excel(name = "氮氧化物排放量")
    private String noxEmission;


    @ApiModelProperty(value = "一氧化氮")
    /** 一氧化氮 */
    @Excel(name = "一氧化氮")
    private String no;


    @ApiModelProperty(value = "一氧化氮折算")
    /** 一氧化氮折算 */
    @Excel(name = "一氧化氮折算")
    private String noConvert;


    @ApiModelProperty(value = "一氧化氮排放量")
    /** 一氧化氮排放量 */
    @Excel(name = "一氧化氮排放量")
    private String noEmission;


    @ApiModelProperty(value = "二氧化氮")
    /** 二氧化氮 */
    @Excel(name = "二氧化氮")
    private String no2;


    @ApiModelProperty(value = "二氧化氮折算")
    /** 二氧化氮折算 */
    @Excel(name = "二氧化氮折算")
    private String no2Convert;


    @ApiModelProperty(value = "二氧化氮排放量")
    /** 二氧化氮排放量 */
    @Excel(name = "二氧化氮排放量")
    private String no2Emission;


    @ApiModelProperty(value = "烟尘")
    /** 烟尘 */
    @Excel(name = "烟尘")
    private String smokeDust;


    @ApiModelProperty(value = "烟尘折算")
    /** 烟尘折算 */
    @Excel(name = "烟尘折算")
    private String smokeDustConvert;


    @ApiModelProperty(value = "烟尘排放量")
    /** 烟尘排放量 */
    @Excel(name = "烟尘排放量")
    private String smokeDustEmission;


    @ApiModelProperty(value = "颗粒物实测")
    /** 颗粒物实测 */
    @Excel(name = "颗粒物实测")
    private String pm;


    @ApiModelProperty(value = "颗粒物折算")
    /** 颗粒物折算 */
    @Excel(name = "颗粒物折算")
    private String pmConvert;


    @ApiModelProperty(value = "颗粒物排放量")
    /** 颗粒物排放量 */
    @Excel(name = "颗粒物排放量")
    private String pmEmission;


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


    @ApiModelProperty(value = "vocs折算")
    /** vocs折算 */
    @Excel(name = "vocs折算")
    private String vocsConvert;


    @ApiModelProperty(value = "vocs排放量")
    /** vocs排放量 */
    @Excel(name = "vocs排放量")
    private String vocsEmission;


    @ApiModelProperty(value = "氧气含量")
    /** 氧气含量 */
    @Excel(name = "氧气含量")
    private String o3;


    @ApiModelProperty(value = "废气")
    /** 废气 */
    @Excel(name = "废气")
    private String oxygen;

    @ApiModelProperty(value = "烟气温度")
    /** 烟气温度 */
    @Excel(name = "烟气温度")
    private String smokeDustTem;


    @ApiModelProperty(value = "烟气压力")
    /** 烟气压力 */
    @Excel(name = "烟气压力")
    private String smokeDustPressure;


    @ApiModelProperty(value = "烟气流速")
    /** 烟气流速 */
    @Excel(name = "烟气流速")
    private String smokeDustFlowVelocity;


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

    private Date dateTime;

    private String oxygenConvert;
    private String oxygenEmission;

    private String nmhc;
    private String nmhcConvert;
    private String nmhcEmission;

    private String so2Flag;
    private String noxFlag;
    private String noFlag;
    private String no2Flag;
    private String smokeDustFlag;
    private String pmFlag;
    private String vocsFlag;
    private String o3Flag;
    private String oxygenFlag;
    private String smokeDustTemFlag;
    private String smokeDustPressureFlag;
    private String smokeDustFlowVelocityFlag;
    private String smokeDustHumidityFlag;
    private String nmhcFlag;
    private String dataFlag;
	
	private String so2CorrectEmission;

    private String noxCorrectEmission;

    private String vocsCorrectEmission;

    private String smokeDustCorrectEmission;

    /**
     * dataFlag属性值枚举
     */
    public enum DataFlagEnum {
        SD("停炉过程"),
        SCGZ("生产设施故障"),
        GFBJ("国发非正常工况标记"),
        ST("启炉过程"),
        B("焖炉"),
        FA("停运");

        public final String label;

        DataFlagEnum(String label) {
            this.label = label;
        }
        public static DataFlagEnum getByEnumName(String name) {
            for (DataFlagEnum value : values()) {
                if (value.name().equals(name)) {
                    return value;
                }
            }
            return null;
        }
    }

    /**
     * 参数标记值枚举
     */
    public enum ParamFlagEnum {
        N("正常", false),
        S("设定值", false),
        P("电源故障", true),
        MD("无数据", true),
        M("维护", true),
        F("排放源停运", true),
        D("故障", true),
        C("校准", true),
        K("质控样比对", true),
        VGD("数采仪通讯异常", true),
        TD("温度传感器故障", true),
        ;

        public final String label;
        public final boolean show; // 问题详情是否展示

        ParamFlagEnum(String label, boolean show) {
            this.label = label;
            this.show = show;
        }
        public static ParamFlagEnum getByEnumName(String name) {
            if (name == null || name.length() == 0) {
                return null;
            }
            name = name.trim();
            for (ParamFlagEnum value : values()) {
                if (value.name().equals(name)) {
                    return value;
                }
            }
            return null;
        }
    }
}
