取得相应类型的format和template的DQL
1.取Format:
SELECT name,description FROM dm_format WHERE
name IN
(SELECT DISTINCT a_content_type FROM dm_sysobject WHERE
r_object_type = 'dm_menu_system' AND i_has_folder = TRUE AND i_is_deleted = FALSE AND
ANY i_folder_id IN
(SELECT r_object_id FROM dm_folder WHERE
ANY i_ancestor_id in (select r_object_id from dm_sysobject where object_name = 'Templates' and r_object_type = 'dm_cabinet')
)) AND is_hidden = FALSE
ORDER BY description,name
2.Template:
select
r_object_id, object_name
from
dm_sysobject
where
r_object_type = 'dm_menu_system'
AND
i_has_folder = TRUE
AND
i_is_deleted = FALSE
AND
a_content_type='crtext'
AND
ANY
i_folder_id IN
(SELECT r_object_id FROM dm_folder WHERE
ANY i_ancestor_id in (select r_object_id from dm_sysobject where object_name = 'Templates' and r_object_type = 'dm_cabinet')
)