puzhibing
2023-06-30 f58cca364b731eac2d60a440ffaa804be3cd43fd
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
package com.stylefeng.guns.modular.system.dao;
 
import com.stylefeng.guns.modular.system.controller.resp.DataStatisticsOrderYearResp;
import com.stylefeng.guns.modular.system.controller.resp.PerformanceTableResp;
import com.stylefeng.guns.modular.system.controller.resp.TOrderResp;
import com.stylefeng.guns.modular.system.controller.resp.TOrderServerResp;
import com.stylefeng.guns.modular.system.model.TOrder;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
 
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date;
import java.util.List;
 
/**
 * <p>
 * 订单 Mapper 接口
 * </p>
 *
 * @author stylefeng
 * @since 2023-02-15
 */
@Mapper
public interface TOrderMapper extends BaseMapper<TOrder> {
 
    /**
     * 查询订单列表
     * @param startTime
     * @param endTime
     * @param code
     * @param source
     * @param userName
     * @param userPhone
     * @param state
     * @param driverName
     * @return
     */
    List<TOrderResp> getOrderList(@Param("startTime") String startTime,@Param("endTime")String endTime, @Param("code") String code,
                                  @Param("source") Integer source,@Param("userName")String userName, @Param("userPhone")String userPhone,
                                  @Param("state")Integer state,@Param("driverName")String driverName,@Param("isException") Integer isException,
                                  @Param("roleType")Integer roleType,@Param("objectId")Integer objectId);
 
    /**
     * 通过年份查询订单数量
     * @param agentId
     * @return
     */
    List<DataStatisticsOrderYearResp> getDataStatisticsByYear(@Param("agentId") Integer agentId,@Param("yearDate")String yearDate);
 
    /**
     * 单量
     * @param agentId
     * @param monthDate
     * @return
     */
    List<PerformanceTableResp> getDataStatisticsOrderCount(@Param("agentId")Integer agentId, @Param("monthDate")String monthDate);
 
    /**
     * 今日非服务中统计
     * @param agentId
     * @param type
     * @param localDate
     * @return
     */
    Integer getDataStatisticsCount(@Param("agentId")Integer agentId, @Param("type")Integer type, @Param("localDate")LocalDate localDate);
 
    /**
     * 今日服务中统计
     * @param agentId
     * @param localDate
     * @return
     */
    Integer getDataStatisticsServerCount(@Param("agentId")Integer agentId, @Param("localDate") LocalDate localDate);
 
    /**
     * 查询今日服务中的订单列表
     * @param agentId
     * @param localDate
     * @return
     */
    List<TOrderServerResp> getDataStatisticsServerList(@Param("agentId")Integer agentId,@Param("localDate") LocalDate localDate);
 
    /**
     * 查询今日所有列表
     * @param agentId
     * @param localDate
     * @return
     */
    List<TOrder> getDataStatisticsAllList(@Param("agentId")Integer agentId,@Param("type") Integer type,@Param("localDate") LocalDate localDate);
 
    /**
     * 广东省今日所有区域非服务中查询
     * @param ids
     * @param type
     * @param localDate
     * @return
     */
    Integer getDataStatisticsCountByIds(@Param("ids")List<Integer> ids, @Param("type")Integer type, @Param("localDate")LocalDate localDate);
 
    /**
     * 广东省今日服务中查询
     * @param ids
     * @param localDate
     * @return
     */
    Integer getDataStatisticsServerCountByIds(@Param("ids")List<Integer> ids, @Param("localDate")LocalDate localDate);
 
    /**
     * 广东省今日服务中列表
     * @param ids
     * @param localDate
     * @return
     */
    List<TOrderServerResp> getDataStatisticsServerListByIds(@Param("ids")List<Integer> ids, @Param("localDate")LocalDate localDate);
 
    /**
     * 广东省今日所有列表
     * @param ids
     * @param localDate
     * @return
     */
    List<TOrder> getDataStatisticsAllListByIds(@Param("ids")List<Integer> ids,@Param("type")Integer type, @Param("localDate")LocalDate localDate);
 
    /**
     * 通过年份查询订单数量(广东)
     * @param ids
     * @param yearDate
     * @return
     */
    List<DataStatisticsOrderYearResp> getDataStatisticsByYearByIds(@Param("ids")List<Integer> ids, @Param("yearDate")String yearDate);
 
    /**
     * 业绩排名单量(广东)
     * @param ids
     * @param monthDate
     * @return
     */
    List<PerformanceTableResp> getDataStatisticsOrderCountByIds(@Param("ids")List<Integer> ids, @Param("monthDate")String monthDate);
 
    /**
     * 查询本月订单
     * @param agentId
     * @param dayDate
     * @return
     */
    List<DataStatisticsOrderYearResp> getStatisticsOrderByMonth(@Param("agentId")Integer agentId, @Param("dayDate")String dayDate);
 
    /**
     * 查询本月订单广东
     * @param ids
     * @param dayDate
     * @return
     */
    List<DataStatisticsOrderYearResp> getStatisticsOrderByMonthIds(@Param("ids")List<Integer> ids, @Param("dayDate")String dayDate);
 
    /**
     * 查询司机当月有效订单数量
     * @param driverId
     * @param orderMoney
     * @param month
     * @return
     */
    Integer getValidOrderCount(@Param("driverId") Integer driverId,@Param("orderMoney") BigDecimal orderMoney, @Param("month")String month);
}