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
| package com.zy.core.enums;
|
| public enum MapNodeType {
|
| DISABLE(-1, "禁用"),
| NORMAL_PATH(0, "货位"),
| START_POINT(1, "起点"),
| TARGET_POINT(2, "终点"),
| MAIN_PATH(3, "母轨"),
| CONVEYOR(4, "输送站点"),
| CHARGE(5, "充电桩"),
| CONVEYOR_CAR_GO(6, "小车可走输送站点"),
| CAR(66, "小车"),
| LIFT(67, "提升机"),
| LOCK(-999, "锁定节点"),
| ;
|
| public Integer id;
| public String desc;
|
| MapNodeType(Integer id, String desc) {
| this.id = id;
| this.desc = desc;
| }
|
| public static MapNodeType get(Short id) {
| if (null == id) {
| return null;
| }
| for (MapNodeType type : MapNodeType.values()) {
| if (type.id.equals(id.intValue())) {
| return type;
| }
| }
| return null;
| }
|
| public static MapNodeType get(MapNodeType type) {
| if (null == type) {
| return null;
| }
| for (MapNodeType type1 : MapNodeType.values()) {
| if (type1 == type) {
| return type1;
| }
| }
| return null;
| }
| }
|
|