From 789adac5e990bc8f481292c5c6c162179dfb3469 Mon Sep 17 00:00:00 2001 From: luyie Date: Thu, 19 Sep 2024 08:52:46 +0800 Subject: [PATCH] =?UTF-8?q?add:=E6=A8=A1=E5=9E=8B=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=90=91=E9=87=8F,=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gglm/bigmodel/business/vo/DeviceModelData.java | 161 +++++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/vo/DeviceModelData.java diff --git a/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/vo/DeviceModelData.java b/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/vo/DeviceModelData.java new file mode 100644 index 0000000..9385b1f --- /dev/null +++ b/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/vo/DeviceModelData.java @@ -0,0 +1,161 @@ +package com.hnac.gglm.bigmodel.business.vo; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.NullSerializer; +import com.hnac.hzinfo.sdk.v5.model.vo.ModelAttrVO; +import com.hnac.hzinfo.sdk.v5.model.vo.ModelEventVO; +import com.hnac.hzinfo.sdk.v5.model.vo.ModelFuncVO; +import lombok.Data; +import org.springblade.core.tool.utils.Func; + +/** + * @Author: ypj + * @Date: 2024/9/19 7:55 + */ +@Data +public class DeviceModelData { + /** + * 模型id + */ + private Long modelId; + + /** + * 名称 + */ + private String name; + + /** + * 标识 + */ + private String signage; + + /** + * 数据类型 + */ + private String dbType; + + /** + * 字段长度 + */ + private String fieldLength; + + /** + * 保留位数 + */ + @JsonSerialize(nullsUsing = NullSerializer.class) + private Integer keepFigures; + + /** + * 取数规则 0 平均值、1 最大值、2 最小值、3 最后值、4 最早值、5 和值、6 差值 + */ + @JsonSerialize(nullsUsing = NullSerializer.class) + private Integer accessRules; + + /** + * 描述 + */ + private String descs; + + /** + * 模型分类id + */ + private Long modelClassifyId; + + /** + * 告警等级 + */ + private Integer level; + + /** + * 告警频率 + */ + private Integer duration; + + /** + * 参数名称 + */ + private String parameterName; + + /** + * 参数标识 + */ + private String parameterTag; + + /** + * 单点控制状态,0:分,1:合 + */ + private Integer controlStatus; + + /** + * 是否弹窗 + */ + private Integer isPopup; + + /** + * 是否反校 + */ + private Integer isCheck; + + /** + * 参数来源,0:默认,1:属性值 + */ + private Integer parameterSource; + + /** + * 来源属性标识 + */ + private String sourceAttrSignage; + + /** + * 控制参数,0:分/合,1:退/投,2:停止/启动 + */ + private Integer controlParameter; + + /** + * 参数json + */ + private String parameterJson; + + /** + * 间隔时长 + */ + private Integer intervalLength; + + /** + * 参数范围最小值 + */ + private Integer minValue; + + /** + * 参数范围最大值 + */ + private Integer maxValue; + + /** + * 参数系数 + */ + private Integer coefficient; + + /** + * 类型,0:属性,1:功能,2:事件 + */ + private Integer type; + + public static DeviceModelData of(ModelAttrVO data) { + DeviceModelData deviceModelData = Func.copyProperties(data, DeviceModelData.class); + deviceModelData.setType(0); + return deviceModelData; + } + + public static DeviceModelData of(ModelFuncVO data) { + DeviceModelData deviceModelData = Func.copyProperties(data, DeviceModelData.class); + deviceModelData.setType(1); + return deviceModelData; + } + + public static DeviceModelData of(ModelEventVO data) { + DeviceModelData deviceModelData = Func.copyProperties(data, DeviceModelData.class); + deviceModelData.setType(2); + return deviceModelData; + } +}