Browse Source

用户筛选

master
niohe·erbao 1 year ago
parent
commit
d12f58ea27
1 changed files with 16 additions and 3 deletions
  1. +16
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java

+ 16
- 3
pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java View File

@@ -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)) {


Loading…
Cancel
Save