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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
package foundation.ai;
 
public enum Operator {
    
    BizLicense,            //营业执照识别
    EnterpriseLicense,    //企业证照识别
    OrgCodeCert,        //组织机构代码证识别
    Institution,        //事业单位法人证书识别
    IDCard,                //身份证识别
    TextAccurate,        //精准通用文字识别
    TextCommon,            //标准通用文字识别
    TextFast,            //快速通用文字识别
    
    InvoiceIdentify,    //发票识别
    GetInvoiceByCode, //根据发票信息获取发票
    
    BankSlip,           //银行回单识别
    
    InvoiceVerification, //发票核验
    
    InvoiceIdentifyAndVerification, // 发票识别及核验
    
    NotKnown;
 
    public static Operator parse(String value) {
        if (value == null) {
            return NotKnown;
        }
        
        value = value.toLowerCase();
        
        if ("bizlicense".equals(value)) {
            return BizLicense;
        }
        else if ("enterpriselicense".equals(value)) {
            return EnterpriseLicense;
        }
        else if ("orgcodecert".equals(value)) {
            return OrgCodeCert;
        }
        else if ("institution".equals(value)) {
            return Institution;
        }        
        else if ("idcard".equals(value)) {
            return IDCard;
        }
        else if ("textaccurate".equals(value)) {
            return TextAccurate;
        }        
        else if ("textcommon".equals(value)) {
            return TextCommon;
        }        
        else if ("textfast".equals(value)) {
            return TextFast;
        }
        else if ("invoicevalidate".equals(value)) {
            return InvoiceIdentify;
        }
        else if ("bankslip".equals(value)) {
            return BankSlip;
        }
        else if ("invoiceverification".equals(value)) {
            return InvoiceVerification;
        }    
        else if("invoiceidentifyandverification".equals(value)) {
            return InvoiceIdentifyAndVerification;
        }    
        else if("getinvoicebycode".equals(value)) {
            return GetInvoiceByCode;
        }
        
        return NotKnown;
    }
    
    public String toChinese() {
        if (BizLicense == this) {
            return "营业执照识别";
        }
        else if (EnterpriseLicense == this) {
            return "企业证照识别";
        }
        else if (OrgCodeCert == this) {
            return "组织机构代码证识别";
        }
        else if (Institution == this) {
            return "事业单位法人证书识别";
        }        
        else if (IDCard == this) {
            return "身份证识别";
        }
        else if (TextAccurate == this) {
            return "精准通用文字识别";
        }        
        else if (TextCommon == this) {
            return "标准通用文字识别";
        }        
        else if (TextFast == this) {
            return "快速通用文字识别";
        }
        else if (InvoiceIdentify == this) {
            return "增值税发票识别";
        }    
        else if (BankSlip == this) {
            return "银行回单识别";
        }    
        else if (InvoiceVerification == this) {
            return "增值税发票验真";
        }    
        else if (InvoiceIdentifyAndVerification == this) {
            return "增值税发票识别及验真";
        }    
        else if (GetInvoiceByCode == this) {
            return "获取发票信息";
        }
        
        return "未知类型";
    }
    
}