|
|
@ -119,7 +119,7 @@ public class IcNatServiceImpl extends BaseServiceImpl<IcNatDao, IcNatEntity> imp |
|
|
|
if (null != icNatDTO && icNatDTO.getNatResult().equals(formDTO.getNatResult())) { |
|
|
|
throw new RenException(EpmetErrorCode.IC_NAT_IDCARD_NATTIME.getCode(), EpmetErrorCode.IC_NAT_IDCARD_NATTIME.getMsg()); |
|
|
|
} else if (null != icNatDTO && !icNatDTO.getNatResult().equals(formDTO.getNatResult())) { |
|
|
|
if ("wxmp".equals(formDTO.getClient())) { |
|
|
|
if (AppClientConstant.APP_RESI.equals(formDTO.getApp())) { |
|
|
|
throw new RenException(EpmetErrorCode.RESI_IC_NAT.getCode(), EpmetErrorCode.RESI_IC_NAT.getMsg()); |
|
|
|
} |
|
|
|
throw new RenException(EpmetErrorCode.IC_NAT.getCode(), EpmetErrorCode.IC_NAT.getMsg()); |
|
|
@ -129,10 +129,6 @@ public class IcNatServiceImpl extends BaseServiceImpl<IcNatDao, IcNatEntity> imp |
|
|
|
if (null == agencyInfo) { |
|
|
|
throw new RenException(String.format("获取组织缓存信息失败%s", formDTO.getAgencyId())); |
|
|
|
} |
|
|
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); |
|
|
|
if (null == staffInfo){ |
|
|
|
throw new EpmetException(String.format("获取工作人员信息失败%s", formDTO.getStaffId())); |
|
|
|
} |
|
|
|
ResiAndLocalResiResultDTO resiCount = icResiUserDao.getResiCount(formDTO.getAgencyId(), formDTO.getIdCard(), formDTO.getCustomerId()); |
|
|
|
//2.新增核酸基础信息数据
|
|
|
|
IcNatEntity entity = ConvertUtils.sourceToTarget(formDTO, IcNatEntity.class); |
|
|
@ -146,8 +142,19 @@ public class IcNatServiceImpl extends BaseServiceImpl<IcNatDao, IcNatEntity> imp |
|
|
|
IcNatRelationEntity relationEntity = ConvertUtils.sourceToTarget(formDTO, IcNatRelationEntity.class); |
|
|
|
relationEntity.setIcNatId(entity.getId()); |
|
|
|
relationEntity.setIsLocalResiUser(resiCount.getIsLocal() == NumConstant.ZERO ? NumConstant.ZERO_STR : NumConstant.ONE_STR); |
|
|
|
if(AppClientConstant.APP_GOV.equals(formDTO.getApp())){ |
|
|
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); |
|
|
|
if (null == staffInfo){ |
|
|
|
log.error(String.format("获取工作人员信息失败%s", formDTO.getStaffId())); |
|
|
|
throw new EpmetException(String.format("获取工作人员信息失败%s", formDTO.getStaffId())); |
|
|
|
} |
|
|
|
relationEntity.setAgencyId(staffInfo.getAgencyId()); |
|
|
|
relationEntity.setPids(StringUtils.isNotBlank(staffInfo.getAgencyPIds()) ? staffInfo.getAgencyPIds() + ":" + staffInfo.getAgencyId() : staffInfo.getAgencyId()); |
|
|
|
}else{ |
|
|
|
relationEntity.setAgencyId(formDTO.getAgencyId()); |
|
|
|
AgencyInfoCache agencyInfoCache=CustomerOrgRedis.getAgencyInfo(formDTO.getAgencyId()); |
|
|
|
relationEntity.setPids(StringUtils.isNotBlank(agencyInfoCache.getPids()) ? agencyInfoCache.getPids() + ":" + formDTO.getAgencyId() : formDTO.getAgencyId()); |
|
|
|
} |
|
|
|
icNatRelationDao.insert(relationEntity); |
|
|
|
|
|
|
|
//3.新增通知表信息
|
|
|
|