account-service заполнение bankAccount.currency

This commit is contained in:
AKurakin 2024-05-14 17:32:42 +03:00
parent 5a158cec1d
commit 1c35dc2881
2 changed files with 5 additions and 0 deletions

View file

@ -109,6 +109,7 @@ public class BankAccountService extends QueueConsumer implements InitializingBea
account.setStatus(req.getStatus()); account.setStatus(req.getStatus());
} }
account.setCompanyId(req.getCompanyId()); account.setCompanyId(req.getCompanyId());
account.setCurrency(req.getCurrency());
account.setCreated(now); account.setCreated(now);
account.setUpdated(now); account.setUpdated(now);
requestInfoUpdate = accountService.fillAccountFromRelation(account, userRequest.getId(), false); requestInfoUpdate = accountService.fillAccountFromRelation(account, userRequest.getId(), false);
@ -178,6 +179,7 @@ public class BankAccountService extends QueueConsumer implements InitializingBea
Account account = accountMap.getSingleObjectByID(bankAccount.getAccountId()); Account account = accountMap.getSingleObjectByID(bankAccount.getAccountId());
account.setAccount(req.account); account.setAccount(req.account);
account.setCurrency(req.getCurrency());
account.setUpdated(Instant.now()); account.setUpdated(Instant.now());
ImdgTransaction imdgTransaction = imdgProvider.newTransaction(); ImdgTransaction imdgTransaction = imdgProvider.newTransaction();

View file

@ -395,6 +395,7 @@ public class BankAccountServiceTest {
account.setAccountType(AccountType.Bank.getKey()); account.setAccountType(AccountType.Bank.getKey());
account.setStatus(Status.Active.getKey()); account.setStatus(Status.Active.getKey());
account.setProcessingSign(Allowed.ALLOWED.getKey()); account.setProcessingSign(Allowed.ALLOWED.getKey());
account.setCurrency(currency);
return account; return account;
} }
@ -418,6 +419,7 @@ public class BankAccountServiceTest {
bankAccount.setDestination(destination); bankAccount.setDestination(destination);
bankAccount.setTaxpayerIdentificationNumber(taxpayerIdentificationNumber); bankAccount.setTaxpayerIdentificationNumber(taxpayerIdentificationNumber);
bankAccount.setTaxRegistrationReasonCode(taxRegistrationReasonCode); bankAccount.setTaxRegistrationReasonCode(taxRegistrationReasonCode);
bankAccount.setCurrency(currency);
bankAccount.setSwiftCode(swiftCode); bankAccount.setSwiftCode(swiftCode);
return bankAccount; return bankAccount;
} }
@ -434,6 +436,7 @@ public class BankAccountServiceTest {
bankAccountNewRequest.setTaxRegistrationReasonCode(bankAccount.getTaxRegistrationReasonCode()); bankAccountNewRequest.setTaxRegistrationReasonCode(bankAccount.getTaxRegistrationReasonCode());
bankAccountNewRequest.setAccount(bankAccount.getAccount()); bankAccountNewRequest.setAccount(bankAccount.getAccount());
bankAccountNewRequest.setCompanyId(bankAccount.getCompanyId()); bankAccountNewRequest.setCompanyId(bankAccount.getCompanyId());
bankAccountNewRequest.setCurrency(bankAccount.getCurrency());
bankAccountNewRequest.setSwiftCode(bankAccount.getSwiftCode()); bankAccountNewRequest.setSwiftCode(bankAccount.getSwiftCode());
return bankAccountNewRequest; return bankAccountNewRequest;
} }