Springboot+Vue项目-基于Java+MySQL的校园疫情防控系统(附源码+演示视频+LW)

server/2024/10/18 18:27:54/

大家好!我是程序猿老A,感谢您阅读本文,欢迎一键三连哦。

💞当前专栏:Java毕业设计

精彩专栏推荐👇🏻👇🏻👇🏻

🎀 Python毕业设计
🌎微信小程序毕业设计

开发环境

开发语言:Java
框架:Springboot+Vue
JDK版本:JDK1.8
服务器:tomcat7
数据库:mysql 5.7
数据库工具:Navicat12
开发软件:eclipse/myeclipse/idea
Maven包:Maven3.3.9
浏览器:谷歌浏览器

演示视频

springboot291

原版高清演示视频-编号:291
https://pan.quark.cn/s/5cda95b17ee0

源码下载地址:

https://download.csdn.net/download/2301_76953549/89100205

LW目录

【如需全文请按文末获取联系】
在这里插入图片描述
在这里插入图片描述

目录

  • 开发环境
  • 演示视频
  • 源码下载地址:
  • LW目录
  • 一、项目简介
  • 二、系统设计
    • 2.1软件功能模块设计
    • 2.2数据库设计
  • 三、系统项目部分截图
    • 3.1管理员功能实现
    • 3.2教师功能实现
    • 3.3学生功能实现
  • 四、部分核心代码
    • 4.1 用户部分
  • 获取源码或论文

一、项目简介

校园疫情防控系统可以实现健康状态管理,学院管理,聊天室管理,教师管理,公告信息管理,健康表管理,学生请假管理等功能。该系统采用了Mysql数据库,Java语言,Spring Boot框架等技术进行编程实现。
校园疫情防控系统可以提高校园疫情防控信息管理问题的解决效率,优化校园疫情防控信息处理流程,保证校园疫情防控信息数据的安全,它是一个非常可靠,非常安全的应用程序。

二、系统设计

2.1软件功能模块设计

图4.1即为设计的管理员功能结构,管理员权限操作的功能包括查看学生的健康信息,管理聊天室信息,对教师,学生请假,学生,公告信息进行管理。
在这里插入图片描述
图4.2即为设计的教师功能结构,教师权限操作的功能包括发布聊天信息,回复聊天信息,查看学生健康信息,审核学生请假信息,查看学生信息等。
在这里插入图片描述

图4.3即为设计的学生功能结构,学生权限操作的功能包括管理聊天室的聊天信息,可以添加请假信息,查看教师对学生请假的处理结果信息,登记并管理学生自己的健康信息等。
在这里插入图片描述

2.2数据库设计

(1)图4.4即为教师这个实体所拥有的属性值。
在这里插入图片描述
(2)图4.5即为学生请假这个实体所拥有的属性值。
在这里插入图片描述
(3)图4.6即为学生这个实体所拥有的属性值。
在这里插入图片描述
(4)图4.7即为健康信息这个实体所拥有的属性值。
在这里插入图片描述
(5)图4.8即为上面介绍的实体中存在的联系。
在这里插入图片描述

三、系统项目部分截图

3.1管理员功能实现

教师管理
图5.1 即为编码实现的教师管理界面,教师信息包括教师姓名,学院,邮箱等信息,管理员对有错误数据的教师信息使用修改功能可以及时更正,需要删除的教师信息也能使用删除功能及时删除。
在这里插入图片描述学生管理
图5.2 即为编码实现的学生管理界面,管理员对学生数据可以添加,也能通过文件的形式导入学生数据。学生信息出现错误,管理员也能使用修改功能及时更正。
在这里插入图片描述

3.2教师功能实现

健康表查看
图5.4 即为编码实现的健康表查看界面,健康表信息包括健康状态,体温,学生姓名等信息,教师根据健康状态或学生姓名对学生的健康信息进行查询。
在这里插入图片描述
聊天室管理
图5.6 即为编码实现的聊天室管理界面,教师可以新增聊天,可以查看聊天室的回复信息,在查看聊天室的回复信息之后,教师也能发布聊天回复信息。
在这里插入图片描述

3.3学生功能实现

健康表管理
图5.7 即为编码实现的健康表管理界面,学生自己在健康表管理界面登记健康信息,包括学生的体温,详情等信息都需要登记,已经登记的有错误数据的健康信息可以进行修改。
在这里插入图片描述学生请假管理
图5.8 即为编码实现的学生请假管理界面,学生需要请假时,需要在学生请假管理界面添加请假的具体内容,包括请假原因和天数信息,最后等待教师处理学生请假信息。
在这里插入图片描述

四、部分核心代码

4.1 用户部分

