fix: Check if is under restricted
This commit is contained in:
parent
72eb53817c
commit
e96c0896b9
3 changed files with 12 additions and 2 deletions
|
|
@ -31,6 +31,7 @@
|
|||
newman
|
||||
gron
|
||||
fx
|
||||
google-java-format
|
||||
];
|
||||
shellHook = ''
|
||||
export JAVA_HOME=${pkgs.jdk21}
|
||||
|
|
|
|||
|
|
@ -118,6 +118,15 @@ public class PathFinderService {
|
|||
return new DeliveryPathResponse(0f, 0, new DronePath[0]);
|
||||
}
|
||||
|
||||
for (var r : records) {
|
||||
if (isRestricted(r.delivery())) {
|
||||
throw new IllegalStateException(
|
||||
"Delivery "
|
||||
+ r.id()
|
||||
+ " is located within a restricted area and cannot be fulfilled");
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, List<MedDispatchRecRequest>> assigned = assignDeliveries(records);
|
||||
|
||||
List<DronePath> paths = new ArrayList<>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue