This commit is contained in:
parent
45008556ab
commit
2db5bbc7c0
4 changed files with 7 additions and 4 deletions
|
|
@ -72,7 +72,7 @@ public class KSRepCashRegisterSumsReportBuilder extends CSVReportBuilder<EmptyPa
|
|||
ImdgPredicate finalPredicate = pb.and(
|
||||
pb.greatEqual("updated", instantNow.truncatedTo(ChronoUnit.DAYS)),
|
||||
pb.less("updated", instantNow.plus(1, ChronoUnit.DAYS).truncatedTo(ChronoUnit.DAYS)),
|
||||
pb.equals("inOutSDfType", InOutSDfType.type6.getKey()),
|
||||
pb.equals("inOutSDfType", InOutSDfType.type57.getKey()),
|
||||
pb.equals("operationStatus", OperationStatus.Executed.getKey()),
|
||||
pb.notNull("amount")
|
||||
);
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ public class KSRepDepoRegisterQuantitiesReportBuilder extends CSVReportBuilder<E
|
|||
ImdgPredicate finalPredicate = pb.and(
|
||||
pb.greatEqual("updated", instantNow.truncatedTo(ChronoUnit.DAYS)),
|
||||
pb.less("updated", instantNow.plus(1, ChronoUnit.DAYS).truncatedTo(ChronoUnit.DAYS)),
|
||||
pb.equals("inOutSDfType", InOutSDfType.type10.getKey()),
|
||||
pb.equals("inOutSDfType", InOutSDfType.type21.getKey()),
|
||||
pb.equals("operationStatus", OperationStatus.Executed.getKey()),
|
||||
pb.notNull("amount")
|
||||
);
|
||||
|
|
|
|||
|
|
@ -128,11 +128,14 @@ public class KSRepTradesReportBuilder extends CSVReportBuilder<EmptyParams, KSRe
|
|||
|
||||
if (execution instanceof ExecutionDeposit executionDeposit) {
|
||||
BigDecimal firstLegAmount = executionDeposit.getFirstLegAmount() != null ? executionDeposit.getFirstLegAmount() : BigDecimal.ZERO;
|
||||
if (Side.SELL.equalsByKey(executionDeposit.getSide())) firstLegAmount = firstLegAmount.negate();
|
||||
ksRepTradesReport.setCashLiability(firstLegAmount);
|
||||
ksRepTradesReport.setDepoLiability(BigDecimal.ZERO);
|
||||
} else if (execution instanceof ExecutionFond executionFond) {
|
||||
BigDecimal settlementAmount = executionFond.getSettlementAmount() != null ? executionFond.getSettlementAmount() : BigDecimal.ZERO;
|
||||
if (Side.BUY.equalsByKey(executionFond.getSide())) settlementAmount = settlementAmount.negate();
|
||||
BigDecimal quantity = executionFond.getQuantity() != null ? executionFond.getQuantity() : BigDecimal.ZERO;
|
||||
if (Side.SELL.equalsByKey(executionFond.getSide())) quantity = quantity.negate();
|
||||
ksRepTradesReport.setCashLiability(settlementAmount);
|
||||
ksRepTradesReport.setDepoLiability(quantity);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ public class ReportServiceTest_KS {
|
|||
statement_1.setAddresseeId(COMPANY_ID);
|
||||
statement_1.setAccount("ACCOUNT");
|
||||
statement_1.setInOutDirection(InOutDirection.in.getKey());
|
||||
statement_1.setInOutSDfType(InOutSDfType.type6.getKey());
|
||||
statement_1.setInOutSDfType(InOutSDfType.type57.getKey());
|
||||
statement_1.setOperationStatus(OperationStatus.Executed.getKey());
|
||||
statement_1.setAmount(BigDecimal.valueOf(7777.777777777));
|
||||
statement_1.setUpdated(Instant.now());
|
||||
|
|
@ -287,7 +287,7 @@ public class ReportServiceTest_KS {
|
|||
statement_1.setAddresseeId(COMPANY_ID);
|
||||
statement_1.setAccount("ACCOUNT");
|
||||
statement_1.setInOutDirection(InOutDirection.in.getKey());
|
||||
statement_1.setInOutSDfType(InOutSDfType.type10.getKey());
|
||||
statement_1.setInOutSDfType(InOutSDfType.type21.getKey());
|
||||
statement_1.setOperationStatus(OperationStatus.Executed.getKey());
|
||||
statement_1.setAmount(BigDecimal.valueOf(7777.777777777));
|
||||
statement_1.setUpdated(Instant.now());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue