This commit is contained in:
2026-10-08 17:07:57 +08:00
parent 16d2d9111a
commit c1ddb658bd
111 changed files with 2914 additions and 941 deletions
@@ -175,108 +175,6 @@
}
}
},
"/api/platform/v1/last-leg/fleet/operations/export": {
"get": {
"description": "platform:fleet:operations:export;同筛选同事实来源的CSV",
"parameters": [
{
"name": "page",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"default": 1,
"minimum": 1
}
},
{
"name": "size",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"default": 20,
"minimum": 1,
"maximum": 200
}
},
{
"name": "from",
"in": "query",
"required": true,
"schema": {
"type": "string",
"format": "date-time"
}
},
{
"name": "to",
"in": "query",
"required": true,
"schema": {
"type": "string",
"format": "date-time"
}
},
{
"name": "warehouseId",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1
}
},
{
"name": "keyword",
"in": "query",
"required": false,
"schema": {
"type": "string",
"maxLength": 128
}
},
{
"name": "sourceType",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"OWN",
"EXTERNAL"
]
}
},
{
"name": "status",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"IN_TRANSIT",
"COMPLETED"
]
}
}
],
"responses": {
"200": {
"description": "UTF-8 BOM CSV",
"content": {
"text/csv": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
}
}
},
"/api/platform/v1/last-leg/fleet/operations/{tripNo}/record": {
"parameters": [
{
@@ -600,89 +600,6 @@
}
}
}
},
"/api/platform/v1/last-leg/fleet/quotes/export": {
"get": {
"description": "platform:fleet:quote:export;全筛选CSV,最多5000行,公式注入转义,空报价保留空值,币种不混合",
"parameters": [
{
"name": "page",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"default": 1
}
},
{
"name": "size",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 200,
"default": 20
}
},
{
"name": "kind",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"PURCHASE",
"SALE"
]
}
},
{
"name": "keyword",
"in": "query",
"required": false,
"schema": {
"type": "string",
"maxLength": 128
}
},
{
"name": "status",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
}
},
{
"name": "effectiveOn",
"in": "query",
"required": false,
"schema": {
"type": "string",
"format": "date"
}
}
],
"responses": {
"200": {
"description": "UTF-8 BOM CSV",
"content": {
"text/csv": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
}
}
}
},
"components": {
@@ -0,0 +1,51 @@
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,库存余额按来源入库单展开,不导出内部数据库 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: 非平台作用域 }
@@ -339,14 +339,6 @@ paths:
orderIds: { type: array, minItems: 1, uniqueItems: true, items: { type: integer, format: int64 } }
palletMergeRequired: { type: boolean }
responses: { '200': { description: 批量合托标记已更新 } }
/api/platform/v1/last-leg/orders/export:
get:
summary: 导出筛选后的尾程订单
description: 权限 platform:overseas-warehouse:last-mile-order:export;筛选参数与列表一致,返回 UTF-8 CSV。
security: [{ bearerAuth: [] }]
parameters:
- { name: sailingStage, in: query, description: '可选开船阶段。仅匹配头程订单类型 FIRST_LEG;未传不限制类型。按实际柜级节点序号>=40判断开船后;人工节点覆盖后仅按该票 ACTUAL_DEPARTURE 非空判断,不回退柜级。无实际开船事实归开船前。', schema: { type: string, enum: [BEFORE_DEPARTURE, AFTER_DEPARTURE] } }
responses: { '200': { description: CSV 文件, content: { text/csv: { schema: { type: string, format: binary } } } } }
/api/platform/v1/last-leg/orders/container-summaries:
get:
summary: 分页查询柜级入库计划进度
@@ -44,17 +44,6 @@ paths:
data:
type: array
items: { $ref: '#/components/schemas/PartnerWarehouseOption' }
/api/platform/v1/last-leg/master-data/overseas-quotes/export:
get:
summary: 导出海外仓报价
description: '权限:platform:overseas-master-data:quote:export;UTF-8 BOM CSV'
parameters:
- { name: keyword, in: query, schema: { type: string } }
- { name: warehouseId, in: query, schema: { type: string } }
- { name: providerName, in: query, schema: { type: string } }
- { name: currency, in: query, schema: { type: string } }
- { name: status, in: query, schema: { $ref: '#/components/schemas/ActiveStatus' } }
responses: { '200': { description: CSV, content: { text/csv: { schema: { type: string, format: binary } } } } }
/api/platform/v1/last-leg/master-data/overseas-quotes/{id}:
parameters:
- { name: id, in: path, required: true, schema: { type: integer, format: int64 } }
@@ -96,15 +85,6 @@ paths:
summary: 查询最新有效月度汇率摘要
description: '权限:platform:overseas-master-data:exchange-rate:list'
responses: { '200': { description: 业务响应,data含latestMonth/latestUsdToCnyAverage/updatedBy/updatedAt } }
/api/platform/v1/last-leg/master-data/exchange-rates/export:
get:
summary: 导出筛选后的全部月度汇率
description: '权限:platform:overseas-master-data:exchange-rate:export;UTF-8 BOM CSV'
parameters:
- { name: monthFrom, in: query, schema: { type: string } }
- { name: monthTo, in: query, schema: { type: string } }
- { name: status, in: query, schema: { $ref: '#/components/schemas/ActiveStatus' } }
responses: { '200': { description: CSV, content: { text/csv: { schema: { type: string, format: binary } } } } }
/api/platform/v1/last-leg/master-data/exchange-rates/{month}:
parameters:
- { name: month, in: path, required: true, schema: { type: string, pattern: '^\d{4}-(0[1-9]|1[0-2])$' } }
@@ -142,16 +122,6 @@ paths:
description: '权限:platform:overseas-master-data:vehicle:create;车牌号唯一'
requestBody: { required: true, content: { application/json: { schema: { $ref: '#/components/schemas/VehicleCreate' } } } }
responses: { '200': { description: 业务响应,data为Vehicle } }
/api/platform/v1/last-leg/master-data/vehicles/export:
get:
summary: 导出筛选后的全部车辆主数据
description: '权限:platform:overseas-master-data:vehicle:export;UTF-8 BOM CSV'
parameters:
- { name: keyword, in: query, schema: { type: string } }
- { name: ownership, in: query, schema: { $ref: '#/components/schemas/VehicleOwnership' } }
- { name: region, in: query, schema: { $ref: '#/components/schemas/VehicleRegion' } }
- { name: status, in: query, schema: { $ref: '#/components/schemas/VehicleStatus' } }
responses: { '200': { description: CSV, content: { text/csv: { schema: { type: string, format: binary } } } } }
/api/platform/v1/last-leg/master-data/vehicles/{id}:
parameters:
- { name: id, in: path, required: true, schema: { type: integer, format: int64 } }