|
@@ -338,6 +338,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract>
|
|
|
Long userId = SecurityUtils.getUserId();
|
|
|
List<Long> uidList = new ArrayList<>();
|
|
|
List<SysRole> userRoles = UserUtil.getUserRoles(userId);
|
|
|
+ List<String> myRoleKeys = userRoles.stream().map(SysRole::getRoleKey).distinct().collect(Collectors.toList());
|
|
|
|
|
|
if (userRoles.stream().filter(item -> ObjectUtil.equals(0L, item.getParentId())).count() == 0) {
|
|
|
|
|
@@ -345,6 +346,9 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract>
|
|
|
|
|
|
List<SysRole> userRoleAndChildRole = UserUtil.getUserRoleAndChildRole(userId);
|
|
|
List<String> roleKeys = userRoleAndChildRole.stream().map(SysRole::getRoleKey).distinct().collect(Collectors.toList());
|
|
|
+
|
|
|
+ roleKeys.removeAll(myRoleKeys);
|
|
|
+
|
|
|
uidList.addAll(UserUtil.getUserIdsByRoleKeys(roleKeys, SecurityUtils.getCompanyId()));
|
|
|
|
|
|
wrapper.in("t1", Contract::getCreateUser, uidList);
|