|
|
@ -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<IcPartyMemberDao, |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<IcPartyMemberResultDTO> 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<IcPartyOrgEntity> 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<IcPartyMemberDao, |
|
|
|
|
|
|
|
@Override |
|
|
|
public IcPartyMemberDTO get(TokenDto tokenDto, String id) { |
|
|
|
|
|
|
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); |
|
|
|
if (null == staffInfo) { |
|
|
|
throw new EpmetException("获取工作人员信息失败"); |
|
|
|
} |
|
|
|
//获取工作人员所属组织同级的党组织
|
|
|
|
LambdaQueryWrapper<IcPartyOrgEntity> 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(), "党组织不存在", "党组织不存在"); |
|
|
|
} |
|
|
|