From eb15e0c7680f52d8220629906083f5e7cdf223b5 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 20 Apr 2023 15:59:14 +0800 Subject: [PATCH] =?UTF-8?q?//=E8=8E=B7=E5=8F=96=E5=B7=A5=E4=BD=9C=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E6=89=80=E5=B1=9E=E7=BB=84=E7=BB=87=E5=90=8C=E7=BA=A7?= =?UTF-8?q?=E7=9A=84=E5=85=9A=E7=BB=84=E7=BB=87=E6=94=B9=E4=B8=BA=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E5=90=8C=E4=B8=80=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IcPartyMemberServiceImpl.java | 25 +++---------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java index 07a405b0a4..63718b89cf 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java @@ -10,7 +10,6 @@ import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.form.DictListFormDTO; -import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.dto.result.DictListResultDTO; import com.epmet.commons.tools.dto.result.OptionDataResultDTO; import com.epmet.commons.tools.enums.DictTypeEnum; @@ -22,7 +21,6 @@ import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.*; import com.epmet.constants.ImportTaskConstants; @@ -32,7 +30,6 @@ import com.epmet.dto.form.IcPartyMemberListFormDTO; import com.epmet.dto.result.PartyMemberAgeResultDTO; import com.epmet.dto.result.PartyMemberEducationResultDTO; import com.epmet.dto.result.UploadImgResultDTO; -import com.epmet.resi.partymember.dto.partymember.result.PartymemberPortraitResultDTO; import com.epmet.feign.*; import com.epmet.modules.partyOrg.dao.IcPartyOrgDao; import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity; @@ -50,6 +47,7 @@ import com.epmet.resi.partymember.dto.partymember.IcPartyMemberDTO; import com.epmet.resi.partymember.dto.partymember.form.IcPartyMemberFromDTO; import com.epmet.resi.partymember.dto.partymember.result.IcPartyInfoResultDTO; import com.epmet.resi.partymember.dto.partymember.result.IcPartyMemberResultDTO; +import com.epmet.resi.partymember.dto.partymember.result.PartymemberPortraitResultDTO; import com.epmet.utils.ImportTaskUtils; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @@ -107,17 +105,9 @@ public class IcPartyMemberServiceImpl extends BaseServiceImpl page(TokenDto tokenDto, IcPartyMemberFromDTO formDTO) { - CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); - if (null == staffInfo) { - throw new EpmetException("获取工作人员信息失败"); - } if (StringUtils.isBlank(formDTO.getPartyOrgId())) { //获取工作人员所属组织同级的党组织 - LambdaQueryWrapper orgWrapper = new LambdaQueryWrapper<>(); - orgWrapper.eq(IcPartyOrgEntity::getCustomerId, tokenDto.getCustomerId()); - orgWrapper.eq(IcPartyOrgEntity::getAgencyId, staffInfo.getAgencyId()); - orgWrapper.ne(IcPartyOrgEntity::getPartyOrgType, NumConstant.FIVE_STR); - IcPartyOrgEntity org = icPartyOrgDao.selectOne(orgWrapper); + IcPartyOrgEntity org = icPartyOrgService.getIcPartyOrg(tokenDto.getCustomerId(),tokenDto.getUserId()); if (null == org) { return new PageData<>(Collections.emptyList(), 0); } @@ -178,17 +168,8 @@ public class IcPartyMemberServiceImpl extends BaseServiceImpl orgWrapper = new LambdaQueryWrapper<>(); - orgWrapper.eq(IcPartyOrgEntity::getCustomerId, tokenDto.getCustomerId()); - orgWrapper.eq(IcPartyOrgEntity::getAgencyId, staffInfo.getAgencyId()); - orgWrapper.ne(IcPartyOrgEntity::getPartyOrgType, NumConstant.FIVE_STR); - IcPartyOrgEntity orgInfo = icPartyOrgDao.selectOne(orgWrapper); + IcPartyOrgEntity orgInfo=icPartyOrgService.getIcPartyOrg(tokenDto.getCustomerId(),tokenDto.getUserId()); if (null == orgInfo) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "党组织不存在", "党组织不存在"); }