毕业设计:Springboot实现疫情宿舍&学生管理系统

Posted 编程指南针

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了毕业设计:Springboot实现疫情宿舍&学生管理系统相关的知识,希望对你有一定的参考价值。

作者主页:编程指南针

 简介:Java领域优质创作者、CSDN博客专家  Java项目、简历模板、学习资料、面试题库、技术互助

文末获取源码

项目编号:BS-XX-100

模块大体上分为“登录”、“宿舍展览”、“体温提交”、“来访人员信息录用”、“信息通告”、“搜索”、“我的信息”等其中“登录”会进行人员区分,分为普通用户、管理老师。
 
  - 普通用户只能对自己提交的的信息进行修改删除,每天学生登录后可以在“体温提交”模块上进行实时的体温提交,当学生因为需要要去不同楼的宿舍进行访问,为了确保安全需要在“来访人员信息录用”模块进行信息登记。学生能在我的信息里面能看到过去一个月所进行的活动已及信息修改、提交等的数据。
 
  - 管理老师分为不同等级,高等级的可以对低等级的进行操作,最低一级为宿管阿姨,宿管阿姨可以对她所管理的那栋楼里的学生信息进行查看、更改,也能发布的通告信息等。管理人员高等级的用户功能覆盖了低等级的用户功能,并且能对低等级用户进行进行增、删、改、查。

- 本系统功能模块主要分为:信息浏览浏览功能、宿舍打卡浏览功能、学生提交信息功能、宿舍搜索功能、在线留言功能、信息管理功能、个人信息管理功能、人员管理功能、历史宿舍功能。本论文将从系统开发的选题依据、背景、现状分析、可行性分析、系统创新点、功能详细设计及测试重点展开介绍。

开发技术:Springboot+layui+bootstrap

数据库:mysql

开发工具:IDEA

系统展示:

首页

每日体温登记

来访登记

公告发布:

信息查看

信息管理

用户管理

学生登陆

老师登陆

核心代码:

package springboot.study.project.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import springboot.study.project.common.Result;
import springboot.study.project.model.Clazz;
import springboot.study.project.model.Department;
import springboot.study.project.model.Major;
import springboot.study.project.service.CommonService;
import springboot.study.project.util.common.ResultUtil;
import springboot.study.project.util.nCoV_Crawler2019.EpidemicInfoService;

import java.util.List;
import java.util.Map;

/**
 * @ClassName: CommonController
 * @Description: 通用控制器
 * @Author: liu-hao
 * @Date: 2021-04-11 15:49
 * @Version: 1.0
 **/
