Repository navigation
feat(core): v0.5 P3 manual scoring, grading, director publish and appeals - #63
Merged
Merged
Conversation
…eals - Scorers are assigned when score lines are generated: manual KPIs and automatic KPIs without data take a scorer by the new srm_kpi.scorer_type from the supplier's categories (new srm_category.buyer / evaluator), falling back to the category manager; scorers are notified and the review gets a scoring due date (perf_score_days). - srm_score_submit screen flow: a scorer sees and fills only the lines assigned to them, one screen per line, prefilled for revisions; the review moves to reviewing once every line is scored. - srm_score_due_notice reminds open scorers 3 days before the due date; srm_score_overdue_sweep gives missing lines perf_missing_score, marks them defaulted and moves the review on. - srm_performance_publish totals and grades the review (perf_grade_min), then the procurement director approves (published, supplier grade and latest_score written unless a later period is already published) or rejects (back to scoring with the comment). A director who scored the review cannot approve it (BR-11 style recheck). - srm_appeal_submit (recorded by buyers before the portal, once, within perf_appeal_days) and srm_appeal_resolve (director: uphold or adjust the total, regrade, sync the supplier); srm_performance_void for reviews in manual scoring. New position srm_evaluator, views and nav entry. - Design docs 02 / 03 / 05 and params updated first. Closes #52 Claude-Session: https://claude.ai/code/session_01WFrb9tuVXniHJeMavJzpES Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by 田騏 · project thread
Closes #52 (overview #49). Builds on #51 / PR #62.
改了什么
设计先行:02 §4.1 / §4.7 / §5.7、03 §10 第 3–5、7 步与 §13、05 §2 / 通知表、
params/core.yaml先改,再改元数据。评分人指派(03 §10 第 3 步)
srm_kpi.scorer_type(品类经理 / 采购员 / SQE / 需求部门评分人,默认品类经理);srm_category加buyer、evaluator两个人员字段;新岗位srm_evaluator(只挂srm_internal_base)。scorer:人工指标和没有数据的自动指标按scorer_type从供应商的品类取(物资类别最高、设了这个人的品类优先,没设退回品类经理,仍没有则不指派、截止后按缺评处理);算出得分的自动指标不指派。转人工评分时写score_due(当天 +perf_score_days)并通知各评分人。提交评分
srm_score_submit(screen flow):只列出指派给本人的评分项,一项一屏(指标、评分规则、原始值、权重),填 0–100 分与说明,已评的带出原分可改;全部评分项都已评分时考评单转审定中。逐项循环用顶层回边(平台不允许 screen 在 loop 节点里暂停)。考评单和评分明细仍对所有内部岗位只读,绕过界面改不了别人的评分项(有测试)。截止与缺评:
srm_score_due_notice(time_relative,截止前 3 天提醒仍有未评项的评分人);srm_score_overdue_sweep(每日 04:00,追赶式)把过期考评单的未评项取perf_missing_score(示例 60)、标记defaulted(未评),转审定中。汇总分级与审定
srm_performance_publish:total_score = Σ(score × weight),各维度得分为维度内加权平均,两位小数,等级取perf_grade_min;采购总监审批(position)。通过 →published,写审定人、意见、发布日期,回写供应商grade、latest_score(新增字段,02 §4.1 早已列出;已有更晚期间已发布的不回写)。驳回即退回重评:回到scoring(状态机加reviewing → scoring),意见写review_comment,截止日重算,通知评分人。职责分离:审定人是本考评单评分人时这次通过不算数,重新开一轮(同处置单做法,objectstack#25446)。只有一级审批,不涉及 objectstack#24817。申诉与作废:
srm_appeal_submit(v0.6 前由采购员 / 采购主管 / 品类经理代录,发布后perf_appeal_days内一次)→appealed,通知采购总监;srm_appeal_resolve(采购总监,评分人除外)维持原结果或调整总分,重算等级、同步供应商,回到published,处理人与结果留痕;srm_performance_void(采购总监,人工评分阶段,写理由)。界面:考评单按钮 4 个;视图「审定中」「申诉中」「已发布(按等级分组)」;评分明细视图「待我评分」并加导航;英文词条全覆盖。新参数
perf_score_days、perf_missing_score,flow 常量放在flows/performance/params.ts,测试逐项核对与参数一致。自己做的取舍(与已有决定不冲突,记在设计文档里)
怎么验证的
pnpm validate、pnpm lint、pnpm typecheck、pnpm i18n:check、pnpm test(21 个文件 219 个用例通过,1 个负载测试按开关跳过)、pnpm build全部通过;governance/scripts/build.py --check两种组合通过。test/performance-publish.test.ts(15 个用例,数据全部在测试里生成):评分人指派与回退、数据不全的自动指标交给评分人、只看到本人评分项 / 无指派被拒 / API 直接改被拒、汇总分级与维度分、等级边界 90 / 89.99 / 70 / 69.99、截止前不处理 / 截止后默认 60 分标记未评 / 重跑不重复、截止前 3 天提醒、评分人兼采购总监的审定不计入、驳回退回重评(屏幕带出原分)、旧期间不覆盖供应商等级、申诉一次 / 期限 / 代录权限 / 评分人不能处理 / 调整总分回写、维持原结果、作废权限。SRM_LOAD_TEST=1:200 家供应商生成仍在 10 秒内。Generated by Claude Code