http://jira.mfd.msk:8088/browse/CLS-189 fix npe два (но тут еррор добавил
This commit is contained in:
parent
5c74626e76
commit
8a41f93e19
2 changed files with 9 additions and 4 deletions
|
|
@ -181,6 +181,11 @@ public class SdfCreatorBySTLDPayment {
|
|||
ClearingCategory getClearingCategory(PaymentInstruction paymentInstruction) {
|
||||
ClearingMemberCategory category = clearingMemberCategoryImdg.getSingleObjectByFieldValues(
|
||||
Map.of("companyId", paymentInstruction.getSenderId()));
|
||||
if (category == null) {
|
||||
log.error("ClearingMemberCategory not found by paymentInstruction[{}].companyId={}",
|
||||
paymentInstruction.getId(), paymentInstruction.getSenderId());
|
||||
return null;
|
||||
}
|
||||
return IEnumKey.getEnumByKeyOrUndefined(ClearingCategory.class,
|
||||
category.getClearingMemberCategory());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,9 +49,9 @@ public class LiabilitiesClaimsMoneyCreator {
|
|||
lcm.setAccountType(lca.getAccountType());
|
||||
lcm.setAccount(lca.getAccount());
|
||||
if (category.equals(ClearingCategory.I) || category.equals(ClearingCategory.V)) {
|
||||
lcm.setLiabilitiesAmount(lca.getLiabilitiesQuantity());
|
||||
lcm.setLiabilitiesAmount(safeBD(lca.getLiabilitiesQuantity()));
|
||||
} else if (category.equals(ClearingCategory.B)) {
|
||||
lcm.setClaimsAmount(lca.getClaimsQuantity());
|
||||
lcm.setClaimsAmount(safeBD(lca.getClaimsQuantity()));
|
||||
}
|
||||
lcm.setSettlementDate(lca.getSettlementDate());
|
||||
lcm.setTradingDate(lca.getTradingDate());
|
||||
|
|
@ -77,9 +77,9 @@ public class LiabilitiesClaimsMoneyCreator {
|
|||
lcm.setAccountType(lca.getAccountType());
|
||||
lcm.setAccount(lca.getAccount());
|
||||
if (category.equals(ClearingCategory.I) || category.equals(ClearingCategory.V)) {
|
||||
lcm.setClaimsAmount(lca.getClaimsQuantity());
|
||||
lcm.setClaimsAmount(safeBD(lca.getClaimsQuantity()));
|
||||
} else if (category.equals(ClearingCategory.B)) {
|
||||
lcm.setLiabilitiesAmount(lca.getLiabilitiesQuantity());
|
||||
lcm.setLiabilitiesAmount(safeBD(lca.getLiabilitiesQuantity()));
|
||||
}
|
||||
lcm.setSettlementDate(lca.getRefundDate());
|
||||
lcm.setTradingDate(lca.getTradingDate());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue