package com.sckw.fleet.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sckw.fleet.model.KwfDriver;
import com.sckw.fleet.model.vo.KwfDriverVo;
import com.sckw.fleet.model.vo.KwfTableTopCount;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @desc 司机信息 Mapper 接口
 * @author zk
 * @date 2023/7/6 0006
 */
@Mapper
public interface KwfDriverMapper extends BaseMapper<KwfDriver> {

    /**
     * 统计
     *
     * @param params
     * @return
     */
    List<KwfTableTopCount> statisticsAll(@Param("params") Map<String, Object> params, @Param("authEntIdList") List<Long> authEntIdList);

    /**
     * 统计
     * @param params
     * @return
     */
    List<KwfTableTopCount> statistics(Map<String, Object> params);

    /**
     * 分页查询
     *
     * @param params
     * @return
     */
    List<KwfDriverVo> findPageAll(@Param("params") Map<String, Object> params, @Param("authEntIdList") List<Long> authEntIdList);

    /**
     * 分页查询
     * @param params
     * @return
     */
    List<KwfDriverVo> findPage(Map<String, Object> params);

    /**
     * 查询
     * @param params
     * @return
     */
    List<Map<String, Object>> findList(Map<String, Object> params);



    List<KwfDriver> findListByEntId(Long entId);

    /**
     * 统计   当前企业的司机数量
     * @param entId
     * @return
     */
    Integer countDriversByEntId(Long entId);

    /**
     * 查询
     * @param params
     * @return
     */
    List<KwfDriver> findDriver(Map<String, Object> params);

    /**
     * 查询企业下司机信息
     * @param params
     * @return
     */
    KwfDriver findEntDriver(KwfDriver params);

    /**
     * 企业司机统计
     * @param entId 企业id
     * @return
     */
    Map<String, Object> driverStatistics(@Param("entId") Long entId);
}
