Pu Zhibing
2025-03-18 9b646c003c5dcc9c878c8c023af57e19eaef027a
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
package com.ruoyi.order.service;
 
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.dto.ChargingOrderGroup;
import com.ruoyi.common.core.dto.ChargingPercentProvinceDto;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.PageInfo;
import com.ruoyi.order.api.dto.SettlementConfirmAdd;
import com.ruoyi.order.api.model.*;
import com.ruoyi.order.api.query.ChargingOrderQuery;
import com.ruoyi.order.api.query.SettlementListQuery;
import com.ruoyi.order.api.query.UploadRealTimeMonitoringDataQuery;
import com.ruoyi.order.api.vo.*;
import com.ruoyi.order.dto.*;
import com.ruoyi.order.vo.ChargingOrderListInfoVO;
import com.ruoyi.order.vo.EndOfChargePageInfo;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
 
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;
import java.util.Map;
 
/**
 * <p>
 *  服务类
 * </p>
 *
 * @author xiaochen
 * @since 2024-08-07
 */
public interface TChargingOrderService extends IService<TChargingOrder> {
    
    
    /**
     * 获取小程序充电记录列表数据
     * @param query
     * @return
     */
    Map<String, Object> getMyChargingOrderList(GetMyChargingOrderList query);
    
    
    /**
     * 获取小程序充电记录明细
     * @param id
     * @return
     */
    MyChargingOrderInfo getMyChargingOrderInfo(String id);
    
    
    /**
     * 获取待开票订单列表
     * @param query
     * @return
     */
    List<MyChargingOrderList> getNoInvoicedOrder(GetNoInvoicedOrder query);
    
    
    /**
     * 充电支付
     * @param addChargingOrder
     * @return
     */
    AjaxResult paymentChargingOrder(AddChargingOrder addChargingOrder);
    
    
    /**
     * 支付成功后的回调处理逻辑
     * @param paymentType 支付方式:1=微信,2=支付宝
     * @param out_trade_no 业务流水号
     * @param transaction_id 三方支付流水号
     * @param attach 附加数据
     * @return
     */
    AjaxResult chargingOrderCallback(Integer paymentType, String out_trade_no, String transaction_id, String attach);
    
    
    /**
     * 安全检测数据
     * @param securityDetection
     */
    void securityDetection(SecurityDetectionVO securityDetection);
    
    
    /**
     * 启动充电应发
     * @param message
     */
    void startChargeSuccessfully(PlatformStartChargingReplyMessageVO message);
    
    
    /**
     * 充电启动失败后的退款回调处理
     * @param out_refund_no
     * @param refund_id
     * @param tradeState
     * @param success_time
     * @return
     */
    AjaxResult chargingOrderStartupFailureWxRefund(String out_refund_no, String refund_id, String tradeState, String success_time);
    
    
    /**
     * 启动失败退款操作
     * @param code
     */
    void refund(String code);
 
    /**
     * 获取充电中的详情
     * @param id
     * @return
     */
    ChargingDetails getChargingDetails(Integer id);
    
    
    /**
     * 停止充电
     * @param id
     * @return
     */
    AjaxResult stopCharging(String id);
    
    
    /**
     * 停止充电应答结果处理
     * @param platformStopChargingReply
     */
    void terminateSuccessfulResponse(PlatformStopChargingReplyVO platformStopChargingReply);
    
    
 
    TCharingOrderVO chargingOrder(ChargingOrderQuery dto);
 
    R<PageInfo<PayOrderDto>> payOrderQuery(PayOrderQueryDto payOrderQueryDto);
 
    R<PageInfo<TChargingOrderRefund>> getRefundList(ChargingRefundDto chargingRefundDto);
 
    List<ChargingOrderGroup> chargingOrderGroup(ChargingPercentProvinceDto chargingPercentProvinceDto);
 
    List<SixChargingDto> charge(LocalDate sixBefore, List<Integer> siteIds);
 
    List<SixCircleDto> circle(List<Integer> siteIds,LocalDate sixBefore);
 
    Map<String, Object> countAll(LocalDate sixBefore,List<Integer> siteIds);
 
    List<Map<String, Object>> getSumByType(LocalDate start,LocalDate end,List<Integer> siteIds);
 
    List<Map<String, Object>> getDateData(LocalDate start,LocalDate end,List<Integer> siteIds);
 
    List<Map<String, Object>> getWeekData(LocalDate start,LocalDate end);
 
    List<Map<String, Object>> getMonthData(LocalDate start,LocalDate end);
 
    List<Map<String, Object>> getYearData(LocalDate start,LocalDate end);
 
    ChargingOrderTimeVO chargingList(ChargingListQuery dto);
 
    R payRefund(PayOrderRefundDto payOrderQueryDto);
 
    ChargingOrderListInfoVO chargingInfo(String uid);
 
 
    /**
     * 处理充电订单实时监控数据相关的业务逻辑
     * @param query
     */
    void chargeMonitoring(UploadRealTimeMonitoringDataQuery query);
 
 
    /**
     * 自动结束充电后的处理逻辑
     * @param code
     */
    void endCharge(String code, Integer endMode);
    
