Commit 4d844f7e authored by hongguangwu's avatar hongguangwu

EKP1.7.1-hgw-权限

parent 3396e70d
......@@ -195,6 +195,7 @@ public interface SysUserPermissionMapper extends BaseMapper<SysUserPermission> {
List<SysUserPermission> getUserPermissionByAutoCreateBJD(@Param("fdId") String fdId);
List<SysUserPermission> getUserPermissionByAutoCreateHT(@Param("fdId") String fdId);
List<SysUserPermission> getUserPermissionByAutoCreateXM(@Param("fdId") String fdId);
List<SysUserPermission> getUserPermissionByAutoCreateHTBG(@Param("fdId") String fdId);
List<SysUserPermission> getUserPermissionByAutoCreateXMBG(@Param("fdId") String fdId);
String selectCodeByFdId(@Param("fdId") String fdId);
......
......@@ -330,37 +330,98 @@
</select>
<!-- 查找权限,用来新建 - 合同 -->
<select id="getUserPermissionByAutoCreateHT" resultMap="sysUserPermissionMap">
select
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' PERMISSION_TYPE,d.fd_3ad97ed761c75c NAME,d.fd_3ade319226ed52 CODE,0 SOURCE_TYPE
,'0' IS_CONTAINS,'0' PERMISSION_STATUS,'1' DELETE_FLAG,e.fd_id USER_ID,d.fd_id DOMAIN_ID
from ekp_4834ce2ea964f1a8cfdb d
LEFT JOIN ekporg_183823dc7ae199aa37e9 f on f.fd_parent_id = d.fd_id
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
where d.fd_id = #{fdId} GROUP BY e.fd_id
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
from (
select
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' PERMISSION_TYPE,d.fd_3ad97ed761c75c NAME,d.fd_3ade319226ed52 CODE,0 SOURCE_TYPE
,'0' IS_CONTAINS,'0' PERMISSION_STATUS,'1' DELETE_FLAG,e.fd_id USER_ID,d.fd_id DOMAIN_ID
from ekp_4834ce2ea964f1a8cfdb d
LEFT JOIN ekporg_183823dc7ae199aa37e9 f on f.fd_parent_id = d.fd_id
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
where d.fd_id = #{fdId}
union ALL
select
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' PERMISSION_TYPE,d.fd_3ad97ed761c75c NAME,d.fd_3ade319226ed52 CODE,0 SOURCE_TYPE
,'0' IS_CONTAINS,'0' PERMISSION_STATUS,'1' DELETE_FLAG,e.fd_id USER_ID,d.fd_id DOMAIN_ID
from ekp_4834ce2ea964f1a8cfdb d
LEFT JOIN sys_org_element e on e.fd_id = d.fd_3ade318b64b54c
JOIN sys_org_person p on e.fd_id=p.fd_id
where d.fd_id = #{fdId}
) a GROUP BY a.USER_ID
</select>
<!-- 查找权限,用来新建 - 项目 -->
<select id="getUserPermissionByAutoCreateXM" resultMap="sysUserPermissionMap">
select
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
,'5' PERMISSION_TYPE,d.fd_3a829ae9bab760 NAME,d.fd_3a829aea0b84a4 CODE,0 SOURCE_TYPE
,'0' IS_CONTAINS,'0' PERMISSION_STATUS,'1' DELETE_FLAG,e.fd_id USER_ID,d.fd_id DOMAIN_ID
from ekp_fb3b8d0c8f148639b8e2 d
LEFT JOIN ekporg_1832fea7d722404c1e92 f on f.fd_parent_id = d.fd_id
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
where d.fd_id = #{fdId} GROUP BY e.fd_id
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
from (
select
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
,'5' PERMISSION_TYPE,d.fd_3a829ae9bab760 NAME,d.fd_3a829aea0b84a4 CODE,0 SOURCE_TYPE
,'0' IS_CONTAINS,'0' PERMISSION_STATUS,'1' DELETE_FLAG,e.fd_id USER_ID,d.fd_id DOMAIN_ID
from ekp_fb3b8d0c8f148639b8e2 d
LEFT JOIN ekporg_1832fea7d722404c1e92 f on f.fd_parent_id = d.fd_id
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
where d.fd_id = #{fdId}
union ALL
select
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
,'5' PERMISSION_TYPE,d.fd_3a829ae9bab760 NAME,d.fd_3a829aea0b84a4 CODE,0 SOURCE_TYPE
,'0' IS_CONTAINS,'0' PERMISSION_STATUS,'1' DELETE_FLAG,e.fd_id USER_ID,d.fd_id DOMAIN_ID
from ekp_fb3b8d0c8f148639b8e2 d
LEFT JOIN sys_org_element e on e.fd_id = d.fd_3ae55447e30d62
JOIN sys_org_person p on e.fd_id=p.fd_id
where d.fd_id = #{fdId}
) a GROUP BY a.USER_ID
</select>
<!-- 查找权限,用来新建 - 合同变更 -->
<select id="getUserPermissionByAutoCreateHTBG" resultMap="sysUserPermissionMap">
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
from (
select
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' PERMISSION_TYPE,d.fd_3ad97ed761c75c NAME,d.fd_3ade319226ed52 CODE,0 SOURCE_TYPE
,'0' IS_CONTAINS,'0' PERMISSION_STATUS,'1' DELETE_FLAG,e.fd_id USER_ID,d.fd_id DOMAIN_ID
from ekp_da0575c280b465d8ec9e d
LEFT JOIN ekporg_186ad03fd6179c8a1c5e f on f.fd_parent_id = d.fd_id
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
where d.fd_id = #{fdId}
union all
select
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' PERMISSION_TYPE,d.fd_3ad97ed761c75c NAME,d.fd_3ade319226ed52 CODE,0 SOURCE_TYPE
,'0' IS_CONTAINS,'0' PERMISSION_STATUS,'1' DELETE_FLAG,e.fd_id USER_ID,d.fd_id DOMAIN_ID
from ekp_da0575c280b465d8ec9e d
left join ekp_0103c453b2848c3bb31c h on d.fd_3ade319226ed52=h.fd_3ade33763baa0e
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
where d.fd_id = #{fdId}
) a
GROUP BY a.USER_ID
</select>
<!-- 查找权限,用来新建 - 项目变更 -->
<select id="getUserPermissionByAutoCreateXMBG" resultMap="sysUserPermissionMap">
select
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
,'5' PERMISSION_TYPE,d.fd_3b8797876dc13c_text NAME,d.fd_3b879793d37afe CODE,0 SOURCE_TYPE
,'0' IS_CONTAINS,'0' PERMISSION_STATUS,'1' DELETE_FLAG,e.fd_id USER_ID,d.fd_id DOMAIN_ID
from ekp_d701e3e72794ff390ca8 d
LEFT JOIN ekporg_18622320f73771d520db f on f.fd_parent_id = d.fd_id
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
where d.fd_id = #{fdId} GROUP BY e.fd_id
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
from (
select
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
,'5' PERMISSION_TYPE,d.fd_3b8797876dc13c_text NAME,d.fd_3b879793d37afe CODE,0 SOURCE_TYPE
,'0' IS_CONTAINS,'0' PERMISSION_STATUS,'1' DELETE_FLAG,e.fd_id USER_ID,d.fd_id DOMAIN_ID
from ekp_d701e3e72794ff390ca8 d
LEFT JOIN ekporg_18622320f73771d520db f on f.fd_parent_id = d.fd_id
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
where d.fd_id = #{fdId}
union all
select
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
,'5' PERMISSION_TYPE,d.fd_3b8797876dc13c_text NAME,d.fd_3b879793d37afe CODE,0 SOURCE_TYPE
,'0' IS_CONTAINS,'0' PERMISSION_STATUS,'1' DELETE_FLAG,e.fd_id USER_ID,d.fd_id DOMAIN_ID
from ekp_d701e3e72794ff390ca8 d
LEFT JOIN ekp_24a8e6a7fc143bb8c48a f on f.fd_3a37fe508071fe = d.fd_3b879793d37afe
LEFT JOIN sys_org_element e on e.fd_id = f.fd_3b212a2d7a65c6 JOIN sys_org_person p on e.fd_id=p.fd_id
where d.fd_id = #{fdId}
) a GROUP BY a.USER_ID
</select>
<!-- 查找fdId对应的code -->
......@@ -376,6 +437,8 @@
select d.fd_3a829aea0b84a4 CODE from ekp_fb3b8d0c8f148639b8e2 d where d.fd_id = #{fdId}
union ALL
select d.fd_3b879793d37afe CODE from ekp_d701e3e72794ff390ca8 d where d.fd_id = #{fdId}
union ALL
select d.fd_3ade319226ed52 CODE from ekp_da0575c280b465d8ec9e d where d.fd_id = #{fdId}
limit 1
</select>
<!-- 删除EKP新建的 -->
......
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