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.BasDeviceZlConfig;
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;


/**
 * 转炉设备与转炉煤气放散设备映射关系对象 bas_device_zl_config
 *
 * @author szhpt
 * @date 2023-06-30*/
@ApiModel(value = "转炉设备与转炉煤气放散设备映射关系")
@EqualsAndHashCode(callSuper = false)
@Data
public class BasDeviceZlConfigQuery extends PageQuery
{

    @ApiModelProperty(value = "主键ID")
    private String dataId;
    @ApiModelProperty(value = "企业ID")
    private String factoryId;
    @ApiModelProperty(value = "转炉设备ID")
    private String deviceId;
    @ApiModelProperty(value = "转炉煤气放散设备ID")
    private String fsDeviceId;
    @ApiModelProperty(value = "创建时间")
    private String createTime;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<BasDeviceZlConfig> createLambdaQueryWrapper(BasDeviceZlConfigQuery query) {
        QueryWrapper<BasDeviceZlConfig> 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.getDeviceId()), "device_id", query.getDeviceId());
        wrapper.eq(ObjectUtil.isNotNull(query.getFsDeviceId()), "fs_device_id", query.getFsDeviceId());
        wrapper.eq(ObjectUtil.isNotNull(query.getCreateTime()), "create_time", query.getCreateTime());
        return wrapper;
        }
}
