package cn.cecep.talroad.vo.query.analysis;

import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.cecep.talroad.domain.analysis.SRaControlScheme;
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;
import java.util.Date;


/**
 * 关联分析系统-减排方案管理-管控时间段信息对象 s_ra_control_scheme
 *
 * @author szhpt
 * @date 2023-04-02*/
@ApiModel(value = "关联分析系统-减排方案管理-管控时间段信息")
@EqualsAndHashCode(callSuper = false)
@Data
public class SRaControlSchemeQuery extends PageQuery
{

    @ApiModelProperty(value = "方案主键")
    private String schemeId;
    @ApiModelProperty(value = "方案名称")
    private String schemeName;
    @ApiModelProperty(value = "预警级别(1-红色预警,2-橙色预警,3-黄色预警)")
    private String warningLevel;
    @ApiModelProperty(value = "管控措施")
    private String controlMeasures;
    @ApiModelProperty(value = "管控开始时间")
    private String controlStartTime;
    @ApiModelProperty(value = "管控截至时间")
    private String controlEndTime;
    @ApiModelProperty(value = "停止国四及以下车辆通行(0-否,1-是)")
    private String stopCar;
    @ApiModelProperty(value = "基准开始时间")
    private String noControlStartTime;
    @ApiModelProperty(value = "基准截至时间")
    private String noControlEndTime;
    @ApiModelProperty(value = "创建人")
    private String createBy;
    @ApiModelProperty(value = "创建时间")
    private String createTime;
    @ApiModelProperty(value = "更新人")
    private String updateBy;
    @ApiModelProperty(value = "更新时间")
    private String updateTime;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<SRaControlScheme> createLambdaQueryWrapper(SRaControlSchemeQuery query) {
        QueryWrapper<SRaControlScheme> wrapper = new QueryWrapper<>();
        wrapper.eq(ObjectUtil.isNotNull(query.getSchemeId()), "scheme_id", query.getSchemeId());
        wrapper.eq(ObjectUtil.isNotNull(query.getSchemeName()), "scheme_name", query.getSchemeName());
        wrapper.eq(ObjectUtil.isNotNull(query.getWarningLevel()), "warning_level", query.getWarningLevel());
        wrapper.eq(ObjectUtil.isNotNull(query.getControlMeasures()), "control_measures", query.getControlMeasures());
        wrapper.eq(ObjectUtil.isNotNull(query.getControlStartTime()), "control_start_time", query.getControlStartTime());
        wrapper.eq(ObjectUtil.isNotNull(query.getControlEndTime()), "control_end_time", query.getControlEndTime());
        wrapper.eq(ObjectUtil.isNotNull(query.getStopCar()), "stop_car", query.getStopCar());
        wrapper.eq(ObjectUtil.isNotNull(query.getNoControlStartTime()), "no_control_start_time", query.getNoControlStartTime());
        wrapper.eq(ObjectUtil.isNotNull(query.getNoControlEndTime()), "no_control_end_time", query.getNoControlEndTime());
        wrapper.eq(ObjectUtil.isNotNull(query.getCreateBy()), "create_by", query.getCreateBy());
        wrapper.eq(ObjectUtil.isNotNull(query.getCreateTime()), "create_time", query.getCreateTime());
        wrapper.eq(ObjectUtil.isNotNull(query.getUpdateBy()), "update_by", query.getUpdateBy());
        wrapper.eq(ObjectUtil.isNotNull(query.getUpdateTime()), "update_time", query.getUpdateTime());
        return wrapper;
        }
}
