From cf757d7c54982301405b83ef18b1381672f69de1 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期日, 06 十月 2024 21:52:38 +0800
Subject: [PATCH] 指标值查询

---
 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/enums/ItemTypeEnum.java |   20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/enums/ItemTypeEnum.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/enums/ItemTypeEnum.java
index e90d204..34f7723 100644
--- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/enums/ItemTypeEnum.java
+++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/enums/ItemTypeEnum.java
@@ -14,11 +14,25 @@
 @AllArgsConstructor
 public enum ItemTypeEnum {
 
-    ATOM("ATOM"),
+    ATOM("ATOM", "原子指标"),
 
-    DER("DER"),
+    DER("DER", "派生指标"),
 
-    CAL("CAL");
+    CAL("CAL", "复合指标");
 
     private String code;
+    private String desc;
+
+    public static ItemTypeEnum getEumByCode(String code) {
+        if (code == null) {
+            return null;
+        }
+
+        for (ItemTypeEnum statusEnum : ItemTypeEnum.values()) {
+            if (statusEnum.getCode().equals(code)) {
+                return statusEnum;
+            }
+        }
+        return null;
+    }
 }

--
Gitblit v1.9.3