feat(fleet): read attributable trip receivables and receipts from finance
This commit is contained in:
@@ -0,0 +1,234 @@
|
||||
{
|
||||
"openapi": "3.0.3",
|
||||
"info": {
|
||||
"title": "车次Finance权威应收与实收只读来源",
|
||||
"version": "1.0.0",
|
||||
"description": "Lastleg以不可变DEPART验证后的客户/派送业务号读取。仅本Finance库;最新已审核有效LASTLEG OVERSEAS_DELIVERY_FEE应收,按币种。实收只取fin_receipt_bill已确认分配;整张ISSUED账单全部来源均明确归属请求车次时才计一次。混合账单、无分配、无有效来源为待分配,不按账单总额或比例估算。最多200业务、2000费用,批量查询。现行应收结算单收款沿关联账单,fin_settlement_payment仅用于应付,不重复叠加。"
|
||||
},
|
||||
"paths": {
|
||||
"/internal/finance/v1/trip-receivables/query": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"internalToken": []
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"businesses",
|
||||
"receiptsVisible"
|
||||
],
|
||||
"properties": {
|
||||
"businesses": {
|
||||
"type": "array",
|
||||
"maxItems": 200,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"customerId",
|
||||
"deliveryNo"
|
||||
],
|
||||
"properties": {
|
||||
"customerId": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"minimum": 1
|
||||
},
|
||||
"deliveryNo": {
|
||||
"type": "string",
|
||||
"maxLength": 64
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"receiptsVisible": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Finance来源及归属,不生成费用/账单/分配",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/TripFinanceAuthority"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "输入或来源数量超限"
|
||||
},
|
||||
"401": {
|
||||
"description": "内部令牌无效"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"securitySchemes": {
|
||||
"internalToken": {
|
||||
"type": "apiKey",
|
||||
"in": "header",
|
||||
"name": "X-Internal-Service-Token"
|
||||
}
|
||||
},
|
||||
"schemas": {
|
||||
"TripFinanceMoney": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"currency",
|
||||
"receivableAmount",
|
||||
"receivedAmount"
|
||||
],
|
||||
"properties": {
|
||||
"currency": {
|
||||
"type": "string"
|
||||
},
|
||||
"receivableAmount": {
|
||||
"type": "number",
|
||||
"minimum": 0
|
||||
},
|
||||
"receivedAmount": {
|
||||
"type": "number",
|
||||
"minimum": 0,
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"TripFinanceSource": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"customerId",
|
||||
"businessNo",
|
||||
"sourceNo",
|
||||
"feeItemName",
|
||||
"sourceVersion",
|
||||
"currency",
|
||||
"amount",
|
||||
"status"
|
||||
],
|
||||
"properties": {
|
||||
"customerId": {
|
||||
"type": "string"
|
||||
},
|
||||
"businessNo": {
|
||||
"type": "string"
|
||||
},
|
||||
"sourceNo": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"feeItemName": {
|
||||
"type": "string"
|
||||
},
|
||||
"sourceVersion": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"currency": {
|
||||
"type": "string"
|
||||
},
|
||||
"amount": {
|
||||
"type": "number",
|
||||
"minimum": 0
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"TripFinanceDocument": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"billNo",
|
||||
"currency",
|
||||
"receivedAmount",
|
||||
"allocationStatus",
|
||||
"reason"
|
||||
],
|
||||
"properties": {
|
||||
"billNo": {
|
||||
"type": "string"
|
||||
},
|
||||
"currency": {
|
||||
"type": "string"
|
||||
},
|
||||
"receivedAmount": {
|
||||
"type": "number",
|
||||
"minimum": 0,
|
||||
"nullable": true
|
||||
},
|
||||
"allocationStatus": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ATTRIBUTED",
|
||||
"PENDING_ALLOCATION"
|
||||
]
|
||||
},
|
||||
"reason": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"TripFinanceAuthority": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"status",
|
||||
"totals",
|
||||
"sources",
|
||||
"documents",
|
||||
"reason"
|
||||
],
|
||||
"properties": {
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"AVAILABLE",
|
||||
"PENDING_ALLOCATION"
|
||||
]
|
||||
},
|
||||
"totals": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/TripFinanceMoney"
|
||||
}
|
||||
},
|
||||
"sources": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/TripFinanceSource"
|
||||
}
|
||||
},
|
||||
"documents": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/TripFinanceDocument"
|
||||
}
|
||||
},
|
||||
"reason": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user