|
|
@@ -64,12 +64,13 @@ public class UserInfoManage { |
|
|
|
String phoneNo = req.getPhoneNo(); |
|
|
|
String orgCode = req.getOrgCode(); |
|
|
|
String name = req.getName(); |
|
|
|
Long regionId = req.getRegionId(); |
|
|
|
|
|
|
|
List<Long> userIdList = getRoleCompliantUserIdList(req.getUserRoleList()); |
|
|
|
if (userIdList != null && userIdList.size() == 0) { |
|
|
|
return pageVo; |
|
|
|
} |
|
|
|
List<String> compliantOrgEmpCodeList = getCompliantOrgEmpCodeList(req.getOrgName(), req.getOrgCode()); |
|
|
|
List<String> compliantOrgEmpCodeList = getCompliantOrgEmpCodeList(req.getOrgName(), orgCode, regionId); |
|
|
|
if (compliantOrgEmpCodeList != null && compliantOrgEmpCodeList.size() == 0) { |
|
|
|
return pageVo; |
|
|
|
} |
|
|
@@ -121,11 +122,23 @@ public class UserInfoManage { |
|
|
|
return pageVo; |
|
|
|
} |
|
|
|
|
|
|
|
private List<String> getCompliantOrgEmpCodeList(String orgName, String orgCode) { |
|
|
|
if (StringUtils.isBlank(orgName) && StringUtils.isBlank(orgCode)) { |
|
|
|
private List<String> getCompliantOrgEmpCodeList(String orgName, String orgCode, Long regionId) { |
|
|
|
if (StringUtils.isBlank(orgName) && StringUtils.isBlank(orgCode) && Objects.isNull(regionId)) { |
|
|
|
return null; |
|
|
|
} |
|
|
|
List<String> compliantOrgCodeList = new ArrayList<>(); |
|
|
|
// 查询符合筛选区域条件的组织列表 |
|
|
|
if (Objects.nonNull(regionId)) { |
|
|
|
List<DingOrganization> dingOrganizationList = iDingOrganizationService.list(Wrappers.lambdaQuery(DingOrganization.class) |
|
|
|
.eq(DingOrganization::getDivisionCode, regionId)); |
|
|
|
List<String> compliantRegionIdList = dingOrganizationList.stream() |
|
|
|
.map(DingOrganization::getOrganizationCode) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
if (CollUtil.isEmpty(compliantRegionIdList)) { |
|
|
|
return new ArrayList<>(); |
|
|
|
} |
|
|
|
compliantOrgCodeList.addAll(compliantRegionIdList); |
|
|
|
} |
|
|
|
|
|
|
|
// 查重符合筛选条件的组织列表 |
|
|
|
if (StringUtils.isNotBlank(orgName)) { |
|
|
|