基于java+ssm+vue的学籍管理系统

项目介绍

当下,如果还依然使用纸质文档来记录并且管理相关信息,可能会出现很多问题,比如原始文件的丢失,因为采用纸质文档,很容易受潮或者怕火,不容易备份,需要花费大量的人员和资金来管理用纸质文档存储的信息,最重要的是数据出现问题寻找起来很麻烦,并且修改也困难,如果还这样操作会造成很大的资源浪费和经济损失。所以,对于本课题研究的学生学籍信息的管理就需要有一款软件来代替手工操作,因此学籍管理系统就应运而生。

学籍管理系统运用的工具包括idea,Tomcat以及Navicat等。该系统可以实现成绩信息管理,电子文档管理,学科类型管理,文档类型管理,课程类型管理,公告类型管理,院系管理,政治面貌管理,课程信息管理,公告信息管理,学生管理等功能。

学籍管理系统就是采用目前最流行的互联网应用思维,让信息处理变得更加高效,并且处理结果更加的符合预期,只要是关于数据管理方面,不管是添加还是修改,以及数据维护甚至是数据迁移,都可以达到更快更安全的要求。

4.2 功能结构设计
在基于系统功能分析的基础之上,开始对系统的详细功能进行设计,最终将使用结构图的形式对设计的结果进行展示。
管理员具备的详细功能将参照最终的设计结果,即图4.1所示的管理员功能结构图。其中管理员增删改查学生成绩信息,公告信息,课程信息,学生信息,可以上传电子文档文件,管理电子文档信息等。
在这里插入图片描述
学生具备的详细功能将参照最终的设计结果,即图4.2所示的学生功能结构图。其中学生主要是对课程信息,公告信息,成绩信息进行查询和查看,可以下载电子文档文件,查看电子文档信息等。
在这里插入图片描述

开发环境

编程语言:Java
数据库 :Mysql
系统架构:B/S
后端框架:SSM
编译工具:idea或者eclipse,jdk1.8,maven
支持定做:java/php/python/android/小程序/vue/爬虫/c#/asp.net

系统实现

5.1 管理员功能实现
5.1.1 成绩信息管理
实现成绩信息管理功能,其界面运行的效果图见图5.1。在该界面,管理员修改,删除,查询学生成绩信息,学生成绩信息主要包括学科类型,成绩,学生姓名,头像,手机号,成绩标题等信息。
在这里插入图片描述

图5.1 成绩信息管理界面

5.1.2 电子文档管理
实现电子文档管理功能,其界面运行的效果图见图5.2。在该界面,管理员可以新增电子文档信息,电子文档包括文档标题,文档类型,学生姓名,手机号,头像等信息,管理员可以修改学生的电子文档信息,可以根据文档标题查询学生的电子文档信息。
在这里插入图片描述

图5.2 电子文档管理界面

5.1.3 课程信息管理
实现课程信息管理功能,其界面运行的效果图见图5.3。在该界面,管理员负责新增课程信息,课程信息有课程封面,课程文件,课程名称,教师等信息,如果在本界面,发现登记有误的课程信息,管理员可以使用修改功能及时更正。
在这里插入图片描述

图5.3 课程信息管理界面

5.1.4 学生管理
实现学生管理功能,其界面运行的效果图见图5.4。在该界面,管理员对学生的手机号,身份证号,性别,院系,政治面貌等信息进行登记,可以对存在登记错误的学生信息进行修改,也能查询学生等。
在这里插入图片描述

图5.4 学生管理界面

5.1.5 公告信息管理
实现公告信息管理功能,其界面运行的效果图见图5.5。在该界面,管理员需要每天发布公告,在本界面对公告进行管理,包括修改,删除。
在这里插入图片描述

图5.5 公告信息管理界面

5.2 学生功能实现
5.2.1 成绩信息查看
实现成绩信息查看功能,其界面运行的效果图见图5.6。在该界面,学生通过详情链接的点击可以查看成绩的详细内容,学生在查询编辑框中输入成绩标题可以查询成绩,可以选择学科类型筛选成绩信息,可以通过学生姓名查询学生成绩等。
在这里插入图片描述

图5.6 成绩信息查看界面

5.2.2 电子文档查看
实现电子文档查看功能,其界面运行的效果图见图5.7。在该界面,学生不仅可以查看电子文档的详细内容,也能下载电子文档文件,还可以在电子文档查看界面查询电子文档信息等。
在这里插入图片描述

