P15GEN2\59518
2025-10-10 9f6890646993d16260d4201d613c092132856127
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
package foundation.state.approve;
 
public enum ApproveOperate {
 
    Approve("同意", ApproveDirection.Next), GoEnd("全流程免审核", ApproveDirection.Next), 
    GoBack("拒绝", ApproveDirection.Prior), GoHome("打回到提交人", ApproveDirection.Prior), PullBack("申请人撤回", ApproveDirection.Prior), 
    Unknown("未知", ApproveDirection.Unknown);
    
    private String title;
    private ApproveDirection direction;
    
    
    ApproveOperate(String title, ApproveDirection direction) {
        this.title = title;
        this.direction = direction;
    }
 
    public String getTitle() {
        return title;
    }
 
    public ApproveDirection getDirection() {
        return direction;
    }
 
    public static ApproveOperate parse(String operator) {
        if (operator == null) {
            return Unknown;
        }
        
        operator = operator.toLowerCase();
        
        if ("approve".equals(operator)) {
            return Approve;
        }
        else if ("goend".equals(operator)) {
            return GoEnd;
        }
        else if ("goback".equals(operator)) {
            return GoBack;
        }
        else if ("gohome".equals(operator)) {
            return GoHome;
        }
        else if ("pullback".equals(operator)) {
            return PullBack;
        }
        
        return Unknown;
    }
    
}