| | |
| | | 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 ); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | private PatDetails getPatDetails(AppointmentDO appointment) { |
| | | PatDetails patDetails = new PatDetails(); |
| | | patDetails.setAppointmentId( appointment.getId() ); |
| | | patDetails.setId( appointment.getPatId() ); |
| | | patDetails.setName( appointment.getPatName() ); |
| | | patDetails.setMobile( appointment.getPatMobile() ); |