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", "测量点"), CALCULATE_POINT("CALCULATE", "计算点"), CONSTANT("CONSTANT", "常量点"), CUMULATE("CUMULATE", "累计点"); private String code; private String desc; public static PointTypeEnum getEumByCode(String code) { if (code == null) { return null; } for (PointTypeEnum statusEnum : PointTypeEnum.values()) { if (statusEnum.getCode().equals(code)) { return statusEnum; } } return null; } }