100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > 基于javaweb+mysql的教务管理系统(java+JSP+Spring+SpringBoot+layui+maven)

基于javaweb+mysql的教务管理系统(java+JSP+Spring+SpringBoot+layui+maven)

时间:2024-01-19 11:57:31

相关推荐

基于javaweb+mysql的教务管理系统(java+JSP+Spring+SpringBoot+layui+maven)

一、项目简述

功能包括:

三角色教师 管理员,学生教务管理系统,包括院系管理,课题综合管理,信息管理,以及差旅管理,学生选题等等。

二、项目运行

环境配置:

Jdk1.8 + Tomcat8.5 + mysql + Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)

项目技术:

JSP +Spring + SpringBoot + MyBatis + html+ css + JavaScript + JQuery + Ajax + layui+ maven等等

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

public String Topicsto(Long project_id,int selectFlag,String projectName, Model model, HttpSession httpSession) {List<topicsto> topicstos = topicsService.topicsinfo(project_id);Student student = (Student) request.getSession().getAttribute("student");Long flag = topicsService.state(student);Long flagto = topicsService.flag(project_id);if (flagto != 0) {flag = 3L;}model.addAttribute("selectFlag",selectFlag);model.addAttribute("flag", flag);model.addAttribute("topicstos", topicstos);model.addAttribute("projectName", projectName);model.addAttribute("project_id", project_id);model.addAttribute("XZproject", httpSession.getAttribute("XZproject"));return "student/topicsinfoto";}/*** 选报课题*/@AutowiredSubjectselectedMapper subjectselectedMapper;@RequestMapping("/enroll")@ResponseBodypublic String enroll(Long project_id, HttpSession httpSession) {String projectName = topicsService.selectprojectname(project_id);Student student = (Student) request.getSession().getAttribute("student");

@ResponseBodypublic Msg fun19(Long year, HttpSession httpSession) {Teacher teacher = (Teacher) httpSession.getAttribute("teacherInfo");TechnicalPersonnelWithBLOBs technicalPersonnelWithBLOBs = teacherService.selectTechnicalPersonnelInfo(teacher.getId(), year);return Msg.success().add("technicalPersonnel", technicalPersonnelWithBLOBs);}// 毕业设计内容// 加载上传课题页面@GetMapping("/upload_topic_page")public String uploadTopic(ModelMap modelMap, HttpSession httpSession) {TeacherWithBLOBs teacher = (TeacherWithBLOBs) httpSession.getAttribute("teacherInfo");List<Projecttype> projecttypes = teacherService.select_allProjecttype();List<Projectsource> projectsources = teacherService.select_allProjectsource();List<Specialty> specialties = teacherService.select_allSpecialty(teacher.getIdSection());modelMap.addAttribute("projecttypes", projecttypes);modelMap.addAttribute("projectsources", projectsources);modelMap.addAttribute("specialties", specialties);

DebriefingYearWithBLOBs debriefingYear = teacherService.selectYearDebriefingInfo(teacher.getId(), year);return Msg.success().add("debriefingInfo", debriefingYear);}//查询学期述职中年份@GetMapping("select_debriefing_term")@ResponseBodypublic Msg fun13() {List<Debriefing> list = teacherService.selectDebriefingTermByYear();List<Long> temp = new ArrayList<>();//去除重复的年份for (Debriefing s : list) {if (!temp.contains(s.getYear())) {temp.add(s.getYear());}}return Msg.success().add("year", temp);}//查询指定年份的学期述职信息@GetMapping("/select_debriefing_term_info")@ResponseBody

// 加载上传课题页面@GetMapping("/upload_topic_page")public String uploadTopic(ModelMap modelMap, HttpSession httpSession) {TeacherWithBLOBs teacher = (TeacherWithBLOBs) httpSession.getAttribute("teacherInfo");List<Projecttype> projecttypes = teacherService.select_allProjecttype();List<Projectsource> projectsources = teacherService.select_allProjectsource();List<Specialty> specialties = teacherService.select_allSpecialty(teacher.getIdSection());modelMap.addAttribute("projecttypes", projecttypes);modelMap.addAttribute("projectsources", projectsources);modelMap.addAttribute("specialties", specialties);return "teacher/graduation/upload";}// 上传课题@PostMapping("/up_project")@ResponseBodypublic Msg fun20(String projectName, Long idProjecttype, Long idProjectsource, String marchspecialty, String teachernames, @RequestParam("file") MultipartFile file, HttpServletRequest request, HttpSession httpSession) throws IOException {if (file == null) {return Msg.fail().add("msg","文件上传失败");

