基于javaweb+mysql的ssm在线宿舍管理系统(java+ssm+jsp+bootstrap+jquery+mysql)
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb+mysql的SSM在线宿舍管理系统(java+ssm+jsp+bootstrap+jquery+mysql)
项目介绍
本项目包含管理员、宿舍管理员、学生三种角色;
管理员角色包含以下功能: 管理员登录,院系管理,专业管理,年级管理,班级管理,学生设置,宿舍管理员管理,宿舍楼管理,宿舍管理,床位管理,学生入住登记,学生退房管理等功能。
宿舍管理员角色包含以下功能: 宿舍管理员管理,宿舍楼管理,宿舍管理,床位管理,入住登记,退房管理,个人信息修改等功能。
学生角色包含以下功能: 学生角色登录,我入住的床位,个人信息修改等功能。
环境需要
1.运行环境:java jdk 1.7,注:该项目仅支持jdk1.7,不支持1.8及以上版本; 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 5.数据库:MySql 5.7版本; 6.是否Maven项目:否;
技术栈
- 后端:Spring+SpringMVC+Mybatis 2. 前端:JSP+CSS+JavaScript+bootstrap+jquery
使用说明
- 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中config/jdbc.properties配置文件中的数据库配置改为自己的配置; 4. 运行项目,输入http://localhost:8080/ 登录
注意事项 该项目仅支持jdk1.7,不支持1.8及以上版本;
* @return
*/
@PostMapping("/updatePhone")
@ResponseBody
public Boolean updatePhone(Stuinfo stuinfo) {
return stuServiceI.updatePhone(stuinfo);
/**
* 学生更新密码
* @return
*/
@PostMapping("/updatePwd")
/**
* 获取学生信息
* @param dormid
* @return
*/
@GetMapping("/getStus")
@ResponseBody
public List<Stuinfo> getStus(String dormid) {
return stuServiceI.getStus(dormid);
员工管理控制层:
* @param searchDorm
* @return
*/
@GetMapping("/list")
@ResponseBody
public Page<Staffinfo> getStuInfo(@PageableDefault Pageable pageable, String searchName, String searchDorm) {
return staffServiceI.findStaffs(pageable, searchName, searchDorm);
/**
* 导入员工信息文件
* @param file
* @return
@GetMapping("/repairProcessView")
public String getRepairProcessView() {
return "staff/repairProcessView";
/**
* 处理中报修单列表
* @param pageable
* @param session
* @return
*/
@GetMapping("/repairProcessInfo")
@ResponseBody
public Page<Repair> getRepairProcessInfo(@PageableDefault Pageable pageable, HttpSession session) {
/**
* 删除员工信息
* @param staffId
* @return
*/
@GetMapping("/del")
@ResponseBody
public Boolean del(String staffId) {
return staffServiceI.del(staffId);
/**
* 更新员工信息
UserExpand user = (UserExpand) session.getAttribute("LOGIN_USER");
Stuinfo stuinfo = stuServiceI.findById(user.getUsername());
return stuServiceI.createRepair(repair, stuinfo);
@GetMapping("/delRepairInfo")
@ResponseBody
public Boolean delRepairInfo(String repairId) {
return stuServiceI.delRepairInfo(repairId);
/**
* 跳转历史报修记录页面
* @return
*/
@GetMapping("/repairHistoryView")
public String repairHistoryView() {
*/
@GetMapping("/infoView")
public String getInfoView(HttpSession session, Model model) throws Exception {
UserExpand user = (UserExpand) session.getAttribute("LOGIN_USER");
Staffinfo staffinfo = staffServiceI.findById(user.getUsername());
model.addAttribute("staffinfo", new ObjectMapper().writeValueAsString(staffinfo));
return "staff/infoView";
/**
* 跳转学生信息查询页面
* @return
*/
@GetMapping("/stu")
@ResponseBody
public Boolean update(Staffinfo staffinfo) {
return staffServiceI.update(staffinfo);
/**
* 跳转未处理报修单页面
* @return
*/
@GetMapping("/repairUntreatedView")
public String getRepairView() {
return "staff/repairUntreatedView";
/**
* 未处理报修单列表
public String updatePwd(HttpSession session, Model model) {
UserExpand user = (UserExpand) session.getAttribute("LOGIN_USER");
Staffinfo staffinfo = staffServiceI.findById(user.getUsername());
model.addAttribute("id", staffinfo.getId());
return "staff/updatePwd";
/**
* 修改手机号
* @param staffinfo
* @return
*/
@PostMapping("/updatePhone")
@ResponseBody
public Boolean updatePhone(Staffinfo staffinfo) {
* @return
*/
@PostMapping("/update")
@ResponseBody
public Boolean update(Staffinfo staffinfo) {
return staffServiceI.update(staffinfo);
/**
* 跳转未处理报修单页面
* @return
*/
* @return
*/
@GetMapping("/repairHistoryView")
public String getRepairHistoryView() {
return "staff/repairHistory";
/**
* 查询历史报修单列表
* @param pageable
* @param session
* @param reason
* @return
*/
* @return
*/
@GetMapping("/list")
@ResponseBody
public Page<Dorm> getDormInfo(@PageableDefault Pageable pageable) {
return dormServiceI.findDorms(pageable);
/**
* 获取宿舍列表
* @param session
* @return
public String repairView() {
return "stu/repairView";
/**
* 查询学生报修列表
* @param pageable
* @param session
* @return
*/
@GetMapping("/repairInfo")
@ResponseBody
public Page<Repair> getRepairInfo(@PageableDefault Pageable pageable, HttpSession session) {
@GetMapping("/resetPwd")
@ResponseBody
public Boolean resetPwd(String stuId) {
return stuServiceI.resetPwd(stuId);
/**
* 删除学习信息
* @param stuId
* @return
*/
@GetMapping("/del")
@ResponseBody
public Boolean del(String stuId) {
* @param session
* @return
*/
@GetMapping("/repairProcessInfo")
@ResponseBody
public Page<Repair> getRepairProcessInfo(@PageableDefault Pageable pageable, HttpSession session) {
UserExpand user = (UserExpand) session.getAttribute("LOGIN_USER");
return staffServiceI.findRepairProcessInfo(pageable, user.getStaffinfo());
/**
* 导出文件
* @param session
* @param response
*/
UserExpand user = (UserExpand) session.getAttribute("LOGIN_USER");
return staffServiceI.findRepairHistory(pageable, reason, user.getStaffinfo());
宿舍楼信息管理控制层:
@Controller
@RequestMapping("/dorm")
public class DormController {
@Autowired
private DormServiceI dormServiceI;
/**
* 跳转宿舍楼信息管理页面
* @return
public Boolean del(Stuinfo stuinfo) {
return stuServiceI.update(stuinfo);
/**
* 跳转申请报修页面
* @return
*/
@GetMapping("/repairView")
public String repairView() {
return "stu/repairView";
/**
* @param repair
* @param session
* @return
*/
@PostMapping("/createRepair")
@ResponseBody
public Boolean createRepair(Repair repair, HttpSession session) {
UserExpand user = (UserExpand) session.getAttribute("LOGIN_USER");
Stuinfo stuinfo = stuServiceI.findById(user.getUsername());
return stuServiceI.createRepair(repair, stuinfo);
@GetMapping("/delRepairInfo")
@ResponseBody
public Boolean delRepairInfo(String repairId) {