Search in sources :

Example 6 with DashboardDetailDto

use of org.mifos.dto.domain.DashboardDetailDto in project head by mifos.

the class DashboardServiceFacadeWebTier method clientBOtoDashboardDetailDtos.

private List<DashboardDetailDto> clientBOtoDashboardDetailDtos(List<ClientBO> clientBOList) {
    List<DashboardDetailDto> clientDtoList = new ArrayList<DashboardDetailDto>();
    DashboardDetailDto dto;
    for (ClientBO clientBO : clientBOList) {
        dto = new DashboardDetailDto();
        dto.setGlobalNumber(clientBO.getGlobalCustNum());
        dto.setState(clientBO.getCustomerStatus().getName());
        dto.setLoanOfficer(clientBO.getPersonnel().getDisplayName());
        dto.setUrl("viewClientDetails.ftl?globalCustNum=" + dto.getGlobalNumber());
        dto.setBalance(clientBO.getLoanBalance(Money.getDefaultCurrency()).toString());
        dto.setDisplayName(clientBO.getDisplayName());
        clientDtoList.add(dto);
    }
    return clientDtoList;
}
Also used : DashboardDetailDto(org.mifos.dto.domain.DashboardDetailDto) ClientBO(org.mifos.customers.client.business.ClientBO) ArrayList(java.util.ArrayList)

Example 7 with DashboardDetailDto

use of org.mifos.dto.domain.DashboardDetailDto in project head by mifos.

the class DashboardServiceFacadeWebTier method loanBOtoDashboardDetailDtos.

private List<DashboardDetailDto> loanBOtoDashboardDetailDtos(List<LoanBO> loanBOList) {
    List<DashboardDetailDto> loanDtoList = new ArrayList<DashboardDetailDto>();
    DashboardDetailDto dto;
    for (LoanBO loanBO : loanBOList) {
        dto = new DashboardDetailDto();
        dto.setGlobalNumber(loanBO.getGlobalAccountNum());
        dto.setUrl("viewLoanAccountDetails.ftl?globalAccountNum=" + dto.getGlobalNumber());
        dto.setState(loanBO.getAccountState().getDescription());
        dto.setLoanOfficer(loanBO.getPersonnel().getDisplayName());
        dto.setBalance(loanBO.getLoanSummary().getTotalAmntDue().toString());
        dto.setDisplayName(loanBO.getCustomer().getDisplayName());
        loanDtoList.add(dto);
    }
    return loanDtoList;
}
Also used : DashboardDetailDto(org.mifos.dto.domain.DashboardDetailDto) LoanBO(org.mifos.accounts.loan.business.LoanBO) ArrayList(java.util.ArrayList)

Example 8 with DashboardDetailDto

use of org.mifos.dto.domain.DashboardDetailDto in project head by mifos.

the class DashboardDetailsController method showLoansToBePaidCurrWeek.

@RequestMapping(value = "/viewLoansToBePaidCurrWeekDBDetails", method = RequestMethod.GET)
public ModelAndView showLoansToBePaidCurrWeek(HttpServletRequest request, HttpServletResponse response) {
    ModelAndView modelAndView = getLoanModelAndView();
    List<DashboardDetailDto> loans = (List<DashboardDetailDto>) dashboardServiceFacade.getLoansToBePaidCurrentWeek(0, 10, null);
    modelAndView.addObject("totalSize", dashboardServiceFacade.countLoansToBePaidCurrentWeek());
    modelAndView.addObject("dashboardDetails", loans);
    modelAndView.addObject("ajaxUrl", "loansToBePaidCurrWeekDBDetailsAjax.ftl");
    return modelAndView;
}
Also used : DashboardDetailDto(org.mifos.dto.domain.DashboardDetailDto) ModelAndView(org.springframework.web.servlet.ModelAndView) List(java.util.List) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 9 with DashboardDetailDto

use of org.mifos.dto.domain.DashboardDetailDto in project head by mifos.

the class DashboardDetailsController method showWaitingForApprovalLoansDBDetails.

@RequestMapping(value = "/viewWaitingForApprovalLoansDBDetails", method = RequestMethod.GET)
public ModelAndView showWaitingForApprovalLoansDBDetails(HttpServletRequest request, HttpServletResponse response) {
    ModelAndView modelAndView = getLoanModelAndView();
    List<DashboardDetailDto> loans = (List<DashboardDetailDto>) dashboardServiceFacade.getWaitingForApprovalLoans(0, 10, null);
    modelAndView.addObject("totalSize", dashboardServiceFacade.countLoansWaitingForApproval());
    modelAndView.addObject("dashboardDetails", loans);
    modelAndView.addObject("ajaxUrl", "waitingForApprovalLoansDBDetailsAjax.ftl");
    return modelAndView;
}
Also used : DashboardDetailDto(org.mifos.dto.domain.DashboardDetailDto) ModelAndView(org.springframework.web.servlet.ModelAndView) List(java.util.List) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 10 with DashboardDetailDto

use of org.mifos.dto.domain.DashboardDetailDto in project head by mifos.

the class DashboardDetailsController method showActiveCenters.

@RequestMapping(value = "/viewActiveCentersDBDetails", method = RequestMethod.GET)
public ModelAndView showActiveCenters(HttpServletRequest request, HttpServletResponse response) {
    ModelAndView modelAndView = getCustomerModelAndView();
    List<DashboardDetailDto> loans = (List<DashboardDetailDto>) dashboardServiceFacade.getActiveCenters(0, 10, null);
    modelAndView.addObject("totalSize", dashboardServiceFacade.countOfActiveCenters());
    modelAndView.addObject("dashboardDetails", loans);
    modelAndView.addObject("ajaxUrl", "activeCentersDBDetailsAjax.ftl");
    return modelAndView;
}
Also used : DashboardDetailDto(org.mifos.dto.domain.DashboardDetailDto) ModelAndView(org.springframework.web.servlet.ModelAndView) List(java.util.List) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

DashboardDetailDto (org.mifos.dto.domain.DashboardDetailDto)12 List (java.util.List)8 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)8 ModelAndView (org.springframework.web.servlet.ModelAndView)8 ArrayList (java.util.ArrayList)4 LoanBO (org.mifos.accounts.loan.business.LoanBO)1 CenterBO (org.mifos.customers.center.business.CenterBO)1 ClientBO (org.mifos.customers.client.business.ClientBO)1 GroupBO (org.mifos.customers.group.business.GroupBO)1