feat: 扩展风险规则体系、审批动态路由与预算中心列表化改造
- 新增 25+ 条风险规则(预算/报销/申请/通用类),完善风险规则模拟与反馈发布机制 - 引入费用审批动态路由、平台风险分级、预审与风险阶段管理 - 预算中心列表化改造,优化票据夹仪表盘与数字员工工作看板 - 新增 Hermes 风险线索收集器、Agent 链路追踪中心 - 扩展数字员工能力库(18 个领域 Skill)与交通费用自动预估 - 完善报销申请快速预览、权限控制与前端测试覆盖
This commit is contained in:
@@ -21,6 +21,8 @@ const overviewTemplate = readFileSync(
|
||||
test('risk dashboard normalizes amount, distributions, and ranking fields', () => {
|
||||
const dashboard = normalizeRiskObservationDashboard({
|
||||
total_observations: 5,
|
||||
risk_clue_count: 2,
|
||||
feedback_sample_count: 3,
|
||||
total_amount: 12800,
|
||||
department_distribution: { 风控部: 3 },
|
||||
expense_type_distribution: { travel: 2 },
|
||||
@@ -35,6 +37,8 @@ test('risk dashboard normalizes amount, distributions, and ranking fields', () =
|
||||
})
|
||||
|
||||
assert.equal(dashboard.totalAmount, 12800)
|
||||
assert.equal(dashboard.riskClueCount, 2)
|
||||
assert.equal(dashboard.feedbackSampleCount, 3)
|
||||
assert.equal(dashboard.departmentDistribution['风控部'], 3)
|
||||
assert.equal(dashboard.expenseTypeDistribution.travel, 2)
|
||||
assert.equal(dashboard.riskTypeDistribution.duplicate_invoice, 2)
|
||||
@@ -51,6 +55,9 @@ test('risk dashboard renders overview amount and multi-dimension panels', () =>
|
||||
assert.match(overviewViewModel, /label: '误报数量'/)
|
||||
assert.match(dashboardComponent, /业务维度分布/)
|
||||
assert.match(dashboardComponent, /异常排行/)
|
||||
assert.match(dashboardComponent, /待复核线索/)
|
||||
assert.match(dashboardComponent, /反馈样本/)
|
||||
assert.doesNotMatch(dashboardComponent, /候选规则/)
|
||||
assert.match(dashboardComponent, /departmentDistribution/)
|
||||
assert.match(dashboardComponent, /expenseTypeDistribution/)
|
||||
assert.match(dashboardComponent, /supplierDistribution/)
|
||||
|
||||
Reference in New Issue
Block a user