总账OpenAPI接口说明

概述
EAS系统用于凭证引入的新接口WSVoucher.nImportVoucher,除了WebService调用方式外,还提供了OpenAPI调用方式,OpenAPI方式速度和稳定性相对于WebService方式有所提升。OpenAPI和WebService后端用的是同一套实现代码,也就是说,前端传入的参数和后端返回的结果是完全一样。本指南只说明如何使用OpenAPI方式进行接口调用,参数和结果的详细说明请参考另一篇文章:金蝶EAS_WebService总账_新接口开发指南(二):将凭证引入到EAS系统中。
1、接口说明:
1.1、String nImportVoucher(String rows, String params)
接口编码:WSVoucher-nImportVoucher
接口名称:凭证引入新接口
接口简介:将凭证引入到EAS系统中
1.2、参数
入参
rows:凭证数据,行列式的json数据
params:处理参数,键值对的json数据
出参:
result:键值对的json数据
2、编写代码(完整代码在附件工程中的类VoucherImportTest,如果服务器是公有云,请参考类VoucherImportPublicTest),使用凭证引入新接口WSVoucher.nImportVoucher引入凭证,以下是发起调用的代码片段:

以下是凭证数据构造的代码片段:

运行后,看到这样的信息,说明有凭证引入成功。

3、参数和结果样例:
rows(凭证数据):
[["companyNumber","voucherNumber","periodYear","periodNumber","bookedDate","bizDate","voucherType","description","voucherAbstract","creator","entrySeq","accountNumber","currencyNumber","entryDC","originalAmount","debitAmount","creditAmount","asstSeq","asstActType1","asstActNumber1","asstActName1","asstActType2","asstActNumber2","asstActName2","itemFlag","oppAccountSeq","oppAsstSeq","primaryItem","type","cashflowAmountOriginal","cashflowAmountLocal"],["ZZZ02-01","v001","2022","11","2022-11-09","2022-11-09","记记","webservice test","webservice test","lhh11","1","1001","BB01","1","10","10","","","","","","","","","0","","","","","",""],["ZZZ02-01","v001","2022","11","2022-11-09","2022-11-09","记记","webservice test","webservice test","lhh11","2","1131.01.01","BB01","0","5","","5","1","00001","1001","普通客户","物料","1101","电阻","0","","","","","",""],["ZZZ02-01","v001","2022","11","2022-11-09","2022-11-09","记记","webservice test","webservice test","lhh11","2","1131.01.01","BB01","0","5","","5","2","00001","1002","重要客户","物料","1102","电容","0","","","","","",""],["ZZZ02-01","v001","2022","11","","","","","","lhh11","1","","","","","","","","00001","1001","普通客户","物料","1101","电阻","1","2","1","CI1.01.03","2","5","5"],["ZZZ02-01","v001","2022","11","","","","","","lhh11","1","","","","","","","","00001","1002","重要客户","物料","1102","电容","1","2","2","C
总账OpenAPI接口说明
声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。如若本站内容侵犯了原著者的合法权益,可联系本站删除。



