package cn.cecep.talroad.vo.query;

import cn.cecep.talroad.common.core.domain.query.PageQuery;
import cn.cecep.talroad.domain.SMainDynamicControlFactory;
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;


/**
 * 基本信息-废气、废水排口档案-动态管控信息调整 -参数与企业关联对象 s_main_dynamic_control_factory
 *
 * @author szhpt
 * @date 2023-02-02*/
@ApiModel(value = "基本信息-废气、废水排口档案-动态管控信息调整 -参数与企业关联")
@EqualsAndHashCode(callSuper = false)
@Data
public class SMainDynamicControlFactoryQuery extends PageQuery
{

    @ApiModelProperty(value = "主键id")
    private String id;
    @ApiModelProperty(value = "企业id")
    private String factoryId;
    @ApiModelProperty(value = "排口id")
    private String outletId;
    @ApiModelProperty(value = "动态管控信息参数表id")
    private String controlParamId;
    @ApiModelProperty(value = "实测值")
    private String measuredValue;
    @ApiModelProperty(value = "验收标准值")
    private String standardValue;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<SMainDynamicControlFactory> createLambdaQueryWrapper(SMainDynamicControlFactoryQuery query) {
        QueryWrapper<SMainDynamicControlFactory> 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.getOutletId()), "outlet_id", query.getOutletId());
        wrapper.eq(ObjectUtil.isNotNull(query.getControlParamId()), "control_param_id", query.getControlParamId());
        wrapper.eq(ObjectUtil.isNotNull(query.getMeasuredValue()), "measured_value", query.getMeasuredValue());
        wrapper.eq(ObjectUtil.isNotNull(query.getStandardValue()), "standard_value", query.getStandardValue());
        return wrapper;
        }
}
