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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
package com.mes.device.vo;
 
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
 
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
 
/**
 * 设备组配置视图对象
 * 
 * @author mes
 * @since 2024-10-30
 */
public class DeviceGroupConfigVO {
 
    /**
     * 设备组配置信息
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class GroupInfo {
        private Long id;
        private String groupCode;
        private String groupName;
        private String groupType;
        private String description;
        private String status;
        private Integer deviceCount;
        private Boolean isEnabled;
        private String location;
        private String supervisor;
        private Date createdTime;
        private Date updatedTime;
        private String extraConfig;
        private Long projectId;
    }
 
    /**
     * 设备组配置详情(用于编辑表单)
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class GroupConfigDetail {
        private Long id;
        private String groupCode;
        private String groupName;
        private String groupType;
        private String description;
        private String status;
        private Boolean isEnabled;
        private String location;
        private String supervisor;
        private String contactInfo;
        private String emergencyContact;
        private String maintenanceSchedule;
        private String extraConfig;
        private Date createdTime;
        private Date updatedTime;
    }
 
    /**
     * 设备组监控信息
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class GroupMonitoring {
        private Long groupId;
        private String groupName;
        private String status;
        private Boolean isOnline;
        private Integer totalDevices;
        private Integer onlineDevices;
        private Integer offlineDevices;
        private Integer faultDevices;
        private LocalDateTime lastHeartbeat;
        private Double groupHealthScore;
        private List<DeviceStatusInfo> deviceStatuses;
    }
 
    /**
     * 设备状态信息
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class DeviceStatusInfo {
        private Long deviceId;
        private String deviceName;
        private String deviceCode;
        private String status;
        private Boolean isOnline;
        private LocalDateTime lastHeartbeat;
        private String role;
    }
 
    /**
     * 设备组树节点
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class GroupTreeNode {
        private Long id;
        private String label;
        private String type;
        private String icon;
        private String status;
        private Boolean disabled;
        private List<GroupTreeNode> children;
        private Object data;
    }
 
    /**
     * 设备组任务信息
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class GroupTaskInfo {
        private Long taskId;
        private String taskName;
        private String taskType;
        private String status;
        private Integer priority;
        private LocalDateTime startTime;
        private LocalDateTime endTime;
        private Integer progress;
        private String assignedDevices;
        private String executor;
        private String result;
    }
 
    /**
     * 设备组批量操作结果
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class BatchOperationResult {
        private Integer totalCount;
        private Integer successCount;
        private Integer failureCount;
        private List<String> successIds;
        private List<String> failureIds;
        private List<String> errorMessages;
    }
 
    /**
     * 设备组性能统计
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class GroupPerformanceStats {
        private Long groupId;
        private String groupName;
        private Integer totalDevices;
        private Integer activeDevices;
        private Double averageCpuUsage;
        private Double averageMemoryUsage;
        private Integer totalTasksCompleted;
        private Double successRate;
        private Double availability;
        private Date statsTime;
        private List<DevicePerformance> devicePerformances;
    }
 
    /**
     * 设备性能信息
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class DevicePerformance {
        private Long deviceId;
        private String deviceName;
        private Double cpuUsage;
        private Double memoryUsage;
        private Integer tasksCompleted;
        private Double successRate;
        private String status;
    }
}