feat(appointments): support scoped receiving and stable trip continuation

This commit is contained in:
2026-10-16 15:43:04 +08:00
parent 4e2ea89403
commit 30f48bd926
84 changed files with 4879 additions and 136 deletions
@@ -7,6 +7,43 @@ security:
-
bearerAuth: []
paths:
/api/platform/v1/last-leg/appointment-work/items/resolve:
get:
operationId: appointmentWorkResolveBatch
summary: 按当前权威批次精确进入送仓事项
description: "要求platform:appointment:list及原来源读取资格。batchKey使用原业务返回的完整稳定键;customerId来自所选客户货源。精确匹配返回detail,未传客户且存在多个客户时detail为空并返回candidates,必须选择后重新解析;不得选首项或回退已替代旧批次。需求关系未同步返回409,未生成返回404。"
parameters:
- name: batchKey
in: query
required: true
schema:
type: string
pattern: '^(FBA_APPOINTMENT|DISPATCH):[1-9][0-9]*$'
- name: customerId
in: query
required: false
schema: {type: string, minLength: 1}
responses:
200:
description: data为客户送仓精确解析结果或可见客户候选
content:
application/json:
schema:
type: object
required: [code, data]
properties:
code: {type: string}
message: {type: string, nullable: true}
data:
$ref: '#/components/schemas/BatchWorkResolution'
400:
description: 批次键无效
403:
description: 缺少平台或原来源读取资格
404:
description: 当前批次未生成活动送仓事项
409:
description: 需求关系尚未同步或存在不唯一的事项关系
/api/platform/v1/last-leg/appointment-work/calendar:
get:
operationId: "appointmentWorkCalendar"
@@ -874,12 +911,14 @@ components:
nextAction:
"$ref": "#/components/schemas/Action"
nullable: true
description: "按当前权限和白名单目标引导;已确认送仓预约可指向本批车辆安排或本车复核,不代表授权发车。取消预约沿原批次重新预约,不恢复旧确认。"
blockReasons:
type: "array"
items:
type: "string"
missingFields:
type: "array"
description: "未完成事项分别提示负责人、下次跟进日期和作业日期等缺口;跟进日期不能作为作业日历日期。"
items:
type: "string"
Review:
@@ -954,6 +993,25 @@ components:
type: "string"
summary:
type: "string"
BatchWorkResolution:
type: object
required: [batchKey, candidates]
properties:
batchKey: {type: string}
customerId: {type: string, nullable: true}
detail:
nullable: true
allOf:
- $ref: '#/components/schemas/WorkDetail'
candidates:
type: array
items:
type: object
required: [customerId, workItemKey]
properties:
customerId: {type: string}
workItemKey: {type: string}
batchNo: {type: string, nullable: true}
WorkDetail:
type: "object"
additionalProperties: false
@@ -1237,6 +1295,7 @@ components:
maxLength: 1000
RESOLVE_REVIEWRequest:
type: "object"
description: "须匹配当前影响版本,并核对本事项及关联安排的最新权威影响;需求关系未同步或出现新影响时拒绝清除。车次货物成员变化仅要求相关客户及车辆核对,未变化客户预约不连带复核;车辆、司机、时间变化影响当前关联预约。复核不恢复取消的确认、不修改原预约和车辆,也不制造新的业务影响。"
additionalProperties: false
required:
- "command"