|
|
@ -525,15 +525,15 @@ public class IcVaccineServiceImpl extends BaseServiceImpl<IcVaccineDao, IcVaccin |
|
|
|
@Override |
|
|
|
public void edit(AddIcVaccineFormDTO formDTO) { |
|
|
|
//0.先根据身份证号和接种时间校验除当前数据是否还存在相同数据
|
|
|
|
IcVaccineDTO icVaccineDTO = baseDao.getVaccineDTO(formDTO.getCustomerId(), formDTO.getIcVaccineId(), formDTO.getIdCard(), DateUtils.format(formDTO.getInoculateTime(), DateUtils.DATE_TIME_PATTERN_END_WITH_MINUTE)); |
|
|
|
IcVaccineDTO icVaccineDTO = baseDao.getVaccineDTO(formDTO.getCustomerId(), formDTO.getVaccineId(), formDTO.getIdCard(), DateUtils.format(formDTO.getInoculateTime(), DateUtils.DATE_TIME_PATTERN_END_WITH_MINUTE)); |
|
|
|
if (null != icVaccineDTO) { |
|
|
|
throw new RenException(EpmetErrorCode.IC_VACCINE.getCode(), EpmetErrorCode.IC_VACCINE.getMsg()); |
|
|
|
} |
|
|
|
//1.更新核酸记录基础信息表数据
|
|
|
|
IcVaccineEntity entity = ConvertUtils.sourceToTarget(formDTO, IcVaccineEntity.class); |
|
|
|
entity.setId(formDTO.getIcVaccineId()); |
|
|
|
entity.setId(formDTO.getVaccineId()); |
|
|
|
if (!updateById(entity)) { |
|
|
|
log.error(String.format("数据修改失败,核酸记录Id->%s", formDTO.getIcVaccineId())); |
|
|
|
log.error(String.format("数据修改失败,核酸记录Id->%s", formDTO.getVaccineId())); |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "疫苗接种记录信息修改失败"); |
|
|
|
} |
|
|
|
//修改只涉及到基础信息的修改 不会修改关系数据 关系表不涉及更新
|
|
|
|