Files
baiyue-firstleg/lastleg-service/src/main/resources/openapi/lastleg-exports-v1.yaml
T

52 lines
2.9 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: 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 权限写入,不能信任客户端值。
原 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]
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: 非平台作用域 }