package cn.cecep.talroad.vo.query;

import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.cecep.talroad.domain.BStatTableZxbgWrzlAbnormalities;
import cn.cecep.talroad.common.core.domain.query.PageQuery;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;


/**
 * 固定源产排治--执行报告--污染治理设施异常情况对象 b_stat_table_zxbg_wrzl_abnormalities
 *
 * @author szhpt
 * @date 2023-07-31*/
@ApiModel(value = "固定源产排治--执行报告--污染治理设施异常情况")
@EqualsAndHashCode(callSuper = false)
@Data
public class BStatTableZxbgWrzlAbnormalitiesQuery extends PageQuery
{

    @ApiModelProperty(value = "主键id")
    private Long id;
    @ApiModelProperty(value = "企业id")
    private String factoryId;
    @ApiModelProperty(value = "执行报告类型，0：月报，1：季报，2：年报")
    private String zxbgType;
    @ApiModelProperty(value = "执行报告周期")
    private String zxbgPeriod;
    @ApiModelProperty(value = "类型")
    private String zxbgPollutantType;
    @ApiModelProperty(value = "超标开始时间")
    private String overStartTime;
    @ApiModelProperty(value = "超标结束时间")
    private String overEndTime;
    @ApiModelProperty(value = "故障设备名称")
    private String facilityName;
    @ApiModelProperty(value = "故障设备编号")
    private String facilityCode;
    @ApiModelProperty(value = "污染因子")
    private String zxbgPollutant;
    @ApiModelProperty(value = "排放范围")
    private String dischargeRange;
    @ApiModelProperty(value = "应对措施")
    private String solutions;
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    @ApiModelProperty(value = "备注")
    private String remark;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<BStatTableZxbgWrzlAbnormalities> createLambdaQueryWrapper(BStatTableZxbgWrzlAbnormalitiesQuery query) {
        QueryWrapper<BStatTableZxbgWrzlAbnormalities> wrapper = new QueryWrapper<>();
        wrapper.eq(ObjectUtil.isNotNull(query.getId()), "id", query.getId());
        wrapper.eq(ObjectUtil.isNotNull(query.getFactoryId()), "factory_id", query.getFactoryId());
        wrapper.eq(ObjectUtil.isNotNull(query.getZxbgType()), "zxbg_type", query.getZxbgType());
        wrapper.eq(ObjectUtil.isNotNull(query.getZxbgPeriod()), "zxbg_period", query.getZxbgPeriod());
        wrapper.eq(ObjectUtil.isNotNull(query.getZxbgPollutantType()), "zxbg_pollutant_type", query.getZxbgPollutantType());
        wrapper.eq(ObjectUtil.isNotNull(query.getOverStartTime()), "over_start_time", query.getOverStartTime());
        wrapper.eq(ObjectUtil.isNotNull(query.getOverEndTime()), "over_end_time", query.getOverEndTime());
        wrapper.eq(ObjectUtil.isNotNull(query.getFacilityName()), "facility_name", query.getFacilityName());
        wrapper.eq(ObjectUtil.isNotNull(query.getFacilityCode()), "facility_code", query.getFacilityCode());
        wrapper.eq(ObjectUtil.isNotNull(query.getZxbgPollutant()), "zxbg_pollutant", query.getZxbgPollutant());
        wrapper.eq(ObjectUtil.isNotNull(query.getDischargeRange()), "discharge_range", query.getDischargeRange());
        wrapper.eq(ObjectUtil.isNotNull(query.getSolutions()), "solutions", query.getSolutions());
        wrapper.eq(ObjectUtil.isNotNull(query.getCreateTime()), "create_time", query.getCreateTime());
        wrapper.eq(ObjectUtil.isNotNull(query.getRemark()), "remark", query.getRemark());
        return wrapper;
        }
}
