基于SSH的酒店管理系统的设计与实现 (含源码+sql+视频导入教程)

👉文末查看项目功能视频演示+获取源码+sql脚本+视频导入教程视频

1 、功能描述

  基于SSH的酒店管理系统拥有两种角色

管理员:房间管理、房型管理、客户管理、预定管理、入住管理(到店入住、预定入住、正在入住)、账单管理、会员管理、评论管理、员工管理、结账、换房等

用户:分类查看房屋、预定房屋、登录注册等

1.1 背景描述

  酒店管理系统是一种专门设计用于帮助酒店管理日常运营的软件系统。该系统通常包括预订管理、客房分配、客户信息管理、账单结算、库存管理和员工排班等功能。通过酒店管理系统,员工可以轻松地处理客人的预订请求,检查客房可用性,并实时更新客房状态。此外,系统还能够跟踪客户信息和偏好,从而提供更个性化的服务。对于酒店财务管理方面,系统也能够有效地管理账单和支付流程,最大限度地减少错误和延误。库存管理功能有助于确保酒店的各种物品充足,并在需要时及时补充。最后,酒店管理系统还能协助管理员工排班和考勤,以确保酒店的各项工作都能有条不紊地进行。这些功能共同帮助酒店提高效率、优化客户体验,并实现良好的经营管理。

2、项目技术

后端框架:struts+spring+hibernate

前端技术:jsp、css、JavaScript、JQuery

2.1 SSH

  SSH框架(Struts+Spring+Hibernate)是一种广泛应用的Java企业级开发框架组合,它将Struts、Spring和Hibernate三个优秀的框架有机地结合在一起,提供了一套完整的解决方案,可以帮助开发人员快速构建可扩展、可维护的Java应用程序。

2.2 mysql

  MySQL是一款Relational Database Management System,直译过来的意思就是关系型数据库管理系统,MySQL有着它独特的特点,这些特点使他成为目前最流行的RDBMS之一,MySQL想比与其他数据库如ORACLE、DB2等,它属于一款体积小、速度快的数据库,重点是它符合本次毕业设计的真实租赁环境,拥有成本低,开发源码这些特点,这也是选择它的主要原因。

3、开发环境

  • JAVA版本:JDK1.8
  • IDE类型:IDEA、Eclipse都可运行
  • tomcat版本:Tomcat 7-10版本均可
  • 数据库类型:MySql(5.x和8.x版本都可)
  • maven项目:否
  • 硬件环境:Windows 或者 Mac OS

4、功能截图+视频演示+文档目录

4.1 登录注册

登录

4.2 前端模块

首页

分类查看

房间详细信息

4.3 用户模块

用户-订单查看

4.4管理员 模块

管理员-房间管理

管理员-房型管理

管理员-会员管理

管理员-客户管理

管理员-评论管理

管理员-员工管理

管理员-账单管理

管理员-预订管理

管理员-入住管理

管理员-预订入住

管理员-正在入住

5 、核心代码实现

5.1 配置代码

database.database=mysql
database.url=jdbc:mysql://localhost:3306/hoteldb?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&rewriteBatchedStatements=true
database.username=root
database.password=root

5.2 其它核心代码

package com.jiudian.checkin.action;

import com.jiudian.checkin.service.CheckinManageService;
import com.jiudian.customer.entity.Customer;
import com.jiudian.room.entity.Room;
import com.jiudian.room.service.RoomManageService;
import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.convention.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

@Controller
@ParentPackage("my-default")
@Namespace("/")
@Scope("prototype")
public class CheckinManageAction extends ActionSupport {

    @Autowired
    private CheckinManageService checkinManageService;

    @Autowired
    private RoomManageService roomManageService;


    private String roomid;
    private String checkinid;
    private String accesscardID;
    private String[] customerAddress;
    private String[] customerCard;
    private String[] customerName;
    private String[] customerPhone;
    private String[] customerSex;
    private String notes;
    private String vipphone;
    private String roomtypeid;
    private String bookingid;
    private int page;
    private int limit;

    /**
     * 显示所有可入住的房间
     * */
    @Action(value = "/sys/checkin/checkin",
            interceptorRefs = {@InterceptorRef("MyInterceptor")},
            results = {@Result(name = "index", location = "/checkin/select-room.jsp")})
    public String index() {
        return "index";
    }

    /**
     * 显示所有入住记录
     * */
    @Action(value = "/sys/checkin/allcheckin",
            interceptorRefs = {@InterceptorRef("MyInterceptor")},
            results = {@Result(name = "allcheckin", location = "/checkin/checkin.jsp")})
    public String allcheckin() {
        return "allcheckin";
    }

