package cn.cecep.talroad.vo.query;

import cn.cecep.talroad.common.core.domain.query.PageQuery;
import cn.cecep.talroad.domain.BMainPollDisEmlRecord;
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_eml_record
 *
 * @author szhpt
 * @date 2023-01-18*/
@ApiModel(value = "排污许可环境管理台账")
@EqualsAndHashCode(callSuper = false)
@Data
public class BMainPollDisEmlRecordQuery extends PageQuery
{

    @ApiModelProperty(value = "主键id")
    private Long emlId;
    @ApiModelProperty(value = "企业id")
    private String factoryId;
    @ApiModelProperty(value = "排污许可表id")
    private String pollDisId;
    @ApiModelProperty(value = "其他信息")
    private String othersInformation;
    @ApiModelProperty(value = "主要内容")
    private String mainContent;
    @ApiModelProperty(value = "上报频次")
    private String reportingFrequency;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<BMainPollDisEmlRecord> createLambdaQueryWrapper(BMainPollDisEmlRecordQuery query) {
        QueryWrapper<BMainPollDisEmlRecord> wrapper = new QueryWrapper<>();
        wrapper.eq(ObjectUtil.isNotNull(query.getEmlId()), "eml_id", query.getEmlId());
        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.getOthersInformation()), "others_information", query.getOthersInformation());
        wrapper.eq(ObjectUtil.isNotNull(query.getMainContent()), "main_content", query.getMainContent());
        wrapper.eq(ObjectUtil.isNotNull(query.getReportingFrequency()), "reporting_frequency", query.getReportingFrequency());
        return wrapper;
        }
}
