FINERACT-1724: Loans API get loan details/delinquent data wrong
This commit is contained in:
committed by
Adam Saghy
parent
36c5d103d7
commit
b40e700cc6
+3
-8
@@ -844,7 +844,9 @@ public class LoansApiResource {
|
|||||||
Collection<LoanCollateralResponseData> loanCollateralManagements;
|
Collection<LoanCollateralResponseData> loanCollateralManagements;
|
||||||
Collection<LoanCollateralManagementData> loanCollateralManagementData = new ArrayList<>();
|
Collection<LoanCollateralManagementData> loanCollateralManagementData = new ArrayList<>();
|
||||||
CollectionData collectionData = CollectionData.template();
|
CollectionData collectionData = CollectionData.template();
|
||||||
|
if (loanBasicDetails.isActive()) {
|
||||||
|
collectionData = this.delinquencyReadPlatformService.calculateLoanCollectionData(resolvedLoanId);
|
||||||
|
}
|
||||||
final Set<String> mandatoryResponseParameters = new HashSet<>();
|
final Set<String> mandatoryResponseParameters = new HashSet<>();
|
||||||
final Set<String> associationParameters = ApiParameterHelper.extractAssociationsForResponseIfProvided(uriInfo.getQueryParameters());
|
final Set<String> associationParameters = ApiParameterHelper.extractAssociationsForResponseIfProvided(uriInfo.getQueryParameters());
|
||||||
final Collection<LoanTransactionData> currentLoanRepayments = this.loanReadPlatformService.retrieveLoanTransactions(resolvedLoanId);
|
final Collection<LoanTransactionData> currentLoanRepayments = this.loanReadPlatformService.retrieveLoanTransactions(resolvedLoanId);
|
||||||
@@ -948,13 +950,6 @@ public class LoansApiResource {
|
|||||||
mandatoryResponseParameters.add(DataTableApiConstant.linkedAccountAssociateParamName);
|
mandatoryResponseParameters.add(DataTableApiConstant.linkedAccountAssociateParamName);
|
||||||
linkedAccount = this.accountAssociationsReadPlatformService.retriveLoanLinkedAssociation(resolvedLoanId);
|
linkedAccount = this.accountAssociationsReadPlatformService.retriveLoanLinkedAssociation(resolvedLoanId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (associationParameters.contains(DataTableApiConstant.collectionAssociateParamName)) {
|
|
||||||
mandatoryResponseParameters.add(DataTableApiConstant.collectionAssociateParamName);
|
|
||||||
if (loanBasicDetails.isActive()) {
|
|
||||||
collectionData = this.delinquencyReadPlatformService.calculateLoanCollectionData(resolvedLoanId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Collection<LoanProductData> productOptions = null;
|
Collection<LoanProductData> productOptions = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user