This commit is contained in:
akulikov 2023-12-29 14:47:13 +03:00
parent 256dfafce3
commit ed3c08cdeb
10 changed files with 16 additions and 10 deletions

View file

@ -54,7 +54,7 @@ public class DepoPaymentInstructionRegisterReport implements CSVReport {
@CsvBindByName(column = "Количество ЦБ")
@CsvBindByPosition(position = 10)
@CsvNumber(value = "#0.00", writeFormat = "#0.00")
@CsvNumber(value = "#0", writeFormat = "#0")
private BigDecimal amount;

View file

@ -42,7 +42,7 @@ public class MoneyBalanceRegisterReport implements CSVReport {
@CsvBindByName(column = "Остаток денежных средств")
@CsvBindByPosition(position = 7)
@CsvNumber(value = "#0", writeFormat = "#0")
@CsvNumber(value = "#0.00", writeFormat = "#0.00")
private BigDecimal sum;

View file

@ -26,7 +26,7 @@ public class DepoPaymentInstructionRegisterReportBuilder extends CSVReportBuilde
@Override
protected String reportName() {
return "depo_payment_instruction_register";
return "Реестр распоряжений, направленных расчетному депозитарию";
}
@Override

View file

@ -23,7 +23,7 @@ public class MoneyPaymentInstructionRegisterReportBuilder extends CSVReportBuild
@Override
protected String reportName() {
return "money_payment_instruction_register";
return "Реестр распоряжений, направленных расчетной организации";
}
@Override

View file

@ -31,6 +31,7 @@ import ru.spcex.platform.utils.validation.IValidator;
import java.io.File;
import java.time.Instant;
import java.time.LocalDate;
import java.util.*;
import java.util.function.Function;
@ -115,14 +116,14 @@ public class DepoPaymentInstructionRegisterService extends QueueConsumer impleme
}
}
}
paymentInstructions = null;
log.debug("Filtered {} PaymentInstruction, with depo account's", depoPaymentInstructions.size());
if (!csvMode) preClearMap.preClearMap();
List<PaymentInstruction> paymentInstructionsForReport = new ArrayList<>();
for (PaymentInstruction paymentInstruction : depoPaymentInstructions) {
if (isDuplicateInMap(paymentInstruction).isEmpty()) {
if (!csvMode) insertDepoPaymentInstructionRegister(paymentInstruction);
else paymentInstructionsForReport.add(paymentInstruction);
else if (LocalDate.now().equals(paymentInstruction.getClearingDate()))
paymentInstructionsForReport.add(paymentInstruction);
}
}
if (csvMode) {

View file

@ -31,6 +31,7 @@ import ru.spcex.platform.utils.validation.IValidator;
import java.io.File;
import java.time.Instant;
import java.time.LocalDate;
import java.util.*;
import java.util.function.Function;
@ -111,7 +112,6 @@ public class MoneyPaymentInstructionRegisterService extends QueueConsumer implem
}
}
}
paymentInstructions = null;
log.debug("Filtered {} PaymentInstruction, with money account's", moneyPaymentInstructions.size());
if (!csvMode) preClearMap.preClearMap();
@ -119,7 +119,8 @@ public class MoneyPaymentInstructionRegisterService extends QueueConsumer implem
for (PaymentInstruction paymentInstruction : moneyPaymentInstructions) {
if (isDuplicateInMap(paymentInstruction).isEmpty()) {
if (!csvMode) insertMoneyPaymentInstructionRegister(paymentInstruction);
else paymentInstructionsForReport.add(paymentInstruction);
else if (LocalDate.now().equals(paymentInstruction.getClearingDate()))
paymentInstructionsForReport.add(paymentInstruction);
}
}
if (csvMode) {

View file

@ -35,6 +35,7 @@ import ru.spcex.platform.imdg.api.ImdgProvider;
import java.io.File;
import java.io.IOException;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Arrays;
import java.util.Collection;
@ -105,6 +106,7 @@ class DepoPaymentInstructionRegisterServiceTest implements InitializingBean {
PaymentInstruction paymentInstruction = new PaymentInstruction();
paymentInstruction.setSessionId(SESSION_ID);
paymentInstruction.setClearingDate(LocalDate.now());
paymentInstruction.setCreditLeg_accountId(TRADING_CLEARING_REGISTRY_DEPO_ACCOUNT_ID);
paymentInstruction.setSenderId(TRADING_CLEARING_REGISTRY_COMPANY_ID);
paymentInstruction.setCreditLeg_direction(SET_CREDIT_LEG_DIRECTION);

View file

@ -35,6 +35,7 @@ import java.io.File;
import java.io.IOException;
import java.math.BigDecimal;
import java.time.Instant;
import java.time.LocalDate;
import java.util.Arrays;
import java.util.Collection;
@ -100,6 +101,7 @@ class MoneyPaymentInstructionRegisterServiceTest implements InitializingBean {
sessionMap.update(sessionMkr);
PaymentInstruction paymentInstruction = new PaymentInstruction();
paymentInstruction.setSessionId(sessionId);
paymentInstruction.setClearingDate(LocalDate.now());
paymentInstruction.setCreditLeg_account(CREDITLEG_ACCOUNT_CONST);
paymentInstruction.setCreditLeg_accountId(CREDITLEG_ACCOUNT_ID_CONST);
paymentInstruction.setCreditLeg_amount(CREDITLEG_AMOUNT_CONST);

View file

@ -1,2 +1,2 @@
"Номер распоряжения","Дата распоряжения","Время формирования","Номер торгового банковского/клирингового счета списания","Наименование владельца счета списания","Код владельца счета списания","Номер торгового банковского/клирингового счета зачисления","Наименование владельца счета зачисления","Код владельца счета зачисления","Код ЦБ","Количество ЦБ"
"1",,,,,,,,,,"1.00"
"1","29.12.2023",,,,,,,,,"1.00"

1 Номер распоряжения Дата распоряжения Время формирования Номер торгового банковского/клирингового счета списания Наименование владельца счета списания Код владельца счета списания Номер торгового банковского/клирингового счета зачисления Наименование владельца счета зачисления Код владельца счета зачисления Код ЦБ Количество ЦБ
2 1 29.12.2023 1.00

View file

@ -1,2 +1,2 @@
"Наименование Расчетного депозитария","Номер отчета","Дата","Время","Код валюты","Краткое наименование УК","Номер торгового /клирингового счета/ счета внутреннего учета СПВБ","Остаток денежных средств"
"ANY VALUE","20231229","29.12.2023","10:34:29","RUR",,"CLRN VALUE","123411"
"ANY VALUE","20231229","29.12.2023","14:42:40","RUR",,"CLRN VALUE","123411.00"

1 Наименование Расчетного депозитария Номер отчета Дата Время Код валюты Краткое наименование УК Номер торгового /клирингового счета/ счета внутреннего учета СПВБ Остаток денежных средств
2 ANY VALUE 20231229 29.12.2023 10:34:29 14:42:40 RUR CLRN VALUE 123411 123411.00