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