package cn.cecep.talroad.vo.query;

import cn.cecep.talroad.common.core.domain.query.PageQuery;
import cn.cecep.talroad.domain.SMainDynamicControlParam;
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_param
 *
 * @author szhpt
 * @date 2023-02-02*/
@ApiModel(value = "基本信息-废气、废水排口档案-动态管控信息调整 -参数")
@EqualsAndHashCode(callSuper = false)
@Data
public class SMainDynamicControlParamQuery extends PageQuery
{

    @ApiModelProperty(value = "主键id")
    private String id;
    @ApiModelProperty(value = "管控类型编码")
    private String controlTypeCode;
    @ApiModelProperty(value = "参数编码")
    private String argumentsCode;
    @ApiModelProperty(value = "参数名称")
    private String argumentsName;
    @ApiModelProperty(value = "是否启用")
    private String argumentsEnable;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<SMainDynamicControlParam> createLambdaQueryWrapper(SMainDynamicControlParamQuery query) {
        QueryWrapper<SMainDynamicControlParam> wrapper = new QueryWrapper<>();
        wrapper.eq(ObjectUtil.isNotNull(query.getId()), "id", query.getId());
        wrapper.eq(ObjectUtil.isNotNull(query.getControlTypeCode()), "control_type_code", query.getControlTypeCode());
        wrapper.eq(ObjectUtil.isNotNull(query.getArgumentsCode()), "arguments_code", query.getArgumentsCode());
        wrapper.eq(ObjectUtil.isNotNull(query.getArgumentsName()), "arguments_name", query.getArgumentsName());
        wrapper.eq(ObjectUtil.isNotNull(query.getArgumentsEnable()), "arguments_enable", query.getArgumentsEnable());
        return wrapper;
        }
}
