Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. @RequestMapping(value="/reservations/{idsalon}/{année}/{mois}/{jour}", method=RequestMethod.GET)
  2. public List<LocalTime> ReservationsJour(@PathVariable Long idsalon, @PathVariable int année, @PathVariable int mois, @PathVariable int jour){
  3. LocalDateTime d2 = LocalDateTime.of(année,mois,jour,00,00);
  4. LocalDateTime d3 = LocalDateTime.of(année,mois,jour+1,00,00);
  5.  
  6.  
  7. ArrayList<Reservations> michel = new ArrayList();
  8.  
  9. michel.addAll(resRepos.findReservationsByJour(d2, d3, idsalon));
  10. ArrayList<LocalTime> TimeList = new ArrayList() ;
  11.  
  12. for (Reservations i : michel) {
  13. LocalDateTime abcd = i.getHstart();
  14. LocalTime tempslocal = abcd.toLocalTime();
  15.  
  16. TimeList.add(tempslocal);
  17.  
  18. }
  19.  
  20.  
  21. ArrayList<LocalTime> listefinale = new ArrayList();
  22. ArrayList<LocalTime> jeanlouis = new ArrayList();
  23. ArrayList<LocalTime> jeanmichel = new ArrayList();
  24.  
  25. jeanlouis.addAll(listeHeures(LocalTime.of(10,00), LocalTime.of(17, 00)));
  26.  
  27.  
  28. for (LocalTime i : jeanlouis) {
  29. for (LocalTime j : TimeList) {
  30.  
  31. if (i.isAfter(j) && i.isBefore(j.plusMinutes(30))){
  32. jeanlouis.remove(i);
  33. jeanmichel.add(i);
  34. }}};
  35. return jeanmichel ;
  36.  
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement