This commit is contained in:
2026-08-11 20:39:28 +08:00
parent 86488da6d0
commit b2af5739c8
15 changed files with 247 additions and 7 deletions
@@ -11,6 +11,19 @@ paths:
- {name: warehouseId, in: query, required: true, schema: {type: integer, format: int64, minimum: 1}}
responses:
'200': {description: Task with assignment, review and item-level versions}
/api/platform/v1/first-leg/pda-loading/tasks/pending:
get:
summary: List active tasks available to the authenticated PDA operator
parameters:
- {name: keyword, in: query, required: false, schema: {type: string, maxLength: 64}}
responses:
'200':
description: Unassigned tasks and tasks assigned to the current operator; no customer selector required
content:
application/json:
schema:
type: array
items: {$ref: '#/components/schemas/PendingTask'}
/api/platform/v1/first-leg/pda-loading/tasks/{taskId}/claim:
post:
summary: Atomically claim an unassigned task for the authenticated operator
@@ -85,6 +98,21 @@ components:
TaskId: {name: taskId, in: path, required: true, schema: {type: integer, format: int64, minimum: 1}}
ItemId: {name: itemId, in: path, required: true, schema: {type: integer, format: int64, minimum: 1}}
schemas:
PendingTask:
type: object
required: [taskId, loadingPlanId, containerNo, warehouseId, taskStatus, workflowStatus, version, assignmentVersion, itemCount, pendingItemCount]
properties:
taskId: {type: integer, format: int64}
loadingPlanId: {type: integer, format: int64}
containerNo: {type: string}
warehouseId: {type: integer, format: int64}
warehouseName: {type: string, nullable: true}
taskStatus: {type: string, enum: [LOADING]}
workflowStatus: {type: string, enum: [UNASSIGNED, IN_PROGRESS]}
version: {type: integer, minimum: 0}
assignmentVersion: {type: integer, minimum: 0}
itemCount: {type: integer, minimum: 1}
pendingItemCount: {type: integer, minimum: 0}
ClaimRequest:
type: object
required: [expectedAssignmentVersion, operationId]