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
53
54
| package com.zy.core.enums;
|
| public enum RgvStatusType {
|
| NONE(-1, "离线","#C0392B"),
| IDLE(0, "无任务","#27AE60"),
| PICK_UP_WALK(1, "取货行走","#F39C12"),
| IN_STATION_OPERATION(2, "进站运行中","#3498DB"),
| STATION_ENTRY_COMPLETED(3, "进站完成","#2980B9"),
| There_IS_something_waiting_to_leave_the_station(4, "有物待出站","#5DADE2"),
| Exit_walking(5, "出站行走","#E67E22"),
| Outbound_request(6, "出站请求","#2196F3"),
| Outbound_operation_in_progress(7, "出站运行中","#21618C"),
| Outbound_completed(8, "出站完成","#85C1E9"),
| ROAM(11, "漫游","#95A5A6"),
| WALK(20, "走行","#F1C40F"),
| WAITING(100, "任务执行完成等待确认","#AED6F1"),
| SOS110(110, "报警","#E74C3C"),
| SOS(999, "未知","#FF0000")
| ;
|
| public Integer id;
| public String desc;
| public String color;
| RgvStatusType(Integer id, String desc,String color) {
| this.id = id;
| this.desc = desc;
| this.color = color;
| }
|
| public static RgvStatusType get(Short id) {
| if (null == id) {
| return SOS;
| }
| for (RgvStatusType type : RgvStatusType.values()) {
| if (type.id.equals(id.intValue())) {
| return type;
| }
| }
| return NONE;
| }
|
| public static RgvStatusType get(RgvStatusType type) {
| if (null == type) {
| return SOS;
| }
| for (RgvStatusType rgvStatusType : RgvStatusType.values()) {
| if (rgvStatusType == type) {
| return rgvStatusType;
| }
| }
| return SOS;
| }
| }
|
|