Skip to content

feat(core): v0.4 Q3 supplier audits and annual audit plan - #46

Merged
marchtian merged 3 commits into
mainfrom
claude/project-thread-xxpdv1
Oct 24, 2026
Merged

marchtian merged 3 commits into
mainfrom
claude/project-thread-xxpdv1

Conversation

@marchtian

Copy link
Copy Markdown
Collaborator

Requested by 田騏 · project thread

Closes #38 (overview #34).

改了什么

  • srm_supplier_audit 供应商审核(AUD{YYYY}{00000}):准入 / 年度 / 专项;planned → done / cancelled(取消写原因,完成后不再变);总分、最低审核块得分、结论、样品结论、审核报告与评分表。结论按 audit_score_thresholds(WI-01 6.6.1)校验,只拦「高判」。
  • srm_supplier_audit_finding 审核问题项(子对象):严重 / 一般不符合、观察项、否决项、整改要求、关联整改单;严重项数、否决项数汇总到审核用于校验结论。
  • 准入联动(FR-204):srm_audit_admission_apply 把准入审核结论写回申请(新增只读字段 audit_passed、audit_result);校验规则 audit_before_review 让高风险申请没有通过 / 有条件通过的审核就进不了准入评审;有条件通过的申请批准后品类资格为「试供」(WI-01 6.6.2)。
  • 转整改单:screen flow srm_audit_finding_to_scar(SQE、质量经理,审核已完成)为每条未转出的不符合项开一张 source = audit 的整改单,双向关联,重复点击不重复开;srm_quality_issue.audit 字段。
  • 年度审核计划:srm_audit_plan_generate 每月 1 日追赶式运行,按最高物资类别定频次(新示例参数 annual_audit_frequency:A 12 / B 24 个月,C 不定期),按「供应商 + 计划年度」防重;日历视图按 planned_date。
  • 视图、导航、权限、英文翻译;设计 02/03/04/07、README、ADR-0008/0009 补充说明、params/core.yaml、体系文件 WI-01(6.9.1 引用参数、新增 6.9.3 与信息化控制行)同步。

与设计的差异

  • 检查表 / 问题项原设计为 repeater。平台的 repeater 不能声明子字段,表单只能当无结构表格编辑、也无法把整改单回填到某条问题项,所以问题项改为子对象,逐条评分留在评分表附件里。核心对象 27 → 28(待用户确认)。
  • OWD 暂为 public_read_write(同整改单,objectstack#25470),只有质量岗位能改,不开放删除。
  • 03 §11「经 SQE 核验才解除资质异常」核对后改期到 v0.6 门户:门户前证书由 SQE 自己录入,再勾一次核验没意义。

怎么验证的

  • 新增 test/supplier-audit.test.ts 11 个用例:高风险申请审核前被拦、有条件通过写回后可评审且批准为试供、不通过被拦、分数线校验、取消 / 完成状态、转整改单(权限、未完成拒绝、严重度映射、回填、不重复)、年度计划(A/B 频次、年底到期、A+B 取 A、C 类与冻结不排、跑两遍不重复、取消后不再生成)。
  • admission-countersign.test.ts 补准入审核前置;权限快照更新。
  • 本地 pnpm validate / lint / typecheck / i18n:check / test(166 通过)/ build,以及两条 governance/scripts/build.py --check 全部通过。

Generated by Claude Code

- srm_supplier_audit (AUD{YYYY}{00000}): admission / annual / special audits with
  planned -> done / cancelled, total and lowest block score, result checked
  against audit_score_thresholds (only an over-generous result is refused),
  report and scoresheet files
- srm_supplier_audit_finding: findings as a child object (the platform repeater
  cannot declare sub-fields), serious / veto counts summed onto the audit
- srm_audit_admission_apply: a completed admission audit writes audit_passed /
  audit_result back to the application; a high-risk application cannot enter
  the admission review without a passed or conditional audit (FR-204), and a
  conditional pass grants trial categories on approval (WI-01 6.6.2)
- srm_audit_finding_to_scar: screen flow raising one SCAR (source = audit) per
  open nonconformity, linked both ways, never twice; srm_quality_issue.audit
- srm_audit_plan_generate: monthly catch-up schedule planning annual audits by
  material class (new example param annual_audit_frequency: A 12 / B 24
  months), idempotent per supplier and plan year
- views (planned, calendar, admission), workbench nav, permissions, English
  translations, tests; design docs 02/03/04/07, README and WI-01 synced

Claude-Session: https://claude.ai/code/session_01RSBzVuyvrxknGC9yW432s4

Co-authored-by: Claude <noreply@anthropic.com>
@marchtian marchtian self-assigned this Oct 24, 2026
@marchtian
marchtian merged commit b1fdfb3 into main Oct 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v0.4 Q3:供应商审核 srm_supplier_audit 与年度审核计划

2 participants