作者主页:编程指南针
作者简介:Java领域优质创作者、CSDN博客专家 、掘金特邀作者、多年架构师设计经验、腾讯课堂常驻讲师
主要内容:Java项目、毕业设计、简历模板、学习资料、面试题库、技术互助
收藏点赞不迷路 关注作者有好处
文末获取源码
本系统是根据实际的情况与要求而开发的一套完整的可实现的校内评奖评优系统,相较于以往的评奖评优系统来说,本系统使用索引减少检索的数据量,将无序的数据变成相对有序的数据,加快数据的检索速度,使系统的调用更加高效,更加的灵活方便,其功能齐全,一目了然,且能够快速导入学生数据,具有较高的安全性。校内评奖评优系统的目的主要在于为教务工作部门提供高效快捷的业务管理与事务处理的同时,使用安全可靠的技术,及时、准确、可靠地处理和传输信息,提高工作效率,机械代替人力,减少出错率。大学生奖学金评定管理并不是一项简单的工作,其耗时较长,涉及专业广泛,需要专业的开发人员、管理人员和相关业务人员的共同合作,只有发挥领导作用,才能有效协调各部门,保障评定管理工作的顺利开展[4]。
根据校内评奖评优系统在实际应用中,采用前后端分离的开发方式,后台开发使用Springboot开发接口,前端开发使用Vue+EelementUIg后台基于将主要用户划分为管理员、教师、学生三类。
管理员;管理员在校内评奖评优系统中主要拥有的功能有:个人中心、教师管理、学生管理、学生成绩管理、奖学金申请管理、评奖评优管理、奖项名称管理、学生处罚管理、管理员管理。管理用例图如图3-1所示

图3-1 管理员用例图

图3-2 教师用例图

图3-3 学生用例图

语言环境:Java: jdk1.8
数据库:Mysql: mysql5.7
应用服务器:Tomcat: tomcat8.5.31
开发工具:IDEA或eclipse
后台开发技术:springboot+mybatis
前台开发技术:nodejs+vue+elementUI
3.1 系统登录
用户使用系统进入登陆页面,根据页面填入对应账户信息并选择角色,点击登录进行登录操作。如图3-1所示

图3-1 系统登录页面图
3.2 管理员模块
管理员登录成功后进入管理员界面,管理员可通过选取对应功能并进行操作,其中有个人中心功能、教师管理功能、学生管理功能、学生成绩管理功能、奖学金申请管理功能、评奖评优管理功能、奖项名称管理功能、学生处罚管理、管理员管理等。如图3-2所示

图3-2 管理员功能页面图
教师管理:在教师管理页面可以对教师进行,增删改查等功能,并可以点开详情查看该教师的详情信息。如图3-3所示。

图3-3教师管理页面
学生管理:在学生管理页面可以对学生进行增删改查等功能,可以点开详情查看该学生的详情信息,查看学生的成绩,并对学生进行处分。如图5-4所示。

图3-4学生管理页面
学生成绩管理:在学生成绩管理页面可以对学生成绩进行增删改查等功能,并可以点开详情查看该学生的成绩详情。如图3-5所示。

图3-5学生成绩管理页面
奖学金申请管理:在奖学金管理页面可以对学生的奖学金申请进行审核,并且可以使用删除修改查询等功能修改奖学金申请信息,还可以点开详情查看该学生的奖学金申请详情。如图5-6所示。

图3-6奖学金申请管理页面
3.3 教师模块
教师登录成功后进入教师界面,教师可通过选取对应功能并进行操作,其中有个人中心功能、学生管理功能、学生成绩管理功能、奖学金申请管理功能、评奖评优管理功能、奖项名称、学生处罚管理功能等。如图5-11所示

图3-11教师页面
3.4 学生模块
学生登录成功后进入学生界面,学生可通过选取对应功能并进行操作,其中有个人中心功能、学生成绩管理功能、奖学金申请管理功能、评奖评优管理功能、学生处罚管理功能等。如图5-17所示

