Search in sources :

Example 1 with DashboardDetailDto

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

the class DashboardServiceFacadeWebTier method centerBOtoDashboardDetailDtos.

private List<DashboardDetailDto> centerBOtoDashboardDetailDtos(List<CenterBO> centerBOList) {
    List<DashboardDetailDto> groupDtoList = new ArrayList<DashboardDetailDto>();
    DashboardDetailDto dto;
    for (CenterBO centerBO : centerBOList) {
        dto = new DashboardDetailDto();
        dto.setGlobalNumber(centerBO.getGlobalCustNum());
        dto.setState(centerBO.getCustomerStatus().getName());
        dto.setUrl("viewCenterDetails.ftl?globalCustNum=" + dto.getGlobalNumber());
        dto.setLoanOfficer(centerBO.getPersonnel().getDisplayName());
        dto.setBalance(centerBO.getLoanBalance(Money.getDefaultCurrency()).toString());
        dto.setDisplayName(centerBO.getDisplayName());
        groupDtoList.add(dto);
    }
    return groupDtoList;
}
Also used : DashboardDetailDto(org.mifos.dto.domain.DashboardDetailDto) ArrayList(java.util.ArrayList) CenterBO(org.mifos.customers.center.business.CenterBO)

Example 2 with DashboardDetailDto

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

the class DashboardDetailsController method showBadStandingLoansDBDetails.

@RequestMapping(value = "/viewBadStandingLoansDBDetails", method = RequestMethod.GET)
public ModelAndView showBadStandingLoansDBDetails(HttpServletRequest request, HttpServletResponse response) {
    ModelAndView modelAndView = getLoanModelAndView();
    List<DashboardDetailDto> loans = (List<DashboardDetailDto>) dashboardServiceFacade.getLoansInArrears(0, 10, null);
    modelAndView.addObject("totalSize", dashboardServiceFacade.countBadStandingLoans());
    modelAndView.addObject("dashboardDetails", loans);
    modelAndView.addObject("ajaxUrl", "badStandingLoansDBDetailsAjax.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 3 with DashboardDetailDto

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

the class DashboardDetailsController method showActiveGroups.

@RequestMapping(value = "/viewActiveGroupsDBDetails", method = RequestMethod.GET)
public ModelAndView showActiveGroups(HttpServletRequest request, HttpServletResponse response) {
    ModelAndView modelAndView = getCustomerModelAndView();
    List<DashboardDetailDto> loans = (List<DashboardDetailDto>) dashboardServiceFacade.getActiveGroups(0, 10, null);
    modelAndView.addObject("totalSize", dashboardServiceFacade.countOfActiveGroups());
    modelAndView.addObject("dashboardDetails", loans);
    modelAndView.addObject("ajaxUrl", "activeGroupsDBDetailsAjax.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 4 with DashboardDetailDto

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

the class DashboardDetailsController method showTotalBorowers.

@RequestMapping(value = "/viewTotalBorrowersDBDetails", method = RequestMethod.GET)
public ModelAndView showTotalBorowers(HttpServletRequest request, HttpServletResponse response) {
    ModelAndView modelAndView = getCustomerModelAndView();
    List<DashboardDetailDto> loans = (List<DashboardDetailDto>) dashboardServiceFacade.getBorrowers(0, 10, null);
    modelAndView.addObject("totalSize", dashboardServiceFacade.countBorrowers());
    modelAndView.addObject("dashboardDetails", loans);
    modelAndView.addObject("ajaxUrl", "totalBorrowersDBDetailsAjax.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 5 with DashboardDetailDto

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

the class DashboardServiceFacadeWebTier method groupBOtoDashboardDetailDtos.

private List<DashboardDetailDto> groupBOtoDashboardDetailDtos(List<GroupBO> groupBOList) {
    List<DashboardDetailDto> groupDtoList = new ArrayList<DashboardDetailDto>();
    DashboardDetailDto dto;
    for (GroupBO groupBO : groupBOList) {
        dto = new DashboardDetailDto();
        dto.setGlobalNumber(groupBO.getGlobalCustNum());
        dto.setState(groupBO.getCustomerStatus().getName());
        dto.setUrl("viewGroupDetails.ftl?globalCustNum=" + dto.getGlobalNumber());
        dto.setLoanOfficer(groupBO.getPersonnel().getDisplayName());
        dto.setBalance(groupBO.getLoanBalance(Money.getDefaultCurrency()).toString());
        dto.setDisplayName(groupBO.getDisplayName());
        groupDtoList.add(dto);
    }
    return groupDtoList;
}
Also used : DashboardDetailDto(org.mifos.dto.domain.DashboardDetailDto) ArrayList(java.util.ArrayList) GroupBO(org.mifos.customers.group.business.GroupBO)

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