Files
xj-platform/db/xcsql/system_rules.sql
T

27 lines
1.2 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- ============================================================
-- 权限规则表更新脚本仅更新有用的三条规则
-- 表名QH_SYS_PERM_DATA_RULE
-- 说明
-- 1. 更新手表设备表的权限规则wd.dept_id QH_WAT_DEVICE.DEPT_ID
-- 2. 更新手表数据表的权限规则orgcode QH_WAT_DATA.ORGCODE
-- ============================================================
-- 1. 更新手表设备权限规则 - 规则1
UPDATE "QH_SYS_PERM_DATA_RULE"
SET "RULE_VALUE" = 'FIND_IN_SET(wd.DEPT_ID, ''#{sys_manager_depart_ids}'')'
WHERE "ID" = '2027688332771315713';
-- 2. 更新手表设备权限规则 - 规则2
UPDATE "QH_SYS_PERM_DATA_RULE"
SET "RULE_VALUE" = 'FIND_IN_SET(wd.DEPT_ID, ''#{sys_manager_depart_ids}'')'
WHERE "ID" = '1737389275796287489';
-- 2.1 更新手表设备权限规则 - 规则3
UPDATE "QH_SYS_PERM_DATA_RULE"
SET "RULE_VALUE" = 'FIND_IN_SET(wd.DEPT_ID, ''#{sys_manager_depart_ids}'')'
WHERE "ID" = '1737404792707821569';
-- 3. 更新手表数据权限规则 - 部门代码规则
UPDATE "QH_SYS_PERM_DATA_RULE"
SET "RULE_VALUE" = '( REGEXP_LIKE(ORGCODE, ''^('' || replace(''#'' || {sys_manager_depart_codes}, '',''|'') || '')'') ) = 1'
WHERE "ID" = '2027689339962118146';