Files
X-Financial/server/rules/risk-rules/risk.application.meal_high_value_without_preapproval.json
caoxiaozhu e124e4bbcb feat: 报销审批流重构与管家计划全链路贯通
- 重构报销状态注册表、审批流路由与平台风险标记
- 完善管家意图规划器与模型计划构建器全链路
- 新增 OCR Worker 脚本、数据库会话管理与通知状态
- 优化文档中心、日志视图、预算中心与员工管理交互
- 增强工作台摘要、图标资源与全局主题样式
- 补充审批路由、状态注册、OCR 服务与管家规划器测试覆盖
2026-06-06 17:19:07 +08:00

218 lines
4.9 KiB
JSON

{
"schema_version": "2.0",
"rule_code": "risk.application.meal_high_value_without_preapproval",
"name": "??????????",
"description": "????????? 500 ?????????????",
"enabled": true,
"requires_attachment": false,
"risk_dimension": "expense_control_demo",
"risk_category": "????",
"ontology_signal": "application_required",
"evaluator": "template_rule",
"template_key": "composite_rule_v1",
"finance_rule_code": "expense.preapproval.policy",
"finance_rule_sheet": "????????",
"business_stage": [
"reimbursement"
],
"expense_types": [
"meal",
"entertainment"
],
"budget_required": true,
"applies_to": {
"domains": [
"expense"
],
"expense_types": [
"meal",
"entertainment"
],
"business_stages": [
"reimbursement"
]
},
"inputs": {
"fields": [
{
"key": "claim.amount",
"label": "????",
"type": "number",
"source": "claim"
},
{
"key": "claim.expense_type",
"label": "????",
"type": "enum",
"source": "claim"
},
{
"key": "claim.department_name",
"label": "??",
"type": "text",
"source": "claim"
},
{
"key": "claim.reason",
"label": "??",
"type": "text",
"source": "claim"
},
{
"key": "item.item_reason",
"label": "????",
"type": "text",
"source": "item"
},
{
"key": "application.id",
"label": "???ID",
"type": "text",
"source": "application"
},
{
"key": "application.claim_no",
"label": "????",
"type": "text",
"source": "application"
},
{
"key": "application.status",
"label": "????",
"type": "enum",
"source": "application"
},
{
"key": "application.approved_amount",
"label": "??????",
"type": "number",
"source": "application"
},
{
"key": "application.expense_type",
"label": "??????",
"type": "enum",
"source": "application"
},
{
"key": "application.department_name",
"label": "????",
"type": "text",
"source": "application"
}
]
},
"params": {
"template_key": "composite_rule_v1",
"semantic_type": "preapproval_required_amount_threshold",
"field_keys": [
"claim.amount",
"claim.expense_type",
"claim.department_name",
"claim.reason",
"item.item_reason",
"application.id",
"application.claim_no",
"application.status",
"application.approved_amount",
"application.expense_type",
"application.department_name"
],
"conditions": [
{
"id": "amount_exceeds_preapproval_threshold",
"operator": "numeric_compare",
"left_fields": [
"claim.amount"
],
"threshold": 500,
"compare": "gt"
},
{
"id": "application_present",
"operator": "exists_any",
"fields": [
"application.id",
"application.claim_no"
]
}
],
"hit_logic": {
"all": [
"amount_exceeds_preapproval_threshold",
{
"not": "application_present"
}
]
},
"formula": "amount > threshold AND NOT hasApplication",
"condition_summary": "??????????? 500 ????????????????",
"message_template": "??????? 500 ?????????????????????????",
"finance_rule_code": "expense.preapproval.policy",
"finance_rule_sheet": "????????",
"business_stage": [
"reimbursement"
],
"expense_types": [
"meal",
"entertainment"
],
"budget_required": true,
"threshold_amount": 500,
"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": {
"severity": "none",
"action": "continue"
},
"fail": {
"severity": "high",
"action": "manual_review",
"risk_score": 88
}
},
"metadata": {
"owner": "??????",
"stability": "platform",
"source_ref": "??????????",
"created_at": "2026-06-05T00:00:00+08:00",
"created_by": "system",
"risk_score": 88,
"risk_level": "high",
"rule_title": "??????????",
"finance_rule_code": "expense.preapproval.policy",
"finance_rule_sheet": "????????",
"business_stage": [
"reimbursement"
],
"expense_types": [
"meal",
"entertainment"
],
"budget_required": true
},
"severity": "high",
"risk_score": 88,
"risk_level": "high"
}