Permalink
Browse files

preTheater form added

  • Loading branch information...
merovingienne committed Jul 10, 2017
1 parent 51cf300 commit f349145783745c1485f42262cdb40d2d668f8ed1
View
@@ -161,38 +161,7 @@
</exclusions>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-compiler</artifactId>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.antlr</groupId>
<artifactId>antlr-runtime</artifactId>
</exclusion>
<exclusion>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<version>4.7</version>
<scope>compile</scope>
</dependency>
<!--&lt;!&ndash; https://mvnrepository.com/artifact/org.hsqldb/hsqldb &ndash;&gt;-->
@@ -88,8 +88,13 @@ public boolean isOutsideAvailableTimes() {
Interval available = otService.getLocationAvailableTime(location, start.toLocalDate());
Interval scheduled = Interval.of(start.toInstant(), end.toInstant());
Interval overlap = scheduled.intersection(available);
return !scheduled.equals(overlap);
Interval overlap = null;
if (available.isConnected(scheduled)){
overlap = scheduled.intersection(available);
return !scheduled.equals(overlap);
}
return true;
}
public Surgery getSurgery() {
@@ -79,7 +79,7 @@ rule "firstComeFirstServed"
$surgery: PlannedSurgery($start : start, start != null, location != null)
then
ZonedDateTime $created = ZonedDateTime.ofInstant($surgery.getSurgery().getDateCreated().toInstant(), ZoneId.systemDefault());
int hours = Duration.between($created, $start).toHours();
int hours = (int) Duration.between($created, $start).toHours();
scoreHolder.addSoftConstraintMatch(kcontext, -hours);
end
Oops, something went wrong.

0 comments on commit f349145

Please sign in to comment.