SDF57 gateway request only when A**T.TradingClearingRegistry not empty
This commit is contained in:
parent
93080c76c9
commit
5aca4dc82f
1 changed files with 10 additions and 5 deletions
|
|
@ -355,11 +355,16 @@ public class Sdf57Executor extends AbstractExecutor<SDf57> {
|
|||
statementImdg.update(stmt);
|
||||
log.debug("stmt.id={} status -> {}", stmt.getId(), OperationStatus.Executed.getKey());
|
||||
if (!dm_tWasCreated && timeService.isTradingTime() && InOutDirection.in.equalsByKey(stmt.getInOutDirection())) {
|
||||
log.trace("sending gateway request for stmt.id={}", stmt.getId());
|
||||
kafka.sendRequestToQueue(Consts.ASSET_OPERATION,
|
||||
gatewayRequest(stmt,
|
||||
company.getTradingCode(),
|
||||
asts.a__t().getTradingClearingRegistry()));
|
||||
if (TextUtil.isEmpty(asts.a__t().getTradingClearingRegistry())) {
|
||||
log.trace("stmt.id={} {}.id={} TCR is empty, skipping gateway request",
|
||||
stmt.getId(), asts.a__t().getRegistryCode(), asts.a__t().getId());
|
||||
} else {
|
||||
log.trace("sending gateway request for stmt.id={}", stmt.getId());
|
||||
kafka.sendRequestToQueue(Consts.ASSET_OPERATION,
|
||||
gatewayRequest(stmt,
|
||||
company.getTradingCode(),
|
||||
asts.a__t().getTradingClearingRegistry()));
|
||||
}
|
||||
}
|
||||
return Optional.of(asts);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue