fix(delivery): expose signed quantity and publish correct signature instant

This commit is contained in:
2026-10-03 23:09:24 +08:00
parent 0c8ede3889
commit 1f7ddf7bc9
11 changed files with 162 additions and 16 deletions
@@ -848,14 +848,14 @@ paths:
summary: 分页查询平台派送单
description: 权限 platform:overseas-warehouse:delivery:list;customerId 仅为可选平台筛选条件。同一排车按目的FBA仓显示为不同派送单,每行返回目的仓快照和服务端计算的 allowedActions,页面不得自行推导状态门禁;完成动作不再由人工触发。
security: [{ bearerAuth: [] }]
responses: { '200': { description: 派送单分页 } }
responses: { '200': { description: 派送单分页, content: { application/json: { schema: { $ref: '#/components/schemas/DeliveryOrderPageResponse' } } } } }
/api/platform/v1/last-leg/delivery-orders/{deliveryNo}:
get:
summary: 查询平台派送单详情
description: 权限 platform:overseas-warehouse:delivery:list;列表权限包含详情只读;order.allowedActions 为当前可执行动作。
security: [{ bearerAuth: [] }]
parameters: [{ name: deliveryNo, in: path, required: true, schema: { type: string } }]
responses: { '200': { description: '派送单详情,SKU与BOL打印数据只包含当前派送单目的FBA仓;fees附reviewStatus、sourceStatus、voidStatus(NOT_REQUESTED/PENDING_FINANCE/FINANCE_ATTENTION/CONFIRMED),不得把待财务确认或待处理显示为已作废。feeCoverage为可空的原费用服务覆盖确认快照,只包含当前派送所属货物、引用的原费用版本及服务、确认人和时间;不代表新增收费或原费用已付款。' }, '404': { description: 派送单不存在 } }
responses: { '200': { description: '派送单详情,SKU与BOL打印数据只包含当前派送单目的FBA仓;fees附reviewStatus、sourceStatus、voidStatus(NOT_REQUESTED/PENDING_FINANCE/FINANCE_ATTENTION/CONFIRMED),不得把待财务确认或待处理显示为已作废。feeCoverage为可空的原费用服务覆盖确认快照,只包含当前派送所属货物、引用的原费用版本及服务、确认人和时间;不代表新增收费或原费用已付款。', content: { application/json: { schema: { $ref: '#/components/schemas/DeliveryOrderDetailResponse' } } } }, '404': { description: 派送单不存在 } }
/api/platform/v1/last-leg/exception-orders:
get:
summary: 分页查询异常订单
@@ -1052,7 +1052,7 @@ paths:
- { name: deliveryMethod, in: query, schema: { type: string } }
- { name: plannedFrom, in: query, schema: { type: string, format: date-time } }
- { name: plannedTo, in: query, schema: { type: string, format: date-time } }
responses: { '200': { description: 当前客户派送单分页 }, '403': { description: 缺少客户派送查看权限 } }
responses: { '200': { description: 当前客户派送单分页, content: { application/json: { schema: { $ref: '#/components/schemas/DeliveryOrderPageResponse' } } } }, '403': { description: 缺少客户派送查看权限 } }
post:
summary: 客户从自己的排车单创建派送单
description: 权限 merchant:warehouse:delivery:create;客户范围只取认证 Token,dispatchNo 必填,不接收 customerId;同一幂等键或已转换排车重复调用返回既有单据。已关联车次时请求不得覆盖车次维护的车牌、司机和电话。
@@ -1066,7 +1066,7 @@ paths:
description: 权限 merchant:warehouse:delivery:list;列表权限包含详情只读,客户范围只取认证 Token,不接收 customerId。
security: [{ bearerAuth: [] }]
parameters: [{ name: deliveryNo, in: path, required: true, schema: { type: string } }]
responses: { '200': { description: 当前客户派送单详情 }, '403': { description: 缺少客户派送查看权限 }, '404': { description: 当前客户下派送单不存在 } }
responses: { '200': { description: 当前客户派送单详情, content: { application/json: { schema: { $ref: '#/components/schemas/DeliveryOrderDetailResponse' } } } }, '403': { description: 缺少客户派送查看权限 }, '404': { description: 当前客户下派送单不存在 } }
/api/merchant/v1/last-leg/orders:
get:
summary: 客户分页查询自己的海外尾程订单
@@ -1748,6 +1748,35 @@ paths:
responses: { '200': { description: 退货箱唛打印数据 }, '404': { description: 当前仓没有该退货箱 } }
components:
schemas:
DeliveryOrderRow:
type: object
required: [deliveryNo, packageCount, signedPackages]
properties:
deliveryNo: { type: string }
packageCount: { type: integer, minimum: 0 }
signedPackages:
type: integer
nullable: true
minimum: 0
description: 数据库冻结的实际签收箱数;字段始终返回,null 表示未知,0 与正整数保留原值,不以发货箱数替代。
signedAt: { type: string, format: date-time, nullable: true }
DeliveryOrderPageResponse:
type: object
properties:
code: { type: string }
data:
type: object
properties:
records: { type: array, items: { $ref: '#/components/schemas/DeliveryOrderRow' } }
DeliveryOrderDetailResponse:
type: object
properties:
code: { type: string }
data:
type: object
required: [order]
properties:
order: { $ref: '#/components/schemas/DeliveryOrderRow' }
ReturnOrderCreate:
type: object
required: [overseasWarehouseId, needRelabel, idempotencyKey, items]