55 lines
3.4 KiB
YAML
55 lines
3.4 KiB
YAML
openapi: 3.0.3
|
||
info:
|
||
title: Lastleg download-center export provider
|
||
version: 1.0.0
|
||
description: |
|
||
Admin 导出统一通过 POST /api/platform/v1/files/export-tasks 创建 XLSX 任务。
|
||
File 按导出类型校验原业务 export 权限,通过内部令牌分批读取 Lastleg;Provider 不经公网 Gateway。
|
||
parameters 与对应业务列表筛选一致,不包含 page/size;进销存支持 customerName。
|
||
尾程订单支持 relabelNo、sailingStage、businessType、businessOrderNo、externalBookingNo;导出履约类型、业务来源、关联商业单号和外接预订号,与列表同一投影。库存余额按来源入库单展开;所有导出均不包含内部数据库 ID。
|
||
每批最多 200 行,总行数上限 200000;车队报价及出车记录保留业务查询的 5000 条限制。
|
||
snapshotToken 绑定任务、申请人、执行版本和筛选条件,不表示数据库历史快照。
|
||
TRIP_OPERATIONS_LIST 的 costVisible 仅由 File 根据申请人的 platform:fleet:trip:list 权限写入,不能信任客户端值。
|
||
SELFOP_INVENTORY_TURNOVER 每批最多100行;parameters 必须提供库存周转列表的 snapshotContext、expectedTotal 和有序 columns(仅列键)。
|
||
它沿用 inventory-turnover 的筛选、排序、固定版本及30分钟有效期,拒绝 current/size/includeOverview;版本失效或条数变化整任务失败,不切换到最新数据。
|
||
columns 由服务端白名单解释并追加统计期间、期间出库、平均日末库存、周转率和历史证据;列头与说明由服务端生成。
|
||
原 Lastleg 业务 /export CSV 公网接口已移除。文件领取、过期、失败重试由 File 下载中心管理。
|
||
paths:
|
||
/internal/exports/v1/{exportType}/batches:
|
||
post:
|
||
summary: 读取一批平台导出业务数据
|
||
parameters:
|
||
- in: header
|
||
name: X-Internal-Service-Token
|
||
required: true
|
||
schema: { type: string }
|
||
- in: path
|
||
name: exportType
|
||
required: true
|
||
schema:
|
||
type: string
|
||
enum: [LAST_MILE_ORDER_LIST, OVERSEAS_INVENTORY_BALANCE, OVERSEAS_INVENTORY_LEDGER, OVERSEAS_QUOTE_LIST, MONTHLY_EXCHANGE_RATE_LIST, VEHICLE_LIST, FLEET_QUOTE_LIST, TRIP_OPERATIONS_LIST, SELFOP_INVENTORY_TURNOVER]
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
required: [taskId, tenantId, appCode, requestedBy, dispatchVersion, limit]
|
||
properties:
|
||
taskId: { type: string }
|
||
tenantId: { type: string, enum: ['0'] }
|
||
appCode: { type: string, enum: [PLATFORM] }
|
||
requestedBy: { type: string }
|
||
dispatchVersion: { type: integer, minimum: 1 }
|
||
parameters: { type: object, additionalProperties: true }
|
||
cursor: { type: string, nullable: true }
|
||
snapshotToken: { type: string, nullable: true }
|
||
limit: { type: integer, minimum: 1, maximum: 200 }
|
||
responses:
|
||
'200':
|
||
description: ApiResponse 包装 ExportBatchResponse;首批返回 columns/totalRows,后续批次返回同一 schemaHash/snapshotToken 与递增游标。
|
||
'400': { description: 类型、参数、游标或筛选快照无效 }
|
||
'401': { description: 内部令牌无效 }
|
||
'403': { description: 非平台作用域 }
|