java">
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("/dictionary")
public class DictionaryController {private static final Logger logger = LoggerFactory.getLogger(DictionaryController.class);@Autowiredprivate DictionaryService dictionaryService;@Autowiredprivate TokenService tokenService;//级联表service@Autowiredprivate YonghuService yonghuService;@Autowiredprivate JiaoshiService jiaoshiService;/*** 后端列表*/@RequestMapping("/page")@IgnoreAuthpublic R page(@RequestParam Map<String, Object> params, HttpServletRequest request){logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));if(params.get("orderBy")==null || params.get("orderBy")==""){params.put("orderBy","id");}PageUtils page = dictionaryService.queryPage(params);//字典表数据转换List<DictionaryView> list =(List<DictionaryView>)page.getList();for(DictionaryView 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);DictionaryEntity dictionary = dictionaryService.selectById(id);if(dictionary !=null){//entity转viewDictionaryView view = new DictionaryView();BeanUtils.copyProperties( dictionary , view );//把实体数据重构到view中//修改对应字典表字段dictionaryService.dictionaryConvert(view, request);return R.ok().put("data", view);}else {return R.error(511,"查不到数据");}}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody DictionaryEntity dictionary, HttpServletRequest request){logger.debug("save方法:,,Controller:{},,dictionary:{}",this.getClass().getName(),dictionary.toString());String role = String.valueOf(request.getSession().getAttribute("role"));if(false)return R.error(511,"永远不会进入");Wrapper<DictionaryEntity> queryWrapper = new EntityWrapper<DictionaryEntity>().eq("dic_code", dictionary.getDicCode()).eq("index_name", dictionary.getIndexName());if(dictionary.getDicCode().contains("_erji_types")){queryWrapper.eq("super_id",dictionary.getSuperId());}logger.info("sql语句:"+queryWrapper.getSqlSegment());DictionaryEntity dictionaryEntity = dictionaryService.selectOne(queryWrapper);if(dictionaryEntity==null){dictionary.setCreateTime(new Date());dictionaryService.insert(dictionary);//字典表新增数据,把数据再重新查出,放入监听器中List<DictionaryEntity> dictionaryEntities = dictionaryService.selectList(new EntityWrapper<DictionaryEntity>());ServletContext servletContext = request.getServletContext();Map<String, Map<Integer,String>> map = new HashMap<>();for(DictionaryEntity d :dictionaryEntities){Map<Integer, String> m = map.get(d.getDicCode());if(m ==null || m.isEmpty()){m = new HashMap<>();}m.put(d.getCodeIndex(),d.getIndexName());map.put(d.getDicCode(),m);}servletContext.setAttribute("dictionaryMap",map);return R.ok();}else {return R.error(511,"表中有相同数据");}}/*** 后端修改*/@RequestMapping("/update")public R update(@RequestBody DictionaryEntity dictionary, HttpServletRequest request){logger.debug("update方法:,,Controller:{},,dictionary:{}",this.getClass().getName(),dictionary.toString());String role = String.valueOf(request.getSession().getAttribute("role"));
//        if(false)
//            return R.error(511,"永远不会进入");//根据字段查询是否有相同数据Wrapper<DictionaryEntity> queryWrapper = new EntityWrapper<DictionaryEntity>().notIn("id",dictionary.getId()).eq("dic_code", dictionary.getDicCode()).eq("index_name", dictionary.getIndexName());if(dictionary.getDicCode().contains("_erji_types")){queryWrapper.eq("super_id",dictionary.getSuperId());}logger.info("sql语句:"+queryWrapper.getSqlSegment());DictionaryEntity dictionaryEntity = dictionaryService.selectOne(queryWrapper);if(dictionaryEntity==null){dictionaryService.updateById(dictionary);//根据id更新//如果字典表修改数据的话,把数据再重新查出,放入监听器中List<DictionaryEntity> dictionaryEntities = dictionaryService.selectList(new EntityWrapper<DictionaryEntity>());ServletContext servletContext = request.getServletContext();Map<String, Map<Integer,String>> map = new HashMap<>();for(DictionaryEntity d :dictionaryEntities){Map<Integer, String> m = map.get(d.getDicCode());if(m ==null || m.isEmpty()){m = new HashMap<>();}m.put(d.getCodeIndex(),d.getIndexName());map.put(d.getDicCode(),m);}servletContext.setAttribute("dictionaryMap",map);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());dictionaryService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 最大值*/@RequestMapping("/maxCodeIndex")public R maxCodeIndex(@RequestBody DictionaryEntity dictionary){logger.debug("maxCodeIndex:,,Controller:{},,dictionary:{}",this.getClass().getName(),dictionary.toString());List<String> descs = new ArrayList<>();descs.add("code_index");Wrapper<DictionaryEntity> queryWrapper = new EntityWrapper<DictionaryEntity>().eq("dic_code", dictionary.getDicCode()).orderDesc(descs);logger.info("sql语句:"+queryWrapper.getSqlSegment());List<DictionaryEntity> dictionaryEntityList = dictionaryService.selectList(queryWrapper);if(dictionaryEntityList != null ){return R.ok().put("maxCodeIndex",dictionaryEntityList.get(0).getCodeIndex()+1);}else{return R.ok().put("maxCodeIndex",1);}}/*** 批量上传*/@RequestMapping("/batchInsert")public R save( String fileName){logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);try {List<DictionaryEntity> dictionaryList = 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){//循环DictionaryEntity dictionaryEntity = new DictionaryEntity();
//                            dictionaryEntity.setDicCode(data.get(0));                    //字段 要改的
//                            dictionaryEntity.setDicName(data.get(0));                    //字段名 要改的
//                            dictionaryEntity.setCodeIndex(Integer.valueOf(data.get(0)));   //编码 要改的
//                            dictionaryEntity.setIndexName(data.get(0));                    //编码名字 要改的
//                            dictionaryEntity.setSuperId(Integer.valueOf(data.get(0)));   //父字段id 要改的
//                            dictionaryEntity.setBeizhu(data.get(0));                    //备注 要改的
//                            dictionaryEntity.setCreateTime(date);//时间dictionaryList.add(dictionaryEntity);//把要查询是否重复的字段放入map中}//查询是否重复dictionaryService.insertBatch(dictionaryList);return R.ok();}}}}catch (Exception e){return R.error(511,"批量插入数据异常,请联系管理员");}}}

获取源码或论文

如需对应的LW或源码,以及其他定制需求,也可以点我头像查看个人简介联系。


http://www.ppmy.cn/server/24576.html

相关文章

上门服务系统|上门服务小程序搭建流程

随着科技的不断进步和人们生活水平的提高&#xff0c;越来越多的服务开始向线上转型。传统的上门服务业也不例外&#xff0c;随着上门服务小程序的兴起&#xff0c;人们的生活变得更加便捷和高效。本文将为大家介绍上门服务小程序的搭建流程以及应用范围。 一、上门服务小程序搭…

数据库学习之常见的一些SQL命令

查看当前DBMS下所有数据库 show databases; 切换到某一个数据库 use 数据库名; 开启root的远程登录 update mysql.user set host"%" where user"root"; 刷新权限列表 flush privileges; 创建数据库 create database 数据库名称 删除数据库 drop…

vs2022 设置远程调试虚拟机Ubuntu程序 (cmake)

一 . 先将虚拟机设置为桥接模式 双击进入&#xff0c;勾选物理模式 点确定&#xff0c;然后重启虚拟机 二 . 打开ubuntu的ssh模式 使允许远程 altcontrol T 打开终端 sudo apt-get update sudo apt-get install openssh-server sudo systemctl start ssh sudo systemctl…

消息队列 RabbitMQ python实战

目录 RabbitMQ使用完整代码 Rabbitmq报错pika.exceptions.IncompatibleProtocolError StreamLostError (‘Transport indicated EOF‘,) 我的解决方法: 安装: pip install pika RabbitMQ使用完整代码 import asyncio import json import os import queue import time…

linux通过使用bash脚本同时运行多个命令

1、使用&&或||或;&#xff08;根据需要选择连接符号&#xff09;等来连接多条命令 && -> "与"&#xff0c;一条命令执行出错&#xff0c;则后面命令不执行 || -> "或"&#xff0c;一条命令执行成功&#x…

陶粒砂加气砌块中墙建材宝山奉贤崇明吴江姑苏虎丘aac加气砌块松江青浦吴中相城轻质砖苏州黄浦杨浦加气块闵行嘉定金山

陶粒砂加气砌块中墙建材宝山奉贤崇明吴江姑苏虎丘aac加气砌块松江青浦吴中相城轻质砖苏州黄浦杨浦加气块闵行嘉定金山 陶粒砂加气砌块是一种轻质、多孔的建筑材料&#xff0c;通常由水泥、细骨料&#xff08;如陶砂&#xff09;、粗骨料&#xff08;如陶粒&#xff09;、发泡剂…

20 | 幻读是什么,幻读有什么问题?

幻读是什么&#xff1f; 在可重复读隔离级别下&#xff0c;普通的查询是快照读&#xff0c;是不会看到别的事务插入的数据的。因此&#xff0c;幻读在“当前读”下才会出现。上面 session B 的修改结果&#xff0c;被 session A 之后的 select语句用“当前读”看到&#xff0c;…

25计算机考研院校数据分析 | 复旦大学

复旦大学(fudan University)&#xff0c;简称"复旦”&#xff0c;位于中国上海&#xff0c;由中华人民共和国教育部直属&#xff0c;中央直管副部级建制&#xff0c;位列985工程、211工程、双一流A类&#xff0c;入选“珠峰计划"、"111计划""2011计划…