http://jira.mfd.msk:8088/browse/CLS-189 fix NPE PaymentInstructionCreator когда payment2.getAddresseeId == null - будет warn. Основная причина: securityId = %s and companyId <> %s

This commit is contained in:
AKurakin 2023-02-06 11:20:37 +03:00
parent 8415cfd243
commit 841ad76fe8

View file

@ -412,6 +412,9 @@ public class PaymentInstructionCreator {
}
protected String selectSymbolValue(Long companyId, CompanySymbol symbol) {
if (companyId == null) {
return null;
}
CompanySymbols cSymbol = companySymbolsImdg.getSingleObjectByFieldValues(Map.of(
"companyId", companyId,
"companySymbol", symbol.getKey()));
@ -423,6 +426,9 @@ public class PaymentInstructionCreator {
}
protected Account selectAccount(Long companyId, AccountType accountType, Status accountStatus, Allowed processingSign) {
if (companyId == null) {
return null;
}
Account account = accountImdg.getSingleObjectByFieldValues(Map.of(
"companyId", companyId,
"accountType", accountType.getKey(),