Browse Source

Merge remote-tracking branch 'origin/dev_0521yzm' into dev_temp

dev_shibei_match
yinzuomei 4 years ago
parent
commit
b81cc8fa2b
  1. 14
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/service/impl/ResiWarmheartedApplyServiceImpl.java

14
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/service/impl/ResiWarmheartedApplyServiceImpl.java

@ -165,7 +165,7 @@ public class ResiWarmheartedApplyServiceImpl extends BaseServiceImpl<ResiWarmhea
//1:热心居民申请行为记录表新增数据
result = resiWarmheartedVisitService.saveResiWarmheartedVisit(formDTO);
if (!result.success()) {
logger.error(ResiWarmheartedVisitConstant.OPERATION_EXCEPTION);
logger.warn(ResiWarmheartedVisitConstant.OPERATION_EXCEPTION);
}
ResiWarmheartedResultDTO resiWarmheartedResultDTO = result.getData();
//2:查询是否已申请热心居民(不查询审核未通过的)
@ -191,7 +191,7 @@ public class ResiWarmheartedApplyServiceImpl extends BaseServiceImpl<ResiWarmhea
ResiWarmheartedFormDTO.setAuditStatus(ResiWarmheartedVisitConstant.REJECTED);
ResiWarmheartedApplyDTO resiWarmheartedApplyDTO = resiWarmheartedApplyDao.selectResiWarmheartedApply(ResiWarmheartedFormDTO);
if (null != resiWarmheartedApplyDTO) {
logger.error(ResiWarmheartedVisitConstant.REPEAT_EXCEPTION);
logger.warn(ResiWarmheartedVisitConstant.REPEAT_EXCEPTION);
throw new RenException(ResiWarmheartedVisitConstant.REPEAT_EXCEPTION);
} else {
//0:调用user服务获取申请人的基本信息
@ -408,17 +408,21 @@ public class ResiWarmheartedApplyServiceImpl extends BaseServiceImpl<ResiWarmhea
Result result = new Result();
//0:先校验数据是否是未审核状态,防止接口测试调用多次
ResiWarmheartedApplyEntity entity = baseDao.selectById(formDTO.getApplyId());
if (null == entity || !ResiWarmheartedVisitConstant.UNDER_AUDITTING.equals(entity.getAuditStatus())) {
logger.error(String.format("政府端-热心居民申请-审核通过错误,applyId=%s,错误提示:%s",ResiWarmheartedVisitConstant.AUDIT_EXCEPTION));
if(null ==entity){
logger.warn(String.format("政府端-热心居民申请-审核通过错误,applyId=%s,resi_warmhearted_apply is null",formDTO.getApplyId()));
throw new RenException(ResiWarmheartedVisitConstant.AUDIT_EXCEPTION);
}
if (!ResiWarmheartedVisitConstant.UNDER_AUDITTING.equals(entity.getAuditStatus())) {
logger.warn(String.format("政府端-热心居民申请-审核通过错误,applyId=%s,audit_status is not under_auditting",formDTO.getApplyId()));
return new Result();
}
//1:更新热心居民申请表数据
//审核状态-通过
entity.setAuditStatus(PartyMemberConstant.APPROVED);
int num = baseDao.updateById(entity);
//2:审核通过的添加热心居民的角色
if (num < NumConstant.ONE) {
logger.error(String.format("政府端-热心居民申请-审核通过错误,applyId=%s,错误提示:%s",ResiWarmheartedVisitConstant.UPDATE_EXCEPTION));
logger.warn(String.format("政府端-热心居民申请-审核通过错误,applyId=%s,错误提示:%s",formDTO.getApplyId(),ResiWarmheartedVisitConstant.UPDATE_EXCEPTION));
if (StrConstant.SPECIAL_CUSTOMER.equals(tokenDTO.getCustomerId())) {
throw new RenException("组长申请数据更新失败,组长角色添加失败");
} else {

Loading…
Cancel
Save