package com.iailab.module.data.common.enums;
|
|
import lombok.AllArgsConstructor;
|
import lombok.Getter;
|
|
/**
|
* 测量值类型
|
*
|
* @author PanZhibao
|
* @Description
|
* @createTime 2024年10月28日
|
*/
|
@Getter
|
@AllArgsConstructor
|
public enum MeasureValueType {
|
|
SIMULATE("SIMULATE", "模拟量"),
|
|
DIGITAL("DIGITAL", "数字量");
|
|
private String code;
|
private String desc;
|
|
public static MeasureValueType getEumByCode(String code) {
|
if (code == null) {
|
return null;
|
}
|
|
for (MeasureValueType statusEnum : MeasureValueType.values()) {
|
if (statusEnum.getCode().equals(code)) {
|
return statusEnum;
|
}
|
}
|
return null;
|
}
|
}
|