FINERACT-2181: Fix loan transactions filtering by type

This commit is contained in:
mariiaKraievska
2025-03-21 19:40:05 +01:00
committed by Adam Saghy
parent 8462c67f3c
commit 2251ee0da6
@@ -614,8 +614,7 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService, Loa
predicates.add(builder.equal(loanjoin.get("id"), loanId));
if (excludedTransactionTypes != null && !excludedTransactionTypes.isEmpty()) {
final List<Integer> excludedTransactionTypeValues = excludedTransactionTypes.stream()
.map(LoanTransactionType::getValue).toList();
final List<LoanTransactionType> excludedTransactionTypeValues = excludedTransactionTypes.stream().toList();
predicates.add(builder.not(root.get("typeOf").in(excludedTransactionTypeValues)));
}
return builder.and(predicates.toArray(new Predicate[] {}));