eight
2025-04-15 01a81beea99c0298a3b6178c7796f4c27b30c6c7
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java
@@ -133,11 +133,16 @@
                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 );
                }
            }
        }
@@ -316,6 +321,7 @@
    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() );