feat(bot-bridge): 新增会计科目写入端点 POST /api/cma/bot/subjects — 行级全量校验+按subject_code幂等UPSERT(dry_run/update_existing开关)+L3留痕, 绝不DELETE (dama-cma-subjects-write-endpoint-20260912)

This commit is contained in:
Hermes CI Fix
2026-09-12 10:42:46 +08:00
parent af541e9043
commit 840d98765d
4 changed files with 400 additions and 6 deletions
+3 -1
View File
@@ -30,6 +30,7 @@ low/high 与 L1-L4 是两套正交分级,勿混:
POST /api/cma/bot-kpis/{kpi_id}/value — 写KPI当前值 (L2)
POST /api/cma/bot/import — Excel批量导入KPI实际值 (L3)
POST /api/cma/bot/dict/zxt-account — 智享通科目字典 UPSERT(zxt_account_dict) (L3, 2026-09-12 新增)
POST /api/cma/bot/subjects — 会计科目字典 UPSERT(subjects,幂等/绝不DELETE) (L3, 2026-09-12 新增)
POST /api/cma/bot-bridge/mpm-result — MPM分析结果→KPI实际值 (L3)
POST /api/cma/bot-bridge/verify/{action_plan_id} — 验证ActionPlan执行 (L2, 轻量verify_log)
POST /api/cma/bot/okr/create — 创建OKR Objective (L2, 管理类业务写,保留评审: 2026-09-03 P1待办)
@@ -90,11 +91,12 @@ API_RISK_MAP = {
"POST /api/cma/bot-bridge/verify/{action_plan_id}": "L2",
"POST /api/cma/bot/okr/create": "L2", # 单条OKR创建(方案清单未列出,按单条业务写归类)
"POST /api/cma/bot/ai/suggestions": "L2", # Bot高危建议创建通道(写操作语义 high,见文件头注释;本身只建建议不直写考核基准)
# ── L3 批量写/创建(4项) ──
# ── L3 批量写/创建(5项) ──
"POST /api/cma/bot/import": "L3",
"POST /api/cma/bot/kpis/create-with-links": "L3",
"POST /api/cma/bot-bridge/mpm-result": "L3",
"POST /api/cma/bot/dict/zxt-account": "L3", # 智享通科目字典 UPSERT(2026-09-12 ops-cma-dict-write-endpoint)
"POST /api/cma/bot/subjects": "L3", # 会计科目字典 UPSERT(2026-09-12 dama-cma-subjects-write-endpoint)
# ── L4 危险:Bot API面不存在(安全底线,不添加) ──
}