批量保存操作接口
1 接口介绍
批量保存操作服务是指通过在请求体中按规范输入json格式的参数,再调用服务执行批量保存的操作。
2 注意事项
1)若请求体参数中携带有主键id,默认是修改操作,否则判断是新增操作;
2)可以在同一批数据中既执行新增又执行修改。
3 接口示例
采购订单批量保存
URL:{{host}}/kapi/sys/pm_purorderbill/batchsave 请求方式:POST 请求Header参数: Content-Type=application/json accessToken: xxxxxxxxxxxxx |
请求Body: { "data": [ { "org": { "number": "xyd2024" }, "biztype": { "number": "110" }, "supplier": { "number": "sup-00122" }, "comment":"你好1", "billentry": [ { "material": { "number": "ZH-00009257" }, "qty": "3", "unit": { "number": "ZH-TON" }, "entrysettleorg":{ "number":"xyd2024" }, "entrycomment":"111111" } ] }, { "org": { "number": "xyd2024" }, "supplier": { "number": "sup-00122" }, "biztype": { "number": "110" }, "comment":"你好2", "billentry": [ { "material": { "number": "ZH-00009257" }, "qty": "3", "unit": { "number": "ZH-TON" }, "entrysettleorg":{ "number":"xyd2024" }, "entrycomment":"222222" } ] }, { "org": { "number": "xyd2024" }, "biztype": { "number": "110" }, "supplier": { "number": "sup-00122" }, "comment":"你好3", "billentry": [ { "material": { "number": "ZH-00009257" }, "qty": "3", "unit": { "number": "ZH-TON" }, "entrysettleorg":{ "number":"xyd2024" }, "entrycomment":"3333" } ] } ] } |
请求结果: { "data": [ { "dindex": 0, "number": "CGDD-202109-152259", "orgnumber": "xyd2024", "success": true, "id": 1239689647475463168 }, { "dindex": 1, "number": "CGDD-202109-152260", "orgnumber": "xyd2024", "success": true, "id": 1239689649320911872 }, { "dindex": 2, "number": "CGDD-202109-152261", "orgnumber": "xyd2024", "success": true, "id": 1239689649765553152 } ], "success": true, "errorCode": "success", "message": null } |
4 返回参数说明
序号 | 参数 | 解释 | 返回值实例 |
1 | success | 是否成功 | true/false |
2 | errorCode | 错误编码 | success/false |
3 | message | 提示信息 | 成功时为null,失败时会返回错误信息 |
4 | data | 业务对象数据 | {"dindex": 0, "number": "CGDD-202109-152259", "orgnumber": "xyd2024", "success": true, "id": 1239689647475463168 },{"dindex": 1,...} |
批量保存操作接口
本文2024-09-23 00:26:52发表“云苍穹知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-cangqiong-139523.html