图3-17学生页面
-
- 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.MPUtil;
- import com.utils.PageUtils;
- import com.utils.R;
- import com.utils.ValidatorUtils;
-
- /**
- * 登录相关
- */
- @RequestMapping("users")
- @RestController
- public class UserController{
-
- @Autowired
- private UserService userService;
-
- @Autowired
- private TokenService tokenService;
-
- /**
- * 登录
- */
- @IgnoreAuth
- @PostMapping(value = "/login")
- public R login(String username, String password, String captcha, HttpServletRequest request) {
- UserEntity user = userService.selectOne(new EntityWrapper
().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
().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
().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
params,UserEntity user) { - EntityWrapper
ew = new EntityWrapper(); - 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
ew = new EntityWrapper(); - 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
().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);
- UserEntity u = userService.selectOne(new EntityWrapper
().eq("username", user.getUsername())); - if(u!=null && u.getId()!=user.getId() && u.getUsername().equals(user.getUsername())) {
- return R.error("用户名已存在。");
- }
- userService.updateById(user);//全部更新
- return R.ok();
- }
-
- /**
- * 删除
- */
- @RequestMapping("/delete")
- public R delete(@RequestBody Long[] ids){
- userService.deleteBatchIds(Arrays.asList(ids));
- return R.ok();
- }
- }
- 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.transaction.annotation.Transactional;
- import org.springframework.format.annotation.DateTimeFormat;
- 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.XueshengchengjiEntity;
- import com.entity.view.XueshengchengjiView;
-
- import com.service.XueshengchengjiService;
- import com.service.TokenService;
- import com.utils.PageUtils;
- import com.utils.R;
- import com.utils.MD5Util;
- import com.utils.MPUtil;
- import com.utils.CommonUtil;
- import java.io.IOException;
-
- /**
- * 学生成绩
- * 后端接口
- * @author
- * @email
- * @date 2022-07-29 07:02:57
- */
- @RestController
- @RequestMapping("/xueshengchengji")
- public class XueshengchengjiController {
- @Autowired
- private XueshengchengjiService xueshengchengjiService;
-
-
-
-
-
- /**
- * 后端列表
- */
- @RequestMapping("/page")
- public R page(@RequestParam Map
params,XueshengchengjiEntity xueshengchengji, - HttpServletRequest request){
- String tableName = request.getSession().getAttribute("tableName").toString();
- if(tableName.equals("xuesheng")) {
- xueshengchengji.setXuehao((String)request.getSession().getAttribute("username"));
- }
- EntityWrapper
ew = new EntityWrapper(); -
- PageUtils page = xueshengchengjiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, xueshengchengji), params), params));
-
- return R.ok().put("data", page);
- }
-
- /**
- * 前端列表
- */
- @IgnoreAuth
- @RequestMapping("/list")
- public R list(@RequestParam Map
params,XueshengchengjiEntity xueshengchengji, - HttpServletRequest request){
- EntityWrapper
ew = new EntityWrapper(); -
- PageUtils page = xueshengchengjiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, xueshengchengji), params), params));
- return R.ok().put("data", page);
- }
-
- /**
- * 列表
- */
- @RequestMapping("/lists")
- public R list( XueshengchengjiEntity xueshengchengji){
- EntityWrapper
ew = new EntityWrapper(); - ew.allEq(MPUtil.allEQMapPre( xueshengchengji, "xueshengchengji"));
- return R.ok().put("data", xueshengchengjiService.selectListView(ew));
- }
-
- /**
- * 查询
- */
- @RequestMapping("/query")
- public R query(XueshengchengjiEntity xueshengchengji){
- EntityWrapper< XueshengchengjiEntity> ew = new EntityWrapper< XueshengchengjiEntity>();
- ew.allEq(MPUtil.allEQMapPre( xueshengchengji, "xueshengchengji"));
- XueshengchengjiView xueshengchengjiView = xueshengchengjiService.selectView(ew);
- return R.ok("查询学生成绩成功").put("data", xueshengchengjiView);
- }
-
- /**
- * 后端详情
- */
- @RequestMapping("/info/{id}")
- public R info(@PathVariable("id") Long id){
- XueshengchengjiEntity xueshengchengji = xueshengchengjiService.selectById(id);
- return R.ok().put("data", xueshengchengji);
- }
-
- /**
- * 前端详情
- */
- @IgnoreAuth
- @RequestMapping("/detail/{id}")
- public R detail(@PathVariable("id") Long id){
- XueshengchengjiEntity xueshengchengji = xueshengchengjiService.selectById(id);
- return R.ok().put("data", xueshengchengji);
- }
-
-
-
-
- /**
- * 后端保存
- */
- @RequestMapping("/save")
- public R save(@RequestBody XueshengchengjiEntity xueshengchengji, HttpServletRequest request){
- xueshengchengji.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
- //ValidatorUtils.validateEntity(xueshengchengji);
- xueshengchengjiService.insert(xueshengchengji);
- return R.ok();
- }
-
- /**
- * 前端保存
- */
- @RequestMapping("/add")
- public R add(@RequestBody XueshengchengjiEntity xueshengchengji, HttpServletRequest request){
- xueshengchengji.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
- //ValidatorUtils.validateEntity(xueshengchengji);
- xueshengchengjiService.insert(xueshengchengji);
- return R.ok();
- }
-
- /**
- * 修改
- */
- @RequestMapping("/update")
- @Transactional
- public R update(@RequestBody XueshengchengjiEntity xueshengchengji, HttpServletRequest request){
- //ValidatorUtils.validateEntity(xueshengchengji);
- xueshengchengjiService.updateById(xueshengchengji);//全部更新
- return R.ok();
- }
-
-
- /**
- * 删除
- */
- @RequestMapping("/delete")
- public R delete(@RequestBody Long[] ids){
- xueshengchengjiService.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
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
wrapper = new EntityWrapper(); - 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("xuesheng")) {
- wrapper.eq("xuehao", (String)request.getSession().getAttribute("username"));
- }
-
- int count = xueshengchengjiService.selectCount(wrapper);
- return R.ok().put("count", count);
- }
-
-
-
-
-
-
-
-
- }
本项目基于Springboot+Mybatis+Nodejs+Vue+ElementUI开发实现了一套高校内部评奖评优管理系统,系统功能完整,界面简洁大方。