fix(lastleg): expose dispatch reviews and filter available capacity offers

This commit is contained in:
2026-10-08 14:11:55 +08:00
parent 1cb1f2d0c0
commit 136a2bc3b5
14 changed files with 194 additions and 18 deletions
@@ -92,6 +92,10 @@ paths:
- OPEN
- PAUSED
- CLOSED
- name: scope
in: query
description: 默认AVAILABLE,仅开放且车次仍PLANNED、当前服务端时间早于交货截止且截止不晚于计划发车;数据库分页前筛选,不以容量已知或有余位为条件。ALL包含草稿和历史,仅管理权限可用;车次发布设置读取已有发布须显式传ALL。
schema: { type: string, enum: [AVAILABLE, ALL], default: AVAILABLE }
- name: canConfirm
in: query
required: false
@@ -586,6 +586,10 @@ paths:
- { name: vehiclePlate, in: query, schema: { type: string } }
- { name: status, in: query, schema: { type: string } }
- { name: fbaAppointmentNo, in: query, schema: { type: string } }
- name: stage
in: query
description: 服务端在分页前筛选;BEFORE_LOADING=待发车未拣货,LOADING=拣货中或拣货完成待发车,AFTER_LOADING=已发车(含部分),CANCELLED=已取消;与status取交集。
schema: { type: string, enum: [BEFORE_LOADING, LOADING, AFTER_LOADING, CANCELLED] }
responses:
'200': { description: 统一 ApiResponse 包装的排车单分页,records 元素为 DispatchResponse }
/api/platform/v1/last-leg/dispatches/{dispatchNo}:
@@ -2947,10 +2951,28 @@ components:
partialCompletionReason: { type: string, nullable: true }
createdAt: { type: string, format: date-time }
items: { type: array, items: { $ref: '#/components/schemas/DispatchItem' } }
workflow:
nullable: true
description: 仅平台分页返回当前关联车次及两级审核;未关联为null。批量读取已有审核快照,不由执行状态推导;列表权限可读,审核操作仍需车次独立审核权限。
allOf: [{ $ref: '#/components/schemas/DispatchWorkflow' }]
bolLines:
type: array
description: 仅详情接口返回的BOL打印聚合行;分页接口返回空数组,避免列表查询放大
items: { $ref: '#/components/schemas/DispatchBolLine' }
DispatchWorkflow:
type: object
required: [tripNo, dispatchReview, loadingReview]
properties:
tripNo: { type: string }
dispatchReview: { $ref: '#/components/schemas/DispatchReview' }
loadingReview: { $ref: '#/components/schemas/DispatchReview' }
DispatchReview:
type: object
required: [status]
properties:
status: { type: string, enum: [PENDING, APPROVED, REJECTED] }
reason: { type: string, nullable: true }
reviewedAt: { type: string, format: date-time, nullable: true }
DispatchItem:
type: object
properties: