package cn.cecep.talroad.domain.analysis;

import cn.cecep.talroad.common.core.annotation.Excel;
import cn.cecep.talroad.vo.query.analysis.SRaOverWaterPollutionTraceabilityQuery;import cn.hutool.core.util.ObjectUtil;import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 水污染溯源信息
 */
@ApiModel(description = "水污染溯源信息")
@Data
@TableName(value = "s_ra_over_water_pollution_traceability")
public class SRaOverWaterPollutionTraceability implements Serializable {
    public static final String COL_RECEIVING_SEWAGE_PLANT = "receiving_sewage_plant";
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.INPUT)
    @ApiModelProperty(value = "主键")
    private String id;

    /**
     * 排口编号
     */
    @TableField(value = "outlet_code")
    @ApiModelProperty(value = "排口编号")
    @Excel(width = 30,name = "排口编号",sort = 1)
    private String outletCode;

    /**
     * 排口名称
     */
    @TableField(value = "outlet_name")
    @ApiModelProperty(value = "排口名称")
    @Excel(width = 30,name = "排口名称",sort = 2)
    private String outletName;

    /**
     * 排口当前数值
     */
    @TableField(value = "outlet_number")
    @ApiModelProperty(value = "排口当前数值")
    private String outletNumber;

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

    /**
     * 企业名
     */
    @TableField(value = "factory_name")
    @ApiModelProperty(value = "企业名")
    @Excel(width = 30,name = "企业名",sort = 3)
    private String factoryName;

    /**
     * 对应监测点位名称
     */
    @TableField(value = "monitoring_point_name")
    @ApiModelProperty(value = "对应监测点位名称")
    @Excel(width = 30,name = "对应监测点位名称",sort = 4)
    private String monitoringPointName;

    /**
     * 排放方式（0:直接排放，1:间接排放）
     */
    @TableField(value = "emission_method")
    @ApiModelProperty(value = "排放方式（0:直接排放，1:间接排放）")
    @Excel(width = 30,name = "排放方式",sort = 5)
    private String emissionMethod;

    /**
     * 排水去向
     */
    @TableField(value = "drainage_direction")
    @ApiModelProperty(value = "排水去向")
    @Excel(width = 30,name = "排水去向",sort = 6)
    private String drainageDirection;

    /**
     * 排放规律
     */
    @TableField(value = "emission_behavior")
    @ApiModelProperty(value = "排放规律")
    @Excel(width = 30,name = "排放规律",sort = 7)
    private String emissionBehavior;

    /**
     * 间歇式排放时段
     */
    @TableField(value = "intermittent_emission_period")
    @ApiModelProperty(value = "间歇式排放时段")
    @Excel(width = 30,name = "间歇式排放时段",sort = 8)
    private String intermittentEmissionPeriod;

    /**
     * 受纳污水处理厂名称（间接排放口需要存）
     */
    @TableField(value = "receiving_sewage_plant_name")
    @ApiModelProperty(value = "受纳污水处理厂名称（间接排放口需要存）")
    private String receivingSewagePlantName;

    /**
     * 受纳污水处理厂编号（间接排放口需要存）
     */
    @TableField(value = "receiving_sewage_plant_code")
    @ApiModelProperty(value = "受纳污水处理厂编号（间接排放口需要存）")
    private String receivingSewagePlantCode;

    /**
     * 受纳水体名称（直接排放口需要存）
     */
    @TableField(value = "receiving_water_name")
    @ApiModelProperty(value = "受纳水体名称（直接排放口需要存）")
    private String receivingWaterName;

    /**
     * 受纳水体功能目标（直接排放口需要存）
     */
    @TableField(value = "receiving_target")
    @ApiModelProperty(value = "受纳水体功能目标（直接排放口需要存）")
    private String receivingTarget;

    /**
     * 入河口名称（直接排放口需要存）
     */
    @TableField(value = "estuary_name")
    @ApiModelProperty(value = "入河口名称（直接排放口需要存）")
    private String estuaryName;

    /**
     * 入河口编号（直接排放口需要存）
     */
    @TableField(value = "estuary_code")
    @ApiModelProperty(value = "入河口编号（直接排放口需要存）")
    private String estuaryCode;

    /**
     * 排口经度
     */
    @TableField(value = "outlet_longitude")
    @ApiModelProperty(value = "排口经度")
    private String outletLongitude;

    /**
     * 排口纬度
     */
    @TableField(value = "outlet_latitude")
    @ApiModelProperty(value = "排口纬度")
    private String outletLatitude;

    /**
     * 受纳污水处理厂经度（间接排放口需要存）
     */
    @TableField(value = "receiving_sewage_plant_longitude")
    @ApiModelProperty(value = "受纳污水处理厂经度（间接排放口需要存）")
    private String receivingSewagePlantLongitude;

    /**
     * 受纳污水处理厂经度（间接排放口需要存）
     */
    @TableField(value = "receiving_sewage_plant_latitude")
    @ApiModelProperty(value = "受纳污水处理厂经度（间接排放口需要存）")
    private String receivingSewagePlantLatitude;

    /**
     * 入河口经度（直接排放口需要存）
     */
    @TableField(value = "estuary_longitude")
    @ApiModelProperty(value = "入河口经度（直接排放口需要存）")
    private String estuaryLongitude;

    /**
     * 入河口纬度（直接排放口需要存）
     */
    @TableField(value = "estuary_latitude")
    @ApiModelProperty(value = "入河口纬度（直接排放口需要存）")
    private String estuaryLatitude;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 创建人
     */
    @TableField(value = "create_by")
    @ApiModelProperty(value = "创建人")
    private String createBy;

    /**
     * 更新人
     */
    @TableField(value = "update_by")
    @ApiModelProperty(value = "更新人")
    private String updateBy;

    /**
     * 最新报警信息
     */
    @TableField(value = "alarm_info")
    @ApiModelProperty(value = "最新报警信息")
    private String alarmInfo;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_OUTLET_CODE = "outlet_code";

    public static final String COL_OUTLET_NAME = "outlet_name";

    public static final String COL_OUTLET_NUMBER = "outlet_number";

    public static final String COL_FACTORY_ID = "factory_id";

    public static final String COL_FACTORY_NAME = "factory_name";

    public static final String COL_MONITORING_POINT_NAME = "monitoring_point_name";

    public static final String COL_EMISSION_METHOD = "emission_method";

    public static final String COL_DRAINAGE_DIRECTION = "drainage_direction";

    public static final String COL_EMISSION_BEHAVIOR = "emission_behavior";

    public static final String COL_INTERMITTENT_EMISSION_PERIOD = "intermittent_emission_period";

    public static final String COL_RECEIVING_SEWAGE_PLANT_NAME = "receiving_sewage_plant_name";

    public static final String COL_RECEIVING_SEWAGE_PLANT_CODE = "receiving_sewage_plant_code";

    public static final String COL_RECEIVING_WATER_NAME = "receiving_water_name";

    public static final String COL_RECEIVING_TARGET = "receiving_target";

    public static final String COL_ESTUARY_NAME = "estuary_name";

    public static final String COL_ESTUARY_CODE = "estuary_code";

    public static final String COL_OUTLET_LONGITUDE = "outlet_longitude";

    public static final String COL_OUTLET_LATITUDE = "outlet_latitude";

    public static final String COL_RECEIVING_SEWAGE_PLANT_LONGITUDE = "receiving_sewage_plant_longitude";

    public static final String COL_RECEIVING_SEWAGE_PLANT_LATITUDE = "receiving_sewage_plant_latitude";

    public static final String COL_ESTUARY_LONGITUDE = "estuary_longitude";

    public static final String COL_ESTUARY_LATITUDE = "estuary_latitude";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_CREATE_BY = "create_by";

    public static final String COL_UPDATE_BY = "update_by";

    public static final String COL_ALARM_INFO = "alarm_info";

    public static QueryWrapper<cn.cecep.talroad.domain.analysis.SRaOverWaterPollutionTraceability> createLambdaQueryWrapper(SRaOverWaterPollutionTraceabilityQuery query) {
        QueryWrapper<cn.cecep.talroad.domain.analysis.SRaOverWaterPollutionTraceability> wrapper = new QueryWrapper<>();
        wrapper.eq(ObjectUtil.isNotEmpty(query.getId()), "id", query.getId());
        wrapper.eq(ObjectUtil.isNotEmpty(query.getFactoryName()), "factory_name", query.getFactoryName());
        wrapper.eq(ObjectUtil.isNotEmpty(query.getOutletName()), "outlet_name", query.getOutletName());
        wrapper.eq(ObjectUtil.isNotEmpty(query.getEmissionMethod()), "emission_method", query.getEmissionMethod());
        wrapper.eq(ObjectUtil.isNotEmpty(query.getDrainageDirection()), "drainage_direction", query.getDrainageDirection());
        wrapper.eq(ObjectUtil.isNotEmpty(query.getEstuaryCode()), "estuary_code", query.getEstuaryCode());
        wrapper.eq(ObjectUtil.isNotEmpty(query.getReceivingSewagePlantName()), "receiving_sewage_plant_name", query.getReceivingSewagePlantName());
        return wrapper;
    }
}