|
|
@@ -0,0 +1,33 @@
|
|
|
+package com.yunfeiyun.agmp.iot.common.enums;
|
|
|
+
|
|
|
+
|
|
|
+public enum IotDeviceconnTypeEnum {
|
|
|
+
|
|
|
+ COMMON("0", "通用"),
|
|
|
+ PRIVATE("1", "私有");
|
|
|
+
|
|
|
+ private String code;
|
|
|
+ private String name;
|
|
|
+
|
|
|
+ private IotDeviceconnTypeEnum(String code, String name) {
|
|
|
+ this.code = code;
|
|
|
+ this.name = name;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static String getNameByCode(String devtypeBid) {
|
|
|
+ for (IotDeviceconnTypeEnum iotDeviceconnTypeEnum : IotDeviceconnTypeEnum.values()) {
|
|
|
+ if (iotDeviceconnTypeEnum.code.equals(devtypeBid)) {
|
|
|
+ return iotDeviceconnTypeEnum.name;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return "未知类型";
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getCode() {
|
|
|
+ return code;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getName() {
|
|
|
+ return name;
|
|
|
+ }
|
|
|
+}
|