Browse Source

修复 水稻测温病导出报错

zhaiyifei 10 months atrás
parent
commit
86be83f0b1

+ 18 - 0
src/main/java/com/yunfeiyun/agmp/iot/common/enums/ybq/YbqTypeConst.java

@@ -42,5 +42,23 @@ public enum YbqTypeConst {
         return message;
     }
 
+    public static YbqTypeConst getByCode(String code) {
+        for (YbqTypeConst type : values()) {
+            if (type.getCode().equals(code)) {
+                return type;
+            }
+        }
+        return null;
+    }
+
+    public static YbqTypeConst getByServiceName(String serviceName) {
+        for (YbqTypeConst type : values()) {
+            if (type.getServiceName().equals(serviceName)) {
+                return type;
+            }
+        }
+        return null;
+    }
+
 
 }