模板解析字典功能
This commit is contained in:
@@ -28,6 +28,19 @@ public enum AccessResponseEnum {
|
||||
|
||||
NO_RECEIVE_FROM_DEV("A0306","未收到装置注册响应,请核查!"),
|
||||
|
||||
DICT_MISSING("A0307","字典数据缺失!"),
|
||||
EPD_DICT_MISSING("A0307","Epd字典数据缺失!"),
|
||||
PQD_DICT_MISSING("A0307","Pqd字典数据缺失!"),
|
||||
BMD_DICT_MISSING("A0307","Bmd字典数据缺失!"),
|
||||
Evt_DICT_MISSING("A0307","Evt字典数据缺失!"),
|
||||
ALM_DICT_MISSING("A0307","Alm字典数据缺失!"),
|
||||
STS_DICT_MISSING("A0307","Sts字典数据缺失!"),
|
||||
DI_DICT_MISSING("A0307","Di字典数据缺失!"),
|
||||
DO_DICT_MISSING("A0307","Do字典数据缺失!"),
|
||||
PARM_DICT_MISSING("A0307","Parm字典数据缺失!"),
|
||||
SET_DICT_MISSING("A0307","Set字典数据缺失!"),
|
||||
INSET_DICT_MISSING("A0307","InSet字典数据缺失!"),
|
||||
CTRL_DICT_MISSING("A0307","Ctrl字典数据缺失!"),
|
||||
|
||||
;
|
||||
|
||||
|
||||
@@ -63,6 +63,22 @@ public enum TypeEnum {
|
||||
DATA_13("0x0D","内部定值InSet"),
|
||||
DATA_14("0x0E","控制Ctrl"),
|
||||
|
||||
/**
|
||||
* 数据模型列表
|
||||
*/
|
||||
EPD("Epd","电能数据"),
|
||||
PQD("Pqd","电能质量数据"),
|
||||
BMD("Bmd","基础测量数据"),
|
||||
EVT("Evt","事件"),
|
||||
ALM("Alm","告警"),
|
||||
STS("Sts","状态"),
|
||||
DI("Di","开入"),
|
||||
DO("Do","开出"),
|
||||
PARM("Parm","参数"),
|
||||
SET("Set","定值"),
|
||||
INSET("InSet","内部定值"),
|
||||
CTRL("Ctrl","控制"),
|
||||
|
||||
;
|
||||
|
||||
private final String code;
|
||||
|
||||
@@ -30,6 +30,6 @@ public class AlmDto implements Serializable {
|
||||
|
||||
@SerializedName("Type")
|
||||
@NotNull(message = "告警事件类别,不为空")
|
||||
private String type;
|
||||
private String eventType;
|
||||
|
||||
}
|
||||
|
||||
@@ -36,11 +36,11 @@ public class CtrlDto implements Serializable {
|
||||
|
||||
@SerializedName("Check")
|
||||
@NotNull(message = "是否需遥控校验,不为空")
|
||||
private Integer check;
|
||||
private Integer curSts;
|
||||
|
||||
@SerializedName("auto")
|
||||
@NotNull(message = "是否支持自动控制,不为空")
|
||||
private Integer auto;
|
||||
private Integer ctlSts;
|
||||
|
||||
@SerializedName("MaxNum")
|
||||
@ApiModelProperty("设置最大值")
|
||||
@@ -60,5 +60,5 @@ public class CtrlDto implements Serializable {
|
||||
|
||||
@SerializedName("Encode")
|
||||
@NotNull(message = "是否加密,不为空")
|
||||
private Integer encode;
|
||||
private Integer storeFlag;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public class EvtDto implements Serializable {
|
||||
|
||||
@SerializedName("Type")
|
||||
@NotNull(message = "事件类别,不为空")
|
||||
private String type;
|
||||
private String eventType;
|
||||
|
||||
@SerializedName("Parm")
|
||||
private List<EvtParamDto> param;
|
||||
|
||||
@@ -33,15 +33,15 @@ public class ParmDto implements Serializable {
|
||||
@SerializedName("Type")
|
||||
@NotNull(message = "参数类型,不为空")
|
||||
@ApiModelProperty("系统参数:sys 运行参数:run 功能参数:fun")
|
||||
private String type;
|
||||
private String eventType;
|
||||
|
||||
@SerializedName("DataType")
|
||||
@NotNull(message = "参数数据类型,不为空")
|
||||
private String dataType;
|
||||
private String type;
|
||||
|
||||
@SerializedName("ModifyFlag")
|
||||
@NotNull(message = "是否可修改,不为空")
|
||||
private Integer modifyFlag;
|
||||
private Integer ctlSts;
|
||||
|
||||
@SerializedName("MaxNum")
|
||||
@ApiModelProperty("设置最大值")
|
||||
@@ -57,7 +57,7 @@ public class ParmDto implements Serializable {
|
||||
|
||||
@SerializedName("Strlen")
|
||||
@ApiModelProperty("参数string可设置字符串的长度上限")
|
||||
private Integer strLen;
|
||||
private Integer strlen;
|
||||
|
||||
@SerializedName("DefaultValue")
|
||||
@NotNull(message = "参数缺省值")
|
||||
|
||||
@@ -31,7 +31,7 @@ public class SetDto implements Serializable {
|
||||
|
||||
@SerializedName("DataType")
|
||||
@NotNull(message = "参数数据类型,不为空")
|
||||
private String dataType;
|
||||
private String type;
|
||||
|
||||
@SerializedName("MaxNum")
|
||||
@ApiModelProperty("设置最大值")
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
package com.njcn.access.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -23,6 +17,7 @@ import lombok.Setter;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@TableName("cs_alm")
|
||||
@Deprecated
|
||||
public class CsAlmPO extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -14,6 +14,7 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
@TableName("cs_bmd")
|
||||
@Deprecated
|
||||
public class CsBmdPO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
package com.njcn.access.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import javax.naming.Name;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -22,6 +19,7 @@ import lombok.Setter;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@TableName("cs_ctrl")
|
||||
@Deprecated
|
||||
public class CsCtrlPO extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -39,7 +37,7 @@ public class CsCtrlPO extends BaseEntity {
|
||||
/**
|
||||
* 参数名称
|
||||
*/
|
||||
@TableId(value = "name")
|
||||
@MppMultiId(value = "name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
@@ -60,7 +58,7 @@ public class CsCtrlPO extends BaseEntity {
|
||||
/**
|
||||
* 是否需遥控校验 “1”“0”
|
||||
*/
|
||||
private Integer check;
|
||||
private Integer remoteControlCheck;
|
||||
|
||||
/**
|
||||
* 是否支持自动控制 “1”“0”
|
||||
@@ -97,25 +95,5 @@ public class CsCtrlPO extends BaseEntity {
|
||||
*/
|
||||
private String classId;
|
||||
|
||||
/**
|
||||
* 创建用户
|
||||
*/
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新用户
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.njcn.access.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 详细数据表
|
||||
* </p>
|
||||
*
|
||||
* @author xuyang
|
||||
* @since 2023-05-23
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("cs_data_array")
|
||||
public class CsDataArrayPO extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 数据集表id(cs_data_set)
|
||||
*/
|
||||
private String pid;
|
||||
|
||||
/**
|
||||
* 数据字典表id(cs_pqd_epd、cs_md..)
|
||||
*/
|
||||
private String dataId;
|
||||
|
||||
/**
|
||||
* 数据名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 数据别名
|
||||
*/
|
||||
private String anotherName;
|
||||
|
||||
/**
|
||||
* 字典序号
|
||||
*/
|
||||
private Integer idx;
|
||||
|
||||
/**
|
||||
* 排序(数据解析序号)
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 数据统计方法(max、min、avg、cp95)
|
||||
*/
|
||||
private String statMethod;
|
||||
|
||||
/**
|
||||
* 数据类型(Float)
|
||||
*/
|
||||
private String dataType;
|
||||
|
||||
/**
|
||||
* 相别(A、B、C...)
|
||||
*/
|
||||
private String phase;
|
||||
|
||||
/**
|
||||
* influxdb表名
|
||||
*/
|
||||
private String classId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.njcn.access.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 数据集表
|
||||
* </p>
|
||||
*
|
||||
* @author xuyang
|
||||
* @since 2023-05-23
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@TableName("cs_data_set")
|
||||
public class CsDataSetPO extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 装置数据模板表Id(cs_dev_model)
|
||||
*/
|
||||
private String pid;
|
||||
|
||||
/**
|
||||
* 数据集名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 数据集别名
|
||||
*/
|
||||
private String anotherName;
|
||||
|
||||
/**
|
||||
* 字典序号
|
||||
*/
|
||||
private Integer idx;
|
||||
|
||||
/**
|
||||
* 数据类型(Rt:实时数据、Stat:统计数据)
|
||||
*/
|
||||
private String dataType;
|
||||
|
||||
/**
|
||||
* 周期
|
||||
*/
|
||||
private Integer period;
|
||||
|
||||
/**
|
||||
* 是否存储 0:不存储 1:存储
|
||||
*/
|
||||
private Integer storeFlag;
|
||||
|
||||
|
||||
}
|
||||
@@ -23,6 +23,7 @@ import lombok.Setter;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@TableName("cs_di")
|
||||
@Deprecated
|
||||
public class CsDiPO extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -23,6 +23,7 @@ import lombok.Setter;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@TableName("cs_do")
|
||||
@Deprecated
|
||||
public class CsDoPO extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -17,6 +17,7 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
@TableName("cs_epd_pqd")
|
||||
@Deprecated
|
||||
public class CsEpdPqdPO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.time.LocalDateTime;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@TableName("cs_evt")
|
||||
@Deprecated
|
||||
public class CsEvtPO extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.njcn.access.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
@@ -20,6 +21,7 @@ import lombok.Setter;
|
||||
*/
|
||||
@Data
|
||||
@TableName("cs_parm")
|
||||
@Deprecated
|
||||
public class CsParmPO extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -34,7 +36,7 @@ public class CsParmPO extends BaseEntity {
|
||||
/**
|
||||
* 参数名称
|
||||
*/
|
||||
@TableId(value = "name")
|
||||
@MppMultiId(value = "name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
@@ -87,21 +89,6 @@ public class CsParmPO extends BaseEntity {
|
||||
*/
|
||||
private String defaultValue;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新用户
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 数据分类,唯一类别
|
||||
*/
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.njcn.access.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
@@ -22,6 +23,7 @@ import lombok.Setter;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@TableName("cs_set")
|
||||
@Deprecated
|
||||
public class CsSetPO extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -39,7 +41,7 @@ public class CsSetPO extends BaseEntity {
|
||||
/**
|
||||
* 参数名称
|
||||
*/
|
||||
@TableId(value = "name")
|
||||
@MppMultiId(value = "name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,6 +23,7 @@ import lombok.Setter;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@TableName("cs_sts")
|
||||
@Deprecated
|
||||
public class CsStsPO extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
Reference in New Issue
Block a user