Commit 5f4bf48d authored by 耿迪迪's avatar 耿迪迪

外部采购查询权限

parent 39b3a265
...@@ -52,8 +52,8 @@ public class TPurchaseController extends BaseController ...@@ -52,8 +52,8 @@ public class TPurchaseController extends BaseController
{ {
// 获取当前用户 // 获取当前用户
SysUser user = tokenService.getLoginUser(ServletUtils.getRequest()).getUser(); SysUser user = tokenService.getLoginUser(ServletUtils.getRequest()).getUser();
List<SysRole> calculator = user.getRoles().stream().filter(item ->item.getRoleKey() == "calculator").collect(Collectors.toList()); List<SysRole> calculator = user.getRoles().stream().filter(item ->"calculator".equals(item.getRoleKey())).collect(Collectors.toList());
if (StringUtils.isNotNull(user) && !user.isAdmin() && !CollectionUtils.isEmpty(calculator)) { if (StringUtils.isNotNull(user) && !user.isAdmin() && CollectionUtils.isEmpty(calculator)) {
tPurchase.setPurchaseDeptId(user.getDeptId()); tPurchase.setPurchaseDeptId(user.getDeptId());
} }
startPage(); startPage();
......
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