fix(authorization): 火柴人排名过滤已撤销授权的考核记录
- findRankingsByMonthAndRegion 和 findRankingsByMonthAndRoleType 增加过滤条件 - 排除 authorization.status = 'REVOKED' 的记录 - 解决同一用户因有多条授权记录(含已撤销)而重复显示的问题 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
5419b15bf1
commit
8b80e45524
|
|
@ -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' }],
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue