基于javaweb和mysql的springboot学生宿舍信息系统(java+springboot+mybaits+vue+elementui+mysql)
基于javaweb和mysql的springboot学生宿舍信息系统(java+springboot+mybaits+vue+elementui+mysql)后台地址:http://localhost:8080/springbootrpj39/admin/dist/index.html。前台地址:http://localhost:8080/springbootrpj39/front/index.h
基于javaweb和mysql的springboot学生宿舍信息系统(java+springboot+mybaits+vue+elementui+mysql)
私信源码获取及调试交流
私信源码获取及调试交流
运行环境
Java≥8、MySQL≥5.7、Node.js≥14
开发工具
后端:eclipse/idea/myeclipse/sts等均可配置运行
前端:WebStorm/VSCode/HBuilderX等均可
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb的SpringBoot学生宿舍信息系统(java+springboot+mybaits+vue+elementui+mysql)
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
4.数据库:MySql 5.7/8.0版本均可;
5.是否Maven项目:是
技术栈
后端:SpringBoot+Mybaits
前端:Vue + elementui
使用说明
项目运行:
-
使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件;
-
使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令;
-
将项目中application.yml配置文件中的数据库配置改为自己的配置;
-
运行项目,在浏览器中输入地址:
前台地址:http://localhost:8080/springbootrpj39/front/index.html
后台地址:http://localhost:8080/springbootrpj39/admin/dist/index.html
管理员 abo 密码 abo
用户:用户1 密码: 123456
注意项目文件路径中不能含有中文、空格、特殊字符等,否则图片会上传不成功。
@RequestMapping(value = "/stayin/update")
public String updateMyStayInfo(StayInfo si) {
HashMap<String, Object> map = new HashMap<>();
System.out.println(si);
int result = studentService.updateMyStayInfo(si);
if (result > 0) {
map.put("success", true);
map.put("msg", "修改成功!");
} else {
map.put("success", false);
map.put("msg", "修改失败,请稍后再试!");
return JSON.toJSONString(map);
if (result > 0) {
map.put("success", true);
map.put("msg", "更改成功!");
} else {
map.put("success", false);
map.put("msg", "更改失败,请稍后再试!");
return JSON.toJSONString(map);
/**
* 密码设置
* @return
*/
@RequestMapping(value = "/setting")
public String passwordSetting() {
// 设置分页信息
PageHelper.startPage(mbVo.getPage(), mbVo.getLimit());
// 查询
List<MessageBoard> list = dormService.findMessageListByPage(mbVo);
// 创建分页对象
PageInfo<MessageBoard> pageInfo = new PageInfo<MessageBoard>(list);
// 按接口要求返回数据
DataGridViewResult data = new DataGridViewResult(pageInfo.getTotal(), pageInfo.getList());
return data;
/**
* 添加公告/失物招领信息
* @param mb
* @param request
@RequestMapping(value = "/allocation/add")
public String addAllocationInfo(AllocationInfo ai) {
HashMap<String, Object> map = new HashMap<>();
int result = teacherService.addAllocationInfo(ai);
if (result > 0) {
map.put("success", true);
map.put("msg", "添加成功!");
} else {
map.put("success", false);
map.put("msg", "添加失败!");
@ResponseBody
@RequestMapping(value = "/repair/list")
public DataGridViewResult findRepairInfoList(RepairInfoVo riVo, HttpServletRequest request) {
// 拼接brcode
String brarea = (String) request.getSession().getAttribute("brarea");
String brbid = (String) request.getSession().getAttribute("brbid");
if (StringUtils.isBlank(brarea)) {
brarea = riVo.getBrarea();
if (StringUtils.isBlank(brbid)) {
brbid = riVo.getBrbid();
String brcode = MyStringUtil.getBrcode(brarea, brbid, "");
if (StringUtils.isNotBlank(brcode)) {
map.put("msg", "删除成功!");
} else {
map.put("success", false);
map.put("msg", "删除失败!");
return JSON.toJSONString(map);
/**
* 返回添加卫生检查记录页面
* @return
*/
@RequestMapping(value = "/clean/add.html")
public String addCleanInfo() {
return "/dm/clean-add";
public String doAllocate(HttpServletRequest request) {
HashMap<String, Object> map = new HashMap<>();
String room = request.getParameter("room");
String student = request.getParameter("student");
System.out.println(room);
System.out.println(student);
map.put("msg", "接受到数据");
return JSON.toJSONString(map);
/**
* 判断床位数够不够
* @return
*/
@ResponseBody
@RequestMapping(value = "/allocation/isEnough")
return JSON.toJSONString(map);
/**
* 更改宿舍分配信息
* @param ai
* @return
*/
@ResponseBody
@RequestMapping(value = "/allocation/update")
public String updateAllocationInfo(AllocationInfo ai) {
HashMap<String, Object> map = new HashMap<>();
int result = teacherService.updateAllocationInfo(ai);
} else {
map.put("code", -1);
map.put("msg", "请选择图片!");
return JSON.toJSONString(map);
} catch (Exception e) {
e.printStackTrace();
map.put("code", -1);
map.put("msg", "上传失败,请稍后重试!");
return JSON.toJSONString(map);
/**
* 提交留校申请
PageHelper.startPage(aiVo.getPage(), aiVo.getLimit());
// 查询
List<AllocationInfo> list = teacherService.findAllocationInfoListByPage(aiVo);
// 创建分页对象
PageInfo<AllocationInfo> pageInfo = new PageInfo<AllocationInfo>(list);
// 按接口要求返回数据
DataGridViewResult data = new DataGridViewResult(pageInfo.getTotal(), pageInfo.getList());
return data;
/**
* 添加宿舍分配信息
* @param ai
* @return
Integer id = (Integer) obj.get("id");
System.out.println(id);
list.add(id);
boolean result = dormService.deleteMessage(list);
if (result) {
map.put("success", true);
map.put("msg", "删除成功!");
} else {
map.put("success", false);
map.put("msg", "删除失败!");
return result;
/**
* 留校管理
* @return
*/
@RequestMapping(value = "/stayinManage")
public String stayinManege() {
return "/teacher/stayin-manage";
/**
* 留校申请列表
* @param siVo
* @param request
System.out.println(aiVo);
// 设置分页信息
PageHelper.startPage(aiVo.getPage(), aiVo.getLimit());
// 查询
List<AllocationInfo> list = teacherService.findAllocationInfoListByPage(aiVo);
// 创建分页对象
PageInfo<AllocationInfo> pageInfo = new PageInfo<AllocationInfo>(list);
// 按接口要求返回数据
DataGridViewResult data = new DataGridViewResult(pageInfo.getTotal(), pageInfo.getList());
return data;
/**
* 添加宿舍分配信息
* @param ai
* @return
// 拼接brcode,如果brcode是空,说明宿舍信息错误了
String brarea = bi.getBrarea();
String brbid = bi.getBrbid();
String brrid = bi.getBrrid();
String brcode = MyStringUtil.getBrcode(brarea, brbid, brrid);
if (StringUtils.isBlank(brcode)) {
map.put("success", false);
map.put("msg", "添加失败!宿舍信息错误!");
return JSON.toJSONString(map);
// 计算空余数
List<StayInfo> list = teacherService.findStayInfoListByPage(siVo);
// 创建分页对象
PageInfo<StayInfo> pageInfo = new PageInfo<StayInfo>(list);
// 按接口要求返回数据
DataGridViewResult data = new DataGridViewResult(pageInfo.getTotal(), pageInfo.getList());
return data;
/**
* 审批学生留校申请
* @param si
* @return
*/
@ResponseBody
@RequestMapping(value = "/stayin/approve")
* 学生报修列表
* @return
*/
@RequestMapping(value = "/repairList")
public String viewRepairList() {
return "/dm/repair-list";
/**
* 查找该宿管员负责的楼栋下的报修信息
* @param riVo
* @param request
* @return
*/
} else {
map.put("success", false);
map.put("msg", "更改失败!入住数不能大于床位数!");
return JSON.toJSONString(map);
} catch (Exception e) {
e.printStackTrace();
map.put("success", false);
map.put("msg", "更改失败!");
return JSON.toJSONString(map);
/**
* 删除宿舍信息
* @param brcode
* @return
*/
更多推荐
所有评论(0)