|
@@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.iot.controller.admin.statistics.vo;
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
import lombok.Data;
|
|
import lombok.Data;
|
|
|
|
|
|
-import java.util.List;
|
|
|
|
|
|
+import java.util.Map;
|
|
|
|
|
|
// TODO @super:Total 全部改成 Count
|
|
// TODO @super:Total 全部改成 Count
|
|
// TODO @super:IotStatisticsSummaryRespVO
|
|
// TODO @super:IotStatisticsSummaryRespVO
|
|
@@ -12,90 +12,58 @@ import java.util.List;
|
|
*/
|
|
*/
|
|
@Schema(description = "管理后台 - Iot 统计 Response VO")
|
|
@Schema(description = "管理后台 - Iot 统计 Response VO")
|
|
@Data
|
|
@Data
|
|
-public class IotStatisticsRespVO {
|
|
|
|
|
|
+public class IotStatisticsSummaryRespVO {
|
|
|
|
|
|
// TODO @super:productCategory 哈
|
|
// TODO @super:productCategory 哈
|
|
@Schema(description = "品类数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
|
@Schema(description = "品类数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
|
- private long categoryTotal;
|
|
|
|
|
|
+ private long productCategoryCount;
|
|
|
|
|
|
@Schema(description = "产品数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "20")
|
|
@Schema(description = "产品数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "20")
|
|
- private long productTotal;
|
|
|
|
|
|
+ private long productCount;
|
|
|
|
|
|
@Schema(description = "设备数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
|
|
@Schema(description = "设备数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
|
|
- private long deviceTotal;
|
|
|
|
|
|
+ private long deviceCount;
|
|
|
|
|
|
// TODO @super:deviceMessageCount;设备消息数量
|
|
// TODO @super:deviceMessageCount;设备消息数量
|
|
@Schema(description = "上报数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1000")
|
|
@Schema(description = "上报数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1000")
|
|
- private long reportTotal;
|
|
|
|
|
|
+ private long deviceMessageCount;
|
|
|
|
|
|
// TODO @super:productCategory 哈
|
|
// TODO @super:productCategory 哈
|
|
@Schema(description = "今日新增品类数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
|
@Schema(description = "今日新增品类数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
|
- private long categoryTodayTotal;
|
|
|
|
|
|
+ private long productCategoryTodayCount;
|
|
|
|
|
|
@Schema(description = "今日新增产品数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "20")
|
|
@Schema(description = "今日新增产品数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "20")
|
|
- private long productTodayTotal;
|
|
|
|
|
|
+ private long productTodayCount;
|
|
|
|
|
|
@Schema(description = "今日新增设备数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
|
|
@Schema(description = "今日新增设备数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
|
|
- private long deviceTodayTotal;
|
|
|
|
|
|
+ private long deviceTodayCount;
|
|
|
|
|
|
// TODO @super:deviceMessageCount;今日设备消息数量
|
|
// TODO @super:deviceMessageCount;今日设备消息数量
|
|
@Schema(description = "今日新增上报数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1000")
|
|
@Schema(description = "今日新增上报数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1000")
|
|
- private long reportTodayTotal;
|
|
|
|
|
|
+ private long deviceMessageTodayCount;
|
|
|
|
|
|
// TODO @super:deviceOnlineCount
|
|
// TODO @super:deviceOnlineCount
|
|
|
|
|
|
@Schema(description = "在线数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "80")
|
|
@Schema(description = "在线数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "80")
|
|
- private long onlineTotal;
|
|
|
|
|
|
+ private long deviceOnlineCount;
|
|
|
|
|
|
// TODO @super:deviceOfflineCount
|
|
// TODO @super:deviceOfflineCount
|
|
|
|
|
|
@Schema(description = "离线数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "15")
|
|
@Schema(description = "离线数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "15")
|
|
- private long offlineTotal;
|
|
|
|
|
|
+ private long deviceOfflineCount;
|
|
|
|
|
|
// TODO @super:deviceInactivECount
|
|
// TODO @super:deviceInactivECount
|
|
|
|
|
|
@Schema(description = "待激活设备数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "5")
|
|
@Schema(description = "待激活设备数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "5")
|
|
- private long neverOnlineTotal;
|
|
|
|
|
|
+ private long deviceInactiveCount;
|
|
|
|
|
|
// TODO @super:1)类型改成 Map,key 分类名、value 设备数量;2)deviceStatsOfCategory => productCategoryDeviceCounts
|
|
// TODO @super:1)类型改成 Map,key 分类名、value 设备数量;2)deviceStatsOfCategory => productCategoryDeviceCounts
|
|
@Schema(description = "按品类统计的设备数量")
|
|
@Schema(description = "按品类统计的设备数量")
|
|
- private List<DataItem> deviceStatsOfCategory;
|
|
|
|
|
|
+ private Map<String, Integer> productCategoryDeviceCounts;
|
|
|
|
|
|
// TODO @super:貌似界面里,用不到这个字段???
|
|
// TODO @super:貌似界面里,用不到这个字段???
|
|
- @Schema(description = "上报数据数量统计")
|
|
|
|
- private List<TimeData> reportDataStats;
|
|
|
|
|
|
|
|
- // TODO @super:deviceUpMessageStats、deviceDownMessageStats 单独抽到 IotStatisticsDeviceMessageSummaryRespVO,然后里面属性就是 upstreamCounts、downstreamCounts
|
|
|
|
-
|
|
|
|
- @Schema(description = "上行数据数量统计")
|
|
|
|
- private List<TimeData> deviceUpMessageStats;
|
|
|
|
-
|
|
|
|
- @Schema(description = "下行数据数量统计")
|
|
|
|
- private List<TimeData> deviceDownMessageStats;
|
|
|
|
-
|
|
|
|
- // TODO @super:如果只有这两个字段,使用 KeyValue 这个键值对
|
|
|
|
- @Schema(description = "时间数据")
|
|
|
|
- @Data
|
|
|
|
- public static class TimeData {
|
|
|
|
-
|
|
|
|
- @Schema(description = "时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1646092800000")
|
|
|
|
- private long time;
|
|
|
|
-
|
|
|
|
- @Schema(description = "数据值", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
|
|
|
|
- private Object data;
|
|
|
|
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Schema(description = "数据项")
|
|
|
|
- @Data
|
|
|
|
- public static class DataItem {
|
|
|
|
-
|
|
|
|
- @Schema(description = "数据项名", requiredMode = Schema.RequiredMode.REQUIRED, example = "智能家居")
|
|
|
|
- private String name;
|
|
|
|
-
|
|
|
|
- @Schema(description = "数据项值", requiredMode = Schema.RequiredMode.REQUIRED, example = "50")
|
|
|
|
- private Object value;
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
|
|
+ // TODO @super:deviceUpMessageStats、deviceDownMessageStats 单独抽到 IotStatisticsDeviceMessageSummaryRespVO,然后里面属性就是 upstreamCounts、downstreamCounts
|
|
|
|
|
|
}
|
|
}
|