account service bug fix
This commit is contained in:
parent
115fcc1aac
commit
868540ffa3
2 changed files with 5 additions and 5 deletions
|
|
@ -169,7 +169,7 @@ public class AccountService extends QueueConsumer implements InitializingBean {
|
||||||
specialAnltAccId = anltAccount.getAccount().substring(anltAccount.getAccount().length() - 4);
|
specialAnltAccId = anltAccount.getAccount().substring(anltAccount.getAccount().length() - 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
Long infoSequenceId = informationAccountService.accountNextId(currencyCode, currencyCodeId, specialAnltAccId);
|
Long infoSequenceId = informationAccountService.accountNextId(currencyCode, currencyCodeId);
|
||||||
String accountValue = informationAccountService.generateInfoAccount(currencyCodeId, infoSequenceId, specialAnltAccId);
|
String accountValue = informationAccountService.generateInfoAccount(currencyCodeId, infoSequenceId, specialAnltAccId);
|
||||||
log.trace("New info-account SequenceId={} account={}", infoSequenceId, accountValue);
|
log.trace("New info-account SequenceId={} account={}", infoSequenceId, accountValue);
|
||||||
account.setAccount(accountValue);
|
account.setAccount(accountValue);
|
||||||
|
|
|
||||||
|
|
@ -237,7 +237,7 @@ public class InformationAccountService extends QueueConsumer implements Initiali
|
||||||
specialAnltAccId = anltAccount.getAccount().substring(anltAccount.getAccount().length() - 4);
|
specialAnltAccId = anltAccount.getAccount().substring(anltAccount.getAccount().length() - 4);
|
||||||
}
|
}
|
||||||
Long newId = informationAccountImdg.nextIDSequenceFor();
|
Long newId = informationAccountImdg.nextIDSequenceFor();
|
||||||
Long infoSequenceId = accountNextId(currency, 810L, "7000"); // требуется последовательность n+1
|
Long infoSequenceId = accountNextId(currency, 810L); // требуется последовательность n+1
|
||||||
String accountValue = generateInfoAccount(810L, infoSequenceId, specialAnltAccId);
|
String accountValue = generateInfoAccount(810L, infoSequenceId, specialAnltAccId);
|
||||||
log.trace("New info-account id={}, sequenceId={}, account={}", newId, infoSequenceId, accountValue);
|
log.trace("New info-account id={}, sequenceId={}, account={}", newId, infoSequenceId, accountValue);
|
||||||
|
|
||||||
|
|
@ -309,7 +309,7 @@ public class InformationAccountService extends QueueConsumer implements Initiali
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized Long accountNextId(String currency) {
|
public synchronized Long accountNextId(String currency) {
|
||||||
return accountNextId(currency, 810L, "7000");
|
return accountNextId(currency, 810L);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -318,7 +318,7 @@ public class InformationAccountService extends QueueConsumer implements Initiali
|
||||||
* @param
|
* @param
|
||||||
* @return infoCounter++
|
* @return infoCounter++
|
||||||
*/
|
*/
|
||||||
public synchronized Long accountNextId(String currency, Long currencyCodeId, String specialAnltAccId) {
|
public synchronized Long accountNextId(String currency, Long currencyCodeId) {
|
||||||
String idWithTrailingZero = String.format("%03d", currencyCodeId);
|
String idWithTrailingZero = String.format("%03d", currencyCodeId);
|
||||||
if (currency == null)
|
if (currency == null)
|
||||||
currency = CurrencyCode.RUB.getKey(); // default
|
currency = CurrencyCode.RUB.getKey(); // default
|
||||||
|
|
@ -342,7 +342,7 @@ public class InformationAccountService extends QueueConsumer implements Initiali
|
||||||
infoCounter = new AtomicLong(1);
|
infoCounter = new AtomicLong(1);
|
||||||
log.debug("No account information on map. n={}", infoCounter.get());
|
log.debug("No account information on map. n={}", infoCounter.get());
|
||||||
} else {
|
} else {
|
||||||
Pattern accPattern = Pattern.compile(("39911%s([0-9]{8})" + specialAnltAccId).formatted(idWithTrailingZero));
|
Pattern accPattern = Pattern.compile("39911%s([0-9]{8})\\d".formatted(idWithTrailingZero));
|
||||||
int maxN = 1;
|
int maxN = 1;
|
||||||
int parsedCount = 0;
|
int parsedCount = 0;
|
||||||
String lastAccount = null; // for debug
|
String lastAccount = null; // for debug
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue