Files
baiyue-firstleg/lastleg-service/src/main/resources/openapi/relabel-quantities-v1.yaml
T
2026-10-20 14:22:31 +08:00

104 lines
6.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
openapi: 3.0.3
info:
title: 贴标申请数量维度
version: 1.0.0
description: 全部筛选结果汇总,不受 page/size 影响。件、箱、SKU分别统计;未知不能解释为零,禁止固定箱规换算。
paths:
/api/platform/v1/last-leg/relabel-applications/inventory-candidates:
get:
operationId: platformRelabelInventoryCandidates
description: 平台代客创建候选;权限platform:overseas-warehouse:relabel:create。客户和公共作业仓均必须显式选择,返回与客户创建端相同的InventoryCandidate结构。
parameters:
- {name: customerId, in: query, required: true, schema: {type: string}}
- {name: operationWarehouseId, in: query, required: true, schema: {type: string}}
- {name: inboundCode, in: query, schema: {type: string}}
responses:
'200':
description: 标准ApiResponse,data为正式库存候选数组;普通库存包含inventoryBalanceId/inboundOrderId/positions,退货包含returnCartonId/cartonMark/cartonSkuItems/cartonAvailablePackages。所有Long ID为十进制字符串。
/api/platform/v1/last-leg/relabel-applications/quantity-summary:
get:
operationId: platformRelabelQuantitySummary
description: 平台列表权限 platform:overseas-warehouse:relabel:list;范围遵循平台认证访问域。
parameters:
- $ref: '#/components/parameters/RelabelNo'
- $ref: '#/components/parameters/CustomerOrderNo'
- $ref: '#/components/parameters/SkuCode'
- $ref: '#/components/parameters/Status'
- $ref: '#/components/parameters/Warehouse'
- $ref: '#/components/parameters/CreatedFrom'
- $ref: '#/components/parameters/CreatedTo'
responses:
'200':
$ref: '#/components/responses/Summary'
/api/merchant/v1/last-leg/relabel-applications/quantity-summary:
get:
operationId: merchantRelabelQuantitySummary
description: 仅认证客户范围;不接受请求参数覆盖客户身份。权限 merchant:warehouse:relabel:list。
parameters:
- $ref: '#/components/parameters/RelabelNo'
- $ref: '#/components/parameters/CustomerOrderNo'
- $ref: '#/components/parameters/SkuCode'
- $ref: '#/components/parameters/Status'
- $ref: '#/components/parameters/Warehouse'
- $ref: '#/components/parameters/CreatedFrom'
- $ref: '#/components/parameters/CreatedTo'
responses:
'200':
$ref: '#/components/responses/Summary'
components:
parameters:
RelabelNo: {name: relabelNo, in: query, schema: {type: string}, description: 单号模糊匹配}
CustomerOrderNo: {name: customerOrderNo, in: query, schema: {type: string}}
SkuCode: {name: skuCode, in: query, schema: {type: string}, description: 旧SKU字段或SKU子项匹配}
Status: {name: status, in: query, schema: {type: string}, description: PENDING_PROCESSING精确匹配;COMPLETED包含READY_FOR_OUTBOUND与COMPLETED}
Warehouse: {name: overseasWarehouseId, in: query, schema: {type: string}}
CreatedFrom: {name: createdFrom, in: query, schema: {type: string, format: date-time}}
CreatedTo: {name: createdTo, in: query, schema: {type: string, format: date-time}}
responses:
Summary:
description: 标准ApiResponse;code为200时读取data
content:
application/json:
schema:
type: object
properties:
code: {type: string}
message: {type: string}
requestId: {type: string}
traceId: {type: string}
data: {$ref: '#/components/schemas/Totals'}
schemas:
Totals:
type: object
required: [orderCount, skuCount, knownLabelPieceCount, unknownPieceOrders, knownCartonCount, unknownCartonOrders, orders]
properties:
orderCount: {type: string, pattern: '^[0-9]+$'}
skuCount: {type: string, pattern: '^[0-9]+$', description: 全部筛选结果的不同旧SKU数}
knownLabelPieceCount: {type: string, pattern: '^[0-9]+$'}
unknownPieceOrders: {type: string, pattern: '^[0-9]+$'}
knownCartonCount: {type: string, pattern: '^[0-9]+$'}
unknownCartonOrders: {type: string, pattern: '^[0-9]+$'}
knownSourcePalletCount: {type: string, pattern: '^[0-9]+$', description: 已知完整原托快照按仓库和托盘码在全部筛选单据间去重}
unknownSourcePalletOrders: {type: string, pattern: '^[0-9]+$'}
knownTargetPalletCount: {type: string, pattern: '^[0-9]+$', description: 本轮完整目标快照按仓库和托盘码去重;返工旧轮目标不计}
unknownTargetPalletOrders: {type: string, pattern: '^[0-9]+$'}
orders:
type: object
description: 以换标业务单号为键,覆盖全部筛选单据
additionalProperties: {$ref: '#/components/schemas/Quantity'}
Quantity:
type: object
properties:
labelPieceCount: {type: string, pattern: '^[0-9]+$', nullable: true, description: 按件任务采用通知件数;箱任务采用SKU子项件数;重复关联或缺失为null}
cartonCount: {type: string, pattern: '^[0-9]+$', nullable: true, description: 箱级任务按箱唛去重;按件任务仅在全部精确来源快照都是BOX时按来源主键去重,PALLET/PARCEL不冒充箱数}
skuCount: {type: integer, minimum: 0}
duplicateCarton: {type: boolean, description: 历史重复任务关联提示,不将同一来源不同SKU按件任务视为重复}
quantityUnit: {type: string, enum: [PIECE, CARTON, UNKNOWN]}
sourcePalletCount: {type: string, pattern: '^[0-9]+$', nullable: true, description: 缺少不可变原托快照时为null}
targetPalletCount: {type: string, pattern: '^[0-9]+$', nullable: true, description: 每个任务本轮最后一次可信绑定的不同目标托盘数;未绑定完整为null}
sourceUnitCounts:
type: object
nullable: true
description: 首次认领时已清点且精确关联的退货来源主键按BOX/PARCEL/PALLET分类去重;任一来源缺失时为null,不按标识外形猜测
additionalProperties: {type: string, pattern: '^[0-9]+$'}