Commit 2823ba2f authored by Julien's avatar Julien
Browse files

Merge remote-tracking branch 'origin/Dev' into Scenario3FE

parents 46a46e55 6328d534
Pipeline #17238 passed with stages
in 6 minutes and 23 seconds
before_script:
stages:
- build
- test
......@@ -7,19 +5,20 @@ stages:
build_job:
stage: build
script:
script:
- sudo cp /home/ec2-user/deploy-script-Dev.sh .
- sudo ./deploy-script-Dev.sh --build
push_job:
stage: test
script:
- sudo cp //home/ec2-user/deploy-script-Dev.sh .
- sudo ./deploy-script-Dev.sh --push
- sudo cp /home/ec2-user/deploy-script-Dev.sh .
- sudo ./deploy-script-Dev.sh --build --push
deploy_job:
stage: deploy
script:
- cd /home/oai/
- ./deploy-script.sh --push --deploy
when: manual
\ No newline at end of file
- sudo cp /home/ec2-user/deploy-script-Dev.sh .
- sudo cp /home/ec2-user/app-machine-access.pem .
- ./deploy-script-Dev.sh --deploy
when: manual
......@@ -41,8 +41,8 @@ public class VehiculeRepositoryImpl implements VehiculeRepositoryCustom
// On recupere les reservations
query = entityManager.createNativeQuery(
"" + "SELECT * FROM mytransport.reservation as reservation " + "WHERE reservation.vehicule_id = ? "
+ "AND (reservation.start_date BETWEEN ? AND ? OR reservation.end_date BETWEEN ? AND ?) "
+ "OR (? BETWEEN reservation.start_date AND reservation.end_date OR ? BETWEEN reservation.start_date AND reservation.end_date) ",
+ "AND (reservation.start_date BETWEEN ? AND ? OR reservation.end_date BETWEEN ? AND ? "
+ "OR (? BETWEEN reservation.start_date AND reservation.end_date OR ? BETWEEN reservation.start_date AND reservation.end_date)) ",
Reservation.class);
......@@ -146,8 +146,8 @@ public class VehiculeRepositoryImpl implements VehiculeRepositoryCustom
query = entityManager.createNativeQuery(
"" + "SELECT * FROM mytransport.reservation as reservation " + "WHERE reservation.vehicule_id = ? "
// + "AND ( ? BETWEEN reservation.start_date AND reservation.end_date OR ? BETWEEN reservation.start_date AND reservation.end_date) "
+ "AND ( reservation.start_date BETWEEN ? AND ? OR reservation.end_date BETWEEN ? AND ? ) "
+ "OR ( ? BETWEEN reservation.start_date AND reservation.end_date OR ? BETWEEN reservation.start_date AND reservation.end_date) "
+ "AND ( reservation.start_date BETWEEN ? AND ? OR reservation.end_date BETWEEN ? AND ? "
+ "OR ( ? BETWEEN reservation.start_date AND reservation.end_date OR ? BETWEEN reservation.start_date AND reservation.end_date)) "
+ "ORDER BY reservation.start_date",
Reservation.class);
......@@ -161,6 +161,8 @@ public class VehiculeRepositoryImpl implements VehiculeRepositoryCustom
reservations = query.getResultList();
System.out.println("\n\n\n"+vehicule);
System.out.println(reservations+"\n\n\n");
if (disponibiliteFlex(startDate, endDate, nbJours, reservations))
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment