feat: precreate dropship pallet codes after measurement

This commit is contained in:
2026-09-11 12:12:41 +08:00
parent 69076ea712
commit e61050c490
13 changed files with 108 additions and 198 deletions
@@ -1,8 +1,8 @@
openapi: 3.0.3
info:
title: 一件代发国内清点组托 API
version: 2.0.0
description: 测量、计费后独立下发。先逐箱确认 SKU 实收数量;全部箱码清点完成后才原子生成、绑定并封存正式 DP 托盘码,随后可打印托盘标签。
version: 3.0.0
description: 测量环节录入预计托数,审核通过后预生成全部 DP 托盘码并可立即打印。PDA 支持先扫箱或先扫托,逐托封托后完成入库。
paths:
/api/platform/v1/first-leg/pda-dropship/tasks/pending:
get:
@@ -35,7 +35,7 @@ paths:
/api/platform/v1/first-leg/pda-dropship/tasks/{taskId}/cartons/count:
post:
summary: 逐箱确认 SKU 实收数量
description: 清点阶段只记录箱级实收并进入 COUNTED_UNBOUND,不得提前生成或绑定托盘码。数量不一致必须 ACCEPT_VARIANCE 且填写说明。
description: 未传 palletNo 时进入待归托区;传入本任务预生成的 OPEN 托盘码时直接归托。数量不一致必须 ACCEPT_VARIANCE 且填写说明。
x-required-authority: platform:firstleg:pda:work
parameters: [{$ref: '#/components/parameters/TaskId'}]
requestBody: {required: true, content: {application/json: {schema: {$ref: '#/components/schemas/CountCartonRequest'}}}}
@@ -47,14 +47,6 @@ paths:
parameters: [{$ref: '#/components/parameters/TaskId'}]
requestBody: {required: true, content: {application/json: {schema: {$ref: '#/components/schemas/BindPendingRequest'}}}}
responses: {'200': {description: OK}}
/api/platform/v1/first-leg/pda-dropship/tasks/{taskId}/pallets/create-and-bind:
post:
summary: 完成一件代发入库并生成正式 DP 托盘码
description: 仅全部箱码已经清点的本人任务可执行;同一事务内生成 DP 托盘码、绑定全部箱、封托并把入仓单推进到待分柜。未完成清点或没有待绑箱时不发码、不建空托。operationId 重放不重复创建;返回已完成 Task。
x-required-authority: platform:firstleg:pda:work
parameters: [{$ref: '#/components/parameters/TaskId'}]
requestBody: {required: true, content: {application/json: {schema: {$ref: '#/components/schemas/CreateAndBindRequest'}}}}
responses: {'200': {description: Task}}
/api/platform/v1/first-leg/pda-dropship/tasks/{taskId}/cartons/{cartonId}/move:
post:
summary: 换托,targetPalletNo 为空时退回待绑区
@@ -66,7 +58,7 @@ paths:
responses: {'200': {description: OK}}
/api/platform/v1/first-leg/pda-dropship/tasks/{taskId}/pallets/{palletId}/seal:
post:
summary: 封托;禁止空托、待绑箱、版本冲突和重复归托
summary: 封托;禁止空托、版本冲突和重复归托
x-required-authority: platform:firstleg:pda:work
parameters:
- {$ref: '#/components/parameters/TaskId'}
@@ -75,8 +67,8 @@ paths:
responses: {'200': {description: OK}}
/api/platform/v1/first-leg/pda-dropship/tasks/{taskId}/pallets/{palletId}/print:
get:
summary: PDA 打印已封托的一件代发托盘码
description: 仅当前仓库、当前操作员可访问;未封托托盘拒绝打印。返回 100mm × 100mm PDF。
summary: PDA 打印预生成的一件代发托盘码
description: 测量审核通过并生成托盘码后即可打印,空托打印“待归托”。仅当前仓库、当前操作员可访问。返回 100mm × 100mm PDF。
x-required-authority: platform:firstleg:pda:view
parameters:
- {$ref: '#/components/parameters/TaskId'}
@@ -143,6 +135,7 @@ components:
properties:
warehouseId: {type: integer, format: int64}
boxCode: {type: string, maxLength: 80}
palletNo: {$ref: '#/components/schemas/NullablePalletNo'}
actualSkuQuantity: {type: integer, minimum: 1}
discrepancyAction: {type: string, enum: [MATCH, ACCEPT_VARIANCE]}
discrepancyRemark: {type: string, maxLength: 500, nullable: true}
@@ -169,10 +162,4 @@ components:
expectedVersion: {type: integer, minimum: 1}
operationId: {type: string, maxLength: 128}
PalletNo: {type: string, pattern: '^DP-[0-9]{6}-[0-9]{4}$'}
CreateAndBindRequest:
type: object
required: [warehouseId, operationId]
properties:
warehouseId: {type: integer, format: int64, minimum: 1}
operationId: {type: string, minLength: 1, maxLength: 128}
NullablePalletNo: {type: string, pattern: '^DP-[0-9]{6}-[0-9]{4}$', nullable: true}
@@ -1605,6 +1605,8 @@ components:
lxCode: {type: string, nullable: true, description: 一件代发线路或履约产品编码快照}
channelCode: {type: string, nullable: true}
channelName: {type: string, nullable: true}
fulfillmentType: {type: string, nullable: true, enum: [STANDARD, ONE_CLICK_DROPSHIP]}
expectedPalletCount: {type: integer, minimum: 1, maximum: 1000, nullable: true, description: 一件代发预计托数;测量审核通过后按此数量预生成 DP 托盘码}
taxMode: {type: string, nullable: true}
pricingTaxMode: {type: string, nullable: true}
containerMode: {type: string, nullable: true}
@@ -2000,6 +2002,7 @@ components:
measurementId: {type: string, pattern: '^[1-9][0-9]*$', nullable: true}
version: {type: integer, minimum: 0}
actualGoodsName: {type: string, maxLength: 255, nullable: true}
expectedPalletCount: {type: integer, minimum: 1, maximum: 1000, nullable: true, description: 一件代发必填;普通入库可不传}
items:
type: array
minItems: 1