自定义科目卡片映射
业务场景说明
在系统里维护一套成本暂估科目,技术实施从接口里获取费用和成本暂估科目的映射关系,通过中间件处理凭证生成逻辑。
自定义科目映射查询
请求方式
POST
接口地址
api/openapi/dingtalk/accounting/mapping/{voucherType}
路径参数
字段名称 | 字段说明 | 必有 | 字段类型 |
---|---|---|---|
voucherType | 凭证类型 | 是 | String(目前默认统一传ALL) |
请求参数说明
参数说明
字段名称 | 字段说明 | 必有 | 字段类型 |
---|---|---|---|
fromMK | 数据是否全来源自每刻(目前统一传true) | 是 | boolean |
groupName | 科目组名称 | 是 | String |
financeCode | 财务编码 | 是 | String |
mappings | 映射请求列表 | 是 | List<Mapping> |
Mapping
字段名称 | 字段说明 | 必有 | 字段类型 |
---|---|---|---|
formType | 单据类型 | 是 | String (REIMBURSE)报销单 |
formCode | 单据业务编码 | 是 | String |
参数示例
{
"fromMK":true,
"groupName":"组名",
"financeCode":"F05",
"mappings":[
{
"formType":"REIMBURSE",
"formCode":"MK20090401"
}
]
}
响应参数
参数说明
响应参数说明*
字段名称 | 字段说明 | 类型 |
---|---|---|
data | 映射结果 | List<VoucherFormData> |
VoucherFormData
字段名称 | 字段说明 | 类型 |
---|---|---|
entCode | 企业编码 | String |
legalEntityCode | 公司抬头编码 | String |
legalEntityName | 公司抬头名称 | String |
formType | 单据类型 | String |
formSubTypeCode | 单据小类编码 | String |
formSubTypeName | 单据小类名称 | String |
formDataCode | 单据内码 | String |
formCode | 单据业务编码 | String |
formName | 单据名 | String |
departmentCode | 部门编码 | String |
departmentName | 部门名称 | String |
reimUserCode | 提单人编码 | String |
reimUserName | 提单人名称 | String |
auditorCode | 审核人编码 | String |
baseAmount | 收付金额 | CurrencyAmount |
businessTime | 业务时间戳 | long |
generate | 是否可生成 | boolean |
mappingResults | 映射结果 | List<VoucherMappingResult> |
message | 匹配失败提示 | String |
cause | 匹配失败原因(当匹配失败时,该字段会返回具体的错误信息) | String |
CurrencyAmount
字段名称 | 字段说明 | 类型 |
---|---|---|
currency | 币种别名 | String |
name | 币种名称 | String |
amount | 金额 | BigDecmal |
VoucherMappingResult
字段名称 | 字段说明 | 类型 |
---|---|---|
financeCode | 财务系统标识 | String |
financeName | 财务系统名称 | String |
financeVersion | 财务系统版本 | String |
bookCode | 账套编码 | String |
targetType | 类别 | enum |
targetCode | 类别对应所在表的code | String |
expenseCode | 费用编码 | String |
positionCode | 定位编码 | String |
baseAmount | 本币金额 | CurrencyAmount |
originAmount | 原币金额 | CurrencyAmount |
accountingSubjectCode | 财务科目编码 | String |
accountingSubjectBusinessCode | 财务科目业务编码 | String |
cashFlowCode | 现金流编码 | String |
cashFlowName | 现金流名称 | String |
bussinessData | 单据业务数据 | VoucherDataExtract |
参数示例
{
"code":"ACK",
"message":"",
"data":[
{
"entCode":"DTEC1903151BNMXPBF",
"legalEntityCode":"ELC2001151NYCANEO",
"legalEntityName":"U8V11-01抬头",
"formType":"REIMBURSE",
"formSubTypeCode":"FT1903211340EM80",
"formSubTypeName":"普通报销单",
"formDataCode":"BX2009161YUFAGAO",
"formCode":"MK20090401",
"formName":"自动扣款-0001",
"departmentCode":"DI1905231GA5OIN2",
"departmentName":"华东区域",
"reimUserCode":"UI19032111CLJUV4",
"reimUserName":"我是大老板",
"auditorCode":"UI19032111CLJUV4",
"baseAmount":{
"currency":"CNY",
"name":"人民币",
"amount":100
},
"repaymentOrder":false,
"generate":true,
"temporary":false,
"modify":false,
"mappingResults":[
{
"financeCode":"F0502",
"financeName":"用友",
"financeVersion":"U8V11",
"bookCode":"ASBC2001151CBT3AJ6",
"targetType":"EXPENSE_ALLOCATION",
"corpExpense":false,
"targetCode":"FA2009161YTN6NLS",
"expenseCode":"FD2009161YTN00ZK",
"positionCode":"FA2009161YTN6NLS",
"baseAmount":{
"currency":"CNY",
"name":"人民币",
"amount":100
},
"originAmount":{
"currency":"CNY",
"name":"人民币",
"amount":100
},
"auxiliaryAmount":100,
"accountingSubjectCode":"AS2010211FR6N7M0",
"accountingSubjectBusinessCode":"MK0183932",
"cashFlowCode":"",
"cashFlowName":"",
"direction":"0",
"retain":false,
"assistFeeTypeCode":null,
"mergedAssistFeeTypeCodes":null,
"detailLevelData":null,
"businessData":{
"formCode":"MK20090401",
"formSubTypeCode":"FT1903211340EM80",
"formSubTypeName":"普通报销单",
"reimburseName":"自动扣款-0001",
"submittedTime":1600260513716,
"consumeTime":1600260859526,
"consumeEndTime":null,
"settledTime":1600260544960,
"procEndTime":1600260933132,
"repaymentTime":null,
"approvalTime":1600260537804,
"comments":"",
"auditComments":null,
"documentRemark":null,
"legalEntity":{
"code":"ELC2001151NYCANEO",
"businessCode":"ELC2001151NYCANEO",
"name":"U8V11-01抬头",
"accountBook":{
"code":"ASBC2001151CBT3AJ6",
"businessCode":"U8V11-01",
"name":"U8V11帐套01"
}
},
"coverDepartment":{
"code":"DI1905231GA5OIN2",
"businessCode":"DI1905231GA5OIN2",
"name":"华东区域",
"fullName":"罗森便利店\华东区域",
"heirCode":"DI1903151BNMXPBH.DI1905231GA5OIN2",
"sourceId":"116007098"
},
"fillUser":{
"code":"UI19032111CLJUV4",
"businessCode":"LS1901",
"name":"我是大老板"
},
"reimUser":{
"code":"UI19032111CLJUV4",
"businessCode":"LS1901",
"name":"我是大老板"
},
"coverUser":{
"code":"UI19032111CLJUV4",
"businessCode":"LS1901",
"name":"我是大老板"
},
"cashier":null,
"auditor":{
"code":"UI19032111CLJUV4",
"businessCode":"LS1901",
"name":"我是大老板"
},
"supplier":null,
"customer":null,
"expenseType":{
"categoryCode":"",
"categoryBizCode":"",
"categoryName":"办公类",
"code":"ET2005151NDZ0YYO",
"bizCode":"",
"name":"员工福利"
},
"referenceDatas":[
],
"payeeAccount":{
"code":"FPI2009161YUGE1OG",
"paymentTypeCode":"BANK",
"paymentType":"从公司银行账户付款",
"collectionTypeCode":"BANK_AUTOMATIC",
"collectionTypeName":"从公司银行账户自动扣款",
"bankName":"工商银行",
"bankBranchName":"中国工商银行股份有限公司北京市分行营业部",
"bankLocation":"domestic-ZH1-ZH1_0-ZH1_0_00",
"accountName":"我的银行卡",
"accountNumber":"60708090",
"payeeType":"PERSONAL",
"bankBranchCode":"102100000030",
"accountBizCode":null
},
"payerAccount":{
"code":null,
"paymentTypeCode":null,
"paymentType":null,
"collectionTypeCode":null,
"collectionTypeName":null,
"bankName":null,
"bankBranchName":null,
"bankLocation":null,
"accountName":null,
"accountNumber":null,
"payeeType":null,
"bankBranchCode":null,
"accountBizCode":null
},
"payeeType":"PERSONAL",
"bankAutomaticInfo":null,
"loanDeductionExtractList":[
],
"approvedAmount":100,
"associationValues":{
},
"invoiceTaxDetailList":[
],
"taxRateCode":[
],
"subBookFlag":false,
"crossLegalEntity":null,
"formCoverDepartment":false,
"formComponent":null,
"feeType2AmountMap":null,
"accountCorrespondAmount":null
},
"amount":100
}
],
"amount":100
}
],
"success":true
}
更新日志
2020-11-19:响应参数增加accountingSubjectBusinessCode(财务科目业务编码)