diff --git a/iot-access/access-api/pom.xml b/iot-access/access-api/pom.xml
index 8426020..231cf31 100644
--- a/iot-access/access-api/pom.xml
+++ b/iot-access/access-api/pom.xml
@@ -26,6 +26,28 @@
4.11
test
+
+ org.projectlombok
+ lombok
+
+
+ com.google.code.gson
+ gson
+ 2.8.9
+
+
+ org.springframework
+ spring-web
+
+
+ com.njcn
+ common-swagger
+ ${project.version}
+
+
+ com.alibaba.nacos
+ nacos-client
+
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/enums/AccessResponseEnum.java b/iot-access/access-api/src/main/java/com/njcn/access/enums/AccessResponseEnum.java
new file mode 100644
index 0000000..9709c00
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/enums/AccessResponseEnum.java
@@ -0,0 +1,29 @@
+package com.njcn.access.enums;
+
+import lombok.Getter;
+
+/**
+ * @author xuyang
+ * @version 1.0.0
+ * @date 2023年04月17日 10:50
+ */
+@Getter
+public enum AccessResponseEnum {
+
+ /**
+ * A0301 ~ A0399 用于用户模块的枚举
+ *
+ */
+ MODEL_REPEAT("A0301", "模板重复,请勿重复录入!"),
+ ;
+
+ private final String code;
+
+ private final String message;
+
+ AccessResponseEnum(String code, String message) {
+ this.code = code;
+ this.message = message;
+ }
+
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/param/ParamName.java b/iot-access/access-api/src/main/java/com/njcn/access/param/ParamName.java
new file mode 100644
index 0000000..97709a9
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/param/ParamName.java
@@ -0,0 +1,18 @@
+package com.njcn.access.param;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * 序列化时,调整实体返回名称
+ * @author 徐扬
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER})
+public @interface ParamName {
+
+ String value() default "";
+
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/AccessDto.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/AccessDto.java
new file mode 100644
index 0000000..57dbb78
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/AccessDto.java
@@ -0,0 +1,23 @@
+package com.njcn.access.pojo.dto;
+
+import com.njcn.access.param.ParamName;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2023/3/31 14:04
+ */
+@Data
+public class AccessDto implements Serializable {
+
+ @ParamName("NDID")
+ private String nDid;
+
+ @ParamName("dev_type")
+ private String devType;
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/DevCfgDto.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/DevCfgDto.java
new file mode 100644
index 0000000..d28ced2
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/DevCfgDto.java
@@ -0,0 +1,24 @@
+package com.njcn.access.pojo.dto;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2023/4/10 10:47
+ */
+@Data
+public class DevCfgDto implements Serializable {
+
+ @SerializedName("DID")
+ private String did;
+
+ @SerializedName("DevType")
+ private String devType;
+
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/DevModelDto.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/DevModelDto.java
new file mode 100644
index 0000000..8d7b555
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/DevModelDto.java
@@ -0,0 +1,30 @@
+package com.njcn.access.pojo.dto;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2023/4/10 10:14
+ */
+@Data
+public class DevModelDto implements Serializable {
+
+ @SerializedName("DevType")
+ private String devType;
+
+ @SerializedName("Version")
+ private String versionNo;
+
+ @SerializedName("Time")
+ private String versionDate;
+
+ @SerializedName("Crc")
+ private String crc;
+
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/ModelDto.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/ModelDto.java
new file mode 100644
index 0000000..d326cfc
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/ModelDto.java
@@ -0,0 +1,24 @@
+package com.njcn.access.pojo.dto;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2023/4/10 10:54
+ */
+@Data
+public class ModelDto implements Serializable {
+
+ @SerializedName("DevCfg")
+ private List devCfg;
+
+ @SerializedName("DevMod")
+ private List devMod;
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/PublicDto.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/PublicDto.java
new file mode 100644
index 0000000..e815037
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/PublicDto.java
@@ -0,0 +1,28 @@
+package com.njcn.access.pojo.dto;
+
+import com.njcn.access.param.ParamName;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2023/3/31 14:04
+ */
+@Data
+public class PublicDto implements Serializable {
+
+ private String mid;
+
+ @ParamName("NDID")
+ private String nDid;
+
+ private Long timestamp;
+
+ private String type;
+
+ private AccessDto param;
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/PublicParamDTO.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/PublicParamDTO.java
new file mode 100644
index 0000000..1e44c00
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/PublicParamDTO.java
@@ -0,0 +1,44 @@
+package com.njcn.access.pojo.dto;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+
+import java.io.Serializable;
+
+;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2022/3/12 19:18
+ */
+@Data
+public class PublicParamDTO implements Serializable {
+
+ /**
+ * 在请求报文中该值为请求 ID,在设备主动上报数据的报文中该字段可不填写
+ */
+ @SerializedName("mid")
+ private Integer mid;
+
+ @SerializedName("userId")
+ private String userId;
+
+ @SerializedName("deviceId")
+ private String deviceId;
+
+ @SerializedName("timestamp")
+ private String timestamp;
+
+ /**
+ * 报文处理的优先级
+ */
+ @SerializedName("level")
+ private Integer level;
+
+ @SerializedName("type")
+ private String type;
+
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/RegisterDTO.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/RegisterDTO.java
new file mode 100644
index 0000000..f4143eb
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/RegisterDTO.java
@@ -0,0 +1,53 @@
+package com.njcn.access.pojo.dto;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+
+;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2022/3/11 14:36
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class RegisterDTO extends PublicParamDTO implements Serializable {
+
+ /**
+ * 请求参数
+ */
+ @Data
+ @EqualsAndHashCode(callSuper = true)
+ public static class RegisterRequest extends RegisterDTO implements Serializable{
+
+ @SerializedName("expire")
+ private Integer expire;
+
+ @SerializedName("param")
+ private RegisterParamDTO.RegisterParamRequest param;
+ }
+
+ /**
+ * 应答参数
+ */
+ @Data
+ @EqualsAndHashCode(callSuper = true)
+ public static class RegisterResponse extends RegisterDTO implements Serializable{
+
+ @SerializedName("code")
+ private Integer code;
+
+ @SerializedName("msg")
+ private String msg;
+
+ @SerializedName("param")
+ private RegisterParamDTO.RegisterParamResponse param;
+ }
+
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/RegisterParamDTO.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/RegisterParamDTO.java
new file mode 100644
index 0000000..2558198
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/RegisterParamDTO.java
@@ -0,0 +1,57 @@
+package com.njcn.access.pojo.dto;
+
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2022/3/11 14:58
+ */
+@Data
+public class RegisterParamDTO implements Serializable {
+
+ @SerializedName("NDID")
+ private String nDid;
+
+ @SerializedName("DID")
+ private List did;
+
+ /**
+ * 请求参数
+ */
+ @Data
+ @EqualsAndHashCode(callSuper = true)
+ public static class RegisterParamRequest extends RegisterParamDTO implements Serializable{
+ @SerializedName("type")
+ private Integer type;
+ }
+
+ /**
+ * 应答参数
+ */
+ @Data
+ @EqualsAndHashCode(callSuper = true)
+ public static class RegisterParamResponse extends RegisterParamDTO implements Serializable{
+ @SerializedName("res")
+ private Integer res;
+
+ @SerializedName("type")
+ private Integer resType;
+
+ @SerializedName("NDID")
+ private String nDid;
+
+ @SerializedName("DEV_TYPE")
+ private String dev_type;
+
+ }
+
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/AlmDto.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/AlmDto.java
new file mode 100644
index 0000000..a1117ae
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/AlmDto.java
@@ -0,0 +1,28 @@
+package com.njcn.access.pojo.dto.data;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2022/3/13 14:45
+ */
+@Data
+public class AlmDto implements Serializable {
+
+ @SerializedName("Name")
+ private String name;
+
+ @SerializedName("IDX")
+ private Integer idx;
+
+ @SerializedName("Type")
+ private String type;
+
+
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/CtrlDto.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/CtrlDto.java
new file mode 100644
index 0000000..3c1b162
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/CtrlDto.java
@@ -0,0 +1,48 @@
+package com.njcn.access.pojo.dto.data;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2022/3/13 15:06
+ */
+@Data
+public class CtrlDto implements Serializable {
+
+ @SerializedName("Name")
+ private String name;
+
+ @SerializedName("IDX")
+ private Integer idx;
+
+ @SerializedName("Type")
+ private String type;
+
+ @SerializedName("Check")
+ private Integer remoteCheck;
+
+ @SerializedName("Auto")
+ private Integer auto;
+
+ @SerializedName("MaxNum")
+ private Integer maxNum;
+
+ @SerializedName("MinNum")
+ private Integer minNum;
+
+ @SerializedName("Ctlvalue")
+ private List ctlValue;
+
+ @SerializedName("Strlen")
+ private Integer strLen;
+
+ @SerializedName("Encode")
+ private Integer encode;
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/DiDto.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/DiDto.java
new file mode 100644
index 0000000..c25d045
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/DiDto.java
@@ -0,0 +1,23 @@
+package com.njcn.access.pojo.dto.data;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2022/3/13 14:57
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class DiDto extends StsDto implements Serializable {
+
+ @SerializedName("TranFlag")
+ private Integer tranFlag;
+
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/DoDto.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/DoDto.java
new file mode 100644
index 0000000..e2b3835
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/DoDto.java
@@ -0,0 +1,29 @@
+package com.njcn.access.pojo.dto.data;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2022/3/13 14:59
+ */
+@Data
+public class DoDto implements Serializable {
+
+ @SerializedName("Name")
+ private String name;
+
+ @SerializedName("IDX")
+ private Integer idx;
+
+ @SerializedName("CurSts")
+ private Integer curSts;
+
+ @SerializedName("CtlSts")
+ private Integer ctlSts;
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/EpdPqdDto.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/EpdPqdDto.java
new file mode 100644
index 0000000..3d521f5
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/EpdPqdDto.java
@@ -0,0 +1,46 @@
+package com.njcn.access.pojo.dto.data;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2022/3/13 14:27
+ */
+@Data
+public class EpdPqdDto implements Serializable {
+
+ @SerializedName("Name")
+ private String name;
+
+ @SerializedName("IDX")
+ private Integer idx;
+
+ @SerializedName("Type")
+ private String type;
+
+ @SerializedName("Phase")
+ private String phase;
+
+ @SerializedName("Unit")
+ private String unit;
+
+ @SerializedName("HarmStart")
+ private String harmStart;
+
+ @SerializedName("HarmEnd")
+ private String harmEnd;
+
+ @SerializedName("ClassID")
+ private String classId;
+
+ @SerializedName("StatMethod")
+ private List statMethod;
+
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/EvtDto.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/EvtDto.java
new file mode 100644
index 0000000..43a2587
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/EvtDto.java
@@ -0,0 +1,30 @@
+package com.njcn.access.pojo.dto.data;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2022/3/13 14:40
+ */
+@Data
+public class EvtDto implements Serializable {
+
+ @SerializedName("Name")
+ private String name;
+
+ @SerializedName("IDX")
+ private Integer idx;
+
+ @SerializedName("Type")
+ private String type;
+
+ @SerializedName("Parm")
+ private List param;
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/EvtParamDto.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/EvtParamDto.java
new file mode 100644
index 0000000..d34d724
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/EvtParamDto.java
@@ -0,0 +1,31 @@
+package com.njcn.access.pojo.dto.data;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2022/3/13 14:41
+ */
+@Data
+public class EvtParamDto implements Serializable {
+
+ @SerializedName("Name")
+ private String name;
+
+ @SerializedName("Type")
+ private String type;
+
+ @SerializedName("Unit")
+ private String unit;
+
+ @SerializedName("Data")
+ private String data;
+
+
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/MdDto.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/MdDto.java
new file mode 100644
index 0000000..ad2185b
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/MdDto.java
@@ -0,0 +1,43 @@
+package com.njcn.access.pojo.dto.data;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2022/3/13 14:48
+ */
+@Data
+public class MdDto implements Serializable {
+
+ @SerializedName("Name")
+ private String name;
+
+ @SerializedName("IDX")
+ private Integer idx;
+
+ @SerializedName("Type")
+ private String type;
+
+ @SerializedName("Unit")
+ private String unit;
+
+ @SerializedName("Phase")
+ private String phase;
+
+ @SerializedName("ClassID")
+ private String classId;
+
+ @SerializedName("StatMethod")
+ private List statMethod;
+
+ @SerializedName("TranRule")
+ private String tranRule;
+
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/ParDto.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/ParDto.java
new file mode 100644
index 0000000..61dfd52
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/ParDto.java
@@ -0,0 +1,49 @@
+package com.njcn.access.pojo.dto.data;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2022/3/13 15:02
+ */
+@Data
+public class ParDto implements Serializable {
+
+ @SerializedName("Name")
+ private String name;
+
+ @SerializedName("IDX")
+ private Integer idx;
+
+ @SerializedName("Type")
+ private String type;
+
+ @SerializedName("DataType")
+ private String dataType;
+
+ @SerializedName("ModifyFlag")
+ private Integer modifyFlag;
+
+ @SerializedName("MaxNum")
+ private Integer maxNum;
+
+ @SerializedName("MinNum")
+ private Integer minNum;
+
+ @SerializedName("SetValue")
+ private List setValue;
+
+ @SerializedName("Strlen")
+ private Integer strLen;
+
+ @SerializedName("DefaultValue")
+ private String defaultValue;
+
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/StsDto.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/StsDto.java
new file mode 100644
index 0000000..fd067b9
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/data/StsDto.java
@@ -0,0 +1,36 @@
+package com.njcn.access.pojo.dto.data;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2022/3/13 14:52
+ */
+@Data
+public class StsDto implements Serializable {
+
+ @SerializedName("Name")
+ private String name;
+
+ @SerializedName("IDX")
+ private Integer idx;
+
+ @SerializedName("StoreFlag")
+ private Integer storeFlag;
+
+ @SerializedName("CurSts")
+ private Integer curSts;
+
+ @SerializedName("ClassID")
+ private String classId;
+
+ @SerializedName("TranRule")
+ private String tranRule;
+
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/CfgDto.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/CfgDto.java
new file mode 100644
index 0000000..49233e6
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/CfgDto.java
@@ -0,0 +1,63 @@
+package com.njcn.access.pojo.dto.devModel;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2023/4/10 16:35
+ */
+@Data
+public class CfgDto implements Serializable {
+
+ @SerializedName("DevModName")
+ private String name;
+
+ @SerializedName("DevModVersion")
+ private String version;
+
+ @SerializedName("DevModTime")
+ private String time;
+
+ @SerializedName("ID")
+ private String id;
+
+ @SerializedName("DevType")
+ private String type;
+
+ @SerializedName("DevApp")
+ private String devApp;
+
+ @SerializedName("DevInfo")
+ private DevInfoDTO devInfo;
+
+ @SerializedName("Province")
+ private String province;
+
+ @SerializedName("City")
+ private String city;
+
+ @SerializedName("County")
+ private String county;
+
+ @SerializedName("Address")
+ private String address;
+
+ @SerializedName("Position")
+ private String position;
+
+ @SerializedName("LineNum")
+ private Integer lineNum;
+
+ @SerializedName("FileFrameLength")
+ private Integer fileFrameLength;
+
+ @SerializedName("FileFrameTimeout")
+ private Integer fileFrameTimeout;
+
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/CpuInfoDTO.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/CpuInfoDTO.java
new file mode 100644
index 0000000..96e79d6
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/CpuInfoDTO.java
@@ -0,0 +1,31 @@
+package com.njcn.access.pojo.dto.devModel;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+
+import java.io.Serializable;
+
+;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2022/3/13 12:09
+ */
+@Data
+public class CpuInfoDTO implements Serializable {
+
+ @SerializedName("CpuCore")
+ private Integer cpuCore;
+
+ @SerializedName("CpuFreq")
+ private Float cpuFreq;
+
+ @SerializedName("Arch")
+ private String arch;
+
+ @SerializedName("CpuLmt")
+ private Float cpuLmt;
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/DataArrayDto.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/DataArrayDto.java
new file mode 100644
index 0000000..ea2044a
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/DataArrayDto.java
@@ -0,0 +1,24 @@
+package com.njcn.access.pojo.dto.devModel;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2022/3/13 15:18
+ */
+@Data
+public class DataArrayDto implements Serializable {
+
+ @SerializedName("Type")
+ private String type;
+
+ @SerializedName("IDX")
+ private Integer idx;
+
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/DataDto.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/DataDto.java
new file mode 100644
index 0000000..6afa128
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/DataDto.java
@@ -0,0 +1,19 @@
+package com.njcn.access.pojo.dto.devModel;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2023/4/10 16:20
+ */
+@Data
+public class DataDto implements Serializable {
+ @SerializedName("TEMPLATE")
+ private TemplateDetailDto template;
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/DataSetDTO.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/DataSetDTO.java
new file mode 100644
index 0000000..a8b3d03
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/DataSetDTO.java
@@ -0,0 +1,42 @@
+package com.njcn.access.pojo.dto.devModel;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2022/3/13 14:21
+ */
+@Data
+public class DataSetDTO implements Serializable {
+
+ @SerializedName("Name")
+ private String name;
+
+ @SerializedName("IDX")
+ private Integer idx;
+
+ @SerializedName("DataType")
+ private String dataType;
+
+ @SerializedName("StartTime")
+ private String startTime;
+
+ @SerializedName("Period")
+ private Integer period;
+
+ @SerializedName("StoreFlag")
+ private Integer storeFlag;
+
+ @SerializedName("DataArray")
+ private List dataArray;
+
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/DevCfgDetailDto.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/DevCfgDetailDto.java
new file mode 100644
index 0000000..dff9214
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/DevCfgDetailDto.java
@@ -0,0 +1,31 @@
+package com.njcn.access.pojo.dto.devModel;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2023/4/10 16:26
+ */
+@Data
+public class DevCfgDetailDto implements Serializable {
+
+ @SerializedName("Name")
+ private String name;
+
+ @SerializedName("Version")
+ private String version;
+
+ @SerializedName("Time")
+ private String time;
+
+ @SerializedName("Cfg")
+ private List cfg;
+
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/DevInfoDTO.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/DevInfoDTO.java
new file mode 100644
index 0000000..e2e8541
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/DevInfoDTO.java
@@ -0,0 +1,34 @@
+package com.njcn.access.pojo.dto.devModel;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+
+import java.io.Serializable;
+
+;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2022/3/13 12:08
+ */
+@Data
+public class DevInfoDTO implements Serializable {
+
+ @SerializedName("DevType")
+ private String devType;
+
+ @SerializedName("DevName")
+ private String devName;
+
+ @SerializedName("MsgInfo")
+ private String msgInfo;
+
+ @SerializedName("DevStatus")
+ private String devStatus;
+
+ @SerializedName("HardVer")
+ private String hardVer;
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/DevModDetailDto.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/DevModDetailDto.java
new file mode 100644
index 0000000..0999af4
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/DevModDetailDto.java
@@ -0,0 +1,82 @@
+package com.njcn.access.pojo.dto.devModel;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import com.njcn.access.pojo.dto.data.*;
+import com.njcn.access.pojo.dto.data.ParDto;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2023/4/10 16:26
+ */
+@Data
+public class DevModDetailDto implements Serializable {
+
+ @SerializedName("Name")
+ private String name;
+
+ @SerializedName("Version")
+ private String version;
+
+ @SerializedName("Time")
+ private String time;
+
+ @SerializedName("IDX")
+ private Integer idx;
+
+ @SerializedName("DevType")
+ private String devType;
+
+ @SerializedName("DataList")
+ private List dataList;
+
+ @SerializedName("DataSet")
+ private List dataSet;
+
+ @SerializedName("IClk")
+ private String iclk;
+
+ @SerializedName("EClk")
+ private String eclk;
+
+ @SerializedName("LineNum")
+ private Integer lineNum;
+
+ @SerializedName("EPD")
+ private List epd;
+
+ @SerializedName("PQD")
+ private List pqd;
+
+ @SerializedName("EVT")
+ private List evt;
+
+ @SerializedName("ALM")
+ private List alm;
+
+ @SerializedName("MD")
+ private List md;
+
+ @SerializedName("STS")
+ private List sts;
+
+ @SerializedName("DI")
+ private List di;
+
+ @SerializedName("DO")
+ private List doDTO;
+
+ @SerializedName("Param")
+ private List param;
+
+ @SerializedName("CTRL")
+ private List ctrl;
+
+
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/DiskInfoDTO.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/DiskInfoDTO.java
new file mode 100644
index 0000000..2c86f48
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/DiskInfoDTO.java
@@ -0,0 +1,26 @@
+package com.njcn.access.pojo.dto.devModel;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+import java.io.Serializable;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2022/3/13 12:09
+ */
+@Data
+public class DiskInfoDTO implements Serializable {
+
+ @SerializedName("DiskPhy")
+ private Float diskPhy;
+
+ @SerializedName("DiskUsePhy")
+ private Float diskUsePhy;
+
+ @SerializedName("DiskLmt")
+ private Float diskLmt;
+
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/MemInfoDTO.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/MemInfoDTO.java
new file mode 100644
index 0000000..dff7022
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/MemInfoDTO.java
@@ -0,0 +1,25 @@
+package com.njcn.access.pojo.dto.devModel;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+import java.io.Serializable;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2022/3/13 12:09
+ */
+@Data
+public class MemInfoDTO implements Serializable {
+
+ @SerializedName("MemPhy")
+ private Float memPhy;
+
+ @SerializedName("MemVirt")
+ private Float memVirt;
+
+ @SerializedName("MemLmt")
+ private Float memLmt;
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/NetDevModDto.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/NetDevModDto.java
new file mode 100644
index 0000000..a122176
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/NetDevModDto.java
@@ -0,0 +1,64 @@
+package com.njcn.access.pojo.dto.devModel;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2023/4/10 16:25
+ */
+@Data
+public class NetDevModDto implements Serializable {
+
+ @SerializedName("Name")
+ private String name;
+
+ @SerializedName("Version")
+ private String version;
+
+ @SerializedName("Time")
+ private String time;
+
+ @SerializedName("DevName")
+ private String devName;
+
+ @SerializedName("DevType")
+ private String devType;
+
+ @SerializedName("NetType")
+ private String netType;
+
+ @SerializedName("NDID")
+ private String nDid;
+
+ @SerializedName("DevTopicVer")
+ private String devTopicVer;
+
+ @SerializedName("Uid")
+ private String uid;
+
+ @SerializedName("CUid")
+ private List cUid;
+
+ @SerializedName("DevInfo")
+ private DevInfoDTO devInfoDTO;
+
+ @SerializedName("CpuInfo")
+ private CpuInfoDTO cpuInfoDTO;
+
+ @SerializedName("MemInfo")
+ private MemInfoDTO memInfoDTO;
+
+ @SerializedName("DiskInfo")
+ private DiskInfoDTO diskInfoDTO;
+
+ @SerializedName("SoftInfo")
+ private SoftInfoDTO softInfoDTO;
+
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/ParamDto.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/ParamDto.java
new file mode 100644
index 0000000..84c706a
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/ParamDto.java
@@ -0,0 +1,26 @@
+package com.njcn.access.pojo.dto.devModel;
+
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2023/4/10 16:18
+ */
+@Data
+public class ParamDto implements Serializable {
+
+ @SerializedName("Data_Type")
+ private String dataType;
+
+ @SerializedName("Data_Array")
+ private List dataArray;
+
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/SoftInfoDTO.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/SoftInfoDTO.java
new file mode 100644
index 0000000..f9c9186
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/SoftInfoDTO.java
@@ -0,0 +1,35 @@
+package com.njcn.access.pojo.dto.devModel;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+import java.io.Serializable;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2022/3/13 12:09
+ */
+@Data
+public class SoftInfoDTO implements Serializable {
+
+ @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;
+
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/TemplateDetailDto.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/TemplateDetailDto.java
new file mode 100644
index 0000000..52c1bd8
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/TemplateDetailDto.java
@@ -0,0 +1,27 @@
+package com.njcn.access.pojo.dto.devModel;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2023/4/10 16:22
+ */
+@Data
+public class TemplateDetailDto implements Serializable {
+
+ @SerializedName("NetDevMod")
+ private NetDevModDto netDevModDto;
+
+ @SerializedName("DevCfg")
+ private DevCfgDetailDto devCfgDetailDto;
+
+ @SerializedName("DevMod")
+ private List devModDetailDto;
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/TemplateDto.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/TemplateDto.java
new file mode 100644
index 0000000..2a0208f
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/dto/devModel/TemplateDto.java
@@ -0,0 +1,37 @@
+package com.njcn.access.pojo.dto.devModel;
+
+import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2023/4/10 16:16
+ */
+@Data
+public class TemplateDto implements Serializable {
+
+ @SerializedName("mid")
+ private Integer mid;
+
+ @SerializedName("deviceId")
+ private String deviceId;
+
+ @SerializedName("timestamp")
+ private String timestamp;
+
+ @SerializedName("type")
+ private String type;
+
+ @SerializedName("param")
+ private ParamDto param;
+
+ @SerializedName("code")
+ private Integer code;
+
+
+}
diff --git a/iot-access/access-api/src/main/java/com/njcn/access/pojo/param/DevModelParam.java b/iot-access/access-api/src/main/java/com/njcn/access/pojo/param/DevModelParam.java
new file mode 100644
index 0000000..915cb33
--- /dev/null
+++ b/iot-access/access-api/src/main/java/com/njcn/access/pojo/param/DevModelParam.java
@@ -0,0 +1,28 @@
+package com.njcn.access.pojo.param;
+
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2023/4/10 13:56
+ */
+@Data
+public class DevModelParam {
+
+ @ApiModelProperty(value = "模板文件")
+ @NotNull(message="模板文件不能为空!")
+ private MultipartFile file;
+
+ @ApiModelProperty(value = "装置类型")
+ @NotNull(message="装置类型不能为空!")
+ private String devType;
+
+}
diff --git a/iot-access/access-boot/pom.xml b/iot-access/access-boot/pom.xml
index d921655..18af8cb 100644
--- a/iot-access/access-boot/pom.xml
+++ b/iot-access/access-boot/pom.xml
@@ -20,6 +20,11 @@
+
+ com.njcn
+ access-api
+ 1.0.0
+
com.njcn
common-web
@@ -27,7 +32,7 @@
com.njcn
- common-swagger
+ common-oss
${project.version}
@@ -42,14 +47,25 @@
com.njcn
- common-poi
+ common-redis
+ 1.0.0
+ compile
+
+
+ com.njcn
+ algorithm-api
${project.version}
com.njcn
- common-redis
- 1.0.0
- compile
+ system-api
+ ${project.version}
+
+
+
+ org.springframework.kafka
+ spring-kafka
+ ${kafka.version}
diff --git a/iot-access/access-boot/src/main/java/com/njcn/access/config/SwaggerConfig.java b/iot-access/access-boot/src/main/java/com/njcn/access/config/SwaggerConfig.java
new file mode 100644
index 0000000..1f30ab6
--- /dev/null
+++ b/iot-access/access-boot/src/main/java/com/njcn/access/config/SwaggerConfig.java
@@ -0,0 +1,91 @@
+package com.njcn.access.config;
+
+import com.google.common.collect.Lists;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.OAuthBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.*;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spi.service.contexts.SecurityContext;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2023/4/3 9:03
+ */
+@Configuration
+public class SwaggerConfig {
+
+ @Value("${microservice.gateway.url}")
+ private String gatewayUrl;
+
+ @Bean
+ public Docket createRestApi() {
+
+ List grantTypes = new ArrayList<>();
+ String passwordTokenUrl = "http://" + gatewayUrl + "/pqs-auth/oauth/token";
+ ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant = new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl);
+ grantTypes.add(resourceOwnerPasswordCredentialsGrant);
+ OAuth oAuth = new OAuthBuilder().name("oauth2").grantTypes(grantTypes).build();
+ //schemas
+ List securitySchemes = Lists.newArrayList(oAuth);
+ return new Docket(DocumentationType.SWAGGER_2)
+ .groupName("物联网注册服务")
+ .apiInfo(apiInfo())
+ .enable(true)
+ .select()
+ .apis(RequestHandlerSelectors.basePackage("com.njcn.access.controller"))
+ .paths(PathSelectors.any())
+ .build()
+ .securityContexts(securityContexts())
+ .securitySchemes(securitySchemes);
+ }
+
+ private ApiInfo apiInfo() {
+ return new ApiInfoBuilder()
+ .title("物接入")
+ .description("物接入接口文档")
+ .version("1.0")
+ .contact(contact())
+ .build();
+ }
+
+ private List securityContexts() {
+ List securityContexts = new ArrayList<>();
+ securityContexts.add(
+ SecurityContext.builder()
+ .securityReferences(defaultAuth())
+ .forPaths(PathSelectors.ant("/**"))
+ .build());
+ return securityContexts;
+ }
+
+ List defaultAuth() {
+ //scope方位
+ List scopes = new ArrayList<>();
+ scopes.add(new AuthorizationScope("read", "read resources"));
+ scopes.add(new AuthorizationScope("write", "write resources"));
+ scopes.add(new AuthorizationScope("reads", "read all resources"));
+ scopes.add(new AuthorizationScope("writes", "write all resources"));
+ SecurityReference securityReference = new SecurityReference("oauth2", scopes.toArray(new AuthorizationScope[]{}));
+ List securityReferences = new ArrayList<>();
+ securityReferences.add(securityReference);
+ return securityReferences;
+ }
+
+ private Contact contact() {
+ return new Contact("灿能系统组", "", "13914774158@163.com");
+ }
+
+}
diff --git a/iot-access/access-boot/src/main/java/com/njcn/access/controller/AccessController.java b/iot-access/access-boot/src/main/java/com/njcn/access/controller/AccessController.java
new file mode 100644
index 0000000..27810d1
--- /dev/null
+++ b/iot-access/access-boot/src/main/java/com/njcn/access/controller/AccessController.java
@@ -0,0 +1,49 @@
+package com.njcn.access.controller;
+
+import com.njcn.access.service.IAccessService;
+import com.njcn.common.pojo.annotation.OperateInfo;
+import com.njcn.common.pojo.enums.common.LogEnum;
+import com.njcn.common.pojo.enums.response.CommonResponseEnum;
+import com.njcn.common.pojo.response.HttpResult;
+import com.njcn.common.utils.HttpResultUtil;
+import com.njcn.common.utils.LogUtil;
+import com.njcn.web.controller.BaseController;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2023/3/31 9:12
+ */
+@Slf4j
+@RestController
+@RequestMapping("/devAccess")
+@RequiredArgsConstructor
+@Api(tags = "装置接入")
+public class AccessController extends BaseController {
+
+ private final IAccessService accessService;
+
+ @PostMapping("/add")
+ @OperateInfo(info = LogEnum.BUSINESS_COMMON)
+ @ApiOperation("平台发起注册")
+ @ApiImplicitParam(name = "nDid", value = "网关识别码", required = true)
+ public HttpResult