| | |
| | | continue; |
| | | |
| | | // 从DB查询预约,是否已经存在 |
| | | AppointmentDO appointmentDO = appointmentMapper.getByPatAndCheckTypeAndBookDate(appointmentExtermal.getPatId(), appointmentExtermal.getBookCheckType(), appointmentExtermal.getBookDate()); |
| | | AppointmentDO appointmentDO = appointmentMapper.getByEpisodeIdAndApplyNo(appointmentExtermal.getEpisodeId(), appointmentExtermal.getApplyNo()); |
| | | if (null == appointmentDO) { |
| | | appointmentMapper.insert(appointmentExtermal); |
| | | } else { |
| | | appointmentExtermal.setId( appointmentDO.getId() ); // 确保 返回值包含 appointment id |
| | | |
| | | // 处理第一次确认时还没有预约时间,再来确认时已有预约时间的情况 |
| | | if (appointmentDO.getBookDate() != appointmentExtermal.getBookDate()) { |
| | | appointmentMapper.updateById( appointmentExtermal ); |
| | | } |
| | | } |
| | | } |
| | | |