@RestController
@RequestMapping("/common")
public class CommonController 
    @Autowired
    CommonService commonService;

    /**
     * 获取疫情数据
     *
     * @return
     */
    @RequestMapping("/getEpidemicData")
    Result getEpidemicData() 
        Map<String, Integer> epidemicInfo = EpidemicInfoService.epidemicInfo;
        if (epidemicInfo == null || epidemicInfo.size() <= 0) 
            return ResultUtil.failure("未查询到疫情信息!");
        
        return ResultUtil.success(epidemicInfo);
    

    @RequestMapping("/getAllDept")
    Result getAllDept() 
        List<Department> allDept = commonService.getAllDept();
        if (allDept == null || allDept.size() <= 0) 
            return ResultUtil.failure("未查询到院系!");
        
        return ResultUtil.success(allDept);
    

    @RequestMapping("/getMajorByDeptId")
    Result getMajorByDeptId(String deptId) 
        List<Major> majorList = commonService.getMajorByDeptId(deptId);
        if (majorList == null || majorList.size() <= 0) 
            return ResultUtil.failure("未查询到专业!");
        
        return ResultUtil.success(majorList);
    

    @RequestMapping("/getClazzByMajorId")
    Result getClazzByMajorId(String majorId) 
        List<Clazz> clazzList = commonService.getClazzByMajorId(majorId);
        if (clazzList == null || clazzList.size() <= 0) 
            return ResultUtil.failure("未查询到班级!");
        
        return ResultUtil.success(clazzList);
    

    // 院系相关

    @RequestMapping("/addDept")
    public Result addDept(@RequestBody Department department) 
        boolean result = commonService.addDept(department);
        if (!result) 
            return ResultUtil.failure("添加院系失败!");
        
        return ResultUtil.success();
    

    @RequestMapping("/removeDept")
    public Result removeDept(@RequestParam(name = "deptId") String deptId) 
        boolean result = commonService.removeDept(deptId);
        if (!result) 
            return ResultUtil.failure("删除院系失败!");
        
        return ResultUtil.success();
    

    @RequestMapping("/modifyDept")
    public Result modifyDept(@RequestBody Department department) 
        boolean result = commonService.modifyDept(department);
        if (!result) 
            return ResultUtil.failure("添加院系失败!");
        
        return ResultUtil.success();
    

    @RequestMapping("/findDeptInfo")
    public Map<String, Object> findDeptInfo(@RequestParam(name = "deptName") String deptName,
                                            @RequestParam(name = "page", defaultValue = "1") int pageNum,
                                            @RequestParam(name = "limit", defaultValue = "10") int pageSize) 
        int offset = (pageNum - 1) * pageSize;
        Map<String, Object> deptInfoMap = commonService.findDeptInfo(deptName, offset, pageSize);
        return deptInfoMap;
    

    // 专业相关
    @RequestMapping("/addMajor")
    public Result addMajor(@RequestBody Major major) 
        boolean result = commonService.addMajor(major);
        if (!result) 
            return ResultUtil.failure("添加专业失败!");
        
        return ResultUtil.success();
    

    @RequestMapping("/removeMajor")
    public Result removeMajor(@RequestParam(name = "majorId") String majorId) 
        boolean result = commonService.removeMajor(majorId);
        if (!result) 
            return ResultUtil.failure("删除专业失败!");
        
        return ResultUtil.success();
    

    @RequestMapping("/modifyMajor")
    public Result modifyMajor(@RequestBody Major major) 
        boolean result = commonService.modifyMajor(major);
        if (!result) 
            return ResultUtil.failure("添加专业失败!");
        
        return ResultUtil.success();
    

    @RequestMapping("/findMajorInfo")
    public Map<String, Object> findMajorInfo(@RequestParam(name = "majorName") String majorName,
                                             @RequestParam(name = "page", defaultValue = "1") int pageNum,
                                             @RequestParam(name = "limit", defaultValue = "10") int pageSize) 
        int offset = (pageNum - 1) * pageSize;
        Map<String, Object> majorInfoMap = commonService.findMajorInfo(majorName, offset, pageSize);
        return majorInfoMap;
    

    // 班级相关

    @RequestMapping("/addClazz")
    public Result addClazz(@RequestBody Clazz clazz) 
        boolean result = commonService.addClazz(clazz);
        if (!result) 
            return ResultUtil.failure("添加班级失败!");
        
        return ResultUtil.success();
    

    @RequestMapping("/removeClazz")
    public Result removeClazz(@RequestParam(name = "clazzId") String clazzId) 
        boolean result = commonService.removeClazz(clazzId);
        if (!result) 
            return ResultUtil.failure("删除班级失败!");
        
        return ResultUtil.success();
    

    @RequestMapping("/modifyClazz")
    public Result modifyClazz(@RequestBody Clazz classes) 
        boolean result = commonService.modifyClazz(classes);
        if (!result) 
            return ResultUtil.failure("添加班级失败!");
        
        return ResultUtil.success();
    

    @RequestMapping("/findClazzInfo")
    public Map<String, Object> findClazzInfo(@RequestParam(name = "clazzName") String clazzName,
                                             @RequestParam(name = "page", defaultValue = "1") int pageNum,
                                             @RequestParam(name = "limit", defaultValue = "10") int pageSize) 
        int offset = (pageNum - 1) * pageSize;
        Map<String, Object> clazzInfoMap = commonService.findClazzInfo(clazzName, offset, pageSize);
        return clazzInfoMap;
    

package springboot.study.project.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import springboot.study.project.common.Result;
import springboot.study.project.model.Dormitory;
import springboot.study.project.service.DormitoryService;
import springboot.study.project.util.common.ResultUtil;

import java.util.List;
import java.util.Map;

/**
 * @ClassName: DormitoryController
 * @Description: 宿舍控制层
 * @Author: liu-hao
 * @Date: 2021-04-12 14:26
 * @Version: 1.0
 **/
@RestController
@RequestMapping("/dormitory")
public class DormitoryController 
    @Autowired
    DormitoryService dormitoryService;

    @RequestMapping("/addDormitory")
    public Result addDormitory(@RequestBody Dormitory dormitory) 
        boolean result = dormitoryService.addDormitory(dormitory);
        if (!result) 
            return ResultUtil.failure("添加宿舍失败!");
        
        return ResultUtil.success();
    

    @RequestMapping("/removeDormitory")
    public Result removeDormitory(@RequestParam(name = "dormitoryId") String dormitoryId) 
        boolean result = dormitoryService.removeDormitory(dormitoryId);
        if (!result) 
            return ResultUtil.failure("删除宿舍失败!");
        
        return ResultUtil.success();
    

    @RequestMapping("/modifyDormitory")
    public Result modifyDormitory(@RequestBody Dormitory dormitory) 
        boolean result = dormitoryService.modifyDormitory(dormitory);
        if (!result) 
            return ResultUtil.failure("添加宿舍失败!");
        
        return ResultUtil.success();
    

    @RequestMapping("/getAllDormitory")
    Result getAllDormitory(@RequestParam("dormitoryId") String dormitoryId) 
        List<Dormitory> allDormitory = dormitoryService.getAllDormitory(dormitoryId);
        if (allDormitory == null) 
            return ResultUtil.failure("未查询到宿舍!");
        
        return ResultUtil.success(allDormitory);
    

    @RequestMapping("/getBulletins")
    public Map<String, Object> findDormitory(@RequestParam(name = "dormitoryName") String dormitoryName, // 宿舍名称
                                             @RequestParam(name = "page", defaultValue = "1") int pageNum,
                                             @RequestParam(name = "limit", defaultValue = "10") int pageSize) 
        int offset = (pageNum - 1) * pageSize;
        Map<String, Object> hotBulletins = dormitoryService.findDormitory(dormitoryName, offset, pageSize);
        return hotBulletins;
    

