huang
6 天以前 22e17b6db03ca58bc477a35ca067e55a09cffce7
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
138
139
140
141
142
143
144
145
146
147
package com.mes.device.vo;
 
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
 
import java.util.Date;
import java.util.List;
 
/**
 * 统计视图对象
 * 
 * @author mes
 * @since 2024-10-30
 */
public class StatisticsVO {
 
    /**
     * 设备统计信息
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class DeviceStatistics {
        private Integer totalDevices;
        private Integer onlineDevices;
        private Integer offlineDevices;
        private Integer activeDevices;
        private Integer inactiveDevices;
        private Integer faultDevices;
        private Integer maintenanceDevices;
        private Integer deviceTypeCounts;
        private Double deviceAvailability;
        private Double averageUptime;
        private Date lastUpdateTime;
        private List<DeviceTypeStatistics> deviceTypeStats;
    }
 
    /**
     * 设备类型统计
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class DeviceTypeStatistics {
        private String deviceType;
        private Integer totalCount;
        private Integer onlineCount;
        private Integer offlineCount;
        private Double availability;
    }
 
    /**
     * 设备组统计信息
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class GroupStatistics {
        private Integer totalGroups;
        private Integer activeGroups;
        private Integer inactiveGroups;
        private Integer totalDevices;
        private Integer avgDevicesPerGroup;
        private Integer healthyGroups;
        private Integer unhealthyGroups;
        private Double groupAvailability;
        private Double averagePerformance;
        private Date lastUpdateTime;
        private List<GroupTypeStatistics> groupTypeStats;
    }
 
    /**
     * 设备组类型统计
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class GroupTypeStatistics {
        private String groupType;
        private Integer totalCount;
        private Integer activeCount;
        private Integer avgDeviceCount;
        private Double healthScore;
    }
 
    /**
     * 任务执行统计
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class TaskStatistics {
        private Integer totalTasks;
        private Integer completedTasks;
        private Integer runningTasks;
        private Integer failedTasks;
        private Double successRate;
        private Double averageExecutionTime;
        private Date lastUpdateTime;
        private List<TaskTypeStatistics> taskTypeStats;
    }
 
    /**
     * 任务类型统计
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class TaskTypeStatistics {
        private String taskType;
        private Integer totalCount;
        private Integer completedCount;
        private Double successRate;
        private Double averageTime;
    }
 
    /**
     * 系统性能统计
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class SystemStatistics {
        private Integer totalConnections;
        private Double cpuUsage;
        private Double memoryUsage;
        private Double diskUsage;
        private Integer activeSessions;
        private Double networkThroughput;
        private Date lastUpdateTime;
    }
 
    /**
     * 设备性能趋势
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class PerformanceTrend {
        private Date timestamp;
        private Double cpuUsage;
        private Double memoryUsage;
        private Double networkTraffic;
        private Integer activeConnections;
    }
}