MQTT通讯功能联调
This commit is contained in:
@@ -44,6 +44,24 @@ public enum AccessEnum {
|
||||
TIME_OUT(406,"请求超出了等待时间"),
|
||||
OTHER_ERROR(500,"其他错误"),
|
||||
|
||||
/**
|
||||
* 平台主动获取装置数据
|
||||
*/
|
||||
SOFT_INFO(1,"软件信息"),
|
||||
L_DEV_INFO(2,"逻辑设备信息"),
|
||||
EPD(3,"电能数据"),
|
||||
PQD(4,"电能质量数据"),
|
||||
BMD(5,"基础测量数据"),
|
||||
EVT(6,"事件"),
|
||||
ALM(7,"告警"),
|
||||
STS(8,"状态"),
|
||||
DI(9,"开入"),
|
||||
DO(10,"开出"),
|
||||
PARM(11,"参数"),
|
||||
Set(12,"定值"),
|
||||
INSET(13,"内部定值"),
|
||||
CTRL(14,"控制"),
|
||||
|
||||
;
|
||||
|
||||
private final int code;
|
||||
|
||||
@@ -53,6 +53,10 @@ public enum AccessResponseEnum {
|
||||
MODEL_MISS("A0308","模板信息缺失!"),
|
||||
MODEL_VERSION_ERROR("A0308","询问装置模板信息错误"),
|
||||
|
||||
CLDID_IS_NULL("A0309","逻辑子设备标识为空"),
|
||||
LDEVINFO_IS_NULL("A0309","逻辑设备信息为空"),
|
||||
SOFTINFO_IS_NULL("A0309","软件信息为空"),
|
||||
|
||||
;
|
||||
|
||||
private final String code;
|
||||
|
||||
@@ -5,6 +5,7 @@ import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -48,13 +49,13 @@ public class DevAccessParam implements Serializable {
|
||||
private String position;
|
||||
|
||||
@ApiModelProperty("电压等级")
|
||||
private String volGrade;
|
||||
private Double volGrade;
|
||||
|
||||
@ApiModelProperty("PT变比")
|
||||
private String ptRatio;
|
||||
private Double ptRatio;
|
||||
|
||||
@ApiModelProperty("CT变比")
|
||||
private String ctRatio;
|
||||
private Double ctRatio;
|
||||
|
||||
@ApiModelProperty("中心点经度")
|
||||
@NotNull(message = "中心点经度不能为空")
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.njcn.access.pojo;
|
||||
|
||||
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2023/8/9 10:00
|
||||
*/
|
||||
@Data
|
||||
public class RspDataDto {
|
||||
|
||||
@SerializedName("Cldid")
|
||||
private Integer clDid;
|
||||
|
||||
@SerializedName("DataType")
|
||||
private Integer dataType;
|
||||
|
||||
@SerializedName("DataAttr")
|
||||
private Integer dataAttr;
|
||||
|
||||
@SerializedName("DsNameIdx")
|
||||
private Integer dsNameIdx;
|
||||
|
||||
@SerializedName("DataArray")
|
||||
private Object dataArray;
|
||||
|
||||
|
||||
/**
|
||||
* 软件信息
|
||||
*/
|
||||
@Data
|
||||
public static class SoftInfo {
|
||||
|
||||
@SerializedName("OpAttr")
|
||||
private String opAttr;
|
||||
|
||||
@SerializedName("OsName")
|
||||
private String osName;
|
||||
|
||||
@SerializedName("OsVersion")
|
||||
private String osVersion;
|
||||
|
||||
@SerializedName("AppVersion")
|
||||
private String appVersion;
|
||||
|
||||
@SerializedName("AppDate")
|
||||
private String appDate;
|
||||
|
||||
@SerializedName("AppCheck")
|
||||
private String appCheck;
|
||||
|
||||
@SerializedName("SoftUpdate")
|
||||
private String softUpdate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 软件信息
|
||||
*/
|
||||
@Data
|
||||
public static class LdevInfo {
|
||||
|
||||
@SerializedName("Cldid")
|
||||
private Integer clDid;
|
||||
|
||||
@SerializedName("VolGrade")
|
||||
private Double volGrade;
|
||||
|
||||
@SerializedName("ConType")
|
||||
@ApiModelProperty("接线方式")
|
||||
private Integer conType;
|
||||
|
||||
@SerializedName("PtRatio")
|
||||
private Double ptRatio;
|
||||
|
||||
@SerializedName("CtRatio")
|
||||
private Double ctRatio;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.njcn.access.pojo.dto;
|
||||
|
||||
import com.njcn.access.annotation.ParamName;
|
||||
import com.njcn.access.pojo.dto.devModel.DataArrayDto;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2023/8/8 10:35
|
||||
*/
|
||||
@Data
|
||||
public class AskDataDto {
|
||||
|
||||
@ParamName("Cldid")
|
||||
private Integer clDid;
|
||||
|
||||
@ParamName("DataType")
|
||||
private Integer dataType;
|
||||
|
||||
@ParamName("DataAttr")
|
||||
private Integer dataAttr;
|
||||
|
||||
@ParamName("Operate")
|
||||
private Integer operate;
|
||||
|
||||
@ParamName("StartTime")
|
||||
private Integer startTime;
|
||||
|
||||
@ParamName("EndTime")
|
||||
private Integer endTime;
|
||||
|
||||
@ParamName("DataArray")
|
||||
private DataArrayDto dataArray;
|
||||
}
|
||||
@@ -18,4 +18,6 @@ public class CsModelDto {
|
||||
|
||||
private Integer did;
|
||||
|
||||
private Integer type;
|
||||
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ public class ModelDto implements Serializable {
|
||||
@SerializedName("Type")
|
||||
@ApiModelProperty("消息类型")
|
||||
@NotNull(message = "消息类型不能为空")
|
||||
private String type;
|
||||
private Integer type;
|
||||
|
||||
@SerializedName("Msg")
|
||||
@ApiModelProperty("报文内容")
|
||||
|
||||
@@ -3,9 +3,11 @@ package com.njcn.access.pojo.dto.devModel;
|
||||
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.apache.poi.hpsf.Decimal;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
@@ -18,23 +20,26 @@ import java.io.Serializable;
|
||||
public class LDevInfoDto implements Serializable {
|
||||
|
||||
@SerializedName("OpAttr")
|
||||
@NotEmpty(message = "读写操作属性,不可为空")
|
||||
private String opAttr;
|
||||
|
||||
@SerializedName("Cldid")
|
||||
@ApiModelProperty(value = "逻辑子设备Id")
|
||||
private Integer cldId;
|
||||
|
||||
@SerializedName("VolGrade")
|
||||
@ApiModelProperty(value = "电压等级")
|
||||
private String volGrade;
|
||||
private Double volGrade;
|
||||
|
||||
@SerializedName("ConType")
|
||||
@ApiModelProperty(value = "接线方式")
|
||||
private String conType;
|
||||
private Integer conType;
|
||||
|
||||
@SerializedName("PtRatio")
|
||||
@ApiModelProperty(value = "PT变比")
|
||||
private String ptRatio;
|
||||
private BigDecimal ptRatio;
|
||||
|
||||
@SerializedName("CtRatio")
|
||||
@ApiModelProperty(value = "CT变比")
|
||||
private String ctRatio;
|
||||
private BigDecimal ctRatio;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user