registry-service http://jira.mfd.msk:8088/browse/CLS-280
This commit is contained in:
parent
f4f313a1ce
commit
e7ac9a8784
4 changed files with 14 additions and 4 deletions
|
|
@ -19,6 +19,7 @@ import ru.spcex.clearing.platform.messaging.domain.cud.schedule.LauncherCommandR
|
|||
import ru.spcex.clearing.platform.messaging.service.QueueConsumer;
|
||||
import ru.spcex.clearing.registry.util.PreClearMap;
|
||||
import ru.spcex.platform.enumeration.AccountType;
|
||||
import ru.spcex.platform.enumeration.TransactionStatus;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
import ru.spcex.platform.utils.validation.IValidator;
|
||||
|
|
@ -74,8 +75,10 @@ public class DepoPaymentInstructionRegisterService extends QueueConsumer impleme
|
|||
public void depoPaymentInstructionRegisterNew(BaseRequest<LauncherCommandRequest> userRequest) {
|
||||
log.debug("LauncherCommandRequest received from {}", createRegistry_GORR.topic());
|
||||
|
||||
Collection<PaymentInstruction> paymentInstructions = paymentInstructionMap.getAllValues();
|
||||
log.debug("Selected {} PaymentInstruction, do filter by account...", paymentInstructions.size());
|
||||
Map<String, String> piQuery = Map.of("transactionStatus", TransactionStatus.sent.getKey());
|
||||
Collection<PaymentInstruction> paymentInstructions = paymentInstructionMap.getCollectionObjectsByFieldValues(piQuery);
|
||||
log.debug("Selected {} PaymentInstruction by query \"{}\", do filter by account...",
|
||||
paymentInstructions.size(), piQuery);
|
||||
Collection<PaymentInstruction> depoPaymentInstructions = new ArrayList<>();
|
||||
for (PaymentInstruction paymentInstruction : paymentInstructions) {
|
||||
// filter by accountType
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import ru.spcex.clearing.platform.messaging.domain.cud.schedule.LauncherCommandR
|
|||
import ru.spcex.clearing.platform.messaging.service.QueueConsumer;
|
||||
import ru.spcex.clearing.registry.util.PreClearMap;
|
||||
import ru.spcex.platform.enumeration.AccountType;
|
||||
import ru.spcex.platform.enumeration.TransactionStatus;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
import ru.spcex.platform.utils.enumeration.IEnumKey;
|
||||
|
|
@ -70,8 +71,10 @@ public class MoneyPaymentInstructionRegisterService extends QueueConsumer implem
|
|||
public void moneyPaymentInstructionRegisterNew(BaseRequest<LauncherCommandRequest> userRequest) {
|
||||
log.debug("LauncherCommandRequest received from {}", TOPIC_NAME);
|
||||
|
||||
Collection<PaymentInstruction> paymentInstructions = paymentInstructionMap.getAllValues();
|
||||
log.debug("Selected {} PaymentInstruction, do filter by account...", paymentInstructions.size());
|
||||
Map<String, String> piQuery = Map.of("transactionStatus", TransactionStatus.sent.getKey());
|
||||
Collection<PaymentInstruction> paymentInstructions = paymentInstructionMap.getCollectionObjectsByFieldValues(piQuery);
|
||||
log.debug("Selected {} PaymentInstruction by query \"{}\", do filter by account...",
|
||||
paymentInstructions.size(), piQuery);
|
||||
Collection<PaymentInstruction> moneyPaymentInstructions = new ArrayList<>();
|
||||
for (PaymentInstruction paymentInstruction : paymentInstructions) {
|
||||
// filter by accountType
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import ru.spcex.clearing.test.config.ImdgTestConfig;
|
|||
import ru.spcex.clearing.test.config.KafkaTestConfig;
|
||||
import ru.spcex.platform.enumeration.AccountType;
|
||||
import ru.spcex.platform.enumeration.Task;
|
||||
import ru.spcex.platform.enumeration.TransactionStatus;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
|
||||
|
|
@ -97,6 +98,7 @@ class DepoPaymentInstructionRegisterServiceTest {
|
|||
paymentInstruction.setSenderId(TRADING_CLEARING_REGISTRY_COMPANY_ID);
|
||||
paymentInstruction.setCreditLeg_direction(SET_CREDIT_LEG_DIRECTION);
|
||||
paymentInstruction.setCreditLeg_amount(SET_CREDIT_LEG_AMOUNT);
|
||||
paymentInstruction.setTransactionStatus(TransactionStatus.sent.getKey());
|
||||
paymentInstructionMap.insert(paymentInstruction);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import ru.spcex.clearing.test.config.ImdgTestConfig;
|
|||
import ru.spcex.clearing.test.config.KafkaTestConfig;
|
||||
import ru.spcex.platform.enumeration.AccountType;
|
||||
import ru.spcex.platform.enumeration.Task;
|
||||
import ru.spcex.platform.enumeration.TransactionStatus;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
|
||||
|
|
@ -93,6 +94,7 @@ class MoneyPaymentInstructionRegisterServiceTest {
|
|||
paymentInstruction.setDebitLeg_account(DEBITLEG_ACCOUNT_CONST);
|
||||
paymentInstruction.setSenderId(companySenderId);
|
||||
paymentInstruction.setAddresseeId(companyAddresseeId);
|
||||
paymentInstruction.setTransactionStatus(TransactionStatus.sent.getKey());
|
||||
paymentInstructionMap.insert(paymentInstruction);
|
||||
Company companySender = new Company();
|
||||
companySender.setId(companySenderId);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue