/** * 下载报名学生名单 * * @param actId * @param response * @return */ @RequestMapping("/downloadApplyStudents") public void downloadApplyStudents(Integer actId, HttpServletResponse response) { List<String> titles = Arrays.asList("序号", "学号", "姓名", "联系方式", "学院", "专业"); List<StudentDto> dtos = studentService.getAllStudentByActivityId(actId); ExcelUtil.downloadApplyStudents(dtos, titles, response); }
/** * 学院添加学生请求 * * @param student * @return */ @RequestMapping(value = "/admin/addStudent", method = RequestMethod.POST) @ResponseBody public String addStudent(Student student, HttpSession session) { College college = (College) session.getAttribute("user"); student.setCollege(college); return studentService.register(student); }
/** * 查看学生信息 * * @param stuId * @return */ @RequestMapping("/admin/student/{year}/{stuNum}") public String student( @PathVariable("year") String year, @PathVariable("stuNum") String stuNum, Model model) { Student student = studentService.getInfo(stuNum, year); model.addAttribute("student", student); return "admin/student"; }
/** * 加载学生列表 * * @param session * @return */ @RequestMapping(value = "/college/students", method = RequestMethod.POST) @ResponseBody public Pager<Student> getStudents( Pager<Student> pager, StudentQueryDto dto, HttpSession session) { College college = (College) session.getAttribute("user"); dto.setColId(college.getId()); studentService.findStudents(pager, dto); return pager; }
/** * 判断学生是否存在 * * @param num 学号 * @param year 学年 * @return */ @RequestMapping(value = "/studentIsExist", method = RequestMethod.POST) @ResponseBody public String studentIsExist(String num, String year) { return studentService.isExist(num, year); }
/** * 学院更新学生信息 * * @param student * @return */ @RequestMapping(value = "/admin/updateStudentInfo", method = RequestMethod.POST) @ResponseBody public String updateStudentInfo(Student student) { return studentService.updatePartInfo(student); }
/** * 报名学生列表 * * @return */ @RequestMapping("/admin/apply_students") @ResponseBody public Pager<StudentDto> findApplyStudents(Pager<StudentDto> pager, Integer actId) { return studentService.findStudentByActivityId(pager, actId); }