diff --git a/clearing-parent/registry-service/src/main/java/ru/spcex/clearing/registry/service/DepoPaymentInstructionRegisterService.java b/clearing-parent/registry-service/src/main/java/ru/spcex/clearing/registry/service/DepoPaymentInstructionRegisterService.java index 0fe340aec..6134606d3 100644 --- a/clearing-parent/registry-service/src/main/java/ru/spcex/clearing/registry/service/DepoPaymentInstructionRegisterService.java +++ b/clearing-parent/registry-service/src/main/java/ru/spcex/clearing/registry/service/DepoPaymentInstructionRegisterService.java @@ -75,8 +75,9 @@ public class DepoPaymentInstructionRegisterService extends QueueConsumer impleme public void depoPaymentInstructionRegisterNew(BaseRequest userRequest) { log.debug("LauncherCommandRequest received from {}", createRegistry_GORR.topic()); - Map piQuery = Map.of("transactionStatus", TransactionStatus.sent.getKey()); - Collection paymentInstructions = paymentInstructionMap.getCollectionObjectsByFieldValues(piQuery); + String piQuery = "transactionStatus='" + TransactionStatus.sent.getKey() + "' OR transactionStatus = '" + + TransactionStatus.ok.getKey() + "' OR transactionStatus = '" + TransactionStatus.ok.getKey() + "'"; + Collection paymentInstructions = paymentInstructionMap.getCollectionObjectsBySQL(piQuery); log.debug("Selected {} PaymentInstruction by query \"{}\", do filter by account...", paymentInstructions.size(), piQuery); Collection depoPaymentInstructions = new ArrayList<>(); diff --git a/clearing-parent/registry-service/src/main/java/ru/spcex/clearing/registry/service/MoneyPaymentInstructionRegisterService.java b/clearing-parent/registry-service/src/main/java/ru/spcex/clearing/registry/service/MoneyPaymentInstructionRegisterService.java index 126cc2d7a..b33bbcb92 100644 --- a/clearing-parent/registry-service/src/main/java/ru/spcex/clearing/registry/service/MoneyPaymentInstructionRegisterService.java +++ b/clearing-parent/registry-service/src/main/java/ru/spcex/clearing/registry/service/MoneyPaymentInstructionRegisterService.java @@ -71,8 +71,9 @@ public class MoneyPaymentInstructionRegisterService extends QueueConsumer implem public void moneyPaymentInstructionRegisterNew(BaseRequest userRequest) { log.debug("LauncherCommandRequest received from {}", TOPIC_NAME); - Map piQuery = Map.of("transactionStatus", TransactionStatus.sent.getKey()); - Collection paymentInstructions = paymentInstructionMap.getCollectionObjectsByFieldValues(piQuery); + String piQuery = "transactionStatus='" + TransactionStatus.sent.getKey() + "' OR transactionStatus = '" + + TransactionStatus.ok.getKey() + "' OR transactionStatus = '" + TransactionStatus.ok.getKey() + "'"; + Collection paymentInstructions = paymentInstructionMap.getCollectionObjectsBySQL(piQuery); log.debug("Selected {} PaymentInstruction by query \"{}\", do filter by account...", paymentInstructions.size(), piQuery); Collection moneyPaymentInstructions = new ArrayList<>(); diff --git a/clearing-parent/registry-service/src/test/java/ru/spcex/clearing/registry/service/DepoPaymentInstructionRegisterServiceTest.java b/clearing-parent/registry-service/src/test/java/ru/spcex/clearing/registry/service/DepoPaymentInstructionRegisterServiceTest.java index 20c39794c..21227154c 100644 --- a/clearing-parent/registry-service/src/test/java/ru/spcex/clearing/registry/service/DepoPaymentInstructionRegisterServiceTest.java +++ b/clearing-parent/registry-service/src/test/java/ru/spcex/clearing/registry/service/DepoPaymentInstructionRegisterServiceTest.java @@ -84,6 +84,7 @@ class DepoPaymentInstructionRegisterServiceTest { // initialing objects for imdg repos } + @Test @Order(1) void executionRegisterNewForClearingDate() { @@ -134,7 +135,7 @@ class DepoPaymentInstructionRegisterServiceTest { //take all values is procceed imdg Collection allValues = depoPaymentInstructionRegisterMap.getAllValues(); - DepoPaymentInstructionRegister depoPaymentInstructionRegister = allValues.iterator().next(); + DepoPaymentInstructionRegister depoPaymentInstructionRegister = allValues.iterator().next(); assertEquals(SESSION_ID, depoPaymentInstructionRegister.getSessionId()); assertEquals(TRADING_CLEARING_REGISTRY_COMPANY_ID, depoPaymentInstructionRegister.getCompanyId()); assertEquals(TRADING_CLEARING_REGISTRY_TYPE, depoPaymentInstructionRegister.getTradingClearingRegistryType());