package springboot.study.project.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @ClassName: IndexCountroller
 * @Description: 页面访问控制层
 * @Author: liu-hao
 * @Date: 2021-03-11 22:36
 * @Version: 1.0
 **/
@Controller
public class IndexCountroller 

    @GetMapping("/")
    public String main() 
        return "login";
    

    @GetMapping("/login")
    public String login() 
        return "login";
    

    @GetMapping("/main")
    public String main2() 
        return "main";
    

    @GetMapping("/top")
    public String top() 
        return "top";
    

    @GetMapping("/left")
    public String left() 
        return "left";
    

    @GetMapping("/right")
    public String right() 
        return "right";
    

    @GetMapping("/tab")
    public String tab() 
        return "tab";
    

    @GetMapping("/index")
    public String index() 
        return "index";
    

    @GetMapping("/tempRecord")
    public String tempRecord() 
        return "tempRecord";
    

    @GetMapping("/visitRegister")
    public String visitRegister() 
        return "visitRegister";
    

    @GetMapping("/pushBulletin")
    public String pushBulletin() 
        return "pushBulletin";
    

    @GetMapping("/viewBulletin")
    public String viewBulletin(@RequestParam(value = "bulletinId", required = false) String bulletinId, Model model) 
        model.addAttribute("bulletinId", bulletinId);
        return "viewBulletin";
    

    @GetMapping("/viewBulletinInfo")
    public String viewBulletinInfo() 
        return "viewBulletinInfo";
    

    @GetMapping("/modifyBulletinInfo")
    public String modifyBulletinInfo(@RequestParam(value = "bulletinId", required = false) String bulletinId, Model model) 
        model.addAttribute("bulletinId", bulletinId);
        return "modifyBulletinInfo";
    

    @GetMapping("/viewTempRecordInfo")
    public String viewTempRecordInfo() 
        return "viewTempRecordInfo";
    

    @GetMapping("/viewVisitRecordInfo")
    public String viewVisitRecordInfo() 
        return "viewVisitRecordInfo";
    

    // 信息管理相关
    @GetMapping("/viewStuInfo")
    public String viewStuInfo() 
        return "viewStuInfo";
    

    @GetMapping("/addStudent")
    public String addStudent() 
        return "addStudent";
    

    @GetMapping("/modifyStuInfo")
    public String modifyStuInfo() 
        return "modifyStuInfo";
    

    @GetMapping("/viewDormitoryInfo")
    public String viewDormitoryInfo() 
        return "viewDormitoryInfo";
    

    @GetMapping("/addOrModifyDormitory")
    public String addOrModifyDormitory() 
        return "addOrModifyDormitory";
    

    @GetMapping("/viewDeptInfo")
    public String viewDeptInfo() 
        return "viewDeptInfo";
    

    @GetMapping("/addOrModifyDept")
    public String addOrModifyDept() 
        return "addOrModifyDept";
    


    @GetMapping("/viewMajorInfo")
    public String viewMajorInfo() 
        return "viewMajorInfo";
    

    @GetMapping("/addOrModifyMajor")
    public String addOrModifyMajor() 
        return "addOrModifyMajor";
    


    @GetMapping("/viewClazzInfo")
    public String viewClazzInfo() 
        return "viewClazzInfo";
    

    @GetMapping("/addOrModifyClazz")
    public String addOrModifyClazz() 
        return "addOrModifyClazz";
    

    // 用户相关
    @GetMapping("/viewUserInfo")
    public String viewUserInfo() 
        return "viewUserInfo";
    

    @GetMapping("/addUser")
    public String addUser() 
        return "addUser";
    

    @GetMapping("/modifyUserInfo")
    public String modifyUserInfo() 
        return "modifyUserInfo";
    

    @GetMapping("/viewOwnUser")
    public String viewOwnUser() 
        return "viewOwnUser";
    


    @GetMapping("/error")
    public String error() 
        return "error";
    

以上是关于毕业设计:Springboot实现疫情宿舍&学生管理系统的主要内容,如果未能解决你的问题,请参考以下文章

JavaWeb项目-疫情环境下校园宿舍管理系统-附源码-毕业设计

JavaWeb项目-疫情环境下校园宿舍管理系统-附源码-毕业设计

基于springboot+vue前后端分离开发实现宿舍管理系统

基于springboot+vue前后端分离开发实现宿舍管理系统

疫情封校,在宿舍学习数据结构——栈(Stack)详解(实例代码&&各接口代码)

疫情防控|Springboot+小程序+校园疫情防控系统设计与实现