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