fix(authorization): 自助申请市/省团队激活权益时创建考核评估记录

自助申请流程在激活权益时缺少创建 MonthlyAssessment 记录的逻辑,
导致火柴人排名功能无法正常显示。本次修复在 processCityTeamApplication
和 processProvinceTeamApplication 方法中添加了 createInitialAssessment 调用。

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2025-12-23 00:43:29 -08:00
parent 2d3891740c
commit d029cd5872
1 changed files with 4 additions and 0 deletions

View File

@ -2973,6 +2973,8 @@ export class AuthorizationApplicationService {
const subordinateTreeCount = teamStats?.subordinateTeamPlantingCount || 0
if (subordinateTreeCount >= authorization.getInitialTarget()) {
authorization.activateBenefit()
// 创建首月考核评估记录
await this.createInitialAssessment(authorization, teamStats!)
}
await this.authorizationRepository.save(authorization)
@ -3034,6 +3036,8 @@ export class AuthorizationApplicationService {
const subordinateTreeCount = teamStats?.subordinateTeamPlantingCount || 0
if (subordinateTreeCount >= authorization.getInitialTarget()) {
authorization.activateBenefit()
// 创建首月考核评估记录
await this.createInitialAssessment(authorization, teamStats!)
}
await this.authorizationRepository.save(authorization)