MIFOSX-32: start with modifing loan account data returned from get for use in the submit loan application and modify loan application flows.
This commit is contained in:
@@ -103,7 +103,9 @@ public class LoansApiResource {
|
|||||||
@Context final UriInfo uriInfo) {
|
@Context final UriInfo uriInfo) {
|
||||||
|
|
||||||
Set<String> typicalResponseParameters = new HashSet<String>(
|
Set<String> typicalResponseParameters = new HashSet<String>(
|
||||||
Arrays.asList("id", "externalId", "fundId", "fundName", "loanProductId", "loanProductName", "principal", "inArrearsTolerance", "numberOfRepayments",
|
Arrays.asList("id", "externalId", "clientId", "clientName", "fundId", "fundName", "loanProductId", "loanProductName", "loanProductDescription",
|
||||||
|
"currency",
|
||||||
|
"principal", "inArrearsTolerance", "numberOfRepayments",
|
||||||
"repaymentEvery", "interestRatePerPeriod", "annualInterestRate",
|
"repaymentEvery", "interestRatePerPeriod", "annualInterestRate",
|
||||||
"repaymentFrequencyType", "interestRateFrequencyType", "amortizationType", "interestType", "interestCalculationPeriodType",
|
"repaymentFrequencyType", "interestRateFrequencyType", "amortizationType", "interestType", "interestCalculationPeriodType",
|
||||||
"submittedOnDate", "approvedOnDate", "expectedDisbursementDate", "actualDisbursementDate",
|
"submittedOnDate", "approvedOnDate", "expectedDisbursementDate", "actualDisbursementDate",
|
||||||
|
|||||||
+182
-293
@@ -5,61 +5,65 @@ import java.util.Collection;
|
|||||||
|
|
||||||
import org.joda.time.LocalDate;
|
import org.joda.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Immutable data object representing loan account data.
|
||||||
|
*/
|
||||||
public class LoanAccountData {
|
public class LoanAccountData {
|
||||||
|
|
||||||
private Long id;
|
private final Long id;
|
||||||
private String externalId;
|
private final String externalId;
|
||||||
private Long fundId;
|
private final Long clientId;
|
||||||
private String fundName;
|
private final String clientName;
|
||||||
private Long loanProductId;
|
private final Long loanProductId;
|
||||||
private String loanProductName;
|
private final String loanProductName;
|
||||||
|
private final String loanProductDescription;
|
||||||
|
private final Integer lifeCycleStatusId;
|
||||||
|
private final String lifeCycleStatusText;
|
||||||
|
private final LocalDate lifeCycleStatusDate;
|
||||||
|
|
||||||
|
private final Long fundId;
|
||||||
|
private final String fundName;
|
||||||
|
|
||||||
private LocalDate submittedOnDate;
|
private final LocalDate submittedOnDate;
|
||||||
private LocalDate approvedOnDate;
|
private final LocalDate approvedOnDate;
|
||||||
private LocalDate expectedDisbursementDate;
|
private final LocalDate expectedDisbursementDate;
|
||||||
private LocalDate actualDisbursementDate;
|
private final LocalDate actualDisbursementDate;
|
||||||
private LocalDate expectedFirstRepaymentOnDate;
|
private final LocalDate expectedFirstRepaymentOnDate;
|
||||||
private LocalDate interestChargedFromDate;
|
private final LocalDate interestChargedFromDate;
|
||||||
private LocalDate closedOnDate;
|
private final LocalDate closedOnDate;
|
||||||
private LocalDate expectedMaturityDate;
|
private final LocalDate expectedMaturityDate;
|
||||||
|
|
||||||
private MoneyData principal;
|
private final CurrencyData currency;
|
||||||
private MoneyData inArrearsTolerance;
|
private final MoneyData principal;
|
||||||
|
private final MoneyData inArrearsTolerance;
|
||||||
|
|
||||||
private Integer numberOfRepayments;
|
private final Integer numberOfRepayments;
|
||||||
private Integer repaymentEvery;
|
private final Integer repaymentEvery;
|
||||||
private BigDecimal interestRatePerPeriod;
|
private final BigDecimal interestRatePerPeriod;
|
||||||
private BigDecimal annualInterestRate;
|
private final BigDecimal annualInterestRate;
|
||||||
|
|
||||||
private EnumOptionData repaymentFrequencyType;
|
private final EnumOptionData repaymentFrequencyType;
|
||||||
private EnumOptionData interestRateFrequencyType;
|
private final EnumOptionData interestRateFrequencyType;
|
||||||
private EnumOptionData amortizationType;
|
private final EnumOptionData amortizationType;
|
||||||
private EnumOptionData interestType;
|
private final EnumOptionData interestType;
|
||||||
private EnumOptionData interestCalculationPeriodType;
|
private final EnumOptionData interestCalculationPeriodType;
|
||||||
|
|
||||||
private Integer lifeCycleStatusId;
|
private final LoanAccountSummaryData summary;
|
||||||
private String lifeCycleStatusText;
|
private final Collection<LoanRepaymentPeriodData> repaymentSchedule;
|
||||||
private LocalDate lifeCycleStatusDate;
|
private final Collection<LoanRepaymentTransactionData> loanRepayments;
|
||||||
|
|
||||||
private LoanAccountSummaryData summary;
|
private final LoanPermissionData permissions;
|
||||||
private Collection<LoanRepaymentPeriodData> repaymentSchedule;
|
|
||||||
private Collection<LoanRepaymentTransactionData> loanRepayments;
|
|
||||||
|
|
||||||
private LoanPermissionData permissions;
|
private final LoanConvenienceData convenienceData;
|
||||||
|
private Collection<ChargeData> charges;
|
||||||
|
|
||||||
private LoanConvenienceData convenienceData;
|
public LoanAccountData(
|
||||||
|
final LoanBasicDetailsData basicDetails,
|
||||||
private Collection<ChargeData> charges;
|
final LoanAccountSummaryData summary,
|
||||||
|
final Collection<LoanRepaymentPeriodData> repaymentSchedule,
|
||||||
protected LoanAccountData() {
|
final Collection<LoanRepaymentTransactionData> loanRepayments,
|
||||||
//
|
final LoanPermissionData permissions,
|
||||||
}
|
final Collection<ChargeData> charges) {
|
||||||
|
|
||||||
public LoanAccountData(LoanBasicDetailsData basicDetails,
|
|
||||||
LoanAccountSummaryData summary,
|
|
||||||
Collection<LoanRepaymentPeriodData> repaymentSchedule,
|
|
||||||
Collection<LoanRepaymentTransactionData> loanRepayments,
|
|
||||||
LoanPermissionData permissions, Collection<ChargeData> charges) {
|
|
||||||
this.summary = summary;
|
this.summary = summary;
|
||||||
this.repaymentSchedule = repaymentSchedule;
|
this.repaymentSchedule = repaymentSchedule;
|
||||||
this.loanRepayments = loanRepayments;
|
this.loanRepayments = loanRepayments;
|
||||||
@@ -85,10 +89,14 @@ public class LoanAccountData {
|
|||||||
|
|
||||||
this.id = basicDetails.getId();
|
this.id = basicDetails.getId();
|
||||||
this.externalId = basicDetails.getExternalId();
|
this.externalId = basicDetails.getExternalId();
|
||||||
this.fundId = basicDetails.getFundId();
|
this.clientId = basicDetails.getClientId();
|
||||||
this.fundName = basicDetails.getFundName();
|
this.clientName = basicDetails.getClientName();
|
||||||
this.loanProductId = basicDetails.getLoanProductId();
|
this.loanProductId = basicDetails.getLoanProductId();
|
||||||
this.loanProductName = basicDetails.getLoanProductName();
|
this.loanProductName = basicDetails.getLoanProductName();
|
||||||
|
this.loanProductDescription = basicDetails.getLoanProductDescription();
|
||||||
|
this.fundId = basicDetails.getFundId();
|
||||||
|
this.fundName = basicDetails.getFundName();
|
||||||
|
|
||||||
this.submittedOnDate = basicDetails.getSubmittedOnDate();
|
this.submittedOnDate = basicDetails.getSubmittedOnDate();
|
||||||
this.approvedOnDate = basicDetails.getApprovedOnDate();
|
this.approvedOnDate = basicDetails.getApprovedOnDate();
|
||||||
this.expectedDisbursementDate = basicDetails
|
this.expectedDisbursementDate = basicDetails
|
||||||
@@ -100,6 +108,8 @@ public class LoanAccountData {
|
|||||||
.getExpectedFirstRepaymentOnDate();
|
.getExpectedFirstRepaymentOnDate();
|
||||||
this.interestChargedFromDate = basicDetails
|
this.interestChargedFromDate = basicDetails
|
||||||
.getInterestChargedFromDate();
|
.getInterestChargedFromDate();
|
||||||
|
|
||||||
|
this.currency = basicDetails.getCurrency();
|
||||||
this.principal = basicDetails.getPrincipal();
|
this.principal = basicDetails.getPrincipal();
|
||||||
this.inArrearsTolerance = basicDetails.getInArrearsTolerance();
|
this.inArrearsTolerance = basicDetails.getInArrearsTolerance();
|
||||||
this.numberOfRepayments = basicDetails.getNumberOfRepayments();
|
this.numberOfRepayments = basicDetails.getNumberOfRepayments();
|
||||||
@@ -118,277 +128,156 @@ public class LoanAccountData {
|
|||||||
this.lifeCycleStatusDate = basicDetails.getLifeCycleStatusDate();
|
this.lifeCycleStatusDate = basicDetails.getLifeCycleStatusDate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public LoanConvenienceData getConvenienceData() {
|
|
||||||
return convenienceData;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setConvenienceData(LoanConvenienceData convenienceData) {
|
|
||||||
this.convenienceData = convenienceData;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LoanPermissionData getPermissions() {
|
|
||||||
return permissions;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPermissions(LoanPermissionData permissions) {
|
|
||||||
this.permissions = permissions;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LoanAccountSummaryData getSummary() {
|
|
||||||
return summary;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSummary(LoanAccountSummaryData summary) {
|
|
||||||
this.summary = summary;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Collection<LoanRepaymentPeriodData> getRepaymentSchedule() {
|
|
||||||
return repaymentSchedule;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRepaymentSchedule(
|
|
||||||
Collection<LoanRepaymentPeriodData> repaymentSchedule) {
|
|
||||||
this.repaymentSchedule = repaymentSchedule;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Collection<LoanRepaymentTransactionData> getLoanRepayments() {
|
|
||||||
return loanRepayments;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLoanRepayments(
|
|
||||||
Collection<LoanRepaymentTransactionData> loanRepayments) {
|
|
||||||
this.loanRepayments = loanRepayments;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setId(Long id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getExternalId() {
|
public String getExternalId() {
|
||||||
return externalId;
|
return externalId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setExternalId(String externalId) {
|
public Long getClientId() {
|
||||||
this.externalId = externalId;
|
return clientId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLoanProductName() {
|
public String getClientName() {
|
||||||
return loanProductName;
|
return clientName;
|
||||||
}
|
|
||||||
|
|
||||||
public void setLoanProductName(String loanProductName) {
|
|
||||||
this.loanProductName = loanProductName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LocalDate getSubmittedOnDate() {
|
|
||||||
return submittedOnDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSubmittedOnDate(LocalDate submittedOnDate) {
|
|
||||||
this.submittedOnDate = submittedOnDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LocalDate getApprovedOnDate() {
|
|
||||||
return approvedOnDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setApprovedOnDate(LocalDate approvedOnDate) {
|
|
||||||
this.approvedOnDate = approvedOnDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LocalDate getExpectedDisbursementDate() {
|
|
||||||
return expectedDisbursementDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setExpectedDisbursementDate(LocalDate expectedDisbursementDate) {
|
|
||||||
this.expectedDisbursementDate = expectedDisbursementDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LocalDate getActualDisbursementDate() {
|
|
||||||
return actualDisbursementDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setActualDisbursementDate(LocalDate actualDisbursementDate) {
|
|
||||||
this.actualDisbursementDate = actualDisbursementDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LocalDate getExpectedFirstRepaymentOnDate() {
|
|
||||||
return expectedFirstRepaymentOnDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setExpectedFirstRepaymentOnDate(
|
|
||||||
LocalDate expectedFirstRepaymentOnDate) {
|
|
||||||
this.expectedFirstRepaymentOnDate = expectedFirstRepaymentOnDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LocalDate getInterestChargedFromDate() {
|
|
||||||
return interestChargedFromDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInterestChargedFromDate(LocalDate interestChargedFromDate) {
|
|
||||||
this.interestChargedFromDate = interestChargedFromDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LocalDate getClosedOnDate() {
|
|
||||||
return closedOnDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setClosedOnDate(LocalDate closedOnDate) {
|
|
||||||
this.closedOnDate = closedOnDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LocalDate getExpectedMaturityDate() {
|
|
||||||
return expectedMaturityDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setExpectedMaturityDate(LocalDate expectedMaturityDate) {
|
|
||||||
this.expectedMaturityDate = expectedMaturityDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MoneyData getPrincipal() {
|
|
||||||
return principal;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPrincipal(MoneyData principal) {
|
|
||||||
this.principal = principal;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MoneyData getInArrearsTolerance() {
|
|
||||||
return inArrearsTolerance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInArrearsTolerance(MoneyData inArrearsTolerance) {
|
|
||||||
this.inArrearsTolerance = inArrearsTolerance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getNumberOfRepayments() {
|
|
||||||
return numberOfRepayments;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNumberOfRepayments(Integer numberOfRepayments) {
|
|
||||||
this.numberOfRepayments = numberOfRepayments;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getRepaymentEvery() {
|
|
||||||
return repaymentEvery;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRepaymentEvery(Integer repaymentEvery) {
|
|
||||||
this.repaymentEvery = repaymentEvery;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getInterestRatePerPeriod() {
|
|
||||||
return interestRatePerPeriod;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInterestRatePerPeriod(BigDecimal interestRatePerPeriod) {
|
|
||||||
this.interestRatePerPeriod = interestRatePerPeriod;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getAnnualInterestRate() {
|
|
||||||
return annualInterestRate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAnnualInterestRate(BigDecimal annualInterestRate) {
|
|
||||||
this.annualInterestRate = annualInterestRate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public EnumOptionData getRepaymentFrequencyType() {
|
|
||||||
return repaymentFrequencyType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRepaymentFrequencyType(EnumOptionData repaymentFrequencyType) {
|
|
||||||
this.repaymentFrequencyType = repaymentFrequencyType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public EnumOptionData getInterestRateFrequencyType() {
|
|
||||||
return interestRateFrequencyType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInterestRateFrequencyType(
|
|
||||||
EnumOptionData interestRateFrequencyType) {
|
|
||||||
this.interestRateFrequencyType = interestRateFrequencyType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public EnumOptionData getAmortizationType() {
|
|
||||||
return amortizationType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAmortizationType(EnumOptionData amortizationType) {
|
|
||||||
this.amortizationType = amortizationType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public EnumOptionData getInterestType() {
|
|
||||||
return interestType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInterestType(EnumOptionData interestType) {
|
|
||||||
this.interestType = interestType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public EnumOptionData getInterestCalculationPeriodType() {
|
|
||||||
return interestCalculationPeriodType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInterestCalculationPeriodType(
|
|
||||||
EnumOptionData interestCalculationPeriodType) {
|
|
||||||
this.interestCalculationPeriodType = interestCalculationPeriodType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLifeCycleStatusText() {
|
|
||||||
return lifeCycleStatusText;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLifeCycleStatusText(String lifeCycleStatusText) {
|
|
||||||
this.lifeCycleStatusText = lifeCycleStatusText;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LocalDate getLifeCycleStatusDate() {
|
|
||||||
return lifeCycleStatusDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLifeCycleStatusDate(LocalDate lifeCycleStatusDate) {
|
|
||||||
this.lifeCycleStatusDate = lifeCycleStatusDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getFundId() {
|
|
||||||
return fundId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFundId(Long fundId) {
|
|
||||||
this.fundId = fundId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFundName() {
|
|
||||||
return fundName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFundName(String fundName) {
|
|
||||||
this.fundName = fundName;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getLoanProductId() {
|
public Long getLoanProductId() {
|
||||||
return loanProductId;
|
return loanProductId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLoanProductId(Long loanProductId) {
|
public String getLoanProductName() {
|
||||||
this.loanProductId = loanProductId;
|
return loanProductName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLoanProductDescription() {
|
||||||
|
return loanProductDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getFundId() {
|
||||||
|
return fundId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFundName() {
|
||||||
|
return fundName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getSubmittedOnDate() {
|
||||||
|
return submittedOnDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getApprovedOnDate() {
|
||||||
|
return approvedOnDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getExpectedDisbursementDate() {
|
||||||
|
return expectedDisbursementDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getActualDisbursementDate() {
|
||||||
|
return actualDisbursementDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getExpectedFirstRepaymentOnDate() {
|
||||||
|
return expectedFirstRepaymentOnDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getInterestChargedFromDate() {
|
||||||
|
return interestChargedFromDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getClosedOnDate() {
|
||||||
|
return closedOnDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getExpectedMaturityDate() {
|
||||||
|
return expectedMaturityDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CurrencyData getCurrency() {
|
||||||
|
return currency;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MoneyData getPrincipal() {
|
||||||
|
return principal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MoneyData getInArrearsTolerance() {
|
||||||
|
return inArrearsTolerance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNumberOfRepayments() {
|
||||||
|
return numberOfRepayments;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getRepaymentEvery() {
|
||||||
|
return repaymentEvery;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getInterestRatePerPeriod() {
|
||||||
|
return interestRatePerPeriod;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getAnnualInterestRate() {
|
||||||
|
return annualInterestRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnumOptionData getRepaymentFrequencyType() {
|
||||||
|
return repaymentFrequencyType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnumOptionData getInterestRateFrequencyType() {
|
||||||
|
return interestRateFrequencyType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnumOptionData getAmortizationType() {
|
||||||
|
return amortizationType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnumOptionData getInterestType() {
|
||||||
|
return interestType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnumOptionData getInterestCalculationPeriodType() {
|
||||||
|
return interestCalculationPeriodType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getLifeCycleStatusId() {
|
public Integer getLifeCycleStatusId() {
|
||||||
return lifeCycleStatusId;
|
return lifeCycleStatusId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLifeCycleStatusId(Integer lifeCycleStatusId) {
|
public String getLifeCycleStatusText() {
|
||||||
this.lifeCycleStatusId = lifeCycleStatusId;
|
return lifeCycleStatusText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getLifeCycleStatusDate() {
|
||||||
|
return lifeCycleStatusDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LoanAccountSummaryData getSummary() {
|
||||||
|
return summary;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Collection<LoanRepaymentPeriodData> getRepaymentSchedule() {
|
||||||
|
return repaymentSchedule;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Collection<LoanRepaymentTransactionData> getLoanRepayments() {
|
||||||
|
return loanRepayments;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LoanPermissionData getPermissions() {
|
||||||
|
return permissions;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LoanConvenienceData getConvenienceData() {
|
||||||
|
return convenienceData;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Collection<ChargeData> getCharges() {
|
public Collection<ChargeData> getCharges() {
|
||||||
return charges;
|
return this.charges;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCharges(Collection<ChargeData> charges) {
|
public void setCharges(Collection<ChargeData> charges) {
|
||||||
|
|||||||
+163
-244
@@ -9,64 +9,82 @@ import org.joda.time.Months;
|
|||||||
|
|
||||||
public class LoanBasicDetailsData {
|
public class LoanBasicDetailsData {
|
||||||
|
|
||||||
private Long id;
|
private final Long id;
|
||||||
private String externalId;
|
private final String externalId;
|
||||||
private Long fundId;
|
private final Long clientId;
|
||||||
private String fundName;
|
private final String clientName;
|
||||||
private Long loanProductId;
|
private final Long loanProductId;
|
||||||
private String loanProductName;
|
private final String loanProductName;
|
||||||
|
private final String loanProductDescription;
|
||||||
|
private final Long fundId;
|
||||||
|
private final String fundName;
|
||||||
|
|
||||||
|
private final LocalDate submittedOnDate;
|
||||||
|
private final LocalDate approvedOnDate;
|
||||||
|
private final LocalDate expectedDisbursementDate;
|
||||||
|
private final LocalDate actualDisbursementDate;
|
||||||
|
private final LocalDate expectedFirstRepaymentOnDate;
|
||||||
|
private final LocalDate interestChargedFromDate;
|
||||||
|
private final LocalDate closedOnDate;
|
||||||
|
private final LocalDate expectedMaturityDate;
|
||||||
|
|
||||||
private LocalDate submittedOnDate;
|
private final CurrencyData currency;
|
||||||
private LocalDate approvedOnDate;
|
private final MoneyData principal;
|
||||||
private LocalDate expectedDisbursementDate;
|
private final MoneyData inArrearsTolerance;
|
||||||
private LocalDate actualDisbursementDate;
|
|
||||||
private LocalDate expectedFirstRepaymentOnDate;
|
|
||||||
private LocalDate interestChargedFromDate;
|
|
||||||
private LocalDate closedOnDate;
|
|
||||||
private LocalDate expectedMaturityDate;
|
|
||||||
|
|
||||||
private MoneyData principal;
|
private final Integer numberOfRepayments;
|
||||||
private MoneyData inArrearsTolerance;
|
private final Integer repaymentEvery;
|
||||||
|
private final BigDecimal interestRatePerPeriod;
|
||||||
|
private final BigDecimal annualInterestRate;
|
||||||
|
|
||||||
private Integer numberOfRepayments;
|
private final EnumOptionData repaymentFrequencyType;
|
||||||
private Integer repaymentEvery;
|
private final EnumOptionData interestRateFrequencyType;
|
||||||
private BigDecimal interestRatePerPeriod;
|
private final EnumOptionData amortizationType;
|
||||||
private BigDecimal annualInterestRate;
|
private final EnumOptionData interestType;
|
||||||
|
private final EnumOptionData interestCalculationPeriodType;
|
||||||
|
|
||||||
private EnumOptionData repaymentFrequencyType;
|
private final Integer lifeCycleStatusId;
|
||||||
private EnumOptionData interestRateFrequencyType;
|
private final String lifeCycleStatusText;
|
||||||
private EnumOptionData amortizationType;
|
private final LocalDate lifeCycleStatusDate;
|
||||||
private EnumOptionData interestType;
|
|
||||||
private EnumOptionData interestCalculationPeriodType;
|
|
||||||
|
|
||||||
private Integer lifeCycleStatusId;
|
public LoanBasicDetailsData(
|
||||||
private String lifeCycleStatusText;
|
final Long id,
|
||||||
private LocalDate lifeCycleStatusDate;
|
final String externalId,
|
||||||
|
final Long clientId, final String clientName,
|
||||||
protected LoanBasicDetailsData() {
|
final Long loanProductId,
|
||||||
//
|
final String loanProductName,
|
||||||
}
|
final String loanProductDescription,
|
||||||
|
final Long fundId, String fundName,
|
||||||
public LoanBasicDetailsData(Long id, String externalId, Long loanProductId,
|
final LocalDate closedOnDate,
|
||||||
String loanProductName, Long fundId, String fundName,
|
final LocalDate submittedOnDate,
|
||||||
LocalDate closedOnDate, LocalDate submittedOnDate,
|
final LocalDate approvedOnDate,
|
||||||
LocalDate approvedOnDate, LocalDate expectedDisbursementDate,
|
final LocalDate expectedDisbursementDate,
|
||||||
LocalDate actualDisbursementDate, LocalDate expectedMaturityDate,
|
final LocalDate actualDisbursementDate,
|
||||||
LocalDate expectedFirstRepaymentOnDate,
|
final LocalDate expectedMaturityDate,
|
||||||
LocalDate interestChargedFromDate, MoneyData principal,
|
final LocalDate expectedFirstRepaymentOnDate,
|
||||||
MoneyData inArrearsTolerance, Integer numberOfRepayments,
|
final LocalDate interestChargedFromDate,
|
||||||
Integer repaymentEvery, BigDecimal interestRatePerPeriod,
|
final CurrencyData currency,
|
||||||
BigDecimal annualInterestRate,
|
final MoneyData principal,
|
||||||
EnumOptionData repaymentFrequencyType,
|
final MoneyData inArrearsTolerance,
|
||||||
EnumOptionData interestRateFrequencyType,
|
final Integer numberOfRepayments,
|
||||||
EnumOptionData amortizationType, EnumOptionData interestType,
|
final Integer repaymentEvery,
|
||||||
EnumOptionData interestCalculationPeriodType,
|
final BigDecimal interestRatePerPeriod,
|
||||||
Integer lifeCycleStatusId, String lifeCycleStatusText,
|
final BigDecimal annualInterestRate,
|
||||||
LocalDate lifeCycleStatusDate) {
|
final EnumOptionData repaymentFrequencyType,
|
||||||
|
final EnumOptionData interestRateFrequencyType,
|
||||||
|
final EnumOptionData amortizationType,
|
||||||
|
final EnumOptionData interestType,
|
||||||
|
final EnumOptionData interestCalculationPeriodType,
|
||||||
|
final Integer lifeCycleStatusId,
|
||||||
|
final String lifeCycleStatusText,
|
||||||
|
final LocalDate lifeCycleStatusDate) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.externalId = externalId;
|
this.externalId = externalId;
|
||||||
|
this.clientId = clientId;
|
||||||
|
this.clientName = clientName;
|
||||||
this.loanProductId = loanProductId;
|
this.loanProductId = loanProductId;
|
||||||
this.loanProductName = loanProductName;
|
this.loanProductName = loanProductName;
|
||||||
|
this.loanProductDescription = loanProductDescription;
|
||||||
this.fundId = fundId;
|
this.fundId = fundId;
|
||||||
this.fundName = fundName;
|
this.fundName = fundName;
|
||||||
this.closedOnDate = closedOnDate;
|
this.closedOnDate = closedOnDate;
|
||||||
@@ -77,6 +95,7 @@ public class LoanBasicDetailsData {
|
|||||||
this.expectedMaturityDate = expectedMaturityDate;
|
this.expectedMaturityDate = expectedMaturityDate;
|
||||||
this.expectedFirstRepaymentOnDate = expectedFirstRepaymentOnDate;
|
this.expectedFirstRepaymentOnDate = expectedFirstRepaymentOnDate;
|
||||||
this.interestChargedFromDate = interestChargedFromDate;
|
this.interestChargedFromDate = interestChargedFromDate;
|
||||||
|
this.currency = currency;
|
||||||
this.principal = principal;
|
this.principal = principal;
|
||||||
this.inArrearsTolerance = inArrearsTolerance;
|
this.inArrearsTolerance = inArrearsTolerance;
|
||||||
this.numberOfRepayments = numberOfRepayments;
|
this.numberOfRepayments = numberOfRepayments;
|
||||||
@@ -186,227 +205,127 @@ public class LoanBasicDetailsData {
|
|||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setId(Long id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getExternalId() {
|
public String getExternalId() {
|
||||||
return externalId;
|
return externalId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setExternalId(String externalId) {
|
public Long getClientId() {
|
||||||
this.externalId = externalId;
|
return clientId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLoanProductName() {
|
public String getClientName() {
|
||||||
return loanProductName;
|
return clientName;
|
||||||
}
|
|
||||||
|
|
||||||
public void setLoanProductName(String loanProductName) {
|
|
||||||
this.loanProductName = loanProductName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LocalDate getSubmittedOnDate() {
|
|
||||||
return submittedOnDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSubmittedOnDate(LocalDate submittedOnDate) {
|
|
||||||
this.submittedOnDate = submittedOnDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LocalDate getApprovedOnDate() {
|
|
||||||
return approvedOnDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setApprovedOnDate(LocalDate approvedOnDate) {
|
|
||||||
this.approvedOnDate = approvedOnDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LocalDate getExpectedDisbursementDate() {
|
|
||||||
return expectedDisbursementDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setExpectedDisbursementDate(LocalDate expectedDisbursementDate) {
|
|
||||||
this.expectedDisbursementDate = expectedDisbursementDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LocalDate getActualDisbursementDate() {
|
|
||||||
return actualDisbursementDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setActualDisbursementDate(LocalDate actualDisbursementDate) {
|
|
||||||
this.actualDisbursementDate = actualDisbursementDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LocalDate getExpectedFirstRepaymentOnDate() {
|
|
||||||
return expectedFirstRepaymentOnDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setExpectedFirstRepaymentOnDate(
|
|
||||||
LocalDate expectedFirstRepaymentOnDate) {
|
|
||||||
this.expectedFirstRepaymentOnDate = expectedFirstRepaymentOnDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LocalDate getInterestChargedFromDate() {
|
|
||||||
return interestChargedFromDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInterestChargedFromDate(LocalDate interestChargedFromDate) {
|
|
||||||
this.interestChargedFromDate = interestChargedFromDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LocalDate getClosedOnDate() {
|
|
||||||
return closedOnDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setClosedOnDate(LocalDate closedOnDate) {
|
|
||||||
this.closedOnDate = closedOnDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LocalDate getExpectedMaturityDate() {
|
|
||||||
return expectedMaturityDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setExpectedMaturityDate(LocalDate expectedMaturityDate) {
|
|
||||||
this.expectedMaturityDate = expectedMaturityDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MoneyData getPrincipal() {
|
|
||||||
return principal;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPrincipal(MoneyData principal) {
|
|
||||||
this.principal = principal;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MoneyData getInArrearsTolerance() {
|
|
||||||
return inArrearsTolerance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInArrearsTolerance(MoneyData inArrearsTolerance) {
|
|
||||||
this.inArrearsTolerance = inArrearsTolerance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getNumberOfRepayments() {
|
|
||||||
return numberOfRepayments;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNumberOfRepayments(Integer numberOfRepayments) {
|
|
||||||
this.numberOfRepayments = numberOfRepayments;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getRepaymentEvery() {
|
|
||||||
return repaymentEvery;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRepaymentEvery(Integer repaymentEvery) {
|
|
||||||
this.repaymentEvery = repaymentEvery;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getInterestRatePerPeriod() {
|
|
||||||
return interestRatePerPeriod;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInterestRatePerPeriod(BigDecimal interestRatePerPeriod) {
|
|
||||||
this.interestRatePerPeriod = interestRatePerPeriod;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getAnnualInterestRate() {
|
|
||||||
return annualInterestRate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAnnualInterestRate(BigDecimal annualInterestRate) {
|
|
||||||
this.annualInterestRate = annualInterestRate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public EnumOptionData getRepaymentFrequencyType() {
|
|
||||||
return repaymentFrequencyType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRepaymentFrequencyType(EnumOptionData repaymentFrequencyType) {
|
|
||||||
this.repaymentFrequencyType = repaymentFrequencyType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public EnumOptionData getInterestRateFrequencyType() {
|
|
||||||
return interestRateFrequencyType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInterestRateFrequencyType(
|
|
||||||
EnumOptionData interestRateFrequencyType) {
|
|
||||||
this.interestRateFrequencyType = interestRateFrequencyType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public EnumOptionData getAmortizationType() {
|
|
||||||
return amortizationType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAmortizationType(EnumOptionData amortizationType) {
|
|
||||||
this.amortizationType = amortizationType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public EnumOptionData getInterestType() {
|
|
||||||
return interestType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInterestType(EnumOptionData interestType) {
|
|
||||||
this.interestType = interestType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public EnumOptionData getInterestCalculationPeriodType() {
|
|
||||||
return interestCalculationPeriodType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInterestCalculationPeriodType(
|
|
||||||
EnumOptionData interestCalculationPeriodType) {
|
|
||||||
this.interestCalculationPeriodType = interestCalculationPeriodType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLifeCycleStatusText() {
|
|
||||||
return lifeCycleStatusText;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLifeCycleStatusText(String lifeCycleStatusText) {
|
|
||||||
this.lifeCycleStatusText = lifeCycleStatusText;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LocalDate getLifeCycleStatusDate() {
|
|
||||||
return lifeCycleStatusDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLifeCycleStatusDate(LocalDate lifeCycleStatusDate) {
|
|
||||||
this.lifeCycleStatusDate = lifeCycleStatusDate;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getFundId() {
|
public Long getFundId() {
|
||||||
return fundId;
|
return fundId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFundId(Long fundId) {
|
|
||||||
this.fundId = fundId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFundName() {
|
public String getFundName() {
|
||||||
return fundName;
|
return fundName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFundName(String fundName) {
|
|
||||||
this.fundName = fundName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getLoanProductId() {
|
public Long getLoanProductId() {
|
||||||
return loanProductId;
|
return loanProductId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLoanProductId(Long loanProductId) {
|
public String getLoanProductName() {
|
||||||
this.loanProductId = loanProductId;
|
return loanProductName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLoanProductDescription() {
|
||||||
|
return loanProductDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getSubmittedOnDate() {
|
||||||
|
return submittedOnDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getApprovedOnDate() {
|
||||||
|
return approvedOnDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getExpectedDisbursementDate() {
|
||||||
|
return expectedDisbursementDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getActualDisbursementDate() {
|
||||||
|
return actualDisbursementDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getExpectedFirstRepaymentOnDate() {
|
||||||
|
return expectedFirstRepaymentOnDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getInterestChargedFromDate() {
|
||||||
|
return interestChargedFromDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getClosedOnDate() {
|
||||||
|
return closedOnDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getExpectedMaturityDate() {
|
||||||
|
return expectedMaturityDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CurrencyData getCurrency() {
|
||||||
|
return currency;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MoneyData getPrincipal() {
|
||||||
|
return principal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MoneyData getInArrearsTolerance() {
|
||||||
|
return inArrearsTolerance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNumberOfRepayments() {
|
||||||
|
return numberOfRepayments;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getRepaymentEvery() {
|
||||||
|
return repaymentEvery;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getInterestRatePerPeriod() {
|
||||||
|
return interestRatePerPeriod;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getAnnualInterestRate() {
|
||||||
|
return annualInterestRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnumOptionData getRepaymentFrequencyType() {
|
||||||
|
return repaymentFrequencyType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnumOptionData getInterestRateFrequencyType() {
|
||||||
|
return interestRateFrequencyType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnumOptionData getAmortizationType() {
|
||||||
|
return amortizationType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnumOptionData getInterestType() {
|
||||||
|
return interestType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnumOptionData getInterestCalculationPeriodType() {
|
||||||
|
return interestCalculationPeriodType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getLifeCycleStatusId() {
|
public Integer getLifeCycleStatusId() {
|
||||||
return lifeCycleStatusId;
|
return lifeCycleStatusId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLifeCycleStatusId(Integer lifeCycleStatusId) {
|
public String getLifeCycleStatusText() {
|
||||||
this.lifeCycleStatusId = lifeCycleStatusId;
|
return lifeCycleStatusText;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LocalDate getLifeCycleStatusDate() {
|
||||||
|
return lifeCycleStatusDate;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+3
-2
@@ -139,8 +139,9 @@ public class GoogleGsonApiJsonSerializerService implements
|
|||||||
"allowedProducts"));
|
"allowedProducts"));
|
||||||
|
|
||||||
private static final Set<String> LOAN_DATA_PARAMETERS = new HashSet<String>(
|
private static final Set<String> LOAN_DATA_PARAMETERS = new HashSet<String>(
|
||||||
Arrays.asList("id", "externalId", "fundId", "fundName",
|
Arrays.asList("id", "externalId", "clientId", "clientName", "fundId", "fundName",
|
||||||
"loanProductId", "loanProductName", "principal",
|
"loanProductId", "loanProductName", "loanProductDescription",
|
||||||
|
"currency", "principal",
|
||||||
"inArrearsTolerance", "numberOfRepayments",
|
"inArrearsTolerance", "numberOfRepayments",
|
||||||
"repaymentEvery", "interestRatePerPeriod",
|
"repaymentEvery", "interestRatePerPeriod",
|
||||||
"annualInterestRate", "repaymentFrequencyType",
|
"annualInterestRate", "repaymentFrequencyType",
|
||||||
|
|||||||
+14
-7
@@ -413,7 +413,9 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
|
|||||||
RowMapper<LoanBasicDetailsData> {
|
RowMapper<LoanBasicDetailsData> {
|
||||||
|
|
||||||
public String loanSchema() {
|
public String loanSchema() {
|
||||||
return "l.id as id, l.external_id as externalId, l.fund_id as fundId, f.name as fundName, lp.id as loanProductId, lp.name as loanProductName, l.submittedon_date as submittedOnDate,"
|
return "l.id as id, l.external_id as externalId, l.fund_id as fundId, f.name as fundName, "
|
||||||
|
+ " lp.id as loanProductId, lp.name as loanProductName, lp.description as loanProductDescription, c.id as clientId, c.display_name as clientName, "
|
||||||
|
+ " l.submittedon_date as submittedOnDate,"
|
||||||
+ " l.approvedon_date as approvedOnDate, l.expected_disbursedon_date as expectedDisbursementDate, l.disbursedon_date as actualDisbursementDate, l.expected_firstrepaymenton_date as expectedFirstRepaymentOnDate,"
|
+ " l.approvedon_date as approvedOnDate, l.expected_disbursedon_date as expectedDisbursementDate, l.disbursedon_date as actualDisbursementDate, l.expected_firstrepaymenton_date as expectedFirstRepaymentOnDate,"
|
||||||
+ " l.interest_calculated_from_date as interestChargedFromDate, l.closedon_date as closedOnDate, l.expected_maturedon_date as expectedMaturityDate, "
|
+ " l.interest_calculated_from_date as interestChargedFromDate, l.closedon_date as closedOnDate, l.expected_maturedon_date as expectedMaturityDate, "
|
||||||
+ " l.principal_amount as principal, l.arrearstolerance_amount as inArrearsTolerance, l.number_of_repayments as numberOfRepayments, l.repay_every as repaymentEvery,"
|
+ " l.principal_amount as principal, l.arrearstolerance_amount as inArrearsTolerance, l.number_of_repayments as numberOfRepayments, l.repay_every as repaymentEvery,"
|
||||||
@@ -423,6 +425,7 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
|
|||||||
+ " l.loan_status_id as lifeCycleStatusId, "
|
+ " l.loan_status_id as lifeCycleStatusId, "
|
||||||
+ " l.currency_code as currencyCode, l.currency_digits as currencyDigits, rc.`name` as currencyName, rc.display_symbol as currencyDisplaySymbol, rc.internationalized_name_code as currencyNameCode"
|
+ " l.currency_code as currencyCode, l.currency_digits as currencyDigits, rc.`name` as currencyName, rc.display_symbol as currencyDisplaySymbol, rc.internationalized_name_code as currencyNameCode"
|
||||||
+ " from m_loan l"
|
+ " from m_loan l"
|
||||||
|
+ " join m_client c on c.id = l.client_id"
|
||||||
+ " join m_product_loan lp on lp.id = l.product_id"
|
+ " join m_product_loan lp on lp.id = l.product_id"
|
||||||
+ " join m_currency rc on rc.`code` = l.currency_code"
|
+ " join m_currency rc on rc.`code` = l.currency_code"
|
||||||
+ " left join m_fund f on f.id = l.fund_id";
|
+ " left join m_fund f on f.id = l.fund_id";
|
||||||
@@ -435,20 +438,22 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
|
|||||||
String currencyCode = rs.getString("currencyCode");
|
String currencyCode = rs.getString("currencyCode");
|
||||||
String currencyName = rs.getString("currencyName");
|
String currencyName = rs.getString("currencyName");
|
||||||
String currencyNameCode = rs.getString("currencyNameCode");
|
String currencyNameCode = rs.getString("currencyNameCode");
|
||||||
String currencyDisplaySymbol = rs
|
String currencyDisplaySymbol = rs.getString("currencyDisplaySymbol");
|
||||||
.getString("currencyDisplaySymbol");
|
Integer currencyDigits = JdbcSupport.getInteger(rs,"currencyDigits");
|
||||||
Integer currencyDigits = JdbcSupport.getInteger(rs,
|
|
||||||
"currencyDigits");
|
|
||||||
CurrencyData currencyData = new CurrencyData(currencyCode,
|
CurrencyData currencyData = new CurrencyData(currencyCode,
|
||||||
currencyName, currencyDigits, currencyDisplaySymbol,
|
currencyName, currencyDigits, currencyDisplaySymbol,
|
||||||
currencyNameCode);
|
currencyNameCode);
|
||||||
|
|
||||||
Long id = rs.getLong("id");
|
Long id = rs.getLong("id");
|
||||||
String externalId = rs.getString("externalId");
|
String externalId = rs.getString("externalId");
|
||||||
|
Long clientId = JdbcSupport.getLong(rs, "clientId");
|
||||||
|
String clientName = rs.getString("clientName");
|
||||||
Long fundId = JdbcSupport.getLong(rs, "fundId");
|
Long fundId = JdbcSupport.getLong(rs, "fundId");
|
||||||
String fundName = rs.getString("fundName");
|
String fundName = rs.getString("fundName");
|
||||||
Long loanProductId = JdbcSupport.getLong(rs, "loanProductId");
|
Long loanProductId = JdbcSupport.getLong(rs, "loanProductId");
|
||||||
String loanProductName = rs.getString("loanProductName");
|
String loanProductName = rs.getString("loanProductName");
|
||||||
|
String loanProductDescription = rs.getString("loanProductDescription");
|
||||||
|
|
||||||
LocalDate submittedOnDate = JdbcSupport.getLocalDate(rs,
|
LocalDate submittedOnDate = JdbcSupport.getLocalDate(rs,
|
||||||
"submittedOnDate");
|
"submittedOnDate");
|
||||||
LocalDate approvedOnDate = JdbcSupport.getLocalDate(rs,
|
LocalDate approvedOnDate = JdbcSupport.getLocalDate(rs,
|
||||||
@@ -516,11 +521,13 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
|
|||||||
lifeCycleStatusDate = closedOnDate;
|
lifeCycleStatusDate = closedOnDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
return new LoanBasicDetailsData(id, externalId, loanProductId,
|
return new LoanBasicDetailsData(id, externalId, clientId, clientName,
|
||||||
loanProductName, fundId, fundName, closedOnDate,
|
loanProductId, loanProductName, loanProductDescription,
|
||||||
|
fundId, fundName, closedOnDate,
|
||||||
submittedOnDate, approvedOnDate, expectedDisbursementDate,
|
submittedOnDate, approvedOnDate, expectedDisbursementDate,
|
||||||
actualDisbursementDate, expectedMaturityDate,
|
actualDisbursementDate, expectedMaturityDate,
|
||||||
expectedFirstRepaymentOnDate, interestChargedFromDate,
|
expectedFirstRepaymentOnDate, interestChargedFromDate,
|
||||||
|
currencyData,
|
||||||
principal, inArrearsTolerance, numberOfRepayments,
|
principal, inArrearsTolerance, numberOfRepayments,
|
||||||
repaymentEvery, interestRatePerPeriod, annualInterestRate,
|
repaymentEvery, interestRatePerPeriod, annualInterestRate,
|
||||||
repaymentFrequencyType, interestRateFrequencyType,
|
repaymentFrequencyType, interestRateFrequencyType,
|
||||||
|
|||||||
Reference in New Issue
Block a user