图5.7 电子文档查看界面

5.2.3 课程信息查看
实现课程信息查看功能,其界面运行的效果图见图5.8。在该界面,学生不仅可以通过详情链接的点击来了解更多关于课程方面的信息,学生也能下载课程文件,在课程信息查看界面,可以根据课程类型筛选课程信息,可以根据教师姓名查询课程信息等。
在这里插入图片描述

图5.8 课程信息查看界面

核心代码

package com.controller;

import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;

import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;

/**
 * 成绩信息
 * 后端接口
 * @author
 * @email
*/
@RestController
@Controller
@RequestMapping("/chengji")
public class ChengjiController {
    private static final Logger logger = LoggerFactory.getLogger(ChengjiController.class);

    @Autowired
    private ChengjiService chengjiService;


    @Autowired
    private TokenService tokenService;
    @Autowired
    private DictionaryService dictionaryService;

    //级联表service
    @Autowired
    private YonghuService yonghuService;



    /**
    * 后端列表
    */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
        logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
        String role = String.valueOf(request.getSession().getAttribute("role"));
        if(false)
            return R.error(511,"永不会进入");
        else if("学生".equals(role))
            params.put("yonghuId",request.getSession().getAttribute("userId"));
        if(params.get("orderBy")==null || params.get("orderBy")==""){
            params.put("orderBy","id");
        }
        PageUtils page = chengjiService.queryPage(params);

        //字典表数据转换
        List<ChengjiView> list =(List<ChengjiView>)page.getList();
        for(ChengjiView c:list){
            //修改对应字典表字段
            dictionaryService.dictionaryConvert(c, request);
        }
        return R.ok().put("data", page);
    }

    /**
    * 后端详情
    */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id, HttpServletRequest request){
        logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
        ChengjiEntity chengji = chengjiService.selectById(id);
        if(chengji !=null){
            //entity转view
            ChengjiView view = new ChengjiView();
            BeanUtils.copyProperties( chengji , view );//把实体数据重构到view中

                //级联表
                YonghuEntity yonghu = yonghuService.selectById(chengji.getYonghuId());
                if(yonghu != null){
                    BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createTime", "insertTime", "updateTime"});//把级联的数据添加到view中,并排除id和创建时间字段
                    view.setYonghuId(yonghu.getId());
                }
            //修改对应字典表字段
            dictionaryService.dictionaryConvert(view, request);
            return R.ok().put("data", view);
        }else {
            return R.error(511,"查不到数据");
        }

    }

    /**
    * 后端保存
    */
    @RequestMapping("/save")
    public R save(@RequestBody ChengjiEntity chengji, HttpServletRequest request){
        logger.debug("save方法:,,Controller:{},,chengji:{}",this.getClass().getName(),chengji.toString());

        String role = String.valueOf(request.getSession().getAttribute("role"));
        if(false)
            return R.error(511,"永远不会进入");
        else if("学生".equals(role))
            chengji.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));

        Wrapper<ChengjiEntity> queryWrapper = new EntityWrapper<ChengjiEntity>()
            .eq("chengji_name", chengji.getChengjiName())
            .eq("chengji_types", chengji.getChengjiTypes())
            .eq("yonghu_id", chengji.getYonghuId())
            .eq("chengji", chengji.getChengji())
            ;

        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        ChengjiEntity chengjiEntity = chengjiService.selectOne(queryWrapper);
        if(chengjiEntity==null){
            chengji.setCreateTime(new Date());
            chengjiService.insert(chengji);
            return R.ok();
        }else {
            return R.error(511,"表中有相同数据");
        }
    }

    /**
    * 后端修改
    */
    @RequestMapping("/update")
    public R update(@RequestBody ChengjiEntity chengji, HttpServletRequest request){
        logger.debug("update方法:,,Controller:{},,chengji:{}",this.getClass().getName(),chengji.toString());

        String role = String.valueOf(request.getSession().getAttribute("role"));
//        if(false)
//            return R.error(511,"永远不会进入");
//        else if("学生".equals(role))
//            chengji.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
        //根据字段查询是否有相同数据
        Wrapper<ChengjiEntity> queryWrapper = new EntityWrapper<ChengjiEntity>()
            .notIn("id",chengji.getId())
            .andNew()
            .eq("chengji_name", chengji.getChengjiName())
            .eq("chengji_types", chengji.getChengjiTypes())
            .eq("yonghu_id", chengji.getYonghuId())
            .eq("chengji", chengji.getChengji())
            ;

        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        ChengjiEntity chengjiEntity = chengjiService.selectOne(queryWrapper);
        if("".equals(chengji.getChengjiFile()) || "null".equals(chengji.getChengjiFile())){
                chengji.setChengjiFile(null);
        }
        if(chengjiEntity==null){
            chengjiService.updateById(chengji);//根据id更新
            return R.ok();
        }else {
            return R.error(511,"表中有相同数据");
        }
    }

    /**
    * 删除
    */
    @RequestMapping("/delete")
    public R delete(@RequestBody Integer[] ids){
        logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
        chengjiService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }


    /**
     * 批量上传
     */
    @RequestMapping("/batchInsert")
    public R save( String fileName, HttpServletRequest request){
        logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);
        Integer yonghuId = Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")));
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        try {
            List<ChengjiEntity> chengjiList = new ArrayList<>();//上传的东西
            Map<String, List<String>> seachFields= new HashMap<>();//要查询的字段
            Date date = new Date();
            int lastIndexOf = fileName.lastIndexOf(".");
            if(lastIndexOf == -1){
                return R.error(511,"该文件没有后缀");
            }else{
                String suffix = fileName.substring(lastIndexOf);
                if(!".xls".equals(suffix)){
                    return R.error(511,"只支持后缀为xls的excel文件");
                }else{
                    URL resource = this.getClass().getClassLoader().getResource("../../upload/" + fileName);//获取文件路径
                    File file = new File(resource.getFile());
                    if(!file.exists()){
                        return R.error(511,"找不到上传文件,请联系管理员");
                    }else{
                        List<List<String>> dataList = PoiUtil.poiImport(file.getPath());//读取xls文件
                        dataList.remove(0);//删除第一行,因为第一行是提示
                        for(List<String> data:dataList){
                            //循环
                            ChengjiEntity chengjiEntity = new ChengjiEntity();
//                            chengjiEntity.setChengjiName(data.get(0));                    //成绩标题 要改的
//                            chengjiEntity.setChengjiTypes(Integer.valueOf(data.get(0)));   //学科类型 要改的
//                            chengjiEntity.setYonghuId(Integer.valueOf(data.get(0)));   //学生 要改的
//                            chengjiEntity.setChengji(Integer.valueOf(data.get(0)));   //成绩 要改的
//                            chengjiEntity.setChengjiFile(data.get(0));                    //成绩下载 要改的
//                            chengjiEntity.setChengjiContent("");//详情和图片
//                            chengjiEntity.setCreateTime(date);//时间
                            chengjiList.add(chengjiEntity);


                            //把要查询是否重复的字段放入map中
                        }

                        //查询是否重复
                        chengjiService.insertBatch(chengjiList);
                        return R.ok();
                    }
                }
            }
        }catch (Exception e){
            e.printStackTrace();
            return R.error(511,"批量插入数据异常,请联系管理员");
        }
    }






}

