Commit a3347f45 by kangxiaoshan

权限设置

parent 741190b2
...@@ -34,30 +34,33 @@ public class AuthServiceImpl implements AuthService { ...@@ -34,30 +34,33 @@ public class AuthServiceImpl implements AuthService {
List<String> authArrs = new ArrayList<>(); List<String> authArrs = new ArrayList<>();
Map<String, Object> collect = new HashMap<>();
if(RoleEnum.FINANCE.getKey().equals(loginAccount.getRole())){ if(RoleEnum.FINANCE.getKey().equals(loginAccount.getRole())){
//财务 按签约主体查看 //财务 按签约主体查看
authArrs = JSONArray.fromObject(auth.getAuthExtend()); List<Integer> authInt = JSONArray.fromObject(auth.getAuthExtend());
// authArrs = contractBodyRepository.findByIds(bodyids); collect = authInt.stream().collect(Collectors.toMap(t -> t.toString(), t -> t));
}else if(RoleEnum.SALSEMAN.getKey().equals(loginAccount.getRole())){ }else if(RoleEnum.SALSEMAN.getKey().equals(loginAccount.getRole())){
//销售 按签约合同人查看 //销售 按签约合同人查看
authArrs = JSONArray.fromObject(auth.getAuthExtend()); authArrs = JSONArray.fromObject(auth.getAuthExtend());
collect = authArrs.stream().collect(Collectors.toMap(t -> t, t -> t));
}else if(RoleEnum.PM.getKey().equals(loginAccount.getRole())){ }else if(RoleEnum.PM.getKey().equals(loginAccount.getRole())){
// 项目经理 // 项目经理
authArrs = JSONArray.fromObject(auth.getAuthExtend()); authArrs = JSONArray.fromObject(auth.getAuthExtend());
collect = authArrs.stream().collect(Collectors.toMap(t -> t, t -> t));
} }
Map<String, Object> collect = new HashMap<>(); if(collect.size()>0){
if(authArrs.size()>0){
collect = authArrs.stream().collect(Collectors.toMap(t -> t, t -> t));
collect.put("needcheck","1"); collect.put("needcheck","1");
} }
......
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