    /**
     * 显示正在入住记录
     * */
    @Action(value = "/sys/checkin/checkining",
            interceptorRefs = {@InterceptorRef("MyInterceptor")},
            results = {@Result(name = "checkining", location = "/checkin/checkining.jsp")})
    public String checkining() {
        return "checkining";
    }

    /**
     * 跳转到办理入住页面
     * */
    @Action(value = "/sys/checkin/firstcheckin",
            interceptorRefs = {@InterceptorRef("MyInterceptor")},
            results = {@Result(name = "firstcheckin", location = "/checkin/checkin-add.jsp")})
    public String firstcheckin() {
        Room room = roomManageService.get(roomid);
        ServletActionContext.getContext().put("room", room);
        return "firstcheckin";
    }

    /**
     * 新增到店入住信息
     * */
    @Action(value = "/sys/checkin/addcheckin",
            interceptorRefs = {@InterceptorRef("MyInterceptor")},
            results = {@Result(name = "addcheckin", location = "/sys/ok.jsp"),
                        @Result(name = "fullroom", location = "/checkin/fullroom.jsp")})
    public String addcheckin() {

        if(checkinManageService.ablecheckin(roomid)) {
            //将customer组合成列表
            List<Customer> customers = new ArrayList<>();
            for (int i = 0; i < customerName.length; i++) {
                Customer temp = new Customer();
                temp.setCustomerName(customerName[i]);
                temp.setCustomerSex(customerSex[i]);
                temp.setCustomerPhone(customerPhone[i]);
                temp.setCustomerCard(customerCard[i]);
                temp.setCustomerAddress(customerAddress[i]);
                customers.add(temp);
            }

            checkinManageService.addcheckin(roomid, accesscardID, notes, vipphone, customers);
            return "addcheckin";
        }
        else {
            return "fullroom";
        }
    }

    /**
     * 跳转到预定入住页面
     * */
    @Action(value = "/sys/checkin/bookingcheckin",
            interceptorRefs = {@InterceptorRef("MyInterceptor")},
            results = {@Result(name = "bookingcheckin", location = "/checkin/bookingcheckin-add.jsp")})
    public String bookingcheckin() {
        ServletActionContext.getContext().put("vipphone", vipphone);
        ServletActionContext.getContext().put("roomTypeId", roomtypeid);
        ServletActionContext.getContext().put("bookingid", bookingid);
        return "bookingcheckin";
    }

    /**
     * 新增预定入住
     * */
    @Action(value = "/sys/checkin/addbookingcheckin",
            interceptorRefs = {@InterceptorRef("MyInterceptor")},
            results = {@Result(name = "addbookingcheckin", location = "/sys/ok.jsp")})
    public String addbookingcheckin() {
        //将customer组合成列表
        List<Customer> customers = new ArrayList<>();
        for (int i = 0; i < customerName.length; i++) {
            Customer temp = new Customer();
            temp.setCustomerName(customerName[i]);
            temp.setCustomerSex(customerSex[i]);
            temp.setCustomerPhone(customerPhone[i]);
            temp.setCustomerCard(customerCard[i]);
            temp.setCustomerAddress(customerAddress[i]);
            customers.add(temp);
        }
        checkinManageService.addcheckin(roomid, accesscardID, notes, vipphone, customers);
        checkinManageService.delbooking(bookingid);
        return "addbookingcheckin";
    }

    /**
     * 分页返回入住json
     *
     */
    @Action(value = "/sys/checkin/checkinlist",
            interceptorRefs = {@InterceptorRef("MyInterceptor")})
    public void checkinlist() throws IOException {
        String jsonstring = this.checkinManageService.checkinPagination(page, limit);
        ServletActionContext.getResponse().setContentType("application/json;charset=utf-8");
        ServletActionContext.getResponse().getWriter().write(jsonstring);
    }

    /**
     * 分页返回正在入住json
     *
     */
    @Action(value = "/sys/checkin/checkininglist",
            interceptorRefs = {@InterceptorRef("MyInterceptor")})
    public void checkininglist() throws IOException {
        String jsonstring = this.checkinManageService.checkiningPagination(page, limit);
        ServletActionContext.getResponse().setContentType("application/json;charset=utf-8");
        ServletActionContext.getResponse().getWriter().write(jsonstring);
    }

