package com.pj.project.tb_business;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;

import com.pj.utils.so.*;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * Mapper: tb_business -- 入境登记
 *
 * @author qzy
 */

@Mapper
@Repository
public interface TbBusinessMapper extends BaseMapper<TbBusiness> {

    /**
     * 查集合 - 根据条件（参数为空时代表忽略指定条件）
     *
     * @param so 参数集合
     * @return 数据列表
     */
    List<TbBusiness> getList(SoMap so);

    List<CarDisincle> getCarDisincleList(SoMap soMap);

    int checkCarBusinessType(@Param("typeId") String typeId,@Param("carNo") String carNo, @Param("operateTime")String operateTime,@Param("before")int before);

    int checkCarBusinessTypeByTime(@Param("typeId") String typeId, @Param("carNo") String carNo,
                                          @Param("timeStart")String timeStart,
                                          @Param("timeEnd") String timeEnd,  @Param("businessId")String businessId);

    void unBindCar(String id);

    List<TbBusiness> getOtherBusiness(SoMap soMap);

    List<TbBusiness> findOtherBusinessByCarId(@Param("businessCarId")String businessCarId);
}
