毕设分享 基于SSM的毕业设计管理系统


0 项目说明

基于spring boot / SSM的毕业设计管理系统

提示:适合用于课程设计或毕业设计,工作量达标,源码开放


1 功能模块

毕业设计管理系统可以分为五个模块:登录模块,选题模块,信息管理模块,流程管理模块,文件管理模块。

  • 该系统在技术上使用Spring+SpringMVC+MyBatis整合框架作为后台开发框架,AmazeUI作为前端开发框架。
  • 并使用Ehcache作为项目的缓存,druid作为项目的数据库连接池,使用FreeMarker实现word的导出,使用Shiro完成项目的登录认证,数据库使用的则是MySQL。
  • 该系统可以分为三类角色:学生,教师,教务管理员。
  • 该系统前端界面使用纯HTML实现,与后台的交互则都是通过Ajax完成。

1.1 登录模块

登录模块主要完成教务管理员,教师,学生用户的登录功能,每个角色登录之后会看到不同的操作界面。

1.2 选题模块

选题模块主要完成师生双选这一业务流程。

1.3 信息管理模块

信息管理模块主要完成对各种信息的crud操作。

1.4 流程管理模块

流程管理主要完成对开题报告,中期检查,免答辩申请,验收/答辩,论文审核,盲审的流程的管理。

1.5 文件管理模块

文件管理模块主要对文件的上传与下载。

2 部分界面

  • 登录(学生,教师统一使用该登录界面进行登录)

在这里插入图片描述

  • 主页(主页可以看到一些内容概要与相关提示)

在这里插入图片描述

  • 教师列表(通过选择某一教师进而选择其课题)

在这里插入图片描述

  • 申报课题(教师只有填写课题名之后才可以申报课题)

在这里插入图片描述

3 项目源码

package cn.lynu.controller;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import cn.lynu.model.Project;
import cn.lynu.model.Student;
import cn.lynu.model.User;
import cn.lynu.service.ProjectService;
import cn.lynu.service.StudentService;
import cn.lynu.util.WordUtils;

@Controller
@RequestMapping("/studentController")
public class StudentController {
	
	@Autowired
	private StudentService studentService;
	@Autowired
	private ProjectService projectService;
	
	@ResponseBody
	@RequestMapping("/hasChooseProject")
	public Student hasChooseProject(HttpSession session,HttpServletResponse response) {
		response.setContentType("application/json;charset=utf-8");
		User user=(User) session.getAttribute("user");
		if(user!=null) {
			Student student = studentService.getStudentByUserId(user.getUserId());
			if(student!=null) {
				Project project = projectService.getProjectByStudentId(student.getStudentId());
				if(project!=null) {
					return student;
				}
			}
		}
		return new Student();
	}
	
	@ResponseBody
	@RequestMapping(value="/updateProjectByStudentId/{projectId}",method=RequestMethod.PUT)
	public boolean updateProjectByStudentId(HttpSession session,@PathVariable("projectId")String projectId) {
		User user=(User) session.getAttribute("user");
		if(user!=null) {
			Student student = studentService.getStudentByUserId(user.getUserId());
			if(student!=null) {
				if(!student.getStudentId().isEmpty()) {
					return projectService.updateStudentIdByProjectId(student.getStudentId(), projectId);
				}
			}
		}
		return false;
	}
	
	@ResponseBody
	@RequestMapping(value="/updateTeacherId")
	public boolean updateTeacherId(HttpSession session,String teacherId) {
		User user=(User) session.getAttribute("user");
		if(user!=null) {
			Student student = studentService.getStudentByUserId(user.getUserId());
			if(student!=null) {
				return studentService.updateTeacherId(teacherId,student.getStudentId());
			}
		}
		return false;
	}
	
	@ResponseBody
	@RequestMapping("/getUserByStudentId")
	public User getUserByStudentId(String studentId) {
		return studentService.getUserByStudentId(studentId);
	}
	
	@ResponseBody
	@RequestMapping(value="/updateProjectNum",method=RequestMethod.PUT)
	public boolean updateProjectNum(String studentId,String teacherId,String projectId) {
		return studentService.updateProjectNum(studentId,teacherId,projectId);
	}
	
	@ResponseBody
	@RequestMapping("/projectNum")
	public boolean projectNum(String studentId) {
		Student student=studentService.projectNum(studentId);
		if(student!=null) {
			if(student.getProjectNum()==1) {
				return true;
			}
		}
		return false;
	}
	
