P15GEN2\59518
2024-05-29 d4210c7c4b04abde20037ea8aa0f54ef8a2649aa
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
57
58
59
60
61
package foundation.ai;
 
public enum OperateUrl {
 
    InvoiceIdentify(Operator.InvoiceIdentify,"/m3/bill/invoice/img/analyze/multiple/info?access_token="), //发票识别
    
    InvoiceVerification(Operator.InvoiceVerification,"/m3/bil/invoice/img/check/info?access_token="), //发票核验
    
    InvoiceIdentifyAndVerification(Operator.InvoiceIdentifyAndVerification,"/m3/bill/invoice/img/analyze/multiple/check?access_token="), //发票核验及识别
    
    GetInvoiceByCode(Operator.GetInvoiceByCode,"/m13/bill/invoice/sys/check?access_token="), //获取发票信息
    
    NotKnown(Operator.NotKnown,"");
 
    Operator operator;
    String requestUrl; 
    
    private OperateUrl(Operator operator, String requestUrl) {
        this.operator = operator;
        this.requestUrl = requestUrl;
    }
 
    public static OperateUrl parse(Operator operator) {
        if (operator == null || NotKnown.equals(operator) ) {
            return NotKnown;
        }
        
        if (Operator.InvoiceIdentify.equals(operator)) {
            return InvoiceIdentify;
        }
        else if (Operator.InvoiceVerification.equals(operator)) {
            return InvoiceVerification;
        }    
        else if (Operator.InvoiceIdentifyAndVerification.equals(operator)) {
            return InvoiceIdentifyAndVerification;
        }        
        else if (Operator.GetInvoiceByCode.equals(operator)) {
            return GetInvoiceByCode;
        }
        
        return NotKnown;
    }
    
    public String toChinese() {
        if (InvoiceIdentify == this) {
            return "增值税发票识别";
        }    
        else if (InvoiceVerification == this) {
            return "增值税发票验真";
        }        
        else if (InvoiceIdentifyAndVerification == this) {
            return "增值税发票识别及验真";
        }            
        else if (GetInvoiceByCode == this) {
            return "获取发票信息";
        }
        
        return "未知类型";
    }
    
}