This commit is contained in:
AKurakin 2023-10-13 13:41:13 +03:00
parent e7ac9a8784
commit 39b1b25c80
3 changed files with 8 additions and 5 deletions

View file

@ -75,8 +75,9 @@ public class DepoPaymentInstructionRegisterService extends QueueConsumer impleme
public void depoPaymentInstructionRegisterNew(BaseRequest<LauncherCommandRequest> userRequest) {
log.debug("LauncherCommandRequest received from {}", createRegistry_GORR.topic());
Map<String, String> piQuery = Map.of("transactionStatus", TransactionStatus.sent.getKey());
Collection<PaymentInstruction> paymentInstructions = paymentInstructionMap.getCollectionObjectsByFieldValues(piQuery);
String piQuery = "transactionStatus='" + TransactionStatus.sent.getKey() + "' OR transactionStatus = '" +
TransactionStatus.ok.getKey() + "' OR transactionStatus = '" + TransactionStatus.ok.getKey() + "'";
Collection<PaymentInstruction> paymentInstructions = paymentInstructionMap.getCollectionObjectsBySQL(piQuery);
log.debug("Selected {} PaymentInstruction by query \"{}\", do filter by account...",
paymentInstructions.size(), piQuery);
Collection<PaymentInstruction> depoPaymentInstructions = new ArrayList<>();

View file

@ -71,8 +71,9 @@ public class MoneyPaymentInstructionRegisterService extends QueueConsumer implem
public void moneyPaymentInstructionRegisterNew(BaseRequest<LauncherCommandRequest> userRequest) {
log.debug("LauncherCommandRequest received from {}", TOPIC_NAME);
Map<String, String> piQuery = Map.of("transactionStatus", TransactionStatus.sent.getKey());
Collection<PaymentInstruction> paymentInstructions = paymentInstructionMap.getCollectionObjectsByFieldValues(piQuery);
String piQuery = "transactionStatus='" + TransactionStatus.sent.getKey() + "' OR transactionStatus = '" +
TransactionStatus.ok.getKey() + "' OR transactionStatus = '" + TransactionStatus.ok.getKey() + "'";
Collection<PaymentInstruction> paymentInstructions = paymentInstructionMap.getCollectionObjectsBySQL(piQuery);
log.debug("Selected {} PaymentInstruction by query \"{}\", do filter by account...",
paymentInstructions.size(), piQuery);
Collection<PaymentInstruction> moneyPaymentInstructions = new ArrayList<>();

View file

@ -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<DepoPaymentInstructionRegister> 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());