longz
2026-08-05 ac1b61bd1380a0532d149e9023f5d08f3046a765
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
package com.ruoyi.order.dto;
 
import lombok.Data;
 
import java.math.BigDecimal;
import java.time.LocalDate;
 
/**
 * 加盟商看板按日聚合行(t_charging_order 按 end_time 分组下推,MyCat 代理合并)。
 * 口径与 TChargingOrderController franchisee* 原 Java 求和逻辑一致。
 */
@Data
public class FranchiseeDayStat {
 
    /** 结束时间所在日 */
    private LocalDate statDay;
 
    /** 订单数(del_flag=0 且 recharge_payment_status=2) */
    private Long orderCount;
 
    /** 订单金额合计(SUM(order_amount),null 按 0) */
    private BigDecimal orderAmount;
 
    /** 订单金额合计(SUM(COALESCE(order_amount, payment_amount)),折线图口径) */
    private BigDecimal orderAmountEffective;
 
    /** 支付金额合计 */
    private BigDecimal paymentAmount;
 
    /** 累计服务费合计 */
    private BigDecimal serviceFee;
 
    /** 累计电费合计 */
    private BigDecimal electrovalence;
 
    /** 后台订单汇总口径的充电收入(电费 + 按订单来源折算后的服务费) */
    private BigDecimal chargingIncome;
 
    /** 充电总度数合计 */
    private BigDecimal capacity;
 
    /** 功率合计(SUM(IFNULL(charging_power, power)),null 不参与平均) */
    private BigDecimal totalPower;
 
    /** 参与功率合计的行数(用于计算平均功率) */
    private Long powerCount;
 
    /** 当日功率最大值(>0 口径,用于利用率分母) */
    private BigDecimal maxPower;
 
    /** 需求满足率分子合计(SUM(min(current*100/need_elec,100)),有效行) */
    private BigDecimal elecSatSum;
 
    /** 需求满足率有效行数(current/need_elec 均非空且 need_elec>0) */
    private Long elecSatCount;
 
    /** 功率利用率分子合计(仅 power>0 行求和) */
    private BigDecimal utilPowerSum;
 
    /** 功率利用率有效行数(power>0) */
    private Long utilPowerCount;
}