use of org.mifos.dto.screen.CustomerStatusDetailDto in project head by mifos.
the class CustSearchAction method preview.
@TransactionDemarcate(conditionToken = true)
public ActionForward preview(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
CustSearchActionForm actionForm = (CustSearchActionForm) form;
if (StringUtils.isNotBlank(actionForm.getOfficeId())) {
List<PersonnelBO> personnelList = legacyPersonnelDao.getActiveLoanOfficersUnderOffice(getShortValue(actionForm.getOfficeId()));
SessionUtils.setCollectionAttribute(CustomerSearchConstants.LOANOFFICERSLIST, personnelList, request);
}
UserContext userContext = getUserContext(request);
Short userBranchId = userContext.getBranchId();
String officeName = retrieveOfficeName(actionForm, userBranchId);
SessionUtils.setAttribute(CustomerSearchConstants.OFFICE, officeName, request);
SessionUtils.setAttribute("isCenterHierarchyExists", ClientRules.getCenterHierarchyExists(), request);
SessionUtils.setAttribute(CustomerSearchConstants.LOADFORWARD, CustomerSearchConstants.LOADFORWARDNONLOANOFFICER, request);
HashMap<String, ArrayList<CustomerStatusDetailDto>> customerStates = new HashMap<String, ArrayList<CustomerStatusDetailDto>>();
customerStates.putAll(customerSearchServiceFacade.getAvailibleCustomerStates());
SessionUtils.setMapAttribute("availibleCustomerStates", customerStates, request);
List<ValueListElement> availibleClientGenders = clientServiceFacade.getClientGenders();
SessionUtils.setCollectionAttribute("availibleClientGenders", availibleClientGenders, request);
return mapping.findForward(CustomerSearchConstants.LOADFORWARDNONLOANOFFICER_SUCCESS);
}
use of org.mifos.dto.screen.CustomerStatusDetailDto in project head by mifos.
the class CustSearchAction method get.
@TransactionDemarcate(joinToken = true)
public ActionForward get(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
CustSearchActionForm actionForm = (CustSearchActionForm) form;
boolean isCenterHierarchyExist = ClientRules.getCenterHierarchyExists();
if (StringUtils.isNotBlank(actionForm.getLoanOfficerId())) {
Short loanOfficerId = Short.valueOf(actionForm.getLoanOfficerId());
List<CustomerDetailDto> customerList = this.centerServiceFacade.retrieveCustomersUnderUser(loanOfficerId);
SessionUtils.setCollectionAttribute(CustomerSearchConstants.CUSTOMERLIST, customerList, request);
SessionUtils.setAttribute("GrpHierExists", isCenterHierarchyExist, request);
SessionUtils.setAttribute(CustomerSearchConstants.LOADFORWARD, CustomerSearchConstants.LOADFORWARDLOANOFFICER, request);
}
if (StringUtils.isNotBlank(actionForm.getOfficeId())) {
List<PersonnelBO> personnelList = legacyPersonnelDao.getActiveLoanOfficersUnderOffice(getShortValue(actionForm.getOfficeId()));
SessionUtils.setCollectionAttribute(CustomerSearchConstants.LOANOFFICERSLIST, personnelList, request);
}
UserContext userContext = getUserContext(request);
Short userBranchId = userContext.getBranchId();
String officeName = retrieveOfficeName(actionForm, userBranchId);
SessionUtils.setAttribute("isCenterHierarchyExists", isCenterHierarchyExist, request);
SessionUtils.setAttribute(CustomerSearchConstants.OFFICE, officeName, request);
SessionUtils.setAttribute(CustomerSearchConstants.LOADFORWARD, CustomerSearchConstants.LOADFORWARDNONLOANOFFICER, request);
HashMap<String, ArrayList<CustomerStatusDetailDto>> customerStates = new HashMap<String, ArrayList<CustomerStatusDetailDto>>();
customerStates.putAll(customerSearchServiceFacade.getAvailibleCustomerStates());
SessionUtils.setMapAttribute("availibleCustomerStates", customerStates, request);
List<ValueListElement> availibleClientGenders = clientServiceFacade.getClientGenders();
SessionUtils.setCollectionAttribute("availibleClientGenders", availibleClientGenders, request);
return mapping.findForward(CustomerSearchConstants.LOADFORWARDLOANOFFICER_SUCCESS);
}
use of org.mifos.dto.screen.CustomerStatusDetailDto in project head by mifos.
the class CustSearchAction method getHomePage.
@TransactionDemarcate(saveToken = true)
public ActionForward getHomePage(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
CustSearchActionForm actionForm = (CustSearchActionForm) form;
actionForm.setSearchString(null);
cleanUpSearch(request);
UserContext userContext = getUserContext(request);
UserDetailDto userDetails = this.centerServiceFacade.retrieveUsersDetails(userContext.getId());
SessionUtils.setAttribute("isCenterHierarchyExists", ClientRules.getCenterHierarchyExists(), request);
loadMasterData(userContext.getId(), request, actionForm);
if (userDetails.isLoanOfficer()) {
loadLoanOfficerCustomersHierarchyForSelectedDay(userContext.getId(), request, actionForm);
}
DashboardDto dashboardDto = dashboardServiceFacade.getDashboardDto();
SessionUtils.setAttribute("dashboard", dashboardDto, request);
HashMap<String, ArrayList<CustomerStatusDetailDto>> customerStates = new HashMap<String, ArrayList<CustomerStatusDetailDto>>();
customerStates.putAll(customerSearchServiceFacade.getAvailibleCustomerStates());
SessionUtils.setMapAttribute("availibleCustomerStates", customerStates, request);
List<ValueListElement> availibleClientGenders = clientServiceFacade.getClientGenders();
SessionUtils.setCollectionAttribute("availibleClientGenders", availibleClientGenders, request);
return mapping.findForward(CustomerConstants.GETHOMEPAGE_SUCCESS);
}
use of org.mifos.dto.screen.CustomerStatusDetailDto in project head by mifos.
the class CustSearchAction method loadMainSearch.
@TransactionDemarcate(saveToken = true)
public ActionForward loadMainSearch(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
String forward = null;
CustSearchActionForm actionForm = (CustSearchActionForm) form;
actionForm.setSearchString(null);
actionForm.setOfficeId("0");
cleanUpSearch(request);
UserContext userContext = getUserContext(request);
SessionUtils.setAttribute("isCenterHierarchyExists", ClientRules.getCenterHierarchyExists(), request);
forward = loadMasterData(userContext.getId(), request, actionForm);
HashMap<String, ArrayList<CustomerStatusDetailDto>> customerStates = new HashMap<String, ArrayList<CustomerStatusDetailDto>>();
customerStates.putAll(customerSearchServiceFacade.getAvailibleCustomerStates());
SessionUtils.setMapAttribute("availibleCustomerStates", customerStates, request);
List<ValueListElement> availibleClientGenders = clientServiceFacade.getClientGenders();
SessionUtils.setCollectionAttribute("availibleClientGenders", availibleClientGenders, request);
return mapping.findForward(forward);
}
use of org.mifos.dto.screen.CustomerStatusDetailDto in project head by mifos.
the class EditCustomerStatusAction method previewStatus.
@TransactionDemarcate(joinToken = true)
public ActionForward previewStatus(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
logger.debug("In EditCustomerStatusAction:preview()");
CustomerBO customerBO = (CustomerBO) SessionUtils.getAttribute(Constants.BUSINESS_KEY, request);
EditCustomerStatusActionForm statusActionForm = (EditCustomerStatusActionForm) form;
statusActionForm.setCommentDate(DateUtils.getCurrentDate(getUserContext(request).getPreferredLocale()));
if (StringUtils.isNotBlank(statusActionForm.getNewStatusId())) {
CustomerStatusDetailDto customerStatusDetail = this.centerServiceFacade.retrieveCustomerStatusDetails(statusActionForm.getNewStatusIdValue(), statusActionForm.getFlagIdValue(), customerBO.getLevel().getValue());
SessionUtils.setAttribute(SavingsConstants.NEW_STATUS_NAME, customerStatusDetail.getStatusName(), request);
SessionUtils.setAttribute(SavingsConstants.FLAG_NAME, customerStatusDetail.getFlagName(), request);
} else {
SessionUtils.setAttribute(SavingsConstants.NEW_STATUS_NAME, null, request);
SessionUtils.setAttribute(SavingsConstants.FLAG_NAME, null, request);
}
Short newStatusId = statusActionForm.getNewStatusIdValue();
Short customerLevelId = statusActionForm.getLevelIdValue();
List<CustomerCheckListBO> checklist = new CustomerPersistence().getStatusChecklist(newStatusId, customerLevelId);
SessionUtils.setCollectionAttribute(SavingsConstants.STATUS_CHECK_LIST, checklist, request);
if (statusActionForm.getNewStatusIdValue().equals(CustomerStatus.CLIENT_CLOSED.getValue())) {
return createClientQuestionnaire.fetchAppliedQuestions(mapping, statusActionForm, request, ActionForwards.previewStatus_success);
}
return mapping.findForward(ActionForwards.previewStatus_success.toString());
}
Aggregations