diff --git a/backend/services/authorization-service/src/infrastructure/persistence/repositories/monthly-assessment.repository.impl.ts b/backend/services/authorization-service/src/infrastructure/persistence/repositories/monthly-assessment.repository.impl.ts index 62a7e21d..058a9ac3 100644 --- a/backend/services/authorization-service/src/infrastructure/persistence/repositories/monthly-assessment.repository.impl.ts +++ b/backend/services/authorization-service/src/infrastructure/persistence/repositories/monthly-assessment.repository.impl.ts @@ -190,6 +190,10 @@ export class MonthlyAssessmentRepositoryImpl implements IMonthlyAssessmentReposi assessmentMonth: month.value, roleType: roleType, regionCode: regionCode.value, + // 过滤掉已撤销授权的考核记录 + authorization: { + status: { not: 'REVOKED' }, + }, }, orderBy: [{ exceedRatio: 'desc' }, { completedAt: 'asc' }], }) @@ -204,6 +208,10 @@ export class MonthlyAssessmentRepositoryImpl implements IMonthlyAssessmentReposi where: { assessmentMonth: month.value, roleType: roleType, + // 过滤掉已撤销授权的考核记录 + authorization: { + status: { not: 'REVOKED' }, + }, }, orderBy: [{ exceedRatio: 'desc' }, { completedAt: 'asc' }], })