package cn.cecep.talroad.vo.query;

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


/**
 * 排污许可大气主排放口对象 b_main_poll_dis_gas_mout
 *
 * @author szhpt
 * @date 2023-01-18*/
@ApiModel(value = "排污许可大气主排放口")
@EqualsAndHashCode(callSuper = false)
@Data
public class BMainPollDisGasMoutQuery extends PageQuery
{

    @ApiModelProperty(value = "主键id")
    private Long moutId;
    @ApiModelProperty(value = "企业id")
    private String factoryId;
    @ApiModelProperty(value = "排污许可表id")
    private String pollDisId;
    @ApiModelProperty(value = "排放口编号")
    private String outletCode;
    @ApiModelProperty(value = "排放口名称")
    private String outletName;
    @ApiModelProperty(value = "排放口是否合计")
    private String outletUseTotal;
    @ApiModelProperty(value = "污染物种类")
    private String pollutantsType;
    @ApiModelProperty(value = "许可排放小时浓度限值")
    private String pollutantsMgHour;
    @ApiModelProperty(value = "许可排放日均浓度限值")
    private String pollutantsMgDay;
    @ApiModelProperty(value = "许可排放速率限值")
    private String pollutantsMgRate;
    @ApiModelProperty(value = "第一年")
    private String pollutantsTotalFrist;
    @ApiModelProperty(value = "第二年")
    private String pollutantsTotalSecond;
    @ApiModelProperty(value = "第三年")
    private String pollutantsTotalThird;
    @ApiModelProperty(value = "第四年")
    private String pollutantsTotalFourth;
    @ApiModelProperty(value = "第五年")
    private String pollutantsTotalFifth;
    @ApiModelProperty(value = "承诺更加严格排放浓度限值")
    private String exactDemandsPollutantsMg;
    @ApiModelProperty(value = "排放口类型(主要排放口,一般排放口)")
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<BMainPollDisGasMout> createLambdaQueryWrapper(BMainPollDisGasMoutQuery query) {
        QueryWrapper<BMainPollDisGasMout> wrapper = new QueryWrapper<>();
        wrapper.eq(ObjectUtil.isNotNull(query.getMoutId()), "mout_id", query.getMoutId());
        wrapper.eq(ObjectUtil.isNotNull(query.getFactoryId()), "factory_id", query.getFactoryId());
        wrapper.eq(ObjectUtil.isNotNull(query.getPollDisId()), "poll_dis_id", query.getPollDisId());
        wrapper.eq(ObjectUtil.isNotNull(query.getOutletCode()), "outlet_code", query.getOutletCode());
        wrapper.eq(ObjectUtil.isNotNull(query.getOutletName()), "outlet_name", query.getOutletName());
        wrapper.eq(ObjectUtil.isNotNull(query.getOutletUseTotal()), "outlet_use_total", query.getOutletUseTotal());
        wrapper.eq(ObjectUtil.isNotNull(query.getPollutantsType()), "pollutants_type", query.getPollutantsType());
        wrapper.eq(ObjectUtil.isNotNull(query.getPollutantsMgHour()), "pollutants_mg_hour", query.getPollutantsMgHour());
        wrapper.eq(ObjectUtil.isNotNull(query.getPollutantsMgDay()), "pollutants_mg_day", query.getPollutantsMgDay());
        wrapper.eq(ObjectUtil.isNotNull(query.getPollutantsMgRate()), "pollutants_mg_rate", query.getPollutantsMgRate());
        wrapper.eq(ObjectUtil.isNotNull(query.getPollutantsTotalFrist()), "pollutants_total_frist", query.getPollutantsTotalFrist());
        wrapper.eq(ObjectUtil.isNotNull(query.getPollutantsTotalSecond()), "pollutants_total_second", query.getPollutantsTotalSecond());
        wrapper.eq(ObjectUtil.isNotNull(query.getPollutantsTotalThird()), "pollutants_total_third", query.getPollutantsTotalThird());
        wrapper.eq(ObjectUtil.isNotNull(query.getPollutantsTotalFourth()), "pollutants_total_fourth", query.getPollutantsTotalFourth());
        wrapper.eq(ObjectUtil.isNotNull(query.getPollutantsTotalFifth()), "pollutants_total_fifth", query.getPollutantsTotalFifth());
        wrapper.eq(ObjectUtil.isNotNull(query.getExactDemandsPollutantsMg()), "exact_demands_pollutants_mg", query.getExactDemandsPollutantsMg());
        wrapper.orderByAsc("outlet_code");
        return wrapper;
        }
}
