package cn.cecep.talroad.vo.query;

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


/**
 * 固定源产排治--执行报告--火电、钢铁基本信息对象 b_stat_table_zxbg_hd_gt_basic
 *
 * @author szhpt
 * @date 2023-08-01*/
@ApiModel(value = "固定源产排治--执行报告--火电、钢铁基本信息")
@EqualsAndHashCode(callSuper = false)
@Data
public class BStatTableZxbgHdGtBasicQuery extends PageQuery
{

    @ApiModelProperty(value = "主键id")
    private Long id;
    @ApiModelProperty(value = "企业id")
    private String factoryId;
    @ApiModelProperty(value = "执行报告类型，0：月报，1：季报，2：年报")
    private String zxbgType;
    @ApiModelProperty(value = "执行报告周期")
    private String zxbgPeriod;
    @ApiModelProperty(value = "机组名称")
    private String unitName;
    @ApiModelProperty(value = "规模（万千瓦）")
    private String scale;
    @ApiModelProperty(value = "设计运行时间（小时）")
    private String runTime;
    @ApiModelProperty(value = "发电量（万千瓦时）")
    private String powerGeneration;
    @ApiModelProperty(value = "供热量（万吉焦）")
    private String heatSupply;
    @ApiModelProperty(value = "实际运行时间（小时）")
    private String actualRunningTime;
    @ApiModelProperty(value = "平均负荷率")
    private String averageLoadRatio;
    @ApiModelProperty(value = "备注")
    private String remark;
    @ApiModelProperty(value = "创建时间")
    private String createTime;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<BStatTableZxbgHdGtBasic> createLambdaQueryWrapper(BStatTableZxbgHdGtBasicQuery query) {
        QueryWrapper<BStatTableZxbgHdGtBasic> 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.getZxbgType()), "zxbg_type", query.getZxbgType());
        wrapper.eq(ObjectUtil.isNotNull(query.getZxbgPeriod()), "zxbg_period", query.getZxbgPeriod());
        wrapper.eq(ObjectUtil.isNotNull(query.getUnitName()), "unit_name", query.getUnitName());
        wrapper.eq(ObjectUtil.isNotNull(query.getScale()), "scale", query.getScale());
        wrapper.eq(ObjectUtil.isNotNull(query.getRunTime()), "run_time", query.getRunTime());
        wrapper.eq(ObjectUtil.isNotNull(query.getPowerGeneration()), "power_generation", query.getPowerGeneration());
        wrapper.eq(ObjectUtil.isNotNull(query.getHeatSupply()), "heat_supply", query.getHeatSupply());
        wrapper.eq(ObjectUtil.isNotNull(query.getActualRunningTime()), "actual_running_time", query.getActualRunningTime());
        wrapper.eq(ObjectUtil.isNotNull(query.getAverageLoadRatio()), "average_load_ratio", query.getAverageLoadRatio());
        wrapper.eq(ObjectUtil.isNotNull(query.getRemark()), "remark", query.getRemark());
        wrapper.eq(ObjectUtil.isNotNull(query.getCreateTime()), "create_time", query.getCreateTime());
        return wrapper;
        }
}
