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;
|
|
/**
|
* 用能概览:卡片、月度按日、年度按月、采集状态。
|
*
|
* <p>费用在口径未确认前保持 null,前端显示 {@code --},不会绘制成 0。</p>
|
*/
|
@Data
|
@Schema(description = "水电表用能概览")
|
public class EnergyMeterOverviewVO implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
private String meterType;
|
|
@Schema(description = "统计指标编码")
|
private String metricCode;
|
|
@Schema(description = "单位 m3 / kWh")
|
private String unit;
|
|
@Schema(description = "选中的设备ID,全部设备时为空")
|
private Long meterId;
|
|
@Schema(description = "数据范围说明")
|
private String scopeLabel;
|
|
@Schema(description = "参与统计的设备数量")
|
private Integer deviceCount;
|
|
@Schema(description = "是否演示数据模式")
|
private Boolean mockMode;
|
|
@Schema(description = "选中月份 yyyy-MM")
|
private String selectedMonth;
|
|
@Schema(description = "选中年份 yyyy")
|
private String selectedYear;
|
|
@Schema(description = "选中月累计用量")
|
private BigDecimal monthTotal;
|
|
@Schema(description = "上月同期累计用量")
|
private BigDecimal monthPreviousTotal;
|
|
@Schema(description = "选中年累计用量")
|
private BigDecimal yearTotal;
|
|
@Schema(description = "去年同月累计用量(年度对比)")
|
private BigDecimal yearPreviousTotal;
|
|
@Schema(description = "选中月费用,口径未确认时为 null")
|
private BigDecimal monthCost;
|
|
@Schema(description = "选中年费用,口径未确认时为 null")
|
private BigDecimal yearCost;
|
|
@Schema(description = "按日对比序列")
|
private List<MonthDayPoint> monthSeries = new ArrayList<>();
|
|
@Schema(description = "按月对比序列")
|
private List<YearMonthPoint> yearSeries = new ArrayList<>();
|
|
@Schema(description = "最近成功采集时间")
|
private String lastSuccessAt;
|
|
@Schema(description = "已采集数据起始日期")
|
private String dataStart;
|
|
@Schema(description = "已采集数据结束日期")
|
private String dataEnd;
|
|
@Schema(description = "数据截至说明")
|
private String dataThrough;
|
|
@Schema(description = "本月已采集天数")
|
private Integer collectedDays;
|
|
@Schema(description = "本月应采集天数")
|
private Integer expectedDays;
|
|
@Schema(description = "本月数据覆盖率 0-100")
|
private BigDecimal coverageRate;
|
|
@Schema(description = "采集状态 OK/PARTIAL/STALE/EMPTY")
|
private String syncStatus;
|
|
@Schema(description = "采集状态文案")
|
private String syncStatusText;
|
|
@Schema(description = "是否有数据")
|
private Boolean hasData;
|
|
@Schema(description = "所选月份是否有数据")
|
private Boolean monthHasData;
|
|
@Schema(description = "所选年份是否有数据")
|
private Boolean yearHasData;
|
|
@Data
|
public static class MonthDayPoint implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
@Schema(description = "日,yyyy-MM-dd")
|
private String day;
|
|
@Schema(description = "当月当日用量")
|
private BigDecimal current;
|
|
@Schema(description = "上月同日用量")
|
private BigDecimal previous;
|
}
|
|
@Data
|
public static class YearMonthPoint implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
@Schema(description = "月,yyyy-MM")
|
private String month;
|
|
@Schema(description = "当年当月用量")
|
private BigDecimal current;
|
|
@Schema(description = "去年同月用量")
|
private BigDecimal previous;
|
}
|
}
|