基于java+springboot+vue的疫情打卡健康评测系统

本文介绍了疫情打卡健康评测系统,该系统采用Java编程语言,SpringBoot框架和Mysql数据库,旨在解决纸质文档管理的不便,提供学生返校申请、试题、考试、打卡和留言等信息的高效管理。系统实现了包括管理员和学生在内的多种功能,确保数据的安全和高效处理。
摘要由CSDN通过智能技术生成

项目介绍

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

疫情打卡健康评测系统运用的工具包括idea以及Navicat等。该系统可以实现学生返校申请管理,试题管理,考试管理,打卡管理,留言板管理,资讯信息管理,居家管理,学生管理,试卷管理等功能。

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

4.2 功能结构设计
在基于系统功能分析的基础之上,开始对系统的详细功能进行设计,最终将使用结构图的形式对设计的结果进行展示。

管理员具备的详细功能将参照最终的设计结果,即图4.1所示的管理员功能结构图。其中管理员审核学生返校申请信息,管理学生居家,学生打卡,学生留言,试卷,试题以及学生考试信息等。
在这里插入图片描述
学生具备的详细功能将参照最终的设计结果,即图4.2所示的学生功能结构图。其中学生选择试卷进行考试,查看考试得分信息,添加学生返校申请信息,添加并管理打卡和居家信息。
在这里插入图片描述

开发环境

编程语言:Java
数据库 :Mysql
系统架构:B/S
后端框架:SpringBoot
编译工具: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 打卡管理界面

5.2.4 居家管理
实现居家管理功能,其界面运行的效果图见图5.9。在该界面,学生登记居家状态,居家日期,居家位置等信息,查询,修改居家信息等。
在这里插入图片描述

图5.9 居家管理界面

5.2.5 学生返校申请管理
实现学生返校申请管理功能,其界面运行的效果图见图5.10。在该界面,学生登记健康码,行程码,核酸检测报告等信息,查看管理员对学生返校申请的审核情况。
在这里插入图片描述

图5.10 学生返校申请管理界面

核心代码

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("/xueshengjujia")
public class XueshengjujiaController {
    private static final Logger logger = LoggerFactory.getLogger(XueshengjujiaController.class);

    @Autowired
    private XueshengjujiaService xueshengjujiaService;


    @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 = xueshengjujiaService.queryPage(params);

