This commit is contained in:
parent
c5a62a0bd4
commit
038f676eef
4 changed files with 21 additions and 5 deletions
|
|
@ -7,6 +7,7 @@ import com.opencsv.bean.CsvDate;
|
||||||
import com.opencsv.bean.CsvNumber;
|
import com.opencsv.bean.CsvNumber;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
public class KSRepTradesReport {
|
public class KSRepTradesReport {
|
||||||
|
|
@ -70,6 +71,11 @@ public class KSRepTradesReport {
|
||||||
@CsvBindByPosition(position = 13)
|
@CsvBindByPosition(position = 13)
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
|
@CsvBindByName(column = "REPAYM_DATE")
|
||||||
|
@CsvBindByPosition(position = 14)
|
||||||
|
@CsvDate(value = "yyyy-MM-dd")
|
||||||
|
private LocalDate repaymDate;
|
||||||
|
|
||||||
|
|
||||||
public Long getSessionId() {
|
public Long getSessionId() {
|
||||||
return sessionId;
|
return sessionId;
|
||||||
|
|
@ -182,4 +188,12 @@ public class KSRepTradesReport {
|
||||||
public void setDepoAccount(String depoAccount) {
|
public void setDepoAccount(String depoAccount) {
|
||||||
this.depoAccount = depoAccount;
|
this.depoAccount = depoAccount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LocalDate getRepaymDate() {
|
||||||
|
return repaymDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRepaymDate(LocalDate repaymDate) {
|
||||||
|
this.repaymDate = repaymDate;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -209,6 +209,7 @@ public class KSRepTradesReportBuilder extends CSVReportBuilder<EmptyParams, KSRe
|
||||||
}
|
}
|
||||||
ksRepTradesReport.setCashLiability(firstLegAmount);
|
ksRepTradesReport.setCashLiability(firstLegAmount);
|
||||||
ksRepTradesReport.setDepoLiability(BigDecimal.ZERO);
|
ksRepTradesReport.setDepoLiability(BigDecimal.ZERO);
|
||||||
|
ksRepTradesReport.setRepaymDate(executionDeposit.getSecondLegSettlementDate());
|
||||||
} else if (execution instanceof ExecutionFond executionFond) {
|
} else if (execution instanceof ExecutionFond executionFond) {
|
||||||
|
|
||||||
if (tkr.getDepoAccountId() != null) {
|
if (tkr.getDepoAccountId() != null) {
|
||||||
|
|
|
||||||
|
|
@ -729,6 +729,7 @@ public class ReportServiceTest_KS {
|
||||||
executionDeposit.setExchangeExecutionId(222L);
|
executionDeposit.setExchangeExecutionId(222L);
|
||||||
executionDeposit.setExchangeExecutionTime(Instant.ofEpochMilli(LocalDateTime.of(2022, 1, 1, 1, 1, 1).toEpochSecond(ZoneOffset.UTC)));
|
executionDeposit.setExchangeExecutionTime(Instant.ofEpochMilli(LocalDateTime.of(2022, 1, 1, 1, 1, 1).toEpochSecond(ZoneOffset.UTC)));
|
||||||
executionDeposit.setCoverageStatus(CoverageStatus.DEND.getKey());
|
executionDeposit.setCoverageStatus(CoverageStatus.DEND.getKey());
|
||||||
|
executionDeposit.setSecondLegSettlementDate(LocalDate.of(2000, 1, 1));
|
||||||
executionDepositImdg.insert(executionDeposit);
|
executionDepositImdg.insert(executionDeposit);
|
||||||
|
|
||||||
String jsonString = TestUtils.getJsonStringForSystem(reportRequest, 0L);
|
String jsonString = TestUtils.getJsonStringForSystem(reportRequest, 0L);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
"SESSION_ID","SESSION_DATE","TR_ID","AGREEMENT_NUMBER","FIRM_ID","TKR","ACCOUNT","DEPO_ACCOUNT","CASH_LIABILITY","DEPO_LIABILITY","TRADE_NUM","CLASS_CODE","TRADE_DATE","STATUS"
|
"SESSION_ID","SESSION_DATE","TR_ID","AGREEMENT_NUMBER","FIRM_ID","TKR","ACCOUNT","DEPO_ACCOUNT","CASH_LIABILITY","DEPO_LIABILITY","TRADE_NUM","CLASS_CODE","TRADE_DATE","STATUS","REPAYM_DATE"
|
||||||
"7","20.01.1970T07:09:07","222","CONTRACT","TRADING_CODE","TKR","","","8888.89","0","222","3333","20.01.1970T02:49:58","2"
|
"135","20.01.1970T07:09:07","222","CONTRACT","TRADING_CODE","TKR",,,"8888.89","0","222","3333","20.01.1970T02:49:58","2","2000-01-01"
|
||||||
"6","20.01.1970T15:54:43","222","","TRADING_CODE","TKR","","ACCOUNT","-8888.89","123","222","3333","20.01.1970T02:49:58","1"
|
"134","20.01.1970T15:54:43","222",,"TRADING_CODE","TKR",,"ACC_SYMBOL_VALUE","8888.89","-123","222","3333","20.01.1970T02:49:58","2",
|
||||||
"6","20.01.1970T15:54:43","222","","TRADING_CODE","TKR","","ACC_SYMBOL_VALUE","8888.89","-123","222","3333","20.01.1970T02:49:58","2"
|
"134","20.01.1970T15:54:43","222",,"TRADING_CODE","TKR",,"ACCOUNT","-8888.89","123","222","3333","20.01.1970T02:49:58","1",
|
||||||
"6","20.01.1970T15:54:43","222","","TRADING_CODE","TKR","","ACC_SYMBOL_VALUE","-8888.89","123","222","3333","20.01.1970T02:49:58","2"
|
"134","20.01.1970T15:54:43","222",,"TRADING_CODE","TKR",,"ACC_SYMBOL_VALUE","-8888.89","123","222","3333","20.01.1970T02:49:58","2",
|
||||||
|
|
|
||||||
|
Loading…
Add table
Reference in a new issue