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

import cn.cecep.talroad.common.core.domain.query.PageQuery;
import cn.cecep.talroad.domain.analysis.SRaAbNalysisCar;
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_ra_ab_nalysis_car
 *
 * @author szhpt
 * @date 2023-03-24*/
@ApiModel(value = "管控期车辆异常分析")
@EqualsAndHashCode(callSuper = false)
@Data
public class SRaAbNalysisCarQuery extends PageQuery
{

    @ApiModelProperty(value = "数据主键")
    private String dataId;
    @ApiModelProperty(value = "企业主键")
    private String factoryId;
    @ApiModelProperty(value = "企业名称")
    private String factoryName;
    @ApiModelProperty(value = "行业类别名称(多个使用'、'拼接)")
    private String industryCategoryName;
    @ApiModelProperty(value = "行业类别编码(多个使用'、'拼接)")
    private String industryCategoryCode;
    @ApiModelProperty(value = "所在区县名称")
    private String districtName;
    @ApiModelProperty(value = "所在区县编码")
    private String districtCode;
    @ApiModelProperty(value = "绩效级别")
    private String performanceLevel;
    @ApiModelProperty(value = "$column.columnComment")
    private String workingProcedure;
    @ApiModelProperty(value = "国四及以下车辆进出厂次数")
    private Long inOutNumber;
    @ApiModelProperty(value = "更新时间")
    private String updateTime;
    @ApiModelProperty(value = "创建时间(默认当前时间)")
    private String createTime;
    @ApiModelProperty(value = "管控时间")
    private String analyseTime;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<SRaAbNalysisCar> createLambdaQueryWrapper(SRaAbNalysisCarQuery query) {
        QueryWrapper<SRaAbNalysisCar> wrapper = new QueryWrapper<>();
        wrapper.eq(ObjectUtil.isNotNull(query.getDataId()), "data_id", query.getDataId());
        wrapper.eq(ObjectUtil.isNotNull(query.getFactoryId()), "factory_id", query.getFactoryId());
        wrapper.eq(ObjectUtil.isNotNull(query.getFactoryName()), "factory_name", query.getFactoryName());
        wrapper.eq(ObjectUtil.isNotNull(query.getIndustryCategoryName()), "industry_category_name", query.getIndustryCategoryName());
        wrapper.eq(ObjectUtil.isNotNull(query.getIndustryCategoryCode()), "industry_category_code", query.getIndustryCategoryCode());
        wrapper.eq(ObjectUtil.isNotNull(query.getDistrictName()), "district_name", query.getDistrictName());
        wrapper.eq(ObjectUtil.isNotNull(query.getDistrictCode()), "district_code", query.getDistrictCode());
        wrapper.eq(ObjectUtil.isNotNull(query.getPerformanceLevel()), "performance_level", query.getPerformanceLevel());
        wrapper.eq(ObjectUtil.isNotNull(query.getWorkingProcedure()), "working_procedure", query.getWorkingProcedure());
        wrapper.eq(ObjectUtil.isNotNull(query.getInOutNumber()), "in_out_number", query.getInOutNumber());
        wrapper.eq(ObjectUtil.isNotNull(query.getUpdateTime()), "update_time", query.getUpdateTime());
        wrapper.eq(ObjectUtil.isNotNull(query.getCreateTime()), "create_time", query.getCreateTime());
        wrapper.eq(ObjectUtil.isNotNull(query.getAnalyseTime()), "analyse_time", query.getAnalyseTime());
        return wrapper;
        }
}
