xiaoyi
2 天以前 8782476e9cb4480be5da588888d08022b7942d0c
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
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;
 
/**
 * 设备停机明细(按采集间隔推算)。
 *
 * <p>口径:两次采样间隔超过在线超时阈值即视为离线停机;
 * 首次采样之前不作推断;通信中断同样计入停机,但不标记为机械故障。
 */
@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<Item> 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<Interval> 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;
    }
}