Bläddra i källkod

用户筛选

tags/24080901
niohe·erbao 1 år sedan
förälder
incheckning
d12f58ea27
1 ändrade filer med 16 tillägg och 3 borttagningar
  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 Visa fil

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


Laddar…
Avbryt
Spara