package cn.cecep.talroad.vo.query;

import cn.cecep.talroad.common.core.domain.query.PageQuery;
import cn.cecep.talroad.domain.BMainPollDisSelfMon;
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_self_mon
 *
 * @author szhpt
 * @date 2023-01-18*/
@ApiModel(value = "排污许可自行监测要求")
@EqualsAndHashCode(callSuper = false)
@Data
public class BMainPollDisSelfMonQuery extends PageQuery
{

    @ApiModelProperty(value = "主键id")
    private Long monId;
    @ApiModelProperty(value = "企业id")
    private String factoryId;
    @ApiModelProperty(value = "排污许可表id")
    private String pollDisId;
    @ApiModelProperty(value = "污染物种类")
    private String pollutantType;
    @ApiModelProperty(value = "排放口编号")
    private String outletCode;
    @ApiModelProperty(value = "排放口名称")
    private String outletName;
    @ApiModelProperty(value = "监测内容")
    private String monitoringContent;
    @ApiModelProperty(value = "污染物名称")
    private String pollutantsName;
    @ApiModelProperty(value = "监测设施")
    private String monitoringFacility;
    @ApiModelProperty(value = "自动监测是否联网")
    private String monitoringAutomaticNetworking;
    @ApiModelProperty(value = "自动监测仪器名称")
    private String monitoringAutomaticName;
    @ApiModelProperty(value = "自动监测设施安装位置")
    private String monitoringAutomaticAddress;
    @ApiModelProperty(value = "自动监测实施是否符合管理要求")
    private String monitoringAutomaticRequire;
    @ApiModelProperty(value = "手工监测采样方法及个数")
    private String monitoringManualSampling;
    @ApiModelProperty(value = "手工监测频次")
    private String monitoringManualFrequency;
    @ApiModelProperty(value = "手工测定方法")
    private String monitoringManualMeans;
    @ApiModelProperty(value = "其他信息")
    private String otherInformation;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<BMainPollDisSelfMon> createLambdaQueryWrapper(BMainPollDisSelfMonQuery query) {
        QueryWrapper<BMainPollDisSelfMon> wrapper = new QueryWrapper<>();
        wrapper.eq(ObjectUtil.isNotNull(query.getMonId()), "mon_id", query.getMonId());
        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.getPollutantType()), "pollutant_type", query.getPollutantType());
        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.getMonitoringContent()), "monitoring_content", query.getMonitoringContent());
        wrapper.eq(ObjectUtil.isNotNull(query.getPollutantsName()), "pollutants_name", query.getPollutantsName());
        wrapper.eq(ObjectUtil.isNotNull(query.getMonitoringFacility()), "monitoring_facility", query.getMonitoringFacility());
        wrapper.eq(ObjectUtil.isNotNull(query.getMonitoringAutomaticNetworking()), "monitoring_automatic_networking", query.getMonitoringAutomaticNetworking());
        wrapper.eq(ObjectUtil.isNotNull(query.getMonitoringAutomaticName()), "monitoring_automatic_name", query.getMonitoringAutomaticName());
        wrapper.eq(ObjectUtil.isNotNull(query.getMonitoringAutomaticAddress()), "monitoring_automatic_address", query.getMonitoringAutomaticAddress());
        wrapper.eq(ObjectUtil.isNotNull(query.getMonitoringAutomaticRequire()), "monitoring_automatic_require", query.getMonitoringAutomaticRequire());
        wrapper.eq(ObjectUtil.isNotNull(query.getMonitoringManualSampling()), "monitoring_manual_sampling", query.getMonitoringManualSampling());
        wrapper.eq(ObjectUtil.isNotNull(query.getMonitoringManualFrequency()), "monitoring_manual_frequency", query.getMonitoringManualFrequency());
        wrapper.eq(ObjectUtil.isNotNull(query.getMonitoringManualMeans()), "monitoring_manual_means", query.getMonitoringManualMeans());
        wrapper.eq(ObjectUtil.isNotNull(query.getOtherInformation()), "other_information", query.getOtherInformation());
        wrapper.orderByAsc("outlet_code");
        return wrapper;
        }
}
