代码调整
This commit is contained in:
@@ -14,7 +14,7 @@ public enum AccessResponseEnum {
|
||||
* A0301 ~ A0399 用于用户模块的枚举
|
||||
* <p>
|
||||
*/
|
||||
NDID_NO_FIND("A0301", "nDid在平台端未找到或者已接入"),
|
||||
NDID_NO_FIND("A0301", "nDid在平台端未找到或者已注册"),
|
||||
|
||||
MODEL_REPEAT("A0302", "模板重复,请勿重复录入!"),
|
||||
MODEL_NO_FIND("A0302", "模板不存在,请先录入模板数据!"),
|
||||
@@ -24,6 +24,7 @@ public enum AccessResponseEnum {
|
||||
DEV_NOT_FIND("A0303","装置类型未找到!"),
|
||||
DEV_MODEL_NOT_FIND("A0303","装置型号未找到!"),
|
||||
DEV_IS_NOT_ZL("A0303","注册装置不是直连装置!"),
|
||||
DEV_IS_NOT_WG("A0303","注册装置不是网关!"),
|
||||
|
||||
REGISTER_RESPONSE_ERROR("A0304","装置注册,装置侧应答失败!"),
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.njcn.access.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2023/7/7 15:00
|
||||
*/
|
||||
@Data
|
||||
public class WgDevRegisterParam {
|
||||
|
||||
@ApiModelProperty("网关id")
|
||||
private String id;
|
||||
|
||||
@Data
|
||||
public static class Device {
|
||||
|
||||
@ApiModelProperty("设备型号")
|
||||
private String devModel;
|
||||
|
||||
@ApiModelProperty("设备码")
|
||||
private String lDid;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.njcn.access.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2023/7/6 16:11
|
||||
*/
|
||||
@Data
|
||||
public class WgDeviceRegisterParam {
|
||||
|
||||
@ApiModelProperty("网关id")
|
||||
@NotNull(message = "网关id不能为空")
|
||||
private String wgId;
|
||||
|
||||
@ApiModelProperty("装置型号")
|
||||
@NotNull(message = "装置型号不能为空")
|
||||
private String devModel;
|
||||
|
||||
@ApiModelProperty("did")
|
||||
@NotNull(message = "did不能为空")
|
||||
private String did;
|
||||
|
||||
@ApiModelProperty("拓扑图id")
|
||||
@NotNull(message = "拓扑图id不能为空")
|
||||
private String topologyDiagram;
|
||||
|
||||
@Data
|
||||
public static class LineParam {
|
||||
|
||||
@ApiModelProperty("监测点名称")
|
||||
@NotNull(message = "监测点名称不能为空")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("安装位置")
|
||||
@NotNull(message = "安装位置不能为空")
|
||||
private String position;
|
||||
|
||||
@ApiModelProperty("中心点经度")
|
||||
@NotNull(message = "中心点经度不能为空")
|
||||
private Double lng;
|
||||
|
||||
@ApiModelProperty("中心点纬度")
|
||||
@NotNull(message = "中心点纬度不能为空")
|
||||
private Double lat;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.njcn.access.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2023/7/6 15:59
|
||||
*/
|
||||
@Data
|
||||
public class WgRegisterParam {
|
||||
|
||||
@ApiModelProperty("项目id")
|
||||
@NotNull(message = "项目id不能为空")
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty("区域")
|
||||
private String area;
|
||||
|
||||
@ApiModelProperty("拓扑图id")
|
||||
@NotNull(message = "拓扑图id不能为空")
|
||||
private String topologyDiagram;
|
||||
|
||||
@ApiModelProperty("设备识别码")
|
||||
@NotNull(message = "设备识别码不能为空")
|
||||
private String nDid;
|
||||
|
||||
@Data
|
||||
public static class LineParam {
|
||||
|
||||
@ApiModelProperty("监测点名称")
|
||||
@NotNull(message = "监测点名称不能为空")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("安装位置")
|
||||
@NotNull(message = "安装位置不能为空")
|
||||
private String position;
|
||||
|
||||
@ApiModelProperty("电压等级")
|
||||
@NotNull(message = "电压等级不能为空")
|
||||
private String volGrade;
|
||||
|
||||
@ApiModelProperty("PT变比")
|
||||
@NotNull(message = "PT变比不能为空")
|
||||
private String ptRatio;
|
||||
|
||||
@ApiModelProperty("CT变比")
|
||||
@NotNull(message = "CT变比不能为空")
|
||||
private String ctRatio;
|
||||
|
||||
@ApiModelProperty("中心点经度")
|
||||
@NotNull(message = "中心点经度不能为空")
|
||||
private Double lng;
|
||||
|
||||
@ApiModelProperty("中心点纬度")
|
||||
@NotNull(message = "中心点纬度不能为空")
|
||||
private Double lat;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.njcn.access.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 网关表
|
||||
* </p>
|
||||
*
|
||||
* @author xuyang
|
||||
* @since 2023-07-06
|
||||
*/
|
||||
@Data
|
||||
@TableName("cs_gateway")
|
||||
public class CsGateway extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 网关id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private String pid;
|
||||
|
||||
/**
|
||||
* 位置信息
|
||||
*/
|
||||
private String area;
|
||||
|
||||
/**
|
||||
* 拓扑图id
|
||||
*/
|
||||
private String tid;
|
||||
|
||||
/**
|
||||
* 状态 0-删除;1-正常;默认正常
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.njcn.access.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 网关装置关系表
|
||||
* </p>
|
||||
*
|
||||
* @author xuyang
|
||||
* @since 2023-07-07
|
||||
*/
|
||||
@Data
|
||||
@TableName("cs_gateway_device")
|
||||
public class CsGatewayDevice extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 网关id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 网关下设备id
|
||||
*/
|
||||
private String devId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.njcn.access.pojo.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2023/7/7 9:09
|
||||
*/
|
||||
@Data
|
||||
public class CsGatewayVo {
|
||||
|
||||
@ApiModelProperty("网关id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("网关名称")
|
||||
private String wgName;
|
||||
|
||||
@ApiModelProperty("项目名称")
|
||||
private String proName;
|
||||
|
||||
@ApiModelProperty("设备型号")
|
||||
private String devModel;
|
||||
|
||||
@ApiModelProperty("型号版本")
|
||||
private String programVersion;
|
||||
|
||||
@ApiModelProperty("拓扑图")
|
||||
private String filePath;
|
||||
|
||||
@ApiModelProperty("设备集合")
|
||||
private List<Device> list;
|
||||
|
||||
@Data
|
||||
public static class Device {
|
||||
|
||||
@ApiModelProperty("设备名称")
|
||||
private String devName;
|
||||
|
||||
@ApiModelProperty("项目名称")
|
||||
private String proName;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user