return "teacher/teacherInfo/updateinfo";}@GetMapping("/workapprovalinfo")public String workInfo() {return "teacher/workapproval/winfo";}@GetMapping("/workapprovaldata")public String workData() {return "teacher/workapproval/wdata";}@GetMapping("/seeworkdata")public String seeWorkData() {return "teacher/workapproval/seewdata";

// 毕业设计内容// 加载上传课题页面@GetMapping("/upload_topic_page")public String uploadTopic(ModelMap modelMap, HttpSession httpSession) {TeacherWithBLOBs teacher = (TeacherWithBLOBs) httpSession.getAttribute("teacherInfo");List<Projecttype> projecttypes = teacherService.select_allProjecttype();List<Projectsource> projectsources = teacherService.select_allProjectsource();List<Specialty> specialties = teacherService.select_allSpecialty(teacher.getIdSection());modelMap.addAttribute("projecttypes", projecttypes);modelMap.addAttribute("projectsources", projectsources);modelMap.addAttribute("specialties", specialties);return "teacher/graduation/upload";}// 上传课题@PostMapping("/up_project")@ResponseBodypublic Msg fun20(String projectName, Long idProjecttype, Long idProjectsource, String marchspecialty, String teachernames, @RequestParam("file") MultipartFile file, HttpServletRequest request, HttpSession httpSession) throws IOException {if (file == null) {return Msg.fail().add("msg","文件上传失败");}if(teacherService.selectProjectByName(projectName).size()>0){System.out.println("上传失败");return Msg.fail().add("msg","课题名已存在");}

public String yearDebriefing() {return "teacher/fillouttable/yeardebriefing";}@GetMapping("/annual_assessment")public String annualAssessment() {return "teacher/fillouttable/annualassessment";}@GetMapping("/work_load")public String workLoad() {return "teacher/fillouttable/workload";}@GetMapping("/technical_personnel")public String technicalPersonnel() {return "teacher/fillouttable/technicalpersonnel";}@GetMapping("/term_business")public String termBusiness() {return "teacher/fillouttable/termbusiness";}//查看表格页面@GetMapping("/show_year_debriefing")public String showYearDebriefing() {return "teacher/showtable/yeardebriefing";

public class LoginController {private static final Logger LOGGER = LoggerFactory.getLogger(LoginController.class);@AutowiredAdminService adminService;@GetMapping("/cs")public String cs() {return "cs";}@GetMapping("/login")public String login() {return "login";}@PostMapping("/login")@ResponseBodypublic Msg login(String name, String pwd, HttpSession httpSession) {name = name.trim();

List<Workapprovaldata> list = teacherService.selectWorkData(teacher.getIdSection());PageInfo page = new PageInfo(list, 5);return Msg.success().add("dataInfo", page);}//出差附件下载@RequestMapping(value = "/file_download")public ResponseEntity<byte[]> downloadFile(String dataId, HttpServletRequest req, HttpServletResponse response) throws IOException {Workapprovaldata workapprovaldata = null;if (dataId != null) {Long id = Long.valueOf(dataId);workapprovaldata = teacherService.selectWorkDataById(id);}if (workapprovaldata != null) {String filePath = workapprovaldata.getDatarar();//设置文件路径File file = new File(filePath);if (!file.exists()) {file.mkdirs();}String fileName = file.getName();HttpHeaders headers = new HttpHeaders();

return Msg.success();} else {//获取课题SubjectWithBLOBs subject1 = subjectService.getSubjectByID(id);//获取课题路径String oldPath = subject1.getFilepath();File oldFile = new File(oldPath);//如果文件存在则删除if (oldFile.exists()) {//删除成功if (oldFile.delete()) {} else {return Msg.fail();

return "student/modifyinfo";}/*** 修改个人信息* 根据班级(className)修改**//*@RequestMapping(value = "/modifyinfodao", method = RequestMethod.PUT)@ResponseBodypublic String modifyinfodao(Student student, String className, Model model) {Student Tstudent = (Student) request.getSession().getAttribute("student");MyClass Tclass = indexService.selectByclassName(className);int count = -1;student.setIdClass(Tclass.getId());

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。