| | |
| | | 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; |
| | | } |
| | | } |