diff --git a/backend/services/contribution-service/src/application/services/contribution-calculation.service.ts b/backend/services/contribution-service/src/application/services/contribution-calculation.service.ts index 665a9582..568af828 100644 --- a/backend/services/contribution-service/src/application/services/contribution-calculation.service.ts +++ b/backend/services/contribution-service/src/application/services/contribution-calculation.service.ts @@ -378,6 +378,7 @@ export class ContributionCalculationService { const recordEvent = new SystemContributionRecordCreatedEvent( savedRecord.id, sys.accountType, + sys.regionCode, // 传递区域代码 sourceAdoptionId, sourceAccountSequence, sys.rate.value.toNumber(), diff --git a/backend/services/contribution-service/src/domain/events/system-contribution-record-created.event.ts b/backend/services/contribution-service/src/domain/events/system-contribution-record-created.event.ts index 58100ce4..6ca1b87b 100644 --- a/backend/services/contribution-service/src/domain/events/system-contribution-record-created.event.ts +++ b/backend/services/contribution-service/src/domain/events/system-contribution-record-created.event.ts @@ -8,7 +8,8 @@ export class SystemContributionRecordCreatedEvent { constructor( public readonly recordId: bigint, // 明细记录ID - public readonly systemAccountType: string, // 系统账户类型(组合键) + public readonly accountType: string, // 系统账户类型(OPERATION/PROVINCE/CITY/HEADQUARTERS) + public readonly regionCode: string | null, // 区域代码(省/市代码,如 440000, 440100) public readonly sourceAdoptionId: bigint, // 来源认种ID public readonly sourceAccountSequence: string, // 认种人账号 public readonly distributionRate: number, // 分配比例 @@ -22,7 +23,8 @@ export class SystemContributionRecordCreatedEvent { return { eventType: SystemContributionRecordCreatedEvent.EVENT_TYPE, recordId: this.recordId.toString(), - systemAccountType: this.systemAccountType, + accountType: this.accountType, + regionCode: this.regionCode, sourceAdoptionId: this.sourceAdoptionId.toString(), sourceAccountSequence: this.sourceAccountSequence, distributionRate: this.distributionRate,