diff --git a/clearing-parent/registry-service/src/main/java/ru/spcex/clearing/registry/service/ExecutionRegisterService.java b/clearing-parent/registry-service/src/main/java/ru/spcex/clearing/registry/service/ExecutionRegisterService.java index 81081d5c3..ffbe1d220 100644 --- a/clearing-parent/registry-service/src/main/java/ru/spcex/clearing/registry/service/ExecutionRegisterService.java +++ b/clearing-parent/registry-service/src/main/java/ru/spcex/clearing/registry/service/ExecutionRegisterService.java @@ -113,7 +113,8 @@ public class ExecutionRegisterService extends QueueConsumer implements Initializ String sellerTradingClearingRegister = null; String sellerMoneyAccount = null; String sellerDepoAccount = null; - Long buyerId = common.getCompanyId(); + Long buyerId = common.getSide().equalsIgnoreCase("BUY") ? common.getCompanyId() : common.getCounterPartyId(); + Long sellerId = common.getSide().equalsIgnoreCase("BUY") ? common.getCounterPartyId() : common.getCompanyId(); String buyerClearingCode = null; String buyerTradingClearingRegister = null; String buyerMoneyAccount = null; @@ -180,7 +181,7 @@ public class ExecutionRegisterService extends QueueConsumer implements Initializ executionRegister.setExchangeExecutionId(common.getExchangeExecutionId()); executionRegister.setExchangeExecutionTime(common.getExchangeExecutionTime()); executionRegister.setSecurityId(common.getSecurityId()); - executionRegister.setSellerId(common.getCompanyId()); + executionRegister.setSellerId(sellerId); executionRegister.setSellerClearingCode(sellerClearingCode); executionRegister.setSellerTradingClearingRegister(sellerTradingClearingRegister); executionRegister.setSellerMoneyAccount(sellerMoneyAccount);