http://jira.mfd.msk:8088/browse/CLS-383 imdg выгрузка данных за сегодня:
execution_deposit/execution_fond по trading_date s_trades по trade_date statement по clearing_date notification по clearing_date s_df по generation_time
This commit is contained in:
parent
5944cf8208
commit
9b2d5dbf3a
28 changed files with 514 additions and 22 deletions
|
|
@ -5,11 +5,14 @@ import org.springframework.stereotype.Component;
|
|||
import ru.clearing.classes.statics.data.execution.ExecutionFond;
|
||||
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.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class ExecutionFondMapStore extends TemplateMapStore<ExecutionFond> {
|
||||
|
|
@ -39,6 +42,21 @@ public class ExecutionFondMapStore extends TemplateMapStore<ExecutionFond> {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where trading_date = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExecutionFond objectReader(ResultSet resultSet) throws SQLException {
|
||||
ExecutionFond object = new ExecutionFond();
|
||||
|
|
|
|||
|
|
@ -5,11 +5,14 @@ import org.springframework.stereotype.Component;
|
|||
import ru.clearing.classes.statics.data.statement.Statement;
|
||||
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.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class StatementMapStore extends TemplateMapStore<Statement> {
|
||||
|
|
@ -35,6 +38,21 @@ public class StatementMapStore extends TemplateMapStore<Statement> {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where clearing_date = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Statement objectReader(ResultSet resultSet) throws SQLException {
|
||||
Statement object = new Statement();
|
||||
|
|
|
|||
|
|
@ -5,11 +5,14 @@ import org.springframework.stereotype.Component;
|
|||
import ru.clearing.classes.statics.data.execution.ExecutionDeposit;
|
||||
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.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class ExecutionDepositMapStore extends TemplateMapStore<ExecutionDeposit> {
|
||||
|
|
@ -43,6 +46,21 @@ public class ExecutionDepositMapStore extends TemplateMapStore<ExecutionDeposit>
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where trading_date = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ExecutionDeposit objectReader(ResultSet resultSet) throws SQLException {
|
||||
ExecutionDeposit object = new ExecutionDeposit();
|
||||
|
|
|
|||
|
|
@ -5,10 +5,13 @@ 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;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class NotificationMapStore extends TemplateMapStore<Notification> {
|
||||
|
|
@ -34,6 +37,21 @@ public class NotificationMapStore extends TemplateMapStore<Notification> {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where clearing_date = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Notification objectReader(ResultSet resultSet) throws SQLException {
|
||||
Notification object = new Notification();
|
||||
|
|
|
|||
|
|
@ -5,10 +5,13 @@ import org.springframework.stereotype.Component;
|
|||
import ru.clearing.classes.statics.data.sdf.SDf01;
|
||||
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;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class SDf01MapStore extends TemplateMapStore<SDf01> {
|
||||
|
|
@ -34,6 +37,21 @@ public class SDf01MapStore extends TemplateMapStore<SDf01> {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where cast(generation_time as date) = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SDf01 objectReader(ResultSet resultSet) throws SQLException {
|
||||
SDf01 object = new SDf01();
|
||||
|
|
|
|||
|
|
@ -5,10 +5,13 @@ import org.springframework.stereotype.Component;
|
|||
import ru.clearing.classes.statics.data.sdf.SDf02;
|
||||
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;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class SDf02MapStore extends TemplateMapStore<SDf02> {
|
||||
|
|
@ -34,6 +37,21 @@ public class SDf02MapStore extends TemplateMapStore<SDf02> {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where cast(generation_time as date) = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SDf02 objectReader(ResultSet resultSet) throws SQLException {
|
||||
SDf02 object = new SDf02();
|
||||
|
|
|
|||
|
|
@ -5,10 +5,13 @@ import org.springframework.stereotype.Component;
|
|||
import ru.clearing.classes.statics.data.sdf.SDf03;
|
||||
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;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class SDf03MapStore extends TemplateMapStore<SDf03> {
|
||||
|
|
@ -34,6 +37,21 @@ public class SDf03MapStore extends TemplateMapStore<SDf03> {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where cast(generation_time as date) = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SDf03 objectReader(ResultSet resultSet) throws SQLException {
|
||||
SDf03 object = new SDf03();
|
||||
|
|
|
|||
|
|
@ -5,10 +5,13 @@ import org.springframework.stereotype.Component;
|
|||
import ru.clearing.classes.statics.data.sdf.SDf04;
|
||||
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;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class SDf04MapStore extends TemplateMapStore<SDf04> {
|
||||
|
|
@ -34,6 +37,21 @@ public class SDf04MapStore extends TemplateMapStore<SDf04> {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where cast(generation_time as date) = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SDf04 objectReader(ResultSet resultSet) throws SQLException {
|
||||
SDf04 object = new SDf04();
|
||||
|
|
|
|||
|
|
@ -5,11 +5,14 @@ import org.springframework.stereotype.Component;
|
|||
import ru.clearing.classes.statics.data.sdf.SDf05;
|
||||
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.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class SDf05MapStore extends TemplateMapStore<SDf05> {
|
||||
|
|
@ -35,6 +38,21 @@ public class SDf05MapStore extends TemplateMapStore<SDf05> {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where cast(generation_time as date) = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SDf05 objectReader(ResultSet resultSet) throws SQLException {
|
||||
SDf05 object = new SDf05();
|
||||
|
|
|
|||
|
|
@ -2,15 +2,17 @@ package ru.spcex.clearing.imdg.object;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf06;
|
||||
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.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class SDf06MapStore extends TemplateMapStore<SDf06> {
|
||||
|
|
@ -36,6 +38,21 @@ public class SDf06MapStore extends TemplateMapStore<SDf06> {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where cast(generation_time as date) = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SDf06 objectReader(ResultSet resultSet) throws SQLException {
|
||||
SDf06 object = new SDf06();
|
||||
|
|
|
|||
|
|
@ -2,14 +2,17 @@ package ru.spcex.clearing.imdg.object;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf07;
|
||||
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.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class SDf07MapStore extends TemplateMapStore<SDf07> {
|
||||
|
|
@ -35,6 +38,21 @@ public class SDf07MapStore extends TemplateMapStore<SDf07> {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where cast(generation_time as date) = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SDf07 objectReader(ResultSet resultSet) throws SQLException {
|
||||
SDf07 object = new SDf07();
|
||||
|
|
|
|||
|
|
@ -5,10 +5,13 @@ import org.springframework.stereotype.Component;
|
|||
import ru.clearing.classes.statics.data.sdf.SDf08;
|
||||
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;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class SDf08MapStore extends TemplateMapStore<SDf08> {
|
||||
|
|
@ -34,6 +37,21 @@ public class SDf08MapStore extends TemplateMapStore<SDf08> {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where cast(generation_time as date) = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SDf08 objectReader(ResultSet resultSet) throws SQLException {
|
||||
SDf08 object = new SDf08();
|
||||
|
|
|
|||
|
|
@ -5,11 +5,13 @@ import org.springframework.stereotype.Component;
|
|||
import ru.clearing.classes.statics.data.sdf.SDf09;
|
||||
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.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class SDf09MapStore extends TemplateMapStore<SDf09> {
|
||||
|
|
@ -35,6 +37,21 @@ public class SDf09MapStore extends TemplateMapStore<SDf09> {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where cast(generation_time as date) = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SDf09 objectReader(ResultSet resultSet) throws SQLException {
|
||||
SDf09 object = new SDf09();
|
||||
|
|
|
|||
|
|
@ -5,11 +5,13 @@ import org.springframework.stereotype.Component;
|
|||
import ru.clearing.classes.statics.data.sdf.SDf10;
|
||||
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.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class SDf10MapStore extends TemplateMapStore<SDf10> {
|
||||
|
|
@ -36,6 +38,21 @@ public class SDf10MapStore extends TemplateMapStore<SDf10> {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where cast(generation_time as date) = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SDf10 objectReader(ResultSet resultSet) throws SQLException {
|
||||
SDf10 object = new SDf10();
|
||||
|
|
|
|||
|
|
@ -5,11 +5,13 @@ import org.springframework.stereotype.Component;
|
|||
import ru.clearing.classes.statics.data.sdf.SDf11;
|
||||
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.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class SDf11MapStore extends TemplateMapStore<SDf11> {
|
||||
|
|
@ -35,6 +37,21 @@ public class SDf11MapStore extends TemplateMapStore<SDf11> {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where cast(generation_time as date) = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SDf11 objectReader(ResultSet resultSet) throws SQLException {
|
||||
SDf11 object = new SDf11();
|
||||
|
|
|
|||
|
|
@ -3,15 +3,16 @@ package ru.spcex.clearing.imdg.object;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf12;
|
||||
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.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class SDf12MapStore extends TemplateMapStore<SDf12> {
|
||||
|
|
@ -37,6 +38,21 @@ public class SDf12MapStore extends TemplateMapStore<SDf12> {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where cast(generation_time as date) = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SDf12 objectReader(ResultSet resultSet) throws SQLException {
|
||||
SDf12 object = new SDf12();
|
||||
|
|
|
|||
|
|
@ -5,11 +5,13 @@ import org.springframework.stereotype.Component;
|
|||
import ru.clearing.classes.statics.data.sdf.SDf13;
|
||||
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.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class SDf13MapStore extends TemplateMapStore<SDf13> {
|
||||
|
|
@ -35,6 +37,21 @@ public class SDf13MapStore extends TemplateMapStore<SDf13> {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where cast(generation_time as date) = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SDf13 objectReader(ResultSet resultSet) throws SQLException {
|
||||
SDf13 object = new SDf13();
|
||||
|
|
|
|||
|
|
@ -2,14 +2,16 @@ package ru.spcex.clearing.imdg.object;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf14;
|
||||
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.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class SDf14MapStore extends TemplateMapStore<SDf14> {
|
||||
|
|
@ -35,6 +37,21 @@ public class SDf14MapStore extends TemplateMapStore<SDf14> {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where cast(generation_time as date) = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SDf14 objectReader(ResultSet resultSet) throws SQLException {
|
||||
SDf14 object = new SDf14();
|
||||
|
|
|
|||
|
|
@ -2,13 +2,16 @@ package ru.spcex.clearing.imdg.object;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf20;
|
||||
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;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class SDf20MapStore extends TemplateMapStore<SDf20> {
|
||||
|
|
@ -34,6 +37,21 @@ public class SDf20MapStore extends TemplateMapStore<SDf20> {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where cast(generation_time as date) = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SDf20 objectReader(ResultSet resultSet) throws SQLException {
|
||||
SDf20 object = new SDf20();
|
||||
|
|
|
|||
|
|
@ -2,14 +2,16 @@ package ru.spcex.clearing.imdg.object;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf21;
|
||||
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;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class SDf21MapStore extends TemplateMapStore<SDf21> {
|
||||
|
|
@ -35,6 +37,21 @@ public class SDf21MapStore extends TemplateMapStore<SDf21> {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where cast(generation_time as date) = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SDf21 objectReader(ResultSet resultSet) throws SQLException {
|
||||
SDf21 object = new SDf21();
|
||||
|
|
|
|||
|
|
@ -2,13 +2,16 @@ package ru.spcex.clearing.imdg.object;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf51;
|
||||
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;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class SDf51MapStore extends TemplateMapStore<SDf51> {
|
||||
|
|
@ -34,6 +37,21 @@ public class SDf51MapStore extends TemplateMapStore<SDf51> {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where cast(generation_time as date) = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SDf51 objectReader(ResultSet resultSet) throws SQLException {
|
||||
SDf51 object = new SDf51();
|
||||
|
|
|
|||
|
|
@ -2,13 +2,16 @@ package ru.spcex.clearing.imdg.object;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf52;
|
||||
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;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class SDf52MapStore extends TemplateMapStore<SDf52> {
|
||||
|
|
@ -34,6 +37,21 @@ public class SDf52MapStore extends TemplateMapStore<SDf52> {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where cast(generation_time as date) = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SDf52 objectReader(ResultSet resultSet) throws SQLException {
|
||||
SDf52 object = new SDf52();
|
||||
|
|
|
|||
|
|
@ -2,15 +2,16 @@ package ru.spcex.clearing.imdg.object;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf53;
|
||||
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.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class SDf53MapStore extends TemplateMapStore<SDf53> {
|
||||
|
|
@ -36,6 +37,21 @@ public class SDf53MapStore extends TemplateMapStore<SDf53> {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where cast(generation_time as date) = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SDf53 objectReader(ResultSet resultSet) throws SQLException {
|
||||
SDf53 object = new SDf53();
|
||||
|
|
|
|||
|
|
@ -2,14 +2,16 @@ package ru.spcex.clearing.imdg.object;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf54;
|
||||
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;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class SDf54MapStore extends TemplateMapStore<SDf54> {
|
||||
|
|
@ -35,6 +37,21 @@ public class SDf54MapStore extends TemplateMapStore<SDf54> {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where cast(generation_time as date) = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SDf54 objectReader(ResultSet resultSet) throws SQLException {
|
||||
SDf54 object = new SDf54();
|
||||
|
|
|
|||
|
|
@ -5,10 +5,13 @@ import org.springframework.stereotype.Component;
|
|||
import ru.clearing.classes.statics.data.sdf.SDf55;
|
||||
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;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class SDf55MapStore extends TemplateMapStore<SDf55> {
|
||||
|
|
@ -34,6 +37,21 @@ public class SDf55MapStore extends TemplateMapStore<SDf55> {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where cast(generation_time as date) = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SDf55 objectReader(ResultSet resultSet) throws SQLException {
|
||||
SDf55 object = new SDf55();
|
||||
|
|
|
|||
|
|
@ -5,10 +5,13 @@ import org.springframework.stereotype.Component;
|
|||
import ru.clearing.classes.statics.data.sdf.SDf56;
|
||||
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;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class SDf56MapStore extends TemplateMapStore<SDf56> {
|
||||
|
|
@ -34,6 +37,21 @@ public class SDf56MapStore extends TemplateMapStore<SDf56> {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where cast(generation_time as date) = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SDf56 objectReader(ResultSet resultSet) throws SQLException {
|
||||
SDf56 object = new SDf56();
|
||||
|
|
|
|||
|
|
@ -5,10 +5,13 @@ import org.springframework.stereotype.Component;
|
|||
import ru.clearing.classes.statics.data.sdf.SDf57;
|
||||
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;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class SDf57MapStore extends TemplateMapStore<SDf57> {
|
||||
|
|
@ -34,6 +37,21 @@ public class SDf57MapStore extends TemplateMapStore<SDf57> {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where cast(generation_time as date) = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SDf57 objectReader(ResultSet resultSet) throws SQLException {
|
||||
SDf57 object = new SDf57();
|
||||
|
|
|
|||
|
|
@ -5,11 +5,14 @@ import org.springframework.stereotype.Component;
|
|||
import ru.clearing.classes.statics.data.misc.STrades;
|
||||
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.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class STradesMapStore extends TemplateMapStore<STrades> {
|
||||
|
|
@ -41,6 +44,21 @@ public class STradesMapStore extends TemplateMapStore<STrades> {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loadAllKeys from " + getTableName());
|
||||
List<Long> keys;
|
||||
try {
|
||||
keys = jdbcTemplate.query("select id from " + getTableName() + " where trade_date = ?",
|
||||
new Object[]{LocalDate.now()},
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
throw e;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public STrades objectReader(ResultSet resultSet) throws SQLException {
|
||||
STrades object = new STrades();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue