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 "未知类型"; } }