• SpringBoot+Vue+Element-UI实现学生综合成绩测评系统


    文末获取源码

    开发语言:Java

    框架:springboot

    JDK版本:JDK1.8

    服务器:tomcat7

    数据库:mysql 5.7/8.0

    数据库工具:Navicat11

    开发软件:eclipse/myeclipse/idea

    Maven包:Maven3.3.9

    浏览器:谷歌浏览器

    前言介绍 

    学生成绩是高校人才培养计划的重要组成部分,是实现人才培养目标、培养学生科研能力与创新思维、检验学生综合素质与实践能力的重要手段与综合性实践教学环节。而学生所在学院多采用半手工管理学生成绩的方式,所以有必要开发学生综合成绩测评系统来对学生成绩档案进行数字化管理。既可减轻学院教职员工工作压力,比较系统地对教务、教学上的各项服务和信息进行管理,又可加快成绩查询速度、加强成绩管理,跟上国家各部门关于信息化的步伐,使各项管理更加规范化。 正是针对上述问题,本论文对学生综合成绩测评系统的开发过程进行了较为详细的论述,本程序采用B/S架构、springboot 框架和 java 开发的 Web 框架, eclipse开发工具。

    学生综合成绩测评系统的主要使用者分为管理员、教师和学生,实现功能包括(1)管理员权限:首页、个人中心、通知公告管理、学生管理、教师管理、毕业要求管理、学分建议管理、班级建议管理、课程信息管理、课堂点名管理、课程成绩管理、加分提交管理、奖学金提交管理、疫情打卡管理、留言板管理、论坛交流、系统管理等功能。(2)教师后台权限:首页、个人中心、通知公告管理、学生管理、毕业要求管理、学分建议管理、班级建议管理、课程信息管理、课堂点名管理、课程成绩管理、加分申请管理、加分提交管理、奖学金申请管理、奖学金提交管理、疫情打卡管理、留言板管理等等。学生后台权限:首页、个人中心、通知公告管理、毕业要求管理、学分建议管理、课堂点名管理、课程成绩管理、加分申请管理、加分提交管理、奖学金申请管理、奖学金提交管理、疫情打卡管理、留言板管理等等。由于本网站的功能模块设计比较全面,所以使得整个学生成绩管理系统信息管理的过程得以实现。

    本系统的使用可以实现本学生成绩管理系统信息管理信息化,可以方便管理员进行更加方便快捷的管理,可以提高工作人员的管理效率。

    系统展示 

    首页

    校园资讯

    管理员页面

    课程信息管理

    课程成绩管理

    学生页面

    教师页面

    部分核心代码

    课程成绩

    1. RestController
    2. @RequestMapping("/kechengchengji")
    3. public class KechengchengjiController {
    4. @Autowired
    5. private KechengchengjiService kechengchengjiService;
    6. /**
    7. * 后端列表
    8. */
    9. @RequestMapping("/page")
    10. public R page(@RequestParam Map<String, Object> params,KechengchengjiEntity kechengchengji,
    11. HttpServletRequest request){
    12. String tableName = request.getSession().getAttribute("tableName").toString();
    13. if(tableName.equals("jiaoshi")) {
    14. kechengchengji.setJiaoshizhanghao((String)request.getSession().getAttribute("username"));
    15. }
    16. if(tableName.equals("xuesheng")) {
    17. kechengchengji.setXuehao((String)request.getSession().getAttribute("username"));
    18. }
    19. EntityWrapper<KechengchengjiEntity> ew = new EntityWrapper<KechengchengjiEntity>();
    20. PageUtils page = kechengchengjiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, kechengchengji), params), params));
    21. return R.ok().put("data", page);
    22. }
    23. /**
    24. * 前端列表
    25. */
    26. @IgnoreAuth
    27. @RequestMapping("/list")
    28. public R list(@RequestParam Map<String, Object> params,KechengchengjiEntity kechengchengji,
    29. HttpServletRequest request){
    30. EntityWrapper<KechengchengjiEntity> ew = new EntityWrapper<KechengchengjiEntity>();
    31. PageUtils page = kechengchengjiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, kechengchengji), params), params));
    32. return R.ok().put("data", page);
    33. }
    34. /**
    35. * 列表
    36. */
    37. @RequestMapping("/lists")
    38. public R list( KechengchengjiEntity kechengchengji){
    39. EntityWrapper<KechengchengjiEntity> ew = new EntityWrapper<KechengchengjiEntity>();
    40. ew.allEq(MPUtil.allEQMapPre( kechengchengji, "kechengchengji"));
    41. return R.ok().put("data", kechengchengjiService.selectListView(ew));
    42. }
    43. /**
    44. * 查询
    45. */
    46. @RequestMapping("/query")
    47. public R query(KechengchengjiEntity kechengchengji){
    48. EntityWrapper< KechengchengjiEntity> ew = new EntityWrapper< KechengchengjiEntity>();
    49. ew.allEq(MPUtil.allEQMapPre( kechengchengji, "kechengchengji"));
    50. KechengchengjiView kechengchengjiView = kechengchengjiService.selectView(ew);
    51. return R.ok("查询课程成绩成功").put("data", kechengchengjiView);
    52. }
    53. /**
    54. * 后端详情
    55. */
    56. @RequestMapping("/info/{id}")
    57. public R info(@PathVariable("id") Long id){
    58. KechengchengjiEntity kechengchengji = kechengchengjiService.selectById(id);
    59. return R.ok().put("data", kechengchengji);
    60. }
    61. /**
    62. * 前端详情
    63. */
    64. @IgnoreAuth
    65. @RequestMapping("/detail/{id}")
    66. public R detail(@PathVariable("id") Long id){
    67. KechengchengjiEntity kechengchengji = kechengchengjiService.selectById(id);
    68. return R.ok().put("data", kechengchengji);
    69. }
    70. /**
    71. * 后端保存
    72. */
    73. @RequestMapping("/save")
    74. public R save(@RequestBody KechengchengjiEntity kechengchengji, HttpServletRequest request){
    75. kechengchengji.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    76. //ValidatorUtils.validateEntity(kechengchengji);
    77. kechengchengjiService.insert(kechengchengji);
    78. return R.ok();
    79. }
    80. /**
    81. * 前端保存
    82. */
    83. @RequestMapping("/add")
    84. public R add(@RequestBody KechengchengjiEntity kechengchengji, HttpServletRequest request){
    85. kechengchengji.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    86. //ValidatorUtils.validateEntity(kechengchengji);
    87. kechengchengjiService.insert(kechengchengji);
    88. return R.ok();
    89. }
    90. /**
    91. * 修改
    92. */
    93. @RequestMapping("/update")
    94. public R update(@RequestBody KechengchengjiEntity kechengchengji, HttpServletRequest request){
    95. //ValidatorUtils.validateEntity(kechengchengji);
    96. kechengchengjiService.updateById(kechengchengji);//全部更新
    97. return R.ok();
    98. }
    99. /**
    100. * 删除
    101. */
    102. @RequestMapping("/delete")
    103. public R delete(@RequestBody Long[] ids){
    104. kechengchengjiService.deleteBatchIds(Arrays.asList(ids));
    105. return R.ok();
    106. }
    107. /**
    108. * 提醒接口
    109. */
    110. @RequestMapping("/remind/{columnName}/{type}")
    111. public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
    112. @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
    113. map.put("column", columnName);
    114. map.put("type", type);
    115. if(type.equals("2")) {
    116. SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
    117. Calendar c = Calendar.getInstance();
    118. Date remindStartDate = null;
    119. Date remindEndDate = null;
    120. if(map.get("remindstart")!=null) {
    121. Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
    122. c.setTime(new Date());
    123. c.add(Calendar.DAY_OF_MONTH,remindStart);
    124. remindStartDate = c.getTime();
    125. map.put("remindstart", sdf.format(remindStartDate));
    126. }
    127. if(map.get("remindend")!=null) {
    128. Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
    129. c.setTime(new Date());
    130. c.add(Calendar.DAY_OF_MONTH,remindEnd);
    131. remindEndDate = c.getTime();
    132. map.put("remindend", sdf.format(remindEndDate));
    133. }
    134. }
    135. Wrapper<KechengchengjiEntity> wrapper = new EntityWrapper<KechengchengjiEntity>();
    136. if(map.get("remindstart")!=null) {
    137. wrapper.ge(columnName, map.get("remindstart"));
    138. }
    139. if(map.get("remindend")!=null) {
    140. wrapper.le(columnName, map.get("remindend"));
    141. }
    142. String tableName = request.getSession().getAttribute("tableName").toString();
    143. if(tableName.equals("jiaoshi")) {
    144. wrapper.eq("jiaoshizhanghao", (String)request.getSession().getAttribute("username"));
    145. }
    146. if(tableName.equals("xuesheng")) {
    147. wrapper.eq("xuehao", (String)request.getSession().getAttribute("username"));
    148. }
    149. int count = kechengchengjiService.selectCount(wrapper);
    150. return R.ok().put("count", count);
    151. }
    152. }

     上传文件

    1. /**
    2. * 上传文件映射表
    3. */
    4. @RestController
    5. @RequestMapping("file")
    6. @SuppressWarnings({"unchecked","rawtypes"})
    7. public class FileController{
    8. @Autowired
    9. private ConfigService configService;
    10. /**
    11. * 上传文件
    12. */
    13. @RequestMapping("/upload")
    14. public R upload(@RequestParam("file") MultipartFile file,String type) throws Exception {
    15. if (file.isEmpty()) {
    16. throw new EIException("上传文件不能为空");
    17. }
    18. String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);
    19. File path = new File(ResourceUtils.getURL("classpath:static").getPath());
    20. if(!path.exists()) {
    21. path = new File("");
    22. }
    23. File upload = new File(path.getAbsolutePath(),"/upload/");
    24. if(!upload.exists()) {
    25. upload.mkdirs();
    26. }
    27. String fileName = new Date().getTime()+"."+fileExt;
    28. File dest = new File(upload.getAbsolutePath()+"/"+fileName);
    29. file.transferTo(dest);
    30. /**
    31. * 如果使用idea或者eclipse重启项目,发现之前上传的图片或者文件丢失,将下面一行代码注释打开
    32. * 请将以下的"D:\\springbootq33sd\\src\\main\\resources\\static\\upload"替换成你本地项目的upload路径,
    33. * 并且项目路径不能存在中文、空格等特殊字符
    34. */
    35. // FileUtils.copyFile(dest, new File("D:\\springbootq33sd\\src\\main\\resources\\static\\upload"+"/"+fileName)); /**修改了路径以后请将该行最前面的//注释去掉**/
    36. if(StringUtils.isNotBlank(type) && type.equals("1")) {
    37. ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
    38. if(configEntity==null) {
    39. configEntity = new ConfigEntity();
    40. configEntity.setName("faceFile");
    41. configEntity.setValue(fileName);
    42. } else {
    43. configEntity.setValue(fileName);
    44. }
    45. configService.insertOrUpdate(configEntity);
    46. }
    47. return R.ok().put("file", fileName);
    48. }
    49. /**
    50. * 下载文件
    51. */
    52. @IgnoreAuth
    53. @RequestMapping("/download")
    54. public ResponseEntity<byte[]> download(@RequestParam String fileName) {
    55. try {
    56. File path = new File(ResourceUtils.getURL("classpath:static").getPath());
    57. if(!path.exists()) {
    58. path = new File("");
    59. }
    60. File upload = new File(path.getAbsolutePath(),"/upload/");
    61. if(!upload.exists()) {
    62. upload.mkdirs();
    63. }
    64. File file = new File(upload.getAbsolutePath()+"/"+fileName);
    65. if(file.exists()){
    66. /*if(!fileService.canRead(file, SessionManager.getSessionUser())){
    67. getResponse().sendError(403);
    68. }*/
    69. HttpHeaders headers = new HttpHeaders();
    70. headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);
    71. headers.setContentDispositionFormData("attachment", fileName);
    72. return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED);
    73. }
    74. } catch (IOException e) {
    75. e.printStackTrace();
    76. }
    77. return new ResponseEntity<byte[]>(HttpStatus.INTERNAL_SERVER_ERROR);
    78. }
    79. }

  • 相关阅读:
    Logrus日志框架:简介与入门指南
    一个在线下载地图XYZ瓦片的网站实现
    BUUCTF pwn1_sctf_2016 1
    戴尔数据避风港方案 可有效提升企业数据安全
    ZooKeeper学习笔记
    C++引用(起别名)
    【开题报告】基于uni-app的污水处理厂的工单处理APP的设计与实现
    独家 | 如何比较两个或多个分布形态(附链接)
    Java 拷贝
    从useEffect看React、Vue设计理念的不同
  • 原文地址:https://blog.csdn.net/m0_49113107/article/details/126626659