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
55
| package com.zy.asrs.domain.enums;
|
|
| /**
| * 库位状态枚举
| */
| public enum PackStatusType {
|
| // 空库位
| LOC_EMPTY("空库位"),
| // 在库待测
| LOC_WAIT_TESTINT("在库待测"),
| // 在库测试中
| LOC_TESTING("在库测试中"),
| // 测试完成
| LOC_TESTEND("测试完成"),
| // 在库静置中
| LOC_STAY("在库静置中"),
| // 静置完成
| LOC_STAY_OVER("静置完成"),
| // 异常
| LOC_ERROR("异常报警"),
| ;
|
| private String desc;
| PackStatusType(String desc){
| this.desc = desc;
| }
|
| public String getDesc() { return desc; }
|
| public void setDesc(String desc) { this.desc = desc; }
|
| public static PackStatusType process(String locSts, Integer packStatus, Integer fireStatus){
| if(fireStatus == 1){
| return LOC_ERROR;
| } else if (locSts.equals("F") || locSts.equals("R") || locSts.equals("D")){
| if (packStatus == 1){
| return LOC_WAIT_TESTINT;
| } else if (packStatus == 2){
| return LOC_TESTING;
| } else if (packStatus == 3){
| return LOC_TESTEND;
| } else if (packStatus == 4){
| return LOC_STAY;
| } else if (packStatus == 5){
| return LOC_STAY_OVER;
| }
| } else if (locSts.equals("O") || locSts.equals("S")){
| return LOC_EMPTY;
| }
| return null;
| }
|
| }
|
|