feat: 报销审批流重构与管家计划全链路贯通
- 重构报销状态注册表、审批流路由与平台风险标记 - 完善管家意图规划器与模型计划构建器全链路 - 新增 OCR Worker 脚本、数据库会话管理与通知状态 - 优化文档中心、日志视图、预算中心与员工管理交互 - 增强工作台摘要、图标资源与全局主题样式 - 补充审批路由、状态注册、OCR 服务与管家规划器测试覆盖
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"schema_version": "2.0",
|
||||
"rule_code": "risk.application.office_bulk_without_purchase",
|
||||
"name": "办公用品大额采购未申请",
|
||||
"description": "批量办公用品或设备采购达到阈值但未走采购申请。",
|
||||
"name": "???????????",
|
||||
"description": "???????????????? 2000 ???????????",
|
||||
"enabled": true,
|
||||
"requires_attachment": false,
|
||||
"risk_dimension": "expense_control_demo",
|
||||
"risk_category": "申请前置",
|
||||
"risk_category": "????",
|
||||
"ontology_signal": "application_required",
|
||||
"evaluator": "template_rule",
|
||||
"template_key": "keyword_match_v1",
|
||||
"finance_rule_code": "expense.application.policy",
|
||||
"finance_rule_sheet": "费用申请前置规则",
|
||||
"template_key": "composite_rule_v1",
|
||||
"finance_rule_code": "expense.preapproval.policy",
|
||||
"finance_rule_sheet": "????????",
|
||||
"business_stage": [
|
||||
"reimbursement"
|
||||
],
|
||||
@@ -34,68 +34,75 @@
|
||||
"fields": [
|
||||
{
|
||||
"key": "claim.amount",
|
||||
"label": "报销金额",
|
||||
"label": "????",
|
||||
"type": "number",
|
||||
"source": "claim"
|
||||
},
|
||||
{
|
||||
"key": "claim.expense_type",
|
||||
"label": "费用类型",
|
||||
"label": "????",
|
||||
"type": "enum",
|
||||
"source": "claim"
|
||||
},
|
||||
{
|
||||
"key": "claim.department_name",
|
||||
"label": "部门",
|
||||
"label": "??",
|
||||
"type": "text",
|
||||
"source": "claim"
|
||||
},
|
||||
{
|
||||
"key": "claim.reason",
|
||||
"label": "事由",
|
||||
"label": "??",
|
||||
"type": "text",
|
||||
"source": "claim"
|
||||
},
|
||||
{
|
||||
"key": "item.item_reason",
|
||||
"label": "明细说明",
|
||||
"label": "????",
|
||||
"type": "text",
|
||||
"source": "item"
|
||||
},
|
||||
{
|
||||
"key": "application.id",
|
||||
"label": "申请单",
|
||||
"label": "???ID",
|
||||
"type": "text",
|
||||
"source": "application"
|
||||
},
|
||||
{
|
||||
"key": "application.claim_no",
|
||||
"label": "????",
|
||||
"type": "text",
|
||||
"source": "application"
|
||||
},
|
||||
{
|
||||
"key": "application.status",
|
||||
"label": "申请状态",
|
||||
"label": "????",
|
||||
"type": "enum",
|
||||
"source": "application"
|
||||
},
|
||||
{
|
||||
"key": "application.approved_amount",
|
||||
"label": "申请审批金额",
|
||||
"label": "??????",
|
||||
"type": "number",
|
||||
"source": "application"
|
||||
},
|
||||
{
|
||||
"key": "application.expense_type",
|
||||
"label": "申请费用类型",
|
||||
"label": "??????",
|
||||
"type": "enum",
|
||||
"source": "application"
|
||||
},
|
||||
{
|
||||
"key": "application.department_name",
|
||||
"label": "申请部门",
|
||||
"label": "????",
|
||||
"type": "text",
|
||||
"source": "application"
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"template_key": "keyword_match_v1",
|
||||
"template_key": "composite_rule_v1",
|
||||
"semantic_type": "preapproval_required_amount_threshold",
|
||||
"field_keys": [
|
||||
"claim.amount",
|
||||
"claim.expense_type",
|
||||
@@ -103,31 +110,72 @@
|
||||
"claim.reason",
|
||||
"item.item_reason",
|
||||
"application.id",
|
||||
"application.claim_no",
|
||||
"application.status",
|
||||
"application.approved_amount",
|
||||
"application.expense_type",
|
||||
"application.department_name"
|
||||
],
|
||||
"search_fields": [
|
||||
"claim.reason",
|
||||
"item.item_reason",
|
||||
"claim.expense_type"
|
||||
"conditions": [
|
||||
{
|
||||
"id": "amount_exceeds_preapproval_threshold",
|
||||
"operator": "numeric_compare",
|
||||
"left_fields": [
|
||||
"claim.amount"
|
||||
],
|
||||
"threshold": 2000,
|
||||
"compare": "gt"
|
||||
},
|
||||
{
|
||||
"id": "application_present",
|
||||
"operator": "exists_any",
|
||||
"fields": [
|
||||
"application.id",
|
||||
"application.claim_no"
|
||||
]
|
||||
}
|
||||
],
|
||||
"keywords": [
|
||||
"办公采购",
|
||||
"大额办公用品",
|
||||
"采购申请"
|
||||
],
|
||||
"condition_summary": "办公用品单次金额达到采购阈值且缺少采购申请时触发。",
|
||||
"finance_rule_code": "expense.application.policy",
|
||||
"finance_rule_sheet": "费用申请前置规则",
|
||||
"hit_logic": {
|
||||
"all": [
|
||||
"amount_exceeds_preapproval_threshold",
|
||||
{
|
||||
"not": "application_present"
|
||||
}
|
||||
]
|
||||
},
|
||||
"formula": "amount > threshold AND NOT hasApplication",
|
||||
"condition_summary": "???????????????? 2000 ????????????????",
|
||||
"message_template": "??????? 2000 ??????????????????????????????",
|
||||
"finance_rule_code": "expense.preapproval.policy",
|
||||
"finance_rule_sheet": "????????",
|
||||
"business_stage": [
|
||||
"reimbursement"
|
||||
],
|
||||
"expense_types": [
|
||||
"office"
|
||||
],
|
||||
"budget_required": true
|
||||
"budget_required": true,
|
||||
"threshold_amount": 2000,
|
||||
"rule_ir": {
|
||||
"facts": [
|
||||
{
|
||||
"id": "A",
|
||||
"label": "????",
|
||||
"fields": [
|
||||
"claim.amount"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "B",
|
||||
"label": "???",
|
||||
"fields": [
|
||||
"application.id",
|
||||
"application.claim_no"
|
||||
]
|
||||
}
|
||||
],
|
||||
"hit_logic": "A > threshold AND NOT EXISTS(B)"
|
||||
}
|
||||
},
|
||||
"outcomes": {
|
||||
"pass": {
|
||||
@@ -135,22 +183,22 @@
|
||||
"action": "continue"
|
||||
},
|
||||
"fail": {
|
||||
"severity": "medium",
|
||||
"severity": "high",
|
||||
"action": "manual_review",
|
||||
"risk_score": 78
|
||||
"risk_score": 84
|
||||
}
|
||||
},
|
||||
"metadata": {
|
||||
"owner": "风控与审计部",
|
||||
"owner": "??????",
|
||||
"stability": "platform",
|
||||
"source_ref": "费用管控 Demo 风险规则库",
|
||||
"created_at": "2026-05-31T00:10:41.811910+00:00",
|
||||
"source_ref": "??????????",
|
||||
"created_at": "2026-06-05T00:00:00+08:00",
|
||||
"created_by": "system",
|
||||
"risk_score": 78,
|
||||
"risk_level": "medium",
|
||||
"rule_title": "办公用品大额采购未申请",
|
||||
"finance_rule_code": "expense.application.policy",
|
||||
"finance_rule_sheet": "费用申请前置规则",
|
||||
"risk_score": 84,
|
||||
"risk_level": "high",
|
||||
"rule_title": "???????????",
|
||||
"finance_rule_code": "expense.preapproval.policy",
|
||||
"finance_rule_sheet": "????????",
|
||||
"business_stage": [
|
||||
"reimbursement"
|
||||
],
|
||||
@@ -159,7 +207,7 @@
|
||||
],
|
||||
"budget_required": true
|
||||
},
|
||||
"severity": "medium",
|
||||
"risk_score": 78,
|
||||
"risk_level": "medium"
|
||||
"severity": "high",
|
||||
"risk_score": 84,
|
||||
"risk_level": "high"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user