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) {
|
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 {
|
if (client.getMoneyAccount() != null) try {
|
||||||
Account mAccount = accountMap.getSingleObjectByFieldValues(Map.of(
|
Account mAccount = accountMap.getSingleObjectByFieldValues(Map.of(
|
||||||
// "accountType", AccountType.Clrn.getKey(), or "accountType", AccountType.Info.getKey(),
|
// "accountType", AccountType.Clrn.getKey(), or "accountType", AccountType.Info.getKey(),
|
||||||
|
|
@ -90,7 +86,7 @@ public class CompanyRequestAdapter {
|
||||||
if (mAccount == null) {
|
if (mAccount == null) {
|
||||||
log.warn("Money account \"{}\" not found", client.getMoneyAccount());
|
log.warn("Money account \"{}\" not found", client.getMoneyAccount());
|
||||||
} else {
|
} 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());
|
client.setDepoAccountId(mAccount.getId());
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
@ -104,12 +100,16 @@ public class CompanyRequestAdapter {
|
||||||
if (dAccount == null) {
|
if (dAccount == null) {
|
||||||
log.warn("Depo account \"{}\" not found", client.getDepoAccount());
|
log.warn("Depo account \"{}\" not found", client.getDepoAccount());
|
||||||
} else {
|
} 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());
|
client.setDepoAccountId(dAccount.getId());
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.warn("Error happened when search depo account \"{}\": {}", client.getMoneyAccount(), ExceptionUtils.getStackTrace(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;
|
return clientCodeNewRequest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue