• Data Governance Dev's avatar
    feat(standards): 公积金领域 8 项新 indicator + 字段注释匹配 · b783f6ff
    Data Governance Dev authored
    字段匹配双路化(comment_keywords 优先于 applies_to_fields):
      - standards/base.py: BaseStandard 加 comment_keywords: list[str]
      - web/core/step_impl/step7_standards.py: 新增 _collect_hit_columns()
        第 1 路按字段名命中,第 2 路按字段注释 substring 命中(不区分大小写)
        两路并集去重(按 (table, column))
      - standards/registry.py: list_all_standards() 输出 comment_keywords
    
    8 个 indicator 新增/修改:
      - IND-003-a (改): 加「不可全 0」前置校验
      - IND-005-a (新): GB/T 15835 固定电话(区号 3~4 位 + 号码 7~8 位)
      - IND-006-a (新): 通讯地址(长度 [4,200],非全空白/符号/数字)
      - IND-006-b (新): GB/T 23705 邮编(6 位数字)
      - IND-007-a (新): 个人公积金账号(仅位数 check,10/12/18 位,applies_to_fields 故意留空)
      - IND-008-a (新): 首次参加工作年月(YYYYMM/MMDD)
      - IND-009-a (新): 用工类型(6 值枚举 + 文字形式)
      - IND-010-a (新): 本地户籍标记(1/0、是/否、Y/N、T/F、TRUE/FALSE)
      - IND-011-a (新): 职工状态(5 值枚举 + 流转规则说明)
    
    orchestrator / 前端:
      - web/core/orchestrator.py: _derive_target / _derive_check 加 8 个新 indicator 分支;
        _register_indicator_steps() description 同时显示字段名 + 注释关键字
      - web/configs/analysis_tree.json: 注册 8 个新 step_id;新增「业务字段规范」组(默认展开)
      - 国标字段规范组加 std_ind_005_a
    
    KPI 去 card 化:
      - web/static/style.css: 去掉 .kpi-card 的 background / shadow / border / radius / padding;
        改为数字带色 + label 灰字的纯文字布局,密排紧凑
    
    已知限制:
      - IND-011-a 流转限制(销户 → 不可缴存、封存 → 可偿贷)需跨表 SQL JOIN,
        本轮仅在 description 写明业务规则,留待后续跨表 indicator
    
    WORKLOG: docs/WORKLOG.md 2026-08-10 第二条
    b783f6ff
orchestrator.py 35.6 KB