This commit is contained in:
parent
e557b948fe
commit
4256c05345
8 changed files with 17 additions and 11 deletions
|
|
@ -793,7 +793,7 @@ public class ClearingAccountService extends QueueConsumer implements Initializin
|
||||||
}
|
}
|
||||||
if (returnTrigger) {
|
if (returnTrigger) {
|
||||||
log.debug("Remove from waiting list accountId={} (list groupId={})", accountId, inWaitingLst.getGroupId());
|
log.debug("Remove from waiting list accountId={} (list groupId={})", accountId, inWaitingLst.getGroupId());
|
||||||
waitingList.remove(inWaitingLst);
|
waitingList.remove(accountId);
|
||||||
}
|
}
|
||||||
if (returnTrigger)
|
if (returnTrigger)
|
||||||
return inWaitingLst;
|
return inWaitingLst;
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@ public class ClientCodeMessageListener extends QueueConsumer implements Initiali
|
||||||
clientCodeNewRequest.setCompanyId(company.getId());
|
clientCodeNewRequest.setCompanyId(company.getId());
|
||||||
clientCodeNewRequest.setCode(tkrAccount.getClientCode());
|
clientCodeNewRequest.setCode(tkrAccount.getClientCode());
|
||||||
clientCodeNewRequest.setDepoAccountId(depoAccountId);
|
clientCodeNewRequest.setDepoAccountId(depoAccountId);
|
||||||
Account moneyAccount = accountByCurrency.get(CurrencyCode.RUB);
|
Account moneyAccount = accountByCurrency.get(CurrencyCode.RUB.getKey());
|
||||||
clientCodeNewRequest.setMoneyAccountId(moneyAccount.getId());
|
clientCodeNewRequest.setMoneyAccountId(moneyAccount.getId());
|
||||||
|
|
||||||
List<Long> foreignCurrencyList = accountByCurrency.entrySet()
|
List<Long> foreignCurrencyList = accountByCurrency.entrySet()
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import java.nio.file.Files;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
public class MetaConfiguration {
|
public class MetaConfiguration {
|
||||||
@Value("file:${spring.config.location}/meta.json")
|
@Value("file:${spring.config.location}/meta/meta.json")
|
||||||
private Resource meta;
|
private Resource meta;
|
||||||
|
|
||||||
@Bean("metaJson")
|
@Bean("metaJson")
|
||||||
|
|
|
||||||
|
|
@ -188,9 +188,14 @@ public class PaymentInstructionOutboundService {
|
||||||
sDf54.setId(idGenerator.nextId());
|
sDf54.setId(idGenerator.nextId());
|
||||||
sDf54.setGenerationId(pmt.getId());
|
sDf54.setGenerationId(pmt.getId());
|
||||||
if (time.isTradingTime()) {
|
if (time.isTradingTime()) {
|
||||||
Supplier<AssetOperationRequest> builder = () -> GatewayRequestCreator.from(pmt,
|
Supplier<AssetOperationRequest> builder = () -> {
|
||||||
assets.get().a__b().getTradingCode(),
|
if (tcr != null) {
|
||||||
tcr.getCode());
|
return GatewayRequestCreator.from(pmt,
|
||||||
|
assets.get().a__b().getTradingCode(),
|
||||||
|
tcr.getCode());
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
};
|
||||||
Optional<Boolean> gatewayOk = gateway.gatewayRequestAndWait(builder);
|
Optional<Boolean> gatewayOk = gateway.gatewayRequestAndWait(builder);
|
||||||
if (gatewayOk.isEmpty() || gatewayOk.get().equals(Boolean.FALSE)) {
|
if (gatewayOk.isEmpty() || gatewayOk.get().equals(Boolean.FALSE)) {
|
||||||
String gtwErrMsg = msgs.resolve(mapError(gatewayOk));
|
String gtwErrMsg = msgs.resolve(mapError(gatewayOk));
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ public class DbfImportKafkaMessenger implements InitializingBean {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void notifyUserAboutErrorParsing(Throwable error, ResultContainer resultContainer) {
|
public void notifyUserAboutErrorParsing(Throwable error, ResultContainer resultContainer) {
|
||||||
if (resultContainer == null || resultContainer.getDbfFile() == null || resultContainer.getDbfFile() == null)
|
if (resultContainer == null || resultContainer.getDbfFile() == null || resultContainer.getDbfTable() == null)
|
||||||
return;
|
return;
|
||||||
ETable currTable = resultContainer.getDbfTable();
|
ETable currTable = resultContainer.getDbfTable();
|
||||||
String fileName = resultContainer.getDbfFile().getName();
|
String fileName = resultContainer.getDbfFile().getName();
|
||||||
|
|
|
||||||
|
|
@ -213,8 +213,7 @@ public class TradeImporterService {
|
||||||
private boolean isValidTrades(STrades trades) {
|
private boolean isValidTrades(STrades trades) {
|
||||||
return trades.getTradeDate() != null
|
return trades.getTradeDate() != null
|
||||||
&& trades.getTradeNum() != null
|
&& trades.getTradeNum() != null
|
||||||
&& StringUtils.hasText(trades.getOperation())
|
&& StringUtils.hasText(trades.getOperation());
|
||||||
&& trades.getTradeNum() != null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public STrades readSTrades(ResultSet resultSet) throws SQLException {
|
public STrades readSTrades(ResultSet resultSet) throws SQLException {
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package ru.spcex.clearing.platform.messaging.service;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.JavaType;
|
import com.fasterxml.jackson.databind.JavaType;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import java.util.concurrent.ExecutionException;
|
||||||
import org.apache.kafka.clients.consumer.Consumer;
|
import org.apache.kafka.clients.consumer.Consumer;
|
||||||
import org.apache.kafka.clients.consumer.ConsumerRecord;
|
import org.apache.kafka.clients.consumer.ConsumerRecord;
|
||||||
import org.apache.kafka.clients.consumer.ConsumerRecords;
|
import org.apache.kafka.clients.consumer.ConsumerRecords;
|
||||||
|
|
@ -196,7 +197,7 @@ public class QueueConsumer implements AutoCloseable {
|
||||||
}
|
}
|
||||||
send = producer.send(respRec);
|
send = producer.send(respRec);
|
||||||
send.get();
|
send.get();
|
||||||
} catch (Exception e) {
|
} catch (InterruptedException | ExecutionException e) {
|
||||||
log.error(ExceptionUtils.getStackTrace(e));
|
log.error(ExceptionUtils.getStackTrace(e));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
import java.util.concurrent.Future;
|
import java.util.concurrent.Future;
|
||||||
|
|
@ -215,7 +216,7 @@ public class QueueConsumerV2 implements AutoCloseable {
|
||||||
}
|
}
|
||||||
send = producer.send(respRec);
|
send = producer.send(respRec);
|
||||||
send.get();
|
send.get();
|
||||||
} catch (Exception e) {
|
} catch (InterruptedException | ExecutionException e) {
|
||||||
log.error(ExceptionUtils.getStackTrace(e));
|
log.error(ExceptionUtils.getStackTrace(e));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue