clearing-service account-service правки создания ClearingAccount
This commit is contained in:
parent
f5a7842ab1
commit
768ba7c47f
2 changed files with 5 additions and 9 deletions
|
|
@ -233,13 +233,9 @@ public class ClearingAccountService extends QueueConsumer implements Initializin
|
|||
clearingAccountId = clearingAccountImdg.insert(clearingAccount);
|
||||
log.trace("New account {}, clearingAccount {} was created.", accountId, clearingAccountId);
|
||||
|
||||
{ //todo как правильно заполнить реквест?
|
||||
{
|
||||
TradingClearingRegistryNewRequest request = new TradingClearingRegistryNewRequest();
|
||||
if (AccountType.Depo.equalsByKey(clearingAccount.getClearingAccountType())) {
|
||||
request.setDepoAccountId(accountId);
|
||||
} else {
|
||||
request.setMoneyAccountId(accountId);
|
||||
}
|
||||
request.setMoneyAccountId(accountId);
|
||||
request.setCompanyId(clearingAccount.getCompanyId());
|
||||
toTCRRequests.add(request);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ public class Sdf01Executor extends AbstractExecutor<SDf01> {
|
|||
//на данном шаге company существует -> getId ok
|
||||
//формируем пакетный запрос на добавление account
|
||||
//ответ придет в этот же метод, process
|
||||
result.getAccountRequests().add(createAccountRequestPart(sdf01.getId(), sdf01.getAccount(), company.getId()));
|
||||
result.getAccountRequests().add(createAccountRequestPart(sdf01.getId(), sdf01.getAccount(), sdf01.getAcc_type(), company.getId()));
|
||||
log.info("account {} for sdf01.id={} not found - send request for creation", sdf01.getAccount(), sdf01.getId());
|
||||
continue;
|
||||
} else if (ClearingErrorInternal.AccountNotPresent.equals(error.map(EnumMessage::getSubject).orElse(null))) {
|
||||
|
|
@ -182,11 +182,11 @@ public class Sdf01Executor extends AbstractExecutor<SDf01> {
|
|||
return stmt;
|
||||
}
|
||||
|
||||
private AccountSdfRequestPart createAccountRequestPart(Long sdf01Id, String account, Long companyId) {
|
||||
private AccountSdfRequestPart createAccountRequestPart(Long sdf01Id, String account, String accountType, Long companyId) {
|
||||
AccountSdfRequestPart req = new AccountSdfRequestPart();
|
||||
req.setAccount(account);
|
||||
req.setCompanyId(companyId);
|
||||
req.setAccountType(AccountType.Clrn.getKey());
|
||||
req.setAccountType(accountType);
|
||||
req.setSdfId(sdf01Id);
|
||||
return req;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue