package cn.iocoder.yudao.module.mes.controller.admin.collect.vo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.time.LocalDateTime; import java.util.List; /** * 设备停机明细(按采集间隔推算)。 * *

口径:两次采样间隔超过在线超时阈值即视为离线停机; * 首次采样之前不作推断;通信中断同样计入停机,但不标记为机械故障。 */ @Schema(description = "管理后台 - 设备停机明细 Response VO") @Data public class MesCollectDowntimeDetailRespVO { @Schema(description = "统计开始时间") private LocalDateTime startTime; @Schema(description = "统计结束时间") private LocalDateTime endTime; @Schema(description = "在线超时阈值(分钟)") private Integer timeoutMinutes; @Schema(description = "统计区间总时长(分钟)") private Long totalMinutes; @Schema(description = "停机合计(分钟)") private Long downtimeMinutes; @Schema(description = "停机率(%)") private Double downtimeRate; @Schema(description = "按设备明细") private List items; @Schema(description = "单设备停机明细") @Data @NoArgsConstructor @AllArgsConstructor public static class Item { @Schema(description = "设备台账编号") private Long machineryId; @Schema(description = "设备编码") private String machineryCode; @Schema(description = "设备名称") private String machineryName; @Schema(description = "数采设备编码") private String deviceCode; @Schema(description = "采样数") private Integer sampleCount; @Schema(description = "停机次数") private Integer downtimeCount; @Schema(description = "停机合计(分钟)") private Long downtimeMinutes; @Schema(description = "停机区间明细") private List intervals; } @Schema(description = "停机区间") @Data @NoArgsConstructor @AllArgsConstructor public static class Interval { @Schema(description = "停机开始") private LocalDateTime start; @Schema(description = "停机结束") private LocalDateTime end; @Schema(description = "持续秒数") private Long seconds; } }