末尾获取源码
开发语言:Java
Java开发工具:JDK1.8
后端框架:SSM
前端:采用Vue技术开发
数据库:MySQL5.7和Navicat管理工具结合
服务器:Tomcat8.5
开发软件:IDEA / Eclipse
是否Maven项目:是
目录
一、项目简介
二、系统功能
三、系统项目截图
3.1前台首页
3.2后台管理
四、核心代码
4.1登录相关
4.2论文信息接口
4.3选题信息
一、项目简介
毕业论文答辩系统利用网络沟通、计算机信息存储管理,有着与传统的方式所无法替代的优点。比如计算检索速度特别快、可靠性特别高、存储容量特别大、保密性特别好、可保存时间特别长、成本特别低等。在工作效率上,能够得到极大地提高,延伸至服务水平也会有好的收获,有了网络,毕业论文答辩系统的各方面的管理更加科学和系统,更加规范和简便。
二、系统功能
本毕业论文答辩系统主要包括三大功能模块,即管理员模块、教师模块和学生模块。
(1)管理员模块:主要功能有:首页、个人中心、学生管理、教师管理、课题信息管理、选题信息管理、论文信息管理、论文评分管理、答辩通知管理、成绩评定管理、系统管理。
(2)教师用户:首页、个人中心、课题信息管理、选题信息管理、论文信息管理、论文评分管理、答辩通知管理、成绩评定管理。
(3)学生:首页、个人中心、选题信息管理、论文信息管理、论文评分管理、成绩评定管理。
三、系统项目截图
3.1前台首页
3.2后台管理
管理员后台页面
教师后台页面
学生后台页面
四、核心代码
4.1登录相关
package com.controller;import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;import javax.servlet.http.HttpServletRequest;import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.TokenEntity;
import com.entity.UserEntity;
import com.service.TokenService;
import com.service.UserService;
import com.utils.CommonUtil;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.ValidatorUtils;/*** 登录相关*/
@RequestMapping("users")
@RestController
public class UserController{@Autowiredprivate UserService userService;@Autowiredprivate TokenService tokenService;/*** 登录*/@IgnoreAuth@PostMapping(value = "/login")public R login(String username, String password, String captcha, HttpServletRequest request) {UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));if(user==null || !user.getPassword().equals(password)) {return R.error("账号或密码不正确");}String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());return R.ok().put("token", token);}/*** 注册*/@IgnoreAuth@PostMapping(value = "/register")public R register(@RequestBody UserEntity user){
// ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {return R.error("用户已存在");}userService.insert(user);return R.ok();}/*** 退出*/@GetMapping(value = "logout")public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok("退出成功");}/*** 密码重置*/@IgnoreAuth@RequestMapping(value = "/resetPass")public R resetPass(String username, HttpServletRequest request){UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));if(user==null) {return R.error("账号不存在");}user.setPassword("123456");userService.update(user,null);return R.ok("密码已重置为:123456");}/*** 列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,UserEntity user){EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/list")public R list( UserEntity user){EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();ew.allEq(MPUtil.allEQMapPre( user, "user")); return R.ok().put("data", userService.selectListView(ew));}/*** 信息*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") String id){UserEntity user = userService.selectById(id);return R.ok().put("data", user);}/*** 获取用户的session用户信息*/@RequestMapping("/session")public R getCurrUser(HttpServletRequest request){Long id = (Long)request.getSession().getAttribute("userId");UserEntity user = userService.selectById(id);return R.ok().put("data", user);}/*** 保存*/@PostMapping("/save")public R save(@RequestBody UserEntity user){
// ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {return R.error("用户已存在");}userService.insert(user);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody UserEntity user){
// ValidatorUtils.validateEntity(user);userService.updateById(user);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){userService.deleteBatchIds(Arrays.asList(ids));return R.ok();}
}
4.2论文信息接口
package com.controller;import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;import com.entity.LunwenxinxiEntity;
import com.entity.view.LunwenxinxiView;import com.service.LunwenxinxiService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;/*** 论文信息* 后端接口* @author * @email * @date 2021-02-20 13:39:03*/
@RestController
@RequestMapping("/lunwenxinxi")
public class LunwenxinxiController {@Autowiredprivate LunwenxinxiService lunwenxinxiService;/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,LunwenxinxiEntity lunwenxinxi, HttpServletRequest request){String tableName = request.getSession().getAttribute("tableName").toString();if(tableName.equals("jiaoshi")) {lunwenxinxi.setJiaoshigonghao((String)request.getSession().getAttribute("username"));}if(tableName.equals("xuesheng")) {lunwenxinxi.setXuejihao((String)request.getSession().getAttribute("username"));}EntityWrapper<LunwenxinxiEntity> ew = new EntityWrapper<LunwenxinxiEntity>();PageUtils page = lunwenxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, lunwenxinxi), params), params));return R.ok().put("data", page);}/*** 前端列表*/@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,LunwenxinxiEntity lunwenxinxi, HttpServletRequest request){EntityWrapper<LunwenxinxiEntity> ew = new EntityWrapper<LunwenxinxiEntity>();PageUtils page = lunwenxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, lunwenxinxi), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list( LunwenxinxiEntity lunwenxinxi){EntityWrapper<LunwenxinxiEntity> ew = new EntityWrapper<LunwenxinxiEntity>();ew.allEq(MPUtil.allEQMapPre( lunwenxinxi, "lunwenxinxi")); return R.ok().put("data", lunwenxinxiService.selectListView(ew));}/*** 查询*/@RequestMapping("/query")public R query(LunwenxinxiEntity lunwenxinxi){EntityWrapper< LunwenxinxiEntity> ew = new EntityWrapper< LunwenxinxiEntity>();ew.allEq(MPUtil.allEQMapPre( lunwenxinxi, "lunwenxinxi")); LunwenxinxiView lunwenxinxiView = lunwenxinxiService.selectView(ew);return R.ok("查询论文信息成功").put("data", lunwenxinxiView);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id){LunwenxinxiEntity lunwenxinxi = lunwenxinxiService.selectById(id);return R.ok().put("data", lunwenxinxi);}/*** 前端详情*/@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id){LunwenxinxiEntity lunwenxinxi = lunwenxinxiService.selectById(id);return R.ok().put("data", lunwenxinxi);}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody LunwenxinxiEntity lunwenxinxi, HttpServletRequest request){lunwenxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(lunwenxinxi);lunwenxinxiService.insert(lunwenxinxi);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody LunwenxinxiEntity lunwenxinxi, HttpServletRequest request){lunwenxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(lunwenxinxi);lunwenxinxiService.insert(lunwenxinxi);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody LunwenxinxiEntity lunwenxinxi, HttpServletRequest request){//ValidatorUtils.validateEntity(lunwenxinxi);lunwenxinxiService.updateById(lunwenxinxi);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){lunwenxinxiService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 提醒接口*/@RequestMapping("/remind/{columnName}/{type}")public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, @PathVariable("type") String type,@RequestParam Map<String, Object> map) {map.put("column", columnName);map.put("type", type);if(type.equals("2")) {SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");Calendar c = Calendar.getInstance();Date remindStartDate = null;Date remindEndDate = null;if(map.get("remindstart")!=null) {Integer remindStart = Integer.parseInt(map.get("remindstart").toString());c.setTime(new Date()); c.add(Calendar.DAY_OF_MONTH,remindStart);remindStartDate = c.getTime();map.put("remindstart", sdf.format(remindStartDate));}if(map.get("remindend")!=null) {Integer remindEnd = Integer.parseInt(map.get("remindend").toString());c.setTime(new Date());c.add(Calendar.DAY_OF_MONTH,remindEnd);remindEndDate = c.getTime();map.put("remindend", sdf.format(remindEndDate));}}Wrapper<LunwenxinxiEntity> wrapper = new EntityWrapper<LunwenxinxiEntity>();if(map.get("remindstart")!=null) {wrapper.ge(columnName, map.get("remindstart"));}if(map.get("remindend")!=null) {wrapper.le(columnName, map.get("remindend"));}String tableName = request.getSession().getAttribute("tableName").toString();if(tableName.equals("jiaoshi")) {wrapper.eq("jiaoshigonghao", (String)request.getSession().getAttribute("username"));}if(tableName.equals("xuesheng")) {wrapper.eq("xuejihao", (String)request.getSession().getAttribute("username"));}int count = lunwenxinxiService.selectCount(wrapper);return R.ok().put("count", count);}}
4.3选题信息
package com.controller;import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;import com.entity.XuantixinxiEntity;
import com.entity.view.XuantixinxiView;import com.service.XuantixinxiService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;/*** 选题信息* 后端接口* @author * @email * @date 2021-02-20 13:39:03*/
@RestController
@RequestMapping("/xuantixinxi")
public class XuantixinxiController {@Autowiredprivate XuantixinxiService xuantixinxiService;/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,XuantixinxiEntity xuantixinxi, HttpServletRequest request){String tableName = request.getSession().getAttribute("tableName").toString();if(tableName.equals("jiaoshi")) {xuantixinxi.setJiaoshigonghao((String)request.getSession().getAttribute("username"));}if(tableName.equals("xuesheng")) {xuantixinxi.setXuejihao((String)request.getSession().getAttribute("username"));}EntityWrapper<XuantixinxiEntity> ew = new EntityWrapper<XuantixinxiEntity>();PageUtils page = xuantixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, xuantixinxi), params), params));return R.ok().put("data", page);}/*** 前端列表*/@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,XuantixinxiEntity xuantixinxi, HttpServletRequest request){String tableName = request.getSession().getAttribute("tableName").toString();if(tableName.equals("jiaoshi")) {xuantixinxi.setJiaoshigonghao((String)request.getSession().getAttribute("username"));}if(tableName.equals("xuesheng")) {xuantixinxi.setXuejihao((String)request.getSession().getAttribute("username"));}EntityWrapper<XuantixinxiEntity> ew = new EntityWrapper<XuantixinxiEntity>();PageUtils page = xuantixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, xuantixinxi), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list( XuantixinxiEntity xuantixinxi){EntityWrapper<XuantixinxiEntity> ew = new EntityWrapper<XuantixinxiEntity>();ew.allEq(MPUtil.allEQMapPre( xuantixinxi, "xuantixinxi")); return R.ok().put("data", xuantixinxiService.selectListView(ew));}/*** 查询*/@RequestMapping("/query")public R query(XuantixinxiEntity xuantixinxi){EntityWrapper< XuantixinxiEntity> ew = new EntityWrapper< XuantixinxiEntity>();ew.allEq(MPUtil.allEQMapPre( xuantixinxi, "xuantixinxi")); XuantixinxiView xuantixinxiView = xuantixinxiService.selectView(ew);return R.ok("查询选题信息成功").put("data", xuantixinxiView);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id){XuantixinxiEntity xuantixinxi = xuantixinxiService.selectById(id);return R.ok().put("data", xuantixinxi);}/*** 前端详情*/@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id){XuantixinxiEntity xuantixinxi = xuantixinxiService.selectById(id);return R.ok().put("data", xuantixinxi);}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody XuantixinxiEntity xuantixinxi, HttpServletRequest request){xuantixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(xuantixinxi);xuantixinxiService.insert(xuantixinxi);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody XuantixinxiEntity xuantixinxi, HttpServletRequest request){xuantixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(xuantixinxi);xuantixinxi.setUserid((Long)request.getSession().getAttribute("userId"));xuantixinxiService.insert(xuantixinxi);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody XuantixinxiEntity xuantixinxi, HttpServletRequest request){//ValidatorUtils.validateEntity(xuantixinxi);xuantixinxiService.updateById(xuantixinxi);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){xuantixinxiService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 提醒接口*/@RequestMapping("/remind/{columnName}/{type}")public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, @PathVariable("type") String type,@RequestParam Map<String, Object> map) {map.put("column", columnName);map.put("type", type);if(type.equals("2")) {SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");Calendar c = Calendar.getInstance();Date remindStartDate = null;Date remindEndDate = null;if(map.get("remindstart")!=null) {Integer remindStart = Integer.parseInt(map.get("remindstart").toString());c.setTime(new Date()); c.add(Calendar.DAY_OF_MONTH,remindStart);remindStartDate = c.getTime();map.put("remindstart", sdf.format(remindStartDate));}if(map.get("remindend")!=null) {Integer remindEnd = Integer.parseInt(map.get("remindend").toString());c.setTime(new Date());c.add(Calendar.DAY_OF_MONTH,remindEnd);remindEndDate = c.getTime();map.put("remindend", sdf.format(remindEndDate));}}Wrapper<XuantixinxiEntity> wrapper = new EntityWrapper<XuantixinxiEntity>();if(map.get("remindstart")!=null) {wrapper.ge(columnName, map.get("remindstart"));}if(map.get("remindend")!=null) {wrapper.le(columnName, map.get("remindend"));}String tableName = request.getSession().getAttribute("tableName").toString();if(tableName.equals("jiaoshi")) {wrapper.eq("jiaoshigonghao", (String)request.getSession().getAttribute("username"));}if(tableName.equals("xuesheng")) {wrapper.eq("xuejihao", (String)request.getSession().getAttribute("username"));}int count = xuantixinxiService.selectCount(wrapper);return R.ok().put("count", count);}}