潘志宝
12 小时以前 56e254f4c6a3eab1218a4fbea3f60609d209ff95
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.iailab.module.data.point.common;
 
import lombok.AllArgsConstructor;
import lombok.Getter;
 
/**
 * @author PanZhibao
 * @Description
 * @createTime 2025年06月27日
 */
@Getter
@AllArgsConstructor
public enum MeasurePointValueType {
    SIMULATE("SIMULATE", "模拟量"),
    DIGITAL("DIGITAL", "数字量");
 
    private String code;
    private String desc;
 
    public static MeasurePointValueType getEumByCode(String code) {
        if (code == null) {
            return null;
        }
 
        for (MeasurePointValueType statusEnum : MeasurePointValueType.values()) {
            if (statusEnum.getCode().equals(code)) {
                return statusEnum;
            }
        }
        return null;
    }
}