gongchunyi
2 天以前 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
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;
 
/**
 * 用能概览:卡片、月度按日、年度按月、采集状态。
 *
 * <p>费用在口径未确认前保持 null,前端显示 {@code --},不会绘制成 0。</p>
 */
@Data
@Schema(description = "水电表用能概览")
public class EnergyMeterOverviewVO implements Serializable {
 
    private static final long serialVersionUID = 1L;
 
    private String meterType;
 
    @Schema(description = "统计指标编码")
    private String metricCode;
 
    @Schema(description = "单位 m3 / kWh")
    private String unit;
 
    @Schema(description = "选中的设备ID,全部设备时为空")
    private Long meterId;
 
    @Schema(description = "数据范围说明")
    private String scopeLabel;
 
    @Schema(description = "参与统计的设备数量")
    private Integer deviceCount;
 
    @Schema(description = "是否演示数据模式")
    private Boolean mockMode;
 
    @Schema(description = "选中月份 yyyy-MM")
    private String selectedMonth;
 
    @Schema(description = "选中年份 yyyy")
    private String selectedYear;
 
    @Schema(description = "选中月累计用量")
    private BigDecimal monthTotal;
 
    @Schema(description = "上月同期累计用量")
    private BigDecimal monthPreviousTotal;
 
    @Schema(description = "选中年累计用量")
    private BigDecimal yearTotal;
 
    @Schema(description = "去年同月累计用量(年度对比)")
    private BigDecimal yearPreviousTotal;
 
    @Schema(description = "选中月费用,口径未确认时为 null")
    private BigDecimal monthCost;
 
    @Schema(description = "选中年费用,口径未确认时为 null")
    private BigDecimal yearCost;
 
    @Schema(description = "按日对比序列")
    private List<MonthDayPoint> monthSeries = new ArrayList<>();
 
    @Schema(description = "按月对比序列")
    private List<YearMonthPoint> yearSeries = new ArrayList<>();
 
    @Schema(description = "最近成功采集时间")
    private String lastSuccessAt;
 
    @Schema(description = "已采集数据起始日期")
    private String dataStart;
 
    @Schema(description = "已采集数据结束日期")
    private String dataEnd;
 
    @Schema(description = "数据截至说明")
    private String dataThrough;
 
    @Schema(description = "本月已采集天数")
    private Integer collectedDays;
 
    @Schema(description = "本月应采集天数")
    private Integer expectedDays;
 
    @Schema(description = "本月数据覆盖率 0-100")
    private BigDecimal coverageRate;
 
    @Schema(description = "采集状态 OK/PARTIAL/STALE/EMPTY")
    private String syncStatus;
 
    @Schema(description = "采集状态文案")
    private String syncStatusText;
 
    @Schema(description = "是否有数据")
    private Boolean hasData;
 
    @Schema(description = "所选月份是否有数据")
    private Boolean monthHasData;
 
    @Schema(description = "所选年份是否有数据")
    private Boolean yearHasData;
 
    @Data
    public static class MonthDayPoint implements Serializable {
 
        private static final long serialVersionUID = 1L;
 
        @Schema(description = "日,yyyy-MM-dd")
        private String day;
 
        @Schema(description = "当月当日用量")
        private BigDecimal current;
 
        @Schema(description = "上月同日用量")
        private BigDecimal previous;
    }
 
    @Data
    public static class YearMonthPoint implements Serializable {
 
        private static final long serialVersionUID = 1L;
 
        @Schema(description = "月,yyyy-MM")
        private String month;
 
        @Schema(description = "当年当月用量")
        private BigDecimal current;
 
        @Schema(description = "去年同月用量")
        private BigDecimal previous;
    }
}