Java项目:135ssh酒店管理系统前台+后台两套源码

编程入门 行业动态 更新时间:2024-10-09 15:16:03

Java项目:135ssh酒店管理系统前台+后台<a href=https://www.elefans.com/category/jswz/34/1742797.html style=两套源码"/>

Java项目:135ssh酒店管理系统前台+后台两套源码

作者主页:源码空间站2022

 简介:Java领域优质创作者、Java项目、学习资料、技术互助

文末获取源码


项目介绍

系统介绍:

1.1、系统管理
用户管理:对该系统的使用者即用户信息进行维护。
日志管理:为了系统的安全,对前台人员的导致业务数据更新的操作需要记录日志系统管理员可以定期查看和删除日志。
酒店人员权限管理:可对酒店各部门的员工进行权限的统一分配,以及更新操作。
1.2、房客管理
客房预定管理:用户可以通过网上登录注册登录浏览网站点击上面的立即预定,有账号跳到登录界面,否则注册界面,登录成功跳转预定界面,预定界面显示客房类型和客房价格以及需要消费的项目,点击预定,如未完善用户信息,则完善用户预定的信息(预定人,证件类别,证件号码,联系电话,入住时间,离店时间,入住人数等等),否则直接跳转预定成功,显示单号和客户预定信息,并将预定的内容传到后台,后台可以查询。用户亦可自行取消预定。(显示预定状态——包含未预定,已预订)。预定一律到店付,不进行在线支付。客户可以在网上修改自己的预定信息。亦可到店修改。
入住登记管理:客户未预定房间时,酒店前台查询客房状态,在有空房的情况下,填写客户入住信息,如(预定人,证件类别,证件号码,联系电话,入住时间,离店时间,入住人数等等),后台可以查询客房入住列表和人数,也可以修改入住信息。
预定转入住管理(实际上是预定管理后台的一部分):后台查询客户预定信息,如已预订,则办理入住,点击入住按钮,将客户信息传到入住登记界面,按照原预定信息,分配房间类型,房号等等
换房管理(入住登记中修改入住信息的一部分):查询客户入住信息,对房号进行修改,同时原来的客房状态变为空房。
结账管理:客人退房时,接待人员根据客人的房卡,进行退房登记。计算客人入住期间的房费和各种消费总额。客人信息转存到历史客人表中。客房状态由“入住”转为“空房”。
1.4、客房管理
客房信息管理:客房管理是指对客房基本信息(如客房的楼层、类型、价格等)的维护。在预定、入住、换房时,都需要对客房的信息进行查看。客房状态:包括三种空房、已预订、入住、故障。当客人预定后,变为已预定,当客人入住后,变为入住,房间出现故障时,变为故障,其他情况为空房。
1.5、消费管理
查询消费商品信息:如果客人在客房内消费了某些商品,对该商品进行记录管理。
1.6、基础信息管理
客房类型管理:对酒店的客房的类别的信息维护,类型描述了客房的基本自然条件,如单人间还是标准间等。考虑到系统的可扩展性,管理员可以对酒店客房的类型信息进行动态的维护。
楼层管理:对酒店的客房所在的楼层的信息的维护,简单的查询所有楼层信息,新增楼层信息,考虑到系统的可扩展性,管理员可以对酒店客房的楼层信息进行动态的维护。
商品类别管理:对酒店的商品的类别进行维护。考虑到系统的可扩展性,管理员可以对商品类型的状态信息进行动态的维护。
商品管理:对酒店的商品信息进行维护。考虑到系统的可扩展性,管理员可以对商品信息进行动态的维护。
会员管理:对该系统的会员信息进行维护。对于会员,如果达到一定的积 分,会有相应的折扣。
1.7、PA(公共区域)管理:
酒店卫生管理:在客人离店后,对房间进行清洁工作,更换住宿所需的必需品。当客人需连续住宿多天的时候,询问客人是否需要每天打扫,如果需要,则对房间进行清洁工作,如果不需要,则在客人离店后打扫即可.//查询
异常情况管理:若发现下水道堵塞,热水器故障等问题的时候,立即报修,通知设备管理部,并将客房状态改为“故障”。//查询
客户需求管理:如有客户有加床的需求,上报并及时处理。//查询
酒店物品采购管理:对酒店日常所需物品进行采购。//只能增加//查询
设备维修管理:当接到设备维修通知的时候,立即通知维修人员,到相应的地点进行设备维修。维修成功后,将客房状态改为“空房”。//查询
二、项目性能需求
集中数据管理、分布式应用,实现信息的全面共享,为决策者提供最新的人力资源数据。
完全基于浏览器的操作模式,安装简单、操作方便,具有良好的系统扩充能力。
灵活的模块需求设计,可根据实训项目周期灵活裁剪。
严格的安全管理机制。利用 SSL 技术维护网络传输安全,利用安全规则和特权保证基本信息的安全管理,提供日常操作的审计功能,并对重要的安全事件提供报警,对重要数据进行加密。
支持中英文界面切换。
对于系统执行的重要操作自动记录操作人和操作日期。操作人默认为当前登录人员。操作日期默认为当天。

