gateway-api http://jira.mfd.msk:8088/browse/CLS-347 bug fix
This commit is contained in:
parent
228b290570
commit
960ed3f0c8
1 changed files with 6 additions and 6 deletions
|
|
@ -78,10 +78,6 @@ public class CompanyRequestAdapter {
|
|||
}
|
||||
|
||||
public ClientCodeNewRequest toClientRequest(Client client) {
|
||||
ClientCodeNewRequest clientCodeNewRequest = new ClientCodeNewRequest();
|
||||
clientCodeNewRequest.setCode(client.getClientCode());
|
||||
clientCodeNewRequest.setMoneyAccountId(client.getMoneyAccountId());
|
||||
clientCodeNewRequest.setDepoAccountId(client.getDepoAccountId());
|
||||
if (client.getMoneyAccount() != null) try {
|
||||
Account mAccount = accountMap.getSingleObjectByFieldValues(Map.of(
|
||||
// "accountType", AccountType.Clrn.getKey(), or "accountType", AccountType.Info.getKey(),
|
||||
|
|
@ -90,7 +86,7 @@ public class CompanyRequestAdapter {
|
|||
if (mAccount == null) {
|
||||
log.warn("Money account \"{}\" not found", client.getMoneyAccount());
|
||||
} else {
|
||||
log.trace("Money account \"{}\" found with id={}", client.getMoneyAccount(), mAccount.getId());
|
||||
log.debug("Money account \"{}\" found with id={}", client.getMoneyAccount(), mAccount.getId());
|
||||
client.setDepoAccountId(mAccount.getId());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
|
@ -104,12 +100,16 @@ public class CompanyRequestAdapter {
|
|||
if (dAccount == null) {
|
||||
log.warn("Depo account \"{}\" not found", client.getDepoAccount());
|
||||
} else {
|
||||
log.trace("Depo account \"{}\" found with id={}", client.getDepoAccount(), dAccount.getId());
|
||||
log.debug("Depo account \"{}\" found with id={}", client.getDepoAccount(), dAccount.getId());
|
||||
client.setDepoAccountId(dAccount.getId());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.warn("Error happened when search depo account \"{}\": {}", client.getMoneyAccount(), ExceptionUtils.getStackTrace(e));
|
||||
}
|
||||
ClientCodeNewRequest clientCodeNewRequest = new ClientCodeNewRequest();
|
||||
clientCodeNewRequest.setCode(client.getClientCode());
|
||||
clientCodeNewRequest.setMoneyAccountId(client.getMoneyAccountId());
|
||||
clientCodeNewRequest.setDepoAccountId(client.getDepoAccountId());
|
||||
return clientCodeNewRequest;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue