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 e1113ab5d..6b705b6da 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 @@ -59,10 +59,8 @@ public class MoneyPaymentInstructionRegisterService extends QueueConsumer implem Collection paymentInstructionBySessionId = paymentInstructionMap.getCollectionObjectsByFieldValues(fieldValuesSessionId); for (PaymentInstruction paymentInstruction : paymentInstructionBySessionId) { - MoneyPaymentInstructionRegister moneyPaymentInstructionRegister = moneyPaymentInstructionRegisterMap.getSingleObjectByFieldValues(Map.of( - "companyId", paymentInstruction.getSenderId(), - "sessionId", paymentInstruction.getSessionId()) - ); + Map> fieldValuesCompanyIdSessionId = getFieldValuesOrThrowException(Map.of("companyId", paymentInstruction.getSenderId(), "sessionId", paymentInstruction.getSessionId())); + MoneyPaymentInstructionRegister moneyPaymentInstructionRegister = moneyPaymentInstructionRegisterMap.getSingleObjectByFieldValues(fieldValuesCompanyIdSessionId); if (moneyPaymentInstructionRegister == null) { insertMoneyPaymentInstructionRegister(paymentInstruction); }