/** * 到竞赛页面 * * @param request * @param competionId * @return */ @RequestMapping("/totcompetion") public ModelAndView totcompetion(HttpServletRequest request, int competionId) { ModelAndView view = new ModelAndView(); Competion competion = competionService.get(competionId); view.addObject("competion", competion); // 竞赛裁判 List<UserCompetion> uclist = usercompetionService.getCompetionjudgment(competionId); for (UserCompetion uc : uclist) { User user = userService.getUserById(uc.getUserId()); uc.setUser(user); } view.addObject("judgmentlist", uclist); // Exam course = examService.get(examId); // view.addObject("exam", course); // 竞赛试卷 List<CompetionExam> celist = competionService.getCompetionExam(competionId); for (CompetionExam ce : celist) { TeacherExam te = teacherExamService.getTeacherExamByExamId(ce.getExam().getId()); ce.setExamuser(userService.getUserById(te.getUserId()).getUsername()); if (ce.getSelectexam() == 1) { view.addObject("sexam", ce); } } view.addObject("celist", celist); // 竞赛学生 List<UserCompetionData> ucslist = usercompetionService.getCompetionStudentData(competionId); view.addObject("studentlist", ucslist); view.setViewName("/cms/competion"); return view; }