    /**
     * 返回一个入住详情信息json
     *
     */
    @Action(value = "/sys/checkin/onecheckin",
            interceptorRefs = {@InterceptorRef("MyInterceptor")})
    public void onecheckin() throws IOException {
        String jsonstring = this.checkinManageService.onecheckin(checkinid);
        ServletActionContext.getResponse().setContentType("application/json;charset=utf-8");
        ServletActionContext.getResponse().getWriter().write(jsonstring);
    }

    /**
     * 跳转到一个入住详情信息页面
     *
     */
    @Action(value = "/sys/checkin/checkindetails",
            interceptorRefs = {@InterceptorRef("MyInterceptor")},
            results = {@Result(name = "checkindetails", location = "/checkin/details.jsp")})
    public String checkindetails() {
        ServletActionContext.getContext().put("checkinid", checkinid);
        return "checkindetails";
    }

    /**
     * 跳转到换房页面
     * */
    @Action(value = "/sys/checkin/exchange",
            interceptorRefs = {@InterceptorRef("MyInterceptor")},
            results = {@Result(name = "exchange", location = "/checkin/exchange.jsp")})
    public String exchange() {
        ServletActionContext.getContext().put("checkinid", checkinid);
        return "exchange";
    }

    /**
     * 提交换房信息
     * */
    @Action(value = "/sys/checkin/updateexchange",
            interceptorRefs = {@InterceptorRef("MyInterceptor")},
            results = {@Result(name = "updateexchange", location = "/sys/ok.jsp")})
    public String updateexchange() {
        checkinManageService.updateexchange(checkinid, roomid);
        return "updateexchange";
    }

    public void setCheckinid(String checkinid) {
        this.checkinid = checkinid;
    }

    public void setRoomid(String roomid) {
        this.roomid = roomid;
    }

    public void setAccesscardID(String accesscardID) {
        this.accesscardID = accesscardID;
    }

    public void setCustomerAddress(String[] customerAddress) {
        this.customerAddress = customerAddress;
    }

    public void setCustomerCard(String[] customerCard) {
        this.customerCard = customerCard;
    }

    public void setCustomerName(String[] customerName) {
        this.customerName = customerName;
    }

    public void setCustomerPhone(String[] customerPhone) {
        this.customerPhone = customerPhone;
    }

    public void setCustomerSex(String[] customerSex) {
        this.customerSex = customerSex;
    }

    public void setNotes(String notes) {
        this.notes = notes;
    }

    public void setVipphone(String vipphone) {
        this.vipphone = vipphone;
    }

    public void setRoomtypeid(String roomtypeid) {
        this.roomtypeid = roomtypeid;
    }

    public void setBookingid(String bookingid) {
        this.bookingid = bookingid;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public void setLimit(int limit) {
        this.limit = limit;
    }
}

6 、功能视频演示

基于SSH的酒店管理系统

7 、 获取方式

👇 大家点赞、收藏、关注、评论啦 👇🏻获取联系方式,后台回复关键词:酒店👇🏻

在这里插入图片描述

  • 33
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
基于SSH的会议室管理系统是一种使用安全外壳协议(SSH)来管理和控制会议室预订和使用的系统。这个系统允许用户通过SSH远程访问服务器,进行会议室的预订、查询和取消等操作。 该系统的主要功能包括以下几个方面: 1. 预订会议室:用户可以通过SSH连接服务器,选择需要预订的会议室、预订时间和日期,并提交预订请求。系统将检查会议室的可用性,并发送确认信息给用户。 2. 查询会议室:用户可以通过SSH连接服务器,查询特定会议室在指定时间段内的可用情况。系统将返回相关会议室的预订状态,帮助用户选择合适的时间段进行预订。 3. 取消预订:用户可以通过SSH连接服务器,取消已经预订的会议室。系统将更新会议室的预订状态,并发送取消确认信息给用户。 4. 系统管理系统管理员可以通过SSH连接服务器,对会议室管理系统进行管理和配置,例如添加、删除或修改会议室信息,更新预订规则等。 基于SSH的会议室管理系统具有以下优势: 1. 安全性高:基于SSH连接,加密传输数据,防止数据泄露和非法访问。 2. 可远程访问:用户可以通过互联网远程连接服务器,并进行预订和查询操作,方便快捷。 3. 实时更新:系统会实时更新会议室的预订状态,确保用户获取最新可用信息。 4. 管理简单:管理员可以通过SSH连接对系统进行管理,方便添加新的会议室和修改预订规则。 总之,基于SSH的会议室管理系统通过安全外壳协议提供了高度安全性和可远程访问性,帮助用户和管理员轻松管理会议室的预订和使用。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

程序员王不二buer

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值