/** * 查看客户经理评估信息(自己及下属的) * * @param request * @return */ @ResponseBody @RequestMapping( value = "browse.page", method = {RequestMethod.GET}) @JRadOperation(JRadOperation.BROWSE) public AbstractModelAndView displayOrganization( @ModelAttribute ManagerAssessmentScoreFilter filter, HttpServletRequest request) { filter.setRequest(request); List<String> subManagerIds = new ArrayList<String>(); IUser user = Beans.get(LoginManager.class).getLoggedInUser(request); subManagerIds.add(user.getId()); List<AccountManagerParameterForm> managerParameterForms = managerBelongMapService.findSubListManagerByManagerId(user.getId()); for (AccountManagerParameterForm managerParameterForm : managerParameterForms) { subManagerIds.add(managerParameterForm.getUserId()); } filter.setSubManagerIds(subManagerIds); QueryResult<TyManagerAssessment> result = managerAssessmentScoreService.findManagerAssessmentScoreByFilter(filter); JRadPagedQueryResult<TyManagerAssessment> pagedResult = new JRadPagedQueryResult<TyManagerAssessment>(filter, result); JRadModelAndView mv = new JRadModelAndView("/manager/assessmentscore/ty_assessmentscore_record_browse", request); mv.addObject(PAGED_RESULT, pagedResult); return mv; }
/** * 保存页面 * * @param request * @return */ @ResponseBody @RequestMapping(value = "save.json") @JRadOperation(JRadOperation.DISPLAY) public JRadReturnMap save(HttpServletRequest request) { JRadReturnMap returnMap = new JRadReturnMap(); try { managerAssessmentScoreService.saveAssessmentScore(request); returnMap.addGlobalMessage(CHANGE_SUCCESS); return returnMap; } catch (Exception e) { return WebRequestHelper.processException(e); } }
/** * 显示页面 * * @param request * @return */ @ResponseBody @RequestMapping(value = "display.page") @JRadOperation(JRadOperation.DISPLAY) public AbstractModelAndView display(HttpServletRequest request) { JRadModelAndView mv = new JRadModelAndView("/manager/assessmentscore/ty_assessment_change", request); String id = RequestHelper.getStringValue(request, ID); IUser user = Beans.get(LoginManager.class).getLoggedInUser(request); if (StringUtils.isNotEmpty(id)) { TyManagerAssessment managerAssessmentScoreForm = managerAssessmentScoreService.findManagerAssessmentScoreById(id); if (managerAssessmentScoreForm.getCreateUser() == null) { managerAssessmentScoreForm.setCreateUser(user.getDisplayName()); } mv.addObject("assessmentScoreForm", managerAssessmentScoreForm); } return mv; }