package cn.cecep.talroad.vo.query;

import cn.cecep.talroad.common.core.domain.query.PageQuery;
import cn.cecep.talroad.domain.BMainPollDisInformation;
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_information
 *
 * @author szhpt
 * @date 2023-01-18*/
@ApiModel(value = "排污许可信息公开")
@EqualsAndHashCode(callSuper = false)
@Data
public class BMainPollDisInformationQuery extends PageQuery
{

    @ApiModelProperty(value = "主键id")
    private Long informationId;
    @ApiModelProperty(value = "企业id")
    private String factoryId;
    @ApiModelProperty(value = "排污许可表id")
    private String pollDisId;
    @ApiModelProperty(value = "公开方式")
    private String openProcedure;
    @ApiModelProperty(value = "时间节点")
    private String timeNodes;
    @ApiModelProperty(value = "公开内容")
    private String openContent;
    @ApiModelProperty(value = "其他信息")
    private String otherInformation;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<BMainPollDisInformation> createLambdaQueryWrapper(BMainPollDisInformationQuery query) {
        QueryWrapper<BMainPollDisInformation> wrapper = new QueryWrapper<>();
        wrapper.eq(ObjectUtil.isNotNull(query.getInformationId()), "information_id", query.getInformationId());
        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.getOpenProcedure()), "open_procedure", query.getOpenProcedure());
        wrapper.eq(ObjectUtil.isNotNull(query.getTimeNodes()), "time_nodes", query.getTimeNodes());
        wrapper.eq(ObjectUtil.isNotNull(query.getOpenContent()), "open_content", query.getOpenContent());
        wrapper.eq(ObjectUtil.isNotNull(query.getOtherInformation()), "other_information", query.getOtherInformation());
        return wrapper;
        }
}
