Commit 0fe78d22 authored by huyuchen's avatar huyuchen

菜单权限修改

parent 4c02d490
...@@ -261,12 +261,18 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM ...@@ -261,12 +261,18 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
// 执行数据插入操作 组装 // 执行数据插入操作 组装
for (int i = 0; i < excelVOList.size(); i++) { for (int i = 0; i < excelVOList.size(); i++) {
SysUserPermissionVo excel = excelVOList.get(i); SysUserPermissionVo excel = excelVOList.get(i);
//登录名校验 //登录名校验
userInfo = userInfoList.stream().filter(e -> excel.getEmpLoginName().equals(e.getFdLoginName())).collect(Collectors.toList()); userInfo = userInfoList.stream().filter(e -> excel.getEmpLoginName().equals(e.getFdLoginName())).collect(Collectors.toList());
if (userInfo.isEmpty()) { if (userInfo.isEmpty()) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "登录名填写错误,请核实", excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "登录名填写错误,请核实", excel));
continue; continue;
} }
//从用户表中获取部门和用户名
SysUserInfo sysUserInfo = userInfo.get(0);
excel.setEmpDept(sysUserInfo.getFdDeptName());
excel.setEmpName(sysUserInfo.getFdName());
//判断表格权限类型是否正确 //判断表格权限类型是否正确
if (typeMap.isEmpty()) { if (typeMap.isEmpty()) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "获取权限类型字典值异常", excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "获取权限类型字典值异常", excel));
...@@ -293,6 +299,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM ...@@ -293,6 +299,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
} else { } else {
uniqueMap.put(flag.toString(), CommonConstants.ONE_STRING); uniqueMap.put(flag.toString(), CommonConstants.ONE_STRING);
} }
//BU和条线的时候用名称判断,其他用编码判断 //BU和条线的时候用名称判断,其他用编码判断
//判断此登录名是否已经存在此权限维度 //判断此登录名是否已经存在此权限维度
if (CommonConstants.SIX_STRING.equals(excel.getPermissionType()) if (CommonConstants.SIX_STRING.equals(excel.getPermissionType())
...@@ -346,7 +353,6 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM ...@@ -346,7 +353,6 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
continue; continue;
} }
} }
// 插入数据 // 插入数据
insertExcel(excel); insertExcel(excel);
} }
......
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