Update Postman collection
This commit is contained in:
@@ -218,7 +218,6 @@ public class AppointmentService {
|
||||
List<Long> employeeIds = assignableEmployees.stream().map(Employee::getEmployeeId).collect(Collectors.toList());
|
||||
List<Appointment> allAppointments = appointmentRepository.findByEmployeeEmployeeIdInAndAppointmentDate(employeeIds, date);
|
||||
|
||||
// Group by employee for faster lookup in the loop
|
||||
java.util.Map<Long, List<Appointment>> appointmentsByEmployee = allAppointments.stream()
|
||||
.collect(Collectors.groupingBy(a -> a.getEmployee().getEmployeeId()));
|
||||
|
||||
@@ -350,7 +349,6 @@ public class AppointmentService {
|
||||
.isPresent();
|
||||
}
|
||||
|
||||
//------------------------------------
|
||||
private void validateAvailability(Employee employee, com.petshop.backend.entity.Service service, LocalDate date, LocalTime time, Long appointmentIdToIgnore) {
|
||||
List<Appointment> existingAppointments = appointmentRepository
|
||||
.findByEmployeeEmployeeIdAndAppointmentDate(employee.getEmployeeId(), date);
|
||||
@@ -359,8 +357,6 @@ public class AppointmentService {
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------
|
||||
|
||||
private boolean isSlotAvailable(List<Appointment> existingAppointments, com.petshop.backend.entity.Service requestedService, LocalTime requestedStart, Long appointmentIdToIgnore) {
|
||||
LocalTime requestedEnd = requestedStart.plusMinutes(requestedService.getServiceDuration());
|
||||
for (Appointment existingAppointment : existingAppointments) {
|
||||
|
||||
Reference in New Issue
Block a user