EAS税务OpenAPI接口说明
适用版本:EAS8.0版本及后期版本
一. 税务单据导入OpenAPI接口
1. 单据导入--String importBill(String arg1, String arg2, Integer arg3)
接口名称:税务单据导入
元数据别名:IM web service统一入口
接口简介:EAS税务Web Service的单据导入接口
接口描述:通过该接口可以从外部系统的数据导入为EAS税务单据。目前支持EAS税务3个单据的导入:开票单、收票单、开票申请单。
1.1 参数
入参
参数名称 | 必录 | 描述 |
billType | 是 | 单据类型(支持的单据类型见附件) |
billDataJSON | 是 | JSON单据数据集合,支持多个单据同时导入(数据格式见附件) |
billStatus | 是 | 导入单据的状态(支持的状态见附件) |
出参
参数名称 | 类型 | 描述 |
resultJson | String | 单据导入的结果 |
1.2 调用样例
参考附件Demo
第三方依赖包:
openapi-server.jar
sp-openapi-server.jar
log4j-1.2.15.jar
fastjson-1.2.58.jar
PS:
OpenAPI用户手册可参考 https://vip.kingdee.com/article/98349464997083392
业务调用过程中出现的具体问题可参考 https://vip.kingdee.com/article/175622642354077952
1.3 请求样例:
JSON 格式为 [{单据对象},{单据对象},..]
单据对象格式样例:黄色字体为注释,不属于格式
[表头:{"number":"TMSD-20151119-9001","orderCustomer":{"number":"*LS01"},"paymentType":{"number":"002"},"saleOrgUnit":{"number":"LS01"},"totalAmount":71,"year":2014,"bizDate":"2015-11-19 16:10:01","bizType":{"number":"210"},"cU":{"number":"LS"},"createTime":"2015-11-19 16:10:01","creator":{"number":"zqtest"},"currency":{"number":"BB01"},"customerOrderNumber":"","deliveryType":{"number":"SEND"},"description":"","exchangeRate":1,"isCentralBalance":true,"isInTax":true,"isInnerSale":false,"isMatched":false,"isSquareBalance":false,"localTotalAmount":71,
分录明细:"entry":[{"actualPrice":38,"amount":38,"baseQty":1,"baseUnit":{"number":"1"},"companyOrgUnit":{"number":"LS01"},"deliveryCustomer":{"number":"*LS01"},"deliveryDateQty":0,"discountCondition":0,"discountType":0,"isBetweenCompanySend":true,"isBySaleOrder":false,"isPresent":false,"material":{"number":"005.007"},"paymentCustomer":{"number":"*LS01"},"price":38,"qty":1,"quantityUnCtrl":true,"receiveCustomer":{"number":"*LS01"},"remark":"","sendDate":"2015-11-19 16:10:01","storageOrgUnit":{"number":"LS01"},"taxRate":17,"timeUnCtrl":true,"unit":{"number":"1"}},{"actualPrice":33,"amount":33,"baseQty":1,"baseUnit":{"number":"1"},"companyOrgUnit":{"number":"LS01"},"deliveryCustomer":{"number":"*LS01"},"deliveryDateQty":0,"discountCondition":0,"discountType":0,"isBetweenCompanySend":true,"isBySaleOrder":false,"isPresent":false,"material":{"number":"005.007"},"paymentCustomer":{"number":"*LS01"},"price":33,"qty":1,"quantityUnCtrl":true,"receiveCustomer":{"number":"*LS01"},"remark":"","sendDate":"2015-11-19 16:10:01","storageOrgUnit":{"number":"LS01"},"taxRate":17,"timeUnCtrl":true,"unit":{"number":"1"}}]}]
int billStatus 导入单据的状态
1:保存态, 2:提交态 3:审核态
下面是单据支持的状态,支持的√。
单据类型 | 保存态 | 提交态 | 审核态 |
001 开票单 | √ | ||
002 收票单 | √ | ||
003 开票申请单 | √ |
1.4 返回样例:
{
“status” : 0,
“msg” : “信息”
“billErrors”:[{“id”:””,”number”:””,errorMsgs:[“”,””]},{结构同前面的},…]
}
值说明:
status:处理结果:0:全部成功 1:全部失败 2:部分成功
msg : 描述信息
billErrors : 单据错误清单,描述不能导入的原因。
Id : 单据ID值,number:单据编码, errorMsgs:错误信息集。
二、外部系统(发票云)快递号信息反写接口
String messageReceived(String type, String dataJSON)
参数
type 字符串 001 表示 快递单号反写
dataJSON JSON字符串 发票云返回的反写信息
dataJSON 数据格式:
1,增加快递单号:
{"fpdata":[{"invoiceCode":"00058879","invoiceDM":"044031800105","orderNum":"8f3a5db5f2d10f1c3ec3b8e2b2b09773"}],"expressinfo":{"expressdate":1588148268095,"expresscompany":"顺丰","trackno":"SF1021805602037"},"type":"FILLEXPNUM"}
2,删除快递信息:
{"express_num":"","ddh":"568658678","type":"DELEXP"}
EAS税务OpenAPI接口说明
本文2024-09-22 19:53:39发表“eas cloud知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-eas-110121.html