|
|
@@ -1,5 +1,7 @@
|
|
|
package com.zhongshu.iot.server.core.domain.iot;
|
|
|
|
|
|
+import com.github.microservice.types.deviceUse.IotDeviceDataType;
|
|
|
+import com.zhongshu.card.client.utils.DateUtils;
|
|
|
import com.zhongshu.iot.client.model.iot.IotAttribute;
|
|
|
import com.zhongshu.iot.server.core.domain.base.SuperEntity;
|
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
@@ -26,6 +28,9 @@ public class IotDeviceData extends SuperEntity {
|
|
|
@Schema(description = "所属模版ID")
|
|
|
private String iotTemplateId;
|
|
|
|
|
|
+ @Schema(description = "关联物模型信息")
|
|
|
+ private String iotThingId;
|
|
|
+
|
|
|
@Schema(description = "关联的设备")
|
|
|
private String deviceId;
|
|
|
|
|
|
@@ -37,4 +42,36 @@ public class IotDeviceData extends SuperEntity {
|
|
|
|
|
|
@Schema(description = "对应的值")
|
|
|
private Object data;
|
|
|
+
|
|
|
+ @Schema(description = "数据类型,如:当前数据,历史数据")
|
|
|
+ private IotDeviceDataType dataType;
|
|
|
+
|
|
|
+ //------------------------------时间信息 start--------------------
|
|
|
+ @Schema(description = "年份,如:2024")
|
|
|
+ private Integer year;
|
|
|
+
|
|
|
+ @Schema(description = "月份,如:6")
|
|
|
+ private Integer month;
|
|
|
+
|
|
|
+ @Schema(description = "当前月的第几天")
|
|
|
+ private Integer dayOfMonth;
|
|
|
+
|
|
|
+ @Schema(description = "今年第几周,如:32")
|
|
|
+ private Integer week;
|
|
|
+
|
|
|
+ @Schema(description = "当前年的第几天")
|
|
|
+ private Integer dayOfYear;
|
|
|
+
|
|
|
+ @Schema(description = "当前的第几小时")
|
|
|
+ private Integer hourOfDay;
|
|
|
+
|
|
|
+ public void setTimes() {
|
|
|
+ this.year = DateUtils.getCurrentYear();
|
|
|
+ this.month = DateUtils.getCurrentMonthInYear();
|
|
|
+ this.dayOfMonth = DateUtils.getCurrentDayInMonth();
|
|
|
+ this.hourOfDay = DateUtils.getCurrentHourOfDay();
|
|
|
+
|
|
|
+ this.dayOfYear = DateUtils.getCurrentDayInYear();
|
|
|
+ this.week = DateUtils.getCurrentWeekInYear();
|
|
|
+ }
|
|
|
}
|