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

import cn.cecep.talroad.domain.analysis.SRaRealTimeAnalysicComsit;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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_real_time_analysic_comsit
 *
 * @author szhpt
 * @date 2023-07-14*/
@ApiModel(value = "关联分析系统-企业生产过程分析-监测点位对比分析-分组")
@EqualsAndHashCode(callSuper = false)
@Data
public class SRaRealTimeAnalysicComsitQuery extends PageQuery
{

    @ApiModelProperty(value = "主键")
    private Long dataId;
    @ApiModelProperty(value = "分组名称")
    private String sectionalizationName;
    @ApiModelProperty(value = "参数名称")
    private String paramName;
    @ApiModelProperty(value = "数据分析时间")
    private String analysisTime;
    @ApiModelProperty(value = "监测点数量")
    private Long stationNum;
    @ApiModelProperty(value = "创建时间")
    private String createTime;
    @ApiModelProperty(value = "平均值")
    private String avgValue;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<SRaRealTimeAnalysicComsit> createLambdaQueryWrapper(SRaRealTimeAnalysicComsitQuery query) {
        QueryWrapper<SRaRealTimeAnalysicComsit> wrapper = new QueryWrapper<>();
        wrapper.eq(ObjectUtil.isNotNull(query.getDataId()), "data_id", query.getDataId());
        wrapper.eq(ObjectUtil.isNotNull(query.getSectionalizationName()), "sectionalization_name", query.getSectionalizationName());
        wrapper.eq(ObjectUtil.isNotNull(query.getParamName()), "param_name", query.getParamName());
        wrapper.eq(ObjectUtil.isNotNull(query.getAnalysisTime()), "analysis_time", query.getAnalysisTime());
        wrapper.eq(ObjectUtil.isNotNull(query.getStationNum()), "station_num", query.getStationNum());
        wrapper.eq(ObjectUtil.isNotNull(query.getCreateTime()), "create_time", query.getCreateTime());
        wrapper.eq(ObjectUtil.isNotNull(query.getAvgValue()), "avg_value", query.getAvgValue());
        return wrapper;
    }
}
