项目介绍
本项目包含三种角色:管理员、学生用户角色与教师角色。
管理员角色包含以下功能:
学生信息管理、教师信息管理。
用户角色包含以下功能:
查看通知公告,登录,登录后学生主页面,选择课题,选择课题后状态为等待老师去人状态,填写开题报告,提交中期检查,提交免答辩申请,上传论文等功能。
教师角色包含以下功能:
教师角色登录,教师首页,申报课题,审批学生选题,审核开题报告,审核中期检查,初审免答辩申请,审核论文是否过关,综合打分等功能。
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可
4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
5.数据库:5.7/8.0版本均可;
6.是否Maven项目:是;
技术栈
- 后端:Spring+SpringMVC+Mybatis
- 前端:JSP+CSS+JavaScript+jQuery
使用说明
- 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
- 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;
若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; - 将项目中jdbc.properties配置文件中的数据库配置改为自己的配置;
- 运行项目,输入localhost:8080/ 登录
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
*/
@RequestMapping("/teacher/projBooklist1.action")
public ModelAndView projBooklist1(HttpSession session ,@ModelAttribute("projBook") ProjBook projBook ,
@RequestParam(value="pageNum",required=false,defaultValue="1") int pageNum) {
PageHelper.startPage(pageNum, PAGE_SIZE);
Teacher teacher = (Teacher)session.getAttribute("USER_INFO");
List<ProjBook>list = projBookService.findProjBookBytIdAndAgree1(projBook, teacher.gettId(),"待通过");
PageInfo<ProjBook> pageInfo = new PageInfo<>(list,5);
ModelAndView mv = new ModelAndView();
mv.addObject("pageInfo", pageInfo);
mv.setViewName("views/user/teacher/projbooklist1");
return mv;
}
/**
* 学生开题报告列表(已审核)
*/
@RequestMapping("/teacher/openReportlist.action")
public ModelAndView openReportlist(HttpSession session ,@ModelAttribute("openReport") OpenReport openReport ,
List<ProjBook>list = projBookService.findProjBookBytIdAndAgree(projBook, teacher.gettId(),"待通过");
PageInfo<ProjBook> pageInfo = new PageInfo<>(list,5);
ModelAndView mv = new ModelAndView();
mv.addObject("pageInfo", pageInfo);
mv.setViewName("views/user/teacher/projbooklist");
return mv;
}
/**
* 学生任务书列表(待审核)
*/
@RequestMapping("/teacher/projBooklist1.action")
public ModelAndView projBooklist1(HttpSession session ,@ModelAttribute("projBook") ProjBook projBook ,
@RequestParam(value="pageNum",required=false,defaultValue="1") int pageNum) {
* 删除课题(教师)
*/
@RequestMapping(value = "/teacher/titledelete.action")
@ResponseBody
public String titledelete(Long titlId) {
int rows = titleService.deleteTitle(titlId);
if(rows > 0){
return "OK";
}else{
return "FAIL";
}
}
/**
* 教师申请新课题
*/
@RequestMapping("/teacher/createTitle.action")
@ResponseBody
public String createTitle(Title title,HttpSession session) {
Teacher teacher = (Teacher)session.getAttribute("USER_INFO");
title.settId(teacher.gettId());
title.setTitlState("待审批");
title.setSelState("未被选择");
int l2 = s1.length();
int c = l1 - l2 + 1;
String []student = new String[4];
for(int i = 0;i < c;i++) {
student[i] = replyStudent.substring(0, replyStudent.indexOf(" "));
List<Thesis> list = thesisService.findThesisBytIdAndAgreeAndBatch(student[i], "通过",replyGroup.getBatch());
for(int m = 0;m < list.size();m++) {
Review review = new Review();
review.setsId(list.get(m).getsId());
review.setMemberTId(replyGroup.getReplyLeader().substring(0, replyGroup.getReplyLeader().indexOf(" ")));
review.setReplyId(replyGroup.getReplyId());
review.setReviewScore(0);
review.setReviewType("答辩组长评分");
reviewService.insertReview(review);
}
for(int j = 0;j < cc;j++) {
for(int k = 0;k < list.size();k++) {
@RequestParam(value="pageNum",required=false,defaultValue="1") int pageNum) {
PageHelper.startPage(pageNum, PAGE_SIZE);
Student student = (Student)session.getAttribute("USER_INFO");
List<Thesis>list = thesisService.findThesisList(thesis, (String)student.getsId());
List<MidCheck> list2 = midCheckService.findMidCheckBysIdAndAgree(student.getsId(), "通过");
List<Thesis> list3 = thesisService.findThesisBysIdAndAgree(student.getsId(), "通过");
int i = 0;
int i2 = 0;
if(list2.size()!=0) {
i = 1;
}
if(list3.size()!=0) {
i2 = 1;
return "views/user/teacher/roleset";
}
/**
* 向教师主页面跳转
*/
@RequestMapping(value = "/teacher/toindex.action", method = RequestMethod.GET)
public ModelAndView toIndex(HttpSession session) {
Teacher teacher = (Teacher)session.getAttribute("USER_INFO");
int sum = titleService.findTitleSum1(teacher.gettId(),"已审批");
int s = selectTitleService.findSelTitleListByState2(teacher.gettId(),"同意");
int s1 = selectTitleService.findSelTitleListByState2(teacher.gettId(),"待同意");
int sumProjBook = 0;
int sumOpenReport = 0;
int sumMidCheck = 0;
int sumThesis = 0;
List<ProjBook> list = projBookService.findProjBookBytIdAndAgree1(null, teacher.gettId(), "通过");
if(list!=null) {
sumProjBook = list.size();
}
List<OpenReport> list1 = openReportService.findOpenReportBytIdAndAgree1(null, teacher.gettId(), "通过");
if(list1!=null) {
sumOpenReport = list1.size();
/**
* 退出登录
*/
@RequestMapping(value = "/logout.action")
public String logout(HttpSession session) {
// 清除Session
session.invalidate();
// 重定向到登录页面的跳转方法
return "redirect:tologin.action";
}
/**
* 向用户登陆页面跳转
*/
@RequestMapping(value = "/tologin.action", method = RequestMethod.GET)
*/
@RequestMapping(value = "/student/totitlelist.action")
public ModelAndView totitlelist(HttpSession session, @ModelAttribute("title") Title title,
@RequestParam(value="pageNum",required=false,defaultValue="1") int pageNum) {
// pageNo 页码 pageSize 每页记录数
PageHelper.startPage(pageNum, PAGE_SIZE);
Student student = (Student)session.getAttribute("USER_INFO");
List<Title>list = titleService.findTitleListByMajor(title ,(String)student.getMajor());
PageInfo<Title> pageInfo = new PageInfo<>(list,5);
ModelAndView mv = new ModelAndView();
mv.addObject("title", title);
mv.addObject("pageInfo", pageInfo);
mv.setViewName("views/user/student/titlelist");
return mv;
}
/**
* 查看课题详情ById(学生)
}
if(rows > 0){
System.out.println("选择课题成功!!!!");
return "OK";
}else{
System.out.println("选择课题失败!!!!");
return "FAIL3";
}
}
}
/**
* 查看已选课题(学生)
*/
@RequestMapping("/student/selTitleById.action")
@ResponseBody
public ModelAndView selTitleById(HttpSession session, @ModelAttribute("title") Title title,
@RequestParam(value="pageNum",required=false,defaultValue="1") int pageNum) {
private ThesisAttachmentService thesisAttachmentService;
@Autowired
private ScoreProportionService scoreProportionService;
/**
* 向学生主页面跳转
*/
@RequestMapping(value = "/student/toindex.action", method = RequestMethod.GET)
public ModelAndView toIndex(HttpSession session) {
Student student = (Student)session.getAttribute("USER_INFO");
int sum = titleService.findTitleSum(student.getMajor(),"已审批");
int s = selectTitleService.findSelTitleListByState(student.getMajor(),"同意");
int s1 = selectTitleService.findSelTitleListByState(student.getMajor(),"待同意");
ModelAndView mv = new ModelAndView();
mv.addObject("sum", sum);
/**
* 保存学生答辩成绩
*/
@RequestMapping(value = "/teacher/saveScore.action")
@ResponseBody
public String saveScore(String sId,Long titlId){
int rows = 0;
List<Review1> list = null;
int flag = 0;
try {
list = reviewService.findBySId(sId);
} catch(Exception e) {
}
for(int i = 0;i<list.size();i++) {
if(list.get(i).getReviewScore()==0) {
replyMember = replyMember.substring(replyMember.indexOf(",") + 1,replyMember.length()-1);
}
String replyStudent = replyGroup.getReplyStudent();
int l1 = replyStudent.length();
String s1 = replyStudent.replaceAll(",","");
int l2 = s1.length();
int c = l1 - l2 + 1;
String []student = new String[4];
for(int i = 0;i < c;i++) {
student[i] = replyStudent.substring(0, replyStudent.indexOf(" "));
List<Thesis> list = thesisService.findThesisBytIdAndAgreeAndBatch(student[i], "通过",replyGroup.getBatch());
for(int m = 0;m < list.size();m++) {
Review review = new Review();
review.setsId(list.get(m).getsId());
review.setMemberTId(replyGroup.getReplyLeader().substring(0, replyGroup.getReplyLeader().indexOf(" ")));