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