Browse Source

xin zeng

master
zxc 3 years ago
parent
commit
9b5d77f4d2
  1. 8
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java

8
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java

@ -134,14 +134,16 @@ public class IcNatServiceImpl extends BaseServiceImpl<IcNatDao, IcNatEntity> imp
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);
if (StringUtils.isNotBlank(formDTO.getUserId())) {
/*if (StringUtils.isNotBlank(formDTO.getUserId())) {
entity.setIsResiUser("1");
}
}*/
entity.setIsResiUser(org.apache.commons.lang3.StringUtils.isNotBlank(resiCount.getUserId()) ? NumConstant.ONE_STR : NumConstant.ZERO_STR);
entity.setUserId(null == resiCount.getUserId() ? "" : resiCount.getUserId());
insert(entity);
//3.核酸记录关系表新增与组织的关系数据
ResiAndLocalResiResultDTO resiCount = icResiUserDao.getResiCount(formDTO.getAgencyId(), formDTO.getIdCard(), formDTO.getCustomerId());
IcNatRelationEntity relationEntity = ConvertUtils.sourceToTarget(formDTO, IcNatRelationEntity.class);
relationEntity.setIcNatId(entity.getId());
relationEntity.setIsLocalResiUser(resiCount.getIsLocal() == NumConstant.ZERO ? NumConstant.ZERO_STR : NumConstant.ONE_STR);

Loading…
Cancel
Save