package com.ruoyi.energymeter.vo;
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
import lombok.Data;
|
|
import java.io.Serializable;
|
import java.math.BigDecimal;
|
import java.util.ArrayList;
|
import java.util.List;
|
|
/**
|
* 能耗数据采集概览:水、电、蒸汽三类介质的接入设备、归集进度与最近采集批次。
|
*/
|
@Data
|
@Schema(description = "能耗数据采集概览")
|
public class EnergyCollectionVO implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
@Schema(description = "生成时间")
|
private String generatedAt;
|
|
@Schema(description = "业务日期 yyyy-MM-dd")
|
private String today;
|
|
@Schema(description = "是否演示数据模式")
|
private Boolean mockMode;
|
|
@Schema(description = "三类介质采集概览")
|
private List<Medium> media = new ArrayList<>();
|
|
@Schema(description = "最近采集批次")
|
private List<RunItem> runs = new ArrayList<>();
|
|
@Schema(description = "最近批次失败任务数")
|
private Integer failedTaskCount = 0;
|
|
@Schema(description = "最近批次待执行任务数")
|
private Integer pendingTaskCount = 0;
|
|
@Data
|
@Schema(description = "单类介质采集概览")
|
public static class Medium implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
private String meterType;
|
|
@Schema(description = "介质名称:水表 / 电表 / 蒸汽表")
|
private String meterName;
|
|
@Schema(description = "单位 m3 / kWh")
|
private String unit;
|
|
@Schema(description = "启用设备数")
|
private Integer deviceCount = 0;
|
|
@Schema(description = "第三方自动采集设备数")
|
private Integer providerCount = 0;
|
|
@Schema(description = "手工抄表设备数")
|
private Integer manualCount = 0;
|
|
@Schema(description = "供应商侧在线设备数")
|
private Integer onlineCount = 0;
|
|
@Schema(description = "最近成功采集时间")
|
private String lastSuccessAt;
|
|
@Schema(description = "已归集数据起始日期")
|
private String dataStart;
|
|
@Schema(description = "已归集数据结束日期")
|
private String dataEnd;
|
|
@Schema(description = "数据截止日已归集到用量的设备数")
|
private Integer latestDayMeters = 0;
|
|
@Schema(description = "近 7 日有数据的天数")
|
private Integer coveredDays = 0;
|
|
@Schema(description = "统计天数")
|
private Integer expectedDays = 7;
|
|
@Schema(description = "近 7 日数据覆盖率 0-100")
|
private BigDecimal coverageRate;
|
|
@Schema(description = "采集状态 OK/PARTIAL/STALE/EMPTY/NO_DEVICE")
|
private String status;
|
|
@Schema(description = "采集状态文案")
|
private String statusText;
|
}
|
|
@Data
|
@Schema(description = "最近采集批次")
|
public static class RunItem implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
private Long id;
|
|
private String runKey;
|
|
@Schema(description = "SCHEDULED/MANUAL/BACKFILL")
|
private String triggerType;
|
|
private String triggerTypeName;
|
|
@Schema(description = "批次状态")
|
private String status;
|
|
private String statusText;
|
|
@Schema(description = "同步开始日期")
|
private String rangeStart;
|
|
@Schema(description = "同步结束日期")
|
private String rangeEnd;
|
|
private Integer totalTasks;
|
|
private Integer successTasks;
|
|
private Integer emptyTasks;
|
|
private Integer failedTasks;
|
|
private String startedAt;
|
|
private String finishedAt;
|
}
|
}
|