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


/**
 * 站房信息--站房门禁进出统计分析对象 pc_station_building_stat
 *
 * @author szhpt
 * @date 2023-06-27*/
@ApiModel(value = "站房信息--站房门禁进出统计分析")
@EqualsAndHashCode(callSuper = false)
@Data
public class PcStationBuildingStatQuery extends PageQuery
{

    @ApiModelProperty(value = "主键id")
    private Long id;
    @ApiModelProperty(value = "企业表主键id")
    private String factoryId;
    @ApiModelProperty(value = "统计时间")
    private String statisticalTime;
    @ApiModelProperty(value = "站房表主键id")
    private Long stationBuildingId;
    @ApiModelProperty(value = "刷卡次数")
    private Long swipesOfNumber;
    @ApiModelProperty(value = "添加时间")
    private String createTime;

    @ApiModelProperty(value = "企业名称")
    private String factoryName;
    @ApiModelProperty(value = "行业名称")
    private String industryPermissionName;
    @ApiModelProperty(value = "区县编码")
    private String countryCode;
    @ApiModelProperty(value = "统计开始时间")
    private String startTime;
    @ApiModelProperty(value = "统计结束时间")
    private String endTime;
    @ApiModelProperty(value = "站房名称")
    private String stationBuildingName;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<PcStationBuildingStat> createLambdaQueryWrapper(PcStationBuildingStatQuery query) {
        QueryWrapper<PcStationBuildingStat> 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.getStatisticalTime()), "statistical_time", query.getStatisticalTime());
        wrapper.eq(ObjectUtil.isNotNull(query.getStationBuildingId()), "station_building_id", query.getStationBuildingId());
        wrapper.eq(ObjectUtil.isNotNull(query.getSwipesOfNumber()), "swipes_of_number", query.getSwipesOfNumber());
        wrapper.eq(ObjectUtil.isNotNull(query.getCreateTime()), "create_time", query.getCreateTime());
        return wrapper;
        }
}
