package cn.cecep.talroad.vo.query;

import cn.cecep.talroad.common.core.domain.query.PageQuery;
import cn.cecep.talroad.domain.BMainPollDisNoiseRegulation;
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_noise_regulation
 *
 * @author szhpt
 * @date 2023-01-18*/
@ApiModel(value = "排污许可其他许可改正规定")
@EqualsAndHashCode(callSuper = false)
@Data
public class BMainPollDisNoiseRegulationQuery extends PageQuery
{

    @ApiModelProperty(value = "主键id")
    private Long regulationId;
    @ApiModelProperty(value = "企业id")
    private String factoryId;
    @ApiModelProperty(value = "排污许可表id")
    private String pollDisId;
    @ApiModelProperty(value = "整改问题")
    private String rectificationProblem;
    @ApiModelProperty(value = "整改措施")
    private String rectificationMeasures;
    @ApiModelProperty(value = "整改时限")
    private String rectificationTime;
    @ApiModelProperty(value = "整改计划")
    private String rectificationPlan;
    @ApiModelProperty(value = "是否完成整改")
    private String rectificationIsComplete;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<BMainPollDisNoiseRegulation> createLambdaQueryWrapper(BMainPollDisNoiseRegulationQuery query) {
        QueryWrapper<BMainPollDisNoiseRegulation> wrapper = new QueryWrapper<>();
        wrapper.eq(ObjectUtil.isNotNull(query.getRegulationId()), "regulation_id", query.getRegulationId());
        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.getRectificationProblem()), "rectification_problem", query.getRectificationProblem());
        wrapper.eq(ObjectUtil.isNotNull(query.getRectificationMeasures()), "rectification_measures", query.getRectificationMeasures());
        wrapper.eq(ObjectUtil.isNotNull(query.getRectificationTime()), "rectification_time", query.getRectificationTime());
        wrapper.eq(ObjectUtil.isNotNull(query.getRectificationPlan()), "rectification_plan", query.getRectificationPlan());
        wrapper.eq(ObjectUtil.isNotNull(query.getRectificationIsComplete()), "rectification_is_complete", query.getRectificationIsComplete());
        return wrapper;
        }
}
