zxl
2026-03-25 d1dfb6e35f38e27fd960dc3ad0130c8d0f5c39bb
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
package com.tievd.jyz.entity.vo;
 
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
 
import java.io.Serializable;
import java.time.LocalDateTime;
 
@Data
@Accessors(chain = true)
@Schema(name = "数据报表统计")
public class StatDataTableVo implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    @Schema(description = "车流量")
    private int carCount;
    
    @Schema(description = "进站数")
    private int appearCount;
    
    @Schema(description = "加油数")
    private int oilCount;
    
    @Schema(description = "加油数、销量")
    private int oilVolume;
    
    @Schema(description = "时长")
    private int sumSpand;
    
    @Schema(description = "通过率")
    private Integer spandAvg;
    
    @Schema(description = "进入率")
    private String entryRate;
    
    @Schema(description = "加油率")
    private String oilRate;
    
    @Schema(description = "回头率")
    private String rebackRate;
    
    
    
    @Schema(description = "加油位")
    private String oilPosition;
    
    @Schema(description = "车型")
    private String modelName;
    
    @Schema(description = "时间轴")
    private LocalDateTime statTime;
    
    public void addCarCount(int carCount) {
        this.carCount += carCount;
    }
    
    public void addAppearCount(int appearCount) {
        this.appearCount += appearCount;
    }
    
    public void addOilCount(int oilCount) {
        this.oilCount += oilCount;
    }
    
    public void addOilVolume(int oilVolume) {
        this.oilVolume += oilVolume;
    }
    
    public void addSumSpand(int sumSpand) {
        this.sumSpand += sumSpand;
    }
    
    public int getSpandAvg() {
        if (spandAvg == null) {
            spandAvg = appearCount == 0 ? 0 : sumSpand / appearCount;
        }
        return spandAvg;
    }
    
    public String getEntryRate() {
        if (entryRate == null) {
            if (carCount == 0) {
                entryRate = "0";
            } else {
                entryRate = String.valueOf(appearCount * 100 / carCount);
            }
        }
        return entryRate;
    }
    
    public String getOilRate() {
        if (oilRate == null) {
            if (appearCount == 0) {
                oilRate = "0";
            } else {
                oilRate = String.valueOf(oilCount * 100 / appearCount);
            }
        }
        return oilRate;
    }
    
    
    private StatDataTableVo preStatVo = null;
    
    
}