- 新增出站回调 waybill.getreceive(注册到 callback_functions,管理端可勾选):
请求 { request: { waybill_codes: [...] } },响应裸数组/包装体均兼容,
1/0 与 Y/N 归一后回写 wms_order_express.is_galaxy_receive(按 warehouse_id 隔离)
- 回调签名新增 signMode=simple(MD5(appSecret+timestamp+bodyJson)),
waybill.getreceive 使用该口径,与仓库通知协议一致;其它事件默认口径不变
- 新增 waybill.warehouse.updateReceive / updateReceiveTaskProgress:
复用导出的异步任务ID与进度模式(前缀 waybill_receive_),单批 10 单自动切批;
支持 waybillCodes 或与 waybill.warehouse.list 一致的 where 条件圈选(上限 5000);
仓库未配置外部接口时直接失败,不创建任务
- 抽出 buildListQueryWhere / resolveWaybillCodesByWhere,列表与批量更新共用筛选口径
- order_express:is_back / is_intercept / is_galaxy_receive 补默认值 N
- 迁移:存量 NULL 回填为 N(Y 不动);三列分别建立单列索引(INPLACE + LOCK=NONE)
- 文档:methods/system.json(0.3.324)、变更记录、设计文档与出站回调说明同步
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
33 lines
1.1 KiB
JavaScript
33 lines
1.1 KiB
JavaScript
'use strict';
|
||
|
||
/**
|
||
* 出站回调 method 注册表(代码注册,管理端多选列表经拉取接口透出)。
|
||
*
|
||
* method 即出站路由键:wms_api_app.callback_functions 勾选后,
|
||
* 出站回调按 warehouse_id + method 自动路由到承接该 method 的应用;
|
||
* callback_functions 为空/未勾选 = 不承接任何回调。
|
||
*
|
||
* 新增出站回调能力时在此登记 method,管理端接口自动可见。
|
||
*/
|
||
const CALLBACK_FUNCTIONS = [
|
||
{
|
||
method: 'notify.reply',
|
||
name: '站内信通知回执',
|
||
description: '站内信/系统通知/回执出站推送(warehouseNotify 与 inbox 回执共用)',
|
||
},
|
||
{
|
||
method: 'waybill.getreceive',
|
||
name: '运单揽收状态查询',
|
||
description: '按运单号批量查询是否已揽收:请求 { waybill_codes: [...] },'
|
||
+ '外部返回 [{ waybill_code, is_galaxy_receive: 1|0 }],回写 wms_order_express.is_galaxy_receive',
|
||
},
|
||
];
|
||
|
||
/** method 合法值集合(供管理端 create/update 校验) */
|
||
const CALLBACK_METHOD_SET = new Set(CALLBACK_FUNCTIONS.map(item => item.method));
|
||
|
||
module.exports = {
|
||
CALLBACK_FUNCTIONS,
|
||
CALLBACK_METHOD_SET,
|
||
};
|