Commit d00263d3 authored by fangxinjiang's avatar fangxinjiang

权限调整

parent dec8b609
...@@ -412,30 +412,27 @@ ...@@ -412,30 +412,27 @@
<!-- 查找权限,用来新建 - 合同变更 --> <!-- 查找权限,用来新建 - 合同变更 -->
<select id="getUserPermissionByAutoCreateHTBG" resultMap="sysUserPermissionMap"> <select id="getUserPermissionByAutoCreateHTBG" resultMap="sysUserPermissionMap">
select select a.EMP_NAME,a.EMP_LOGIN_NAME,a.EMP_DEPT,a.PERMISSION_TYPE,a.NAME,a.CODE,a.SOURCE_TYPE,a.IS_CONTAINS,a.PERMISSION_STATUS,a.DELETE_FLAG,a.USER_ID,a.DOMAIN_ID
e.fd_name as 'EMP_NAME', from (
e.fd_name_pinyin as 'EMP_LOGIN_NAME', select
e.fd_ldap_dn as "EMP_DEPT", e.fd_name EMP_NAME,p.fd_login_name EMP_LOGIN_NAME,SUBSTRING_INDEX(SUBSTRING_INDEX(e.fd_ldap_dn,',ou', 2),',ou=', -1) EMP_DEPT
4 as 'PERMISSION_TYPE', ,'4' PERMISSION_TYPE,d.fd_3b8797876dc13c_text NAME,d.fd_3b879793d37afe CODE,0 SOURCE_TYPE
b.fd_3ade334bac0016 as 'NAME', ,'1' IS_CONTAINS,'0' PERMISSION_STATUS,'1' DELETE_FLAG,e.fd_id USER_ID,d.fd_id DOMAIN_ID
b.fd_3ade33763baa0e as "CODE", from ekp_224c54af6ae4418ae0a2 d
1 as "IS_CONTAINS", LEFT JOIN ekporg_186a02b160aa59dd70f4 f on f.fd_parent_id = d.fd_id
0 as "PERMISSION_STATUS", LEFT JOIN sys_org_element e on e.fd_id = f.sys_org_person_id JOIN sys_org_person p on e.fd_id=p.fd_id
1 as "DELETE_FLAG", where d.fd_id = #{fdId}
1 as 'CREATE_BY', union all
1 as 'UPDATE_BY', select
"超管" as 'CREATE_NAME', e.fd_name EMP_NAME,p.fd_login_name EMP_LOGIN_NAME,SUBSTRING_INDEX(SUBSTRING_INDEX(e.fd_ldap_dn,',ou', 2),',ou=', -1) EMP_DEPT
NOW() as 'UPDATE_TIME', ,'4' PERMISSION_TYPE,d.fd_3b8797876dc13c_text NAME,d.fd_3b879793d37afe CODE,0 SOURCE_TYPE
NOW() as 'CREATE_TIME', ,'1' IS_CONTAINS,'0' PERMISSION_STATUS,'1' DELETE_FLAG,e.fd_id USER_ID,d.fd_id DOMAIN_ID
null as "DOMAIN_ID", from ekp_224c54af6ae4418ae0a2 d
0 as "SOURCE_TYPE" left join ekp_0103c453b2848c3bb31c h on d.fd_3b879793d37afe=h.fd_3ade33763baa0e
from ekporg_18382406ad7dbdebcf33 a LEFT JOIN sys_org_element e on e.fd_id = h.fd_3ade318b64b54c JOIN sys_org_person p on e.fd_id=p.fd_id
LEFT JOIN ekp_0103c453b2848c3bb31c b on a.fd_parent_id=b.fd_id where d.fd_id = #{fdId}
LEFT JOIN sys_user_permission c on c.`CODE`=b.fd_3ade33763baa0e and c.USER_ID=a.sys_org_person_id ) a
LEFT JOIN (select x.fd_id,x.fd_name,SUBSTRING_INDEX(SUBSTRING_INDEX(x.fd_ldap_dn,',ou', 2),',ou=', -1) as 'fd_ldap_dn',x.fd_name_pinyin from sys_org_element x where x.fd_org_type='8') e on a.sys_org_person_id=e.fd_id GROUP BY a.USER_ID
LEFT JOIN ekp_224c54af6ae4418ae0a2 d on d.fd_3b879793d37afe=b.fd_3ade33763baa0e
where
d.fd_id = #{fdId}
</select> </select>
<!-- 查找权限,用来新建 - 项目变更 --> <!-- 查找权限,用来新建 - 项目变更 -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment