基于javaweb的SSM+Maven毕业设计毕业论文管理系统(java+ssm+jsp+mysql+layui+maven)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

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

功能说明

010023002402

020023002402

030023002402

040023002402

050023002402

基于javaweb的SSM+Maven毕业设计毕业论文管理系统(java+ssm+jsp+mysql+layui+maven)

一、项目简述 功能包括: 课题管理,学生管理,内容管理,文件管理,提问管理,教师管理,进度管理等等。

二、项目运行 环境配置:

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

项目技术:

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
				
File filePath = new File(fileDb, fileName);

if(!filePath.getParentFile().exists()) {
filePath.getParentFile().mkdirs();
}

file.transferTo(new File(fileDb+File.separator+fileName));

int num = studentService.uploadShujuku(studentId, filePath.toString());
System.out.println("添加了"+num+"条信息");

model.addAttribute("message", "上传数据库设计报告成功");
return "student/main.jsp";
}else {
model.addAttribute("message", "上传数据库设计报告出错");
return "student/main.jsp";
}
}
}

@RequestMapping(value="/fileDelete")
public String fileDelete(HttpServletRequest request,HttpServletResponse response, @RequestParam("filePath") String filePath,@RequestParam("fileName") String fileName, Model model) throws Exception {
Student currentUser = (Student)request.getSession().getAttribute("student");
int studentId = currentUser.getId();

request.setCharacterEncoding("utf-8");
response.setCharacterEncoding("utf-8");
fileName = new String(fileName.getBytes("iso-8859-1"),"utf-8");
filePath = new String(filePath.getBytes("iso-8859-1"),"utf-8");
File deleteFile = new File(filePath);
String message = "";
boolean flag = false;
if(deleteFile.exists()) {
message = "删除成功";
// flag = deleteFile.delete();
// if(flag ) {
// message = "删除成功";
// }else {
// message = "删除失败";
// }

}else {
message = "文件不存在";
}

ThesisInformation thesis = studentService.getInfoByFilePath(filePath);
if(thesis== null || "".equals(thesis)) {

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
		wendangList.put("shujuku", STBO.getShujukuscore());
/* if(STBO == null || "".equals(STBO)) {
model.addAttribute("message", "尚未提交开题报告");
return "student/studentOpeningResult.jsp";
}else {
int completion = STBO.getCompletion();
if(completion == 0) {
model.addAttribute("message", "你的开题报告还未审核,请耐心等待");
}else if(completion == 1) {
model.addAttribute("message", "你的开题报告未通过,请修改后重新提交");
}else {
model.addAttribute("message", "开题报告已通过");
}
}*/
System.out.println(wendangList);
if(wendangList==null) {
model.addAttribute("message", "还未提交任何文档");
}
model.addAttribute("wendangList", wendangList);
return "student/studentWendangResult.jsp";
}

@RequestMapping(value="/getRealTimeTopic")
public void getRealTimeTopic(HttpServletResponse response,HttpServletRequest request) throws Exception {
String message = (String)request.getSession().getServletContext().getAttribute("realTimeTopicMessage");
response.setContentType("text/html;charset=UTF-8");
PrintWriter write = response.getWriter();
write.write(JSONObject.toJSONString(message));
write.close();
}

@RequestMapping(value="/uploadThesisInformation")
public String studentUploadThesisInformation(HttpServletRequest request, Model model,@RequestParam("file") MultipartFile file) throws Exception {

Student currentUser = (Student)request.getSession().getAttribute("student");
int studentId = currentUser.getId();

String studentIdToString = String.valueOf(studentId);

Topic topic = studentService.chosenThesisTitle(studentId);
if(topic == null || "".equals(topic)) {
model.addAttribute("message", "无法上传毕业论文");
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
@RequestMapping(value="/uploadTaskBook",method=RequestMethod.GET)
public String teacherUploadTaskBookForm() {
return "teacher/teacherUploadTakeBook.jsp";
}

@RequestMapping(value="/uploadOpening",method=RequestMethod.GET)
public String teacherUploadOpeningForm() {
return "teacher/teacherUploadOpeningReport.jsp";
}

@RequestMapping(value="/uploadKeXingXing",method=RequestMethod.GET)
public String teacherUploadKeXingXingForm() {
return "teacher/teacherUploadKeXingXing.jsp";
}

@RequestMapping(value="/uploadXuQiu",method=RequestMethod.GET)
public String teacherUploadXuQiuForm() {
return "teacher/teacherUploadXuQiu.jsp";
}

@RequestMapping(value="/uploadGaiYao",method=RequestMethod.GET)
public String teacherUploadGaiYaoForm() {
return "teacher/teacherUploadGaiYao.jsp";
}

@RequestMapping(value="/uploadShuJuKu",method=RequestMethod.GET)
public String teacherUploadShuJuKuForm() {
return "teacher/teacherUploadShuJuKu.jsp";
}

@RequestMapping(value="/checkOppening")
public String teacherCheckOppeningForm(HttpServletRequest request,Model model) {
Teacher currentTeacher = (Teacher)request.getSession().getAttribute("teacher");
int teacherId = currentTeacher.getId();
List<Student> students = teacherService.getAllStudentInfo(teacherId);
for(int i=0;i<students.size();i++) {
int studentId = students.get(i).getId();
StudentTaskBookOpening STBO = teacherService.getStudentOpeningByStudentId(studentId);
if(STBO == null || "".equals(STBO)) {

}else {
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
			return "../../student/studentLogin.jsp";
}
if(currentUser.getPermission()==1) {
HttpSession session = request.getSession();
session.setMaxInactiveInterval(3600);
// t_user 表中的关于学生的信息
session.setAttribute("currentUser", currentUser);

// t_student 表中的信息
Student student = studentService.getStudentByNO(userNo);
int majorId = student.getMajorId();
String majorName = majorService.getNameById(majorId);
student.setMajorName(majorName);

session.setAttribute("student", student);
// model.addAttribute("userNo", userNo);
return "student/main.jsp";
}else {
model.addAttribute("message", "当前用户不是学生");
//return "error.jsp";
return "../../student/studentLogin.jsp";
}
}

@RequestMapping(value="/quit")
public String quitSystem(Model model,HttpServletRequest request) {

request.getSession().invalidate();

return "../../index.jsp";
}

@RequestMapping(value="/modifyPassword")
public String modifyPassword(Model model,String newPassword1,String currentUserNo) {

/*System.out.println("新的密码:"+newPassword1);
System.out.println("账户:"+currentUserNo);*/
int num = userService.modifyPassword(currentUserNo, newPassword1);
System.out.println("修改了"+num+"条数据");
model.addAttribute("num", num);
return "modifySuccess.jsp";
}

}
package com.zc.filter;


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
 * 修改了studentThesisResult() 显示学生的选题情况,若是为选择课题则不能查询选题结果,会直接跳转到主页
* studentModifyInfoToDb() 修改学生信息
* studentGetAllAvailableTopicForm() 获得可选择的课题,用于学生选题页
* studentSelectTopic() 提交当前学生的选题情况
* studentDeleteChosenTopic() 学生退选当前课题
*
* 修改了studentViewTaskOpening() 页面,用于查看学生所选课题的开题报告和任务书,并下载
* 修改了 studentResourcesDownload() 也main,显示学生上传的内容
* fileDownload() 文件下载
* studentUploadTaskBook() 上传自己写的任务书 ---以废除不用
* studentUploadOpening() 上传自己写的开题报告
* fileDelete() 文件删除
* studentOpeningResult() 学生查看自己开题报告的审核结果 (未提交--- 通过---- 不通过 )
*
* 修改了 studentSelectTopic() 方法 添加了 把选题信息保存到application 中,以便jsp页面的显示
* getRealTimeTopic() 获得当前选题信息,并保存到application中
*
* 修改了studentResourcesDownload方法,可以显示上传为论文信息
* 修改了fileDelete方法,可以删除上传的论文信息
* studentUploadThesisInformation() 学生提交 学生论文信息
*
* studentQualification() 学生答辩资格的查看
*
* studentDoubtForm() 跳转到学生提出疑惑页面
* studentDoubtListForm() 显示学生的疑惑,并查看是否有解决方案
* studentDoubtToDb() 添加学生的疑惑道数据库
*
*/

@Controller
@RequestMapping(value="/student")
public class StudentController {

@Autowired
private IStudentService studentService;

@Autowired
private IMajorService majorService;

@Autowired
private ITeacherService teacherService;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
	StudentScore Ss = teacherService.showInfoByStudentId(studentList);
if(Ss == null || "".equals(Ss)) {
StudentScore studentScore = new StudentScore();
studentScore.setStudentId(studentList);
studentScore.setThesisResult(score);
studentScore.setInputMan(teacherName);


int num = teacherService.addStudentScore(studentScore);
System.out.println("添加"+num+"条学生成绩");
model.addAttribute("message", "添加一条学生成绩");

return "teacher/main.jsp";
}else {
model.addAttribute("message", "该学生已经添加过成绩");
return "teacher/main.jsp";
}


}

@RequestMapping(value="/modifyStudentScore")
public String teacherModifyStudentScore(@RequestParam("id") int id,Model model) {
StudentScore s = teacherService.showInfoByStudentId(id);
model.addAttribute("scoreList", s);

return "teacher/teacherModifyScore4Db.jsp";
}




@RequestMapping(value="/modifyStudentScoreToDb")
public String teacherModifyStudentScoreToDb(HttpServletRequest request, @RequestParam("id") int id,@RequestParam("studentScoreNew") int studentScoreNew,Model model) throws IOException {
Teacher currentTeacher = (Teacher)request.getSession().getAttribute("teacher");
String teacherName = currentTeacher.getTeacherName();

StudentScore score = new StudentScore();
score.setThesisResult(studentScoreNew);
score.setStudentId(id);
score.setInputMan(teacherName);


项目链接:
https://javayms.github.io?id=461422292105200fr
https://javayms.pages.dev?id=461422292105200fr