stmtService log + swt-importer sdf21 message
This commit is contained in:
parent
8c80c30958
commit
add4335677
2 changed files with 3 additions and 2 deletions
|
|
@ -66,7 +66,7 @@ public class StatementServiceV2 {
|
||||||
private static StatementRequest find(SdfTable table, Collection<StatementRequest> reqs) {
|
private static StatementRequest find(SdfTable table, Collection<StatementRequest> reqs) {
|
||||||
Optional<StatementRequest> first = reqs.stream().filter(r -> r.getTable().equals(table)).findFirst();
|
Optional<StatementRequest> first = reqs.stream().filter(r -> r.getTable().equals(table)).findFirst();
|
||||||
if (first.isEmpty()) {
|
if (first.isEmpty()) {
|
||||||
throw new IllegalStateException("couldn't find + " + table + " - this should have happened ");
|
throw new IllegalStateException("couldn't find + " + table + " - this shouldn't have happened ");
|
||||||
}
|
}
|
||||||
return first.get();
|
return first.get();
|
||||||
}
|
}
|
||||||
|
|
@ -134,7 +134,7 @@ public class StatementServiceV2 {
|
||||||
for (StatementRequest stmtReqOld : statementRequests) { //проходим с головы (с самых старых)
|
for (StatementRequest stmtReqOld : statementRequests) { //проходим с головы (с самых старых)
|
||||||
boolean matchGroup = group.getGroup().contains(stmtReqOld.getTable());
|
boolean matchGroup = group.getGroup().contains(stmtReqOld.getTable());
|
||||||
boolean notIncludedThisTableAlready = reqs.stream().map(StatementRequest::getTable).noneMatch(t -> t.equals(stmtReqOld.getTable()));
|
boolean notIncludedThisTableAlready = reqs.stream().map(StatementRequest::getTable).noneMatch(t -> t.equals(stmtReqOld.getTable()));
|
||||||
boolean isNotTheSameAsNewReq = Objects.equals(stmtReqOld.getTable(), stmtReq.getTable());
|
boolean isNotTheSameAsNewReq = !Objects.equals(stmtReqOld.getTable(), stmtReq.getTable());
|
||||||
if (matchGroup && notIncludedThisTableAlready && isNotTheSameAsNewReq) {
|
if (matchGroup && notIncludedThisTableAlready && isNotTheSameAsNewReq) {
|
||||||
reqs.add(stmtReqOld);
|
reqs.add(stmtReqOld);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ public class SWTImportKafkaMessenger implements InitializingBean {
|
||||||
messengers.put(ETable.S_DF_08, groupId -> messageBalance(groupId, SdfTable.SDF_08));
|
messengers.put(ETable.S_DF_08, groupId -> messageBalance(groupId, SdfTable.SDF_08));
|
||||||
messengers.put(ETable.S_DF_10, groupId -> messageBalance(groupId, SdfTable.SDF_10));
|
messengers.put(ETable.S_DF_10, groupId -> messageBalance(groupId, SdfTable.SDF_10));
|
||||||
messengers.put(ETable.S_DF_13, groupId -> messageBalance(groupId, SdfTable.SDF_13));
|
messengers.put(ETable.S_DF_13, groupId -> messageBalance(groupId, SdfTable.SDF_13));
|
||||||
|
messengers.put(ETable.S_DF_21, groupId -> messageBalance(groupId, SdfTable.SDF_21));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue