gongchunyi
5 天以前 e9b4ceeea014f9d81263672f3d9c46a567c39591
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
package com.ruoyi.energymeter.vo;
 
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
 
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
 
/**
 * 能耗统计分析报表:按日/月与按介质/设备两个维度汇总水、电、蒸汽用量。
 */
@Data
@Schema(description = "能耗统计报表")
public class EnergyReportVO implements Serializable {
 
    private static final long serialVersionUID = 1L;
 
    private String generatedAt;
 
    @Schema(description = "是否演示数据模式")
    private Boolean mockMode;
 
    private String start;
 
    private String end;
 
    @Schema(description = "DAY / MONTH")
    private String granularity;
 
    @Schema(description = "MEDIUM / DEVICE")
    private String dimension;
 
    @Schema(description = "ALL / WATER / ELECTRIC / GAS")
    private String meterType;
 
    @Schema(description = "统计周期列表")
    private List<String> periods = new ArrayList<>();
 
    @Schema(description = "按介质汇总的周期数据")
    private List<PeriodRow> rows = new ArrayList<>();
 
    @Schema(description = "按设备汇总的数据")
    private List<DeviceRow> devices = new ArrayList<>();
 
    @Schema(description = "各介质合计")
    private List<MediumTotal> totals = new ArrayList<>();
 
    @Schema(description = "有数据的周期数")
    private Integer coveredPeriods = 0;
 
    @Schema(description = "统计周期总数")
    private Integer totalPeriods = 0;
 
    @Schema(description = "统计口径说明")
    private String note;
 
    @Data
    @Schema(description = "单个统计周期的三类介质用量")
    public static class PeriodRow implements Serializable {
 
        private static final long serialVersionUID = 1L;
 
        private String period;
 
        private BigDecimal water;
 
        private BigDecimal electric;
 
        private BigDecimal gas;
    }
 
    @Data
    @Schema(description = "单台设备期间用量")
    public static class DeviceRow implements Serializable {
 
        private static final long serialVersionUID = 1L;
 
        private Long meterId;
 
        private String meterName;
 
        private String meterAddress;
 
        private String meterType;
 
        @Schema(description = "介质名称:水表 / 电表 / 蒸汽表")
        private String meterTypeName;
 
        private String sourceTypeName;
 
        private String unit;
 
        @Schema(description = "期间用量")
        private BigDecimal total;
 
        @Schema(description = "占本介质比例 0-100")
        private BigDecimal share;
    }
 
    @Data
    @Schema(description = "单类介质合计")
    public static class MediumTotal implements Serializable {
 
        private static final long serialVersionUID = 1L;
 
        private String meterType;
 
        private String meterName;
 
        private String unit;
 
        private BigDecimal total;
 
        private Integer deviceCount = 0;
    }
}