Skip to content

Commit

Permalink
(fix):Correctly set onOrBefore date affecting incremental generation …
Browse files Browse the repository at this point in the history
…of queue numbers (#63)
  • Loading branch information
makombe authored Mar 19, 2024
1 parent b1905e5 commit 210af0d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public String generateVisitQueueNumber(Location location, Queue queue, Visit vis
Date onOrAfter = Date.from(LocalDateTime.now().with(LocalTime.MIN).atZone(ZoneId.systemDefault()).toInstant());
criteria.setStartedOnOrAfter(onOrAfter);
Date onOrBefore = Date.from(LocalDateTime.now().with(LocalTime.MAX).atZone(ZoneId.systemDefault()).toInstant());
criteria.setStartedOnOrAfter(onOrBefore);
criteria.setStartedOnOrBefore(onOrBefore);
Long nextQueueNumber = getCountOfQueueEntries(criteria) + 1;
String paddedString = StringUtils.leftPad(String.valueOf(nextQueueNumber), 3, "0");
String serviceName = queue.getName().toUpperCase();
Expand Down

0 comments on commit 210af0d

Please sign in to comment.