自动化立体仓库 - WCS系统
#
18516761980
2022-08-13 335c389c2b302fe7fb33421ad67f5b4e55c8dd05
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
56
package com.zy.asrs.domain.enums;
 
 
/**
 * 库位状态枚举
 */
public enum PackStatusType {
 
    // 空库位
    MACHINE_AUTO("空库位"),
    // 在库待测
    MACHINE_STOCK_MOVE("在库待测"),
    // 在库测试中
    MACHINE_SITE_MOVE("在库测试中"),
    // 在库静置中
    MACHINE_PAKOUT("在库静置中"),
    // 静置完成
    MACHINE_PAKIN("静置完成"),
    // 异常
    MACHINE_ERROR("异常报警"),
 
    // p to p
    MACHINE_P_MOVE("PToP"),
    // 非自动/手动
    MACHINE_UN_AUTO("非自动"),
    ;
 
    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 MACHINE_ERROR;
        } else if (locSts.equals("F") || locSts.equals("R") || locSts.equals("D")){
            if (packStatus == 1){
                return MACHINE_STOCK_MOVE;
            } else if (packStatus == 2){
                return MACHINE_SITE_MOVE;
            } else if (packStatus == 3){
                return MACHINE_PAKOUT;
            } else if (packStatus == 4){
                return MACHINE_PAKIN;
            }
        } else if (locSts.equals("O") || locSts.equals("S")){
            return MACHINE_AUTO;
        }
        return null;
    }
 
}