伴随着我国社会的发展,人民生活质量日益提高。于是对贵工程学生宿舍进行规范而严格是十分有必要的,所以许许多多的信息管理系统应运而生。此时单靠人力应对这些事务就显得有些力不从心了。所以本论文将设计一套贵工程学生宿舍管理系统,帮助宿舍管理员进行宿舍信息、设备报修、查寝登记、失物招领、认领信息、卫生评比等繁琐又重复的工作,提高工作效率的同时,也减轻了管理者的压力。
本论文的主要内容包括:
第一,研究分析当下主流的web技术,结合学校日常管理方式,进行贵工程学生宿舍管理系统的数据库设计,设计贵工程学生宿舍管理系统功能,并对每个模块进行说明。
第二,陈列说明该系统实现所采用的架构、系统搭建采用的服务器、系统开发环境和使用的工具,以及系统后台采用的数据库。
最后,对系统进行全面测试,主要包括功能测试、查询性能测试、安全性能测试。
分析系统存在的不足以及将来改进的方向。
关键词:贵工程学生宿舍管理系统;B/S架构;SpringBoot框架;
springboot vue学生宿舍管理系统源码和答辩PPT论文907
演示视频:
【包调试运行】springboot vue学生宿舍管理系统源码和答辩PPT论文
Abstract
With the development of our society, the quality of life of the people is improving day by day. Therefore, it is necessary to standardize and strictly enforce the student dormitory of your project, so many information management systems have emerged as the times require. At this point, relying solely on human resources to deal with these matters seems to be somewhat inadequate. Therefore, this thesis will design a student dormitory management system for your project to help dormitory administrators carry out tedious and repetitive tasks such as dormitory information, equipment repair, dormitory inspection and registration, lost and found property, claim information, and hygiene evaluation, improving work efficiency while also reducing the pressure on managers.
The main contents of this paper include:
Firstly, research and analyze the current mainstream web technology, combine with the daily management methods of the school, design the database of the student dormitory management system for your project, design the functions of the student dormitory management system for your project, and describe each module.
Secondly, the architecture used to implement the system, the servers used to build the system, the system development environment, and the tools used, as well as the database used in the background of the system, are displayed and explained.
Finally, conduct a comprehensive test of the system, mainly including functional testing, query performance testing, and security performance testing.
Analyze the shortcomings of the system and the direction for future improvement.
Key words: your project student dormitory management system; B/S architecture; SpringBoot framework;
package com.controller;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
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 com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.WeishengpingbiEntity;
import com.entity.view.WeishengpingbiView;
import com.service.WeishengpingbiService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
import java.io.IOException;
/**
* 卫生评比
* 后端接口
* @author
* @email
* @date 2023-03-13 14:27:31
*/
@RestController
@RequestMapping("/weishengpingbi")
public class WeishengpingbiController {
@Autowired
private WeishengpingbiService weishengpingbiService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,WeishengpingbiEntity weishengpingbi,
HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("xuesheng")) {
weishengpingbi.setXuehao((String)request.getSession().getAttribute("username"));
}
if(tableName.equals("susheguanliyuan")) {
weishengpingbi.setGonghao((String)request.getSession().getAttribute("username"));
}
EntityWrapper<WeishengpingbiEntity> ew = new EntityWrapper<WeishengpingbiEntity>();
PageUtils page = weishengpingbiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, weishengpingbi), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,WeishengpingbiEntity weishengpingbi,
HttpServletRequest request){
EntityWrapper<WeishengpingbiEntity> ew = new EntityWrapper<WeishengpingbiEntity>();
PageUtils page = weishengpingbiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, weishengpingbi), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( WeishengpingbiEntity weishengpingbi){
EntityWrapper<WeishengpingbiEntity> ew = new EntityWrapper<WeishengpingbiEntity>();
ew.allEq(MPUtil.allEQMapPre( weishengpingbi, "weishengpingbi"));
return R.ok().put("data", weishengpingbiService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(WeishengpingbiEntity weishengpingbi){
EntityWrapper< WeishengpingbiEntity> ew = new EntityWrapper< WeishengpingbiEntity>();
ew.allEq(MPUtil.allEQMapPre( weishengpingbi, "weishengpingbi"));
WeishengpingbiView weishengpingbiView = weishengpingbiService.selectView(ew);
return R.ok("查询卫生评比成功").put("data", weishengpingbiView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
WeishengpingbiEntity weishengpingbi = weishengpingbiService.selectById(id);
return R.ok().put("data", weishengpingbi);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
WeishengpingbiEntity weishengpingbi = weishengpingbiService.selectById(id);
return R.ok().put("data", weishengpingbi);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody WeishengpingbiEntity weishengpingbi, HttpServletRequest request){
weishengpingbi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(weishengpingbi);
weishengpingbiService.insert(weishengpingbi);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody WeishengpingbiEntity weishengpingbi, HttpServletRequest request){
weishengpingbi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(weishengpingbi);
weishengpingbiService.insert(weishengpingbi);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody WeishengpingbiEntity weishengpingbi, HttpServletRequest request){
//ValidatorUtils.validateEntity(weishengpingbi);
weishengpingbiService.updateById(weishengpingbi);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
weishengpingbiService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 提醒接口
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<WeishengpingbiEntity> wrapper = new EntityWrapper<WeishengpingbiEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("xuesheng")) {
wrapper.eq("xuehao", (String)request.getSession().getAttribute("username"));
}
if(tableName.equals("susheguanliyuan")) {
wrapper.eq("gonghao", (String)request.getSession().getAttribute("username"));
}
int count = weishengpingbiService.selectCount(wrapper);
return R.ok().put("count", count);
}
/**
* (按值统计)
*/
@RequestMapping("/value/{xColumnName}/{yColumnName}")
public R value(@PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName,HttpServletRequest request) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("xColumn", xColumnName);
params.put("yColumn", yColumnName);
EntityWrapper<WeishengpingbiEntity> ew = new EntityWrapper<WeishengpingbiEntity>();
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("xuesheng")) {
ew.eq("xuehao", (String)request.getSession().getAttribute("username"));
}
if(tableName.equals("susheguanliyuan")) {
ew.eq("gonghao", (String)request.getSession().getAttribute("username"));
}
List<Map<String, Object>> result = weishengpingbiService.selectValue(params, ew);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
if(m.get(k) instanceof Date) {
m.put(k, sdf.format((Date)m.get(k)));
}
}
}
return R.ok().put("data", result);
}
/**
* (按值统计)时间统计类型
*/
@RequestMapping("/value/{xColumnName}/{yColumnName}/{timeStatType}")
public R valueDay(@PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName, @PathVariable("timeStatType") String timeStatType,HttpServletRequest request) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("xColumn", xColumnName);
params.put("yColumn", yColumnName);
params.put("timeStatType", timeStatType);
EntityWrapper<WeishengpingbiEntity> ew = new EntityWrapper<WeishengpingbiEntity>();
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("xuesheng")) {
ew.eq("xuehao", (String)request.getSession().getAttribute("username"));
}
if(tableName.equals("susheguanliyuan")) {
ew.eq("gonghao", (String)request.getSession().getAttribute("username"));
}
List<Map<String, Object>> result = weishengpingbiService.selectTimeStatValue(params, ew);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
if(m.get(k) instanceof Date) {
m.put(k, sdf.format((Date)m.get(k)));
}
}
}
return R.ok().put("data", result);
}
/**
* 分组统计
*/
@RequestMapping("/group/{columnName}")
public R group(@PathVariable("columnName") String columnName,HttpServletRequest request) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("column", columnName);
EntityWrapper<WeishengpingbiEntity> ew = new EntityWrapper<WeishengpingbiEntity>();
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("xuesheng")) {
ew.eq("xuehao", (String)request.getSession().getAttribute("username"));
}
if(tableName.equals("susheguanliyuan")) {
ew.eq("gonghao", (String)request.getSession().getAttribute("username"));
}
List<Map<String, Object>> result = weishengpingbiService.selectGroup(params, ew);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
if(m.get(k) instanceof Date) {
m.put(k, sdf.format((Date)m.get(k)));
}
}
}
return R.ok().put("data", result);
}
/**
* 分组统计
*/
@RequestMapping("/typeStat/weishengzhuangkuang/sushemingcheng")
@IgnoreAuth
public R sushemingchengweishengzhuangkuangTypeStat(HttpServletRequest request) {
Map<String, Object> params = new HashMap<String, Object>();
EntityWrapper<WeishengpingbiEntity> ew = new EntityWrapper<WeishengpingbiEntity>();
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("xuesheng")) {
ew.eq("xuehao", (String)request.getSession().getAttribute("username"));
}
if(tableName.equals("susheguanliyuan")) {
ew.eq("gonghao", (String)request.getSession().getAttribute("username"));
}
List<Map<String, Object>> result = weishengpingbiService.sushemingchengweishengzhuangkuangTypeStat(params, ew);
return R.ok().put("data", result);
}
/**
* 总数量
*/
@RequestMapping("/count")
public R count(@RequestParam Map<String, Object> params,WeishengpingbiEntity weishengpingbi, HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("xuesheng")) {
weishengpingbi.setXuehao((String)request.getSession().getAttribute("username"));
}
if(tableName.equals("susheguanliyuan")) {
weishengpingbi.setGonghao((String)request.getSession().getAttribute("username"));
}
EntityWrapper<WeishengpingbiEntity> ew = new EntityWrapper<WeishengpingbiEntity>();
int count = weishengpingbiService.selectCount(MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, weishengpingbi), params), params));
return R.ok().put("data", count);
}
}