gongchunyi
3 天以前 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
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 EnergyCollectionVO implements Serializable {
 
    private static final long serialVersionUID = 1L;
 
    @Schema(description = "生成时间")
    private String generatedAt;
 
    @Schema(description = "业务日期 yyyy-MM-dd")
    private String today;
 
    @Schema(description = "是否演示数据模式")
    private Boolean mockMode;
 
    @Schema(description = "三类介质采集概览")
    private List<Medium> media = new ArrayList<>();
 
    @Schema(description = "最近采集批次")
    private List<RunItem> runs = new ArrayList<>();
 
    @Schema(description = "最近批次失败任务数")
    private Integer failedTaskCount = 0;
 
    @Schema(description = "最近批次待执行任务数")
    private Integer pendingTaskCount = 0;
 
    @Data
    @Schema(description = "单类介质采集概览")
    public static class Medium implements Serializable {
 
        private static final long serialVersionUID = 1L;
 
        private String meterType;
 
        @Schema(description = "介质名称:水表 / 电表 / 蒸汽表")
        private String meterName;
 
        @Schema(description = "单位 m3 / kWh")
        private String unit;
 
        @Schema(description = "启用设备数")
        private Integer deviceCount = 0;
 
        @Schema(description = "第三方自动采集设备数")
        private Integer providerCount = 0;
 
        @Schema(description = "手工抄表设备数")
        private Integer manualCount = 0;
 
        @Schema(description = "供应商侧在线设备数")
        private Integer onlineCount = 0;
 
        @Schema(description = "最近成功采集时间")
        private String lastSuccessAt;
 
        @Schema(description = "已归集数据起始日期")
        private String dataStart;
 
        @Schema(description = "已归集数据结束日期")
        private String dataEnd;
 
        @Schema(description = "数据截止日已归集到用量的设备数")
        private Integer latestDayMeters = 0;
 
        @Schema(description = "近 7 日有数据的天数")
        private Integer coveredDays = 0;
 
        @Schema(description = "统计天数")
        private Integer expectedDays = 7;
 
        @Schema(description = "近 7 日数据覆盖率 0-100")
        private BigDecimal coverageRate;
 
        @Schema(description = "采集状态 OK/PARTIAL/STALE/EMPTY/NO_DEVICE")
        private String status;
 
        @Schema(description = "采集状态文案")
        private String statusText;
    }
 
    @Data
    @Schema(description = "最近采集批次")
    public static class RunItem implements Serializable {
 
        private static final long serialVersionUID = 1L;
 
        private Long id;
 
        private String runKey;
 
        @Schema(description = "SCHEDULED/MANUAL/BACKFILL")
        private String triggerType;
 
        private String triggerTypeName;
 
        @Schema(description = "批次状态")
        private String status;
 
        private String statusText;
 
        @Schema(description = "同步开始日期")
        private String rangeStart;
 
        @Schema(description = "同步结束日期")
        private String rangeEnd;
 
        private Integer totalTasks;
 
        private Integer successTasks;
 
        private Integer emptyTasks;
 
        private Integer failedTasks;
 
        private String startedAt;
 
        private String finishedAt;
    }
}