get collection instead first object
This commit is contained in:
parent
c12066d554
commit
00c83393d9
1 changed files with 10 additions and 3 deletions
|
|
@ -274,10 +274,17 @@ public class PaymentInstructionBuilderV2 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean categoryIOrVInitiator(Long companyId) {
|
public boolean categoryIOrVInitiator(Long companyId) {
|
||||||
ClearingMemberCategory category = clearingCategoryImdg.getFirstObjectByFieldValues(
|
Collection<ClearingMemberCategory> categories = clearingCategoryImdg.getCollectionObjectsByFieldValues(
|
||||||
Map.of("companyId", companyId));
|
Map.of("companyId", companyId));
|
||||||
ClearingCategory ctg = IEnumKey.getEnumByKey(ClearingCategory.class, category.getClearingMemberCategory());
|
boolean result = false;
|
||||||
return ctg != null && (ctg.equals(ClearingCategory.V) || ctg.equals(ClearingCategory.I)) ;
|
for (ClearingMemberCategory category : categories) {
|
||||||
|
log.debug("Found category.clearingMemberCategory: {} by companyId: {}",
|
||||||
|
category.getClearingMemberCategory(),
|
||||||
|
companyId);
|
||||||
|
ClearingCategory ctg = IEnumKey.getEnumByKey(ClearingCategory.class, category.getClearingMemberCategory());
|
||||||
|
result = result | ctg != null && (ctg.equals(ClearingCategory.V) || ctg.equals(ClearingCategory.I));
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean companyRoleODEPPresent(Long companyId) {
|
public boolean companyRoleODEPPresent(Long companyId) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue