huang
2025-11-20 366ba040d2447bacd3455299425e3166f1f992bb
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
package com.mes.device.vo;
 
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
 
import java.util.Date;
import java.util.List;
 
/**
 * 设备组相关视图对象
 * 
 * @author mes
 * @since 2024-10-30
 */
public class DeviceGroupVO {
 
    /**
     * 设备信息
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class DeviceInfo {
        private Long id;
        private String deviceName;
        private String deviceCode;
        private String deviceType;
        private String plcIp;
        private String deviceRole;
        private String status;
        private Date lastHeartbeat;
        private Boolean isOnline;
    }
 
    /**
     * 设备组信息
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class GroupInfo {
        private Long id;
        private String groupCode;
        private String groupName;
        private String groupType;
        private String status;
        private Integer deviceCount;
        private Integer onlineDeviceCount;
        private Date createTime;
        private Long projectId;
    }
 
    /**
     * 健康检查结果
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class HealthCheckResult {
        private Boolean isHealthy;
        private Integer totalDevices;
        private Integer onlineDevices;
        private Integer offlineDevices;
        private List<String> failedDevices;
        private Date checkTime;
        private String checkSummary;
    }
 
    /**
     * 性能统计信息
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class PerformanceStats {
        private Integer totalDevices;
        private Integer activeDevices;
        private Double averageCpuUsage;
        private Double averageMemoryUsage;
        private Integer totalTasksCompleted;
        private Double successRate;
        private Date statsTime;
        private List<DevicePerformance> devicePerformances;
    }
 
    /**
     * 单个设备性能信息
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class DevicePerformance {
        private Long deviceId;
        private String deviceName;
        private String deviceCode;
        private Double cpuUsage;
        private Double memoryUsage;
        private Integer tasksCompleted;
        private Double successRate;
    }
}