基于jsp+sevlet+spring+mysql实现校园疫情防控管理信息系统

@

一、系统介绍

系统主要功能:
校园疫情防控管理信息系统分为前台部分和后台部分,面向校园的学生和老师,旨在为学校提供一个有效防控校园出现疫情的综合性平台。本管理系统将通过健康打卡的功能实现后台管理系统对师生身体状况数据的收集。有了此系统,大大方便了学校疫情的防控工作,加大了学校疫情防控的力度,提高学校疫情防控的效率,尽最大地可能避免学校出现新冠肺炎疫情。借助此系统学校能更好地做好疫情防控措施。

二、采用技术及开发环境

1.开发技术

前端:HTML + CSS + JavaScript + Bootstrap + Jquery + Ajax
后端:sevlet+spring+mysql

2.开发环境

工具:IDEA、Navicat
环境:JDK 1.8、Tomcat 8.0、Mysql 8.0

二、功能展示

1.学校疫情统计

在这里插入图片描述

2.各情况统计

在这里插入图片描述

3.各学院学生情况统计

在这里插入图片描述

4.各学院教师统计

各学院教师统计

5.最新时报

在这里插入图片描述

6.后台管理

在这里插入图片描述

四、代码展示

package com.dao;

import com.utils.JDBCUtils;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;

public class DeptAdminDao {

    private static Connection connection = null;
    private static PreparedStatement preparedStatement = null;
    private static ResultSet resultSet = null;

    //用于登录查找
    public static ResultSet login(String sql, Object[] objects) {
        try {
            connection = JDBCUtils.getConnection();
            preparedStatement = connection.prepareStatement(sql);
            for (int i = 0; i < objects.length; i++) {
                preparedStatement.setObject(i + 1, objects[i]);
            }
            resultSet = preparedStatement.executeQuery();
        } catch (Exception e) {
            e.printStackTrace();
        }

        return resultSet;
    }

    //用于查询的所有表(带限制条件或无限制条件的)的数据,返回结果集
    public static ResultSet qureyInfo(String sql, Object[] objects){
        try {
            connection = JDBCUtils.getConnection();
            preparedStatement = connection.prepareStatement(sql);
            for (int i = 0; i < objects.length; i++) {
                preparedStatement.setObject(i + 1, objects[i]);
            }
            resultSet = preparedStatement.executeQuery();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return resultSet;
    }

    //查询总记录数,返回总记录数
    public static int findTotalCount(String sql, Object[] objects){
        int num = 0;
        try {
            connection = JDBCUtils.getConnection();
            preparedStatement = connection.prepareStatement(sql);
            for (int i = 0; i < objects.length; i++) {
                preparedStatement.setObject(i + 1, objects[i]);
            }
            resultSet = preparedStatement.executeQuery();
            resultSet.next();
            num = resultSet.getInt("num");
            System.out.println(num);
        } catch (Exception e) {
            e.printStackTrace();
        }finally {
            JDBCUtils.close(resultSet, preparedStatement, connection);
        }

        return num;
    }

    //查询每页的内容
    public static ResultSet QureyInfoByPage(String sql, Object[] objects){
        try {
            connection = JDBCUtils.getConnection();
            preparedStatement = connection.prepareStatement(sql);
            for (int i = 0; i < objects.length; i++) {
                preparedStatement.setObject(i + 1, objects[i]);
            }
            resultSet = preparedStatement.executeQuery();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return resultSet;
    }

    //执行更新语句,包括增、删、改操作
    public static int executeUpdate(String sql, Object[] objects){
        int num = 0;
        try {
            connection = JDBCUtils.getConnection();
            preparedStatement = connection.prepareStatement(sql);
            for (int i = 0; i < objects.length; i++) {
                preparedStatement.setObject(i + 1, objects[i]);
            }
            num = preparedStatement.executeUpdate();
        } catch (Exception e) {
            e.printStackTrace();
        }finally {
            JDBCUtils.close(preparedStatement, connection);
        }

        return num;
    }
}

五、获取源码

点击下载
基于java+sevlet+spring+mysql实现校园疫情防控管理信息系统

posted @   优选源码  阅读(117)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
点击右上角即可分享
微信分享提示