        //字典表数据转换
        List<XueshengjujiaView> list =(List<XueshengjujiaView>)page.getList();
        for(XueshengjujiaView 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);
        XueshengjujiaEntity xueshengjujia = xueshengjujiaService.selectById(id);
        if(xueshengjujia !=null){
            //entity转view
            XueshengjujiaView view = new XueshengjujiaView();
            BeanUtils.copyProperties( xueshengjujia , view );//把实体数据重构到view中

                //级联表
                YonghuEntity yonghu = yonghuService.selectById(xueshengjujia.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 XueshengjujiaEntity xueshengjujia, HttpServletRequest request){
        logger.debug("save方法:,,Controller:{},,xueshengjujia:{}",this.getClass().getName(),xueshengjujia.toString());

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

        Wrapper<XueshengjujiaEntity> queryWrapper = new EntityWrapper<XueshengjujiaEntity>()
            .eq("yonghu_id", xueshengjujia.getYonghuId())
            .eq("xueshengjujia_zhuangtai_types", xueshengjujia.getXueshengjujiaZhuangtaiTypes())
            .eq("jujia_time", new SimpleDateFormat("yyyy-MM-dd").format(xueshengjujia.getJujiaTime()))
            .eq("xueshengjujia_address", xueshengjujia.getXueshengjujiaAddress())
            ;

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

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

        String role = String.valueOf(request.getSession().getAttribute("role"));
//        if(false)
//            return R.error(511,"永远不会进入");
//        else if("学生".equals(role))
//            xueshengjujia.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
        //根据字段查询是否有相同数据
        Wrapper<XueshengjujiaEntity> queryWrapper = new EntityWrapper<XueshengjujiaEntity>()
            .notIn("id",xueshengjujia.getId())
            .andNew()
            .eq("yonghu_id", xueshengjujia.getYonghuId())
            .eq("xueshengjujia_zhuangtai_types", xueshengjujia.getXueshengjujiaZhuangtaiTypes())
            .eq("jujia_time", new SimpleDateFormat("yyyy-MM-dd").format(xueshengjujia.getJujiaTime()))
            .eq("xueshengjujia_address", xueshengjujia.getXueshengjujiaAddress())
            ;

        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        XueshengjujiaEntity xueshengjujiaEntity = xueshengjujiaService.selectOne(queryWrapper);
        if(xueshengjujiaEntity==null){
            xueshengjujiaService.updateById(xueshengjujia);//根据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());
        xueshengjujiaService.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<XueshengjujiaEntity> xueshengjujiaList = 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("static/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){
                            //循环
                            XueshengjujiaEntity xueshengjujiaEntity = new XueshengjujiaEntity();
//                            xueshengjujiaEntity.setYonghuId(Integer.valueOf(data.get(0)));   //学生 要改的
//                            xueshengjujiaEntity.setXueshengjujiaZhuangtaiTypes(Integer.valueOf(data.get(0)));   //居家状态 要改的
//                            xueshengjujiaEntity.setJujiaTime(sdf.parse(data.get(0)));          //居家日期 要改的
//                            xueshengjujiaEntity.setXueshengjujiaAddress(data.get(0));                    //居家位置 要改的
//                            xueshengjujiaEntity.setXueshengjujiaContent("");//详情和图片
//                            xueshengjujiaEntity.setCreateTime(date);//时间
                            xueshengjujiaList.add(xueshengjujiaEntity);


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

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





    /**
    * 前端列表
    */
    @IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
        logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));

        // 没有指定排序字段就默认id倒序
        if(StringUtil.isEmpty(String.valueOf(params.get("orderBy")))){
            params.put("orderBy","id");
        }
        PageUtils page = xueshengjujiaService.queryPage(params);

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

    /**
    * 前端详情
    */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id, HttpServletRequest request){
        logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
        XueshengjujiaEntity xueshengjujia = xueshengjujiaService.selectById(id);
            if(xueshengjujia !=null){


                //entity转view
                XueshengjujiaView view = new XueshengjujiaView();
                BeanUtils.copyProperties( xueshengjujia , view );//把实体数据重构到view中

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


    /**
    * 前端保存
    */
    @RequestMapping("/add")
    public R add(@RequestBody XueshengjujiaEntity xueshengjujia, HttpServletRequest request){
        logger.debug("add方法:,,Controller:{},,xueshengjujia:{}",this.getClass().getName(),xueshengjujia.toString());
        Wrapper<XueshengjujiaEntity> queryWrapper = new EntityWrapper<XueshengjujiaEntity>()
            .eq("yonghu_id", xueshengjujia.getYonghuId())
            .eq("xueshengjujia_zhuangtai_types", xueshengjujia.getXueshengjujiaZhuangtaiTypes())
            .eq("xueshengjujia_address", xueshengjujia.getXueshengjujiaAddress())
            ;
        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        XueshengjujiaEntity xueshengjujiaEntity = xueshengjujiaService.selectOne(queryWrapper);
        if(xueshengjujiaEntity==null){
            xueshengjujia.setCreateTime(new Date());
        xueshengjujiaService.insert(xueshengjujia);
            return R.ok();
        }else {
            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章 系统实现 21
5.1 管理员功能实现 21
5.1.1 学生返校申请管理 21
5.1.2 试卷管理 21
5.1.3 试题管理 22
5.1.4 留言板管理 22
5.1.5 考试管理 23
5.2 学生功能实现 23
5.2.1 试卷表 23
5.2.2 在线考试 24
5.2.3 打卡管理 24
5.2.4 居家管理 25
5.2.5 学生返校申请管理 25
第6章 系统测试 27
6.1 系统测试方法 27
6.2 功能测试 27
6.2.1 登录功能测试 27
6.2.2 打卡查询功能测试 28
6.3 测试结果分析 28
结 论 29
参考文献 30
致 谢 31

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值