	@ResponseBody
	@RequestMapping(value="/updateNoProjectNum",method=RequestMethod.PUT)
	public boolean updateNoProjectNum(String studentId,String projectId) {
		boolean status1 = studentService.updateNoProjectNum(studentId);
		boolean status2 = projectService.updateNoStudent(projectId);
		if(status1&&status2) {
			return true;
		}
		return false;
	}
	
	@ResponseBody
	@RequestMapping("/getStuAndProject")
	public Student getStuAndProject(HttpSession session,HttpServletResponse response,String studentId) {
		if(studentId!=null&&studentId!="") {
			return studentService.getStuAndProject(studentId);
		}
		User user=(User) session.getAttribute("user");
		if(user!=null) {
			Student student = studentService.getStudentByUserId(user.getUserId());
			if(student!=null) {
				if(student.getProjectId()!=null&&student.getProjectId()!=0) {
					Student newStu = studentService.getStuAndProject(student.getStudentId());
					return newStu;
				}
			}
		}
		return new Student();
	}
	
	
	@ResponseBody
	@RequestMapping("/getStuAndProjectAndTeacher")
	public Student getStuAndProjectAndTeacher(HttpSession session,HttpServletResponse response) {
		User user=(User) session.getAttribute("user");
		if(user!=null) {
			Student student = studentService.getStudentByUserId(user.getUserId());
			if(student!=null) {
				if(student.getProjectId()!=null&&student.getProjectId()!=0) {
					Student newStu = studentService.getStuAndProjectAndTeacher(student.getStudentId());
					return newStu;
				}
			}
		}
		return new Student();
	}
	
	@ResponseBody
	@RequestMapping("/getStudentAndKtbgBySid")
	public Student getStudentAndKtbgBySid(String studentId) {
		return studentService.getStudentAndKtbgBySid(studentId);
	}
	
	@ResponseBody
	@RequestMapping("/getStudentAndZqjcBySid")
	public Student getStudentAndZqjcBySid(String studentId) {
		return studentService.getStudentAndZqjcBySid(studentId);
	}
	
	@ResponseBody
	@RequestMapping("/findStudent")
	public Student findStudent(HttpSession session) {
		User user=(User) session.getAttribute("user");
		if(user!=null) {
			Student student = studentService.getStudentByUserId(user.getUserId());
			if(student!=null) {
				return student;
			}
		}
		return null;
	}
	
	@RequestMapping("/gotoTstudentscore")
	public String gotoTstudentscore(@RequestParam(required=true)String studentId) {
		return "redirect:http://localhost:8080/graduation/teacher/tstudentscore.html?studentId="+studentId;
	}
	
	@ResponseBody
	@RequestMapping(value="/updateScore",method=RequestMethod.PUT)
	public boolean updateScore(Student student) {
		return studentService.updateStudent(student);
	}
	
	@ResponseBody
	@RequestMapping("/getThisStudentScore")
	public Integer getThisStudentScore(HttpSession session) {
		User user=(User) session.getAttribute("user");
		if(user!=null) {
			Student student = studentService.getStudentByUserId(user.getUserId());
			if(student!=null) {
				return studentService.getThisStudentScore(student.getStudentId());
			}
		}
		return -1;
	}
	
	@ResponseBody
	@RequestMapping("/getStudentAndMdbBySid")
	public Student getStudentAndMdbBySid(String studentId) {
		return studentService.getStudentAndMdbBySid(studentId);
	}
	
	//下载开题报告
	@ResponseBody
	@RequestMapping(value="/downKtbg",method=RequestMethod.GET)
	public void downKtbg(HttpSession session,
			HttpServletRequest request,HttpServletResponse response,
			String studentId) {
		if(studentId!=null&&!studentId.isEmpty()) {
			Student stuAndKtbg = studentService.getStudentAndKtbgBySid(studentId);
			Map<String, Object> map=new HashMap<>();
			map.put("user", stuAndKtbg.getUser());
			map.put("classInfo", stuAndKtbg.getClassInfo());
			map.put("project", stuAndKtbg.getProject());
			map.put("ktbg", stuAndKtbg.getKtbg());
			try {
				 WordUtils.exportMillCertificateWord(request,response,map,"开题报告.ftl","开题报告.doc");  
			} catch (IOException e) {
				e.printStackTrace();
			}
			return;
		}else {
			User user=(User) session.getAttribute("user");
			if(user!=null) {
				Student student = studentService.getStudentByUserId(user.getUserId());
				if(student!=null) {
					if(student.getProjectId()!=null&&student.getProjectId()!=0) {
						Student stuAndKtbg = studentService.getStudentAndKtbgBySid(student.getStudentId());
						Map<String, Object> map=new HashMap<>();
						map.put("user", stuAndKtbg.getUser());
						map.put("classInfo", stuAndKtbg.getClassInfo());
						map.put("project", stuAndKtbg.getProject());
						map.put("ktbg", stuAndKtbg.getKtbg());
						try {
							WordUtils.exportMillCertificateWord(request,response,map,"开题报告.ftl","开题报告.doc");  
						} catch (IOException e) {
							e.printStackTrace();
						}
					}
				}
			}
			return;
		}
	}
	
