liujie
21 小时以前 74f8b8074a2fb391b5363b4dca5f99bf31993430
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
package com.stylefeng.guns.modular.system.dao;
 
import com.baomidou.mybatisplus.plugins.Page;
import com.stylefeng.guns.modular.system.controller.resp.DriverDispatchInfoResp;
import com.stylefeng.guns.modular.system.model.TDriver;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
 
import java.util.List;
 
/**
 * <p>
 * 司机基础信息 Mapper 接口
 * </p>
 *
 * @author stylefeng
 * @since 2023-02-20
 */
@Mapper
public interface TDriverMapper extends BaseMapper<TDriver> {
 
    List<TDriver> queryIdleDriver(@Param("type") Integer type, @Param("companyId") Integer companyId);
 
    /**
     * 查询有车检服务权限的司机列表(分页)
     *
     * @param checkServer 车检服务权限(1=有权限)
     * @param excludeDriverId 排除的司机ID(改派时使用)
     * @param approvalStatus 审核状态(2=已同意)
     * @param status 司机状态(1=正常)
     * @param offset 分页偏移量
     * @param limit 分页大小
     * @return 司机派单信息列表
     */
    List<DriverDispatchInfoResp> queryCheckServiceDrivers(
            @Param("checkServer") Integer checkServer,
            @Param("excludeDriverId") Integer excludeDriverId,
            @Param("approvalStatus") Integer approvalStatus,
            @Param("status") Integer status,
            @Param("offset") Integer offset,
            @Param("limit") Integer limit
    );
 
    /**
     * 查询有车检服务权限的司机列表(支持搜索)
     *
     * @param checkServer     车检服务权限(1=有权限)
     * @param excludeDriverId 排除的司机ID(改派时使用)
     * @param approvalStatus  审核状态(2=已同意)
     * @param status          司机状态(1=正常)
     * @param keyword         司机姓名/手机号(搜索条件)
     * @param branchOfficeId
     * @return 司机派单信息列表
     */
    List<DriverDispatchInfoResp> queryCheckServiceDriversWithSearch(Page<DriverDispatchInfoResp> page,
                                                                    @Param("checkServer") Integer checkServer,
                                                                    @Param("excludeDriverId") Integer excludeDriverId,
                                                                    @Param("approvalStatus") Integer approvalStatus,
                                                                    @Param("status") Integer status,
                                                                    @Param("keyword") String keyword,
                                                                    @Param("branchOfficeId") Integer branchOfficeId);
 
    /**
     * 统计有车检服务权限的司机总数(支持搜索)
     *
     * @param checkServer 车检服务权限(1=有权限)
     * @param excludeDriverId 排除的司机ID(改派时使用)
     * @param approvalStatus 审核状态(2=已同意)
     * @param status 司机状态(1=正常)
     * @param keyword 司机姓名、司机手机号(搜索条件)
     * @return 总数
     */
    Long countCheckServiceDriversWithSearch(
            @Param("checkServer") Integer checkServer,
            @Param("excludeDriverId") Integer excludeDriverId,
            @Param("approvalStatus") Integer approvalStatus,
            @Param("status") Integer status,
            @Param("keyword") String keyword
    );
}