• 校内评奖评优|基于Springboot+Vue实现高校评优管理系统


    作者主页:编程指南针

    作者简介:Java领域优质创作者、CSDN博客专家 、掘金特邀作者、多年架构师设计经验、腾讯课堂常驻讲师

    主要内容:Java项目、毕业设计、简历模板、学习资料、面试题库、技术互助

    收藏点赞不迷路  关注作者有好处

    文末获取源码 

    项目编号:BS-GX-045 

    前言:

    本系统是根据实际的情况与要求而开发的一套完整的可实现的校内评奖评优系统,相较于以往的评奖评优系统来说,本系统使用索引减少检索的数据量,将无序的数据变成相对有序的数据,加快数据的检索速度,使系统的调用更加高效,更加的灵活方便,其功能齐全,一目了然,且能够快速导入学生数据,具有较高的安全性。校内评奖评优系统的目的主要在于为教务工作部门提供高效快捷的业务管理与事务处理的同时,使用安全可靠的技术,及时、准确、可靠地处理和传输信息,提高工作效率,机械代替人力,减少出错率。大学生奖学金评定管理并不是一项简单的工作,其耗时较长,涉及专业广泛,需要专业的开发人员、管理人员和相关业务人员的共同合作,只有发挥领导作用,才能有效协调各部门,保障评定管理工作的顺利开展[4]。

    一,项目简介

    根据校内评奖评优系统在实际应用中,采用前后端分离的开发方式,后台开发使用Springboot开发接口,前端开发使用Vue+EelementUIg后台基于将主要用户划分为管理员、教师、学生三类。

    管理员;管理员在校内评奖评优系统中主要拥有的功能有:个人中心、教师管理、学生管理、学生成绩管理、奖学金申请管理、评奖评优管理、奖项名称管理、学生处罚管理、管理员管理。管理用例图如图3-1所示

              

    图3-1 管理员用例图

    1. 教师;教师在校内评奖评优系统中主要拥有的功能有:个人中心、学生管理、学生成绩管理、奖学金申请管理、评奖评优管理、奖项名称管理、学生处罚管理

               

    图3-2 教师用例图

    1. 学生;学生在校内评奖评优系统中主要拥有的功能有:个人中心、学生成绩管理、奖学金申请管理、评奖评优管理、奖项名称管理、学生处罚管理

        

    图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学生页面

    四,核心代码展示

    1. package com.controller;
    2. import java.util.Arrays;
    3. import java.util.Calendar;
    4. import java.util.Date;
    5. import java.util.Map;
    6. import javax.servlet.http.HttpServletRequest;
    7. import org.springframework.beans.factory.annotation.Autowired;
    8. import org.springframework.stereotype.Controller;
    9. import org.springframework.web.bind.annotation.GetMapping;
    10. import org.springframework.web.bind.annotation.PathVariable;
    11. import org.springframework.web.bind.annotation.PostMapping;
    12. import org.springframework.web.bind.annotation.RequestBody;
    13. import org.springframework.web.bind.annotation.RequestMapping;
    14. import org.springframework.web.bind.annotation.RequestParam;
    15. import org.springframework.web.bind.annotation.ResponseBody;
    16. import org.springframework.web.bind.annotation.RestController;
    17. import com.annotation.IgnoreAuth;
    18. import com.baomidou.mybatisplus.mapper.EntityWrapper;
    19. import com.entity.TokenEntity;
    20. import com.entity.UserEntity;
    21. import com.service.TokenService;
    22. import com.service.UserService;
    23. import com.utils.CommonUtil;
    24. import com.utils.MPUtil;
    25. import com.utils.PageUtils;
    26. import com.utils.R;
    27. import com.utils.ValidatorUtils;
    28. /**
    29. * 登录相关
    30. */
    31. @RequestMapping("users")
    32. @RestController
    33. public class UserController{
    34. @Autowired
    35. private UserService userService;
    36. @Autowired
    37. private TokenService tokenService;
    38. /**
    39. * 登录
    40. */
    41. @IgnoreAuth
    42. @PostMapping(value = "/login")
    43. public R login(String username, String password, String captcha, HttpServletRequest request) {
    44. UserEntity user = userService.selectOne(new EntityWrapper().eq("username", username));
    45. if(user==null || !user.getPassword().equals(password)) {
    46. return R.error("账号或密码不正确");
    47. }
    48. String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());
    49. return R.ok().put("token", token);
    50. }
    51. /**
    52. * 注册
    53. */
    54. @IgnoreAuth
    55. @PostMapping(value = "/register")
    56. public R register(@RequestBody UserEntity user){
    57. // ValidatorUtils.validateEntity(user);
    58. if(userService.selectOne(new EntityWrapper().eq("username", user.getUsername())) !=null) {
    59. return R.error("用户已存在");
    60. }
    61. userService.insert(user);
    62. return R.ok();
    63. }
    64. /**
    65. * 退出
    66. */
    67. @GetMapping(value = "logout")
    68. public R logout(HttpServletRequest request) {
    69. request.getSession().invalidate();
    70. return R.ok("退出成功");
    71. }
    72. /**
    73. * 密码重置
    74. */
    75. @IgnoreAuth
    76. @RequestMapping(value = "/resetPass")
    77. public R resetPass(String username, HttpServletRequest request){
    78. UserEntity user = userService.selectOne(new EntityWrapper().eq("username", username));
    79. if(user==null) {
    80. return R.error("账号不存在");
    81. }
    82. user.setPassword("123456");
    83. userService.update(user,null);
    84. return R.ok("密码已重置为:123456");
    85. }
    86. /**
    87. * 列表
    88. */
    89. @RequestMapping("/page")
    90. public R page(@RequestParam Map params,UserEntity user){
    91. EntityWrapper ew = new EntityWrapper();
    92. PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));
    93. return R.ok().put("data", page);
    94. }
    95. /**
    96. * 列表
    97. */
    98. @RequestMapping("/list")
    99. public R list( UserEntity user){
    100. EntityWrapper ew = new EntityWrapper();
    101. ew.allEq(MPUtil.allEQMapPre( user, "user"));
    102. return R.ok().put("data", userService.selectListView(ew));
    103. }
    104. /**
    105. * 信息
    106. */
    107. @RequestMapping("/info/{id}")
    108. public R info(@PathVariable("id") String id){
    109. UserEntity user = userService.selectById(id);
    110. return R.ok().put("data", user);
    111. }
    112. /**
    113. * 获取用户的session用户信息
    114. */
    115. @RequestMapping("/session")
    116. public R getCurrUser(HttpServletRequest request){
    117. Long id = (Long)request.getSession().getAttribute("userId");
    118. UserEntity user = userService.selectById(id);
    119. return R.ok().put("data", user);
    120. }
    121. /**
    122. * 保存
    123. */
    124. @PostMapping("/save")
    125. public R save(@RequestBody UserEntity user){
    126. // ValidatorUtils.validateEntity(user);
    127. if(userService.selectOne(new EntityWrapper().eq("username", user.getUsername())) !=null) {
    128. return R.error("用户已存在");
    129. }
    130. userService.insert(user);
    131. return R.ok();
    132. }
    133. /**
    134. * 修改
    135. */
    136. @RequestMapping("/update")
    137. public R update(@RequestBody UserEntity user){
    138. // ValidatorUtils.validateEntity(user);
    139. UserEntity u = userService.selectOne(new EntityWrapper().eq("username", user.getUsername()));
    140. if(u!=null && u.getId()!=user.getId() && u.getUsername().equals(user.getUsername())) {
    141. return R.error("用户名已存在。");
    142. }
    143. userService.updateById(user);//全部更新
    144. return R.ok();
    145. }
    146. /**
    147. * 删除
    148. */
    149. @RequestMapping("/delete")
    150. public R delete(@RequestBody Long[] ids){
    151. userService.deleteBatchIds(Arrays.asList(ids));
    152. return R.ok();
    153. }
    154. }

    1. package com.controller;
    2. import java.text.SimpleDateFormat;
    3. import java.util.ArrayList;
    4. import java.util.Arrays;
    5. import java.util.Calendar;
    6. import java.util.Map;
    7. import java.util.HashMap;
    8. import java.util.Iterator;
    9. import java.util.Date;
    10. import java.util.List;
    11. import javax.servlet.http.HttpServletRequest;
    12. import com.utils.ValidatorUtils;
    13. import org.apache.commons.lang3.StringUtils;
    14. import org.springframework.beans.factory.annotation.Autowired;
    15. import org.springframework.transaction.annotation.Transactional;
    16. import org.springframework.format.annotation.DateTimeFormat;
    17. import org.springframework.web.bind.annotation.PathVariable;
    18. import org.springframework.web.bind.annotation.RequestBody;
    19. import org.springframework.web.bind.annotation.RequestMapping;
    20. import org.springframework.web.bind.annotation.RequestParam;
    21. import org.springframework.web.bind.annotation.RestController;
    22. import com.baomidou.mybatisplus.mapper.EntityWrapper;
    23. import com.baomidou.mybatisplus.mapper.Wrapper;
    24. import com.annotation.IgnoreAuth;
    25. import com.entity.XueshengchengjiEntity;
    26. import com.entity.view.XueshengchengjiView;
    27. import com.service.XueshengchengjiService;
    28. import com.service.TokenService;
    29. import com.utils.PageUtils;
    30. import com.utils.R;
    31. import com.utils.MD5Util;
    32. import com.utils.MPUtil;
    33. import com.utils.CommonUtil;
    34. import java.io.IOException;
    35. /**
    36. * 学生成绩
    37. * 后端接口
    38. * @author
    39. * @email
    40. * @date 2022-07-29 07:02:57
    41. */
    42. @RestController
    43. @RequestMapping("/xueshengchengji")
    44. public class XueshengchengjiController {
    45. @Autowired
    46. private XueshengchengjiService xueshengchengjiService;
    47. /**
    48. * 后端列表
    49. */
    50. @RequestMapping("/page")
    51. public R page(@RequestParam Map params,XueshengchengjiEntity xueshengchengji,
    52. HttpServletRequest request){
    53. String tableName = request.getSession().getAttribute("tableName").toString();
    54. if(tableName.equals("xuesheng")) {
    55. xueshengchengji.setXuehao((String)request.getSession().getAttribute("username"));
    56. }
    57. EntityWrapper ew = new EntityWrapper();
    58. PageUtils page = xueshengchengjiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, xueshengchengji), params), params));
    59. return R.ok().put("data", page);
    60. }
    61. /**
    62. * 前端列表
    63. */
    64. @IgnoreAuth
    65. @RequestMapping("/list")
    66. public R list(@RequestParam Map params,XueshengchengjiEntity xueshengchengji,
    67. HttpServletRequest request){
    68. EntityWrapper ew = new EntityWrapper();
    69. PageUtils page = xueshengchengjiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, xueshengchengji), params), params));
    70. return R.ok().put("data", page);
    71. }
    72. /**
    73. * 列表
    74. */
    75. @RequestMapping("/lists")
    76. public R list( XueshengchengjiEntity xueshengchengji){
    77. EntityWrapper ew = new EntityWrapper();
    78. ew.allEq(MPUtil.allEQMapPre( xueshengchengji, "xueshengchengji"));
    79. return R.ok().put("data", xueshengchengjiService.selectListView(ew));
    80. }
    81. /**
    82. * 查询
    83. */
    84. @RequestMapping("/query")
    85. public R query(XueshengchengjiEntity xueshengchengji){
    86. EntityWrapper< XueshengchengjiEntity> ew = new EntityWrapper< XueshengchengjiEntity>();
    87. ew.allEq(MPUtil.allEQMapPre( xueshengchengji, "xueshengchengji"));
    88. XueshengchengjiView xueshengchengjiView = xueshengchengjiService.selectView(ew);
    89. return R.ok("查询学生成绩成功").put("data", xueshengchengjiView);
    90. }
    91. /**
    92. * 后端详情
    93. */
    94. @RequestMapping("/info/{id}")
    95. public R info(@PathVariable("id") Long id){
    96. XueshengchengjiEntity xueshengchengji = xueshengchengjiService.selectById(id);
    97. return R.ok().put("data", xueshengchengji);
    98. }
    99. /**
    100. * 前端详情
    101. */
    102. @IgnoreAuth
    103. @RequestMapping("/detail/{id}")
    104. public R detail(@PathVariable("id") Long id){
    105. XueshengchengjiEntity xueshengchengji = xueshengchengjiService.selectById(id);
    106. return R.ok().put("data", xueshengchengji);
    107. }
    108. /**
    109. * 后端保存
    110. */
    111. @RequestMapping("/save")
    112. public R save(@RequestBody XueshengchengjiEntity xueshengchengji, HttpServletRequest request){
    113. xueshengchengji.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    114. //ValidatorUtils.validateEntity(xueshengchengji);
    115. xueshengchengjiService.insert(xueshengchengji);
    116. return R.ok();
    117. }
    118. /**
    119. * 前端保存
    120. */
    121. @RequestMapping("/add")
    122. public R add(@RequestBody XueshengchengjiEntity xueshengchengji, HttpServletRequest request){
    123. xueshengchengji.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    124. //ValidatorUtils.validateEntity(xueshengchengji);
    125. xueshengchengjiService.insert(xueshengchengji);
    126. return R.ok();
    127. }
    128. /**
    129. * 修改
    130. */
    131. @RequestMapping("/update")
    132. @Transactional
    133. public R update(@RequestBody XueshengchengjiEntity xueshengchengji, HttpServletRequest request){
    134. //ValidatorUtils.validateEntity(xueshengchengji);
    135. xueshengchengjiService.updateById(xueshengchengji);//全部更新
    136. return R.ok();
    137. }
    138. /**
    139. * 删除
    140. */
    141. @RequestMapping("/delete")
    142. public R delete(@RequestBody Long[] ids){
    143. xueshengchengjiService.deleteBatchIds(Arrays.asList(ids));
    144. return R.ok();
    145. }
    146. /**
    147. * 提醒接口
    148. */
    149. @RequestMapping("/remind/{columnName}/{type}")
    150. public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
    151. @PathVariable("type") String type,@RequestParam Map map) {
    152. map.put("column", columnName);
    153. map.put("type", type);
    154. if(type.equals("2")) {
    155. SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
    156. Calendar c = Calendar.getInstance();
    157. Date remindStartDate = null;
    158. Date remindEndDate = null;
    159. if(map.get("remindstart")!=null) {
    160. Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
    161. c.setTime(new Date());
    162. c.add(Calendar.DAY_OF_MONTH,remindStart);
    163. remindStartDate = c.getTime();
    164. map.put("remindstart", sdf.format(remindStartDate));
    165. }
    166. if(map.get("remindend")!=null) {
    167. Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
    168. c.setTime(new Date());
    169. c.add(Calendar.DAY_OF_MONTH,remindEnd);
    170. remindEndDate = c.getTime();
    171. map.put("remindend", sdf.format(remindEndDate));
    172. }
    173. }
    174. Wrapper wrapper = new EntityWrapper();
    175. if(map.get("remindstart")!=null) {
    176. wrapper.ge(columnName, map.get("remindstart"));
    177. }
    178. if(map.get("remindend")!=null) {
    179. wrapper.le(columnName, map.get("remindend"));
    180. }
    181. String tableName = request.getSession().getAttribute("tableName").toString();
    182. if(tableName.equals("xuesheng")) {
    183. wrapper.eq("xuehao", (String)request.getSession().getAttribute("username"));
    184. }
    185. int count = xueshengchengjiService.selectCount(wrapper);
    186. return R.ok().put("count", count);
    187. }
    188. }

    五,项目总结

        本项目基于Springboot+Mybatis+Nodejs+Vue+ElementUI开发实现了一套高校内部评奖评优管理系统,系统功能完整,界面简洁大方。

  • 相关阅读:
    request模块中,常见的状态码返回含义
    django实现用户的注册、登录、注销功能
    微信小程序选择图片可删除,可查看大图
    架构师必须了解的 5 种最佳软件架构模式
    Ubuntu 安装 CUDA 与 OPENCL
    【LangChain系列 9】Prompt模版——MessagePromptTemplate
    电气走线——部件、线缆、线号、端子排
    S4系统编辑屏幕报错 报错 RFC callback call rejected by whitelist
    linux下安装node环境
    TCP重传,滑动窗口,流量控制,拥塞控制
  • 原文地址:https://blog.csdn.net/whirlwind526/article/details/128103394