This commit is contained in:
2026-10-22 14:37:59 +08:00
parent de96e47d74
commit 760bf8daa1
49 changed files with 2450 additions and 117 deletions
@@ -1798,6 +1798,53 @@ paths:
required: true
schema:
type: string
/api/platform/v1/last-leg/dispatches/{dispatchNo}/appointment-allocations:
parameters:
- name: dispatchNo
in: path
required: true
schema:
type: string
get:
summary: 读取本车逐票正式预约选项及当前分配
description: 权限 platform:overseas-warehouse:dispatch:list。只读本车真实货物;已确认时段和覆盖来自正式收货预约。本车原占用不扣减本车可重分配量,其他有效车辆占用仍扣减。
security:
- bearerAuth: []
responses:
'200':
description: 统一ApiResponse;业务失败通过code返回。
content:
application/json:
schema:
type: object
properties:
code: {type: string}
message: {type: string}
data:
$ref: '#/components/schemas/DispatchAppointmentAllocations'
put:
summary: 在原排车关联或调整正式预约分配
description: 权限 platform:overseas-warehouse:dispatch:edit。主单及原批次版本必填,0合法;每个触及实物必须按客户/来源/目的仓完整分配。仅装车前零真实扫码且无有效下游单据,成功增加主版本并使两级审核失效,不新建排车、不改变货物或库存。失败原子回滚;同键同载荷恢复原结果,同键异载荷拒绝。
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DispatchAppointmentAllocationCommand'
responses:
'200':
description: 统一ApiResponse;业务失败通过code返回。
content:
application/json:
schema:
type: object
properties:
code: {type: string}
message: {type: string}
data:
$ref: '#/components/schemas/DispatchCommandResult'
/api/platform/v1/last-leg/dispatches/{dispatchNo}/route:
get:
summary: 读取实际起点与既有卸货站序
@@ -6951,6 +6998,94 @@ components:
destinationKey:
type: string
nullable: true
DispatchAppointmentAllocations:
type: object
x-java-record: DispatchWorkModels.AppointmentAllocations
required: [dispatchNo, recordVersion, items, edit]
properties:
dispatchNo: {type: string}
recordVersion:
type: string
pattern: ^[0-9]+$
items:
type: array
items:
$ref: '#/components/schemas/DispatchAppointmentItem'
edit:
$ref: '#/components/schemas/DispatchGate'
DispatchAppointmentItem:
type: object
x-java-record: DispatchWorkModels.AppointmentItem
required: [dispatchItemId, planPalletId, customerId, palletNo, sources, allocations]
properties:
dispatchItemId: {type: string}
planPalletId: {type: string}
customerId: {type: string}
customerName: {type: string, nullable: true}
palletNo: {type: string}
sources:
type: array
items:
$ref: '#/components/schemas/DispatchAppointmentSource'
allocations:
type: array
items:
$ref: '#/components/schemas/DispatchBatchAllocation'
DispatchAppointmentSource:
type: object
required: [sourceKey, destinationKey, options, blockReasons]
properties:
sourceKey: {type: string}
orderNo: {type: string, nullable: true}
inboundCode: {type: string, nullable: true}
destinationKey: {type: string}
packageCount: {type: integer, nullable: true, minimum: 1}
options:
type: array
items:
$ref: '#/components/schemas/DispatchAppointmentOption'
blockReasons:
type: array
items: {type: string}
DispatchAppointmentOption:
type: object
required: [batchKey, batchNo, recordVersion, availablePackages, appointmentAt, timezone]
properties:
batchKey: {type: string}
batchNo: {type: string}
recordVersion:
type: string
pattern: ^[0-9]+$
availablePackages: {type: integer, minimum: 1}
confirmationNo: {type: string, nullable: true}
appointmentAt:
type: string
description: 目的仓当地确认开始时间,须结合timezone解释,不按浏览器时区转换。
appointmentEndAt: {type: string, nullable: true}
timezone: {type: string}
DispatchAppointmentAllocationCommand:
type: object
x-java-record: DispatchWorkModels.AppointmentAllocationCommand
required: [recordVersion, idempotencyKey, dispatchItemIds, batchAllocations]
properties:
recordVersion:
oneOf:
- type: string
pattern: ^[0-9]+$
- type: integer
minimum: 0
idempotencyKey: {type: string}
dispatchItemIds:
type: array
minItems: 1
maxItems: 1000
uniqueItems: true
items: {type: string}
batchAllocations:
type: array
maxItems: 1000
items:
$ref: '#/components/schemas/DispatchBatchAllocation'
DispatchRoute:
type: object
x-java-record: DispatchWorkModels.Route