package cn.cecep.talroad.vo.query;

import cn.cecep.talroad.common.core.domain.query.PageQuery;
import cn.cecep.talroad.common.core.utils.StringUtils;
import cn.cecep.talroad.domain.BMainProductionInorgGas;
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_production_inorg_gas
 *
 * @author szhpt
 * @date 2023-02-08*/
@ApiModel(value = "废气无组织排放产治排信息")
@EqualsAndHashCode(callSuper = false)
@Data
public class BMainProductionInorgGasQuery extends PageQuery
{

    @ApiModelProperty(value = "主键id")
    private String id;
    @ApiModelProperty(value = "企业id")
    private String factoryId;
    @ApiModelProperty(value = "许可证无组织监测点位名称")
    private String licenceMonName;
    @ApiModelProperty(value = "监测类型")
    private String monitoringType;
    @ApiModelProperty(value = "无组织监测点位")
    private String monitoringInorganization;
    @ApiModelProperty(value = "主要污染防治措施")
    private String pollutionPrevention;
    @ApiModelProperty(value = "产污环节")
    private String pollutionProductionLink;
    @ApiModelProperty(value = "对应生产设施编号")
    private String correspondingProductionCode;
    @ApiModelProperty(value = "视频监控")
    private String devId;
    @ApiModelProperty(value = "对应生产设施名称")
    private String correspondingProductionName;
    @ApiModelProperty(value = "生产设施参数")
    private String proFacilityParam;
    @ApiModelProperty(value = "污染物种类")
    private String pollutionType;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<BMainProductionInorgGas> createLambdaQueryWrapper(BMainProductionInorgGasQuery query) {
        QueryWrapper<BMainProductionInorgGas> wrapper = new QueryWrapper<>();
        wrapper.eq(StringUtils.isNotEmpty(query.getId()), "id", query.getId());
        wrapper.eq(StringUtils.isNotEmpty(query.getFactoryId()), "factory_id", query.getFactoryId());
        wrapper.like(StringUtils.isNotEmpty(query.getLicenceMonName()), "licence_mon_name", query.getLicenceMonName());
        wrapper.eq(StringUtils.isNotEmpty(query.getMonitoringType()), "monitoring_type", query.getMonitoringType());
        wrapper.eq(StringUtils.isNotEmpty(query.getMonitoringInorganization()), "monitoring_inorganization", query.getMonitoringInorganization());
        wrapper.eq(StringUtils.isNotEmpty(query.getPollutionPrevention()), "pollution_prevention", query.getPollutionPrevention());
        wrapper.eq(StringUtils.isNotEmpty(query.getPollutionProductionLink()), "pollution_production_link", query.getPollutionProductionLink());
        wrapper.eq(StringUtils.isNotEmpty(query.getCorrespondingProductionCode()), "corresponding_production_code", query.getCorrespondingProductionCode());
        wrapper.eq(StringUtils.isNotEmpty(query.getDevId()), "dev_id", query.getDevId());
        wrapper.eq(StringUtils.isNotEmpty(query.getCorrespondingProductionName()), "corresponding_production_name", query.getCorrespondingProductionName());
        wrapper.eq(StringUtils.isNotEmpty(query.getProFacilityParam()), "pro_facility_param", query.getProFacilityParam());
        wrapper.eq(StringUtils.isNotEmpty(query.getPollutionType()), "pollution_type", query.getPollutionType());
        wrapper.orderByAsc("licence_mon_name", "id");
        return wrapper;
    }
}
