Bag fixing.
This commit is contained in:
psemenkov 2023-08-18 13:16:33 +03:00
parent 745a13a8f8
commit d6cefd3902

View file

@ -158,7 +158,7 @@ public class TaskManager implements InitializingBean, AutoCloseable {
// --- Планирование задач ---
protected void updateScheduler() {
Collection<PlannerAllToday> schedulerAllTodays = plannerAllTodayMap.getAllValues();
Collection<PlannerAllToday> schedulerAllTodays = plannerAllTodayMap.getCollectionObjectsByFieldValues(Map.of("clearingDate", LocalDate.now()));
Collection<PlannerAllToday> sortedSchedulers =
schedulerAllTodays.stream().sorted((o1, o2) -> (Active.equalsByKey(o1.getTaskStatus()) && Cancel.equalsByKey(o2.getTaskStatus())) ? -1 : 0)
.collect(Collectors.toCollection(ArrayList::new));