Browse Source

fix: 同一时间段同一医生不允许预约多次

matianxiang 3 months ago
parent
commit
0ac99e2d6f

+ 1 - 1
eitc-patient-base/src/main/java/com/eitc/patient/service/impl/PatientAppointmentServiceImpl.java

@@ -118,7 +118,7 @@ public class PatientAppointmentServiceImpl extends ServiceImpl<PatientAppointmen
118
     @Override
118
     @Override
119
     public void checkAppointmentTime(String attendingDoctor, Date startTime, Date endTime) {
119
     public void checkAppointmentTime(String attendingDoctor, Date startTime, Date endTime) {
120
         List<PatientAppointment> list = this.list(Wrappers.<PatientAppointment>lambdaQuery()
120
         List<PatientAppointment> list = this.list(Wrappers.<PatientAppointment>lambdaQuery()
121
-                .eq(PatientAppointment::getAttendingDoctorId, attendingDoctor));
121
+                .eq(PatientAppointment::getAppointmentPerson, attendingDoctor));
122
         for (PatientAppointment patientAppointment : list) {
122
         for (PatientAppointment patientAppointment : list) {
123
             // 判断时间是否重叠
123
             // 判断时间是否重叠
124
             if (PatientBaseUtil.isOverlapLocalTime(startTime, endTime, patientAppointment.getAppointmentStartTime(), patientAppointment.getAppointmentEndTime())) {
124
             if (PatientBaseUtil.isOverlapLocalTime(startTime, endTime, patientAppointment.getAppointmentStartTime(), patientAppointment.getAppointmentEndTime())) {