|
|
@ -29,7 +29,6 @@ import com.epmet.modules.feign.ResiGroupFeignClient; |
|
|
|
import com.epmet.modules.partymember.entity.*; |
|
|
|
import com.epmet.modules.partymember.redis.PartymemberInfoRedis; |
|
|
|
import com.epmet.modules.partymember.service.*; |
|
|
|
import com.epmet.modules.warmhearted.constant.ResiWarmUserMessageConstant; |
|
|
|
import com.epmet.modules.warmhearted.constant.ResiWarmheartedConstant; |
|
|
|
import com.epmet.modules.warmhearted.constant.ResiWarmheartedVisitConstant; |
|
|
|
import com.epmet.redis.ResiPartyMemberRedis; |
|
|
@ -49,7 +48,8 @@ import com.epmet.resi.partymember.dto.partymember.result.AuditingDetailResultDTO |
|
|
|
import com.epmet.resi.partymember.dto.partymember.result.AutoFailedDetailResultDTO; |
|
|
|
import com.epmet.resi.partymember.dto.partymember.result.RejectedDetailResultDTO; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
@ -57,7 +57,6 @@ import org.springframework.transaction.annotation.Transactional; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
/** |
|
|
|
* 党员认证 |
|
|
@ -68,7 +67,7 @@ import java.util.Map; |
|
|
|
@Service |
|
|
|
@Slf4j |
|
|
|
public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService { |
|
|
|
|
|
|
|
private Logger logger = LoggerFactory.getLogger(getClass()); |
|
|
|
@Autowired |
|
|
|
private EpmetUserFeignClient epmetUserFeignClient; |
|
|
|
@Autowired |
|
|
@ -93,6 +92,9 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService |
|
|
|
private ResiPartyMemberRedis resiPartyMemberRedis; |
|
|
|
@Autowired |
|
|
|
private ResiGroupFeignClient resiGroupFeignClient; |
|
|
|
@Autowired |
|
|
|
private PartymemberAuthRecordService partymemberAuthRecordService; |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result<PartyMemberInitResultDTO> init(PartyMemberInitFromDTO fromDto) { |
|
|
@ -182,7 +184,7 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService |
|
|
|
return new Result().error(EpmetErrorCode.MOBILE_CODE_ERROR.getCode()); |
|
|
|
}*/ |
|
|
|
|
|
|
|
//获取党员基本信息
|
|
|
|
//获取党员基本信息(匹配)
|
|
|
|
PartymemberConfirmAutoDTO confirmAutoDTO = |
|
|
|
partymemberBaseInfoService.getPartyMemberBaseInfo(partyMemberInfoDTO); |
|
|
|
|
|
|
@ -212,6 +214,9 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService |
|
|
|
partyMemberInfoEntity.setConfirmResult(PartyMemberConstant.AUTO_CONFIRM_SUCCESS); |
|
|
|
if (partyMemberInfoEntity.getId().isEmpty()) { |
|
|
|
partymemberInfoService.insert(partyMemberInfoEntity); |
|
|
|
//记录当前居民与党员库关系,保存认证信息
|
|
|
|
logger.info(String.format("党员认证自动匹配成功,保存partymember_auth_record,userId=%s,党员库id=%s",partyMemberInfoEntity.getUserId(),confirmAutoDTO.getPatryMemberBaseInfoId())); |
|
|
|
partymemberAuthRecordService.insert(partyMemberInfoEntity,confirmAutoDTO.getPatryMemberBaseInfoId()); |
|
|
|
} else { |
|
|
|
partymemberInfoService.updateById(partyMemberInfoEntity); |
|
|
|
} |
|
|
@ -256,7 +261,7 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService |
|
|
|
PartymemberConfirmAutoEntity.class)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//
|
|
|
|
//判断是否已注册居民,如果没有则注册居民
|
|
|
|
isResiRegister(partyMemberInfoDTO); |
|
|
|
|
|
|
@ -301,7 +306,6 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService |
|
|
|
PartymemberInfoEntity partyMemberInfoEntity = partymemberInfoService.selectById(fromDTO.getPartyMemberId()); |
|
|
|
partyMemberInfoEntity.setId(manualEntity.getPartymemberInfoId()); |
|
|
|
partyMemberInfoEntity.setConfirmResult(fromDTO.getPartyMemberFlag()); |
|
|
|
|
|
|
|
partymemberInfoService.updateById(partyMemberInfoEntity); |
|
|
|
|
|
|
|
manualEntity.setAuditStatus(fromDTO.getPartyMemberFlag()); |
|
|
@ -326,6 +330,12 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService |
|
|
|
identityParam.setUserId(partyMemberInfoEntity.getUserId()); |
|
|
|
identityParam.setPartyFlag(NumConstant.ONE_STR); |
|
|
|
resiGroupFeignClient.updateWhenAuditedResiRole(identityParam); |
|
|
|
//如果是自动匹配失败的,人工审核他是党员,需要记录党员库-居民的认证关系
|
|
|
|
PartymemberConfirmAutoDTO partymemberConfirmAutoDTO=partymemberConfirmAutoService.get(fromDTO.getAutoId()); |
|
|
|
if(partymemberConfirmAutoDTO!=null){ |
|
|
|
logger.info(String.format("自动匹配失败,人工审核是党员,保存partymember_auth_record,userId=%s,党员库id=%s",partyMemberInfoEntity.getUserId(),partymemberConfirmAutoDTO.getPatryMemberBaseInfoId())); |
|
|
|
partymemberAuthRecordService.insert(partyMemberInfoEntity,partymemberConfirmAutoDTO.getPatryMemberBaseInfoId()); |
|
|
|
} |
|
|
|
} else { |
|
|
|
auditMessageToResi(partyMemberInfoEntity, PartyMemberMessageConstant.AUDIT_REJECT_MSG); |
|
|
|
} |
|
|
|