clearing-service http://jira.mfd.msk:8088/browse/CLS-265 Sdf08Executor поправил тип счёта-депо
This commit is contained in:
parent
01db30a3bc
commit
c211870d3f
1 changed files with 18 additions and 1 deletions
|
|
@ -183,11 +183,28 @@ public class Sdf08Executor extends AbstractExecutor<SDf08> {
|
|||
return Optional.empty();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param sdf01Id
|
||||
* @param account DepoCode
|
||||
* @param companyId
|
||||
* @return AccountSdfRequestPart
|
||||
*/
|
||||
private AccountSdfRequestPart createAccountRequestPart(Long sdf01Id, String account, Long companyId) {
|
||||
AccountSdfRequestPart req = new AccountSdfRequestPart();
|
||||
req.setAccount(account);
|
||||
req.setCompanyId(companyId);
|
||||
req.setAccountType(AccountType.Clrn.getKey());
|
||||
String accountType = null;
|
||||
if (account != null) {
|
||||
int p = account.indexOf(":");
|
||||
if (p > 3) { // выбрать 3-ю букву, отсчитывая от последнего символа
|
||||
accountType = account.substring(p - 3, p - 2);
|
||||
}
|
||||
}
|
||||
if (accountType == null) {
|
||||
log.warn("Unparseable depoCode of account: \"{}\"", account);
|
||||
}
|
||||
req.setAccountType(accountType);
|
||||
req.setSdfId(sdf01Id);
|
||||
return req;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue