fix(lastleg): restore dispatch returns from immutable pick source and expose customer receipts
This commit is contained in:
@@ -3,13 +3,42 @@ info:
|
||||
title: 派送单三类资料
|
||||
version: 1.0.0
|
||||
description: |
|
||||
所有入口只允许平台,customerId 必须为真实派送所属客户;不得按 BOL 文本查找或复用其他客户/派送单文件。
|
||||
平台资料入口的customerId必须为真实派送所属客户;客户只读入口范围只取Token,只公开当前派送单已保存的RECEIPT签收文件,不提供上传、修改、历史版本、BOL或装车照片下载。
|
||||
GET /delivery-orders 及 GET /delivery-orders/{deliveryNo} 的 order 行新增 bolNo 和 documentSummary,version/allowedActions 保持原契约。
|
||||
RECEIPT 签收文件只有在 PUT 保存进入权威资料快照后才自动完成当前派送单;仅上传未保存不会完成。allowedActions 不再返回人工 COMPLETE_DELIVERY。
|
||||
START_DELIVERY=DELIVERING(派送中);COMPLETE_DELIVERY=DELIVERED(完成并记录签收时间、生成待回访)。同状态重放不重复副作用。
|
||||
资料不设必传门禁,不以三类齐全作为派送完成条件。业务失败使用统一 ApiResponse(A0422参数、A0409冲突),通常HTTP200。
|
||||
security: [{ bearerAuth: [] }]
|
||||
paths:
|
||||
/api/merchant/v1/last-leg/delivery-orders/{deliveryNo}/documents/receipt:
|
||||
parameters:
|
||||
- { $ref: '#/components/parameters/DeliveryNo' }
|
||||
get:
|
||||
summary: 查询本企业派送单签收资料
|
||||
description: 权限merchant:warehouse:delivery:list。仅当前已绑定RECEIPT文件,尚无资料返回files空数组;其他客户派送单统一不存在,不接受customerId或历史版本。
|
||||
responses:
|
||||
'200':
|
||||
description: 本企业签收资料或统一业务错误
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- { $ref: '#/components/schemas/Envelope' }
|
||||
- type: object
|
||||
properties: { data: { $ref: '#/components/schemas/MerchantReceipts' } }
|
||||
/api/merchant/v1/last-leg/delivery-orders/{deliveryNo}/documents/receipt/files/{fileId}/download:
|
||||
parameters:
|
||||
- { $ref: '#/components/parameters/DeliveryNo' }
|
||||
- { in: path, name: fileId, required: true, schema: { type: string, pattern: '^[1-9][0-9]*$' } }
|
||||
get:
|
||||
summary: 下载本企业派送单当前签收文件
|
||||
description: 权限merchant:warehouse:delivery:list。服务端校验客户、派送单、当前RECEIPT绑定及File对象归属;其他客户、其他派送单、非签收类别、仅上传未保存或已解绑文件返回不存在。文件经服务端代理,附件下载、no-store、nosniff;不返回对象存储地址。
|
||||
responses:
|
||||
'200':
|
||||
description: 原始文件字节;业务失败为统一JSON错误
|
||||
content:
|
||||
application/octet-stream: { schema: { type: string, format: binary } }
|
||||
application/json: { schema: { $ref: '#/components/schemas/Envelope' } }
|
||||
/api/platform/v1/last-leg/delivery-orders/{deliveryNo}/documents:
|
||||
parameters:
|
||||
- { $ref: '#/components/parameters/DeliveryNo' }
|
||||
@@ -103,6 +132,12 @@ components:
|
||||
CustomerId: { in: query, name: customerId, required: true, schema: { type: string, pattern: '^[1-9][0-9]*$' } }
|
||||
Category: { in: path, name: category, required: true, schema: { $ref: '#/components/schemas/CategoryCode' } }
|
||||
schemas:
|
||||
MerchantReceipts:
|
||||
type: object
|
||||
required: [deliveryNo, files]
|
||||
properties:
|
||||
deliveryNo: { type: string }
|
||||
files: { type: array, maxItems: 20, items: { $ref: '#/components/schemas/File' } }
|
||||
CategoryCode:
|
||||
type: string
|
||||
enum: [LOADING_PHOTO, BOL, RECEIPT]
|
||||
|
||||
Reference in New Issue
Block a user