From dfa51dd7b3053e7a56699274ad8ee46ed56ca6cf Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 14 Sep 2015 17:39:42 +0530 Subject: [PATCH] MIFOSX-1523 Loan Rescheduling --- .../commands/domain/CommandWrapper.java | 12 + .../service/CommandWrapperBuilder.java | 1 - .../RescheduleLoansApiConstants.java | 2 + .../api/RescheduleLoansApiResource.java | 36 +- .../data/LoanRescheduleRequestData.java | 345 +++++++++--------- ...nRescheduleRequestReadPlatformService.java | 60 +-- ...cheduleRequestReadPlatformServiceImpl.java | 20 +- 7 files changed, 268 insertions(+), 208 deletions(-) diff --git a/mifosng-provider/src/main/java/org/mifosplatform/commands/domain/CommandWrapper.java b/mifosng-provider/src/main/java/org/mifosplatform/commands/domain/CommandWrapper.java index c14490d1e..7cb78584f 100755 --- a/mifosng-provider/src/main/java/org/mifosplatform/commands/domain/CommandWrapper.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/commands/domain/CommandWrapper.java @@ -306,5 +306,17 @@ public class CommandWrapper { return this.actionName.equalsIgnoreCase("UPDATE") && this.entityName.equalsIgnoreCase("DISBURSEMENTDETAIL") && this.entityId == null; } + + public boolean isReschedule() { + return this.actionName.equalsIgnoreCase("RESCHEDULE") && this.entityName.equalsIgnoreCase("LOAN"); + } + + public boolean isApproveReschedule() { + return this.actionName.equalsIgnoreCase("APPROVERESCHEDULE") && this.entityName.equalsIgnoreCase("LOAN"); + } + + public boolean isRejectReschedule() { + return this.actionName.equalsIgnoreCase("REJECTRESCHEDULE") && this.entityName.equalsIgnoreCase("LOAN"); + } } \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/commands/service/CommandWrapperBuilder.java b/mifosng-provider/src/main/java/org/mifosplatform/commands/service/CommandWrapperBuilder.java index 02e1e2560..2f62e7c2d 100755 --- a/mifosng-provider/src/main/java/org/mifosplatform/commands/service/CommandWrapperBuilder.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/commands/service/CommandWrapperBuilder.java @@ -2457,5 +2457,4 @@ public class CommandWrapperBuilder { this.href = "/clients/" + clientId + "/transactions/" + transactionId + "?command=undo"; return this; } - } \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/rescheduleloan/RescheduleLoansApiConstants.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/rescheduleloan/RescheduleLoansApiConstants.java index 25f974a6b..e0ca48b39 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/rescheduleloan/RescheduleLoansApiConstants.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/rescheduleloan/RescheduleLoansApiConstants.java @@ -13,6 +13,8 @@ public class RescheduleLoansApiConstants { public final static String ENTITY_NAME = "RESCHEDULELOAN"; + public static final String LOAN_RESCHEDULE_REASON = "LoanRescheduleReason"; + // general public static final String localeParamName = "locale"; public static final String dateFormatParamName = "dateFormat"; diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/rescheduleloan/api/RescheduleLoansApiResource.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/rescheduleloan/api/RescheduleLoansApiResource.java index d9351a5f6..525eecbbd 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/rescheduleloan/api/RescheduleLoansApiResource.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/rescheduleloan/api/RescheduleLoansApiResource.java @@ -69,23 +69,41 @@ public class RescheduleLoansApiResource { } @GET - @Path("{requestId}") + @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String readLoanRescheduleRequest(@Context final UriInfo uriInfo, @PathParam("requestId") final Long requestId, - @QueryParam("command") final String command) { + public String retrieveTemplate(@Context final UriInfo uriInfo, @QueryParam("commandParam") final String commandParam) { + + this.platformSecurityContext.authenticatedUser().validateHasReadPermission(RescheduleLoansApiConstants.ENTITY_NAME); + final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters()); + + LoanRescheduleRequestData loanRescheduleReasons = null; + if (compareIgnoreCase(commandParam, "rescheduleReason")) { + loanRescheduleReasons = this.loanRescheduleRequestReadPlatformService + .retrieveAllRescheduleReasons(RescheduleLoansApiConstants.LOAN_RESCHEDULE_REASON); + } + + return this.loanRescheduleRequestToApiJsonSerializer.serialize(settings, loanRescheduleReasons); + } + + @GET + @Path("{scheduleId}") + @Consumes({ MediaType.APPLICATION_JSON }) + @Produces({ MediaType.APPLICATION_JSON }) + public String readLoanRescheduleRequest(@Context final UriInfo uriInfo, @PathParam("scheduleId") final Long scheduleId, + @QueryParam("commandParam") final String command) { this.platformSecurityContext.authenticatedUser().validateHasReadPermission(RescheduleLoansApiConstants.ENTITY_NAME); final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters()); if (compareIgnoreCase(command, "previewLoanReschedule")) { - final LoanRescheduleModel loanRescheduleModel = this.loanReschedulePreviewPlatformService.previewLoanReschedule(requestId); + final LoanRescheduleModel loanRescheduleModel = this.loanReschedulePreviewPlatformService.previewLoanReschedule(scheduleId); return this.loanRescheduleToApiJsonSerializer.serialize(settings, loanRescheduleModel.toData(), new HashSet()); } final LoanRescheduleRequestData loanRescheduleRequestData = this.loanRescheduleRequestReadPlatformService - .readLoanRescheduleRequest(requestId); + .readLoanRescheduleRequest(scheduleId); return this.loanRescheduleRequestToApiJsonSerializer.serialize(settings, loanRescheduleRequestData); } @@ -103,20 +121,20 @@ public class RescheduleLoansApiResource { } @POST - @Path("{requestId}") + @Path("{scheduleId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateLoanRescheduleRequest(@PathParam("requestId") final Long requestId, @QueryParam("command") final String command, + public String updateLoanRescheduleRequest(@PathParam("scheduleId") final Long scheduleId, @QueryParam("command") final String command, final String apiRequestBodyAsJson) { CommandWrapper commandWrapper = null; if (compareIgnoreCase(command, "approve")) { - commandWrapper = new CommandWrapperBuilder().approveLoanRescheduleRequest(RescheduleLoansApiConstants.ENTITY_NAME, requestId) + commandWrapper = new CommandWrapperBuilder().approveLoanRescheduleRequest(RescheduleLoansApiConstants.ENTITY_NAME, scheduleId) .withJson(apiRequestBodyAsJson).build(); } else if (compareIgnoreCase(command, "reject")) { - commandWrapper = new CommandWrapperBuilder().rejectLoanRescheduleRequest(RescheduleLoansApiConstants.ENTITY_NAME, requestId) + commandWrapper = new CommandWrapperBuilder().rejectLoanRescheduleRequest(RescheduleLoansApiConstants.ENTITY_NAME, scheduleId) .withJson(apiRequestBodyAsJson).build(); } diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestData.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestData.java index e0e4d2eba..679c3e676 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestData.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestData.java @@ -6,197 +6,200 @@ package org.mifosplatform.portfolio.loanaccount.rescheduleloan.data; import java.math.BigDecimal; +import java.util.Collection; import org.joda.time.LocalDate; import org.mifosplatform.infrastructure.codes.data.CodeValueData; -/** - * Immutable data object representing loan reschedule request data. +/** + * Immutable data object representing loan reschedule request data. **/ public class LoanRescheduleRequestData { - - private final Long id; - private final Long loanId; - private final Long clientId; - private final String clientName; - private final String loanAccountNumber; - private final LoanRescheduleRequestStatusEnumData statusEnum; - private final Integer rescheduleFromInstallment; - private final Integer graceOnPrincipal; - private final Integer graceOnInterest; - private final LocalDate rescheduleFromDate; - private final Integer extraTerms; - private final BigDecimal interestRate; - private final Boolean recalculateInterest; - private final CodeValueData rescheduleReasonCodeValue; - private final LoanRescheduleRequestTimelineData timeline; - private final String rescheduleReasonComment; - private final LocalDate adjustedDueDate; - - /** - * LoanRescheduleRequestData constructor - **/ - private LoanRescheduleRequestData(Long id, Long loanId, LoanRescheduleRequestStatusEnumData statusEnum, - Integer rescheduleFromInstallment, Integer graceOnPrincipal, Integer graceOnInterest, - LocalDate rescheduleFromDate, LocalDate adjustedDueDate, Integer extraTerms, BigDecimal interestRate, - CodeValueData rescheduleReasonCodeValue, String rescheduleReasonComment, LoanRescheduleRequestTimelineData timeline, - final String clientName, final String loanAccountNumber, final Long clientId, final Boolean recalculateInterest) { - - this.id = id; - this.loanId = loanId; - this.statusEnum = statusEnum; - this.rescheduleFromInstallment = rescheduleFromInstallment; - this.graceOnPrincipal = graceOnPrincipal; - this.graceOnInterest = graceOnInterest; - this.rescheduleFromDate = rescheduleFromDate; - this.extraTerms = extraTerms; - this.interestRate = interestRate; - this.rescheduleReasonCodeValue = rescheduleReasonCodeValue; - this.rescheduleReasonComment = rescheduleReasonComment; - this.adjustedDueDate = adjustedDueDate; - this.timeline = timeline; - this.clientName = clientName; - this.loanAccountNumber = loanAccountNumber; - this.clientId = clientId; - this.recalculateInterest = recalculateInterest; - } - - /** - * @return an instance of the LoanRescheduleRequestData class - **/ - public static LoanRescheduleRequestData instance(Long id, Long loanId, LoanRescheduleRequestStatusEnumData statusEnum, - Integer rescheduleFromInstallment, Integer graceOnPrincipal, Integer graceOnInterest, - LocalDate rescheduleFromDate, LocalDate adjustedDueDate, Integer extraTerms, BigDecimal interestRate, - CodeValueData rescheduleReasonCodeValue, String rescheduleReasonComment, LoanRescheduleRequestTimelineData timeline, - final String clientName, final String loanAccountNumber, final Long clientId, final Boolean recalculateInterest) { - - return new LoanRescheduleRequestData(id, loanId, statusEnum, rescheduleFromInstallment, graceOnPrincipal, graceOnInterest, - rescheduleFromDate, adjustedDueDate, extraTerms, interestRate, rescheduleReasonCodeValue, rescheduleReasonComment, - timeline, clientName, loanAccountNumber, clientId, recalculateInterest); - } - /** - * @return the id - */ - public Long getId() { - return id; - } + private final Long id; + private final Long loanId; + private final Long clientId; + private final String clientName; + private final String loanAccountNumber; + private final LoanRescheduleRequestStatusEnumData statusEnum; + private final Integer rescheduleFromInstallment; + private final Integer graceOnPrincipal; + private final Integer graceOnInterest; + private final LocalDate rescheduleFromDate; + private final Integer extraTerms; + private final BigDecimal interestRate; + private final Boolean recalculateInterest; + private final CodeValueData rescheduleReasonCodeValue; + private final LoanRescheduleRequestTimelineData timeline; + private final String rescheduleReasonComment; + private final LocalDate adjustedDueDate; + private final Collection rescheduleReasons; + + /** + * LoanRescheduleRequestData constructor + **/ + private LoanRescheduleRequestData(Long id, Long loanId, LoanRescheduleRequestStatusEnumData statusEnum, + Integer rescheduleFromInstallment, Integer graceOnPrincipal, Integer graceOnInterest, LocalDate rescheduleFromDate, + LocalDate adjustedDueDate, Integer extraTerms, BigDecimal interestRate, CodeValueData rescheduleReasonCodeValue, + String rescheduleReasonComment, LoanRescheduleRequestTimelineData timeline, final String clientName, + final String loanAccountNumber, final Long clientId, final Boolean recalculateInterest, Collection rescheduleReasons) { - /** - * @return the loanId - */ - public Long getLoanId() { - return loanId; - } + this.id = id; + this.loanId = loanId; + this.statusEnum = statusEnum; + this.rescheduleFromInstallment = rescheduleFromInstallment; + this.graceOnPrincipal = graceOnPrincipal; + this.graceOnInterest = graceOnInterest; + this.rescheduleFromDate = rescheduleFromDate; + this.extraTerms = extraTerms; + this.interestRate = interestRate; + this.rescheduleReasonCodeValue = rescheduleReasonCodeValue; + this.rescheduleReasonComment = rescheduleReasonComment; + this.adjustedDueDate = adjustedDueDate; + this.timeline = timeline; + this.clientName = clientName; + this.loanAccountNumber = loanAccountNumber; + this.clientId = clientId; + this.recalculateInterest = recalculateInterest; + this.rescheduleReasons = rescheduleReasons ; + } - /** - * @return the statusEnum - */ - public LoanRescheduleRequestStatusEnumData getStatusEnum() { - return statusEnum; - } + /** + * @return an instance of the LoanRescheduleRequestData class + **/ + public static LoanRescheduleRequestData instance(Long id, Long loanId, LoanRescheduleRequestStatusEnumData statusEnum, + Integer rescheduleFromInstallment, Integer graceOnPrincipal, Integer graceOnInterest, LocalDate rescheduleFromDate, + LocalDate adjustedDueDate, Integer extraTerms, BigDecimal interestRate, CodeValueData rescheduleReasonCodeValue, + String rescheduleReasonComment, LoanRescheduleRequestTimelineData timeline, final String clientName, + final String loanAccountNumber, final Long clientId, final Boolean recalculateInterest, Collection rescheduleReasons) { - /** - * @return the reschedule from installment number - */ - public Integer getRescheduleFromInstallment() { - return rescheduleFromInstallment; - } + return new LoanRescheduleRequestData(id, loanId, statusEnum, rescheduleFromInstallment, graceOnPrincipal, graceOnInterest, + rescheduleFromDate, adjustedDueDate, extraTerms, interestRate, rescheduleReasonCodeValue, rescheduleReasonComment, + timeline, clientName, loanAccountNumber, clientId, recalculateInterest, rescheduleReasons); + } - /** - * @return the graceOnPrincipal - */ - public Integer getGraceOnPrincipal() { - return graceOnPrincipal; - } + /** + * @return the id + */ + public Long getId() { + return id; + } - /** - * @return the graceOnInterest - */ - public Integer getGraceOnInterest() { - return graceOnInterest; - } + /** + * @return the loanId + */ + public Long getLoanId() { + return loanId; + } - /** - * @return the reschedule from date - */ - public LocalDate getRescheduleFromDate() { - return rescheduleFromDate; - } + /** + * @return the statusEnum + */ + public LoanRescheduleRequestStatusEnumData getStatusEnum() { + return statusEnum; + } - /** - * @return the extraTerms - */ - public Integer getExtraTerms() { - return extraTerms; - } + /** + * @return the reschedule from installment number + */ + public Integer getRescheduleFromInstallment() { + return rescheduleFromInstallment; + } - /** - * @return the interestRate - */ - public BigDecimal getInterestRate() { - return interestRate; - } + /** + * @return the graceOnPrincipal + */ + public Integer getGraceOnPrincipal() { + return graceOnPrincipal; + } - /** - * @return the rescheduleReasonCodeValueId - */ - public CodeValueData getRescheduleReasonCodeValueId() { - return rescheduleReasonCodeValue; - } + /** + * @return the graceOnInterest + */ + public Integer getGraceOnInterest() { + return graceOnInterest; + } - /** - * @return the rescheduleReasonText - */ - public String getRescheduleReasonComment() { - return rescheduleReasonComment; - } - - /** - * @return the timeline - **/ - public LoanRescheduleRequestTimelineData getTimeline() { - return this.timeline; - } + /** + * @return the reschedule from date + */ + public LocalDate getRescheduleFromDate() { + return rescheduleFromDate; + } - /** - * @return the adjustedDueDate - */ - public LocalDate getAdjustedDueDate() { - return adjustedDueDate; - } + /** + * @return the extraTerms + */ + public Integer getExtraTerms() { + return extraTerms; + } - /** - * @return the clientName - */ - public String getClientName() { - return clientName; - } + /** + * @return the interestRate + */ + public BigDecimal getInterestRate() { + return interestRate; + } - /** - * @return the loanAccountNumber - */ - public String getLoanAccountNumber() { - return loanAccountNumber; - } + /** + * @return the rescheduleReasonCodeValueId + */ + public CodeValueData getRescheduleReasonCodeValueId() { + return rescheduleReasonCodeValue; + } - /** - * @return the clientId - */ - public Long getClientId() { - return clientId; - } + /** + * @return the rescheduleReasonText + */ + public String getRescheduleReasonComment() { + return rescheduleReasonComment; + } - /** - * @return the recalculateInterest - */ - public Boolean getRecalculateInterest() { - boolean value = false; - - if(recalculateInterest != null) { - value = recalculateInterest; - } - - return value; - } + /** + * @return the timeline + **/ + public LoanRescheduleRequestTimelineData getTimeline() { + return this.timeline; + } + + /** + * @return the adjustedDueDate + */ + public LocalDate getAdjustedDueDate() { + return adjustedDueDate; + } + + /** + * @return the clientName + */ + public String getClientName() { + return clientName; + } + + /** + * @return the loanAccountNumber + */ + public String getLoanAccountNumber() { + return loanAccountNumber; + } + + /** + * @return the clientId + */ + public Long getClientId() { + return clientId; + } + + /** + * @return the recalculateInterest + */ + public Boolean getRecalculateInterest() { + boolean value = false; + + if (recalculateInterest != null) { + value = recalculateInterest; + } + + return value; + } } diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestReadPlatformService.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestReadPlatformService.java index bb906196f..d6fecdd50 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestReadPlatformService.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestReadPlatformService.java @@ -10,28 +10,40 @@ import java.util.List; import org.mifosplatform.portfolio.loanaccount.rescheduleloan.data.LoanRescheduleRequestData; public interface LoanRescheduleRequestReadPlatformService { - - /** - * get all loan reschedule requests by loan ID - * - * @param loanId the loan identifier - * @return list of LoanRescheduleRequestData objects - **/ - public List readLoanRescheduleRequests(Long loanId); - - /** - * get a single loan reschedule request by ID (primary key) - * - * @param requestId the loan reschedule request identifier - * @return a LoanRescheduleRequestData object - **/ - public LoanRescheduleRequestData readLoanRescheduleRequest(Long requestId); - - /** - * get all loan reschedule requests filter by loan ID and status enum - * - * @param loanId the loan identifier - * @return list of LoanRescheduleRequestData objects - **/ - public List readLoanRescheduleRequests(Long loanId, Integer statusEnum); + + /** + * get all loan reschedule requests by loan ID + * + * @param loanId + * the loan identifier + * @return list of LoanRescheduleRequestData objects + **/ + public List readLoanRescheduleRequests(Long loanId); + + /** + * get a single loan reschedule request by ID (primary key) + * + * @param requestId + * the loan reschedule request identifier + * @return a LoanRescheduleRequestData object + **/ + public LoanRescheduleRequestData readLoanRescheduleRequest(Long requestId); + + /** + * get all loan reschedule requests filter by loan ID and status enum + * + * @param loanId + * the loan identifier + * @return list of LoanRescheduleRequestData objects + **/ + public List readLoanRescheduleRequests(Long loanId, Integer statusEnum); + + /** + * get all loan reschedule reasons + * + * @param loanRescheduleReason + * the loan reschedule reason + * @return list of LoanRescheduleRequestData objects + **/ + public LoanRescheduleRequestData retrieveAllRescheduleReasons(String loanRescheduleReason); } diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestReadPlatformServiceImpl.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestReadPlatformServiceImpl.java index d8bd859f1..a81b640d5 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestReadPlatformServiceImpl.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestReadPlatformServiceImpl.java @@ -8,10 +8,12 @@ package org.mifosplatform.portfolio.loanaccount.rescheduleloan.service; import java.math.BigDecimal; import java.sql.ResultSet; import java.sql.SQLException; +import java.util.ArrayList; import java.util.List; import org.joda.time.LocalDate; import org.mifosplatform.infrastructure.codes.data.CodeValueData; +import org.mifosplatform.infrastructure.codes.service.CodeValueReadPlatformService; import org.mifosplatform.infrastructure.core.domain.JdbcSupport; import org.mifosplatform.infrastructure.core.service.RoutingDataSource; import org.mifosplatform.portfolio.loanaccount.domain.Loan; @@ -33,12 +35,14 @@ public class LoanRescheduleRequestReadPlatformServiceImpl implements LoanResched private final JdbcTemplate jdbcTemplate; private final LoanRepository loanRepository; private final LoanRescheduleRequestRowMapper loanRescheduleRequestRowMapper = new LoanRescheduleRequestRowMapper(); - + private final CodeValueReadPlatformService codeValueReadPlatformService; + @Autowired public LoanRescheduleRequestReadPlatformServiceImpl(final RoutingDataSource dataSource, - LoanRepository loanRepository) { + LoanRepository loanRepository, final CodeValueReadPlatformService codeValueReadPlatformService) { this.jdbcTemplate = new JdbcTemplate(dataSource); this.loanRepository = loanRepository; + this.codeValueReadPlatformService = codeValueReadPlatformService ; } private static final class LoanRescheduleRequestRowMapper implements RowMapper { @@ -145,7 +149,7 @@ public class LoanRescheduleRequestReadPlatformServiceImpl implements LoanResched return LoanRescheduleRequestData.instance(id, loanId, statusEnum, rescheduleFromInstallment, graceOnPrincipal, graceOnInterest, rescheduleFromDate, adjustedDueDate, extraTerms, interestRate, rescheduleReasonCodeValue, - rescheduleReasonComment, timeline, clientName, loanAccountNumber, clientId, recalculateInterest); + rescheduleReasonComment, timeline, clientName, loanAccountNumber, clientId, recalculateInterest, null); } } @@ -190,4 +194,14 @@ public class LoanRescheduleRequestReadPlatformServiceImpl implements LoanResched return this.jdbcTemplate.query(sql, this.loanRescheduleRequestRowMapper, new Object[] { loanId, statusEnum }); } + + @Override + public LoanRescheduleRequestData retrieveAllRescheduleReasons(String loanRescheduleReason) { + final List rescheduleReasons = new ArrayList<>( + this.codeValueReadPlatformService.retrieveCodeValuesByCode(loanRescheduleReason)); + + return LoanRescheduleRequestData.instance(null, null, null, null, null, null, + null, null, null, null, null, null, + null, null, null, null, null,rescheduleReasons); + } }