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());
+1
View File
@@ -262,3 +262,4 @@
- 2026-07-14 BRD 4.3.4 内容现状核对:本地开发租户当前启用生活顾问场景 `12` 条,但服务推介/增值场景 `0` 条、日常服务场景 `0` 条;已入库案例 `2` 条,知识附件处理数 `0` 条。严格预检继续把两类核心流程和正式内容数量作为事实门禁;本轮不自拟业务话术或伪造知识/案例数据,待内容负责人提供正式 SOP、成功条件和脱敏素材后再入库验收。
- 2026-07-14 BRD G1/4.5 证据包评分边界修复:成长/晋升证据包此前只展示 AI 测评分,人工校准结果仅存在于试点 CSV;现复用 `aihr_practice_calibration` 最新记录,向管理端和员工端同时返回人工校准分、最终采用分和校准样本数,并在导出证据包中保留三项字段。未校准时明确显示“待采集”,不把 AI 分伪装成人工结论;AI 仍仅作训练参考,不直接生成绩效或晋升结论。
- 2026-07-14 BRD 4.5/4.7 案例贡献证据边界复核:现有 `aihr_case_record.owner` 仅保存负责人展示值(系统用户或员工末四位),没有稳定 `ext_party_id`、采纳审核任务或 `incentive_point.source='case_contribution'` 关联;当前案例上传/入库数量不能安全算作员工案例贡献。成长证据包现明确提示“案例上传/入库”与“正式采纳、署名、积分”分离,未把案例数量伪装成晋升证据;待 HR 确认 `review_task` 终审、署名和积分规则后,再设计正式关联与统计。
- 2026-07-14 BRD 4.5/B5 贡献度口径修复:能力画像此前把训练次数和待复盘状态混入 `contribution`,会将训练活跃度误显示为有效贡献;现将贡献度收敛为 `aihr_practice_session.incentive_point` 的人工确认分,训练次数继续单独展示。未新增积分来源或自动案例计分,正式案例贡献仍等待 `review_task`/署名/积分规则。
+1 -1
View File
@@ -41,7 +41,7 @@
<article class="metric-card">
<span>贡献度</span>
<strong>{{ profile?.contribution ?? 0 }}</strong>
<small>复盘学分 + 训练完成</small>
<small>仅计入人工确认的有效贡献分,训练次数单独统计</small>
</article>
</section>