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
33
34
35
36
37
38
39
40
41
42
| package com.zy.core.enums;
|
| public enum SteLocaType {
|
| NONE(0, "未知"),
| A(1, "A点"),
| B(2, "B点"),
| A_WAITING(3, "A待机点"),
| B_WAITING(4, "B待机点"),
| ;
|
| public Integer id;
| public String desc;
| SteLocaType(Integer id, String desc) {
| this.id = id;
| this.desc = desc;
| }
|
| public static SteLocaType get(Short id) {
| if (null == id) {
| return null;
| }
| for (SteLocaType type : SteLocaType.values()) {
| if (type.id.equals(id.intValue())) {
| return type;
| }
| }
| return null;
| }
|
| public static SteLocaType get(SteLocaType type) {
| if (null == type) {
| return null;
| }
| for (SteLocaType crnStatusType : SteLocaType.values()) {
| if (crnStatusType == type) {
| return crnStatusType;
| }
| }
| return null;
| }
| }
|
|