由于本程序规模不大,可供课程设计,毕业设计学习演示之用

环境需要

1.运行环境:最好是java jdk 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/8.0版本均可;

6.是否Maven项目: 否;

技术栈

1. 后端:Spring+struts+Hibernate

2. 前端:JSP+css+javascript+bootstrap+jquery+echarts

使用说明

1. 使用Navicat或者其它工具,在mysql中创建数据库,库名hotel,并导入项目的sql文件;
2. 使用IDEA/Eclipse/MyEclipse导入项目,注意hotel与hotelManage两个源码需分别导入;
3. 将项目中config/jdbc.properties配置文件中的数据库配置改为自己的配置;
4. 分别运行hotel与hotelManage项目,http://localhost:8081/hotel/login_index.do   前台首页
普通管理员账号密码:zhangsan/123
http://localhost:8080/hotelManage/manage_index.do 后台首页

超级管理员账号密码:admin/admin

运行截图

前台界面

 

 

 

 后台界面


​​​​​​​

 

 

 

相关代码 

RoomAction

package com.hotel.action;import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;import javax.servlet.http.HttpSession;import org.apachemons.beanutils.BeanUtils;
import org.apache.struts2.ServletActionContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;import com.hotel.dto.RoomDto;
import com.hotel.model.Manage;
import com.hotel.model.Room;
import com.hotel.model.Room_cat;
import com.hotel.model.UserRoom;
import com.hotel.service.LogService;
import com.hotel.service.RoomCatService;
import com.hotel.service.RoomService;
import com.hotel.service.UserRoomService;
import com.hotel.utils.Pager;
import com.hotel.utils.UUIDUtils;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;@Controller("roomAction")
@Scope("prototype")
public class RoomAction extends ActionSupport implements ModelDriven<Room>{private Room room;private int roomId;private UserRoom userRoom;public UserRoom getUserRoom() {return userRoom;
}
public void setUserRoom(UserRoom userRoom) {this.userRoom = userRoom;
}@Overridepublic Room getModel() {if(room==null) room = new Room();return room;}@Autowiredprivate RoomService roomService;@Autowiredprivate RoomCatService roomCatService;@Autowiredprivate UserRoomService userRoomService;@Autowiredprivate LogService logService;//========================图片上传private File file;//提交过来的file的名字private String fileFileName;//提交过来的file的MIME类型private String fileContentType;public File getFile() {return file;}public void setFile(File file) {this.file = file;}public String getFileFileName() {return fileFileName;}public void setFileFileName(String fileFileName) {this.fileFileName = fileFileName;}public String getFileContentType() {return fileContentType;}public void setFileContentType(String fileContentType) {this.fileContentType = fileContentType;}//========================图片上传/*** 获取客房信息列表* @return* @throws InvocationTargetException * @throws IllegalAccessException */public String roomList() throws IllegalAccessException, InvocationTargetException{Pager<Room> pagers = roomService.listAll();
//      List<RoomDto> rds = new ArrayList<RoomDto>();
//      for(Room r:pagers.getDatas()){
//          RoomDto rd = new RoomDto();
//          BeanUtils.copyProperties(rd, r);
//          //通过类型差名字
//         r.getRoom_cat().getrName();
//      }ActionContext.getContext().put("pagers", pagers);return SUCCESS;}public int getRoomId() {return roomId;}public void setRoomId(int roomId) {this.roomId = roomId;}/*** 初始化客房新增页面* @return*/public String addRoom(){List<Room_cat> roomCatList=roomCatService.list();ActionContext.getContext().put("roomCatList", roomCatList);return SUCCESS;}/*** 新增客房* @return*/public String roomAdd()throws Exception{//图片上传String root  = "D:/my/upload";InputStream is = new FileInputStream(file);fileFileName = UUIDUtils.create()+fileFileName;OutputStream os = new FileOutputStream(new File(root, fileFileName));System.out.println("fileFileName: " + fileFileName);System.out.println("file: " + file.getName());System.out.println("file: " + file.getPath());byte[] buffer = new byte[500];int length = 0;while(-1 != (length = is.read(buffer, 0, buffer.length))){os.write(buffer);}os.close();is.close();room.setImage("\\upload\\"+fileFileName);room.setIsPay(0);roomService.add(room);Room_cat  room_cat1=roomCatService.load(room.getRoom_cat().getId());room_cat1.setNum(room_cat1.getNum()+1);roomCatService.update(room_cat1);String content="新增客房";HttpSession session =ServletActionContext.getRequest().getSession();int userId = Integer.parseInt( session.getAttribute("userId").toString());//插入日志logService.addLog(content,userId);ActionContext.getContext().put("url", "/room_roomList.do");return "redirect";}/*** 删除客房* @return*/public String delRoom(){Room  room =roomService.roomDetail(roomId);roomService.delRoom(roomId);Room_cat  room_cat1=roomCatService.load(room.getRoom_cat().getId());room_cat1.setNum(room_cat1.getNum()-1);roomCatService.update(room_cat1);String content="删除客房";HttpSession session =ServletActionContext.getRequest().getSession();int userId = Integer.parseInt( session.getAttribute("userId").toString());//插入日志logService.addLog(content,userId);ActionContext.getContext().put("url", "/room_roomList.do");return "redirect";}/*** 初始化修改页面* @Description (TODO这里用一句话描述这个方法的作用)* @return*/public String updateRoom(){Room  room =roomService.roomDetail(roomId);List<Room_cat> roomCatList=roomCatService.list();ActionContext.getContext().put("roomCatList", roomCatList);ActionContext.getContext().put("room", room);return "success";}/*** 修改客房* @return*/public String roomUpdate()throws Exception{if(file!=null){//图片上传String root  = "D:/my/upload";InputStream is = new FileInputStream(file);fileFileName = UUIDUtils.create()+fileFileName;OutputStream os = new FileOutputStream(new File(root, fileFileName));System.out.println("fileFileName: " + fileFileName);System.out.println("file: " + file.getName());System.out.println("file: " + file.getPath());byte[] buffer = new byte[500];int length = 0;while(-1 != (length = is.read(buffer, 0, buffer.length))){os.write(buffer);}os.close();is.close();room.setImage("\\upload\\"+fileFileName);}else{Room  r =roomService.roomDetail(room.getId());room.setImage(r.getImage());}roomService.update(room);String content="修改客房";HttpSession session =ServletActionContext.getRequest().getSession();int userId = Integer.parseInt( session.getAttribute("userId").toString());//插入日志logService.addLog(content,userId);ActionContext.getContext().put("url", "/room_roomList.do");return "redirect";}/*** 获取客房前的信息列表* @return* @throws InvocationTargetException * @throws IllegalAccessException */public String changeRoomList() {Pager<Room> pagers = roomService.listAllChangeRoom();ActionContext.getContext().put("pagers", pagers);return SUCCESS;}/*** 酒店卫生管理列表* @return*/public String healthList() {Pager<UserRoom> pagers = userRoomService.listAllUserRoom();ActionContext.getContext().put("pagers", pagers);return SUCCESS;}}

RoomCatAction

package com.hotel.action;import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import javax.servlet.http.HttpSession;
import org.apache.struts2.ServletActionContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import com.hotel.model.Room_cat;
import com.hotel.service.LogService;
import com.hotel.service.RoomCatService;
import com.hotel.utils.Pager;
import com.hotel.utils.UUIDUtils;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;@Controller("roomCatAction")
@Scope("prototype")
public class RoomCatAction extends ActionSupport implements ModelDriven<Room_cat>{private Room_cat room_cat;private String rName2;private int roomCatId;public String getrName2() {return rName2;
}public void setrName2(String rName2) {this.rName2 = rName2;
}@Overridepublic Room_cat getModel() {if(room_cat==null) room_cat = new Room_cat();return room_cat;}@Autowiredprivate RoomCatService roomCatService;@Autowiredprivate LogService logService;//========================图片上传private File file;//提交过来的file的名字private String fileFileName;//提交过来的file的MIME类型private String fileContentType;public File getFile() {return file;}public void setFile(File file) {this.file = file;}public String getFileFileName() {return fileFileName;}public void setFileFileName(String fileFileName) {this.fileFileName = fileFileName;}public String getFileContentType() {return fileContentType;}public void setFileContentType(String fileContentType) {this.fileContentType = fileContentType;}//========================图片上传public int getRoomCatId() {return roomCatId;}public void setRoomCatId(int roomCatId) {this.roomCatId = roomCatId;}/*** 获取客房类型信息列表* @return*/public String roomCatList(){Pager<Room_cat> pagers = roomCatService.listAll();ActionContext.getContext().put("pagers", pagers);return SUCCESS;}/*** 初始化客房类型新增页面* @return*/public String addRoomCat(){return SUCCESS;}/*** 新增类型* @return*/public String roomAddCat()throws Exception{//图片上传String root  = "D:/my/upload";InputStream is = new FileInputStream(file);fileFileName = UUIDUtils.create()+fileFileName;OutputStream os = new FileOutputStream(new File(root, fileFileName));System.out.println("fileFileName: " + fileFileName);System.out.println("file: " + file.getName());System.out.println("file: " + file.getPath());byte[] buffer = new byte[500];int length = 0;while(-1 != (length = is.read(buffer, 0, buffer.length))){os.write(buffer);}os.close();is.close();room_cat.setImage("\\upload\\"+fileFileName);roomCatService.add(room_cat);String content="新增客房类型";HttpSession session =ServletActionContext.getRequest().getSession();int userId = Integer.parseInt( session.getAttribute("userId").toString());//插入日志logService.addLog(content,userId);ActionContext.getContext().put("url", "/roomCat_roomCatList.do");return "redirect";}/*** 初始化修改页面* @Description (TODO这里用一句话描述这个方法的作用)* @return*/public String updateRoomCat(){Room_cat  room_cat =roomCatService.roomCatDetail(roomCatId);ActionContext.getContext().put("room_cat", room_cat);return "success";}/*** 修改客房类别* @return*/public String roomCatUpdate()throws Exception{if(file!=null){//图片上传String root  = "D:/my/upload";InputStream is = new FileInputStream(file);fileFileName = UUIDUtils.create()+fileFileName;OutputStream os = new FileOutputStream(new File(root, fileFileName));System.out.println("fileFileName: " + fileFileName);System.out.println("file: " + file.getName());System.out.println("file: " + file.getPath());byte[] buffer = new byte[500];int length = 0;while(-1 != (length = is.read(buffer, 0, buffer.length))){os.write(buffer);}os.close();is.close();room_cat.setImage("\\upload\\"+fileFileName);}else{Room_cat  r =roomCatService.roomCatDetail(room_cat.getId());room_cat.setImage(r.getImage());}roomCatService.update(room_cat);String content="修改客房类型";HttpSession session =ServletActionContext.getRequest().getSession();int userId = Integer.parseInt( session.getAttribute("userId").toString());//插入日志logService.addLog(content,userId);ActionContext.getContext().put("url", "/roomCat_roomCatList.do");return "redirect";}}

如果也想学习本系统,下面领取。关注并回复:135ssh 

更多推荐

Java项目:135ssh酒店管理系统前台+后台两套源码

本文发布于:2024-03-13 00:53:10,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1732815.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:两套   前台   源码   后台   酒店管理系统

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!