From d0a82dce3418703d6e0d291f879cb6c9dd8ecd3d Mon Sep 17 00:00:00 2001 From: etreschenkov Date: Fri, 10 Apr 2026 13:10:57 +0300 Subject: [PATCH] http://jira.mfd.msk:8088/browse/CLS-962 --- .../imdg/object/NotificationMapStore.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/NotificationMapStore.java b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/NotificationMapStore.java index dd137918d..734cf3d80 100644 --- a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/NotificationMapStore.java +++ b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/NotificationMapStore.java @@ -1,11 +1,11 @@ package ru.spcex.clearing.imdg.object; +import org.apache.commons.lang3.exception.ExceptionUtils; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Component; import ru.clearing.classes.statics.data.misc.Notification; import ru.spcex.clearing.imdg.IMDGDistributedNames; import ru.spcex.clearing.imdg.base.TemplateMapStore; -import ru.spcex.platform.utils.log.ExceptionUtils; import ru.spcex.platform.utils.time.TimeUtil; import java.sql.ResultSet; @@ -39,7 +39,19 @@ public class NotificationMapStore extends TemplateMapStore { @Override public Iterable loadAllKeys() { - return defaultLoadAllKeysOnTodayByField("clearing_date", false); + LocalDate today = LocalDate.now(); + log.debug("loadAllKeys from {} on {} {} today", getTableName(), "clearing_date", "="); + List keys; + try { + keys = jdbcTemplate.query("select id from " + getTableName() + " where clearing_date = ? or " + + "(object_type in ('ACCB', 'ACCA') and notification_status = 'PEND' and priority = 'HIGH')", + (resultSet, i) -> resultSet.getLong("id"), + new Object[]{today}); + } catch (Throwable e) { + log.error("At load keys from {} (by field {}): {}", getTableName(), "clearing_date", ExceptionUtils.getStackTrace(e)); + throw e; + } + return keys; } @Override