feat(fleet): attach scoped evidence to measured trip records
This commit is contained in:
@@ -320,7 +320,7 @@
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"description": "platform:fleet:operations:edit;父车次行锁、版本与原操作人请求键校验,原请求返回原快照,更正追加不可变历史。空值区别零,说明选填。不修改主档里程、车次执行、库存或费用。",
|
||||
"description": "platform:fleet:operations:edit;父车次行锁、版本与原操作人请求键校验,原请求返回原快照,更正追加不可变历史。空值区别零,说明选填。不修改主档里程、车次执行、库存或费用。;附件选填,最多20个,保存前验证平台0、FLEET_TRIP_OPERATION_EVIDENCE和本车trip.id归属;幂等键包含完整文件ID列表,成功重放返回原快照,移除当前引用保留历史。",
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
@@ -338,7 +338,7 @@
|
||||
"maxLength": 128
|
||||
},
|
||||
"details": {
|
||||
"$ref": "#/components/schemas/Measured"
|
||||
"$ref": "#/components/schemas/MeasuredInput"
|
||||
},
|
||||
"reason": {
|
||||
"type": "string",
|
||||
@@ -480,6 +480,115 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/platform/v1/last-leg/fleet/operations/{tripNo}/record/files": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "tripNo",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"post": {
|
||||
"summary": "上传选填实测凭证,不创建实测记录",
|
||||
"description": "platform:fleet:operations:edit;仅平台0,实际已发车车次;FLEET_TRIP_OPERATION_EVIDENCE+trip.id,PDF/JPG/PNG,非空且最大10MiB;上传失败不创建或重建记录。",
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"multipart/form-data": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"file"
|
||||
],
|
||||
"properties": {
|
||||
"file": {
|
||||
"type": "string",
|
||||
"format": "binary"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "统一响应data为可信文件信息",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/OperationEvidenceFile"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/platform/v1/last-leg/fleet/operations/{tripNo}/record/files/{fileId}/content": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "tripNo",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "fileId",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"minimum": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"get": {
|
||||
"summary": "按需读取本车实测凭证,历史引用继续可读",
|
||||
"description": "platform:fleet:operations:list;仅已保存至本车当前或历史版本的引用可读;重验平台0/业务类型/车次内部ID/文件ID,no-store;不逐行预取。",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "PDF或图片原始内容",
|
||||
"content": {
|
||||
"application/pdf": {
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"format": "binary"
|
||||
}
|
||||
},
|
||||
"image/jpeg": {
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"format": "binary"
|
||||
}
|
||||
},
|
||||
"image/png": {
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"format": "binary"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "文件不可用或归属不符"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
@@ -695,12 +804,19 @@
|
||||
"type": "string",
|
||||
"nullable": true,
|
||||
"maxLength": 1000
|
||||
},
|
||||
"evidenceFiles": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/OperationEvidenceFile"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"actualDistanceMiles",
|
||||
"actualFuelLitres",
|
||||
"remark"
|
||||
"remark",
|
||||
"evidenceFiles"
|
||||
]
|
||||
},
|
||||
"Destination": {
|
||||
@@ -918,6 +1034,74 @@
|
||||
"unallocatedTrips",
|
||||
"totals"
|
||||
]
|
||||
},
|
||||
"MeasuredInput": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"actualDistanceMiles": {
|
||||
"type": "number",
|
||||
"minimum": 0,
|
||||
"nullable": true,
|
||||
"multipleOf": 0.1
|
||||
},
|
||||
"actualFuelLitres": {
|
||||
"type": "number",
|
||||
"minimum": 0,
|
||||
"nullable": true,
|
||||
"multipleOf": 0.1
|
||||
},
|
||||
"remark": {
|
||||
"type": "string",
|
||||
"nullable": true,
|
||||
"maxLength": 1000
|
||||
},
|
||||
"evidenceFileIds": {
|
||||
"type": "array",
|
||||
"maxItems": 20,
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"minimum": 1
|
||||
},
|
||||
"description": "选填,空数组合法;只提交本车已上传文件ID,保存重新核验归属"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"actualDistanceMiles",
|
||||
"actualFuelLitres",
|
||||
"remark"
|
||||
]
|
||||
},
|
||||
"OperationEvidenceFile": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"fileId",
|
||||
"fileName",
|
||||
"contentType",
|
||||
"sizeBytes"
|
||||
],
|
||||
"properties": {
|
||||
"fileId": {
|
||||
"type": "string"
|
||||
},
|
||||
"fileName": {
|
||||
"type": "string"
|
||||
},
|
||||
"contentType": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"application/pdf",
|
||||
"image/jpeg",
|
||||
"image/png"
|
||||
]
|
||||
},
|
||||
"sizeBytes": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 10485760
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user