源系统平台:钉钉
源系统接口: 获取审批实例详情topapi/processinstance/get
目标系统平台: 金蝶云星空
目标系统接口: 新增付款单batchSave
源平台元数据配置:
{
"id": null,
"api": "topapi/processinstance/get",
"type": "QUERY",
"method": "POST",
"number": null,
"idCheck": true,
"request": [
{
"id": "process_code",
"type": "string",
"field": "process_code",
"label": "审批流的唯一码",
"value": "PROC-12B1B605-2D28-43FE-80FB-13ECE6165313",
"parent": null
},
{
"id": "start_time",
"type": "string",
"field": "start_time",
"label": "审批实例开始时间。Unix时间戳,单位毫秒。",
"value": "_function ( {{LAST_SYNC_TIME}} - ( 3600 * 96) ) * 1000",
"parent": null
},
{
"id": "end_time",
"type": "string",
"field": "end_time",
"label": "审批实例结束时间,Unix时间戳,单位毫秒",
"value": "{{CURRENT_TIME}}000",
"parent": null
},
{
"id": "size",
"type": "string",
"field": "size",
"label": "分页参数,每页大小,最多传20。",
"value": "20",
"parent": null
},
{
"id": "cursor",
"type": "string",
"field": "cursor",
"label": "分页查询的游标,最开始传0,后续传返回参数中的next_cursor值。",
"value": "0",
"parent": null
}
],
"response": [
{
"type": "string",
"field": "费用归属项目",
"label": "费用归属项目",
"value": null,
"describe": "_autoFillResponse"
},
{
"type": "string",
"field": "报销类别",
"label": "报销类别",
"value": null,
"describe": "_autoFillResponse"
},
{
"type": "string",
"field": "TextNote_7L0ZKXODKW40",
"label": "TextNote_7L0ZKXODKW40",
"value": null,
"describe": "_autoFillResponse"
},
{
"type": "string",
"field": "行政报销类型",
"label": "行政报销类型",
"value": null,
"describe": "_autoFillResponse"
},
{
"type": "string",
"field": "项目报销类型",
"label": "项目报销类型",
"value": null,
"describe": "_autoFillResponse"
},
{
"type": "array",
"field": "报销明细",
"label": "报销明细",
"value": null,
"children": [
{
"type": "string",
"field": "费用发生日期",
"label": "费用发生日期",
"value": null,
"describe": "_autoFillResponse"
},
{
"type": "string",
"field": "报销金额(元)",
"label": "报销金额(元)",
"value": null,
"describe": "_autoFillResponse"
},
{
"type": "string",
"field": "费用明细",
"label": "费用明细",
"value": null,
"describe": "_autoFillResponse"
}
],
"describe": "_autoFillResponse"
},
{
"type": "array",
"field": "项目费用明细",
"label": "项目费用明细",
"value": null,
"children": [
{
"type": "string",
"field": "componentName",
"label": "componentName",
"value": null,
"describe": "_autoFillResponse"
},
{
"type": "string",
"field": "componentType",
"label": "componentType",
"value": null,
"describe": "_autoFillResponse"
},
{
"type": "string",
"field": "props",
"label": "props",
"value": null,
"describe": "_autoFillResponse"
}
],
"describe": "_autoFillResponse"
},
{
"type": "string",
"field": "总金额",
"label": "总金额",
"value": null,
"describe": "_autoFillResponse"
},
{
"type": "string",
"field": "关联审批单",
"label": "关联审批单",
"value": null,
"describe": "_autoFillResponse"
},
{
"type": "string",
"field": "TextNote-KDE5B2G3",
"label": "TextNote-KDE5B2G3",
"value": null,
"describe": "_autoFillResponse"
},
{
"type": "string",
"field": "电子发票",
"label": "电子发票",
"value": null,
"describe": "_autoFillResponse"
},
{
"type": "string",
"field": "收款账号",
"label": "收款账号",
"value": null,
"describe": "_autoFillResponse"
},
{
"type": "string",
"field": "公司帐号付款(如需公司帐号付款请选择)",
"label": "公司帐号付款(如需公司帐号付款请选择)",
"value": null,
"describe": "_autoFillResponse"
},
{
"type": "string",
"field": "报销凭证拍照上传",
"label": "报销凭证拍照上传",
"value": null,
"describe": "_autoFillResponse"
},
{
"type": "string",
"field": "附件",
"label": "附件",
"value": null,
"describe": "_autoFillResponse"
},
{
"type": "string",
"field": "id",
"label": "id",
"value": null,
"describe": "_autoFillResponse"
},
{
"type": "string",
"field": "title",
"label": "title",
"value": null,
"describe": "_autoFillResponse"
},
{
"type": "object",
"field": "extend",
"label": "extend",
"value": null,
"children": [
{
"type": "string",
"field": "create_time",
"label": "create_time",
"value": null,
"describe": "_autoFillResponse"
},
{
"type": "string",
"field": "finish_time",
"label": "finish_time",
"value": null,
"describe": "_autoFillResponse"
},
{
"type": "string",
"field": "originator_userid",
"label": "originator_userid",
"value": null,
"describe": "_autoFillResponse"
},
{
"type": "string",
"field": "originator_dept_id",
"label": "originator_dept_id",
"value": null,
"describe": "_autoFillResponse"
},
{
"type": "string",
"field": "status",
"label": "status",
"value": null,
"describe": "_autoFillResponse"
},
{
"type": "string",
"field": "result",
"label": "result",
"value": null,
"describe": "_autoFillResponse"
},
{
"type": "string",
"field": "business_id",
"label": "business_id",
"value": null,
"describe": "_autoFillResponse"
},
{
"type": "string",
"field": "originator_dept_name",
"label": "originator_dept_name",
"value": null,
"describe": "_autoFillResponse"
},
{
"type": "string",
"field": "biz_action",
"label": "biz_action",
"value": null,
"describe": "_autoFillResponse"
}
],
"describe": "_autoFillResponse"
}
],
"condition_bk": [
[
{
"field": "报销类别",
"logic": "eq",
"value": "现货采购"
},
{
"field": "extend.result",
"logic": "eq",
"value": "agree"
},
{
"field": "extend.status",
"logic": "eq",
"value": "COMPLETED"
}
],
[
{
"field": "报销类别",
"logic": "eq",
"value": "现货采购"
},
{
"field": "extend.result",
"logic": "eq",
"value": "agree"
},
{
"field": "extend.status",
"logic": "eq",
"value": "TERMINATED"
}
]
],
"otherRequest": [],
"otherResponse": [],
"formatResponse": [
{
"new": "付款方式_new",
"old": "付款方式",
"format": "string"
}
]
}
目标平台元数据配置:
{
"id": null,
"api": "batchSave",
"type": "EXECUTE",
"method": "POST",
"number": null,
"idCheck": true,
"request": [
{
"type": "string",
"field": "FBillNo",
"label": "单据编号",
"value": "{{extend.business_id}}",
"describe": "单据编号",
"is_required": false
},
{
"type": "string",
"field": "FBillTypeID",
"label": "单据类型",
"value": "FKDLX01_SYS",
"parser": {
"name": "ConvertObjectParser",
"params": "FNUMBER"
},
"describe": "单据类型",
"is_required": true
},
{
"type": "string",
"field": "FDATE",
"label": "业务日期",
"value": "{{extend.finish_time}}",
"describe": "业务日期",
"is_required": true
},
{
"type": "string",
"field": "FSETTLEORGID",
"label": "结算组织",
"value": "_findCollection find Number from 723e2cb6-f80f-3823-8b4f-6e98b9713ba3 where Name={{费用归属项目}}",
"parser": {
"name": "ConvertObjectParser",
"params": "FNumber"
},
"describe": "100",
"is_required": false
},
{
"type": "string",
"field": "FPAYORGID",
"label": "付款组织",
"value": "_findCollection find Number from 723e2cb6-f80f-3823-8b4f-6e98b9713ba3 where Name={{费用归属项目}}",
"parser": {
"name": "ConvertObjectParser",
"params": "FNumber"
},
"describe": "100",
"is_required": true
},
{
"type": "string",
"field": "FCURRENCYID",
"label": "币别",
"value": "PRE001",
"parser": {
"name": "ConvertObjectParser",
"params": "FNumber"
},
"describe": "币别",
"is_required": true
},
{
"type": "string",
"field": "FCONTACTUNITTYPE",
"label": "往来单位类型",
"value": "BD_Supplier",
"describe": "往来单位类型",
"is_required": true
},
{
"type": "string",
"field": "FCONTACTUNIT",
"label": "往来单位",
"value": "_findCollection find FNumber from e3fb9252-4cce-32f4-bccf-2792bac19e8d where FName={{项目费用明细.供应商名称}}",
"parser": {
"name": "ConvertObjectParser",
"params": "FNumber"
},
"describe": "往来单位",
"is_required": true
},
{
"type": "string",
"field": "FRECTUNITTYPE",
"label": "收款单位类型",
"value": "BD_Supplier",
"describe": "收款单位类型",
"is_required": true
},
{
"type": "string",
"field": "FRECTUNIT",
"label": "收款单位",
"value": "_findCollection find FNumber from e3fb9252-4cce-32f4-bccf-2792bac19e8d where FName={{项目费用明细.供应商名称}}",
"parser": {
"name": "ConvertObjectParser",
"params": "FNumber"
},
"describe": null,
"is_required": true
},
{
"type": "string",
"field": "FSETTLECUR",
"label": "结算币别",
"value": "PRE001",
"parser": {
"name": "ConvertObjectParser",
"params": "FNUMBER"
},
"describe": "结算币别",
"is_required": true
},
{
"type": "string",
"field": "FREMARK",
"label": "备注",
"value": "{{title}}-{{项目报销类型}}-{{报销明细.费用明细}}",
"describe": "备注",
"is_required": false
},
{
"type": "array",
"field": "FPAYBILLENTRY",
"label": "付款单明细",
"value": "项目报销明细",
"children": [
{
"type": "string",
"field": "FSETTLETYPEID",
"label": "结算方式",
"value": "_findCollection find Number from 04463531-c6b1-3e53-b5d7-9d456a92d4cf where Name={{付款方式_new}}",
"parent": "FPAYBILLENTRY",
"parser": {
"name": "ConvertObjectParser",
"params": "FNumber"
},
"describe": null,
"is_required": true
},
{
"type": "string",
"field": "FPURPOSEID",
"label": "付款用途",
"value": "SFKYT08_SYS",
"parent": "FPAYBILLENTRY",
"parser": {
"name": "ConvertObjectParser",
"params": "FNumber"
},
"describe": null,
"is_required": false
},
{
"type": "string",
"field": "FPAYTOTALAMOUNTFOR",
"label": "应付金额",
"value": "_function {{项目费用明细.单价}}*{{项目费用明细.数量}}",
"parent": "FPAYBILLENTRY",
"describe": null,
"is_required": false
},
{
"type": "string",
"field": "FMATERIALID",
"label": "物料编码",
"value": "{{项目费用明细.名称}}",
"parent": "FPAYBILLENTRY",
"parser": {
"name": "ConvertObjectParser",
"params": "FNumber"
},
"describe": null,
"is_required": false
},
{
"type": "string",
"field": "FPRICE",
"label": "含税单价",
"value": "{{项目报销明细.0.单价}}",
"parent": "FPAYBILLENTRY",
"describe": null,
"is_required": false
},
{
"type": "string",
"field": "FQTY",
"label": "数量",
"value": "{{项目费用明细.数量}}",
"parent": "FPAYBILLENTRY",
"describe": null,
"is_required": false
},
{
"type": "string",
"field": "FCOSTID",
"label": "费用项目",
"value": "_findCollection find FNumber from b02f1e34-b500-3075-8b14-08fec61d08a4 where FName={{项目报销类型}}",
"parent": "FPAYBILLENTRY",
"parser": {
"name": "ConvertObjectParser",
"params": "FNumber"
},
"describe": null,
"is_required": false
},
{
"id": "FOPPOSITEBANKACCOUNT",
"type": "string",
"field": "FOPPOSITEBANKACCOUNT",
"label": "对方银行账号",
"value": "_function CASE LOCATE('ALIPAY_ACCOUNT','{{收款信息.identityType}}') WHEN 0 THEN '{{收款信息.cardNo}}' ELSE '{{收款信息.logonId}}' END",
"parent": "FPAYBILLENTRY"
},
{
"id": "对方账户名称",
"type": "string",
"field": "FOPPOSITECCOUNTNAME",
"label": "对方账户名称",
"value": "{{收款信息.name}}",
"parent": "FPAYBILLENTRY"
},
{
"type": "string",
"field": "FCOMMENT",
"label": "备注",
"value": "{{报销明细.费用明细}}",
"parent": "FPAYBILLENTRY",
"describe": null,
"is_required": false
}
],
"describe": null,
"is_required": false
},
{
"id": "FDepartment",
"type": "string",
"field": "FDepartment",
"label": "部门",
"value": "_findCollection find Number from 400f56e7-e846-35e5-9017-c28fd7303fb0 where Name={{费用归属部门}}",
"parent": null,
"parser": {
"name": "ConvertObjectParser",
"params": "FNumber"
}
}
],
"response": [
{
"id": "callBackStrategy",
"type": "object",
"field": "callBackStrategy",
"label": "回写方案",
"value": null,
"parent": null,
"children": [
{
"type": "string",
"field": "strategyId",
"label": "方案ID",
"value": "950d161e-e92d-3d49-9d70-342c1503f694",
"parent": "callBackStrategy",
"describe": null,
"is_required": true
},
{
"id": "FCUSTID",
"type": "string",
"field": "id",
"label": "审批实例ID",
"value": "{{id}}",
"parent": "callBackStrategy"
},
{
"id": "FCustTypeId_FNumber",
"type": "string",
"field": "business_id",
"label": "审批编号",
"value": "{{extend.business_id}}",
"parent": "callBackStrategy"
},
{
"id": "name",
"type": "string",
"field": "name",
"label": "收款信息",
"value": "{{收款信息.name}}",
"parent": "callBackStrategy"
}
]
}
],
"operation": {
"rows": 1,
"method": "batchArraySave",
"rowsKey": "array"
},
"otherRequest": [
{
"type": "string",
"field": "FormId",
"label": "业务对象表单Id",
"value": "AP_PAYBILL",
"describe": "必须填写金蝶的表单ID如:PUR_PurchaseOrder",
"is_required": true
},
{
"type": "string",
"field": "Operation",
"label": "执行的操作",
"value": "BatchSave",
"describe": null,
"is_required": true
},
{
"type": "bool",
"field": "IsAutoSubmitAndAudit",
"label": "提交并审核",
"value": "false",
"describe": null,
"is_required": true
},
{
"type": "bool",
"field": "IsVerifyBaseDataField",
"label": "验证基础资料",
"value": "false",
"describe": "是否验证所有的基础资料有效性,布尔类,默认false(非必录)",
"is_required": false
}
],
"otherResponse": []
}