This commit is contained in:
parent
50962c34b5
commit
bc5377a752
1 changed files with 3 additions and 5 deletions
|
|
@ -52,14 +52,12 @@ public class RegistryMapStore extends TemplateMapStore<Registry> {
|
||||||
LocalDate today = LocalDate.now();
|
LocalDate today = LocalDate.now();
|
||||||
log.debug("loadAllKeys from {} with condition and today {}", getTableName(), today);
|
log.debug("loadAllKeys from {} with condition and today {}", getTableName(), today);
|
||||||
List<Long> keys;
|
List<Long> keys;
|
||||||
String sql = "select id from " + getTableName() + " WHERE registry_designation='A' OR " +
|
String sql = "select id from " + getTableName() + " WHERE registry_status<>'OK' or registry_status='OK' " +
|
||||||
"(registry_designation='D' AND (clearing_date = ? OR registry_status='PROC' OR registry_status='MNG')) OR" +
|
"and (clearing_date = ? OR updated_at::date = ?)";
|
||||||
"((registry_designation='C' OR registry_designation='L') AND clearing_date=?) OR" +
|
|
||||||
"((registry_designation='O' OR registry_designation='T') AND (clearing_date=? OR registry_status='PROC' OR registry_status='MNG'))";
|
|
||||||
try {
|
try {
|
||||||
keys = jdbcTemplate.query(sql,
|
keys = jdbcTemplate.query(sql,
|
||||||
(resultSet, i) -> resultSet.getLong("id"),
|
(resultSet, i) -> resultSet.getLong("id"),
|
||||||
new Object[]{today, today, today});
|
new Object[]{today, today});
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
log.error("At load keys from {} (sql \"{}\"): {}", getTableName(), sql, ExceptionUtils.getStackTrace(e));
|
log.error("At load keys from {} (sql \"{}\"): {}", getTableName(), sql, ExceptionUtils.getStackTrace(e));
|
||||||
throw e;
|
throw e;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue