package cn.cecep.talroad.vo.query;

import cn.cecep.talroad.common.core.domain.query.PageQuery;
import cn.cecep.talroad.domain.BMainNoiseEmissions;
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_noise_emissions
 *
 * @author szhpt
 * @date 2023-01-10*/
@ApiModel(value = "噪声排放信息")
@EqualsAndHashCode(callSuper = false)
@Data
public class BMainNoiseEmissionsQuery extends PageQuery
{

    @ApiModelProperty(value = "主键id")
    private String id;
    @ApiModelProperty(value = "企业id")
    private String factoryId;
    @ApiModelProperty(value = "噪声类别id")
    private String noiseTypeId;
    @ApiModelProperty(value = "生产时间段-昼间")
    private String productionPeriodDaytime;
    @ApiModelProperty(value = "生产时间段-夜间")
    private String productionPeriodNighttime
;
    @ApiModelProperty(value = "执行排放标准")
    private String implementationEmissionStandards;
    @ApiModelProperty(value = "厂界噪声排放限值昼间dB（a）")
    private String noiseEmissionsDaytime;
    @ApiModelProperty(value = "厂界噪声排放限值夜间dB（a）")
    private String noiseEmissionsNighttime;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<BMainNoiseEmissions> createLambdaQueryWrapper(BMainNoiseEmissionsQuery query) {
        QueryWrapper<BMainNoiseEmissions> 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.getNoiseTypeId()), "noise_type_id", query.getNoiseTypeId());
        wrapper.eq(ObjectUtil.isNotNull(query.getProductionPeriodDaytime()), "production_period_daytime", query.getProductionPeriodDaytime());
        wrapper.eq(ObjectUtil.isNotNull(query.getProductionPeriodNighttime()), "production_period_nighttime", query.getProductionPeriodNighttime());
        wrapper.eq(ObjectUtil.isNotNull(query.getImplementationEmissionStandards()), "implementation_emission_standards", query.getImplementationEmissionStandards());
        wrapper.eq(ObjectUtil.isNotNull(query.getNoiseEmissionsDaytime()), "noise_emissions_daytime", query.getNoiseEmissionsDaytime());
        wrapper.eq(ObjectUtil.isNotNull(query.getNoiseEmissionsNighttime()), "noise_emissions_nighttime", query.getNoiseEmissionsNighttime());
        return wrapper;
        }
}
