Commit 81f631db authored by hongguangwu's avatar hongguangwu

EKP1.7.1-hgw-权限

parent d25dd0b9
......@@ -195,12 +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> getUserPermissionByAutoCreateKHCX(@Param("fdId") String fdId);
List<SysUserPermission> getUserPermissionByAutoCreateSJCX(@Param("fdId") String fdId);
List<SysUserPermission> getUserPermissionByAutoCreateBJDCX(@Param("fdId") String fdId);
List<SysUserPermission> getUserPermissionByAutoCreateHTCX(@Param("fdId") String fdId);
List<SysUserPermission> getUserPermissionByAutoCreateXMCX(@Param("fdId") String fdId);
List<SysUserPermission> getUserPermissionByAutoCreateXMBG(@Param("fdId") String fdId);
void deleteUserPermissionByIdAndType(@Param("domainId") String domainId, @Param("permissionType") String permissionType);
......
......@@ -438,14 +438,6 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
String[] deleteType = {"0","1","2","3","4","5"};
log.error("EKP传过来的类型是啥0?" + type);
switch (type) {
case "客户管理信息接口":
log.error("EKP传过来的类型是啥【客户管理信息接口】?" + type);
baseMapper.deleteUserPermissionByIdAndType(fdId, deleteType[1]);
list = baseMapper.getUserPermissionByAutoCreateKH(fdId); break;
case "客户查询":
log.error("EKP传过来的类型是啥【客户查询】?" + type);
baseMapper.deleteUserPermissionByIdAndType(fdId, deleteType[1]);
list = baseMapper.getUserPermissionByAutoCreateKHCX(fdId); break;
case "客户":
baseMapper.deleteUserPermissionByIdAndType(fdId, deleteType[1]);
list = baseMapper.getUserPermissionByAutoCreateKH(fdId); break;
......@@ -461,6 +453,9 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
case "项目":
baseMapper.deleteUserPermissionByIdAndType(fdId, deleteType[5]);
list = baseMapper.getUserPermissionByAutoCreateXM(fdId); break;
case "项目变更":
baseMapper.deleteUserPermissionByIdAndType(fdId, deleteType[5]);
list = baseMapper.getUserPermissionByAutoCreateXMBG(fdId); break;
default:
log.error("EKP传过来的类型是啥1?" + type);
// 后面改为这个:
......
......@@ -330,132 +330,37 @@
</select>
<!-- 查找权限,用来新建 - 合同 -->
<select id="getUserPermissionByAutoCreateHT" 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_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
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>
<!-- 查找权限,用来新建 - 项目 -->
<select id="getUserPermissionByAutoCreateXM" 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
,'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
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>
<!-- 查找权限,用来新建 - 客户查询 -->
<select id="getUserPermissionByAutoCreateKHCX" resultMap="sysUserPermissionMap">
<!-- 查找权限,用来新建 - 项目变更 -->
<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
,'1' PERMISSION_TYPE ,d.fd_3a9d1d4caeeeb8 NAME ,d.fd_3a9d1d4d438bfc 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_05b7485fd444f95a6177 d
LEFT JOIN ekp_44f95a6177_14e68ce19e f1 on f1.fd_parent_id = d.fd_id
LEFT JOIN ekporg_1845a78746d15965cc5c f on f.fd_parent_id = f1.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>
<!-- 查找权限,用来新建 - 商机查询 -->
<select id="getUserPermissionByAutoCreateSJCX" 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
,'2' PERMISSION_TYPE,d.fd_3b04b95268f19c NAME,d.fd_3b107f1084fd96 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_2f8e08660c542d8a169f d
LEFT JOIN ekp_542d8a169f_8c4fb81d42 f1 on f1.fd_parent_id = d.fd_id
LEFT JOIN ekporg_183ea651979d3c384f1f f on f.fd_parent_id = f1.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>
<!-- 查找权限,用来新建 - 报价单查询 -->
<select id="getUserPermissionByAutoCreateBJDCX" 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
,'3' PERMISSION_TYPE,d.fd_3b04b9d8688cfa NAME,d.fd_3b04b9dc64a9f4 CODE,0 SOURCE_TYPE
,'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_fd1449d265845e087bf2 d
LEFT JOIN ekp_845e087bf2_8aad2804b4 f1 on f1.fd_parent_id = d.fd_id
LEFT JOIN ekporg_18316f3cee7e12c284ff f on f.fd_parent_id = f1.fd_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>
<!-- 查找权限,用来新建 - 合同查询 -->
<select id="getUserPermissionByAutoCreateHTCX" 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_3ade334bac0016 NAME,d.fd_3ade33763baa0e 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_0103c453b2848c3bb31c d
LEFT JOIN ekporg_18382406ad7dbdebcf33 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_3ade334bac0016 NAME,d.fd_3ade33763baa0e 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_0103c453b2848c3bb31c 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="getUserPermissionByAutoCreateXMCX" 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
,'5' PERMISSION_TYPE,d.fd_3a2b38c61ef9aa NAME,d.fd_3a37fe508071fe 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_24a8e6a7fc143bb8c48a d
LEFT JOIN ekporg_183300291c3846bd9057 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_3a2b38c61ef9aa NAME,d.fd_3a37fe508071fe 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_24a8e6a7fc143bb8c48a d
LEFT JOIN sys_org_element e on e.fd_id = d.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
where d.fd_id = #{fdId} GROUP BY e.fd_id
</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