This commit is contained in:
2026-08-13 11:57:37 +08:00
parent 847eaae268
commit 4955f44957
3 changed files with 152 additions and 2 deletions
@@ -501,6 +501,28 @@ paths:
'404': {$ref: '#/components/responses/BusinessError'}
'409': {$ref: '#/components/responses/BusinessError'}
'503': {$ref: '#/components/responses/BusinessError'}
/platform/finance/v1/settlements/{settlementId}/actions:
post:
operationId: actionSettlement
summary: 作废或重开未发生收付款的结算单
x-contract-status: FROZEN
x-idempotency: FULL_REQUEST_HASH_SAME_REPLAY_DIFFERENT_CONFLICT
x-state-machine: ISSUED -> VOIDED -> ISSUED;paidAmount 必须为 0
x-permission: platform:finance:settlement:void
parameters:
- $ref: '#/components/parameters/SettlementId'
- $ref: '#/components/parameters/IdempotencyKey'
requestBody:
required: true
content:
application/json:
schema: {$ref: '#/components/schemas/SettlementActionRequest'}
responses:
'200': {$ref: '#/components/responses/SettlementDetailResponse'}
'400': {$ref: '#/components/responses/BusinessError'}
'403': {$ref: '#/components/responses/BusinessError'}
'404': {$ref: '#/components/responses/BusinessError'}
'409': {$ref: '#/components/responses/BusinessError'}
components:
parameters:
InternalServiceToken:
@@ -1135,6 +1157,14 @@ components:
items: {$ref: '#/components/schemas/Id'}
expectedVersion: {type: integer, minimum: 0}
remark: {type: string, maxLength: 500}
SettlementActionRequest:
type: object
additionalProperties: false
properties:
action: {type: string, enum: [VOID, REOPEN]}
reason: {type: string, minLength: 1, maxLength: 500}
expectedVersion: {type: integer, minimum: 0}
required: [action, reason, expectedVersion]
ErrorEnvelope:
allOf:
- $ref: '#/components/schemas/TraceMeta'