    /**
     * 停止充电返回账单后计算费用
     * @param vo
     */
    R endChargeBillingCharge(TransactionRecordMessageVO vo);
    
    
 
    /**
     * 异常结束充电处理逻辑
     * @param orderCode
     */
    void excelEndCharge(String orderCode);
 
    List<Map<String, Object>> getByDate(LocalDate start,LocalDate end);
 
    List<Map<String, Object>> queryPower(List<Integer> siteIds);
 
    Map<String, Object> qureryPowerLevel(List<Integer> siteIds, ChargingStatisticsQueryDto statisticsQueryDto);
 
    List<Map<String, Object>> queryOrderCountAndMoneyBySiteIdDate(List<Integer> siteIds);
 
    List<Map<String, Object>> usersDay(ChargingStatisticsQueryDto statisticsQueryDto);
    List<Map<String, Object>> usersDay1();
 
    List<Map<String, Object>> usersByQuery(ChargingStatisticsQueryDto statisticsQueryDto);
    List<Map<String, Object>> usersByQuery1(ChargingStatisticsQueryDto statisticsQueryDto);
 
 
    List<Map<String, Object>> getUserTagCount();
 
    List<Map<String, Object>> getVipCount();
 
    List<Map<String, Object>> unitConsumption(ChargingStatisticsQueryDto statisticsQueryDto);
 
    List<Map<String, Object>> carUserMethod();
 
    List<Map<String, Object>> carUserBrand();
 
    Map<String, Object> countLocalCar();
 
    Double getAver(List<Integer> siteIds);
 
    List<Map<String, Object>> getLevelEvaluate(List<Integer> siteIds);
 
 
    /**
     * 根据车牌号和开始时间查询充电数据
     * @param query
     * @return
     */
    TChargingOrder getChargingOrderByLicensePlate(GetChargingOrderByLicensePlate query);
 
 
    TSettlementConfirm settlementAdd(SettlementConfirmAdd dto);
 
    PageInfo<TSettlementConfirm> settlementList(SettlementListQuery dto);
 
    SettlementTotalVO settlementTotal(String time);
    SettlementTotalVO settlementTotalR(String time,Long userId);
 
    List<Map<String, Object>> countBySource(List<Integer> siteIds,ChargingStatisticsQueryDto statisticsQueryDto);
 
    List<Map<String, Object>> equipmentUserType1(List<Integer> siteIds, ChargingStatisticsQueryDto statisticsQueryDto);
 
    List<Map<String, Object>> equipmentUserType2(List<Integer> siteIds, ChargingStatisticsQueryDto statisticsQueryDto);
 
    List<Map<String, Object>> equipmentMapbroke1(List<Integer> siteIds, ChargingStatisticsQueryDto statisticsQueryDto);
 
    List<Map<String, Object>> equipmentMapbroke2(List<Integer> siteIds, ChargingStatisticsQueryDto statisticsQueryDto);
 
    List<Map<String, Object>> equipmentMapOut1(List<Integer> siteIds, ChargingStatisticsQueryDto statisticsQueryDto);
 
    List<Map<String, Object>> equipmentMapOut2(List<Integer> siteIds, ChargingStatisticsQueryDto statisticsQueryDto);
 
    List<Map<String, Object>> needElec(List<Integer> siteIds, ChargingStatisticsQueryDto statisticsQueryDto);
 
    List<Map<String, Object>> getHourType(List<Integer> siteIds, ChargingDetailQueryDto statisticsQueryDto);
 
    List<Map<String, Object>> getDateType(List<Integer> siteIds, ChargingDetailQueryDto statisticsQueryDto);
 
    List<Map<String, Object>> getMonthType(List<Integer> siteIds, ChargingDetailQueryDto statisticsQueryDto);
 
    List<Map<String, Object>> getchargingCapacity(List<Integer> siteIds, ChargingDetailQueryDto statisticsQueryDto);
 
    List<Map<String, Object>> countAllUserData();
 
    List<Map<String, Object>> needElec1(List<Integer> siteIds, ChargingStatisticsQueryDto statisticsQueryDto);
    
    
    /**
     * 获取充电结束页面详情
     * @param id
     * @return
     */
    EndOfChargePageInfo getEndOfChargePageInfo(String id);
 
    Long countNoTag();
    
    
    /**
     * 获取订单数据
     * @param order
     * @return
     */
    List<TChargingOrder> getChargingOrder(TChargingOrderVo order);
 
    Long countCar(List<String> brands);
    
    
    /**
     * 添加三方平台充电订单数据
     * @param query
     */
    R addTripartitePlatformOrder(AddTripartitePlatformOrder query);
    
    
    /**
     * 三方平台停止充电操作
     * @param startChargeSeq
     * @return
     */
    R tripartitePlatformStopCharge(@RequestParam("startChargeSeq") String startChargeSeq);
    
    
    /**
     * 获取充电后没有扣除费用的数据
     * @return
     */
    R getNotPaymentChargingOrder();
}