This commit is contained in:
akulikov 2024-08-06 19:11:48 +03:00
parent 44c547d07c
commit a99104d8dd
9 changed files with 247 additions and 219 deletions

View file

@ -21,6 +21,7 @@ import ru.spcex.clearing.reports.builders.SessionIdParam;
import ru.spcex.clearing.reports.builders.bean.KSRepCashNettoReport; import ru.spcex.clearing.reports.builders.bean.KSRepCashNettoReport;
import ru.spcex.platform.enumeration.AccountType; import ru.spcex.platform.enumeration.AccountType;
import ru.spcex.platform.enumeration.RegistryDesignation; import ru.spcex.platform.enumeration.RegistryDesignation;
import ru.spcex.platform.enumeration.RegistryStatus;
import ru.spcex.platform.enumeration.RegistryTradingParams; import ru.spcex.platform.enumeration.RegistryTradingParams;
import ru.spcex.platform.enumeration.ReportBuilderType; import ru.spcex.platform.enumeration.ReportBuilderType;
import ru.spcex.platform.enumeration.ReportKeys; import ru.spcex.platform.enumeration.ReportKeys;
@ -77,13 +78,14 @@ public class KSRepCashNettoReportBuilder extends CSVReportBuilder<SessionIdParam
LocalDate nowDate = LocalDate.now(); LocalDate nowDate = LocalDate.now();
ImdgPredicateBuilder pb = registryImdg.predicateBuilder(); ImdgPredicateBuilder pb = registryImdg.predicateBuilder();
ImdgPredicate registryPredicate = RegistryCodeSqlBuilder.getInstance(RegistryTradingParams.CM_T, RegistryTradingParams.LM_T).buildPredicate(pb); ImdgPredicate registryPredicate = RegistryCodeSqlBuilder.getInstance(RegistryTradingParams.OM_T, RegistryTradingParams.TM_T).buildPredicate(pb);
List<Long> sessionIds = params.getSessionId(); List<Long> sessionIds = params.getSessionId();
if (sessionIds == null || sessionIds.isEmpty()) sessionIds = getSessionIdsForCurrentDate(sessionImdg); if (sessionIds == null || sessionIds.isEmpty()) sessionIds = getSessionIdsForCurrentDate(sessionImdg);
ImdgPredicate finalPredicate = pb.and( ImdgPredicate finalPredicate = pb.and(
pb.in("sessionId", sessionIds.toArray(new Long[0])), pb.in("sessionId", sessionIds.toArray(new Long[0])),
pb.equals("clearingDate", nowDate), pb.equals("clearingDate", nowDate),
registryPredicate, registryPredicate,
pb.in("registryStatus", RegistryStatus.OK.getKey(), RegistryStatus.CLRD.getKey()),
pb.or( pb.or(
pb.equals("accountType", AccountType.Clrn.getKey()), pb.equals("accountType", AccountType.Clrn.getKey()),
pb.equals("accountType", AccountType.Info.getKey()) pb.equals("accountType", AccountType.Info.getKey())
@ -100,7 +102,7 @@ public class KSRepCashNettoReportBuilder extends CSVReportBuilder<SessionIdParam
List<Registry> groupedRegistry = entry.getValue(); List<Registry> groupedRegistry = entry.getValue();
try { try {
if (groupedRegistry.isEmpty()) { if (groupedRegistry.isEmpty()) {
log.warn("Empty LM_T and CM_T registries for account = {} and session_id = {}. Registries with id = [{}] was skipped", log.warn("Empty TM_T and OM_T registries for account = {} and session_id = {}. Registries with id = [{}] was skipped",
pairRegistryId.getAccount(), pairRegistryId.getAccount(),
pairRegistryId.getSessionId(), pairRegistryId.getSessionId(),
groupedRegistry.stream().map(r -> String.valueOf(r.getId())).collect(Collectors.joining(", ")) groupedRegistry.stream().map(r -> String.valueOf(r.getId())).collect(Collectors.joining(", "))
@ -108,52 +110,52 @@ public class KSRepCashNettoReportBuilder extends CSVReportBuilder<SessionIdParam
continue; continue;
} }
List<Registry> cmtRegistries = new ArrayList<>(); List<Registry> omtRegistries = new ArrayList<>();
List<Registry> lmtRegistries = new ArrayList<>(); List<Registry> tmtRegistries = new ArrayList<>();
Registry registry = null; Registry registry = null;
for (Registry currRegistry : groupedRegistry) { for (Registry currRegistry : groupedRegistry) {
registry = currRegistry; registry = currRegistry;
if (RegistryDesignation.L.equalsByKey(currRegistry.getRegistryDesignation())) if (RegistryDesignation.T.equalsByKey(currRegistry.getRegistryDesignation()))
lmtRegistries.add(currRegistry); tmtRegistries.add(currRegistry);
if (RegistryDesignation.C.equalsByKey(currRegistry.getRegistryDesignation())) if (RegistryDesignation.O.equalsByKey(currRegistry.getRegistryDesignation()))
cmtRegistries.add(currRegistry); omtRegistries.add(currRegistry);
} }
boolean invalid = false; boolean invalid = false;
if (!cmtRegistries.isEmpty() || !lmtRegistries.isEmpty()) { if (!omtRegistries.isEmpty() || !tmtRegistries.isEmpty()) {
String sourceTradingCode = null; String sourceTradingCode = null;
String sourceTkr = null; String sourceTkr = null;
if (!cmtRegistries.isEmpty()) { if (!omtRegistries.isEmpty()) {
Registry next = cmtRegistries.iterator().next(); Registry next = omtRegistries.iterator().next();
sourceTradingCode = next.getTradingCode(); sourceTradingCode = next.getTradingCode();
sourceTkr = next.getTradingClearingRegistry(); sourceTkr = next.getTradingClearingRegistry();
} }
if (!lmtRegistries.isEmpty()) { if (!tmtRegistries.isEmpty()) {
Registry next = lmtRegistries.iterator().next(); Registry next = tmtRegistries.iterator().next();
sourceTradingCode = next.getTradingCode(); sourceTradingCode = next.getTradingCode();
sourceTkr = next.getTradingClearingRegistry(); sourceTkr = next.getTradingClearingRegistry();
} }
for (Registry currRegistry : cmtRegistries) { for (Registry currRegistry : omtRegistries) {
if (!Objects.equals(sourceTradingCode, currRegistry.getTradingCode())) { if (!Objects.equals(sourceTradingCode, currRegistry.getTradingCode())) {
invalid = true; invalid = true;
log.warn("Invalid CM_T registries set, tradingCode not equals. Registries was skipped"); log.warn("Invalid OM_T registries set, tradingCode not equals. Registries was skipped");
break; break;
} }
if (!Objects.equals(sourceTkr, currRegistry.getTradingClearingRegistry())) { if (!Objects.equals(sourceTkr, currRegistry.getTradingClearingRegistry())) {
invalid = true; invalid = true;
log.warn("Invalid CM_T registries set, tradingClearingRegistry not equals. Registries was skipped"); log.warn("Invalid OM_T registries set, tradingClearingRegistry not equals. Registries was skipped");
break; break;
} }
} }
for (Registry currRegistry : lmtRegistries) { for (Registry currRegistry : tmtRegistries) {
if (!Objects.equals(sourceTradingCode, currRegistry.getTradingCode())) { if (!Objects.equals(sourceTradingCode, currRegistry.getTradingCode())) {
invalid = true; invalid = true;
log.warn("Invalid LM_T registries set, tradingCode not equals. Registries was skipped"); log.warn("Invalid TM_T registries set, tradingCode not equals. Registries was skipped");
break; break;
} }
if (!Objects.equals(sourceTkr, currRegistry.getTradingClearingRegistry())) { if (!Objects.equals(sourceTkr, currRegistry.getTradingClearingRegistry())) {
invalid = true; invalid = true;
log.warn("Invalid CM_T registries set, tradingClearingRegistry not equals. Registries was skipped"); log.warn("Invalid OM_T registries set, tradingClearingRegistry not equals. Registries was skipped");
break; break;
} }
} }
@ -187,10 +189,10 @@ public class KSRepCashNettoReportBuilder extends CSVReportBuilder<SessionIdParam
ksRepCashNettoReport.setTkr(registry.getTradingClearingRegistry()); ksRepCashNettoReport.setTkr(registry.getTradingClearingRegistry());
ksRepCashNettoReport.setDate(nowDate); ksRepCashNettoReport.setDate(nowDate);
BigDecimal cmtCurrencyNetto = BigDecimal.ZERO; BigDecimal omtCurrencyNetto = BigDecimal.ZERO;
BigDecimal lmtCurrencyNetto = BigDecimal.ZERO; BigDecimal tmtCurrencyNetto = BigDecimal.ZERO;
BigDecimal cmtBalance = BigDecimal.ZERO; BigDecimal omtBalance = BigDecimal.ZERO;
BigDecimal lmtBalance = BigDecimal.ZERO; BigDecimal tmtBalance = BigDecimal.ZERO;
BigDecimal oblValue = BigDecimal.ZERO; BigDecimal oblValue = BigDecimal.ZERO;
BigDecimal reqValue = BigDecimal.ZERO; BigDecimal reqValue = BigDecimal.ZERO;
boolean withValue = false; boolean withValue = false;
@ -208,44 +210,44 @@ public class KSRepCashNettoReportBuilder extends CSVReportBuilder<SessionIdParam
SessionType.MEDM, SessionType.MEDM,
SessionType.XDEP SessionType.XDEP
); );
for (Registry cmtRegistry : cmtRegistries) { for (Registry omtRegistry : omtRegistries) {
if (cmtRegistry.getBalance() != null) { if (omtRegistry.getBalance() != null) {
SessionType sessionType = IEnumKey.getEnumByKey(SessionType.class, cmtRegistry.getSessionType()); SessionType sessionType = IEnumKey.getEnumByKey(SessionType.class, omtRegistry.getSessionType());
Section section = IEnumKey.getEnumByKey(Section.class, cmtRegistry.getSection()); Section section = IEnumKey.getEnumByKey(Section.class, omtRegistry.getSection());
if (section == Section.FOND || sessionTypeForValue.contains(sessionType)) { if (section == Section.FOND || sessionTypeForValue.contains(sessionType)) {
cmtBalance = cmtBalance.add(cmtRegistry.getBalance()); omtBalance = omtBalance.add(omtRegistry.getBalance());
withValue = true; withValue = true;
} }
if (section == Section.MKR || sessionTypeForOblReqValue.contains(sessionType)) { if (section == Section.MKR || sessionTypeForOblReqValue.contains(sessionType)) {
reqValue = reqValue.add(cmtRegistry.getBalance()); reqValue = reqValue.add(omtRegistry.getBalance());
withOblReqValue = true; withOblReqValue = true;
} }
if (section == Section.CURR || sessionType == SessionType.CURR) { if (section == Section.CURR || sessionType == SessionType.CURR) {
cmtCurrencyNetto = cmtCurrencyNetto.add(cmtRegistry.getBalance()); omtCurrencyNetto = omtCurrencyNetto.add(omtRegistry.getBalance());
withCurrencyNetto = true; withCurrencyNetto = true;
} }
} }
} }
for (Registry lmtRegistry : lmtRegistries) { for (Registry tmtRegistry : tmtRegistries) {
if (lmtRegistry.getBalance() != null) { if (tmtRegistry.getBalance() != null) {
SessionType sessionType = IEnumKey.getEnumByKey(SessionType.class, lmtRegistry.getSessionType()); SessionType sessionType = IEnumKey.getEnumByKey(SessionType.class, tmtRegistry.getSessionType());
Section section = IEnumKey.getEnumByKey(Section.class, lmtRegistry.getSection()); Section section = IEnumKey.getEnumByKey(Section.class, tmtRegistry.getSection());
if (section == Section.FOND || sessionTypeForValue.contains(sessionType)) { if (section == Section.FOND || sessionTypeForValue.contains(sessionType)) {
lmtBalance = lmtBalance.add(lmtRegistry.getBalance()); tmtBalance = tmtBalance.add(tmtRegistry.getBalance());
withValue = true; withValue = true;
} }
if (section == Section.MKR || sessionTypeForOblReqValue.contains(sessionType)) { if (section == Section.MKR || sessionTypeForOblReqValue.contains(sessionType)) {
oblValue = oblValue.add(lmtRegistry.getBalance()); oblValue = oblValue.add(tmtRegistry.getBalance());
withOblReqValue = true; withOblReqValue = true;
} }
if (section == Section.CURR || sessionType == SessionType.CURR) { if (section == Section.CURR || sessionType == SessionType.CURR) {
lmtCurrencyNetto = lmtCurrencyNetto.add(lmtRegistry.getBalance()); tmtCurrencyNetto = tmtCurrencyNetto.add(tmtRegistry.getBalance());
withCurrencyNetto = true; withCurrencyNetto = true;
} }
} }
} }
BigDecimal value; BigDecimal value;
value = cmtBalance.subtract(lmtBalance); value = omtBalance.subtract(tmtBalance);
ksRepCashNettoReport.setLotCurrency(registry.getSecuritySymbol()); ksRepCashNettoReport.setLotCurrency(registry.getSecuritySymbol());
if (withValue) { if (withValue) {
KSRepCashNettoReport withoutValueClone = ksRepCashNettoReport.cloneWithoutValues(); KSRepCashNettoReport withoutValueClone = ksRepCashNettoReport.cloneWithoutValues();
@ -260,7 +262,7 @@ public class KSRepCashNettoReportBuilder extends CSVReportBuilder<SessionIdParam
} }
if (withCurrencyNetto) { if (withCurrencyNetto) {
KSRepCashNettoReport withoutValueClone = ksRepCashNettoReport.cloneWithoutValues(); KSRepCashNettoReport withoutValueClone = ksRepCashNettoReport.cloneWithoutValues();
withoutValueClone.setCurrencyNetto(cmtCurrencyNetto.subtract(lmtCurrencyNetto)); withoutValueClone.setCurrencyNetto(omtCurrencyNetto.subtract(tmtCurrencyNetto));
withoutValueClone.setTrExecDate(LocalDate.now()); withoutValueClone.setTrExecDate(LocalDate.now());
rows.add(withoutValueClone); rows.add(withoutValueClone);
} }

View file

@ -149,32 +149,32 @@ public class KSRepCashRegistersReportBuilder extends CSVReportBuilder<EmptyParam
sessionImdg.predicateBuilder().equals("clearingDate", LocalDate.now()) sessionImdg.predicateBuilder().equals("clearingDate", LocalDate.now())
); );
Long[] sessionIds = sessionsForDay.stream().map(Session::getId).toArray(Long[]::new); Long[] sessionIds = sessionsForDay.stream().map(Session::getId).toArray(Long[]::new);
ImdgPredicate cmtPredicate = RegistryCodeSqlBuilder.getInstance(RegistryTradingParams.CM_T).buildPredicate(pb); ImdgPredicate omtPredicate = RegistryCodeSqlBuilder.getInstance(RegistryTradingParams.OM_T).buildPredicate(pb);
Collection<Registry> cmtRegistries = registryImdg.getCollectionObjectsByPredicate( Collection<Registry> omtRegistries = registryImdg.getCollectionObjectsByPredicate(
pb.and( pb.and(
cmtPredicate, omtPredicate,
pb.in("sessionId", sessionIds), pb.in("sessionId", sessionIds),
pb.equals("tradingCode", registry.getTradingCode()), pb.equals("tradingCode", registry.getTradingCode()),
pb.equals("companyId", registry.getCompanyId()), pb.equals("companyId", registry.getCompanyId()),
pb.equals("account", registry.getAccount()), pb.equals("account", registry.getAccount()),
pb.equals("registryStatus", RegistryStatus.CLRD.getKey()) pb.in("registryStatus", RegistryStatus.OK.getKey(), RegistryStatus.CLRD.getKey())
) )
); );
ImdgPredicate lmtPredicate = RegistryCodeSqlBuilder.getInstance(RegistryTradingParams.LM_T).buildPredicate(pb); ImdgPredicate tmtPredicate = RegistryCodeSqlBuilder.getInstance(RegistryTradingParams.TM_T).buildPredicate(pb);
Collection<Registry> lmtRegistries = registryImdg.getCollectionObjectsByPredicate( Collection<Registry> tmtRegistries = registryImdg.getCollectionObjectsByPredicate(
pb.and( pb.and(
lmtPredicate, tmtPredicate,
pb.in("sessionId", sessionIds), pb.in("sessionId", sessionIds),
pb.equals("tradingCode", registry.getTradingCode()), pb.equals("tradingCode", registry.getTradingCode()),
pb.equals("companyId", registry.getCompanyId()), pb.equals("companyId", registry.getCompanyId()),
pb.equals("account", registry.getAccount()), pb.equals("account", registry.getAccount()),
pb.equals("registryStatus", RegistryStatus.CLRD.getKey()) pb.in("registryStatus", RegistryStatus.OK.getKey(), RegistryStatus.CLRD.getKey())
) )
); );
Set<String> contracts = new HashSet<>(); Set<String> contracts = new HashSet<>();
BigDecimal cmtBalanceSum = BigDecimal.ZERO; BigDecimal omtBalanceSum = BigDecimal.ZERO;
for (Registry cmtRegistry : cmtRegistries) { for (Registry omtRegistry : omtRegistries) {
Long counterPartyId = cmtRegistry.getCounterPartyId(); Long counterPartyId = omtRegistry.getCounterPartyId();
if (counterPartyId != null) { if (counterPartyId != null) {
Collection<ClearingMemberCategory> clearingMemberCategory = clearingMemberCategoryImdg.getCollectionObjectsByPredicate( Collection<ClearingMemberCategory> clearingMemberCategory = clearingMemberCategoryImdg.getCollectionObjectsByPredicate(
clearingMemberCategoryImdg.predicateBuilder().equals("companyId", counterPartyId) clearingMemberCategoryImdg.predicateBuilder().equals("companyId", counterPartyId)
@ -182,15 +182,15 @@ public class KSRepCashRegistersReportBuilder extends CSVReportBuilder<EmptyParam
if (!clearingMemberCategory.isEmpty()) { if (!clearingMemberCategory.isEmpty()) {
ClearingMemberCategory next = clearingMemberCategory.iterator().next(); ClearingMemberCategory next = clearingMemberCategory.iterator().next();
ClearingCategory category = IEnumKey.getEnumByKey(ClearingCategory.class, next.getClearingMemberCategory()); ClearingCategory category = IEnumKey.getEnumByKey(ClearingCategory.class, next.getClearingMemberCategory());
SessionType sessionType = IEnumKey.getEnumByKey(SessionType.class, cmtRegistry.getSessionType()); SessionType sessionType = IEnumKey.getEnumByKey(SessionType.class, omtRegistry.getSessionType());
if (category == ClearingCategory.I && sessionType == SessionType.XDEP) { if (category == ClearingCategory.I && sessionType == SessionType.XDEP) {
continue; continue;
} }
} }
} }
BigDecimal balance = cmtRegistry.getBalance(); BigDecimal balance = omtRegistry.getBalance();
cmtBalanceSum = cmtBalanceSum.add(balance); omtBalanceSum = omtBalanceSum.add(balance);
contracts.add(cmtRegistry.getContract()); contracts.add(omtRegistry.getContract());
} }
ImdgPredicate dmxPredicate = RegistryCodeSqlBuilder.getInstance(RegistryTradingParams.DM_X).buildPredicate(pb); ImdgPredicate dmxPredicate = RegistryCodeSqlBuilder.getInstance(RegistryTradingParams.DM_X).buildPredicate(pb);
Collection<Registry> dmxRegistries = registryImdg.getCollectionObjectsByPredicate( Collection<Registry> dmxRegistries = registryImdg.getCollectionObjectsByPredicate(
@ -204,7 +204,7 @@ public class KSRepCashRegistersReportBuilder extends CSVReportBuilder<EmptyParam
) )
); );
BigDecimal dmxBalanceSum = dmxRegistries.stream().map(Registry::getBalance).reduce(BigDecimal.ZERO, BigDecimal::add); BigDecimal dmxBalanceSum = dmxRegistries.stream().map(Registry::getBalance).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal lmtBalanceSum = lmtRegistries.stream() BigDecimal tmtBalanceSum = tmtRegistries.stream()
.filter(reg -> { .filter(reg -> {
Long counterPartyId = reg.getCounterPartyId(); Long counterPartyId = reg.getCounterPartyId();
if (counterPartyId != null) { if (counterPartyId != null) {
@ -222,7 +222,7 @@ public class KSRepCashRegistersReportBuilder extends CSVReportBuilder<EmptyParam
}) })
.map(Registry::getBalance) .map(Registry::getBalance)
.reduce(BigDecimal.ZERO, BigDecimal::add); .reduce(BigDecimal.ZERO, BigDecimal::add);
ksRepCashRegistersReport.setChangeBalance(cmtBalanceSum.subtract(lmtBalanceSum).subtract(dmxBalanceSum)); ksRepCashRegistersReport.setChangeBalance(omtBalanceSum.subtract(tmtBalanceSum).subtract(dmxBalanceSum));
registryPredicate = RegistryCodeSqlBuilder.getInstance(RegistryTradingParams.DM_I).buildPredicate(pb); registryPredicate = RegistryCodeSqlBuilder.getInstance(RegistryTradingParams.DM_I).buildPredicate(pb);

View file

@ -21,6 +21,7 @@ import ru.spcex.clearing.reports.builders.SessionIdParam;
import ru.spcex.clearing.reports.builders.bean.KSRepDepoNettoReport; import ru.spcex.clearing.reports.builders.bean.KSRepDepoNettoReport;
import ru.spcex.platform.enumeration.AccountType; import ru.spcex.platform.enumeration.AccountType;
import ru.spcex.platform.enumeration.RegistryDesignation; import ru.spcex.platform.enumeration.RegistryDesignation;
import ru.spcex.platform.enumeration.RegistryStatus;
import ru.spcex.platform.enumeration.RegistryTradingParams; import ru.spcex.platform.enumeration.RegistryTradingParams;
import ru.spcex.platform.enumeration.ReportBuilderType; import ru.spcex.platform.enumeration.ReportBuilderType;
import ru.spcex.platform.enumeration.ReportKeys; import ru.spcex.platform.enumeration.ReportKeys;
@ -76,11 +77,12 @@ public class KSRepDepoNettoReportBuilder extends CSVReportBuilder<SessionIdParam
ImdgPredicateBuilder pb = registryImdg.predicateBuilder(); ImdgPredicateBuilder pb = registryImdg.predicateBuilder();
List<Long> sessionIds = params.getSessionId(); List<Long> sessionIds = params.getSessionId();
if (sessionIds == null || sessionIds.isEmpty()) sessionIds = getSessionIdsForCurrentDate(sessionImdg); if (sessionIds == null || sessionIds.isEmpty()) sessionIds = getSessionIdsForCurrentDate(sessionImdg);
ImdgPredicate registryPredicate = RegistryCodeSqlBuilder.getInstance(RegistryTradingParams.CS_T, RegistryTradingParams.LS_T).buildPredicate(pb); ImdgPredicate registryPredicate = RegistryCodeSqlBuilder.getInstance(RegistryTradingParams.OS_T, RegistryTradingParams.TS_T).buildPredicate(pb);
ImdgPredicate finalPredicate = pb.and( ImdgPredicate finalPredicate = pb.and(
pb.in("sessionId", sessionIds.toArray(new Long[0])), pb.in("sessionId", sessionIds.toArray(new Long[0])),
pb.equals("clearingDate", nowDate), pb.equals("clearingDate", nowDate),
registryPredicate, registryPredicate,
pb.in("registryStatus", RegistryStatus.OK.getKey(), RegistryStatus.CLRD.getKey()),
pb.equals("accountType", AccountType.Depo.getKey()), pb.equals("accountType", AccountType.Depo.getKey()),
pb.notNull("account") pb.notNull("account")
); );
@ -94,38 +96,38 @@ public class KSRepDepoNettoReportBuilder extends CSVReportBuilder<SessionIdParam
List<Registry> groupedRegistry = entry.getValue(); List<Registry> groupedRegistry = entry.getValue();
try { try {
if (groupedRegistry.isEmpty()) { if (groupedRegistry.isEmpty()) {
log.warn("Empty LS_T and CS_T registries for {}", log.warn("Empty TS_T and OS_T registries for {}",
pairRegistryId pairRegistryId
); );
continue; continue;
} }
List<Registry> cstRegistries = new ArrayList<>(); List<Registry> ostRegistries = new ArrayList<>();
List<Registry> lstRegistries = new ArrayList<>(); List<Registry> tstRegistries = new ArrayList<>();
Registry registry = null; Registry registry = null;
for (Registry currRegistry : groupedRegistry) { for (Registry currRegistry : groupedRegistry) {
registry = currRegistry; registry = currRegistry;
if (RegistryDesignation.L.equalsByKey(currRegistry.getRegistryDesignation())) if (RegistryDesignation.T.equalsByKey(currRegistry.getRegistryDesignation()))
lstRegistries.add(currRegistry); tstRegistries.add(currRegistry);
if (RegistryDesignation.C.equalsByKey(currRegistry.getRegistryDesignation())) if (RegistryDesignation.O.equalsByKey(currRegistry.getRegistryDesignation()))
cstRegistries.add(currRegistry); ostRegistries.add(currRegistry);
} }
boolean invalid = false; boolean invalid = false;
if (!cstRegistries.isEmpty() || !lstRegistries.isEmpty()) { if (!ostRegistries.isEmpty() || !tstRegistries.isEmpty()) {
String sourceTradingCode = null; String sourceTradingCode = null;
if (!cstRegistries.isEmpty()) sourceTradingCode = cstRegistries.iterator().next().getTradingCode(); if (!ostRegistries.isEmpty()) sourceTradingCode = ostRegistries.iterator().next().getTradingCode();
if (!lstRegistries.isEmpty()) sourceTradingCode = lstRegistries.iterator().next().getTradingCode(); if (!tstRegistries.isEmpty()) sourceTradingCode = tstRegistries.iterator().next().getTradingCode();
for (Registry currRegistry : cstRegistries) { for (Registry currRegistry : ostRegistries) {
if (Objects.equals(sourceTradingCode, currRegistry.getTradingCode())) continue; if (Objects.equals(sourceTradingCode, currRegistry.getTradingCode())) continue;
invalid = true; invalid = true;
log.warn("Invalid CS_T registries set, tradingCode not equals. Registries was skipped"); log.warn("Invalid OS_T registries set, tradingCode not equals. Registries was skipped");
break; break;
} }
for (Registry currRegistry : lstRegistries) { for (Registry currRegistry : tstRegistries) {
if (Objects.equals(sourceTradingCode, currRegistry.getTradingCode())) continue; if (Objects.equals(sourceTradingCode, currRegistry.getTradingCode())) continue;
invalid = true; invalid = true;
log.warn("Invalid LS_T registries set, tradingCode not equals. Registries was skipped"); log.warn("Invalid TS_T registries set, tradingCode not equals. Registries was skipped");
break; break;
} }
if (invalid) continue; if (invalid) continue;
@ -151,15 +153,15 @@ public class KSRepDepoNettoReportBuilder extends CSVReportBuilder<SessionIdParam
if (session != null && session.getCreated() != null) if (session != null && session.getCreated() != null)
ksRepDepoNettoReport.setSessionDate(LocalDateTime.ofInstant(session.getCreated(), getReportZoneId())); ksRepDepoNettoReport.setSessionDate(LocalDateTime.ofInstant(session.getCreated(), getReportZoneId()));
BigDecimal cstBalance = BigDecimal.ZERO; BigDecimal ostBalance = BigDecimal.ZERO;
BigDecimal lstBalance = BigDecimal.ZERO; BigDecimal tstBalance = BigDecimal.ZERO;
for (Registry cstRegistry : cstRegistries) { for (Registry ostRegistry : ostRegistries) {
if (cstRegistry.getBalance() != null) cstBalance = cstBalance.add(cstRegistry.getBalance()); if (ostRegistry.getBalance() != null) ostBalance = ostBalance.add(ostRegistry.getBalance());
} }
for (Registry lstRegistry : lstRegistries) { for (Registry tstRegistry : tstRegistries) {
if (lstRegistry.getBalance() != null) lstBalance = lstBalance.add(lstRegistry.getBalance()); if (tstRegistry.getBalance() != null) tstBalance = tstBalance.add(tstRegistry.getBalance());
} }
ksRepDepoNettoReport.setValue(cstBalance.subtract(lstBalance)); ksRepDepoNettoReport.setValue(ostBalance.subtract(tstBalance));
rows.add(ksRepDepoNettoReport); rows.add(ksRepDepoNettoReport);
} catch (Throwable e) { } catch (Throwable e) {

View file

@ -14,6 +14,7 @@ import ru.clearing.classes.statics.data.profile.ProfileDocument;
import ru.spcex.clearing.imdg.IMDGDistributedNames; import ru.spcex.clearing.imdg.IMDGDistributedNames;
import ru.spcex.platform.imdg.api.Imdg; import ru.spcex.platform.imdg.api.Imdg;
import ru.spcex.platform.imdg.api.ImdgProvider; import ru.spcex.platform.imdg.api.ImdgProvider;
import ru.spcex.platform.imdg.iml.hazelcast.adapter.predicate.ImdgPredicateBuilderHazelcast;
class NotificationBuilderTest { class NotificationBuilderTest {
static ImdgProvider imdgProviderMock; static ImdgProvider imdgProviderMock;
@ -56,6 +57,7 @@ class NotificationBuilderTest {
testProfileDocument_2.setNumber("TEST_NUMBER_2"); testProfileDocument_2.setNumber("TEST_NUMBER_2");
profileDocumentImdgMock = mock(Imdg.class); profileDocumentImdgMock = mock(Imdg.class);
when(profileDocumentImdgMock.getCollectionObjectsByPredicate(any())).thenReturn(Arrays.asList(testProfileDocument_1, testProfileDocument_2)); when(profileDocumentImdgMock.getCollectionObjectsByPredicate(any())).thenReturn(Arrays.asList(testProfileDocument_1, testProfileDocument_2));
when(profileDocumentImdgMock.predicateBuilder()).thenReturn(new ImdgPredicateBuilderHazelcast());
when(imdgProviderMock.getImdg(eq(IMDGDistributedNames.Map_ProfileDocument), eq(ProfileDocument.class))).thenReturn(profileDocumentImdgMock); when(imdgProviderMock.getImdg(eq(IMDGDistributedNames.Map_ProfileDocument), eq(ProfileDocument.class))).thenReturn(profileDocumentImdgMock);
testRelation_1 = new Relation(); testRelation_1 = new Relation();
@ -68,6 +70,7 @@ class NotificationBuilderTest {
testRelation_2.setUpdated(LocalDate.of(2019, 1, 1).atStartOfDay(ZoneId.systemDefault()).toInstant()); testRelation_2.setUpdated(LocalDate.of(2019, 1, 1).atStartOfDay(ZoneId.systemDefault()).toInstant());
relationImdgMock = mock(Imdg.class); relationImdgMock = mock(Imdg.class);
when(relationImdgMock.getCollectionObjectsByPredicate(any())).thenReturn(Arrays.asList(testRelation_1, testRelation_2)); when(relationImdgMock.getCollectionObjectsByPredicate(any())).thenReturn(Arrays.asList(testRelation_1, testRelation_2));
when(relationImdgMock.predicateBuilder()).thenReturn(new ImdgPredicateBuilderHazelcast());
when(imdgProviderMock.getImdg(eq(IMDGDistributedNames.Map_Relation), eq(Relation.class))).thenReturn(relationImdgMock); when(imdgProviderMock.getImdg(eq(IMDGDistributedNames.Map_Relation), eq(Relation.class))).thenReturn(relationImdgMock);
testCompanySymbols_1 = new CompanySymbols(); testCompanySymbols_1 = new CompanySymbols();
@ -82,6 +85,7 @@ class NotificationBuilderTest {
testCompanySymbols_2.setCompanySymbolValue("TEST_COMPANY_SYMBOL_VALUE_2"); testCompanySymbols_2.setCompanySymbolValue("TEST_COMPANY_SYMBOL_VALUE_2");
companySymbolsImdgMock = mock(Imdg.class); companySymbolsImdgMock = mock(Imdg.class);
when(companySymbolsImdgMock.getCollectionObjectsByPredicate(any())).thenReturn(Arrays.asList(testCompanySymbols_1, testCompanySymbols_2)); when(companySymbolsImdgMock.getCollectionObjectsByPredicate(any())).thenReturn(Arrays.asList(testCompanySymbols_1, testCompanySymbols_2));
when(companySymbolsImdgMock.predicateBuilder()).thenReturn(new ImdgPredicateBuilderHazelcast());
when(imdgProviderMock.getImdg(eq(IMDGDistributedNames.Map_CompanySymbols), eq(CompanySymbols.class))).thenReturn(companySymbolsImdgMock); when(imdgProviderMock.getImdg(eq(IMDGDistributedNames.Map_CompanySymbols), eq(CompanySymbols.class))).thenReturn(companySymbolsImdgMock);
} }

View file

@ -1,14 +1,34 @@
package ru.spcex.clearing.reports.services; package ru.spcex.clearing.reports.services;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.math.BigDecimal;
import java.time.Instant;
import java.time.LocalDate;
import java.time.temporal.ChronoUnit;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.opencsv.CSVParser; import com.opencsv.CSVParser;
import com.opencsv.CSVParserBuilder; import com.opencsv.CSVParserBuilder;
import com.opencsv.CSVReader; import com.opencsv.CSVReader;
import com.opencsv.CSVReaderBuilder; import com.opencsv.CSVReaderBuilder;
import com.opencsv.exceptions.CsvValidationException; import com.opencsv.exceptions.CsvValidationException;
import javax.annotation.PostConstruct;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.kafka.clients.consumer.MockConsumer; import org.apache.kafka.clients.consumer.MockConsumer;
import org.apache.kafka.clients.producer.Producer; import org.apache.kafka.clients.producer.Producer;
import org.junit.jupiter.api.*; import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.MethodOrderer;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestMethodOrder;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
@ -36,22 +56,18 @@ import ru.spcex.clearing.reports.config.validation.ValidationConfig;
import ru.spcex.clearing.test.TestUtils; import ru.spcex.clearing.test.TestUtils;
import ru.spcex.clearing.test.config.ImdgTestConfig; import ru.spcex.clearing.test.config.ImdgTestConfig;
import ru.spcex.clearing.test.config.KafkaTestConfig; import ru.spcex.clearing.test.config.KafkaTestConfig;
import ru.spcex.platform.enumeration.*; import ru.spcex.platform.enumeration.Allowed;
import ru.spcex.platform.enumeration.InOutDirection;
import ru.spcex.platform.enumeration.Market;
import ru.spcex.platform.enumeration.RegistryDesignation;
import ru.spcex.platform.enumeration.RegistryInstrumentType;
import ru.spcex.platform.enumeration.RegistryUnit;
import ru.spcex.platform.enumeration.ReportBuilderType;
import ru.spcex.platform.enumeration.Side;
import ru.spcex.platform.enumeration.WorkflowStatus;
import ru.spcex.platform.imdg.api.Imdg; import ru.spcex.platform.imdg.api.Imdg;
import ru.spcex.platform.imdg.api.ImdgProvider; import ru.spcex.platform.imdg.api.ImdgProvider;
import javax.annotation.PostConstruct;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.math.BigDecimal;
import java.time.Instant;
import java.time.LocalDate;
import java.time.temporal.ChronoUnit;
import java.util.*;
import static org.junit.jupiter.api.Assertions.assertEquals;
@ExtendWith(SpringExtension.class) @ExtendWith(SpringExtension.class)
@ContextConfiguration(classes = { @ContextConfiguration(classes = {
BeanConfiguration.class, BeanConfiguration.class,
@ -600,9 +616,9 @@ public class ReportServiceTest_BP {
testRegistry_1.setTradingClearingRegistry(TEST_TRADING_CLEARING_REGISTRY_1); testRegistry_1.setTradingClearingRegistry(TEST_TRADING_CLEARING_REGISTRY_1);
Long TEST_MONEY_ACCOUNT_1 = 11L; Long TEST_MONEY_ACCOUNT_1 = 11L;
testRegistry_1.setAccountId(TEST_MONEY_ACCOUNT_1); testRegistry_1.setAccountId(TEST_MONEY_ACCOUNT_1);
String TEST_REGISTRY_CODE_1 = "CM"; String TEST_REGISTRY_CODE_1 = "OM";
testRegistry_1.setRegistryCode(TEST_REGISTRY_CODE_1); testRegistry_1.setRegistryCode(TEST_REGISTRY_CODE_1);
testRegistry_1.setRegistryDesignation(RegistryDesignation.C.getKey()); testRegistry_1.setRegistryDesignation(RegistryDesignation.O.getKey());
testRegistry_1.setRegistryInstrumentType(RegistryInstrumentType.M.getKey()); testRegistry_1.setRegistryInstrumentType(RegistryInstrumentType.M.getKey());
testRegistry_1.setOpenBalance(TEST_OPEN_BALANCE_1); testRegistry_1.setOpenBalance(TEST_OPEN_BALANCE_1);
testRegistry_1.setCloseBalance(TEST_CLOSE_BALANCE_1); testRegistry_1.setCloseBalance(TEST_CLOSE_BALANCE_1);
@ -620,9 +636,9 @@ public class ReportServiceTest_BP {
testRegistry_2.setTradingClearingRegistry(TEST_TRADING_CLEARING_REGISTRY_2); testRegistry_2.setTradingClearingRegistry(TEST_TRADING_CLEARING_REGISTRY_2);
Long TEST_MONEY_ACCOUNT_2 = 12L; Long TEST_MONEY_ACCOUNT_2 = 12L;
testRegistry_2.setAccountId(TEST_MONEY_ACCOUNT_2); testRegistry_2.setAccountId(TEST_MONEY_ACCOUNT_2);
String TEST_REGISTRY_CODE_2 = "CM"; String TEST_REGISTRY_CODE_2 = "OM";
testRegistry_2.setRegistryCode(TEST_REGISTRY_CODE_2); testRegistry_2.setRegistryCode(TEST_REGISTRY_CODE_2);
testRegistry_2.setRegistryDesignation(RegistryDesignation.C.getKey()); testRegistry_2.setRegistryDesignation(RegistryDesignation.O.getKey());
testRegistry_2.setRegistryInstrumentType(RegistryInstrumentType.M.getKey()); testRegistry_2.setRegistryInstrumentType(RegistryInstrumentType.M.getKey());
testRegistry_2.setOpenBalance(TEST_OPEN_BALANCE_2); testRegistry_2.setOpenBalance(TEST_OPEN_BALANCE_2);
testRegistry_2.setCloseBalance(TEST_CLOSE_BALANCE_2); testRegistry_2.setCloseBalance(TEST_CLOSE_BALANCE_2);

View file

@ -212,97 +212,97 @@ public class ReportServiceTest_KS {
sessionForDay.setClearingDate(LocalDate.now()); sessionForDay.setClearingDate(LocalDate.now());
Long SESSION_ID_FOR_DAY = sessionImdg.insert(sessionForDay); Long SESSION_ID_FOR_DAY = sessionImdg.insert(sessionForDay);
Registry cmtRegistry_1 = new Registry(); Registry omtRegistry_1 = new Registry();
cmtRegistry_1.setRegistryCode("CM_T"); omtRegistry_1.setRegistryCode("OM_T");
cmtRegistry_1.setRegistryDesignation(RegistryDesignation.C.getKey()); omtRegistry_1.setRegistryDesignation(RegistryDesignation.O.getKey());
cmtRegistry_1.setRegistryInstrumentType(RegistryInstrumentType.M.getKey()); omtRegistry_1.setRegistryInstrumentType(RegistryInstrumentType.M.getKey());
cmtRegistry_1.setRegistryUnit(RegistryUnit.T.getKey()); omtRegistry_1.setRegistryUnit(RegistryUnit.T.getKey());
cmtRegistry_1.setSessionId(SESSION_ID_FOR_DAY); omtRegistry_1.setSessionId(SESSION_ID_FOR_DAY);
cmtRegistry_1.setTradingCode("TRADING_CODE"); omtRegistry_1.setTradingCode("TRADING_CODE");
cmtRegistry_1.setCompanyId(COMPANY_ID); omtRegistry_1.setCompanyId(COMPANY_ID);
cmtRegistry_1.setAccount("ACCOUNT"); omtRegistry_1.setAccount("ACCOUNT");
cmtRegistry_1.setRegistryStatus(RegistryStatus.CLRD.getKey()); omtRegistry_1.setRegistryStatus(RegistryStatus.CLRD.getKey());
cmtRegistry_1.setBalance(BigDecimal.valueOf(111L)); omtRegistry_1.setBalance(BigDecimal.valueOf(111L));
cmtRegistry_1.setContract("CONTRACT_1"); omtRegistry_1.setContract("CONTRACT_1");
registryImdg.insert(cmtRegistry_1); registryImdg.insert(omtRegistry_1);
Registry cmtRegistry_2 = new Registry(); Registry omtRegistry_2 = new Registry();
cmtRegistry_2.setRegistryCode("CM_T"); omtRegistry_2.setRegistryCode("OM_T");
cmtRegistry_2.setRegistryDesignation(RegistryDesignation.C.getKey()); omtRegistry_2.setRegistryDesignation(RegistryDesignation.O.getKey());
cmtRegistry_2.setRegistryInstrumentType(RegistryInstrumentType.M.getKey()); omtRegistry_2.setRegistryInstrumentType(RegistryInstrumentType.M.getKey());
cmtRegistry_2.setRegistryUnit(RegistryUnit.T.getKey()); omtRegistry_2.setRegistryUnit(RegistryUnit.T.getKey());
ClearingMemberCategory clearingMemberCategory = new ClearingMemberCategory(); ClearingMemberCategory clearingMemberCategory = new ClearingMemberCategory();
clearingMemberCategory.setCompanyId(COMPANY_ID); clearingMemberCategory.setCompanyId(COMPANY_ID);
clearingMemberCategory.setClearingMemberCategory(ClearingCategory.I.getKey()); clearingMemberCategory.setClearingMemberCategory(ClearingCategory.I.getKey());
clearingMemberCategoryImdg.insert(clearingMemberCategory); clearingMemberCategoryImdg.insert(clearingMemberCategory);
cmtRegistry_2.setSessionType(SessionType.XDEP.getKey()); omtRegistry_2.setSessionType(SessionType.XDEP.getKey());
cmtRegistry_2.setCounterPartyId(COMPANY_ID); omtRegistry_2.setCounterPartyId(COMPANY_ID);
cmtRegistry_2.setSessionId(SESSION_ID_FOR_DAY); omtRegistry_2.setSessionId(SESSION_ID_FOR_DAY);
cmtRegistry_2.setTradingCode("TRADING_CODE"); omtRegistry_2.setTradingCode("TRADING_CODE");
cmtRegistry_2.setCompanyId(COMPANY_ID); omtRegistry_2.setCompanyId(COMPANY_ID);
cmtRegistry_2.setAccount("ACCOUNT"); omtRegistry_2.setAccount("ACCOUNT");
cmtRegistry_2.setRegistryStatus(RegistryStatus.CLRD.getKey()); omtRegistry_2.setRegistryStatus(RegistryStatus.CLRD.getKey());
cmtRegistry_2.setBalance(BigDecimal.valueOf(111L)); omtRegistry_2.setBalance(BigDecimal.valueOf(111L));
cmtRegistry_2.setContract("CONTRACT_2"); omtRegistry_2.setContract("CONTRACT_2");
registryImdg.insert(cmtRegistry_2); registryImdg.insert(omtRegistry_2);
Registry cmtRegistry_3 = new Registry(); Registry omtRegistry_3 = new Registry();
cmtRegistry_3.setRegistryCode("CM_T"); omtRegistry_3.setRegistryCode("OM_T");
cmtRegistry_3.setRegistryDesignation(RegistryDesignation.C.getKey()); omtRegistry_3.setRegistryDesignation(RegistryDesignation.O.getKey());
cmtRegistry_3.setRegistryInstrumentType(RegistryInstrumentType.M.getKey()); omtRegistry_3.setRegistryInstrumentType(RegistryInstrumentType.M.getKey());
cmtRegistry_3.setRegistryUnit(RegistryUnit.T.getKey()); omtRegistry_3.setRegistryUnit(RegistryUnit.T.getKey());
cmtRegistry_3.setSessionId(SESSION_ID_FOR_DAY); omtRegistry_3.setSessionId(SESSION_ID_FOR_DAY);
cmtRegistry_3.setTradingCode("TRADING_CODE"); omtRegistry_3.setTradingCode("TRADING_CODE");
cmtRegistry_3.setCompanyId(COMPANY_ID); omtRegistry_3.setCompanyId(COMPANY_ID);
cmtRegistry_3.setAccount("ACCOUNT"); omtRegistry_3.setAccount("ACCOUNT");
cmtRegistry_3.setRegistryStatus(RegistryStatus.CLRD.getKey()); omtRegistry_3.setRegistryStatus(RegistryStatus.CLRD.getKey());
cmtRegistry_3.setBalance(BigDecimal.valueOf(111L)); omtRegistry_3.setBalance(BigDecimal.valueOf(111L));
registryImdg.insert(cmtRegistry_3); registryImdg.insert(omtRegistry_3);
Registry lmtRegistry_1 = new Registry(); Registry tmtRegistry_1 = new Registry();
lmtRegistry_1.setRegistryCode("LM_T"); tmtRegistry_1.setRegistryCode("TM_T");
lmtRegistry_1.setRegistryDesignation(RegistryDesignation.L.getKey()); tmtRegistry_1.setRegistryDesignation(RegistryDesignation.T.getKey());
lmtRegistry_1.setRegistryInstrumentType(RegistryInstrumentType.M.getKey()); tmtRegistry_1.setRegistryInstrumentType(RegistryInstrumentType.M.getKey());
lmtRegistry_1.setRegistryUnit(RegistryUnit.T.getKey()); tmtRegistry_1.setRegistryUnit(RegistryUnit.T.getKey());
lmtRegistry_1.setSessionId(SESSION_ID_FOR_DAY); tmtRegistry_1.setSessionId(SESSION_ID_FOR_DAY);
lmtRegistry_1.setTradingCode("TRADING_CODE"); tmtRegistry_1.setTradingCode("TRADING_CODE");
lmtRegistry_1.setCompanyId(COMPANY_ID); tmtRegistry_1.setCompanyId(COMPANY_ID);
lmtRegistry_1.setAccount("ACCOUNT"); tmtRegistry_1.setAccount("ACCOUNT");
lmtRegistry_1.setRegistryStatus(RegistryStatus.CLRD.getKey()); tmtRegistry_1.setRegistryStatus(RegistryStatus.CLRD.getKey());
lmtRegistry_1.setBalance(BigDecimal.valueOf(11L)); tmtRegistry_1.setBalance(BigDecimal.valueOf(11L));
registryImdg.insert(lmtRegistry_1); registryImdg.insert(tmtRegistry_1);
Registry lmtRegistry_2 = new Registry(); Registry tmtRegistry_2 = new Registry();
lmtRegistry_2.setRegistryCode("LM_T"); tmtRegistry_2.setRegistryCode("TM_T");
lmtRegistry_2.setRegistryDesignation(RegistryDesignation.L.getKey()); tmtRegistry_2.setRegistryDesignation(RegistryDesignation.T.getKey());
lmtRegistry_2.setRegistryInstrumentType(RegistryInstrumentType.M.getKey()); tmtRegistry_2.setRegistryInstrumentType(RegistryInstrumentType.M.getKey());
lmtRegistry_2.setRegistryUnit(RegistryUnit.T.getKey()); tmtRegistry_2.setRegistryUnit(RegistryUnit.T.getKey());
lmtRegistry_2.setSessionType(SessionType.XDEP.getKey()); tmtRegistry_2.setSessionType(SessionType.XDEP.getKey());
lmtRegistry_2.setCounterPartyId(COMPANY_ID); tmtRegistry_2.setCounterPartyId(COMPANY_ID);
lmtRegistry_2.setSessionId(SESSION_ID_FOR_DAY); tmtRegistry_2.setSessionId(SESSION_ID_FOR_DAY);
lmtRegistry_2.setTradingCode("TRADING_CODE"); tmtRegistry_2.setTradingCode("TRADING_CODE");
lmtRegistry_2.setCompanyId(COMPANY_ID); tmtRegistry_2.setCompanyId(COMPANY_ID);
lmtRegistry_2.setAccount("ACCOUNT"); tmtRegistry_2.setAccount("ACCOUNT");
lmtRegistry_2.setRegistryStatus(RegistryStatus.CLRD.getKey()); tmtRegistry_2.setRegistryStatus(RegistryStatus.CLRD.getKey());
lmtRegistry_2.setBalance(BigDecimal.valueOf(11L)); tmtRegistry_2.setBalance(BigDecimal.valueOf(11L));
registryImdg.insert(lmtRegistry_2); registryImdg.insert(tmtRegistry_2);
Registry lmtRegistry_3 = new Registry(); Registry tmtRegistry_3 = new Registry();
lmtRegistry_3.setRegistryCode("LM_T"); tmtRegistry_3.setRegistryCode("TM_T");
lmtRegistry_3.setRegistryDesignation(RegistryDesignation.L.getKey()); tmtRegistry_3.setRegistryDesignation(RegistryDesignation.T.getKey());
lmtRegistry_3.setRegistryInstrumentType(RegistryInstrumentType.M.getKey()); tmtRegistry_3.setRegistryInstrumentType(RegistryInstrumentType.M.getKey());
lmtRegistry_3.setRegistryUnit(RegistryUnit.T.getKey()); tmtRegistry_3.setRegistryUnit(RegistryUnit.T.getKey());
lmtRegistry_3.setSessionId(SESSION_ID_FOR_DAY); tmtRegistry_3.setSessionId(SESSION_ID_FOR_DAY);
lmtRegistry_3.setTradingCode("TRADING_CODE"); tmtRegistry_3.setTradingCode("TRADING_CODE");
lmtRegistry_3.setCompanyId(COMPANY_ID); tmtRegistry_3.setCompanyId(COMPANY_ID);
lmtRegistry_3.setAccount("ACCOUNT"); tmtRegistry_3.setAccount("ACCOUNT");
lmtRegistry_3.setRegistryStatus(RegistryStatus.CLRD.getKey()); tmtRegistry_3.setRegistryStatus(RegistryStatus.CLRD.getKey());
lmtRegistry_3.setBalance(BigDecimal.valueOf(11L)); tmtRegistry_3.setBalance(BigDecimal.valueOf(11L));
registryImdg.insert(lmtRegistry_3); registryImdg.insert(tmtRegistry_3);
Registry dmxRegistry_1 = new Registry(); Registry dmxRegistry_1 = new Registry();
dmxRegistry_1.setRegistryCode("DM_X"); dmxRegistry_1.setRegistryCode("DM_X");
@ -392,12 +392,12 @@ public class ReportServiceTest_KS {
registryImdg.delete(addWithdrawRegistry_1); registryImdg.delete(addWithdrawRegistry_1);
registryImdg.delete(addWithdrawRegistry_2); registryImdg.delete(addWithdrawRegistry_2);
registryImdg.delete(addWithdrawRegistry_3); registryImdg.delete(addWithdrawRegistry_3);
registryImdg.delete(cmtRegistry_1); registryImdg.delete(omtRegistry_1);
registryImdg.delete(cmtRegistry_2); registryImdg.delete(omtRegistry_2);
registryImdg.delete(cmtRegistry_3); registryImdg.delete(omtRegistry_3);
registryImdg.delete(lmtRegistry_1); registryImdg.delete(tmtRegistry_1);
registryImdg.delete(lmtRegistry_2); registryImdg.delete(tmtRegistry_2);
registryImdg.delete(lmtRegistry_3); registryImdg.delete(tmtRegistry_3);
registryImdg.delete(dmxRegistry_1); registryImdg.delete(dmxRegistry_1);
registryImdg.delete(dmxRegistry_2); registryImdg.delete(dmxRegistry_2);
sessionImdg.delete(sessionForDay); sessionImdg.delete(sessionForDay);
@ -821,11 +821,11 @@ public class ReportServiceTest_KS {
registry_1.setSettlementDate(LocalDate.now()); registry_1.setSettlementDate(LocalDate.now());
registry_1.setGroupId(Long.MAX_VALUE); registry_1.setGroupId(Long.MAX_VALUE);
registry_1.setClearingDate(LocalDate.now()); registry_1.setClearingDate(LocalDate.now());
registry_1.setRegistryCode("LM_T"); registry_1.setRegistryCode("TM_T");
registry_1.setTradingClearingRegistry("TKR"); registry_1.setTradingClearingRegistry("TKR");
registry_1.setSessionType(SessionType.IPO0.getKey()); registry_1.setSessionType(SessionType.IPO0.getKey());
registry_1.setRegistryStatus(RegistryStatus.PROC.getKey()); registry_1.setRegistryStatus(RegistryStatus.OK.getKey());
registry_1.setRegistryDesignation(RegistryDesignation.L.getKey()); registry_1.setRegistryDesignation(RegistryDesignation.T.getKey());
registry_1.setRegistryInstrumentType(RegistryInstrumentType.M.getKey()); registry_1.setRegistryInstrumentType(RegistryInstrumentType.M.getKey());
registry_1.setRegistryUnit(RegistryUnit.T.getKey()); registry_1.setRegistryUnit(RegistryUnit.T.getKey());
registry_1.setSessionId(sessionId); registry_1.setSessionId(sessionId);
@ -840,10 +840,10 @@ public class ReportServiceTest_KS {
registry_2.setGroupId(Long.MAX_VALUE); registry_2.setGroupId(Long.MAX_VALUE);
registry_2.setClearingDate(LocalDate.now()); registry_2.setClearingDate(LocalDate.now());
registry_2.setSessionType(SessionType.IPO0.getKey()); registry_2.setSessionType(SessionType.IPO0.getKey());
registry_2.setRegistryCode("CM_T"); registry_2.setRegistryCode("OM_T");
registry_2.setTradingClearingRegistry("TKR"); registry_2.setTradingClearingRegistry("TKR");
registry_2.setRegistryStatus(RegistryStatus.PROC.getKey()); registry_2.setRegistryStatus(RegistryStatus.OK.getKey());
registry_2.setRegistryDesignation(RegistryDesignation.C.getKey()); registry_2.setRegistryDesignation(RegistryDesignation.O.getKey());
registry_2.setRegistryInstrumentType(RegistryInstrumentType.M.getKey()); registry_2.setRegistryInstrumentType(RegistryInstrumentType.M.getKey());
registry_2.setRegistryUnit(RegistryUnit.T.getKey()); registry_2.setRegistryUnit(RegistryUnit.T.getKey());
registry_2.setSessionId(sessionId); registry_2.setSessionId(sessionId);
@ -863,11 +863,11 @@ public class ReportServiceTest_KS {
registry_3.setSettlementDate(LocalDate.now()); registry_3.setSettlementDate(LocalDate.now());
registry_3.setGroupId(Long.MAX_VALUE); registry_3.setGroupId(Long.MAX_VALUE);
registry_3.setClearingDate(LocalDate.now()); registry_3.setClearingDate(LocalDate.now());
registry_3.setRegistryCode("LM_T"); registry_3.setRegistryCode("TM_T");
registry_3.setSessionType(SessionType.FINL.getKey()); registry_3.setSessionType(SessionType.FINL.getKey());
registry_3.setTradingClearingRegistry("TKR"); registry_3.setTradingClearingRegistry("TKR");
registry_3.setRegistryStatus(RegistryStatus.PROC.getKey()); registry_3.setRegistryStatus(RegistryStatus.OK.getKey());
registry_3.setRegistryDesignation(RegistryDesignation.L.getKey()); registry_3.setRegistryDesignation(RegistryDesignation.T.getKey());
registry_3.setRegistryInstrumentType(RegistryInstrumentType.M.getKey()); registry_3.setRegistryInstrumentType(RegistryInstrumentType.M.getKey());
registry_3.setRegistryUnit(RegistryUnit.T.getKey()); registry_3.setRegistryUnit(RegistryUnit.T.getKey());
registry_3.setSessionId(sessionId); registry_3.setSessionId(sessionId);
@ -882,10 +882,10 @@ public class ReportServiceTest_KS {
registry_4.setGroupId(Long.MAX_VALUE); registry_4.setGroupId(Long.MAX_VALUE);
registry_4.setSessionType(SessionType.FINL.getKey()); registry_4.setSessionType(SessionType.FINL.getKey());
registry_4.setClearingDate(LocalDate.now()); registry_4.setClearingDate(LocalDate.now());
registry_4.setRegistryCode("CM_T"); registry_4.setRegistryCode("OM_T");
registry_4.setTradingClearingRegistry("TKR"); registry_4.setTradingClearingRegistry("TKR");
registry_4.setRegistryStatus(RegistryStatus.PROC.getKey()); registry_4.setRegistryStatus(RegistryStatus.OK.getKey());
registry_4.setRegistryDesignation(RegistryDesignation.C.getKey()); registry_4.setRegistryDesignation(RegistryDesignation.O.getKey());
registry_4.setRegistryInstrumentType(RegistryInstrumentType.M.getKey()); registry_4.setRegistryInstrumentType(RegistryInstrumentType.M.getKey());
registry_4.setRegistryUnit(RegistryUnit.T.getKey()); registry_4.setRegistryUnit(RegistryUnit.T.getKey());
registry_4.setSessionId(sessionId); registry_4.setSessionId(sessionId);
@ -939,11 +939,11 @@ public class ReportServiceTest_KS {
registry_1.setClearingDate(LocalDate.now()); registry_1.setClearingDate(LocalDate.now());
registry_1.setGroupId(Long.MAX_VALUE); registry_1.setGroupId(Long.MAX_VALUE);
registry_1.setSettlementDate(LocalDate.now()); registry_1.setSettlementDate(LocalDate.now());
registry_1.setRegistryCode("CS_T"); registry_1.setRegistryCode("OS_T");
registry_1.setTradingClearingRegistry("TKR"); registry_1.setTradingClearingRegistry("TKR");
registry_1.setRegistryDesignation(RegistryDesignation.C.getKey()); registry_1.setRegistryDesignation(RegistryDesignation.O.getKey());
registry_1.setRegistryInstrumentType(RegistryInstrumentType.S.getKey()); registry_1.setRegistryInstrumentType(RegistryInstrumentType.S.getKey());
registry_1.setRegistryStatus(RegistryStatus.PROC.getKey()); registry_1.setRegistryStatus(RegistryStatus.OK.getKey());
registry_1.setRegistryUnit(RegistryUnit.T.getKey()); registry_1.setRegistryUnit(RegistryUnit.T.getKey());
registry_1.setSecuritySymbol("SECURITY_SYMBOL"); registry_1.setSecuritySymbol("SECURITY_SYMBOL");
registry_1.setSessionId(sessionId); registry_1.setSessionId(sessionId);
@ -958,12 +958,12 @@ public class ReportServiceTest_KS {
registry_2.setClearingDate(LocalDate.now()); registry_2.setClearingDate(LocalDate.now());
registry_2.setGroupId(Long.MAX_VALUE); registry_2.setGroupId(Long.MAX_VALUE);
registry_2.setSettlementDate(LocalDate.now()); registry_2.setSettlementDate(LocalDate.now());
registry_2.setRegistryCode("LS_T"); registry_2.setRegistryCode("TS_T");
registry_2.setTradingClearingRegistry("TKR"); registry_2.setTradingClearingRegistry("TKR");
registry_2.setRegistryDesignation(RegistryDesignation.L.getKey()); registry_2.setRegistryDesignation(RegistryDesignation.T.getKey());
registry_2.setRegistryInstrumentType(RegistryInstrumentType.S.getKey()); registry_2.setRegistryInstrumentType(RegistryInstrumentType.S.getKey());
registry_2.setRegistryUnit(RegistryUnit.T.getKey()); registry_2.setRegistryUnit(RegistryUnit.T.getKey());
registry_2.setRegistryStatus(RegistryStatus.PROC.getKey()); registry_2.setRegistryStatus(RegistryStatus.OK.getKey());
registry_2.setSecuritySymbol("SECURITY_SYMBOL"); registry_2.setSecuritySymbol("SECURITY_SYMBOL");
registry_2.setSessionId(sessionId); registry_2.setSessionId(sessionId);
registry_2.setAccount("ACCOUNT"); registry_2.setAccount("ACCOUNT");
@ -1189,6 +1189,8 @@ public class ReportServiceTest_KS {
@Order(11) @Order(11)
public void ksRepCashNettoExtendedTest() throws IOException, CsvValidationException { public void ksRepCashNettoExtendedTest() throws IOException, CsvValidationException {
clearTestDir(); clearTestDir();
Collection<Registry> allValues = registryImdg.getAllValues();
for (Registry registry : allValues) registryImdg.delete(registry);
Session session = new Session(); Session session = new Session();
session.setCreated( session.setCreated(
@ -1234,6 +1236,7 @@ public class ReportServiceTest_KS {
registry.setRegistryCapacity(row[10]); registry.setRegistryCapacity(row[10]);
registry.setRegistryUnit(row[11]); registry.setRegistryUnit(row[11]);
registry.setRegistryCode(row[12]); registry.setRegistryCode(row[12]);
registry.setRegistryStatus(row[15]);
registry.setAccountType(row[6]); registry.setAccountType(row[6]);
registry.setAccount(row[7]); registry.setAccount(row[7]);
if (row[6].equalsIgnoreCase(AccountType.Info.getKey())) { if (row[6].equalsIgnoreCase(AccountType.Info.getKey())) {

View file

@ -1,3 +1,3 @@
"FIRMID","SESSION_ID","SESSION_DATE","ACCOUNT","TKR","VALUE","DATE","OBL_VALUE","REQ_VALUE","LOT_CURRENCY","CURRENCY_NETTO","TR_EXECDATE" "FIRMID","SESSION_ID","SESSION_DATE","ACCOUNT","TKR","VALUE","DATE","OBL_VALUE","REQ_VALUE","LOT_CURRENCY","CURRENCY_NETTO","TR_EXECDATE"
"TRADING_CODE","146","20.01.1970T02:49:58","ACCOUNT","TKR","22.22","26.06.2024",,,,, "TRADING_CODE","146","20.01.1970T02:49:58","ACCOUNT","TKR","22.22","06.08.2024",,,,,
"TRADING_CODE","146","20.01.1970T02:49:58","ACCOUNT_FROM_ACCOUNT","TKR",,"26.06.2024","22.22","44.44",,, "TRADING_CODE","146","20.01.1970T02:49:58","ACCOUNT_FROM_ACCOUNT","TKR",,"06.08.2024","22.22","44.44",,,

1 FIRMID SESSION_ID SESSION_DATE ACCOUNT TKR VALUE DATE OBL_VALUE REQ_VALUE LOT_CURRENCY CURRENCY_NETTO TR_EXECDATE
2 TRADING_CODE 146 20.01.1970T02:49:58 ACCOUNT TKR 22.22 26.06.2024 06.08.2024
3 TRADING_CODE 146 20.01.1970T02:49:58 ACCOUNT_FROM_ACCOUNT TKR 26.06.2024 06.08.2024 22.22 44.44

View file

@ -1,2 +1,3 @@
"FIRMID","ACCOUNT","TKR","DATE","REGISTER_CODE","REGISTER_NAME","OPEN_BALANCE","CHANGE_BALANCE","ADD_WITHDRAW","CLOSE_BALANCE","REMARKS","TRADE_NUM","CURRENCY" "FIRMID","ACCOUNT","TKR","DATE","REGISTER_CODE","REGISTER_NAME","OPEN_BALANCE","CHANGE_BALANCE","ADD_WITHDRAW","CLOSE_BALANCE","REMARKS","TRADE_NUM","CURRENCY"
"TRADING_CODE","ACCOUNT","TRADING_CLEARING_REGISTRY","01.07.2024","AM_T","AM_T_NAME","77.78","189.00","111.00","377.78",,, "TRADING_CODE","ACCOUNT_FROM_ACCOUNT","TRADING_CLEARING_REGISTRY","06.08.2024","AM_T","AM_T_NAME","77.78","189.00","111.00","377.78",,,
"TRADING_CODE","ACCOUNT","TRADING_CLEARING_REGISTRY","06.08.2024","AM_T","AM_T_NAME","77.78","189.00","111.00","377.78",,,

1 FIRMID ACCOUNT TKR DATE REGISTER_CODE REGISTER_NAME OPEN_BALANCE CHANGE_BALANCE ADD_WITHDRAW CLOSE_BALANCE REMARKS TRADE_NUM CURRENCY
2 TRADING_CODE ACCOUNT ACCOUNT_FROM_ACCOUNT TRADING_CLEARING_REGISTRY 01.07.2024 06.08.2024 AM_T AM_T_NAME 77.78 189.00 111.00 377.78
3 TRADING_CODE ACCOUNT TRADING_CLEARING_REGISTRY 06.08.2024 AM_T AM_T_NAME 77.78 189.00 111.00 377.78

View file

@ -1,19 +1,19 @@
company_id;trading_code;clearing_code;short_name;full_name;account_id;account_type;account;registry_designation;registry_instrument_type;registry_capacity;registry_unit;registry_code;trading_clearing_registry_id;trading_clearing_registry;registry_status;security_id;security_symbol;balance;open_balance;close_balance;credit;debit;settled_credit;settled_debit;check_balance;diff_balance;plan_balance;balance_dimension;settlement_date;settlement_code;trading_date;clearing_date;refund_date;value_date;price;contract;counter_party_id;comment;parent_id;group_id;session_id;session_type;payment_id;id;created_at;updated_at;section company_id;trading_code;clearing_code;short_name;full_name;account_id;account_type;account;registry_designation;registry_instrument_type;registry_capacity;registry_unit;registry_code;trading_clearing_registry_id;trading_clearing_registry;registry_status;security_id;security_symbol;balance;open_balance;close_balance;credit;debit;settled_credit;settled_debit;check_balance;diff_balance;plan_balance;balance_dimension;settlement_date;settlement_code;trading_date;clearing_date;refund_date;value_date;price;contract;counter_party_id;comment;parent_id;group_id;session_id;session_type;payment_id;id;created_at;updated_at;section
4500120;95;95;Банк ВТБ (ПАО);Банк ВТБ (публичное акционерное общество);4410078;CLRN;30411810300000002094;C;M;A;T;CMAT;21240012;0095CAT00001;CLRD;643;RUB;69,75;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;69,7515;38840009;80162;(null);(null);507;47580029;UNIT;(null);47580094;24.06.2024 14:16;24.06.2024 15:19;CURR 4500120;95;95;Банк ВТБ (ПАО);Банк ВТБ (публичное акционерное общество);4410078;CLRN;30411810300000002094;O;M;A;T;OMAT;21240012;0095CAT00001;CLRD;643;RUB;69,75;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;69,7515;38840009;80162;(null);(null);507;47580029;UNIT;(null);47580094;24.06.2024 14:16;24.06.2024 15:19;CURR
80162;8;8;ПАО Сбербанк;Публичное акционерное общество «Сбербанк России»;38690096;CLRN;3,04118607E+019;C;M;A;T;CMAT;130040;0008MAT00001;CLRD;860;UZS;10000;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;69,7515;38840009;4500120;(null);(null);507;47580029;UNIT;(null);47580076;24.06.2024 14:16;24.06.2024 15:19;CURR 80162;8;8;ПАО Сбербанк;Публичное акционерное общество «Сбербанк России»;38690096;CLRN;3,04118607E+019;O;M;A;T;OMAT;130040;0008MAT00001;CLRD;860;UZS;10000;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;69,7515;38840009;4500120;(null);(null);507;47580029;UNIT;(null);47580076;24.06.2024 14:16;24.06.2024 15:19;CURR
80022;472;472;ПАО "Промсвязьбанк";Публичное акционерное общество «Промсвязьбанк» ;38690028;CLRN;3,04111569E+019;C;M;A;T;CMAT;1860016;0472CAT00001;CLRD;156;CNY;10;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;12,9575;38840004;4500072;(null);(null);508;47580029;UNIT;(null);47580074;24.06.2024 14:16;24.06.2024 15:19;CURR 80022;472;472;ПАО "Промсвязьбанк";Публичное акционерное общество «Промсвязьбанк» ;38690028;CLRN;3,04111569E+019;O;M;A;T;OMAT;1860016;0472CAT00001;CLRD;156;CNY;10;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;12,9575;38840004;4500072;(null);(null);508;47580029;UNIT;(null);47580074;24.06.2024 14:16;24.06.2024 15:19;CURR
80136;45;45;АО "АБ "РОССИЯ";Акционерное общество «Акционерный Банк «РОССИЯ»;130023;CLRN;3,04118103E+019;C;M;A;T;CMAT;1860025;0045CAT00001;CLRD;643;RUB;3000000000;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;25.06.2024;24.06.2024;17,12;DT1000S001U/240624/45/24062400000001;80074;(null);(null);24062400000001;47580029;UNIT;(null);47580072;24.06.2024 14:16;24.06.2024 15:19;MKR 80136;45;45;АО "АБ "РОССИЯ";Акционерное общество «Акционерный Банк «РОССИЯ»;130023;CLRN;3,04118103E+019;O;M;A;T;OMAT;1860025;0045CAT00001;CLRD;643;RUB;3000000000;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;25.06.2024;24.06.2024;17,12;DT1000S001U/240624/45/24062400000001;80074;(null);(null);24062400000001;47580029;UNIT;(null);47580072;24.06.2024 14:16;24.06.2024 15:19;MKR
4500072;234;234;Банк "ВБРР" (АО);Акционерное общество "Всероссийский банк развития регионов";47130002;INFO;3,99118600000001E+019;C;M;A;T;CMAT;47130004;0234CAT00001;CLRD;860;UZS;10000000;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;69,7575;38840005;80022;(null);(null);1518298;47580029;UNIT;(null);47580093;24.06.2024 14:16;24.06.2024 15:19;CURR 4500072;234;234;Банк "ВБРР" (АО);Акционерное общество "Всероссийский банк развития регионов";47130002;INFO;3,99118600000001E+019;O;M;A;T;OMAT;47130004;0234CAT00001;CLRD;860;UZS;10000000;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;69,7575;38840005;80022;(null);(null);1518298;47580029;UNIT;(null);47580093;24.06.2024 14:16;24.06.2024 15:19;CURR
80162;8;8;ПАО Сбербанк;Публичное акционерное общество «Сбербанк России»;130013;CLRN;3,041181E+019;C;M;A;T;CMAT;1930000;0008CAT00001;CLRD;643;RUB;7000000000;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;25.06.2024;24.06.2024;16,88;DT1000S001U/240624/8/24062400000002;80074;(null);(null);24062400000002;47580029;UNIT;(null);47580079;24.06.2024 14:16;24.06.2024 15:19;MKR 80162;8;8;ПАО Сбербанк;Публичное акционерное общество «Сбербанк России»;130013;CLRN;3,041181E+019;O;M;A;T;OMAT;1930000;0008CAT00001;CLRD;643;RUB;7000000000;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;25.06.2024;24.06.2024;16,88;DT1000S001U/240624/8/24062400000002;80074;(null);(null);24062400000002;47580029;UNIT;(null);47580079;24.06.2024 14:16;24.06.2024 15:19;MKR
4500072;234;234;Банк "ВБРР" (АО);Акционерное общество "Всероссийский банк развития регионов";4410023;INFO;3,99118100000003E+019;C;M;A;T;CMAT;47130004;0234CAT00001;CLRD;643;RUB;129,58;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;12,9575;38840004;80022;(null);(null);508;47580029;UNIT;(null);47580073;24.06.2024 14:16;24.06.2024 15:19;CURR 4500072;234;234;Банк "ВБРР" (АО);Акционерное общество "Всероссийский банк развития регионов";4410023;INFO;3,99118100000003E+019;O;M;A;T;OMAT;47130004;0234CAT00001;CLRD;643;RUB;129,58;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;12,9575;38840004;80022;(null);(null);508;47580029;UNIT;(null);47580073;24.06.2024 14:16;24.06.2024 15:19;CURR
80162;8;8;ПАО Сбербанк;Публичное акционерное общество «Сбербанк России»;130013;CLRN;3,041181E+019;C;M;A;T;CMAT;1930000;0008CAT00001;CLRD;643;RUB;9743,9;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;97;(null);80022;(null);(null);1461034;47580029;UNIT;(null);47580085;24.06.2024 14:16;24.06.2024 15:19;FOND 80162;8;8;ПАО Сбербанк;Публичное акционерное общество «Сбербанк России»;130013;CLRN;3,041181E+019;O;M;A;T;OMAT;1930000;0008CAT00001;CLRD;643;RUB;9743,9;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;97;(null);80022;(null);(null);1461034;47580029;UNIT;(null);47580085;24.06.2024 14:16;24.06.2024 15:19;FOND
80022;472;472;ПАО "Промсвязьбанк";Публичное акционерное общество «Промсвязьбанк» ;130005;CLRN;3,0411810101E+019;C;M;A;T;CMAT;1860016;0472CAT00001;CLRD;643;RUB;69757,5;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;69,7575;38840005;4500072;(null);(null);1518298;47580029;UNIT;(null);47580090;24.06.2024 14:16;24.06.2024 15:19;CURR 80022;472;472;ПАО "Промсвязьбанк";Публичное акционерное общество «Промсвязьбанк» ;130005;CLRN;3,0411810101E+019;O;M;A;T;OMAT;1860016;0472CAT00001;CLRD;643;RUB;69757,5;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;69,7575;38840005;4500072;(null);(null);1518298;47580029;UNIT;(null);47580090;24.06.2024 14:16;24.06.2024 15:19;CURR
80022;472;472;ПАО "Промсвязьбанк";Публичное акционерное общество «Промсвязьбанк» ;38690032;CLRN;3,04118605E+019;L;M;A;T;LMAT;1860016;0472CAT00001;CLRD;860;UZS;10000000;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;69,7575;38840005;4500072;(null);(null);1518298;47580029;UNIT;(null);47580075;24.06.2024 14:16;24.06.2024 15:19;CURR 80022;472;472;ПАО "Промсвязьбанк";Публичное акционерное общество «Промсвязьбанк» ;38690032;CLRN;3,04118605E+019;T;M;A;T;TMAT;1860016;0472CAT00001;CLRD;860;UZS;10000000;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;69,7575;38840005;4500072;(null);(null);1518298;47580029;UNIT;(null);47580075;24.06.2024 14:16;24.06.2024 15:19;CURR
4500072;234;234;Банк "ВБРР" (АО);Акционерное общество "Всероссийский банк развития регионов";47130000;INFO;3,99111560000002E+019;L;M;A;T;LMAT;47130004;0234CAT00001;CLRD;156;CNY;10;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;12,9575;38840004;80022;(null);(null);508;47580029;UNIT;(null);47580087;24.06.2024 14:16;24.06.2024 15:19;CURR 4500072;234;234;Банк "ВБРР" (АО);Акционерное общество "Всероссийский банк развития регионов";47130000;INFO;3,99111560000002E+019;T;M;A;T;TMAT;47130004;0234CAT00001;CLRD;156;CNY;10;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;12,9575;38840004;80022;(null);(null);508;47580029;UNIT;(null);47580087;24.06.2024 14:16;24.06.2024 15:19;CURR
80022;472;472;ПАО "Промсвязьбанк";Публичное акционерное общество «Промсвязьбанк» ;130005;CLRN;3,0411810101E+019;L;M;A;T;LMAT;1860016;0472CAT00001;CLRD;643;RUB;129,58;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;12,9575;38840004;4500072;(null);(null);508;47580029;UNIT;(null);47580083;24.06.2024 14:16;24.06.2024 15:19;CURR 80022;472;472;ПАО "Промсвязьбанк";Публичное акционерное общество «Промсвязьбанк» ;130005;CLRN;3,0411810101E+019;T;M;A;T;TMAT;1860016;0472CAT00001;CLRD;643;RUB;129,58;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;12,9575;38840004;4500072;(null);(null);508;47580029;UNIT;(null);47580083;24.06.2024 14:16;24.06.2024 15:19;CURR
80022;472;472;ПАО "Промсвязьбанк";Публичное акционерное общество «Промсвязьбанк» ;130005;CLRN;3,0411810101E+019;L;M;A;T;LMAT;1860016;0472CAT00001;CLRD;643;RUB;9743,9;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;97;(null);80162;(null);(null);1461034;47580029;UNIT;(null);47580095;24.06.2024 14:16;24.06.2024 15:19;FOND 80022;472;472;ПАО "Промсвязьбанк";Публичное акционерное общество «Промсвязьбанк» ;130005;CLRN;3,0411810101E+019;T;M;A;T;TMAT;1860016;0472CAT00001;CLRD;643;RUB;9743,9;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;97;(null);80162;(null);(null);1461034;47580029;UNIT;(null);47580095;24.06.2024 14:16;24.06.2024 15:19;FOND
80074;302;302;Комитет финансов СПб;Комитет финансов Санкт-Петербурга;130019;CLRN;3,04118107E+019;L;M;A;T;LMAT;130034;0302MAT00001;CLRD;643;RUB;7000000000;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;25.06.2024;24.06.2024;16,88;DT1000S001U/240624/8/24062400000002;80162;(null);(null);24062400000002;47580029;UNIT;(null);47580089;24.06.2024 14:16;24.06.2024 15:19;MKR 80074;302;302;Комитет финансов СПб;Комитет финансов Санкт-Петербурга;130019;CLRN;3,04118107E+019;T;M;A;T;TMAT;130034;0302MAT00001;CLRD;643;RUB;7000000000;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;25.06.2024;24.06.2024;16,88;DT1000S001U/240624/8/24062400000002;80162;(null);(null);24062400000002;47580029;UNIT;(null);47580089;24.06.2024 14:16;24.06.2024 15:19;MKR
4500072;234;234;Банк "ВБРР" (АО);Акционерное общество "Всероссийский банк развития регионов";4410023;INFO;3,99118100000003E+019;L;M;A;T;LMAT;47130004;0234CAT00001;CLRD;643;RUB;69757,5;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;69,7575;38840005;80022;(null);(null);1518298;47580029;UNIT;(null);47580078;24.06.2024 14:16;24.06.2024 15:19;CURR 4500072;234;234;Банк "ВБРР" (АО);Акционерное общество "Всероссийский банк развития регионов";4410023;INFO;3,99118100000003E+019;T;M;A;T;TMAT;47130004;0234CAT00001;CLRD;643;RUB;69757,5;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;69,7575;38840005;80022;(null);(null);1518298;47580029;UNIT;(null);47580078;24.06.2024 14:16;24.06.2024 15:19;CURR
80074;302;302;Комитет финансов СПб;Комитет финансов Санкт-Петербурга;130019;CLRN;3,04118107E+019;L;M;A;T;LMAT;130034;0302MAT00001;CLRD;643;RUB;3000000000;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;25.06.2024;24.06.2024;17,12;DT1000S001U/240624/45/24062400000001;80136;(null);(null);24062400000001;47580029;UNIT;(null);47580086;24.06.2024 14:16;24.06.2024 15:19;MKR 80074;302;302;Комитет финансов СПб;Комитет финансов Санкт-Петербурга;130019;CLRN;3,04118107E+019;T;M;A;T;TMAT;130034;0302MAT00001;CLRD;643;RUB;3000000000;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;25.06.2024;24.06.2024;17,12;DT1000S001U/240624/45/24062400000001;80136;(null);(null);24062400000001;47580029;UNIT;(null);47580086;24.06.2024 14:16;24.06.2024 15:19;MKR
80162;8;8;ПАО Сбербанк;Публичное акционерное общество «Сбербанк России»;130017;CLRN;3,04118102E+019;L;M;A;T;LMAT;130040;0008MAT00001;CLRD;643;RUB;69,75;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;69,7515;38840009;4500120;(null);(null);507;47580029;UNIT;(null);47580084;24.06.2024 14:16;24.06.2024 15:19;CURR 80162;8;8;ПАО Сбербанк;Публичное акционерное общество «Сбербанк России»;130017;CLRN;3,04118102E+019;T;M;A;T;TMAT;130040;0008MAT00001;CLRD;643;RUB;69,75;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;69,7515;38840009;4500120;(null);(null);507;47580029;UNIT;(null);47580084;24.06.2024 14:16;24.06.2024 15:19;CURR
4500120;95;95;Банк ВТБ (ПАО);Банк ВТБ (публичное акционерное общество);38690016;CLRN;30411810300000002049;L;M;A;T;LMAT;21240012;0095CAT00001;CLRD;860;UZS;10000;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;69,7515;38840009;80162;(null);(null);507;47580029;UNIT;(null);47580088;24.06.2024 14:16;24.06.2024 15:19;CURR 4500120;95;95;Банк ВТБ (ПАО);Банк ВТБ (публичное акционерное общество);38690016;CLRN;30411810300000002049;T;M;A;T;TMAT;21240012;0095CAT00001;CLRD;860;UZS;10000;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;69,7515;38840009;80162;(null);(null);507;47580029;UNIT;(null);47580088;24.06.2024 14:16;24.06.2024 15:19;CURR

Can't render this file because it contains an unexpected character in line 4 and column 22.