feat: 增强风险规则生成引擎与预算中心页面

后端拆分风险规则生成为解释器、语义分析、本体对齐等子模块,
优化模板执行和流程图生成,完善员工种子数据和导入逻辑,增强
报销单权限策略和草稿持久化,前端新增预算中心视图和趋势图
组件,重构审计页面和风险规则测试对话框交互,完善文档中心
和报销创建页面细节,补充单元测试覆盖。
This commit is contained in:
caoxiaozhu
2026-05-26 09:15:14 +08:00
parent d0e946cf47
commit 0e861d8fa6
150 changed files with 14953 additions and 4099 deletions

View File

@@ -399,6 +399,10 @@ class OntologyDetectionMixin:
"missing_slots 使用简短 snake_case例如 expense_type, amount, "
"customer_name, participants, attachments。"
"entity_hints 只填写你比较确定的业务对象;如果不确定,可以返回空数组。"
"费用申请场景下,建议把干净的申请事由放入 type=reason"
"把出行方式放入 type=transport_mode取值优先为飞机、火车、轮船。"
"reason 只能保留真实业务目的,例如“服务美团业务部署”,"
"不要把发生时间、地点、出差天数、交通方式混进 reason。"
)
user_prompt = (
"请根据以下事实输出 JSON\n"
@@ -415,6 +419,9 @@ class OntologyDetectionMixin:
' "entity_hints": [\n'
' {"type": "expense_type", "value": "交通费", '
'"normalized_value": "transport", "role": "filter", '
'"confidence": 0.86},\n'
' {"type": "reason", "value": "服务客户业务部署", '
'"normalized_value": "服务客户业务部署", "role": "target", '
'"confidence": 0.86}\n'
" ]\n"
"}"