package cn.cecep.talroad.vo.query;

import cn.cecep.talroad.common.core.domain.query.PageQuery;
import cn.cecep.talroad.domain.PcStationBuilding;
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;


/**
 * 站房基本信息对象 pc_station_building
 *
 * @author szhpt
 * @date 2023-01-10*/
@ApiModel(value = "站房基本信息")
@EqualsAndHashCode(callSuper = false)
@Data
public class PcStationBuildingQuery extends PageQuery
{

    @ApiModelProperty(value = "主键id")
    private String id;
    @ApiModelProperty(value = "企业id")
    private String factoryId;
    @ApiModelProperty(value = "站房序号")
    private String stationBuildingCode;
    @ApiModelProperty(value = "站房名称")
    private String stationBuildingName;
    @ApiModelProperty(value = "CEMS设备品牌")
    private String equipmentBrandCems;
    @ApiModelProperty(value = "对应监测点位id")
    private String stationId;
    @ApiModelProperty(value = "对应监测点位名称")
    private String stationName;
    @ApiModelProperty(value = "对应排口id")
    private String outletId;
    @ApiModelProperty(value = "对应排口名称")
    private String outletName;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<PcStationBuilding> createLambdaQueryWrapper(PcStationBuildingQuery query) {
        QueryWrapper<PcStationBuilding> 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.getStationBuildingCode()), "station_building_code", query.getStationBuildingCode());
        wrapper.eq(ObjectUtil.isNotNull(query.getStationBuildingName()), "station_building_name", query.getStationBuildingName());
        wrapper.eq(ObjectUtil.isNotNull(query.getEquipmentBrandCems()), "equipment_brand_cems", query.getEquipmentBrandCems());
        wrapper.eq(ObjectUtil.isNotNull(query.getStationId()), "station_id", query.getStationId());
        wrapper.eq(ObjectUtil.isNotNull(query.getStationName()), "station_name", query.getStationName());
        wrapper.eq(ObjectUtil.isNotNull(query.getOutletId()), "outlet_id", query.getOutletId());
        wrapper.eq(ObjectUtil.isNotNull(query.getOutletName()), "outlet_name", query.getOutletName());
        return wrapper;
        }
}
