Browse Source

区域code

master
PoffyZhang 1 year ago
parent
commit
0b58765a3b
1 changed files with 7 additions and 5 deletions
  1. +7
    -5
      pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java

+ 7
- 5
pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java View File

@@ -179,13 +179,13 @@ public class UserInfoManage {

// 查重符合筛选条件的用户code列表
List<DingEmployeeInfo> dingEmployeeInfoList = iDingEmployeeInfoService.list(Wrappers.lambdaQuery(DingEmployeeInfo.class)
.in(DingEmployeeInfo::getOrganizationCode, compliantOrgCodeList));
.in(DingEmployeeInfo::getEmpPosUnitCode, compliantOrgCodeList));

List<String> compliantOrgEmpCodeList = dingEmployeeInfoList.stream()
.map(DingEmployeeInfo::getEmployeeCode).distinct().collect(Collectors.toList());
if (compliantOrgEmpCodeList.size() > 500) {
throw new BizException("搜索结果过多请缩小搜索范围");
}
// if (compliantOrgEmpCodeList.size() > 500) {
// throw new BizException("搜索结果过多请缩小搜索范围");
// }
return compliantOrgEmpCodeList;
}

@@ -195,7 +195,9 @@ public class UserInfoManage {
* @param userRoleList
*/
private List<Long> getRoleCompliantUserIdList(List<UserRoleVO> userRoleList) {
userRoleList = userRoleList.stream().filter(r -> Objects.nonNull(r.getId())).collect(Collectors.toList());
if(CollUtil.isNotEmpty(userRoleList)){
userRoleList = userRoleList.stream().filter(r -> Objects.nonNull(r.getId())).collect(Collectors.toList());
}
if (CollUtil.isEmpty(userRoleList)) {
return null;
}


Loading…
Cancel
Save