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

@@ -687,14 +687,14 @@ def test_orchestrator_application_session_guides_transport_amount_and_submit(
)
assert first.status == "blocked"
assert "当前还需要补充:出行方式、预计金额/预算" in first.result["answer"]
assert "当前还需要补充:出行方式、用户预估费用" in first.result["answer"]
assert [item["label"] for item in first.result["suggested_actions"]] == ["一次性补充申请信息"]
assert first.result["suggested_actions"][0]["payload"]["prompt_prefill"] == "出行方式:\n预计总费用:"
assert first.result["suggested_actions"][0]["payload"]["prompt_prefill"] == "出行方式:\n用户预估费用:"
assert "当前还需要补充:预计金额/预算" in second.result["answer"]
assert "当前还需要补充:用户预估费用" in second.result["answer"]
assert [item["label"] for item in second.result["suggested_actions"]] == ["一次性补充申请信息"]
assert second.result["suggested_actions"][0]["action_type"] == "prefill_composer"
assert second.result["suggested_actions"][0]["payload"]["prompt_prefill"] == "预计总费用:"
assert second.result["suggested_actions"][0]["payload"]["prompt_prefill"] == "用户预估费用:"
assert "这是模拟的费用申请结果" in third.result["answer"]
assert "| 事由 | 支持上海国网服务器部署 |" in third.result["answer"]
@@ -713,7 +713,7 @@ def test_orchestrator_application_session_guides_transport_amount_and_submit(
application_claims = [
claim
for claim in db.query(ExpenseClaim).all()
if claim.claim_no.startswith("APP-20260525-")
if claim.claim_no.startswith("AP-")
]
assert len(application_claims) == 1
assert application_claims[0].status == "submitted"