WMS_MAIN/methods/changes/system.json

1204 lines
76 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[
{
"version": "2026.05.05-system-02",
"date": "2026-05-05",
"summary": "order.wave.batchList:新增 where.storage_assignment_status 的过滤语义说明",
"methods": [
"order.wave.batchList"
],
"notes": [
"新增 where 字段 `storage_assignment_status`:类型 string,可选值:`未分配`、`部分分配`、`已分配`;默认不传:不做分配状态限制。",
"过滤语义:`已分配`:聚合后全部 fin;`部分分配`:不含 error,且既不是全 none,也不是全 fin;`未分配`:全 none 或包含 error(异常并入未分配筛选集合)。",
"说明:返回字段 `storage_assignment_status` 的展示值保持不变;包含 error 时仍可能展示“分配异常”,但 where 的过滤语义把异常算到“未分配”集合,避免把过滤语义与展示值混淆。"
],
"type": "updated"
},
{
"version": "2026.05.05-system-01",
"date": "2026-05-05",
"summary": "新增 order.wave.singleOrderFetchList:散单候选分组查询(排除团购命中分组)",
"methods": [
"order.wave.singleOrderFetchList"
],
"notes": [
"新增 order.wave.singleOrderFetchList:返回按机器结构分组的散单候选列表,接口会排除已达团购阈值(同组订单数量 >= same_order_quantity 或仓库配置 min_group_order_fetch_quantity)的分组,仅返回同组订单数量 < 阈值 的分组(散单候选)。",
"与 order.wave.groupOrderFetchList 的关键差异:groupOrderFetchList 返回满足团购阈值(>=)的分组;singleOrderFetchList 返回未达阈值(<)的散单候选分组。",
"影响范围:订单波次抓取相关前端/调度服务。兼容性:不影响或修改现有 order.wave.groupOrderFetchList,两个接口可并行使用。"
],
"type": "added"
},
{
"version": "2026.05.04-system-04",
"date": "2026-05-04",
"summary": "完善商品编码唯一性校验接口文档,补充 item_id(排除自身)和 owner_id(货主ID)入参说明,新增 unique/isUnique 返回字段描述",
"methods": [
"stock.warehouse.checkItemCodeUnique"
],
"notes": [
"完善商品编码唯一性校验接口文档,补充 item_id(排除自身)和 owner_id(货主ID)入参说明,新增 unique/isUnique 返回字段描述"
],
"type": "modified"
},
{
"version": "2026.05.04-system-03",
"date": "2026-05-04",
"summary": "新增订单打印模块:按波次IDs获取打印数据并自动过滤未完全分配波次",
"methods": [
"order.print.getWavePrintData"
],
"notes": [
"按波次IDs获取订单打印数据,内部去重并规范化 wave_ids,自动过滤快递未完全分配的波次;返回通过过滤的波次订单明细,按 wave_no 排序分组,并在 ext 中返回 missing_wave_ids 与 filtered_wave_ids。"
],
"type": "added"
},
{
"version": "2026.05.04-system-02",
"date": "2026-05-04",
"summary": "修改 pick.query 入参:order_id -> waybill_code",
"methods": [
"pick.query"
],
"notes": [
"入参从 order_id 改为 waybill_code(快递号),通过快递号查找订单后再查波次拣货信息"
],
"type": "breaking_change"
},
{
"version": "2026.05.04-system-01",
"date": "2026-05-04",
"summary": "新增 system method pick.query:按订单查询波次拣货信息",
"methods": [
"pick.query"
],
"notes": [
"按订单查询该订单所属波次的拣货信息,支持 full/full_display/is_full 控制是否完整显示;接口按当前登录用户仓库上下文过滤,防止跨仓越界。"
],
"type": "added"
},
{
"version": "2026.05.03-system-09",
"date": "2026-05-03",
"summary": "新增按 request_id 查询分配状态/结果接口",
"methods": [
"order.pendingOrder.allocateStorageProgress"
],
"notes": [
"新增按 request_id 查询储位分配异步任务状态/结果接口,支持 status:submitted/running/success/failed/not_found;success 返回 result(底层分配结果),failed 返回 error(错误信息);兼容 requestId 参数名。"
],
"type": "updated"
},
{
"version": "2026.05.03-system-07",
"date": "2026-05-03",
"summary": "新增抓取进度查询接口",
"methods": [
"order.wave.fetch",
"order.wave.fetchTaskProgress"
],
"notes": [
"新增按 task_id 查询抓取任务进度的接口 order.wave.fetchTaskProgress,支持返回 status(submitted/running/success/failed/not_found)及进度相关字段:progress_percent、finished_structure_count、total_fetched_quantity、duration_ms、error、update_time 等;同时明确 order.wave.fetch 为异步任务提交接口,客户端可通过 task_id 调用 order.wave.fetchTaskProgress 查询进度和最终结果。"
],
"type": "updated"
},
{
"version": "2026.05.03-system-05",
"date": "2026-05-03",
"summary": "补齐仓库设置模块 setting.warehouse 的 methods 文档",
"methods": [
"setting.warehouse.getSettings",
"setting.warehouse.getFieldMeta",
"setting.warehouse.saveSettings"
],
"notes": [
"补齐仓库配置 methods API 文档"
],
"type": "updated"
},
{
"version": "2026.05.03-system-04",
"date": "2026-05-03",
"summary": "order.wave:自动加团新增跳过规则并新增批量结束自动加团接口",
"methods": [
"order.wave.batchAutoGrouping",
"order.wave.batchFinishAutoGrouping"
],
"notes": [
"开启自动加团新增“已打印/超最大波次容量”跳过规则并在响应中返回跳过明细;新增批量结束自动加团接口(将 wave_status=0 的波次批量置为 1)"
],
"type": "updated"
},
{
"version": "2026.05.03-system-03",
"date": "2026-05-03",
"summary": "裁剪 order_list 以轻量化返回",
"methods": [
"order.wave.batchList"
],
"notes": [
"移除响应中的 order_list 字段,接口仅返回波次基础信息与状态汇总(order_count / storage_assignment_status / express_assignment_status / print_assignment_status)"
],
"type": "updated"
},
{
"version": "2026.05.03-system-02",
"date": "2026-05-03",
"summary": "新增 order.wave.batchAutoGrouping:批量改为自动加团中",
"methods": [
"order.wave.batchAutoGrouping"
],
"notes": [
"新增批量改为自动加团中接口及返回字段"
],
"type": "updated"
},
{
"version": "2026.04.22-system-02",
"date": "2026-04-22",
"summary": "新增 order.pendingOrder.syncOrderIds:待处理订单同步透传入口",
"methods": [
"order.pendingOrder.syncOrderIds"
],
"notes": [
"新增 order.pendingOrder.syncOrderIds:仅接收 order_ids 并转发到服务层,当前不做业务处理。",
"接口保留登录态校验,入参仅接受订单 ID 相关字段,响应以服务层返回值为准。",
"该方法用于预留同步链路,后续补齐业务逻辑时再扩展服务层实现。"
],
"type": "added"
},
{
"version": "2026.04.22-system-01",
"date": "2026-04-22",
"summary": "补全订单工作台各模块 detail 方法文档",
"methods": [
"order.detail",
"order.pendingOrder.detail",
"order.reviewOrder.detail",
"order.expectionOrder.detail",
"order.outboundOrder.detail",
"order.deliveryOrder.detail",
"order.deliveryExpectionOrder.detail",
"order.entrustOrder.detail",
"order.archiveOrder.detail"
],
"notes": [
"补全文档:detail 为订单工作台通用详情方法,入参支持 ids/id/order_id/orderId;可选 tableType/tablePosition/type/moduleName,支持 current/history/dispatch/outsourced/order/revieworder/pendingorder 等。",
"返回包含 order/detail(订单头)、orderItems/items(商品明细)、expresses(运单信息)、waybill_codes(去重运单号数组)。"
],
"type": "updated"
},
{
"version": "2026.04.19-system-01",
"date": "2026-04-19",
"summary": "新增方法 setting.expressInterface.listByWarehousePlatformCode:按 warehouse_id + platform_code 查询全字段列表并支持缓存",
"methods": [
"setting.expressInterface.listByWarehousePlatformCode"
],
"notes": [
"新增 setting.expressInterface.listByWarehousePlatformCode:按 warehouse_id + platform_code 返回快递接口的全字段数组(不分页),每条记录包含 express 关联对象(id/code/name/platform 等)。",
"支持缓存,缓存键由 warehouse_id + platform_code 组成;缓存命中将直接返回缓存结果以提升查询性能。",
"在创建/更新/删除操作(setting.expressInterface.create/update/delete)后,会主动清理对应 warehouse_id + platform_code 的缓存以确保数据一致性。"
],
"type": "added"
},
{
"version": "2026.04.17-system-08",
"date": "2026-04-17",
"summary": "新增快递编码管理模块批量软删除接口 setting.express.delete",
"methods": [
"setting.express.delete"
],
"notes": [
"新增批量软删除接口 setting.express.delete:接受 ids(数组、逗号字符串或单值),对属于当前仓库且未被删除的记录执行软删除(设置 deleted_at),并清理 express 列表缓存。",
"当任一目标记录的 code 被 wms_express_interface.express_code 引用时,接口会拒绝删除并返回 409,错误信息中包含被引用的编码列表。",
"响应包含 ids、deleted_ids、already_deleted_ids 与 status,已删除与未删除的 id 会明确分类。仅记录已实现行为。"
],
"type": "added"
},
{
"version": "2026.04.17-system-05",
"date": "2026-04-17",
"summary": "新增文档分组:平台编码管理模块(收口 index.getPlatformList 与 setting.platform.*)",
"methods": [
"index.getPlatformList",
"setting.platform.list",
"setting.platform.create",
"setting.platform.update",
"setting.platform.delete"
],
"notes": [
"新增独立文档分组 '平台编码管理模块',将平台基础列表(index.getPlatformList)与平台设置管理接口(setting.platform.*)归并为单一分组以便维护;仅文档变更,不修改实现。",
"文档中仅包含已实现的方法与字段,未新增或推断不存在的参数/返回字段。"
],
"type": "added"
},
{
"version": "2026.04.17-system-04",
"date": "2026-04-17",
"summary": "新增独立平台设置模块 setting.platform(wms_platfrom_setting)及其 CRUD 接口:list/create/update/delete。",
"methods": [
"setting.platform.list",
"setting.platform.create",
"setting.platform.update",
"setting.platform.delete"
],
"notes": [
"新增独立模块 setting.platform,映射数据表 wms_platfrom_setting;list 支持 where(id/code/name/platform_code/quickWhere)与 pagination(兼容 page/pageSize/page_size);create/update 要求 platform_code 必须存在于系统平台表(wms_platform),且禁止越权写入 warehouse_id;delete 需传入 id 并校验当前仓库范围。"
],
"type": "added"
},
{
"version": "2026.04.15-system-07",
"date": "2026-04-15",
"summary": "将 docs/order-workbench-list-api.md 引用统一为 window 链接格式",
"methods": [
"order.list",
"order.reviewOrder.list",
"order.pendingOrder.list",
"order.outboundOrder.list",
"order.expectionOrder.list",
"order.entrustOrder.list",
"order.deliveryOrder.list",
"order.deliveryExpectionOrder.list"
],
"notes": [
"将所有 methods/system.json 中指向 docs/order-workbench-list-api.md 的说明统一替换为 <window>docs/order-workbench-list-api.md</window> 格式,以便 HTML 渲染识别为 window 链接。",
"仅修改 methods/system.json 的文档字段,不涉及任何业务代码或接口契约变化。"
],
"type": "updated"
},
{
"version": "2026.04.15-system-06",
"date": "2026-04-15",
"summary": "订单工作台列表文档补全 raw 字段字典与中文语义说明",
"methods": [
"order.list",
"order.reviewOrder.list",
"order.pendingOrder.list",
"order.outboundOrder.list",
"order.expectionOrder.list",
"order.entrustOrder.list",
"order.deliveryOrder.list",
"order.deliveryExpectionOrder.list",
"order.archiveOrder.list"
],
"notes": [
"在 docs/order-workbench-list-api.md 中补充所有订单列表通用 raw 字段字典,明确每个字段的中文语义与 enum 取值。",
"补充 express_numbers / waybill_codes 两个服务层派生字段说明,便于前端直接渲染多个快递号。",
"methods/system.json 中所有订单 list 的 response.list 描述已指向该字段字典章节。"
],
"type": "updated"
},
{
"version": "2026.04.15-system-05",
"date": "2026-04-15",
"summary": "基础模块新增快递/平台列表查询接口并设置为不鉴权,复用缓存 service",
"methods": [
"index.getExpressList",
"index.getPlatformList"
],
"notes": [
"新增 index.getExpressList,归属基础模块(module=index),对应 app/service/systems/express.js 中的 getExpressList。",
"index.getExpressList 设置为不鉴权,不需要 Authorization 头。",
"新增 index.getPlatformList,归属基础模块(module=index),对应 app/service/systems/platform.js 中的 getPlatformList。",
"index.getPlatformList 设置为不鉴权,不需要 Authorization 头。",
"快递列表与平台列表都支持缓存优先,缓存未命中时回源数据库并写入缓存。",
"平台列表支持缓存优先,缓存未命中时回源 wms_platform 并写入缓存。"
],
"type": "added"
},
{
"version": "2026.04.15-system-02",
"date": "2026-04-15",
"summary": "签约策略字段元信息新增 default_express_code / default_platform_code list 选项",
"methods": [
"storeWarehouse.store.getPolicyConfigFields"
],
"notes": [
"getPolicyConfigFields 现在返回 default_express_code 与 default_platform_code 两个 list 字段,并从 wms_express / wms_platform 读取选项列表。",
"默认值仍保留为 default_express_code=STO、default_platform_code=TB。"
],
"type": "updated"
},
{
"version": "2026.04.15-system-03",
"date": "2026-04-15",
"summary": "签约策略字段移除 sku_visibility,receive_mode options 改为 value/label 结构",
"methods": [
"storeWarehouse.store.savePolicyConfig",
"storeWarehouse.store.getPolicyConfigFields"
],
"notes": [
"策略字段定义不再包含 sku_visibility,历史值读取时仍会被归一化忽略。",
"receive_mode 的 options 改为 [{ value, label }] 格式,便于前端直接渲染。"
],
"type": "updated"
},
{
"version": "2026.04.15-system-04",
"date": "2026-04-15",
"summary": "按文件模块拆分 order 目录系统文档分组,覆盖订单工作台入口及各子模块方法",
"methods": [
"order.list",
"order.manualOutboundOrder",
"order.badgeCount",
"order.outboundOrder.manualOutboundOrder",
"order.reviewOrder.list",
"order.reviewOrder.reviewOrder",
"order.pendingOrder.list",
"order.pendingOrder.reverseReviewOrder",
"order.pendingOrder.markPendingOutboundOrder",
"order.pendingOrder.cancelOrder",
"order.outboundOrder.list",
"order.expectionOrder.list",
"order.entrustOrder.list",
"order.deliveryOrder.list",
"order.deliveryExpectionOrder.list",
"order.archiveOrder.list"
],
"notes": [
"按 app/service/systemMethods/order 下的实际对外方法补全 methods/system.json 文档,只覆盖 system,不处理 qimen。",
"order 文档已按 index / reviewOrder / pendingOrder / outboundOrder / expectionOrder / entrustOrder / deliveryOrder / deliveryExpectionOrder / archiveOrder 拆成多个模块分组。",
"同步根据当前代码意图补充 params / response / errors,且不再把 index.js 已移除的兼容接口写回文档。"
],
"type": "updated"
},
{
"version": "2026.04.15-system-01",
"date": "2026-04-15",
"summary": "货主主体配置默认补齐 default_express_code / default_platform_code",
"methods": [
"store.createStore",
"store.createWarehouse"
],
"notes": [
"当 subject_config 未传或缺少字段时,自动补齐 default_express_code=STO、default_platform_code=TB,并保留现有的 max_notice_webhook_count 默认值。",
"同步更新 methods/system.json 中 store.createStore 与 store.createWarehouse 的参数说明。"
],
"type": "updated"
},
{
"version": "2026.04.14-system-01",
"date": "2026-04-14",
"summary": "库存列表新增货主名称字段 stock.store_name",
"methods": [
"storage.inventory.list"
],
"notes": [
"在 methods/system.json 的 storage.inventory.list response 中补充 stock.store_name:来源于签约表 store_remask,若无签约关系则为 null。",
"只同步文档,不修改业务代码。"
],
"type": "updated"
},
{
"version": "2026.04.13-system-01",
"date": "2026-04-13",
"summary": "补全 storage.receiving.detailChange 的入参/出参契约与错误码说明",
"methods": [
"storage.receiving.detailChange"
],
"notes": [
"在 methods/system.json 中补充 storage.receiving.detailChange 的 params/response/errors,明确 id 与 receiving_id 必填。",
"说明 expiry_date 小于当前日期时返回 400 且 message 为 \"到期日期已过期,不能录入收货\"。",
"说明当传入 system_product_id 时会回填条码、重量、箱规、商品名称与 product_snapshot;未传时 barcode/product_name 也可单独更新。",
"同步补充文档:docs/storage-receiving-api.md 中新增 detailChange 段落。"
],
"type": "updated"
},
{
"version": "2026.04.07-system-01",
"date": "2026-04-07",
"summary": "修正 warehouse.getAreaRacks 的鉴权/权限链路文档,明确该接口需要 登录并走权限校验。",
"methods": [
"warehouse.getAreaRacks"
],
"notes": [
"对齐当前 system 文档中的 isNeedAuth=true、isNeedLogin=true。",
"用于补充该接口权限链路修正文档的历史上下文,不改变 methods/system.json 的 SSOT 角色。"
]
},
{
"version": "2026.04.07-system-02",
"date": "2026-04-07",
"summary": "补充签约配置相关接口文档,覆盖策略字段元信息查询与面单数量人工调整。",
"methods": [
"storeWarehouse.store.getPolicyConfigFields",
"storeWarehouse.store.adjustPrintQuantity"
],
"notes": [
"getPolicyConfigFields 说明为获取签约策略可配置字段元信息列表。",
"adjustPrintQuantity 说明为人工调整签约关系下的面单余额并记录变更日志,并 明确 id、change_quantity、reason 等关键入参。"
]
},
{
"version": "2026.04.07-system-03",
"date": "2026-04-07",
"summary": "对外命名从 qimenConfig 收口为 apiConfig,并在接口配置文档中强调 interface_type_id 校验。",
"methods": [
"storeWarehouse.store.listApiConfig",
"storeWarehouse.store.saveApiConfig",
"storeWarehouse.store.deleteQimenConfig"
],
"notes": [
"文档对外统一使用 apiConfig / api_config 命名,减少 qimenConfig 历史别名歧义。",
"saveApiConfig 要求 interface_type_id 为必填且必须指向已存在的 wms_interface_type 记录。",
"listApiConfig / deleteQimenConfig 同步补充 interface_type_id 字段说明。"
]
},
{
"version": "2026.04.07-system-04",
"date": "2026-04-07",
"summary": "补充 /api/docs 文档体验增强说明,新增查看变更记录与查看原文 JSON 的入口说明。",
"methods": [
"/api/docs",
"/api/docs/:docName",
"/api/docs/:docName/raw",
"/api/docs/:docName/changes"
],
"notes": [
"sidecar 变更数组用于承载文档历史说明,不替代 methods/system.json 作为 SSOT。",
"原文 JSON 入口继续用于直接查看当前生效文档。"
]
},
{
"version": "2026.04.07-system-05",
"date": "2026-04-07",
"summary": "修正 storeWarehouse.store.adjustPrintQuantity 的面单余额调整语义:由增减/累加改为覆盖设置目标余额。",
"methods": [
"storeWarehouse.store.adjustPrintQuantity"
],
"notes": [
"adjustPrintQuantity 当前兼容 print_quantity、target_quantity、change_quantity、adjust_quantity 作为目标面单余额输入,不再按增减量解释。",
"变更日志中的 change_quantity 由 before/after 自动计算差值,以兼容历史审计与展示。"
]
},
{
"version": "2026.04.07-system-06",
"date": "2026-04-07",
"summary": "按接口类型分类限制必填字段,OPEN_API 创建时自动生成 self_app_key/self_app_secret",
"methods": [
"storeWarehouse.store.saveApiConfig"
],
"notes": [
"QM_WMS 类型须填写 qimen_app_key/qimen_customer_id/qimen_warehouse_code;OPEN_API 类型三个奇门字段非必填,创建时自动生成 self_app_key(WMS+32位HEX)和 self_app_secret(64位HEX),更新时保留已有密钥。"
],
"type": "changed"
},
{
"version": "2026.04.07-system-07",
"date": "2026-04-07",
"summary": "新增接口类型列表查询接口,归属基础模块,无需权限",
"methods": [
"index.listInterfaceTypes"
],
"notes": [
"返回所有已启用的接口类型(wms_interface_type),包含 id、interface_code、interface_name、interface_category、description 字段。设置 isNeedAuth: false, isNeedLogin: true。"
],
"type": "added"
},
{
"version": "2026.04.07-system-08",
"date": "2026-04-07",
"summary": "app_name 改为必传参数",
"methods": [
"storeWarehouse.store.saveApiConfig"
],
"notes": [
"app_name 不再有默认值自动生成逻辑,调用方必须传入非空的 app_name,否则返 回 400 错误。"
],
"type": "changed"
},
{
"version": "2026.04.07-system-09",
"date": "2026-04-07",
"summary": "新增收货单快捷入库上架接口",
"methods": [
"storage.inventory.quickPutaway"
],
"notes": [
"新建 storage.inventory 库存操作模块。quickPutaway 从收货单直接生成入库单 (SCRK)并写入 wms_storage 库存表,同时更新 wms_stock_warehouse 库存数量(悲观行锁),回填收货明细入库状态。要求收货单已完成且所有明细已匹配系统商品。"
],
"type": "added"
},
{
"version": "2026.04.08-system-01",
"date": "2026-04-08",
"summary": "新增收货单与入库单匹配入库接口",
"methods": [
"storage.inventory.matchPutaway"
],
"notes": [
"接收多个收货单和入库单,按商品(stock_warehouse_id)进行数量匹配入库,完 成后根据入库单来源(QM/API)自动触发回传。入参为 receiving_ids(数组)和 entry_order_ids(数组),返回匹配汇总、各收货单入库状态、各入库单状态及回传结果。isNeedAuth=true, isNeedLogin=true, isNeedRight=false。"
],
"type": "added"
},
{
"version": "2026.04.08-system-02",
"date": "2026-04-08",
"summary": "saveApiConfig 新增 callback_url 可选参数",
"methods": [
"storeWarehouse.store.saveApiConfig"
],
"notes": [
"新增 callback_url 参数(VARCHAR(500),可选),用于 OPEN_API 类型入库单的 回调地址配置。"
],
"type": "changed"
},
{
"version": "2026.04.08-system-03",
"date": "2026-04-08",
"summary": "serializeQimenConfig 新增返回 callback_url 字段,影响 list 和 listApiConfig 两个接口",
"methods": [
"storeWarehouse.store.list",
"storeWarehouse.store.listApiConfig"
],
"notes": [
"serializeQimenConfig() 序列化方法新增 callback_url(string)字段。storeWarehouse.store.list 返回的每条记录 api_config 对象中包含 callback_url;storeWarehouse.store.listApiConfig 返回的 list 数组中每条配置包含 callback_url。"
],
"type": "changed"
},
{
"version": "2026.04.08-system-04",
"date": "2026-04-08",
"summary": "新增库存移库(库位转移)接口",
"methods": [
"storage.inventory.transferLocation"
],
"notes": [
"新增 storage.inventory.transferLocation 接口,支持批量多商品多库位移库, 包含部分数量移库与全量移库。入参为 warehouse_id(仓库ID)和 transfers 数组(storage_id、target_space_id、quantity),触发 storage_transfer_completed 通知事件, 每条移库记录独立操作日志。isNeedAuth=true, isNeedLogin=true。"
],
"type": "added"
},
{
"version": "2026.04.08-system-05",
"date": "2026-04-08",
"summary": "简化移库接口入参,从批量 transfers 数组改为单条移库",
"methods": [
"storage.inventory.transferLocation"
],
"notes": [
"移除 warehouse_id 和 transfers 数组入参,改为扁平的 storage_id + target_space_id + quantity 三个顶层参数。warehouse_id 从库存记录自动获取,接口从批量移库简化为单商品单库位移库。响应结构同步简化为单条结果对象。"
],
"type": "modified"
},
{
"version": "2026.04.08-system-06",
"date": "2026-04-08",
"summary": "新增商品库存明细查询接口",
"methods": [
"stock.warehouse.getStockDetail"
],
"notes": [
"新增 stock.warehouse.getStockDetail 接口,按库位/批次维度查询商品库存分布。入参为 stock_id(必填,商品库存ID)和 pagination(可选,含 page/pageSize)。返回 stockItem(商品概要)、storageList(wms_storage 明细数组,含批次号、库位、数 量、锁定数量、生产日期、过期日期等,关联 location_space 库位信息)、pagination 分页信息。isNeedAuth=false, isNeedLogin=true。底层调用 stockStore.getStockDetail,自动校验商品归属当前仓库。"
],
"type": "added"
},
{
"version": "2026.04.08-system-07",
"date": "2026-04-08",
"summary": "新增入参 group_by_batch,支持按批次维度切换库存明细聚合方式",
"methods": [
"stock.warehouse.getStockDetail"
],
"notes": [
"新增可选布尔参数 group_by_batch(默认 false)。false 时按库位合并数量,批次相关字段(batch_no, production_date, expiry_date, inbound_time, inbound_order_no, supplier_batch_no)置 null;true 时保持原逻辑返回每条明细。出参结构不变,但 storageList 中批次字段在合并模式下为 null。"
],
"type": "modified"
},
{
"version": "2026.04.08-system-08",
"date": "2026-04-08",
"summary": "新增按商品维度移库接口",
"methods": [
"storage.inventory.transferByProduct"
],
"notes": [
"新增 storage.inventory.transferByProduct 接口,按库位+商品查找所有库存记 录合并移动。入参为 space_id(原库位ID)、stock_id(商品SKU ID,即 wms_stock_warehouse.id)、target_space_id(目标库位ID)、quantity(移库数量)。开启批次管理(is_batch_mgmt=Y)的商品会被拒绝,需使用 transferLocation 按库存记录精确移库。复用 storage_transfer_completed 通知事件,操作日志编码 STORAGE_TRANSFER_BY_PRODUCT。isNeedAuth=true, isNeedLogin=true。"
],
"type": "added"
},
{
"version": "2026.04.08-system-09",
"date": "2026-04-08",
"summary": "补充 storeWarehouse.store.list 完整 response 输出字段说明,移除 api_config / apiConfig",
"methods": [
"storeWarehouse.store.list"
],
"notes": [
"从返回结果中移除 api_config 和 apiConfig 字段(代码中 delete serialized.api_config / delete serialized.apiConfig),文档 response 补充完整输出字段列表:id, store_id, store_name, warehouse_id, warehouse_name, counterparty_id, counterparty_name, current_subject_role, auth_status, auth_status_label, apply_reason, review_comment, apply_time, review_time, auth_start, auth_end, actual_end, print_quantity, applied_by, reviewed_by, ended_by, remask, use_status, policy_config, is_auth_valid, remaining_days 以及分页和 current_subject 信息。"
],
"type": "updated"
},
{
"version": "2026.04.08-system-10",
"date": "2026-04-08",
"summary": "货主列表返回新增 has_qimen_config 布尔字段",
"methods": [
"storeWarehouse.store.list"
],
"notes": [
"storeWarehouse.store.list 返回的 data.list[] 中新增 has_qimen_config(boolean),表示该货主是否已配置奇门。"
],
"type": "changed"
},
{
"version": "2026.04.08-system-11",
"date": "2026-04-08",
"summary": "补全 stock.warehouse.search 接口文档,新增 params / response / errors 完整说明",
"methods": [
"stock.warehouse.search"
],
"notes": [
"入参补充 keyword(string,模糊匹配 item_code / item_name / goods_code / barcode)和 store_id(number,按货主筛选)。响应补充 data 数组各字段(id, item_code, goods_code, item_name, sku_property, stock_unit, quantity, locked_quantity, brand_name, item_type, barcodes, store_stock)以及 total。errors 补充 code=0 搜 索失败场景。"
],
"type": "updated"
},
{
"version": "2026.04.08-system-12",
"date": "2026-04-08",
"summary": "新增 with_stock / is_batch 参数,支持返回关联库存明细(按库位分 组或按批次逐条)",
"methods": [
"stock.warehouse.search"
],
"notes": [
"入参新增 with_stock(boolean,默认 false,是否返回关联库存数据)和 is_batch(boolean,默认 false,仅 with_stock=true 时生效,按批次明细返回)。响应 data[] 新增 storage[] 字段:is_batch=false 时按库位分组汇总(含 space_id、space、inventory_type、quantity、locked_quantity、available_quantity);is_batch=true 时逐 条返回批次明细(含 id、stock_id、space_id、batch_no、inventory_type、quantity、locked_quantity、available_quantity、production_date、expiry_date、inbound_time、inbound_order_no、supplier_batch_no、created_at、space)。"
],
"type": "updated"
},
{
"version": "2026.04.08-system-13",
"date": "2026-04-08",
"summary": "新增 wms_stock_transaction 表和模型",
"methods": [
"wms_stock_transaction"
],
"notes": [
"新增出入库流水记录表 wms_stock_transaction,含 transaction_type(INBOUND/OUTBOUND)、warehouse_id、store_id、stock_id、storage_id、space_id、quantity、batch_no、inventory_type、order_type、order_no、order_id、receiving_id、entry_order_id、operator_id、operator_name、remark 等字段,关联 StockWarehouse 和 Storage 模型。"
],
"type": "added"
},
{
"version": "2026.04.08-system-14",
"date": "2026-04-08",
"summary": "quickPutaway 和 matchPutaway 入库时自动写入出入库记录",
"methods": [
"storage.inventory.quickPutaway",
"storage.inventory.matchPutaway"
],
"notes": [
"入库操作完成后自动写入 wms_stock_transaction 记录。quickPutaway 写入 order_type='SCRK'(收货入库),matchPutaway 写入 order_type='MATCH'(匹配入库),均 自动填充 warehouse_id、store_id、stock_id、storage_id、space_id、quantity、batch_no、inventory_type 等字段。"
],
"type": "updated"
},
{
"version": "2026.04.08-system-15",
"date": "2026-04-08",
"summary": "新增 storage.inventory.list 出入库记录列表查询接口",
"methods": [
"storage.inventory.list"
],
"notes": [
"出入库记录列表查询,支持 where 条件(transaction_type、stock_id、space_id、store_id、order_type、order_no、inventory_type、operator_name、created_at)、 分页(pagination)、排序(sort)和 group_by_batch 参数。默认合并模式按库位+商品 聚合返回合计数量与记录条数,group_by_batch=true 时返回每条明细含 batch_no、order_no、operator_name 等完整信息。响应均关联 stockItem(item_code、item_name、sku_property、stock_unit)。"
],
"type": "added"
},
{
"version": "2026.04.08-system-16",
"date": "2026-04-08",
"summary": "出入库流水记录查询接口从 storage.inventory.list 改名为 storage.transaction.list",
"methods": [
"storage.transaction.list"
],
"notes": [
"将出入库流水记录查询从 storage.inventory.list 迁移到 storage.transaction.list,避免与库存列表概念混淆。功能和参数不变。isNeedAuth=false, isNeedLogin=true, isNeedRight=false。"
],
"type": "rename",
"module": "storage"
},
{
"version": "2026.04.08-system-17",
"date": "2026-04-08",
"summary": "新增 storage.inventory.list 库存列表查询接口",
"methods": [
"storage.inventory.list"
],
"notes": [
"新增库存列表查询接口,查询 wms_storage 表。支持 where 条件(stock_id/space_id/store_id/inventory_type/batch_no/inbound_order_no/available_quantity/inbound_time/created_at)、分页、排序。支持 group_by_batch 参数:默认 false 按库位+商 品合并(SUM quantity/locked_quantity/available_quantity),true 返回每条明细含 batch_no/production_date/expiry_date 等。关联 stockItem(商品信息)和 space(库位信息)。isNeedAuth=false, isNeedLogin=true, isNeedRight=false。"
],
"type": "add",
"module": "storage"
},
{
"version": "2026.04.08-system-18",
"date": "2026-04-08",
"summary": "移除 storage.entry.create 创建入库单接口",
"methods": [
"storage.entry.create"
],
"notes": [
"不再允许通过 API 创建入库单。入库单仅由快捷入库(quickPutaway)和匹配入库(matchPutaway)等内部流程自动创建。底层 service 实现保留但不再通过 systemMethods 对外暴露。"
],
"type": "remove",
"module": "storage"
},
{
"version": "2026.04.08-system-19",
"date": "2026-04-08",
"summary": "移除 storage.entry.addDetail / deleteDetail / detailChange 对外 接口",
"methods": [
"storage.entry.addDetail",
"storage.entry.deleteDetail",
"storage.entry.detailChange"
],
"notes": [
"入库单明细编辑能力不再通过 systemMethods 对外暴露,入库单模块仅保留 list/get/cancel/completeEntry。"
],
"type": "remove",
"module": "storage"
},
{
"version": "2026.04.08-system-20",
"date": "2026-04-08",
"summary": "新增 storage.stockout 出库单模块(非订单出库单能力)",
"methods": [
"storage.stockout.list",
"storage.stockout.toOrder",
"storage.stockout.listItems"
],
"notes": [
"新增 storage.stockout.list / toOrder / listItems 接口,作为非订单出库单的主出口(对应奇门 stockout.create)。storage.delivery.* 仅作为兼容转发保留;底层 部分能力仍复用 order 模块。"
],
"type": "add",
"module": "storage"
},
{
"version": "2026.04.08-system-21",
"date": "2026-04-08",
"summary": "将 storage.stockout.toOrder 标记为占位接口",
"methods": [
"storage.stockout.toOrder"
],
"notes": [
"storage.stockout.toOrder 当前仅保留方法名用于后续扩展,暂不开放实际逻辑。调用时返回 code=405、message=占位接口,暂未开放。"
],
"type": "change"
},
{
"version": "2026.04.09-system-01",
"date": "2026-04-09",
"summary": "storage.entry.cancel 支持批量作废,新增 ids 入参并兼容单条 id",
"methods": [
"storage.entry.cancel"
],
"notes": [
"新增入参 `ids`(number[])以支持批量作废,兼容旧入参 `id`;当同时传入 `ids` 与 `id` 时以 `ids` 为准。",
"参数校验:`ids` 必须为非空数组;非法 ID 或空数组返回 400。",
"业务约束:已完成/已作废/处于不可作废状态的单据不允许作废;批量场景下任一 单据不存在或状态不允许时整体返回 404/400,未执行部分更新。",
"响应说明:单条作废返回字段 `id`(number);批量作废返回字段 `ids`(number[])。",
"已同步更新 methods/system.json(storage.entry.cancel)为 SSOT。"
]
},
{
"version": "2026.04.09-system-02",
"date": "2026-04-09",
"summary": "新增基础模块车牌识别接口 index.recognizeLicensePlate",
"methods": [
"index.recognizeLicensePlate"
],
"notes": [
"入参:base64(string,必填)或 imageBase64/image_base64(兼容)",
"响应:返回归一化后的识别对象,包含 licensePlate、plateNumber、color、confidence、requestId、imageSize、rawData",
"错误:400(参数或图片格式/尺寸问题),500(第三方 OCR 调用失败或云密钥未 配置)",
"文档中不包含任何敏感配置;实际腾讯云密钥保留在配置文件中,勿在文档中暴露 。"
],
"type": "added"
},
{
"version": "2026.04.09-system-03",
"date": "2026-04-09",
"summary": "收紧基础模块车牌识别接口响应,仅返回 licensePlate 字段",
"methods": [
"index.recognizeLicensePlate"
],
"notes": [
"出参由 {licensePlate, plateNumber, color, confidence, requestId, imageSize, rawData} 调整为 {licensePlate}",
"调用方请仅依赖 licensePlate 字段以适配新版本;历史字段已裁剪且不再保证存 在。",
"文档中未包含任何云密钥或敏感配置信息。"
],
"type": "changed"
},
{
"version": "2026.04.10-system-01",
"date": "2026-04-10",
"summary": "订单审核字段由 audit_status 替换为整数字段 step,并添加数据库迁移",
"methods": [
"order.getreviewOrderlist",
"order.reviewOrder.getreviewOrderlist",
"order.reviewOrder.reviewOrder",
"order.deliveryOrder.getdeliveryOrderlist",
"order.list",
"order.stats"
],
"notes": [
"字段变更:order 相关审核字段从字符串/枚举 audit_status 替换为整数 step。",
"step 映射:0=未审核,1=已审核,2=处理中,3=驳回/异常,4=配送中,5=已完成,9=已关闭。",
"reviewOrder 接口在更新 inspection_status 的同时会写入 step 字段。",
"必须执行迁移脚本:20260410150000-replace-audit-status-with-step-on-order-delivery-tables.js"
],
"type": "changed"
},
{
"version": "2026.04.13-system-02",
"date": "2026-04-13",
"summary": "stock.warehouse.search 返回新增效期管理字段并保留 is_shelf_life_mgmt",
"methods": [
"stock.warehouse.search"
],
"notes": [
"响应 data[] 中新增字段:inbound_min_days、outbound_min_days、shelf_life_days、remaining_threshold_days(均为 number,单位:天)。",
"保留并说明 is_shelf_life_mgmt 布尔字段(boolean),表示是否启用效期管理(true=启用)。",
"仅更新文档(methods/system.json 与变更记录),代码行为不变。"
],
"type": "updated"
},
{
"version": "2026.04.13-system-02",
"date": "2026-04-13",
"summary": "新增 storage.expiry.list 库存有效期列表查询接口",
"methods": [
"storage.expiry.list"
],
"notes": [
"该接口查询 wms_storage,关联 stockWarehouse 和 locationSpace,并按当前仓库与 remaining_threshold_days / expiry_date 过滤。"
],
"type": "added"
},
{
"version": "2026.04.13-system-03",
"date": "2026-04-13",
"summary": "新增 storage.inventory.list 库存列表返回效期字段与预警标记",
"methods": [
"storage.inventory.list"
],
"notes": [
"库存列表响应增加生产日期、过期日期、效期预警是否触发字段",
"预警标记仅在商品启用保质期管理且到期日满足阈值条件时为 true"
],
"type": "updated"
},
{
"version": "2026.04.14-system-01",
"date": "2026-04-14",
"summary": "更新 index.searchSpace 文档",
"methods": [
"index.searchSpace"
],
"notes": [
"补充 index.searchSpace 的 params/response,按 ctx.user.store_id 作为仓库上下文;keyword 为可选字符串,对 space_code 与 custom_barcode 做 %keyword% 模糊匹配;返回字段 id、space_code、custom_barcode、custom_name,最多 50 条;仅文档同步,无代码变更。"
],
"type": "updated"
},
{
"version": "2026.04.16-system-01",
"date": "2026-04-16",
"summary": "基础模块新增快递产品类型查询接口",
"methods": [
"index.getExpressProductTypeList"
],
"notes": [
"新增 index.getExpressProductTypeList,归属基础模块(module=index),用于查询指定快递公司的产品类型列表。",
"对应服务实现:app/service/systems/express.js 中的 getExpressProductTypeList,支持传入 express_code 作为可选筛选参数(source=body)。",
"接口设置为免鉴权(isNeedAuth=false)但需登录(isNeedLogin=true),与 index.getExpressList / index.getPlatformList 一致,优先从缓存读取。"
],
"type": "added"
},
{
"version": "2026.04.17-system-01",
"date": "2026-04-17",
"summary": "新增快递管理模块(setting.express)及 5 个接口文档",
"methods": [
"setting.express.list",
"setting.express.listBase",
"setting.express.create",
"setting.express.checkCodeUnique",
"setting.express.update"
],
"notes": [
"新增独立模块组:快递管理模块(module=setting.express),将快递映射管理相关接口独立为一组以便维护。",
"接口实现参考:app/service/systems/setting/express.js(返回结构)与 app/service/systemMethods/setting/express.js(对外方法包装)。",
"接口鉴权与上下文:isNeedAuth=false, isNeedLogin=true;需在请求中传入 Authorization 以携带登录上下文(用于获取当前仓库/货主上下文)。",
"已同步更新 methods/system.json,补充 params/response/errors,保持文档与实现一致。"
],
"type": "added"
},
{
"version": "2026.04.17-system-02",
"date": "2026-04-17",
"summary": "setting.express.list 分页入参统一为 pagination",
"methods": [
"setting.express.list"
],
"notes": [
"将 setting.express.list 的分页入参文档从顶层 page/page_size/pageSize 迁移为 pagination 对象,主形态为 pagination;兼容 snake_case 的 page_size 与 camelCase 的 pageSize。",
"文档与当前实现一致:顶层 page/page_size/pageSize 会被归一化到 data.pagination 并转发到系统服务。"
],
"type": "updated"
},
{
"version": "2026.04.17-system-03",
"date": "2026-04-17",
"summary": "新增快递接口管理模块(setting.expressInterface)及 4 个接口文档",
"methods": [
"setting.expressInterface.list",
"setting.expressInterface.create",
"setting.expressInterface.update",
"setting.expressInterface.delete"
],
"notes": [
"新增独立模块组:快递接口管理模块(module=setting.expressInterface),对应实现:app/service/systems/setting/expressInterface.js 与对外包装 app/service/systemMethods/setting/expressInterface.js。",
"接口为当前仓库范围(基于 ctx.user.store_id),仓库边界由系统服务强制校验;禁止通过接口指定 warehouse_id/warehouseId。操作需登录(isNeedLogin=true),无需额外鉴权(isNeedAuth=false)。",
"已在 methods/system.json 新增对应接口的 params/response/errors 文档,保持与实现一致。"
],
"type": "added"
},
{
"version": "2026.04.18-system-01",
"date": "2026-04-18",
"summary": "补充订单储位分配接口文档:order.storageAllocation.allocateStorage",
"methods": [
"order.storageAllocation.allocateStorage"
],
"notes": [
"新增 order.storageAllocation.allocateStorage:按订单批量分配储位,支持多种入参别名(order_ids/ids/orderId 等)与仓库上下文优先级。",
"响应包含 requested_order_ids, pending_order_ids, allocated_order_ids, shortage_order_ids, skipped_orders, picking_count, stock_lock_summary, storage_lock_summary 等字段,用于前端展示分配结果与不足提示。"
],
"type": "added"
},
{
"version": "2026.04.18-system-02",
"date": "2026-04-18",
"summary": "新增 order.pendingOrder.allocateExpressCode:待处理订单模块的批量分配快递号入口,复用 express.createWaybillCodePipeline。",
"methods": [
"order.pendingOrder.allocateExpressCode"
],
"notes": [
"该接口直接接收订单对象数组入参;订单对象应为来自待处理订单列表或详情的原始订单对象。每个订单对象必须包含 order_id 与 business_key;sys_platform_code、logistics_code 为订单对象自带字段,前端无需额外拼装或单独构造,直接原样回传订单对象即可。",
"实际的运单创建、归一化与跳过逻辑由 express.createWaybillCodePipeline 处理。",
"接口返回值与现有分配链路一致,已用统一 success 包装返回。"
],
"type": "added"
},
{
"version": "2026.04.18-system-03",
"date": "2026-04-18",
"summary": "将 order.storageAllocation.allocateStorage 迁移到 order.pendingOrder.allocateStorage,并移除原有公开分组。",
"methods": [
"order.pendingOrder.allocateStorage"
],
"notes": [
"将对外入口从 order.storageAllocation.allocateStorage 迁移到 order.pendingOrder.allocateStorage,旧的 order.storageAllocation 分组已从 methods/system.json 中移除。",
"新的对外接口不接受 warehouse_id / warehouseId,仓库上下文由当前登录用户(ctx.user.store_id)提供。",
"本次变更仅同步文档位置与对外方法名,底层实现保留且通过新的 system 方法暴露。"
],
"type": "changed"
},
{
"version": "2026.04.19-system-02",
"date": "2026-04-19",
"summary": "新增待处理模块取消分配储位接口 order.pendingOrder.cancelAllocateStorage",
"methods": [
"order.pendingOrder.cancelAllocateStorage"
],
"notes": [
"新增待处理模块取消分配储位接口 `order.pendingOrder.cancelAllocateStorage`,直接对接 `service.systems.orderStorageAllocation.cancelAllocateStorage` 实现。",
"接口现在仅接受订单ID(order_ids),不再接受 allow_storage_location;禁止传入 `warehouse_id/warehouseId`,仓库上下文由当前登录用户的 `store_id` 提供。",
"响应返回标准 { flag, code, message, data } 结构,data 包含取消分配的汇总结果(warehouse_id, requested_order_ids, cancellable_order_ids, skipped_orders, orders, picking_count, storage_unlock_summary, stock_unlock_summary)。"
],
"type": "added"
},
{
"version": "2026.04.21-system-01",
"date": "2026-04-21",
"summary": "新增 order.pendingOrder.updateOrderPlatform 方法:批量修改待处理订单平台信息",
"methods": [
"order.pendingOrder.updateOrderPlatform"
],
"notes": [
"通过 code 查找 wms_platform,平台不存在时返回 404 错误。",
"仅操作当前仓库的当前订单表。",
"noNeedRight=true,noNeedAuth=true(isNeedAuth: true 在 spec 中对应权限配置 noNeedAuth=true)。"
],
"type": "added"
},
{
"version": "2026.04.21-system-02",
"date": "2026-04-21",
"summary": "新增方法 order.pendingOrder.updateOrderExpress:批量修改待处理订单的快递信息",
"methods": [
"order.pendingOrder.updateOrderExpress"
],
"notes": [
"新增 order.pendingOrder.updateOrderExpress:批量修改待处理订单的快递信息,按 express_code 从仓库快递列表(带缓存)匹配快递项。",
"自定义映射(is_system_setting=true)时,sys_logistics_code/name 写入系统快递编码和名称,logistics_code/name 写入自定义编码和名称;系统快递(is_system_setting=false)时四个字段均写系统快递的 code/name。",
"只操作当前仓库的当前订单表,不处理其他订单表;操作后写入操作日志(ORDER_UPDATE_EXPRESS)。"
],
"type": "added"
},
{
"version": "2026.04.21-system-03",
"date": "2026-04-21",
"summary": "新增 order.expectionOrder.resolveException:将待处理异常订单转回正常待处理状态",
"methods": [
"order.expectionOrder.resolveException"
],
"notes": [
"新增 order.expectionOrder.resolveException:批量将 step=3 的异常订单恢复为 step=2 正常待处理状态。",
"入参 ids 为订单ID 正整数数组,不能为空;仅操作当前仓库当前订单表。",
"返回 updated_count(实际更新行数)与 ids(本次操作ID列表)。",
"权限配置:noNeedLogin=false、noNeedRight=true、noNeedLog=false、noNeedAuth=true"
],
"type": "added"
},
{
"version": "2026.04.21-system-04",
"date": "2026-04-21",
"summary": "新增 order.pendingOrder.cloneOrder 方法:克隆待处理订单",
"methods": [
"order.pendingOrder.cloneOrder"
],
"notes": [
"支持对 step 0/1/2/3 的待处理订单进行克隆操作。",
"若原订单已分配储位(storage_status=fin),克隆前自动清除已分配库存。",
"原订单取消后(step→9, status→cancel),以原订单业务数据创建新订单,流程状态字段全部重置为初始落库状态。",
"克隆订单明细含 stock_id,新订单 ID 重新绑定。",
"noNeedAuth=true,noNeedRight=true,noNeedLogin=false。"
],
"type": "added"
},
{
"version": "2026.04.21-system-06",
"date": "2026-04-21",
"summary": "新增 order.pendingOrder.createOrder:手动创建待处理/待审核订单",
"methods": [
"order.pendingOrder.createOrder"
],
"notes": [
"新增 order.pendingOrder.createOrder:手动创建订单,step 由货主策略 need_order_approval 决定(1→待审核 step=0,0→待处理 step=1)。",
"必填字段:store_id、name、mobile/tel 至少一项、detail_address、items[](含 item_code 和 plan_qty)。",
"delivery_order_code 不传则自动生成(SYS+时间戳+随机4位);logistics_code/sys_platform_code 不传则读货主合约策略 default_express_code/default_platform_code。",
"不做库存锁定,储位分配为独立步骤。操作日志写入 ORDER_CREATE。",
"noNeedRight=true,noNeedAuth=true,noNeedLogin=false。"
],
"type": "added"
},
{
"version": "2026.04.21-system-07",
"date": "2026-04-21",
"summary": "新增 Excel 模板下载与批量导入创建订单接口:order.pendingOrder.downloadCreateTemplate 和 order.pendingOrder.importOrdersFromExcel",
"methods": [
"order.pendingOrder.downloadCreateTemplate",
"order.pendingOrder.importOrdersFromExcel"
],
"notes": [
"新增 order.pendingOrder.downloadCreateTemplate:生成 Excel 导入模板,返回 base64 编码的 xlsx 文件,表头中带 * 的列为必填项(橙色背景),可选列为灰色背景,含示例数据行和填写说明工作表。",
"新增 order.pendingOrder.importOrdersFromExcel:接受 base64 编码的 xlsx 文件,按订单号分组,每组调用 createOrder 逻辑创建订单;不中断执行,逐条记录成功/失败结果返回。",
"多行相同订单号的行组成一个完整订单,每行代表一条商品明细;订单头信息(收件人、地址等)取每组第一行。",
"step 由货主策略 need_order_approval 决定(与 createOrder 一致);通过事务保证每个订单的主记录与明细原子写入。"
],
"type": "added"
},
{
"version": "2026.05.01-system-01",
"date": "2026-05-01",
"summary": "新增基础模块 IM 登录码接口文档:index.loginToIm",
"methods": [
"index.loginToIm"
],
"notes": [
"新增 index.loginToIm 文档,入参为空对象({}),依赖当前登录用户上下文生成一次性 code。",
"响应增加 data.code 字段,长度固定 64 位(hex),默认有效期 5 分钟。",
"错误码补充:401(用户未登录)、400(用户信息不完整,缺 employees_id 或 employees_name)。",
"该接口仅做登录码签发,实际换取员工信息由 IM 侧 ssoCodeToId 完成并在成功后使 code 失效。"
],
"type": "added"
},
{
"version": "2026.05.01-system-03",
"date": "2026-05-01",
"summary": "扩展 index.loginToIm 返回字段:增加主体/主体类型/头像信息",
"methods": [
"index.loginToIm"
],
"notes": [
"登录码签发接口响应新增 employees_id、employees_name、subject、store_type、avatar 字段。",
"subject 包含 id/name;store_type 严格取自 wms_store.project 字段,不再返回 subject_type 兼容字段。",
"同一批字段会写入 code 缓存,供 IM 侧 ssoCodeToId 换取并在成功后失效。"
],
"type": "updated"
},
{
"version": "2026.05.01-system-04",
"date": "2026-05-01",
"summary": "index.loginToIm 与 ssoCodeToId 改为严格字段模式,不再做兼容回退",
"methods": [
"index.loginToIm"
],
"notes": [
"loginToIm 仅读取 ctx.user 标准字段:employees_id、employees_name、store_id、store_name、store_type、avatar。",
"不再兼容 id/real_name/username/company_name/avatar_url 等历史字段。",
"ssoCodeToId 返回值不再使用默认兜底,缺少关键字段时按 code 无效处理。"
],
"type": "updated"
},
{
"version": "2026.05.03-system-01",
"date": "2026-05-03",
"summary": "将 order.wave.fetch 调整为异步任务提交接口,删除同步返回抓取结果字段",
"methods": [
"order.wave.fetch"
],
"notes": [
"接口从同步返回抓取结果改为提交任务并异步处理。",
"移除原方法中 result_list / total_request_quantity / total_fetched_quantity 等同步返回字段。"
],
"type": "updated"
},
{
"version": "2026.05.03-system-06",
"date": "2026-05-03",
"summary": "order.wave.batchList:新增 where 支持并限制传入字段",
"methods": [
"order.wave.batchList"
],
"notes": [
"batchList 新增 where 支持及白名单过滤;禁止传入 warehouse_id/warehouseId。"
],
"type": "updated"
},
{
"version": "2026.05.03-system-08",
"date": "2026-05-03",
"summary": "order.pendingOrder.allocateStorage 改为异步提交",
"methods": [
"order.pendingOrder.allocateStorage"
],
"notes": [
"接口变更为异步提交:调用后立即返回 request_id,后端异步执行储位分配;接口不再在响应中同步返回分配明细(如 requested_order_ids、allocated_order_ids 等)。客户端可后续通过任务 ID / 查询链路或事件获取最终分配结果。"
],
"type": "updated"
},
{
"version": "2026.05.03-system-10",
"date": "2026-05-03",
"summary": "新增订单批量移出波次接口",
"methods": [
"order.wave.batchRemoveOrders"
],
"notes": [
"按订单ID批量移出波次;仅处理待处理订单表中非待审核订单(step in [1,2,3])。",
"操作在单事务内完成:清空订单的 wave_id/wave_no,并回写 wms_wave_batch 统计(重算 total_orders;当波次被清空时将 wave_status 置为 -1)。",
"仓库上下文来自当前登录用户(ctx.user.store_id)。"
],
"type": "updated"
}
]