feat: 扩展风险规则体系、审批动态路由与预算中心列表化改造
- 新增 25+ 条风险规则(预算/报销/申请/通用类),完善风险规则模拟与反馈发布机制 - 引入费用审批动态路由、平台风险分级、预审与风险阶段管理 - 预算中心列表化改造,优化票据夹仪表盘与数字员工工作看板 - 新增 Hermes 风险线索收集器、Agent 链路追踪中心 - 扩展数字员工能力库(18 个领域 Skill)与交通费用自动预估 - 完善报销申请快速预览、权限控制与前端测试覆盖
This commit is contained in:
@@ -212,18 +212,16 @@ def test_demo_budget_risk_rules_sync_with_finance_rule_references() -> None:
|
||||
AgentAsset.code == "risk.budget.available_balance_insufficient"
|
||||
)
|
||||
)
|
||||
marketing_rule = db.scalar(
|
||||
communication_rule = db.scalar(
|
||||
select(AgentAsset).where(
|
||||
AgentAsset.code == "risk.application.marketing_without_campaign"
|
||||
AgentAsset.code == "risk.standard.communication_amount_over_policy"
|
||||
)
|
||||
)
|
||||
|
||||
assert budget_rule is not None
|
||||
assert "差旅费" in budget_rule.scenario_json
|
||||
assert "市场推广费" in budget_rule.scenario_json
|
||||
assert "软件服务费" in budget_rule.scenario_json
|
||||
assert budget_rule.scenario_json == ["全部"]
|
||||
assert budget_rule.config_json["budget_required"] is True
|
||||
assert "marketing" in budget_rule.config_json["expense_types"]
|
||||
assert budget_rule.config_json["expense_types"] == ["all"]
|
||||
assert budget_rule.config_json["business_stage"] == [
|
||||
"expense_application",
|
||||
"reimbursement",
|
||||
@@ -231,12 +229,12 @@ def test_demo_budget_risk_rules_sync_with_finance_rule_references() -> None:
|
||||
]
|
||||
assert budget_rule.config_json["finance_rule_code"] == "budget.execution.policy"
|
||||
|
||||
assert marketing_rule is not None
|
||||
assert marketing_rule.scenario_json == ["市场推广费"]
|
||||
assert marketing_rule.config_json["finance_rule_code"] == "expense.application.policy"
|
||||
assert marketing_rule.config_json["finance_rule_sheet"] == "费用申请前置规则"
|
||||
assert marketing_rule.config_json["expense_types"] == ["marketing"]
|
||||
assert marketing_rule.config_json["budget_required"] is True
|
||||
assert communication_rule is not None
|
||||
assert communication_rule.scenario_json == ["通信费"]
|
||||
assert communication_rule.config_json["finance_rule_code"] == "expense.communication.policy"
|
||||
assert communication_rule.config_json["finance_rule_sheet"] == "通信费报销规则"
|
||||
assert communication_rule.config_json["expense_types"] == ["communication"]
|
||||
assert communication_rule.config_json["budget_required"] is True
|
||||
|
||||
|
||||
def test_agent_asset_service_can_activate_rule_after_review() -> None:
|
||||
|
||||
Reference in New Issue
Block a user