优化
This commit is contained in:
@@ -4553,3 +4553,83 @@ CREATE TABLE IF NOT EXISTS ll_fleet_pickup_history (
|
||||
KEY idx_pickup_history_source(customer_id,transfer_no,id),
|
||||
KEY idx_pickup_history_trip(trip_no,id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='取货不可变操作历史';
|
||||
|
||||
-- 自有业务仅保存原排车的归属证据和附加运营信息,不复制履约主单。
|
||||
CREATE TABLE IF NOT EXISTS ll_fleet_owned_business_ownership (
|
||||
dispatch_id BIGINT NOT NULL COMMENT '原排车内部主键',
|
||||
resource_mode VARCHAR(16) NOT NULL COMMENT '原排车资源模式MASTER或EXTERNAL',
|
||||
vehicle_id BIGINT NULL COMMENT '真实车辆档案主键,临时外配为空',
|
||||
vehicle_ownership VARCHAR(16) NOT NULL COMMENT '装车完成时车辆归属OWNED或DISPATCHED',
|
||||
vehicle_record_version BIGINT NULL COMMENT '捕获归属时真实车辆档案版本',
|
||||
ownership_captured_at DATETIME(3) NOT NULL COMMENT '归属捕获UTC时间',
|
||||
loading_completion_hash VARCHAR(128) NOT NULL COMMENT '原排车装车确认事实摘要',
|
||||
loading_completed_at DATETIME(3) NOT NULL COMMENT '原排车实际装车完成UTC时间',
|
||||
PRIMARY KEY (dispatch_id),
|
||||
KEY idx_owned_business_vehicle (vehicle_ownership,vehicle_id),
|
||||
CONSTRAINT fk_owned_business_ownership_dispatch FOREIGN KEY (dispatch_id) REFERENCES ll_dispatch_order(id),
|
||||
CONSTRAINT ck_owned_business_ownership CHECK (vehicle_ownership IN ('OWNED','DISPATCHED')),
|
||||
CONSTRAINT ck_owned_business_resource_mode CHECK (
|
||||
(resource_mode='MASTER' AND vehicle_id IS NOT NULL AND vehicle_record_version IS NOT NULL AND vehicle_record_version>=0)
|
||||
OR (resource_mode='EXTERNAL' AND vehicle_id IS NULL AND vehicle_record_version IS NULL AND vehicle_ownership='DISPATCHED'))
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='原排车装车完成时的车辆归属证据';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS ll_fleet_owned_business_record (
|
||||
id BIGINT NOT NULL COMMENT '附加运营记录内部主键',
|
||||
dispatch_id BIGINT NOT NULL COMMENT '所属原排车内部主键',
|
||||
record_version BIGINT NOT NULL COMMENT '附加运营记录并发版本,独立于原排车版本',
|
||||
currency VARCHAR(3) NULL COMMENT '整车运营金额币种CNY或USD,未登记为空',
|
||||
total_amount DECIMAL(18,2) NULL COMMENT '人工登记整车总金额,不自动形成账务费用',
|
||||
actual_distance_miles DECIMAL(12,3) NULL COMMENT '实际行驶英里数,未登记为空',
|
||||
fuel_consumption_litres_per_100km DECIMAL(12,3) NULL COMMENT '人工登记油耗率,单位升每百公里',
|
||||
arrivals_json JSON NOT NULL COMMENT '按原目的地键记录的实际到达UTC时间',
|
||||
photos_json JSON NOT NULL COMMENT '七个照片框当前已绑定文件的分类快照',
|
||||
created_by VARCHAR(64) NOT NULL COMMENT '首次登记操作人标识',
|
||||
updated_by VARCHAR(64) NOT NULL COMMENT '最近登记操作人标识',
|
||||
created_at DATETIME(3) NOT NULL COMMENT '首次登记UTC时间',
|
||||
updated_at DATETIME(3) NOT NULL COMMENT '最近登记UTC时间',
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE KEY uk_owned_business_record_dispatch (dispatch_id),
|
||||
CONSTRAINT fk_owned_business_record_dispatch FOREIGN KEY (dispatch_id) REFERENCES ll_dispatch_order(id),
|
||||
CONSTRAINT ck_owned_business_record_version CHECK (record_version>=0),
|
||||
CONSTRAINT ck_owned_business_money CHECK (
|
||||
(currency IS NULL AND total_amount IS NULL)
|
||||
OR (currency IN ('CNY','USD') AND total_amount IS NOT NULL AND total_amount>=0)),
|
||||
CONSTRAINT ck_owned_business_distance CHECK (actual_distance_miles IS NULL OR actual_distance_miles>=0),
|
||||
CONSTRAINT ck_owned_business_fuel CHECK (fuel_consumption_litres_per_100km IS NULL OR fuel_consumption_litres_per_100km>=0)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='原排车自有业务附加运营信息';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS ll_fleet_owned_business_command (
|
||||
id BIGINT NOT NULL COMMENT '附加运营命令内部主键',
|
||||
dispatch_id BIGINT NOT NULL COMMENT '所属原排车内部主键',
|
||||
operator_id VARCHAR(64) NOT NULL COMMENT '原命令操作人标识',
|
||||
idempotency_key VARCHAR(128) COLLATE utf8mb4_bin NOT NULL COMMENT '同一原排车内唯一请求键,不按操作者分组',
|
||||
action VARCHAR(32) NOT NULL COMMENT '运营登记或照片上传绑定动作',
|
||||
expected_version BIGINT NULL COMMENT '原请求附加版本,纯文件上传可为空',
|
||||
request_hash CHAR(64) NOT NULL COMMENT '原操作者动作版本与完整请求摘要',
|
||||
request_json JSON NOT NULL COMMENT '不含文件内容或凭据的完整原请求',
|
||||
status VARCHAR(24) NOT NULL COMMENT 'PENDING或SUCCEEDED或REJECTED或UNKNOWN_RESULT',
|
||||
result_json JSON NULL COMMENT '原命令已知成功结果或明确拒绝事实',
|
||||
error_code VARCHAR(64) NULL COMMENT '明确拒绝或未知结果诊断码',
|
||||
created_at DATETIME(3) NOT NULL COMMENT '命令意图创建UTC时间',
|
||||
updated_at DATETIME(3) NOT NULL COMMENT '命令结果更新UTC时间',
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE KEY uk_owned_business_command_key (dispatch_id,idempotency_key),
|
||||
CONSTRAINT fk_owned_business_command_dispatch FOREIGN KEY (dispatch_id) REFERENCES ll_dispatch_order(id),
|
||||
CONSTRAINT ck_owned_business_command_version CHECK (expected_version IS NULL OR expected_version>=0),
|
||||
CONSTRAINT ck_owned_business_command_status CHECK (status IN ('PENDING','SUCCEEDED','REJECTED','UNKNOWN_RESULT'))
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='原排车附加运营写命令及可恢复结果';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS ll_fleet_owned_business_history (
|
||||
id BIGINT NOT NULL COMMENT '附加运营历史内部主键',
|
||||
dispatch_id BIGINT NOT NULL COMMENT '所属原排车内部主键',
|
||||
record_version BIGINT NOT NULL COMMENT '成功写入后的附加记录版本',
|
||||
action VARCHAR(32) NOT NULL COMMENT '运营登记或照片绑定动作',
|
||||
operator_id VARCHAR(64) NOT NULL COMMENT '真实操作人标识',
|
||||
reason VARCHAR(1000) NULL COMMENT '人工填写的登记或更正说明',
|
||||
snapshot_json JSON NOT NULL COMMENT '操作后附加运营信息与分类照片不可变快照',
|
||||
occurred_at DATETIME(3) NOT NULL COMMENT '操作UTC时间',
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE KEY uk_owned_business_history_version (dispatch_id,record_version),
|
||||
CONSTRAINT fk_owned_business_history_dispatch FOREIGN KEY (dispatch_id) REFERENCES ll_dispatch_order(id),
|
||||
CONSTRAINT ck_owned_business_history_version CHECK (record_version>0)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='原排车自有业务附加运营不可变历史';
|
||||
|
||||
@@ -0,0 +1,975 @@
|
||||
openapi: "3.0.3"
|
||||
info:
|
||||
title: "原排车自有车辆运营视图"
|
||||
version: "1.0.0"
|
||||
description: "装车完成时冻结车辆OWNED/DISPATCHED;所有主单事实来自原dispatch。新增数据仅附加运营记录、命令、历史及归属证据。油耗L/100km手工登记,金额CNY/USD不默认、不换汇;零与未登记不同。"
|
||||
security:
|
||||
-
|
||||
bearerAuth: []
|
||||
paths:
|
||||
"/api/platform/v1/last-leg/fleet/owned-business":
|
||||
get:
|
||||
operationId: "listOwnedBusiness"
|
||||
summary: "自有车辆装车后视图及同筛选四项统计"
|
||||
description: "权限:platform:fleet:owned-business:list。仅可信平台主体;只读原排车事实,不改变其状态/版本,不发布费用。"
|
||||
x-permission-code: "platform:fleet:owned-business:list"
|
||||
responses:
|
||||
200:
|
||||
description: "统一ApiResponse:成功code=200;业务错误保留A0400/A0403/A0404/A0409及诊断requestId/traceId。"
|
||||
content:
|
||||
"application/json":
|
||||
schema:
|
||||
type: "object"
|
||||
properties:
|
||||
code:
|
||||
type: "string"
|
||||
message:
|
||||
type: "string"
|
||||
data:
|
||||
allOf:
|
||||
-
|
||||
"$ref": "#/components/schemas/ListResult"
|
||||
nullable: true
|
||||
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: "plannedDepartureFrom"
|
||||
in: "query"
|
||||
required: false
|
||||
schema:
|
||||
type: "string"
|
||||
format: "date-time"
|
||||
-
|
||||
name: "plannedDepartureTo"
|
||||
in: "query"
|
||||
required: false
|
||||
schema:
|
||||
type: "string"
|
||||
format: "date-time"
|
||||
-
|
||||
name: "keyword"
|
||||
in: "query"
|
||||
required: false
|
||||
schema:
|
||||
type: "string"
|
||||
maxLength: 128
|
||||
-
|
||||
name: "stage"
|
||||
in: "query"
|
||||
required: false
|
||||
schema:
|
||||
"$ref": "#/components/schemas/Stage"
|
||||
-
|
||||
name: "warehouseId"
|
||||
in: "query"
|
||||
required: false
|
||||
schema:
|
||||
type: "string"
|
||||
maxLength: 64
|
||||
x-filter-contract: "plannedDepartureAt [from,to),统计同全部过滤、不带分页;无归属快照不降级按当前主档推断。"
|
||||
"/api/platform/v1/last-leg/fleet/owned-business/{dispatchNo}":
|
||||
parameters:
|
||||
-
|
||||
name: "dispatchNo"
|
||||
in: "path"
|
||||
required: true
|
||||
schema:
|
||||
type: "string"
|
||||
maxLength: 128
|
||||
get:
|
||||
operationId: "getOwnedBusiness"
|
||||
summary: "组合原排车详情及附加运营信息"
|
||||
description: "权限:platform:fleet:owned-business:list。仅可信平台主体;只读原排车事实,不改变其状态/版本,不发布费用。"
|
||||
x-permission-code: "platform:fleet:owned-business:list"
|
||||
responses:
|
||||
200:
|
||||
description: "统一ApiResponse:成功code=200;业务错误保留A0400/A0403/A0404/A0409及诊断requestId/traceId。"
|
||||
content:
|
||||
"application/json":
|
||||
schema:
|
||||
type: "object"
|
||||
properties:
|
||||
code:
|
||||
type: "string"
|
||||
message:
|
||||
type: "string"
|
||||
data:
|
||||
allOf:
|
||||
-
|
||||
"$ref": "#/components/schemas/Detail"
|
||||
nullable: true
|
||||
"/api/platform/v1/last-leg/fleet/owned-business/{dispatchNo}/history":
|
||||
parameters:
|
||||
-
|
||||
name: "dispatchNo"
|
||||
in: "path"
|
||||
required: true
|
||||
schema:
|
||||
type: "string"
|
||||
maxLength: 128
|
||||
get:
|
||||
operationId: "historyOwnedBusiness"
|
||||
summary: "原排车及附加真实流水聚合分页"
|
||||
description: "权限:platform:fleet:owned-business:list。仅可信平台主体;只读原排车事实,不改变其状态/版本,不发布费用。"
|
||||
x-permission-code: "platform:fleet:owned-business:list"
|
||||
responses:
|
||||
200:
|
||||
description: "统一ApiResponse:成功code=200;业务错误保留A0400/A0403/A0404/A0409及诊断requestId/traceId。"
|
||||
content:
|
||||
"application/json":
|
||||
schema:
|
||||
type: "object"
|
||||
properties:
|
||||
code:
|
||||
type: "string"
|
||||
message:
|
||||
type: "string"
|
||||
data:
|
||||
allOf:
|
||||
-
|
||||
"$ref": "#/components/schemas/HistoryPage"
|
||||
nullable: true
|
||||
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
|
||||
"/api/platform/v1/last-leg/fleet/owned-business/{dispatchNo}/operations":
|
||||
parameters:
|
||||
-
|
||||
name: "dispatchNo"
|
||||
in: "path"
|
||||
required: true
|
||||
schema:
|
||||
type: "string"
|
||||
maxLength: 128
|
||||
put:
|
||||
operationId: "saveOwnedBusinessOperations"
|
||||
summary: "按附加版本登记、更正或清空运营信息"
|
||||
description: "权限:platform:fleet:owned-business:edit。仅可信平台主体;只读原排车事实,不改变其状态/版本,不发布费用。"
|
||||
x-permission-code: "platform:fleet:owned-business:edit"
|
||||
responses:
|
||||
200:
|
||||
description: "统一ApiResponse:成功code=200;业务错误保留A0400/A0403/A0404/A0409及诊断requestId/traceId。"
|
||||
content:
|
||||
"application/json":
|
||||
schema:
|
||||
type: "object"
|
||||
properties:
|
||||
code:
|
||||
type: "string"
|
||||
message:
|
||||
type: "string"
|
||||
data:
|
||||
allOf:
|
||||
-
|
||||
"$ref": "#/components/schemas/Detail"
|
||||
nullable: true
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
"application/json":
|
||||
schema:
|
||||
"$ref": "#/components/schemas/SaveOperations"
|
||||
"/api/platform/v1/last-leg/fleet/owned-business/{dispatchNo}/photos/{slot}/uploads":
|
||||
parameters:
|
||||
-
|
||||
name: "dispatchNo"
|
||||
in: "path"
|
||||
required: true
|
||||
schema:
|
||||
type: "string"
|
||||
maxLength: 128
|
||||
-
|
||||
name: "slot"
|
||||
in: "path"
|
||||
required: true
|
||||
schema:
|
||||
"$ref": "#/components/schemas/PhotoSlot"
|
||||
post:
|
||||
operationId: "uploadOwnedBusinessPhoto"
|
||||
summary: "逐框准备照片,尚未保存绑定"
|
||||
description: "权限:platform:fleet:owned-business:upload。仅可信平台主体;只读原排车事实,不改变其状态/版本,不发布费用。"
|
||||
x-permission-code: "platform:fleet:owned-business:upload"
|
||||
responses:
|
||||
200:
|
||||
description: "统一ApiResponse:成功code=200;业务错误保留A0400/A0403/A0404/A0409及诊断requestId/traceId。"
|
||||
content:
|
||||
"application/json":
|
||||
schema:
|
||||
type: "object"
|
||||
properties:
|
||||
code:
|
||||
type: "string"
|
||||
message:
|
||||
type: "string"
|
||||
data:
|
||||
allOf:
|
||||
-
|
||||
"$ref": "#/components/schemas/Photo"
|
||||
nullable: true
|
||||
parameters:
|
||||
-
|
||||
name: "idempotencyKey"
|
||||
in: "query"
|
||||
required: true
|
||||
schema:
|
||||
type: "string"
|
||||
minLength: 8
|
||||
maxLength: 128
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
"multipart/form-data":
|
||||
schema:
|
||||
type: "object"
|
||||
required:
|
||||
- "file"
|
||||
properties:
|
||||
file:
|
||||
type: "string"
|
||||
format: "binary"
|
||||
description: "真实JPG/PNG,非空,最大10MiB;与独立绑定命令使用不同请求键。"
|
||||
"/api/platform/v1/last-leg/fleet/owned-business/{dispatchNo}/photos/{slot}":
|
||||
parameters:
|
||||
-
|
||||
name: "dispatchNo"
|
||||
in: "path"
|
||||
required: true
|
||||
schema:
|
||||
type: "string"
|
||||
maxLength: 128
|
||||
-
|
||||
name: "slot"
|
||||
in: "path"
|
||||
required: true
|
||||
schema:
|
||||
"$ref": "#/components/schemas/PhotoSlot"
|
||||
put:
|
||||
operationId: "bindOwnedBusinessPhoto"
|
||||
summary: "保存原上传fileId;失败保留原键恢复,不重新上传"
|
||||
description: "权限:platform:fleet:owned-business:upload。仅可信平台主体;只读原排车事实,不改变其状态/版本,不发布费用。"
|
||||
x-permission-code: "platform:fleet:owned-business:upload"
|
||||
responses:
|
||||
200:
|
||||
description: "统一ApiResponse:成功code=200;业务错误保留A0400/A0403/A0404/A0409及诊断requestId/traceId。"
|
||||
content:
|
||||
"application/json":
|
||||
schema:
|
||||
type: "object"
|
||||
properties:
|
||||
code:
|
||||
type: "string"
|
||||
message:
|
||||
type: "string"
|
||||
data:
|
||||
allOf:
|
||||
-
|
||||
"$ref": "#/components/schemas/Detail"
|
||||
nullable: true
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
"application/json":
|
||||
schema:
|
||||
"$ref": "#/components/schemas/BindPhoto"
|
||||
"/api/platform/v1/last-leg/fleet/owned-business/{dispatchNo}/photos/{slot}/files/{fileId}/content":
|
||||
parameters:
|
||||
-
|
||||
name: "dispatchNo"
|
||||
in: "path"
|
||||
required: true
|
||||
schema:
|
||||
type: "string"
|
||||
maxLength: 128
|
||||
-
|
||||
name: "slot"
|
||||
in: "path"
|
||||
required: true
|
||||
schema:
|
||||
"$ref": "#/components/schemas/PhotoSlot"
|
||||
-
|
||||
name: "fileId"
|
||||
in: "path"
|
||||
required: true
|
||||
schema:
|
||||
type: "string"
|
||||
pattern: "^[1-9][0-9]*$"
|
||||
get:
|
||||
operationId: "readOwnedBusinessPhoto"
|
||||
summary: "授权读取当前或原历史绑定图片"
|
||||
description: "权限:platform:fleet:owned-business:list。仅可信平台主体;只读原排车事实,不改变其状态/版本,不发布费用。"
|
||||
x-permission-code: "platform:fleet:owned-business:list"
|
||||
responses:
|
||||
200:
|
||||
description: "仅当前或指定历史引用的图片字节,Cache-Control:no-store,X-Content-Type-Options:nosniff"
|
||||
content:
|
||||
"image/jpeg":
|
||||
schema:
|
||||
type: "string"
|
||||
format: "binary"
|
||||
"image/png":
|
||||
schema:
|
||||
type: "string"
|
||||
format: "binary"
|
||||
parameters:
|
||||
-
|
||||
name: "revisionVersion"
|
||||
in: "query"
|
||||
required: false
|
||||
schema:
|
||||
type: "integer"
|
||||
format: "int64"
|
||||
minimum: 1
|
||||
"/api/platform/v1/last-leg/fleet/owned-business/{dispatchNo}/commands/{idempotencyKey}":
|
||||
parameters:
|
||||
-
|
||||
name: "dispatchNo"
|
||||
in: "path"
|
||||
required: true
|
||||
schema:
|
||||
type: "string"
|
||||
maxLength: 128
|
||||
-
|
||||
name: "idempotencyKey"
|
||||
in: "path"
|
||||
required: true
|
||||
schema:
|
||||
type: "string"
|
||||
minLength: 8
|
||||
maxLength: 128
|
||||
get:
|
||||
operationId: "recoverOwnedBusinessCommand"
|
||||
summary: "恢复本操作者原命令,未知结果不得换键重发"
|
||||
description: "权限:platform:fleet:owned-business:list。仅可信平台主体;只读原排车事实,不改变其状态/版本,不发布费用。"
|
||||
x-permission-code: "platform:fleet:owned-business:list"
|
||||
responses:
|
||||
200:
|
||||
description: "统一ApiResponse:成功code=200;业务错误保留A0400/A0403/A0404/A0409及诊断requestId/traceId。"
|
||||
content:
|
||||
"application/json":
|
||||
schema:
|
||||
type: "object"
|
||||
properties:
|
||||
code:
|
||||
type: "string"
|
||||
message:
|
||||
type: "string"
|
||||
data:
|
||||
allOf:
|
||||
-
|
||||
"$ref": "#/components/schemas/Command"
|
||||
nullable: true
|
||||
components:
|
||||
securitySchemes:
|
||||
bearerAuth:
|
||||
type: "http"
|
||||
scheme: "bearer"
|
||||
bearerFormat: "JWT"
|
||||
schemas:
|
||||
Stage:
|
||||
type: "string"
|
||||
enum:
|
||||
- "AFTER_LOADING"
|
||||
- "DELIVERING"
|
||||
- "DELIVERED"
|
||||
PhotoSlot:
|
||||
type: "string"
|
||||
enum:
|
||||
- "LOADING_SCENE"
|
||||
- "LOADING_LIST"
|
||||
- "PRE_DEPARTURE_CHECK"
|
||||
- "DRIVER_LICENSE"
|
||||
- "RECEIPT"
|
||||
- "FUEL_START"
|
||||
- "FUEL_END"
|
||||
Money:
|
||||
type: "object"
|
||||
x-java-record: "OwnedBusinessModels.Money"
|
||||
required:
|
||||
- "currency"
|
||||
- "amount"
|
||||
properties:
|
||||
currency:
|
||||
type: "string"
|
||||
enum:
|
||||
- "CNY"
|
||||
- "USD"
|
||||
amount:
|
||||
type: "string"
|
||||
pattern: "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,2})?$"
|
||||
Arrival:
|
||||
type: "object"
|
||||
x-java-record: "OwnedBusinessModels.Arrival"
|
||||
required:
|
||||
- "destinationKey"
|
||||
- "actualArrivedAt"
|
||||
properties:
|
||||
destinationKey:
|
||||
type: "string"
|
||||
minLength: 1
|
||||
maxLength: 256
|
||||
actualArrivedAt:
|
||||
type: "string"
|
||||
nullable: true
|
||||
format: "date-time"
|
||||
Operations:
|
||||
type: "object"
|
||||
x-java-record: "OwnedBusinessModels.Operations"
|
||||
required:
|
||||
- "money"
|
||||
- "actualDistanceMiles"
|
||||
- "fuelConsumptionLitresPer100Km"
|
||||
- "arrivals"
|
||||
properties:
|
||||
money:
|
||||
allOf:
|
||||
-
|
||||
"$ref": "#/components/schemas/Money"
|
||||
nullable: true
|
||||
actualDistanceMiles:
|
||||
type: "string"
|
||||
nullable: true
|
||||
pattern: "^(0|[1-9][0-9]{0,8})(\\.[0-9]{1,3})?$"
|
||||
fuelConsumptionLitresPer100Km:
|
||||
type: "string"
|
||||
nullable: true
|
||||
pattern: "^(0|[1-9][0-9]{0,8})(\\.[0-9]{1,3})?$"
|
||||
arrivals:
|
||||
type: "array"
|
||||
items:
|
||||
"$ref": "#/components/schemas/Arrival"
|
||||
SaveOperations:
|
||||
type: "object"
|
||||
x-java-record: "OwnedBusinessModels.SaveOperations"
|
||||
required:
|
||||
- "recordVersion"
|
||||
- "idempotencyKey"
|
||||
- "operations"
|
||||
properties:
|
||||
recordVersion:
|
||||
type: "string"
|
||||
pattern: "^(0|[1-9][0-9]*)$"
|
||||
idempotencyKey:
|
||||
type: "string"
|
||||
minLength: 8
|
||||
maxLength: 128
|
||||
operations:
|
||||
"$ref": "#/components/schemas/Operations"
|
||||
reason:
|
||||
type: "string"
|
||||
nullable: true
|
||||
maxLength: 1000
|
||||
BindPhoto:
|
||||
type: "object"
|
||||
x-java-record: "OwnedBusinessModels.BindPhoto"
|
||||
required:
|
||||
- "recordVersion"
|
||||
- "idempotencyKey"
|
||||
- "fileId"
|
||||
properties:
|
||||
recordVersion:
|
||||
type: "string"
|
||||
pattern: "^(0|[1-9][0-9]*)$"
|
||||
idempotencyKey:
|
||||
type: "string"
|
||||
minLength: 8
|
||||
maxLength: 128
|
||||
fileId:
|
||||
type: "string"
|
||||
pattern: "^[1-9][0-9]*$"
|
||||
Gate:
|
||||
type: "object"
|
||||
x-java-record: "OwnedBusinessModels.Gate"
|
||||
required:
|
||||
- "allowed"
|
||||
- "blockReason"
|
||||
properties:
|
||||
allowed:
|
||||
type: "boolean"
|
||||
blockReason:
|
||||
type: "string"
|
||||
nullable: true
|
||||
Actions:
|
||||
type: "object"
|
||||
x-java-record: "OwnedBusinessModels.Actions"
|
||||
required:
|
||||
- "edit"
|
||||
- "upload"
|
||||
properties:
|
||||
edit:
|
||||
"$ref": "#/components/schemas/Gate"
|
||||
upload:
|
||||
"$ref": "#/components/schemas/Gate"
|
||||
Origin:
|
||||
type: "object"
|
||||
x-java-record: "OwnedBusinessModels.Origin"
|
||||
required:
|
||||
- "warehouseId"
|
||||
- "warehouseCode"
|
||||
- "warehouseName"
|
||||
properties:
|
||||
warehouseId:
|
||||
type: "string"
|
||||
warehouseCode:
|
||||
type: "string"
|
||||
warehouseName:
|
||||
type: "string"
|
||||
Vehicle:
|
||||
type: "object"
|
||||
x-java-record: "OwnedBusinessModels.Vehicle"
|
||||
required:
|
||||
- "vehicleId"
|
||||
- "plate"
|
||||
- "ownership"
|
||||
properties:
|
||||
vehicleId:
|
||||
type: "string"
|
||||
plate:
|
||||
type: "string"
|
||||
ownership:
|
||||
type: "string"
|
||||
enum:
|
||||
- "OWNED"
|
||||
Driver:
|
||||
type: "object"
|
||||
x-java-record: "OwnedBusinessModels.Driver"
|
||||
required:
|
||||
- "name"
|
||||
- "phone"
|
||||
properties:
|
||||
name:
|
||||
type: "string"
|
||||
nullable: true
|
||||
phone:
|
||||
type: "string"
|
||||
nullable: true
|
||||
Appointment:
|
||||
type: "object"
|
||||
x-java-record: "OwnedBusinessModels.Appointment"
|
||||
required:
|
||||
- "appointmentNo"
|
||||
- "confirmationNo"
|
||||
- "scheduledAt"
|
||||
- "allocatedPackages"
|
||||
properties:
|
||||
appointmentNo:
|
||||
type: "string"
|
||||
confirmationNo:
|
||||
type: "string"
|
||||
nullable: true
|
||||
scheduledAt:
|
||||
type: "string"
|
||||
nullable: true
|
||||
format: "date-time"
|
||||
allocatedPackages:
|
||||
type: "string"
|
||||
pattern: "^[1-9][0-9]*$"
|
||||
Destination:
|
||||
type: "object"
|
||||
x-java-record: "OwnedBusinessModels.Destination"
|
||||
required:
|
||||
- "destinationKey"
|
||||
- "warehouseCode"
|
||||
- "warehouseName"
|
||||
- "address"
|
||||
- "appointments"
|
||||
- "actualArrivedAt"
|
||||
properties:
|
||||
destinationKey:
|
||||
type: "string"
|
||||
warehouseCode:
|
||||
type: "string"
|
||||
nullable: true
|
||||
warehouseName:
|
||||
type: "string"
|
||||
nullable: true
|
||||
address:
|
||||
type: "string"
|
||||
nullable: true
|
||||
appointments:
|
||||
type: "array"
|
||||
items:
|
||||
"$ref": "#/components/schemas/Appointment"
|
||||
actualArrivedAt:
|
||||
type: "string"
|
||||
nullable: true
|
||||
format: "date-time"
|
||||
Photo:
|
||||
type: "object"
|
||||
x-java-record: "OwnedBusinessModels.Photo"
|
||||
required:
|
||||
- "slot"
|
||||
- "category"
|
||||
- "fileId"
|
||||
- "fileName"
|
||||
- "contentType"
|
||||
- "sizeBytes"
|
||||
- "uploadedAt"
|
||||
- "savedAt"
|
||||
properties:
|
||||
slot:
|
||||
"$ref": "#/components/schemas/PhotoSlot"
|
||||
category:
|
||||
type: "string"
|
||||
enum:
|
||||
- "LOADING"
|
||||
- "FUEL"
|
||||
fileId:
|
||||
type: "string"
|
||||
fileName:
|
||||
type: "string"
|
||||
contentType:
|
||||
type: "string"
|
||||
enum:
|
||||
- "image/jpeg"
|
||||
- "image/png"
|
||||
sizeBytes:
|
||||
type: "string"
|
||||
pattern: "^[1-9][0-9]*$"
|
||||
uploadedAt:
|
||||
type: "string"
|
||||
savedAt:
|
||||
type: "string"
|
||||
nullable: true
|
||||
format: "date-time"
|
||||
description: "上传回执savedAt为空;绑定成功才填写savedAt。File类型分别为OVERSEAS_DISPATCH_LOADING_PHOTO和OVERSEAS_DISPATCH_FUEL_PHOTO,平台0、原dispatch内部ID,最多10MiB。"
|
||||
PhotoSummary:
|
||||
type: "object"
|
||||
x-java-record: "OwnedBusinessModels.PhotoSummary"
|
||||
required:
|
||||
- "loadingCount"
|
||||
- "fuelCount"
|
||||
properties:
|
||||
loadingCount:
|
||||
type: "integer"
|
||||
minimum: 0
|
||||
fuelCount:
|
||||
type: "integer"
|
||||
minimum: 0
|
||||
Row:
|
||||
type: "object"
|
||||
x-java-record: "OwnedBusinessModels.Row"
|
||||
required:
|
||||
- "dispatchNo"
|
||||
- "stage"
|
||||
- "plannedDepartureAt"
|
||||
- "loadingCompletedAt"
|
||||
- "departedAt"
|
||||
- "deliveryCompletedAt"
|
||||
- "origin"
|
||||
- "vehicle"
|
||||
- "driver"
|
||||
- "destinations"
|
||||
- "actualPalletCount"
|
||||
- "operations"
|
||||
- "unitPrice"
|
||||
- "recordVersion"
|
||||
- "dispatchRecordVersion"
|
||||
- "photoSummary"
|
||||
- "actions"
|
||||
- "sourceIssues"
|
||||
properties:
|
||||
dispatchNo:
|
||||
type: "string"
|
||||
stage:
|
||||
"$ref": "#/components/schemas/Stage"
|
||||
plannedDepartureAt:
|
||||
type: "string"
|
||||
format: "date-time"
|
||||
loadingCompletedAt:
|
||||
type: "string"
|
||||
format: "date-time"
|
||||
departedAt:
|
||||
type: "string"
|
||||
nullable: true
|
||||
format: "date-time"
|
||||
deliveryCompletedAt:
|
||||
type: "string"
|
||||
nullable: true
|
||||
format: "date-time"
|
||||
origin:
|
||||
"$ref": "#/components/schemas/Origin"
|
||||
vehicle:
|
||||
"$ref": "#/components/schemas/Vehicle"
|
||||
driver:
|
||||
"$ref": "#/components/schemas/Driver"
|
||||
destinations:
|
||||
type: "array"
|
||||
items:
|
||||
"$ref": "#/components/schemas/Destination"
|
||||
actualPalletCount:
|
||||
type: "integer"
|
||||
minimum: 0
|
||||
nullable: true
|
||||
operations:
|
||||
"$ref": "#/components/schemas/Operations"
|
||||
unitPrice:
|
||||
type: "string"
|
||||
nullable: true
|
||||
pattern: "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,2})?$"
|
||||
recordVersion:
|
||||
type: "string"
|
||||
pattern: "^(0|[1-9][0-9]*)$"
|
||||
dispatchRecordVersion:
|
||||
type: "string"
|
||||
pattern: "^(0|[1-9][0-9]*)$"
|
||||
photoSummary:
|
||||
"$ref": "#/components/schemas/PhotoSummary"
|
||||
actions:
|
||||
"$ref": "#/components/schemas/Actions"
|
||||
sourceIssues:
|
||||
type: "array"
|
||||
items:
|
||||
type: "string"
|
||||
Summary:
|
||||
type: "object"
|
||||
x-java-record: "OwnedBusinessModels.Summary"
|
||||
required:
|
||||
- "dispatchCount"
|
||||
- "afterLoadingCount"
|
||||
- "deliveringCount"
|
||||
- "deliveredCount"
|
||||
properties:
|
||||
dispatchCount:
|
||||
type: "integer"
|
||||
minimum: 0
|
||||
afterLoadingCount:
|
||||
type: "integer"
|
||||
minimum: 0
|
||||
deliveringCount:
|
||||
type: "integer"
|
||||
minimum: 0
|
||||
deliveredCount:
|
||||
type: "integer"
|
||||
minimum: 0
|
||||
ListResult:
|
||||
type: "object"
|
||||
x-java-record: "OwnedBusinessModels.ListResult"
|
||||
required:
|
||||
- "records"
|
||||
- "page"
|
||||
- "size"
|
||||
- "total"
|
||||
- "summary"
|
||||
properties:
|
||||
records:
|
||||
type: "array"
|
||||
items:
|
||||
"$ref": "#/components/schemas/Row"
|
||||
page:
|
||||
type: "integer"
|
||||
minimum: 1
|
||||
size:
|
||||
type: "integer"
|
||||
minimum: 1
|
||||
maximum: 200
|
||||
total:
|
||||
type: "integer"
|
||||
minimum: 0
|
||||
summary:
|
||||
"$ref": "#/components/schemas/Summary"
|
||||
Cargo:
|
||||
type: "object"
|
||||
x-java-record: "OwnedBusinessModels.Cargo"
|
||||
required:
|
||||
- "sourceKey"
|
||||
- "customerId"
|
||||
- "customerName"
|
||||
- "orderNo"
|
||||
- "inboundCode"
|
||||
- "palletNo"
|
||||
- "destinationKey"
|
||||
- "packages"
|
||||
properties:
|
||||
sourceKey:
|
||||
type: "string"
|
||||
customerId:
|
||||
type: "string"
|
||||
customerName:
|
||||
type: "string"
|
||||
nullable: true
|
||||
orderNo:
|
||||
type: "string"
|
||||
nullable: true
|
||||
inboundCode:
|
||||
type: "string"
|
||||
nullable: true
|
||||
palletNo:
|
||||
type: "string"
|
||||
destinationKey:
|
||||
type: "string"
|
||||
packages:
|
||||
type: "string"
|
||||
Detail:
|
||||
type: "object"
|
||||
x-java-record: "OwnedBusinessModels.Detail"
|
||||
required:
|
||||
- "row"
|
||||
- "dispatch"
|
||||
- "cargo"
|
||||
- "photos"
|
||||
properties:
|
||||
row:
|
||||
"$ref": "#/components/schemas/Row"
|
||||
dispatch:
|
||||
"$ref": "./overseas-business-v1.yaml#/components/schemas/DispatchDetail"
|
||||
cargo:
|
||||
type: "array"
|
||||
items:
|
||||
"$ref": "#/components/schemas/Cargo"
|
||||
photos:
|
||||
type: "array"
|
||||
items:
|
||||
"$ref": "#/components/schemas/Photo"
|
||||
History:
|
||||
type: "object"
|
||||
x-java-record: "OwnedBusinessModels.History"
|
||||
required:
|
||||
- "eventSource"
|
||||
- "recordVersion"
|
||||
- "dispatchRecordVersion"
|
||||
- "action"
|
||||
- "operatorName"
|
||||
- "occurredAt"
|
||||
- "reason"
|
||||
- "operations"
|
||||
- "photos"
|
||||
properties:
|
||||
eventSource:
|
||||
type: "string"
|
||||
enum:
|
||||
- "DISPATCH"
|
||||
- "OPERATIONS"
|
||||
recordVersion:
|
||||
type: "string"
|
||||
pattern: "^(0|[1-9][0-9]*)$"
|
||||
nullable: true
|
||||
dispatchRecordVersion:
|
||||
type: "string"
|
||||
pattern: "^(0|[1-9][0-9]*)$"
|
||||
nullable: true
|
||||
action:
|
||||
type: "string"
|
||||
operatorName:
|
||||
type: "string"
|
||||
nullable: true
|
||||
occurredAt:
|
||||
type: "string"
|
||||
format: "date-time"
|
||||
reason:
|
||||
type: "string"
|
||||
nullable: true
|
||||
operations:
|
||||
allOf:
|
||||
-
|
||||
"$ref": "#/components/schemas/Operations"
|
||||
nullable: true
|
||||
photos:
|
||||
type: "array"
|
||||
items:
|
||||
"$ref": "#/components/schemas/Photo"
|
||||
description: "UNION ALL读取原排车真实流水与附加流水,一次排序分页;DISPATCH事件recordVersion=null、operations=null、photos=[];OPERATIONS事件dispatchRecordVersion=null。"
|
||||
HistoryPage:
|
||||
type: "object"
|
||||
x-java-record: "OwnedBusinessModels.HistoryPage"
|
||||
required:
|
||||
- "records"
|
||||
- "page"
|
||||
- "size"
|
||||
- "total"
|
||||
properties:
|
||||
records:
|
||||
type: "array"
|
||||
items:
|
||||
"$ref": "#/components/schemas/History"
|
||||
page:
|
||||
type: "integer"
|
||||
minimum: 1
|
||||
size:
|
||||
type: "integer"
|
||||
minimum: 1
|
||||
maximum: 200
|
||||
total:
|
||||
type: "integer"
|
||||
minimum: 0
|
||||
Command:
|
||||
type: "object"
|
||||
x-java-record: "OwnedBusinessModels.Command"
|
||||
required:
|
||||
- "dispatchNo"
|
||||
- "action"
|
||||
- "idempotencyKey"
|
||||
- "state"
|
||||
- "recordVersion"
|
||||
- "replayed"
|
||||
- "result"
|
||||
- "errorCode"
|
||||
- "retryAllowed"
|
||||
properties:
|
||||
dispatchNo:
|
||||
type: "string"
|
||||
action:
|
||||
type: "string"
|
||||
enum:
|
||||
- "SAVE_OPERATIONS"
|
||||
- "UPLOAD_PHOTO"
|
||||
- "BIND_PHOTO"
|
||||
idempotencyKey:
|
||||
type: "string"
|
||||
state:
|
||||
type: "string"
|
||||
enum:
|
||||
- "SUCCEEDED"
|
||||
- "PENDING"
|
||||
- "UNKNOWN_RESULT"
|
||||
- "REJECTED"
|
||||
recordVersion:
|
||||
type: "string"
|
||||
pattern: "^(0|[1-9][0-9]*)$"
|
||||
nullable: true
|
||||
replayed:
|
||||
type: "boolean"
|
||||
result:
|
||||
nullable: true
|
||||
oneOf:
|
||||
-
|
||||
"$ref": "#/components/schemas/Detail"
|
||||
-
|
||||
"$ref": "#/components/schemas/Photo"
|
||||
errorCode:
|
||||
type: "string"
|
||||
nullable: true
|
||||
retryAllowed:
|
||||
type: "boolean"
|
||||
enum:
|
||||
- false
|
||||
Reference in New Issue
Block a user