feat(firstleg): add atomic PDA batch picking endpoint
This commit is contained in:
@@ -44,6 +44,17 @@ paths:
|
||||
summary: Resolve an untouched assigned item as skipped
|
||||
parameters: [{$ref: '#/components/parameters/TaskId'}, {$ref: '#/components/parameters/ItemId'}]
|
||||
responses: {'200': {description: Task awaiting review when every item is resolved}}
|
||||
/api/platform/v1/first-leg/pda-loading/tasks/{taskId}/batch:
|
||||
post:
|
||||
summary: Atomically submit the complete online PDA draft once
|
||||
parameters:
|
||||
- {$ref: '#/components/parameters/TaskId'}
|
||||
- {name: Idempotency-Key, in: header, required: true, schema: {type: string, maxLength: 128}}
|
||||
requestBody:
|
||||
required: true
|
||||
content: {application/json: {schema: {$ref: '#/components/schemas/BatchRequest'}}}
|
||||
responses:
|
||||
'200': {description: Completed task, identical replay result, or A0409 when any snapshot changed}
|
||||
/api/platform/v1/first-leg/pda-loading/tasks/{taskId}/review:
|
||||
post:
|
||||
summary: Review all resolved items, settle partial and skipped quantities, then complete the plan
|
||||
@@ -78,6 +89,32 @@ components:
|
||||
assigneeName: {type: string, maxLength: 64}
|
||||
expectedAssignmentVersion: {type: integer, minimum: 0}
|
||||
operationId: {type: string, maxLength: 128}
|
||||
BatchRequest:
|
||||
type: object
|
||||
required: [warehouseId, containerNo, expectedVersion, items]
|
||||
properties:
|
||||
warehouseId: {type: integer, format: int64, minimum: 1}
|
||||
containerNo: {type: string, maxLength: 64}
|
||||
expectedVersion: {type: integer, minimum: 0}
|
||||
items:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 500
|
||||
items: {$ref: '#/components/schemas/BatchItemRequest'}
|
||||
BatchItemRequest:
|
||||
type: object
|
||||
required: [itemId, action, version]
|
||||
properties:
|
||||
itemId: {type: integer, format: int64, minimum: 1}
|
||||
action: {type: string, enum: [PICK, PARTIAL, SKIP]}
|
||||
pickedPackageCount: {type: integer, minimum: 1, description: Incremental count required by PICK}
|
||||
finalPickedPackageCount: {type: integer, minimum: 1, description: Final actual count required by PARTIAL}
|
||||
releaseMode: {type: string, enum: [AUTO, MANUAL]}
|
||||
reservationIds:
|
||||
type: array
|
||||
items: {type: integer, format: int64, minimum: 1}
|
||||
version: {type: integer, minimum: 0}
|
||||
reason: {type: string, maxLength: 500, description: Required by SKIP}
|
||||
ReviewRequest:
|
||||
type: object
|
||||
required: [expectedTaskVersion, operationId]
|
||||
|
||||
Reference in New Issue
Block a user