目录
大家好呀,我是一个混迹在java圈的码农。今天要和大家分享的是 一款基于SpringBoot+Vue的新生宿舍管理系统,项目源码请点击文章末尾联系我哦~目前有各类成品 毕设 JavaWeb SSM SpringBoot等等项目框架,源码丰富,欢迎咨询。
一、项目介绍
随着科学技术的飞速发展,社会的方方面面、各行各业都在努力与现代的先进技术接轨,通过科技手段来提高自身的优势,新生宿舍管理系统当然也不能排除在外。新生宿舍管理系统是以实际运用为开发背景,运用软件工程原理和开发方法,采用springboot框架构建的一个管理系统。整个开发过程首先对软件系统进行需求分析,得出系统的主要功能。接着对系统进行总体设计和详细设计。总体设计主要包括系统功能设计、系统总体结构设计、系统数据结构设计和系统安全设计等;详细设计主要包括系统数据库访问的实现,主要功能模块的具体实现,模块实现关键代码等。最后对系统进行功能测试,并对测试结果进行分析总结,得出系统中存在的不足及需要改进的地方,为以后的系统维护提供了方便,同时也为今后开发类似系统提供了借鉴和帮助。这种个性化的网上管理系统特别注重交互协调与管理的相互配合,激发了管理人员的创造性与主动性,对新生宿舍管理系统而言非常有利。
本新生宿舍管理系统采用的数据库是Mysql,使用springboot框架开发。在设计过程中,充分保证了系统代码的良好可读性、实用性、易扩展性、通用性、便于后期维护、操作方便以及页面简洁等特点。
关键词:新生宿舍管理系统,springboot框架 Mysql数据库 Java技术
二、开发环境
开发系统:Windows
JDK版本:Java JDK1.8(推荐)
开发工具:IDEA/MyEclipse(推荐IDEA)
数据库版本: mysql8.0(推荐)
数据库可视化工具: navicat
服务器:SpringBoot自带 apache tomcat
框架:springboot,vue
三、功能介绍
管理员登录进入新生宿舍管理系统可以查看首页、个人中心、公告信息管理、院系管理、班级管理、学生管理、宿舍信息管理、宿舍安排管理、卫生检查管理、报修信息管理、报修处理管理、缴费信息管理等信息。学生登录进入新生宿舍管理系统可以查看首页、个人中心、公告信息管理、宿舍安排管理、卫生检查管理、报修信息管理、报修处理管理、缴费信息管理等内容。公告信息管理,在公告信息管理页面中通过查看公告标题、图片、发布日期等信息还可以根据需要对公告信息管理进行修改。宿舍安排管理,在宿舍安排管理页面中可以查看宿舍号、宿舍类型、图片、位置、可住人数、学号、学生姓名、班级、安排日期等信息内容,并且根据需要对宿舍安排管理进行详情或删除等其他详细操作。
四、核心代码
/**
* 报修信息
* 后端接口
* @author
* @email
*/
@RestController
@RequestMapping("/baoxiuxinxi")
public class BaoxiuxinxiController {
@Autowired
private BaoxiuxinxiService baoxiuxinxiService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,BaoxiuxinxiEntity baoxiuxinxi,
HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("xuesheng")) {
baoxiuxinxi.setXuehao((String)request.getSession().getAttribute("username"));
}
EntityWrapper<BaoxiuxinxiEntity> ew = new EntityWrapper<BaoxiuxinxiEntity>();
PageUtils page = baoxiuxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, baoxiuxinxi), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,BaoxiuxinxiEntity baoxiuxinxi, HttpServletRequest request){
EntityWrapper<BaoxiuxinxiEntity> ew = new EntityWrapper<BaoxiuxinxiEntity>();
PageUtils page = baoxiuxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, baoxiuxinxi), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( BaoxiuxinxiEntity baoxiuxinxi){
EntityWrapper<BaoxiuxinxiEntity> ew = new EntityWrapper<BaoxiuxinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( baoxiuxinxi, "baoxiuxinxi"));
return R.ok().put("data", baoxiuxinxiService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(BaoxiuxinxiEntity baoxiuxinxi){
EntityWrapper< BaoxiuxinxiEntity> ew = new EntityWrapper< BaoxiuxinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( baoxiuxinxi, "baoxiuxinxi"));
BaoxiuxinxiView baoxiuxinxiView = baoxiuxinxiService.selectView(ew);
return R.ok("查询报修信息成功").put("data", baoxiuxinxiView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
BaoxiuxinxiEntity baoxiuxinxi = baoxiuxinxiService.selectById(id);
return R.ok().put("data", baoxiuxinxi);
}
/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
BaoxiuxinxiEntity baoxiuxinxi = baoxiuxinxiService.selectById(id);
return R.ok().put("data", baoxiuxinxi);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody BaoxiuxinxiEntity baoxiuxinxi, HttpServletRequest request){
baoxiuxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(baoxiuxinxi);
baoxiuxinxiService.insert(baoxiuxinxi);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody BaoxiuxinxiEntity baoxiuxinxi, HttpServletRequest request){
baoxiuxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(baoxiuxinxi);
baoxiuxinxiService.insert(baoxiuxinxi);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody BaoxiuxinxiEntity baoxiuxinxi, HttpServletRequest request){
//ValidatorUtils.validateEntity(baoxiuxinxi);
baoxiuxinxiService.updateById(baoxiuxinxi);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
baoxiuxinxiService.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<BaoxiuxinxiEntity> wrapper = new EntityWrapper<BaoxiuxinxiEntity>();
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"));
}
int count = baoxiuxinxiService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
五、效果图
六、源码获取:
👇🏻获取联系方式在文章末尾👇🏻
有需要的伙伴可以点击下方名片,与我联系哦~