论文参考

在这里插入图片描述

目 录
第1章 绪论 1
1.1 选题动因 1
1.2 目的和意义 1
1.3 论文结构安排 2
第2章 开发环境与技术 3
2.1 Tomcat 简介 3
2.2 Eclipse简介 3
2.3 Navicat简介 4
第3章 系统分析 5
3.1 可行性分析 5
3.1.1 经济可行性 5
3.1.2 技术可行性 5
3.1.3 操作可行性 5
3.2 系统流程分析 6
3.3 系统性能分析 7
3.4 系统功能分析 8
第4章 系统设计 11
4.1 布局设计原则 11
4.2 功能结构设计 12
4.3 数据库设计 13
4.3.1 数据库E-R图设计 13
4.3.2 数据库表结构设计 16
第5章 系统实现 19
5.1 管理员功能实现 19
5.1.1 成绩信息管理 19
5.1.2 电子文档管理 19
5.1.3 课程信息管理 20
5.1.4 学生管理 20
5.1.5 公告信息管理 21
5.2 学生功能实现 21
5.2.1 成绩信息查看 21
5.2.2 电子文档查看 22
5.2.3 课程信息查看 22
第6章 系统测试 24
6.1 系统测试方法 24
6.2 功能测试 24
6.2.1 登录功能测试 24
6.2.2 课程查询功能测试 25
6.3 测试结果分析 25
结 论 26
参考文献 27
致 谢 28

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

qq_3306428634

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值