fix(cma): treasury_limits 种子补 status='active'(引擎按 active 过滤→原 NULL 被排除)
ci/woodpecker/push/main Pipeline failed

种子 INSERT 未写 status → 6 行授权档 status=NULL → _limits_strictest 过滤 active 时全排除
→ 多档取最严(T11)取不到 limits 档。补 status='active' + ODKU 同步。自验电池 18/18。

Ref: 0-P0-project-20260915-cma-treasury-stage1
This commit is contained in:
Hermes CI Fix
2026-09-16 14:59:02 +08:00
parent 2ca53b272a
commit 7c73204ade
+9 -8
View File
@@ -255,16 +255,17 @@ ON DUPLICATE KEY UPDATE rule_name=VALUES(rule_name), rule_type=VALUES(rule_type)
-- C2. 授权矩阵(scope_type='role',按 entity 生效;双签档 approver_roles 顺序=先复核后批准)
INSERT INTO treasury_limits (entity_id, scope_type, scope_value, amount_from, amount_to,
required_approvals, approver_roles, require_budget, daily_cum_limit)
required_approvals, approver_roles, require_budget, daily_cum_limit, status)
VALUES
(1,'role','finance',0, 3, 0, JSON_ARRAY(), 1, 9),
(1,'role','ceo', 3, 30, 1, JSON_ARRAY('ceo'), 1, NULL),
(1,'role','ceo', 30, NULL,2, JSON_ARRAY('finance','ceo'),1, NULL),
(2,'role','finance',0, 5, 0, JSON_ARRAY(), 1, 15),
(2,'role','ceo', 5, 50, 1, JSON_ARRAY('ceo'), 1, NULL),
(2,'role','ceo', 50, NULL,2, JSON_ARRAY('finance','ceo'),1, NULL)
(1,'role','finance',0, 3, 0, JSON_ARRAY(), 1, 9, 'active'),
(1,'role','ceo', 3, 30, 1, JSON_ARRAY('ceo'), 1, NULL,'active'),
(1,'role','ceo', 30, NULL,2, JSON_ARRAY('finance','ceo'),1, NULL,'active'),
(2,'role','finance',0, 5, 0, JSON_ARRAY(), 1, 15, 'active'),
(2,'role','ceo', 5, 50, 1, JSON_ARRAY('ceo'), 1, NULL,'active'),
(2,'role','ceo', 50, NULL,2, JSON_ARRAY('finance','ceo'),1, NULL,'active')
ON DUPLICATE KEY UPDATE amount_to=VALUES(amount_to), required_approvals=VALUES(required_approvals),
approver_roles=VALUES(approver_roles), daily_cum_limit=VALUES(daily_cum_limit);
approver_roles=VALUES(approver_roles), daily_cum_limit=VALUES(daily_cum_limit),
status=VALUES(status);
-- ============================================================================