PAYM session
1) load execution SETTLEMENT_DATE >= today 2) set execution.sessionId
This commit is contained in:
parent
a1b1bbc1a5
commit
46ac71e6e4
2 changed files with 18 additions and 2 deletions
|
|
@ -137,7 +137,7 @@ public class InclusionObligations implements ISessionStage {
|
|||
Map<Long, Registry> rgsToUpdate = new HashMap<>();
|
||||
List<ExecutionCommon> execsToUpdate = new ArrayList<>();
|
||||
boolean loadExecs = !IEnumKey.contains(sessionType,
|
||||
SessionType.TRDT, SessionType.CURR, SessionType.PAYM, SessionType.UNIT, SessionType.IPOT);
|
||||
SessionType.TRDT, SessionType.CURR, SessionType.UNIT, SessionType.IPOT);
|
||||
for (Map.Entry<Long, List<Registry>> entrySet : registryByGroupId.entrySet()) {
|
||||
log.debug("Processing set of registry with groupId: {}", entrySet.getKey());
|
||||
String rgsSection = null;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@ package ru.spcex.clearing.imdg.businessobject;
|
|||
import java.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.classes.statics.data.execution.ExecutionCurrency;
|
||||
|
|
@ -33,7 +36,20 @@ public class ExecutionCurrencyMapStore extends TemplateMapStore<ExecutionCurrenc
|
|||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
return defaultLoadAllKeysOnTodayByField("TRADING_DATE", false);
|
||||
LocalDate today = LocalDate.now();
|
||||
String dateField = "TRADING_DATE";
|
||||
log.debug("loadAllKeys from {}", getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName()
|
||||
+ " where TRADING_DATE" + " = ? or SETTLEMENT_DATE >= ?",
|
||||
(resultSet, i) -> resultSet.getLong("id"),
|
||||
new Object[]{today, today});
|
||||
} catch (Throwable e) {
|
||||
log.error("At load keys from {} (by field {}): {}", getTableName(), dateField, ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue