From 03e8aca3ad6201c0d74e00d4c8d7367cdaaa54f9 Mon Sep 17 00:00:00 2001 From: Jay <csj123456> Date: 星期五, 01 十一月 2024 11:49:51 +0800 Subject: [PATCH] tag新增导入导出功能 --- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/common/PointTypeEnum.java | 42 +++++++++++++++++++----------------------- 1 files changed, 19 insertions(+), 23 deletions(-) diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/common/PointTypeEnum.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/common/PointTypeEnum.java index fd9cd3a..2d6e959 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/common/PointTypeEnum.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/common/PointTypeEnum.java @@ -1,37 +1,33 @@ package com.iailab.module.data.point.common; +import lombok.AllArgsConstructor; +import lombok.Getter; + /** * @author PanZhibao * @date 2021年04月25日 11:41 */ - +@Getter +@AllArgsConstructor public enum PointTypeEnum { - MEASURE_POINT("MEASURE", "MEASURE"), - CALCULATE_POINT("CALCULATE", "CALCULATE"), - CONSTANT("CONSTANT", "CONSTANT"); + MEASURE_POINT("MEASURE", "测量点"), + CALCULATE_POINT("CALCULATE", "计算点"), + CONSTANT("CONSTANT", "常量点"); private String code; - private String name; + private String desc; - PointTypeEnum(String code, String name){ - this.code = code; - this.name = name; - } + public static PointTypeEnum getEumByCode(String code) { + if (code == null) { + return null; + } - public String getCode() { - return code; - } - - public void setCode(String code) { - this.code = code; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; + for (PointTypeEnum statusEnum : PointTypeEnum.values()) { + if (statusEnum.getCode().equals(code)) { + return statusEnum; + } + } + return null; } } -- Gitblit v1.9.3