Преглед изворни кода

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

matianxiang пре 3 месеци
родитељ
комит
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 118
     @Override
119 119
     public void checkAppointmentTime(String attendingDoctor, Date startTime, Date endTime) {
120 120
         List<PatientAppointment> list = this.list(Wrappers.<PatientAppointment>lambdaQuery()
121
-                .eq(PatientAppointment::getAttendingDoctorId, attendingDoctor));
121
+                .eq(PatientAppointment::getAppointmentPerson, attendingDoctor));
122 122
         for (PatientAppointment patientAppointment : list) {
123 123
             // 判断时间是否重叠
124 124
             if (PatientBaseUtil.isOverlapLocalTime(startTime, endTime, patientAppointment.getAppointmentStartTime(), patientAppointment.getAppointmentEndTime())) {