fix(aihr): align contribution score with reviewed evidence

This commit is contained in:
2026-07-14 13:28:06 +08:00
parent 36683fa3cf
commit acc895e240
4 changed files with 4 additions and 4 deletions
@@ -1573,9 +1573,7 @@ public class AihrPracticeSeedService {
), tenantId(), party, party);
CompetencySnapshot snapshot = rows.isEmpty() ? new CompetencySnapshot(0, 0, 0, 0, 0, 0, 0, 0) : rows.get(0);
int trainingMinutes = snapshot.completed() * 8;
int contribution = snapshot.completed() == 0 && snapshot.incentivePoints() == 0
? 0
: Math.min(100, snapshot.incentivePoints() + snapshot.completed() * 8 + Math.max(0, 100 - snapshot.pendingReview() * 10) / 5);
int contribution = Math.min(100, Math.max(0, snapshot.incentivePoints()));
int assessmentScore = snapshot.score();
String aiLevel = aiLevel(snapshot.completed(), assessmentScore);
return new CompetencyResponse(
@@ -643,6 +643,7 @@ public class AihrPracticeSeedServiceTest {
CompetencyResponse profile = service.competency("13900001001");
assertEquals("初级", profile.aiLevel());
assertEquals(20, profile.contribution());
assertEquals(100, profile.growthPath().get(0).progress());
assertEquals("已达成", profile.growthPath().get(0).status());
assertEquals(95, profile.growthPath().get(1).progress());