|
|
@@ -258,19 +258,22 @@ public class sso extends Basic {
|
|
|
roleidMapping.put("serviceStaff", 5211L);//客服人员
|
|
|
roleidMapping.put("installer", 5206L);//安装师傅
|
|
|
|
|
|
+ boolean isboss = false;
|
|
|
Rows crm_roles = new DBConnect("CRM").runSqlQuery("select t1.uid,t1.hrid,t2.role_id,t3.role,t3.description,t3.sys from sys_user_info t1\n" + "inner join sys_user_role t2 on t1.uid=t2.uid\n" + "inner join sys_role t3 on t2.role_id=t3.id\n" + "where hrid='" + accountno + "'");
|
|
|
ArrayList<Long> roleids = new ArrayList<>();//crm授权的角色
|
|
|
for (Row crm_role : crm_roles) {
|
|
|
String role = crm_role.getString("role");
|
|
|
if (roleidMapping.containsKey(role)) {
|
|
|
- roleids.add(roleidMapping.get(role));
|
|
|
+ long id = roleidMapping.get(role);
|
|
|
+ roleids.add(id);
|
|
|
+ if (id == 4097L) {
|
|
|
+ isboss = true;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- if (roleids.contains(4097L)) {
|
|
|
- roleids.remove(4098L);
|
|
|
- roleids.remove(5210L);
|
|
|
- roleids.remove(5211L);
|
|
|
- roleids.remove(5206L);
|
|
|
+ if (isboss) {
|
|
|
+ roleids.clear();
|
|
|
+ roleids.add(4097L);
|
|
|
}
|
|
|
String siteid = "MD";
|
|
|
|