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
| package com.zy.common.model.enums;
|
| public enum AgvStatusType {
|
| GOTO_TAKE("01", "前往取货点"),
| TAKING("02", "取货点取货"),
| GOTO_PUT("03", "前往送货点"),
| PUTTING("04", "送货点放货"),
| COMPLETE("05", "任务完成"),
| IDLE("06", "空闲"),
| ERROR("07", "故障"),
| CHARGING("08", "充电中"),
| HANDLE("09", "手动"),
| DISPLAY("010", "失联"),
| SOS("011" , "离线"),
| WORKING("012", "行走"),
|
| ;
|
| public String id;
| public String desc;
| AgvStatusType(String id, String desc) {
| this.id = id;
| this.desc = desc;
| }
|
| public static AgvStatusType get(String id) {
| if (null == id) {
| return null;
| }
| for (AgvStatusType type : AgvStatusType.values()) {
| if (type.id.equals(id)) {
| return type;
| }
| }
| return null;
| }
|
| public static AgvStatusType get(AgvStatusType type) {
| if (null == type) {
| return null;
| }
| for (AgvStatusType agvStatusType : AgvStatusType.values()) {
| if (agvStatusType == type) {
| return agvStatusType;
| }
| }
| return null;
| }
|
| }
|
|