(case when (select count(*) from sys_role_module_home_page srmw where srmw.function_group_id = v.function_id and srmw.role_id = v.role_id and srmw.subject = ${/session/@subject}) > 0 then 'role_module'
when (select count(*) from sys_module_home_page smhp where smhp.function_group_id = v.function_id and smhp.subject = ${/session/@subject}) > 0 then 'module'
else 'none' end
)else 'none' end module_flag,
(select nvl(sum(1),0) from sys_role_menu_v v1 where v1.parent_menu_id=v.menu_id) sub_menu_count
<bm:data-filterenforceOperations="query"expression="((not exists (select 1 from sys_role_user_function f where f.role_id = v.role_id and f.function_id = v.function_id)) or (exists (select 1 from sys_role_user_function f where f.role_id = v.role_id and f.user_id = ${/session/@user_id} and f.function_id = v.function_id)))"/>
<!--<bm:data-filter enforceOperations="query" expression="((v.function_code != 'CON3200') or(v.function_code = 'CON3200' AND ((v.role_code not in ('0018', '0019')) or (v.role_code in ('0018', '0019') and exists (select 1 from sys_user u, sys_user_role_groups r where u.user_id = r.user_id and r.role_id = v.role_id AND u.user_id = ${/session/@user_id} and u.user_name in ('MJ001', 'MJ002'))))))"/>