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
| package com.zy.asrs.enums;
|
| public enum CrnModeType {
|
| NONE(-1, "离线"),
| STOP(0, "维修"),
| HAND(1, "手动"),
| HALF_AUTO(2, "半自动"),
| AUTO(3, "自动");
|
| public final Integer id;
| public final String desc;
|
| CrnModeType(Integer id, String desc) {
| this.id = id;
| this.desc = desc;
| }
|
| public static CrnModeType get(Integer id) {
| if (id == null) {
| return NONE;
| }
| for (CrnModeType type : CrnModeType.values()) {
| if (type.id.equals(id)) {
| return type;
| }
| }
| return NONE;
| }
| }
|
|