package cn.cecep.talroad.vo.query;

import cn.cecep.talroad.common.core.domain.query.PageQuery;
import cn.cecep.talroad.domain.BMainPollDisEnforcement;
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_enforcement
 *
 * @author szhpt
 * @date 2023-01-18*/
@ApiModel(value = "排污许可执行守法报告")
@EqualsAndHashCode(callSuper = false)
@Data
public class BMainPollDisEnforcementQuery extends PageQuery
{

    @ApiModelProperty(value = "主键id")
    private Long enforcementId;
    @ApiModelProperty(value = "企业id")
    private String factoryId;
    @ApiModelProperty(value = "排污许可表id")
    private String pollDisId;
    @ApiModelProperty(value = "类别")
    private String emlType;
    @ApiModelProperty(value = "记录内容")
    private String recordContent;
    @ApiModelProperty(value = "记录频次")
    private String recordFrequency;
    @ApiModelProperty(value = "记录形式")
    private String openContent;
    @ApiModelProperty(value = "其他信息")
    private String otherInformation;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<BMainPollDisEnforcement> createLambdaQueryWrapper(BMainPollDisEnforcementQuery query) {
        QueryWrapper<BMainPollDisEnforcement> wrapper = new QueryWrapper<>();
        wrapper.eq(ObjectUtil.isNotNull(query.getEnforcementId()), "enforcement_id", query.getEnforcementId());
        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.getEmlType()), "eml_type", query.getEmlType());
        wrapper.eq(ObjectUtil.isNotNull(query.getRecordContent()), "record_content", query.getRecordContent());
        wrapper.eq(ObjectUtil.isNotNull(query.getRecordFrequency()), "record_frequency", query.getRecordFrequency());
        wrapper.eq(ObjectUtil.isNotNull(query.getOpenContent()), "open_content", query.getOpenContent());
        wrapper.eq(ObjectUtil.isNotNull(query.getOtherInformation()), "other_information", query.getOtherInformation());
        return wrapper;
        }
}
