fix(firstleg): resolve loading list lifecycle by plan
This commit is contained in:
@@ -31,6 +31,20 @@ paths:
|
||||
parameters: [{$ref: '#/components/parameters/PlanId'}, {$ref: '#/components/parameters/WarehouseId'}]
|
||||
responses:
|
||||
'200': {$ref: '#/components/responses/PreloadDetailResponse'}
|
||||
'409': {description: 计划已离开预装阶段;先查询 lifecycle 获取当前正式详情资源}
|
||||
/api/platform/v1/first-leg/loading-plans/{planId}/lifecycle:
|
||||
get:
|
||||
summary: 解析装柜计划当前详情阶段
|
||||
description: >-
|
||||
需要 platform:firstleg:preload:list 权限。同一 planId 从 EDITING、LOADING 到 COMPLETED 永久稳定;
|
||||
EDITING/LOADING 返回 PRELOAD,COMPLETED 返回 LOADING_LIST 及其独立读取权限。
|
||||
页面据此选择预装详情或正式装柜清单详情,不得以错误文案或 A0404 猜测阶段。
|
||||
x-permission: platform:firstleg:preload:list
|
||||
parameters: [{$ref: '#/components/parameters/PlanId'}, {$ref: '#/components/parameters/WarehouseId'}]
|
||||
responses:
|
||||
'200': {$ref: '#/components/responses/LifecycleResolutionResponse'}
|
||||
'403': {description: planId 不属于请求仓库或缺少平台读取权限}
|
||||
'404': {description: planId 真实不存在}
|
||||
/api/platform/v1/first-leg/loading-plans/{planId}/transport:
|
||||
patch:
|
||||
summary: 修改预装运输信息
|
||||
@@ -83,6 +97,7 @@ paths:
|
||||
parameters: [{$ref: '#/components/parameters/PlanId'}, {$ref: '#/components/parameters/WarehouseId'}]
|
||||
responses:
|
||||
'200': {$ref: '#/components/responses/ConfirmedDetailResponse'}
|
||||
'409': {description: 计划尚未进入 COMPLETED 正式装柜清单阶段}
|
||||
components:
|
||||
parameters:
|
||||
PlanId:
|
||||
@@ -156,6 +171,9 @@ components:
|
||||
ConfirmedDetailResponse:
|
||||
description: 装柜清单详情查询或确认成功,也可能返回业务失败
|
||||
content: {application/json: {schema: {$ref: '#/components/schemas/ConfirmedDetailEnvelope'}}}
|
||||
LifecycleResolutionResponse:
|
||||
description: 装柜计划生命周期解析成功或业务失败
|
||||
content: {application/json: {schema: {$ref: '#/components/schemas/LifecycleResolutionEnvelope'}}}
|
||||
schemas:
|
||||
LongId:
|
||||
type: string
|
||||
@@ -214,6 +232,14 @@ components:
|
||||
data:
|
||||
allOf: [{$ref: '#/components/schemas/ConfirmedDetail'}]
|
||||
nullable: true
|
||||
LifecycleResolutionEnvelope:
|
||||
allOf:
|
||||
- {$ref: '#/components/schemas/ApiEnvelope'}
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
allOf: [{$ref: '#/components/schemas/LifecycleResolution'}]
|
||||
nullable: true
|
||||
PreloadPage:
|
||||
type: object
|
||||
required: [records, page, size, total, pages]
|
||||
@@ -238,6 +264,18 @@ components:
|
||||
properties:
|
||||
accountId: {$ref: '#/components/schemas/LongId'}
|
||||
customerName: {type: string, nullable: true, description: 客户名称}
|
||||
LifecycleResolution:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
required: [planId, containerBookingId, warehouseId, planNo, planStatus, detailResource, requiredPermission]
|
||||
properties:
|
||||
planId: {$ref: '#/components/schemas/LongId'}
|
||||
containerBookingId: {$ref: '#/components/schemas/LongId'}
|
||||
warehouseId: {$ref: '#/components/schemas/LongId'}
|
||||
planNo: {type: string, description: 预装与正式装柜清单沿用的稳定业务号}
|
||||
planStatus: {type: string, enum: [EDITING, LOADING, COMPLETED]}
|
||||
detailResource: {type: string, enum: [PRELOAD, LOADING_LIST], description: 当前应读取的唯一详情资源}
|
||||
requiredPermission: {type: string, enum: ['platform:firstleg:preload:list', 'platform:firstleg:loading-list:list']}
|
||||
PreloadSummary:
|
||||
type: object
|
||||
required: [planId, containerBookingId, preloadNo, customers, status, skuCount, totalPackageCount, totalVolumeCbm, totalGrossWeightKg, createdAt, version, readiness]
|
||||
|
||||
Reference in New Issue
Block a user