akulikov 2023-11-09 14:59:11 +03:00
parent a2ebfd945b
commit e6ede79021
2 changed files with 4 additions and 3 deletions

View file

@ -78,13 +78,14 @@ public class KSCommissionTradesReportBuilder extends CSVReportBuilder<EmptyParam
ImdgPredicate finalPredicate = pb.and(
pb.sql(sql),
pb.greatEqual("refundDate", nowDate),
pb.less("valueDate", nowDate),
pb.or(pb.equals("sessionType", SessionType.XDEP.getKey()), pb.equals("sessionType", SessionType.FINL.getKey()))
pb.lessEqual("valueDate", nowDate),
pb.in("sessionType", SessionType.XDEP.getKey(), SessionType.FINL.getKey(), SessionType.MEDM.getKey())
);
Collection<Registry> registries = registryImdg.getCollectionObjectsByPredicate(finalPredicate);
log.debug("Found {} Registry by query: {}", registries.size(), finalPredicate);
rows = new ArrayList<>(registries.size());
for (Registry registry : registries) {
if (registry.getValueDate().equals(registry.getSettlementDate())) continue;
if (registry.getTradingDate() == null) {
log.warn("For registry id = {} field TradingDate was null, registry was skipped",
registry.getId());

View file

@ -419,7 +419,7 @@ public class ReportServiceTest_BP {
File outFile = outFolder.listFiles()[0];
File expectedFile = new File(getClass().getClassLoader().getResource("expected_reports_csv/bp/KS_BR_PFX65_DEALS_expected.csv").getFile());
compareCSVFiles(expectedFile, outFile, List.of());
compareCSVFiles(expectedFile, outFile, List.of("TRADEDATE"));
testExecutionFond.setSessionId(oldExecutionFondSessionId);
testExecutionFond.setCoverageStatus(oldExecutionFondCoverageStatus);