package cn.cecep.talroad.vo.query;

import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.cecep.talroad.domain.BStatTableZxbgGasEmissionSpeed;
import cn.cecep.talroad.common.core.domain.query.PageQuery;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;


/**
 * 固定源产排治--执行报告--有组织废气污染物排放速率监测对象 b_stat_table_zxbg_gas_emission_speed
 *
 * @author szhpt
 * @date 2023-08-01*/
@ApiModel(value = "固定源产排治--执行报告--有组织废气污染物排放速率监测")
@EqualsAndHashCode(callSuper = false)
@Data
public class BStatTableZxbgGasEmissionSpeedQuery extends PageQuery
{

    @ApiModelProperty(value = "主键id")
    private Long id;
    @ApiModelProperty(value = "企业id")
    private String factoryId;
    @ApiModelProperty(value = "执行报告类型，0：月报，1：季报，2：年报")
    private String zxbgType;
    @ApiModelProperty(value = "执行报告周期")
    private String zxbgPeriod;
    @ApiModelProperty(value = "排放口编码")
    private String outletCode;
    @ApiModelProperty(value = "排放口名称")
    private String outletName;
    @ApiModelProperty(value = "备注")
    private String remark;
    @ApiModelProperty(value = "创建时间")
    private String createTime;
    @ApiModelProperty(value = "污染物名称")
    private String pollutantName;
    @ApiModelProperty(value = "污染物编码")
    private String pollutantCode;
    @ApiModelProperty(value = "许可排放浓度限值")
    private String emissionConcentration;
    @ApiModelProperty(value = "有效监测数据(小时值)数量")
    private String effectivelyHour;
    @ApiModelProperty(value = "实际排放速率最小值")
    private String detectionMinHour;
    @ApiModelProperty(value = "实际排放速率最大值")
    private String detectionMaxHour;
    @ApiModelProperty(value = "实际排放速率平均值")
    private String detectionAvgHour;
    @ApiModelProperty(value = "超标数据个数")
    private String exceededData;
    @ApiModelProperty(value = "超标率（%）")
    private String exceededRate;
    @ApiModelProperty(value = "超标原因")
    private String exceededCause;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<BStatTableZxbgGasEmissionSpeed> createLambdaQueryWrapper(BStatTableZxbgGasEmissionSpeedQuery query) {
        QueryWrapper<BStatTableZxbgGasEmissionSpeed> wrapper = new QueryWrapper<>();
        wrapper.eq(ObjectUtil.isNotNull(query.getId()), "id", query.getId());
        wrapper.eq(ObjectUtil.isNotNull(query.getFactoryId()), "factory_id", query.getFactoryId());
        wrapper.eq(ObjectUtil.isNotNull(query.getZxbgType()), "zxbg_type", query.getZxbgType());
        wrapper.eq(ObjectUtil.isNotNull(query.getZxbgPeriod()), "zxbg_period", query.getZxbgPeriod());
        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.getRemark()), "remark", query.getRemark());
        wrapper.eq(ObjectUtil.isNotNull(query.getCreateTime()), "create_time", query.getCreateTime());
        wrapper.eq(ObjectUtil.isNotNull(query.getPollutantName()), "pollutant_name", query.getPollutantName());
        wrapper.eq(ObjectUtil.isNotNull(query.getPollutantCode()), "pollutant_code", query.getPollutantCode());
        wrapper.eq(ObjectUtil.isNotNull(query.getEmissionConcentration()), "emission_concentration", query.getEmissionConcentration());
        wrapper.eq(ObjectUtil.isNotNull(query.getEffectivelyHour()), "effectively_hour", query.getEffectivelyHour());
        wrapper.eq(ObjectUtil.isNotNull(query.getDetectionMinHour()), "detection_min_hour", query.getDetectionMinHour());
        wrapper.eq(ObjectUtil.isNotNull(query.getDetectionMaxHour()), "detection_max_hour", query.getDetectionMaxHour());
        wrapper.eq(ObjectUtil.isNotNull(query.getDetectionAvgHour()), "detection_avg_hour", query.getDetectionAvgHour());
        wrapper.eq(ObjectUtil.isNotNull(query.getExceededData()), "exceeded_data", query.getExceededData());
        wrapper.eq(ObjectUtil.isNotNull(query.getExceededRate()), "exceeded_rate", query.getExceededRate());
        wrapper.eq(ObjectUtil.isNotNull(query.getExceededCause()), "exceeded_cause", query.getExceededCause());
        return wrapper;
        }
}
