399 lines
10 KiB
YAML
399 lines
10 KiB
YAML
openapi: 3.0.3
|
||
info:
|
||
title: 海外采购详情与附件 API
|
||
version: 1.0.0
|
||
description: 七状态采购仅使用主单、审核流水、采购附件及三个批次表;作业接口见 procurement-workflow-v1.yaml。旧购买、预算核验、装箱、面单、两段运输及专属费用接口已退役。
|
||
security:
|
||
- bearerAuth: []
|
||
paths:
|
||
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/files/{category}:
|
||
post:
|
||
summary: 上传采购内部附件
|
||
description: 按类别独立授权:PURCHASE=buy;BUDGET=review;LABEL=label;EXCEPTION=manage;RECEIPT=receive-overseas或receive-domestic;VOUCHER=charge或finance-adjust。新增四类只允许PDF/JPG/PNG,最大10MiB。
|
||
parameters:
|
||
- name: orderNo
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
minLength: 1
|
||
maxLength: 64
|
||
- name: customerId
|
||
in: query
|
||
required: true
|
||
schema:
|
||
type: string
|
||
pattern: ^[1-9][0-9]*$
|
||
- name: category
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
enum:
|
||
- RECEIPT
|
||
- VOUCHER
|
||
- LABEL
|
||
- PURCHASE
|
||
- BUDGET
|
||
- EXCEPTION
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
multipart/form-data:
|
||
schema:
|
||
type: object
|
||
required:
|
||
- file
|
||
properties:
|
||
file:
|
||
type: string
|
||
format: binary
|
||
responses:
|
||
"200":
|
||
description: 本单附件元数据业务响应
|
||
"403":
|
||
description: 主体或类别权限不足
|
||
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/files/{fileId}/content:
|
||
get:
|
||
summary: 读取本采购单内部文件
|
||
description: 权限 platform:overseas-business:purchase:list;校验客户、订单、分类与文件归属。附件下载,Cache-Control no-store。客户入口不开放这些内部文件。
|
||
parameters:
|
||
- name: orderNo
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
minLength: 1
|
||
maxLength: 64
|
||
- name: customerId
|
||
in: query
|
||
required: true
|
||
schema:
|
||
type: string
|
||
pattern: ^[1-9][0-9]*$
|
||
- name: fileId
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
pattern: ^[1-9][0-9]*$
|
||
responses:
|
||
"200":
|
||
description: 文件内容
|
||
content:
|
||
application/octet-stream:
|
||
schema:
|
||
type: string
|
||
format: binary
|
||
"400":
|
||
description: 文件不属于本单
|
||
"403":
|
||
description: 无平台采购只读权限
|
||
components:
|
||
securitySchemes:
|
||
bearerAuth:
|
||
type: http
|
||
scheme: bearer
|
||
bearerFormat: JWT
|
||
schemas:
|
||
ProcurementCustomerResponse:
|
||
type: object
|
||
required:
|
||
- code
|
||
- message
|
||
- data
|
||
properties:
|
||
code:
|
||
type: string
|
||
message:
|
||
type: string
|
||
data:
|
||
$ref: "#/components/schemas/ProcurementCustomerView"
|
||
ProcurementCustomerView:
|
||
type: object
|
||
required:
|
||
- order
|
||
- budget
|
||
- purchased
|
||
- purchaseConfirmed
|
||
- purchaseNeedsAttention
|
||
- progress
|
||
- boxes
|
||
- shipments
|
||
- fees
|
||
- exceptionSummaries
|
||
properties:
|
||
order:
|
||
$ref: "#/components/schemas/ProcurementHeader"
|
||
budget:
|
||
$ref: "#/components/schemas/ProcurementBudget"
|
||
purchased:
|
||
type: boolean
|
||
purchaseConfirmed:
|
||
type: boolean
|
||
purchaseNeedsAttention:
|
||
type: boolean
|
||
progress:
|
||
type: array
|
||
maxItems: 0
|
||
items:
|
||
type: object
|
||
boxes:
|
||
type: array
|
||
maxItems: 0
|
||
items:
|
||
type: object
|
||
shipments:
|
||
type: array
|
||
maxItems: 0
|
||
items:
|
||
type: object
|
||
fees:
|
||
type: array
|
||
items:
|
||
$ref: "#/components/schemas/CustomerFee"
|
||
exceptionSummaries:
|
||
type: array
|
||
items:
|
||
type: string
|
||
additionalProperties: false
|
||
description: 客户专属投影;费用来自共用海外费用链,旧进度、装箱、两段运输和异常区块为空。实收和出库批次通过 workflow 读取。
|
||
ProcurementHeader:
|
||
type: object
|
||
required:
|
||
- id
|
||
- orderNo
|
||
- productName
|
||
- purchaseQuantity
|
||
- status
|
||
- version
|
||
properties:
|
||
procurementDirection:
|
||
$ref: overseas-business-v1.yaml#/components/schemas/ProcurementDirection
|
||
orderNo:
|
||
type: string
|
||
nullable: true
|
||
customerId:
|
||
type: string
|
||
nullable: true
|
||
customerName:
|
||
type: string
|
||
nullable: true
|
||
purchaseCategory:
|
||
type: string
|
||
nullable: true
|
||
productName:
|
||
type: string
|
||
nullable: true
|
||
productSpecification:
|
||
type: string
|
||
nullable: true
|
||
productUrl:
|
||
type: string
|
||
nullable: true
|
||
currency:
|
||
type: string
|
||
nullable: true
|
||
receivingAddress:
|
||
type: string
|
||
nullable: true
|
||
contactName:
|
||
type: string
|
||
nullable: true
|
||
contactPhone:
|
||
type: string
|
||
nullable: true
|
||
plannedWarehouseName:
|
||
type: string
|
||
nullable: true
|
||
actualWarehouseCode:
|
||
type: string
|
||
nullable: true
|
||
actualWarehouseName:
|
||
type: string
|
||
nullable: true
|
||
status:
|
||
type: string
|
||
nullable: true
|
||
id:
|
||
type: string
|
||
pattern: ^[1-9][0-9]*$
|
||
purchaseQuantity:
|
||
type: integer
|
||
format: int64
|
||
budgetUnitPrice:
|
||
type: number
|
||
nullable: true
|
||
version:
|
||
type: integer
|
||
format: int64
|
||
minimum: 0
|
||
estimatedArrivalAt:
|
||
type: string
|
||
format: date-time
|
||
nullable: true
|
||
createdAt:
|
||
type: string
|
||
format: date-time
|
||
nullable: true
|
||
updatedAt:
|
||
type: string
|
||
format: date-time
|
||
nullable: true
|
||
ProcurementBudget:
|
||
type: object
|
||
required:
|
||
- totalAmount
|
||
- currency
|
||
- authorizedAt
|
||
properties:
|
||
totalAmount:
|
||
type: number
|
||
nullable: true
|
||
currency:
|
||
type: string
|
||
authorizedAt:
|
||
type: string
|
||
format: date-time
|
||
nullable: true
|
||
CustomerFee:
|
||
type: object
|
||
required:
|
||
- feeNo
|
||
- purpose
|
||
- name
|
||
- determination
|
||
- currency
|
||
- originalCurrency
|
||
- exchangeRateMonth
|
||
- parentFeeNo
|
||
- walletStatus
|
||
- version
|
||
- active
|
||
- amount
|
||
- originalAmount
|
||
- exchangeRate
|
||
- businessDate
|
||
- sourceLinked
|
||
properties:
|
||
feeNo:
|
||
type: string
|
||
nullable: true
|
||
purpose:
|
||
type: string
|
||
nullable: true
|
||
name:
|
||
type: string
|
||
nullable: true
|
||
determination:
|
||
type: string
|
||
nullable: true
|
||
currency:
|
||
type: string
|
||
nullable: true
|
||
originalCurrency:
|
||
type: string
|
||
nullable: true
|
||
exchangeRateMonth:
|
||
type: string
|
||
nullable: true
|
||
parentFeeNo:
|
||
type: string
|
||
nullable: true
|
||
walletStatus:
|
||
type: string
|
||
nullable: true
|
||
version:
|
||
type: integer
|
||
nullable: true
|
||
active:
|
||
type: boolean
|
||
amount:
|
||
type: number
|
||
originalAmount:
|
||
type: number
|
||
nullable: true
|
||
exchangeRate:
|
||
type: number
|
||
nullable: true
|
||
businessDate:
|
||
type: string
|
||
format: date
|
||
nullable: true
|
||
sourceLinked:
|
||
type: boolean
|
||
additionalProperties: false
|
||
description: 客户费用白名单:不含凭证、备注、资金命令/冻结/流水引用和原始诊断
|
||
ProcurementPlatformResponse:
|
||
type: object
|
||
required:
|
||
- code
|
||
- message
|
||
- data
|
||
properties:
|
||
code:
|
||
type: string
|
||
message:
|
||
type: string
|
||
data:
|
||
$ref: "#/components/schemas/ProcurementPlatformView"
|
||
ProcurementPlatformView:
|
||
type: object
|
||
required:
|
||
- customerView
|
||
- purchaseFacts
|
||
- physical
|
||
- transport
|
||
- fees
|
||
- feeCorrections
|
||
- controls
|
||
- files
|
||
- reviewHistory
|
||
- operations
|
||
- actions
|
||
- internalRemark
|
||
properties:
|
||
customerView:
|
||
$ref: "#/components/schemas/ProcurementCustomerView"
|
||
purchaseFacts:
|
||
type: object
|
||
maxProperties: 0
|
||
physical:
|
||
type: object
|
||
properties:
|
||
dispositions: &a1
|
||
type: array
|
||
maxItems: 0
|
||
items:
|
||
type: object
|
||
receipts: *a1
|
||
cartons: *a1
|
||
transport:
|
||
type: object
|
||
properties:
|
||
overseasCargo: *a1
|
||
domesticCargo: *a1
|
||
shipments: *a1
|
||
fees: *a1
|
||
feeCorrections: *a1
|
||
controls:
|
||
type: object
|
||
properties:
|
||
notes: *a1
|
||
remaining: *a1
|
||
closures: *a1
|
||
closureItems: *a1
|
||
files:
|
||
type: array
|
||
items:
|
||
type: object
|
||
reviewHistory:
|
||
type: array
|
||
items:
|
||
type: object
|
||
operations: *a1
|
||
actions: *a1
|
||
internalRemark:
|
||
type: string
|
||
nullable: true
|