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 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 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;
|
}
|
}
|