	//下载免答辩
	@ResponseBody
	@RequestMapping(value="/downMdb",method=RequestMethod.GET)
	public void downMdb(HttpSession session,
			HttpServletRequest request,HttpServletResponse response,
			String studentId) {
		if(studentId!=null&&!studentId.isEmpty()) {
			Student stuAndMdb = studentService.getStudentAndMdbBySid(studentId);
			Map<String, Object> map=new HashMap<>();
			map.put("user", stuAndMdb.getUser());
			map.put("classInfo", stuAndMdb.getClassInfo());
			map.put("project", stuAndMdb.getProject());
			map.put("mdb", stuAndMdb.getMdb());
			map.put("teacher", stuAndMdb.getTeacher());
			try {
				 WordUtils.exportMillCertificateWord(request,response,map,"免答辩申请表.ftl","免答辩申请表.doc");  
			} catch (IOException e) {
				e.printStackTrace();
			}
			return;
		}else {
			User user=(User) session.getAttribute("user");
			if(user!=null) {
				Student student = studentService.getStudentByUserId(user.getUserId());
				if(student!=null) {
					if(student.getProjectId()!=null&&student.getProjectId()!=0) {
						Student stuAndMdb = studentService.getStudentAndMdbBySid(student.getStudentId());
						Map<String, Object> map=new HashMap<>();
						map.put("user", stuAndMdb.getUser());
						map.put("classInfo", stuAndMdb.getClassInfo());
						map.put("project", stuAndMdb.getProject());
						map.put("mdb", stuAndMdb.getMdb());
						map.put("teacher", stuAndMdb.getTeacher());
						try {
							WordUtils.exportMillCertificateWord(request,response,map,"免答辩申请表.ftl","免答辩申请表.doc");  
						} catch (IOException e) {
							e.printStackTrace();
						}
						return;
					}
				}
			}
		}
	}
	
	//下载中期检查
	@ResponseBody
	@RequestMapping(value="/downZqjc",method=RequestMethod.GET)
	public void downZqjc(HttpSession session,
			HttpServletRequest request,HttpServletResponse response,
			String studentId) {
		if(studentId!=null&&!studentId.isEmpty()) {
			Student stuAndZqjc = studentService.getStudentAndZqjcBySid(studentId);
			Map<String, Object> map=new HashMap<>();
			map.put("user", stuAndZqjc.getUser());
			map.put("project", stuAndZqjc.getProject());
			map.put("zqjc", stuAndZqjc.getZqjc());
			map.put("teacher", stuAndZqjc.getTeacher());
			try {
				 WordUtils.exportMillCertificateWord(request,response,map,"中期检查表.ftl","中期检查表.doc");  
			} catch (IOException e) {
				e.printStackTrace();
			}
			return;
		}else {
			User user=(User) session.getAttribute("user");
			if(user!=null) {
				Student student = studentService.getStudentByUserId(user.getUserId());
				if(student!=null) {
					if(student.getProjectId()!=null&&student.getProjectId()!=0) {
						Student stuAndZqjc = studentService.getStudentAndZqjcBySid(student.getStudentId());
						Map<String, Object> map=new HashMap<>();
						map.put("user", stuAndZqjc.getUser());
						map.put("project", stuAndZqjc.getProject());
						if(stuAndZqjc.getZqjc()!=null) {
							map.put("zqjc", stuAndZqjc.getZqjc());
						}else {
							map.put("zqjc", null);
						}
						map.put("teacher", stuAndZqjc.getTeacher());
						try {
							WordUtils.exportMillCertificateWord(request,response,map,"中期检查表.ftl","中期检查表.doc");  
						} catch (IOException e) {
							e.printStackTrace();
						}
						return;
					}
				}
			}
		}
	}
	
}

4 最后

**项目分享: ** https://gitee.com/asoonis/htw

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值