fix(lastleg): complete relabel document contract and regression gates

This commit is contained in:
2026-09-09 12:54:14 +08:00
parent ac3ce3703e
commit 655237e37f
19 changed files with 474 additions and 23 deletions
@@ -346,7 +346,7 @@ paths:
application/json:
schema: { $ref: '#/components/schemas/ChangeReceivingWarehouseRequest' }
responses:
'200': { description: 更新后的柜级摘要, content: { application/json: { schema: { type: object, properties: { code: { type: string, enum: ['200'] }, data: { $ref: '#/components/schemas/ContainerPlanProgressSummary' } } } } }
'200': { description: 更新后的柜级摘要, content: { application/json: { schema: { type: object, properties: { code: { type: string, enum: ['200'] }, data: { $ref: '#/components/schemas/ContainerPlanProgressSummary' } } } } } }
'400': { description: 请求无效或目标不是有效 OVERSEAS 仓 }
'409': { description: 版本冲突、幂等键冲突或PDA接柜会话已建立 }
/api/platform/v1/last-leg/orders/{id}/destination:
@@ -624,7 +624,7 @@ paths:
description: 权限 platform:overseas-warehouse:outbound:list;只按全局唯一 outboundNo 定位并从记录解析客户范围,不接收 customerId。
security: [{ bearerAuth: [] }]
parameters: [{ name: outboundNo, in: path, required: true, schema: { type: string } }]
responses: { '200': { description: 出库单、出库托盘及关联派送单详情;pallets[].palletNo 为 Warehouse 权威实物托盘码 }, '404': { description: 出库单不存在 } }
responses: { '200': { description: "出库单、出库托盘及关联派送单详情;pallets[].palletNo 为 Warehouse 权威实物托盘码" }, '404': { description: 出库单不存在 } }
/api/platform/v1/last-leg/outbound-orders/{outboundNo}/cancel:
post:
summary: 取消未执行出库单
@@ -1172,6 +1172,38 @@ paths:
- { name: relabelNo, in: path, required: true, schema: { type: string, maxLength: 64 } }
requestBody: { required: true, content: { application/json: { schema: { $ref: '#/components/schemas/RelabelStatusChange' } } } }
responses: { '200': { description: 统一 ApiResponse 包装的换标单详情 }, '409': { description: 非法状态迁移或关联尾程单缺失 } }
/api/platform/v1/last-leg/relabel-applications/{relabelNo}/files:
post:
summary: 上传总换标PDF或明细换标PDF
description: 权限 platform:overseas-warehouse:relabel-order:create。仅PENDING_PROCESSING/PROCESSING可替换,PDF内容且不超过10MiB。客户从申请单解析,ITEM必须属于该申请单同客户。File类别分别为OVERSEAS_RELABEL_TOTAL_DOCUMENT(application.id)及OVERSEAS_RELABEL_ITEM_DOCUMENT(item.id)。成功保存File返回的资料元数据,旧资料不再允许通过当前绑定下载。
security: [{ bearerAuth: [] }]
parameters:
- { name: relabelNo, in: path, required: true, schema: { type: string } }
- { name: scope, in: query, required: true, schema: { type: string, enum: [TOTAL, ITEM] } }
- { name: itemId, in: query, description: ITEM必填,TOTAL不得传入, schema: { type: integer, format: int64, minimum: 1 } }
requestBody:
required: true
content:
multipart/form-data:
schema: { type: object, required: [file], properties: { file: { type: string, format: binary } } }
responses:
'200': { description: 换标详情;application包含totalFileId/totalFileName/totalFileUrl,items包含relabelFileId/relabelFileName/relabelFileUrl。URL为受权下载路径,文件ID按字符串返回 }
'400': { description: 非PDF、超限或资料范围无效 }
'404': { description: 申请或明细不属于当前客户 }
'409': { description: 换标状态不允许修改资料 }
/api/platform/v1/last-leg/relabel-applications/{relabelNo}/files/{fileId}/download:
get:
summary: 读取当前绑定的换标PDF
description: 权限 platform:overseas-warehouse:relabel-order:list;按申请单客户、资料类别、application.id或item.id及fileId精确授权。仅当前已保存资料可读,未绑定或替换的文件拒绝。响应Cache-Control为no-store。
security: [{ bearerAuth: [] }]
parameters:
- { name: relabelNo, in: path, required: true, schema: { type: string } }
- { name: fileId, in: path, required: true, schema: { type: integer, format: int64, minimum: 1 } }
- { name: scope, in: query, required: true, schema: { type: string, enum: [TOTAL, ITEM] } }
- { name: itemId, in: query, schema: { type: integer, format: int64, minimum: 1 } }
responses:
'200': { description: PDF字节, content: { application/pdf: { schema: { type: string, format: binary } } } }
'404': { description: 资料未绑定或归属不匹配 }
/api/merchant/v1/last-leg/return-orders:
get:
summary: 客户分页查询退货签收订单
@@ -1336,10 +1368,10 @@ components:
properties:
skuCode: { type: string, maxLength: 128 }
quantity: { type: integer, minimum: 1 }
length: { type: number, exclusiveMinimum: 0, description: '箱长,CM' }
width: { type: number, exclusiveMinimum: 0, description: '箱宽,CM' }
height: { type: number, exclusiveMinimum: 0, description: '箱高,CM' }
weight: { type: number, exclusiveMinimum: 0, description: '箱重,KG' }
length: { type: number, minimum: 0, exclusiveMinimum: true, description: '箱长,CM' }
width: { type: number, minimum: 0, exclusiveMinimum: true, description: '箱宽,CM' }
height: { type: number, minimum: 0, exclusiveMinimum: true, description: '箱高,CM' }
weight: { type: number, minimum: 0, exclusiveMinimum: true, description: '箱重,KG' }
idempotencyKey: { type: string, minLength: 1, maxLength: 255 }
InventoryBalance:
type: object