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
43
44
45
46
47
48
49
50
51
52
| package com.zy.core.enums;
|
| public enum SteLocaType {
|
| NONE(0, "未知"),
| POINT20(20, "A面平移车"),
| POINT21(21, "硫化罐A端"),
| POINT22(22, "硫化罐B端"),
| POINT23(23, "B面平移车"),
| POINT24(24, "水槽A端"),
| POINT25(25, "水槽B端"),
| POINT26(26, "B端输送线"),
|
| // NONE999(999, "未知"),
| // 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 NONE;
| }
| for (SteLocaType type : SteLocaType.values()) {
| if (type.id.equals(id.intValue())) {
| return type;
| }
| }
| return NONE;
| }
|
| public static SteLocaType get(SteLocaType type) {
| if (null == type) {
| return NONE;
| }
| for (SteLocaType crnStatusType : SteLocaType.values()) {
| if (crnStatusType == type) {
| return crnStatusType;
| }
| }
| return NONE;
| }
| }
|
|