发票导入名称识别
This commit is contained in:
parent
1dcd24c332
commit
475cc8f4f4
|
|
@ -19,8 +19,8 @@ import kd.ec.basedata.common.enums.DefaultEnum;
|
|||
import kd.ec.basedata.common.invoicecloud.InvoiceDataHandleHelper;
|
||||
import kd.ec.basedata.common.invoicecloud.bean.InvoiceItemVO;
|
||||
import kd.ec.basedata.common.invoicecloud.bean.InvoiceVO;
|
||||
import kd.ec.basedata.common.invoicecloud.enumeration.InvoiceTypeEnum;
|
||||
import kd.ec.basedata.common.utils.TextHelper;
|
||||
import zcgj.zcdev.zcdev.pr.utils.InvoiceTypeEnum;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.ParseException;
|
||||
|
|
@ -28,6 +28,9 @@ import java.text.SimpleDateFormat;
|
|||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 发票导入名称识别
|
||||
*/
|
||||
public class InvoiceNameRecognitionBillPlugin extends InvoiceDataHandleHelper {
|
||||
private static final Log log = LogFactory.getLog(InvoiceNameRecognitionBillPlugin.class);
|
||||
public static DynamicObject generateInvoiceByVO(InvoiceVO invoiceVO, MainEntityType dt, long id, long userID, long orgID, Date date, DynamicObject currency) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,60 @@
|
|||
package zcgj.zcdev.zcdev.pr.utils;
|
||||
|
||||
import kd.ec.basedata.common.enums.MultiLangEnumBridge;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
public enum InvoiceTypeEnum {
|
||||
OE("1", new MultiLangEnumBridge("普通电子发票", "InvoiceTypeEnum_0", "ec-ecbd-common")),
|
||||
SE("2", new MultiLangEnumBridge("电子发票专票", "InvoiceTypeEnum_1", "ec-ecbd-common")),
|
||||
OP("3", new MultiLangEnumBridge("普通纸质发票", "InvoiceTypeEnum_2", "ec-ecbd-common")),
|
||||
SP("4", new MultiLangEnumBridge("专用纸质发票", "InvoiceTypeEnum_3", "ec-ecbd-common")),
|
||||
OPR("5", new MultiLangEnumBridge("普通纸质卷票", "InvoiceTypeEnum_4", "ec-ecbd-common")),
|
||||
OM("7", new MultiLangEnumBridge("通用机打", "InvoiceTypeEnum_5", "ec-ecbd-common")),
|
||||
TAXI("8", new MultiLangEnumBridge("的士票", "InvoiceTypeEnum_6", "ec-ecbd-common")),
|
||||
TRAIN("9", new MultiLangEnumBridge("火车票", "InvoiceTypeEnum_7", "ec-ecbd-common")),
|
||||
PLANE("10", new MultiLangEnumBridge("飞机票", "InvoiceTypeEnum_8", "ec-ecbd-common")),
|
||||
OTHER("11", new MultiLangEnumBridge("其他", "InvoiceTypeEnum_9", "ec-ecbd-common")),
|
||||
MOTOR("12", new MultiLangEnumBridge("机动车", "InvoiceTypeEnum_10", "ec-ecbd-common")),
|
||||
UC("13", new MultiLangEnumBridge("二手车", "InvoiceTypeEnum_11", "ec-ecbd-common")),
|
||||
QUOTA("14", new MultiLangEnumBridge("定额发票", "InvoiceTypeEnum_12", "ec-ecbd-common")),
|
||||
PASS("15", new MultiLangEnumBridge("通行费", "InvoiceTypeEnum_13", "ec-ecbd-common")),
|
||||
PT("16", new MultiLangEnumBridge("客运发票", "InvoiceTypeEnum_14", "ec-ecbd-common")),
|
||||
PB("17", new MultiLangEnumBridge("过路过桥费", "InvoiceTypeEnum_15", "ec-ecbd-common")),
|
||||
DPP("19", new MultiLangEnumBridge("完税证明", "InvoiceTypeEnum_16", "ec-ecbd-common")),
|
||||
SHIP("20", new MultiLangEnumBridge("轮船票", "InvoiceTypeEnum_17", "ec-ecbd-common")),
|
||||
CUSTOMS("21", new MultiLangEnumBridge("海关缴款书", "InvoiceTypeEnum_18", "ec-ecbd-common")),
|
||||
OME("23", new MultiLangEnumBridge("通用机打电子发票", "InvoiceTypeEnum_19", "ec-ecbd-common")),
|
||||
TBP("24", new MultiLangEnumBridge("火车票退票凭证", "InvoiceTypeEnum_20", "ec-ecbd-common")),
|
||||
FE("25", new MultiLangEnumBridge("财政电子票据", "InvoiceTypeEnum_21", "ec-ecbd-common")),
|
||||
DOE("26", new MultiLangEnumBridge("数电发票(普通发票)", "InvoiceTypeEnum_26", "ec-ecbd-common")),//参考 发票类型(发票云)
|
||||
DSP("27", new MultiLangEnumBridge("数电发票(增值税专用发票)", "InvoiceTypeEnum_27", "ec-ecbd-common"));//参考 发票类型(发票云)
|
||||
|
||||
|
||||
public String value;
|
||||
public MultiLangEnumBridge name;
|
||||
|
||||
private InvoiceTypeEnum(String value, MultiLangEnumBridge name) {
|
||||
this.value = value;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name.loadKDString();
|
||||
}
|
||||
|
||||
public static InvoiceTypeEnum getEnumByValue(Object value) {
|
||||
if (value != null) {
|
||||
for(InvoiceTypeEnum enums : values()) {
|
||||
if (StringUtils.equals(value.toString(), enums.getValue())) {
|
||||
return enums;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue