Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to design and implement the teaching evaluation system by java+SpringBoot

2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail how java+SpringBoot designs and implements the teaching evaluation system. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

Main function

There are three roles: administrator, teacher and student.

Administrator functions are: student management, teacher management, teaching evaluation management, index management, curriculum management and so on.

Teachers' functions are: student management, index management, curriculum management.

Students' functions are: teaching evaluation and management.

Operation environment

Jdk1.8, mysql5.X, maven3.5\ 3.6, idea

Effect picture display

< projects.size(); i++) { if (projects.get(i).getVerifyprojectFlag() == 0) projects.get(i).setProjectZT("未审核"); else if (projects.get(i).getVerifyprojectFlag() == 1) projects.get(i).setProjectZT("审核未通过"); else projects.get(i).setProjectZT("审核通过"); } modelMap.addAttribute("Myproject", projects); return "teacher/graduation/section_xq/index"; } // 发布或取消发布已审核通过的课题 @PostMapping("/fb_project") @ResponseBody public String fun8(Long project_id, String pd,HttpSession httpSession) { int s = Integer.parseInt(pd); teacherService.updateProjectFB(project_id, s); if (s == 0) { teacherService.deleteSelectedAll(project_id); teacherService.updateProjectCount(project_id); } Map map = new HashMap(); map.put("pd", "" + 1); return JSONObject.toJSONString(map); } @PostMapping("del_project") @ResponseBody public Msg deleteProject(Long id) { teacherService.deleteProject(id); return Msg.success(); } @PostMapping("/updateSubject") @ResponseBody public Msg updateProject(Long id, String projectName, Long idProjecttype, Long idProjectsource, String marchspecialty, String teachernames, @RequestParam(value = "file", required = false) MultipartFile file, HttpServletRequest request, HttpSession httpSession) throws IOException { //拼接 teacherNames 字段 TeacherWithBLOBs teacher = (TeacherWithBLOBs) request.getSession().getAttribute("teacherInfo"); String teacherName = teacher.getName(); if (teachernames == null || teachernames.trim().length() == 0) { teachernames = teacherName; } else { teachernames = teacherName + "&" + teachernames; } SubjectWithBLOBs subject = null; //文件大小 为 0 则表示 文件没上传 long size = file.getSize(); //不更新课题文件情况 if (file == null || size == 0) { subject = new SubjectWithBLOBs(); subject.setId(id); subject.setProjectname(projectName); subject.setIdProjecttype(idProjecttype); subject.setIdProjectsource(idProjectsource); subject.setMarchspecialty(marchspecialty); subject.setTeachernames(teachernames); //修改后状态置 0 subject.setSelectFlag(0); subject.setVerifyprojectFlag(0); subject.setReleaseFlag(0); subjectService.updateSubjectByid(subject); 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(); } } ServletContext servletContext = request.getSession().getServletContext(); String uploadFileName = file.getOriginalFilename(); // 获取上传文件的原名 uploadFileName = uploadFileName.substring(uploadFileName.lastIndexOf(File.separator) + 1); File path = new File(ResourceUtils.getURL("target").getPath());// String savePath = path.getAbsolutePath() + "\\classes\\static\\model\\" + teacher.getId();// String saveFileName = savePath + "\\" + uploadFileName; String savePath = path.getAbsolutePath() + File.separator+"classes+"+File.separator+"static" +File.separator+"model"+File.separator + teacher.getId(); String saveFileName = savePath +File.separator + uploadFileName; File dirs = new File(savePath); //判断路径是否存在,如果不存在就创建一个 if (!dirs.exists()) { dirs.mkdirs(); } file.transferTo(new File(dirs, uploadFileName)); // 开始接受文件 SubjectWithBLOBs project = subject1; project.setProjectname(projectName); project.setIdProjecttype(idProjecttype); project.setIdProjectsource(idProjectsource); project.setFilepath(saveFileName); project.setMarchspecialty(marchspecialty.trim()); project.setTeachernames(teachernames); //修改后状态置 0 project.setSelectFlag(0); project.setVerifyprojectFlag(0); project.setReleaseFlag(0); int i = subjectService.updateSubjectByid(project); return Msg.success(); } } @GetMapping("/getSubjectById") @ResponseBody public Msg getss(Long id) { SubjectWithBLOBs subject = subjectService.getSubjectByID(id); System.out.println(subject); subject.setFilepath(subject.getFilepath().substring(subject.getFilepath().lastIndexOf("\\") + 1)); String[] teachers = subject.getTeachernames().split("&"); String teacher2 = ""; if (teachers.length >

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report