@CloseSession @TransactionDemarcate(validateAndResetToken = true) public ActionForward removeGroupMemberShip( ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception { GroupTransferActionForm actionForm = (GroupTransferActionForm) form; CustomerBO customerBOInSession = (CustomerBO) SessionUtils.getAttribute(Constants.BUSINESS_KEY, request); ClientBO client = this.customerDao.findClientBySystemId(customerBOInSession.getGlobalCustNum()); checkVersionMismatch(customerBOInSession.getVersionNo(), client.getVersionNo()); Short loanOfficerId = null; if (StringUtils.isNotBlank(actionForm.getAssignedLoanOfficerId())) { loanOfficerId = Short.valueOf(actionForm.getAssignedLoanOfficerId()); } this.clientServiceFacade.removeGroupMembership( customerBOInSession.getGlobalCustNum(), loanOfficerId, actionForm.getComment()); return mapping.findForward(ActionForwards.view_client_details_page.toString()); }
@TransactionDemarcate(validateAndResetToken = true) @CloseSession public ActionForward transferToBranch( ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception { GroupTransferActionForm actionForm = (GroupTransferActionForm) form; GroupBO groupInSession = (GroupBO) SessionUtils.getAttribute(Constants.BUSINESS_KEY, request); CustomerDetailDto groupDetail = this.groupServiceFacade.transferGroupToBranch( groupInSession.getGlobalCustNum(), actionForm.getOfficeIdValue(), groupInSession.getVersionNo()); GroupBO group = this.customerDao.findGroupBySystemId(groupDetail.getGlobalCustNum()); SessionUtils.setAttribute(Constants.BUSINESS_KEY, group, request); return mapping.findForward(ActionForwards.update_success.toString()); }
@TransactionDemarcate(joinToken = true) public ActionForward loadGrpMemberShip( ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception { GroupTransferActionForm actionForm = (GroupTransferActionForm) form; actionForm.setComment(null); ClientBO clientInSession = (ClientBO) SessionUtils.getAttribute(Constants.BUSINESS_KEY, request); ClientRemovalFromGroupDto clientRemovalFromGroupDetail = this.clientServiceFacade.retreiveClientDetailsForRemovalFromGroup( clientInSession.getGlobalCustNum()); actionForm.setAssignedLoanOfficerId(clientRemovalFromGroupDetail.getLoanOfficerId().toString()); actionForm.setIsActive(clientRemovalFromGroupDetail.isActive() ? Constants.YES : Constants.NO); ClientBO client = this.customerDao.findClientBySystemId(clientInSession.getGlobalCustNum()); SessionUtils.removeAttribute(Constants.BUSINESS_KEY, request); SessionUtils.setAttribute(Constants.BUSINESS_KEY, client, request); SessionUtils.setCollectionAttribute( OfficeConstants.OFFICESBRANCHOFFICESLIST, clientRemovalFromGroupDetail.getActiveBranches(), request); SessionUtils.setAttribute( CollectionSheetEntryConstants.ISCENTERHIERARCHYEXISTS, clientRemovalFromGroupDetail.isCenterHierarchyExists() ? Constants.YES : Constants.NO, request); SessionUtils.setCollectionAttribute( CustomerConstants.LOAN_OFFICER_LIST, clientRemovalFromGroupDetail.getLoanOfficers(), request); return mapping.findForward(ActionForwards.loadGrpMemberShip_success.toString()); }