This commit is contained in:
parent
be58666afc
commit
2cbb8a39ef
2 changed files with 25 additions and 6 deletions
|
|
@ -151,6 +151,7 @@ public class KSCommissionTradesReportBuilder extends CSVReportBuilder<EmptyParam
|
|||
|
||||
String agreementNumberPostfix = registry.getContract();
|
||||
|
||||
String classCode = MarketCode.XMNSKFLO.getKey();
|
||||
pb = executionDepositImdg.predicateBuilder();
|
||||
Collection<ExecutionDeposit> executionDeposits = executionDepositImdg.getCollectionObjectsByPredicate(
|
||||
pb.and(
|
||||
|
|
@ -158,12 +159,11 @@ public class KSCommissionTradesReportBuilder extends CSVReportBuilder<EmptyParam
|
|||
pb.notNull("market")
|
||||
)
|
||||
);
|
||||
if (executionDeposits.isEmpty()) {
|
||||
log.warn("Not found ExecutionDeposit for registry (id = {}), groupId: {}. Registry skipped", registry.getId(), registry.getGroupId());
|
||||
continue;
|
||||
if (!executionDeposits.isEmpty()) {
|
||||
if (executionDeposits.size() > 1) log.warn("ExecutionDeposit[exchangeExecutionId = {}].size > 1, use first", registry.getGroupId());
|
||||
ExecutionDeposit executionDeposit = executionDeposits.iterator().next();
|
||||
classCode = executionDeposit.getMarket();
|
||||
}
|
||||
if (executionDeposits.size() > 1) log.warn("ExecutionDeposit[exchangeExecutionId = {}].size > 1, use first", registry.getGroupId());
|
||||
ExecutionDeposit executionDeposit = executionDeposits.iterator().next();
|
||||
|
||||
String account = null;
|
||||
AccountType accountType = IEnumKey.getEnumByKey(AccountType.class, registry.getAccountType());
|
||||
|
|
@ -217,7 +217,7 @@ public class KSCommissionTradesReportBuilder extends CSVReportBuilder<EmptyParam
|
|||
if (secCode != null && secCode.contains("/"))
|
||||
secCode = secCode.substring(0, secCode.indexOf("/"));
|
||||
ksCommissionTradesReport.setSecCode(secCode);
|
||||
ksCommissionTradesReport.setClassCode(executionDeposit.getMarket());
|
||||
ksCommissionTradesReport.setClassCode(classCode);
|
||||
ksCommissionTradesReport.setAgreementNumber(agreementNumber);
|
||||
ksCommissionTradesReport.setAgreementNumberPostfix(agreementNumberPostfix);
|
||||
ksCommissionTradesReport.setAgreementDate(registry.getTradingDate());
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
package ru.spcex.platform.enumeration;
|
||||
|
||||
import ru.spcex.platform.utils.enumeration.IEnumKey;
|
||||
|
||||
public enum MarketCode implements IEnumKey {
|
||||
XMNSKFLO("XMNSKFLO"),
|
||||
;
|
||||
|
||||
private final String key;
|
||||
|
||||
MarketCode(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue