From 204cb91c9c0a6cbb508cb0f96e6bc54860bbcade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?niohe=C2=B7erbao?= Date: Fri, 28 Apr 2023 09:13:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=93=E5=AE=B6=E5=BA=93?= =?UTF-8?q?=E7=AD=9B=E9=80=89=E6=9D=A1=E4=BB=B6=E4=B8=8D=E7=94=9F=E6=95=88?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../expert/mapper/ExpertAdminManageMapper.xml | 3 +-- .../pmapi/user/manage/UserInfoManage.java | 24 +++++++++++++++++----- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/mapper/ExpertAdminManageMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/expert/mapper/ExpertAdminManageMapper.xml index 8eceaf9..425f052 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/mapper/ExpertAdminManageMapper.xml +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/mapper/ExpertAdminManageMapper.xml @@ -42,8 +42,7 @@ ) - -- ORDER BY create_on DESC - + ORDER BY update_on DESC diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java index 7a2d392..fb052a2 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java @@ -145,14 +145,28 @@ public class UserInfoManage { // 查重符合筛选条件的组织列表 if (StringUtils.isNotBlank(orgName)) { List dingOrganizationList = iDingOrganizationService.list(Wrappers.lambdaQuery(DingOrganization.class) - .like(DingOrganization::getOrganizationName, orgName)); - List compliantOrgNameList = dingOrganizationList.stream() + .like(DingOrganization::getOrganizationName, orgName) + .notIn(DingOrganization::getTypeCode, "GOV_INTERNAL_INSTITUTION") + ); + + List compliantOrgNameCodeList = dingOrganizationList.stream() .map(DingOrganization::getOrganizationCode) .collect(Collectors.toList()); - if (CollUtil.isEmpty(compliantOrgNameList)) { + if (CollUtil.isEmpty(compliantOrgNameCodeList)) { + return new ArrayList<>(); + } + + // 取交集 + List tempCompliantOrgCodeList = new ArrayList<>(); + for (String compliantOrgNameCode : compliantOrgNameCodeList) { + if (compliantOrgCodeList.contains(compliantOrgNameCode)) { + tempCompliantOrgCodeList.add(compliantOrgNameCode); + } + } + compliantOrgCodeList = tempCompliantOrgCodeList; + if (CollUtil.isEmpty(compliantOrgCodeList)) { return new ArrayList<>(); } - compliantOrgCodeList.addAll(compliantOrgNameList); } if (StringUtils.isNotBlank(orgCode)) { @@ -417,7 +431,7 @@ public class UserInfoManage { resUserDetailVO.setOrgName(userFullInfo.getOrganizationName()); resUserDetailVO.setRegionCode(userFullInfo.getRegionCode()); resUserDetailVO.setRegionName(regionCacheHelper.getRegionName(userFullInfo.getRegionCode() - ,RegionConst.RL_COUNTY)); + , RegionConst.RL_COUNTY)); resUserDetailVO.setEmpPosUnitCode(userFullInfo.getEmpPosUnitCode()); resUserDetailVO.setEmpPosUnitName(userFullInfo.getEmpPosUnitName()); }