This commit is contained in:
2026-08-14 17:37:59 +08:00
parent 87e919f3c4
commit feced8eb92
40 changed files with 1142 additions and 244 deletions
@@ -0,0 +1,72 @@
openapi: 3.0.3
info:
title: Warehouse Pallet API
version: 1.0.0
description: 托盘是可复用标识和称重主数据,不承载 AVAILABLE、RESERVED 或 OCCUPIED 动态状态。
paths:
/internal/warehouse/v1/pallets/{palletId}/snapshot:
get:
summary: 查询单条托盘主数据快照
description: 固定使用平台公共作用域 tenant_id=0,并按 warehouseId 校验归属;不返回状态或可用性。
parameters:
- $ref: '#/components/parameters/InternalToken'
- { in: path, name: palletId, required: true, schema: { type: integer, format: int64, minimum: 1 } }
- { in: query, name: warehouseId, required: true, schema: { type: integer, format: int64, minimum: 1 } }
responses:
'200':
description: 业务响应;不存在或归属不符时 body code 为 A0404
content: { application/json: { schema: { $ref: '#/components/schemas/PalletSnapshotResponse' } } }
/internal/warehouse/v1/pallets/snapshots:
get:
summary: 查询仓库全部托盘主数据快照
description: 固定使用平台公共作用域 tenant_id=0,返回该仓全部未删除主数据,不按状态或占用过滤。
parameters:
- $ref: '#/components/parameters/InternalToken'
- { in: query, name: warehouseId, required: true, schema: { type: integer, format: int64, minimum: 1 } }
responses:
'200':
description: 业务响应
content: { application/json: { schema: { $ref: '#/components/schemas/PalletSnapshotListResponse' } } }
components:
parameters:
InternalToken:
in: header
name: X-Internal-Service-Token
required: true
schema: { type: string }
schemas:
PalletSnapshot:
type: object
additionalProperties: false
required: [palletId, palletCode, palletType, capacityCbm, tareWeightKg]
properties:
palletId: { type: integer, format: int64 }
palletCode: { type: string }
palletType: { type: string }
capacityCbm: { type: number }
tareWeightKg: { type: number }
ApiEnvelope:
type: object
required: [code, message, timestamp]
properties:
code: { type: string, example: '200' }
message: { type: string }
requestId: { type: string, nullable: true }
traceId: { type: string, nullable: true }
timestamp: { type: string, format: date-time }
PalletSnapshotResponse:
allOf:
- { $ref: '#/components/schemas/ApiEnvelope' }
- type: object
required: [data]
properties:
data: { $ref: '#/components/schemas/PalletSnapshot' }
PalletSnapshotListResponse:
allOf:
- { $ref: '#/components/schemas/ApiEnvelope' }
- type: object
required: [data]
properties:
data:
type: array
items: { $ref: '#/components/schemas/PalletSnapshot' }