⼩型酒店管理系统(Vue+SpringBoot)(持续更新)
⼩型酒店管理系统
⼀、前⾔
⼩型酒店管理系统采⽤Vue前端框架、SpringBoot框架实现项⽬前后端分离,并通过Mysql存储数据。本系统实现针对不同⽤户的登录验证;客户信息、前台管理员以及超级管理员等信息存取;客户信息登记、预约、⼊住、消费等功能;前台管理员对客户操作的管理;超级管理员对客户以及前台管理员操作进⾏控制等的功能,系统功能基本实现,测试良好。
⼆、系统可⾏性分析
(⼀)系统开发⼯具及平台
操作系统:Windows 10
编程语⾔:Vue、SpringBoot
开发⼯具:WebStorm、IDEA、Navicat
数据库管理系统:Mysql 5.5(建议使⽤较⾼版本的数据库)
⽹站快速成型⼯具:Element
(⼆)操作可⾏性
本系统采⽤界⾯化设计,简单易⽤,各项数据都⽤表格形式显⽰出来,酒店营业情况⼀⽬了然。并且提供了⼤量的操作提⽰以及出错信息,⼤⼤的⽅便⽤户的使⽤,同时也减少了出错的可能,确保了数据的正确性、完整性和⼀致性。
三、系统需求分析
(⼀)系统功能需求
实现客房预订、登记⼊住,以及退房结账等客房营销功能;
实现房间列表和房间状态信息的实时查询、更新;
实现消费的⼀次性结账处理功能;
实现快速准确的顾客信息查询功能;
实现前台管理功能;
实现系统数据库维护功能,能够对数据库进⾏备份和还原操作;
实现账号验证功能,只有拥有合法账号的⽤户才能进⼊并使⽤本系统。
四、数据库设计
(⼀)数据库结构
(⼆)数据库表设计
本系统⼀共设计8个数据库表,数据库表设计如下,数据库⽂件见附件
避坑——数据库表在设计过程发现时间戳(timestamp)类型在数据库5.5版本和5.5以上版本的表⽰有所区别,建议⼩伙伴导⼊数据库过程⾃⾏查询它们在数据库表中的表⽰
------------------------------------
-- Table structure for background --
-- ---------------------------------
DROP TABLE IF EXISTS`background`;
CREATE TABLE`background`(
`back_id`varchar(50)CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT'后台管理的⼯号',
`password`varchar(1000)CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT'
后台登录密码',
PRIMARY KEY(`back_id`)USING BTREE
)ENGINE=InnoDB CHARACTER SET= utf8 COLLATE= utf8_general_ci ROW_FORMAT = Compact;
----------------------------------
-- Table structure for book_msg --
----------------------------------
DROP TABLE IF EXISTS`book_msg`;
CREATE TABLE`book_msg`(
`id`int(50)NOT NULL AUTO_INCREMENT COMMENT'预定信息id',
`guest_id_card`varchar(50)CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT'⽤户的⾝份证号',
`from_time`timestamp(0)NOT NULL DEFAULT CURRENT_TIMESTAMP(0)ON UPDATE CURRENT_TIMESTAMP(0)COMMENT'预计⼊住时间',
`to_time`timestamp(0)NOT NULL DEFAULT'0000-00-00 00:00:00'COMMENT'预计退房时间',
`rank`varchar(10)CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT'预定的级别,分A,B,C,D级,级别⼀次降低',
`state`int(10)NOT NULL DEFAULT0COMMENT'预定处理状态,0代表未处理,1代表已处理,11代表已⼊住(失效)',
`result_room`varchar(20)CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT'预定到的房间',
PRIMARY KEY(`id`)USING BTREE,
INDEX`type_id`(`rank`)USING BTREE,
INDEX`guest_id_card`(`guest_id_card`)USING BTREE,
INDEX`result_room`(`result_room`)USING BTREE,
CONSTRAINT`book_msg_ibfk_1`FOREIGN KEY(`guest_id_card`)REFERENCES`guest`(`id_card`)ON DELETE RESTRICT ON UPDATE RESTRICT )ENGINE=InnoDB AUTO_INCREMENT=17CHARACTER SET= utf8 COLLATE= utf8_general_ci ROW_FORMAT = Compact;
CREATE TABLE`check_in`(
`id`int(20)NOT NULL AUTO_INCREMENT COMMENT'⼊住情况的id',
`guest_id_card`varchar(50)CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT'客户的⾝份证号',
`room_id`varchar(20)CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT'房间号',
`from_time`timestamp(0)NOT NULL DEFAULT CURRENT_TIMESTAMP(0)ON UPDATE CURRENT_TIMESTAMP(0)COMMENT'⼊住⽇期',
`to_time`timestamp(0)NOT NULL DEFAULT'0000-00-00 00:00:00'COMMENT'预计退房时间',
`state`int(10)NOT NULL COMMENT'状态,0代表已退房,1代表正在⼊住',
PRIMARY KEY(`id`)USING BTREE,
INDEX`guest_id_card`(`guest_id_card`)USING BTREE,
INDEX`room_id`(`room_id`)USING BTREE,
CONSTRAINT`check_in_ibfk_1`FOREIGN KEY(`guest_id_card`)REFERENCES`guest`(`id_card`)ON DELETE RESTRICT ON UPDATE RESTRICT, CONSTRAINT`check_in_ibfk_2`FOREIGN KEY(`room_id`)REFERENCES`room`(`room_id`)ON DELETE RESTRICT ON UPDATE RESTRICT
)ENGINE=InnoDB AUTO_INCREMENT=18CHARACTER SET= utf8 COLLATE= utf8_general_ci ROW_FORMAT = Compact;
------------------------------
-- Table structure for cost --
------------------------------
DROP TABLE IF EXISTS`cost`;
CREATE TABLE`cost`(
`id`int(20)NOT NULL AUTO_INCREMENT COMMENT'消费信息的id',
`cost_type_id`int(20)NOT NULL COMMENT'消费的名称',
`room_id`varchar(20)CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT'房间的id',
`num`int(10)NOT NULL DEFAULT1COMMENT'数量',
`state`int(20)NOT NULL DEFAULT0COMMENT'状态,0表⽰未结算,1表⽰已结算,11表⽰该次⼊住的⽤户全部结算',
PRIMARY KEY(`id`)USING BTREE,
INDEX`cost_type_id`(`cost_type_id`)USING BTREE,
INDEX`room_id`(`room_id`)USING BTREE,
CONSTRAINT`cost_ibfk_2`FOREIGN KEY(`cost_type_id`)REFERENCES`cost_type`(`id`)ON DELE
TE RESTRICT ON UPDATE RESTRICT, CONSTRAINT`cost_ibfk_3`FOREIGN KEY(`room_id`)REFERENCES`room`(`room_id`)ON DELETE RESTRICT ON UPDATE RESTRICT
)ENGINE=InnoDB AUTO_INCREMENT=72CHARACTER SET= utf8 COLLATE= utf8_general_ci ROW_FORMAT = Compact;
-----------------------------------
-- Table structure for cost_type --
-----------------------------------
DROP TABLE IF EXISTS`cost_type`;
CREATE TABLE`cost_type`(
`id`int(50)NOT NULL AUTO_INCREMENT COMMENT'消费类型的id',
`name`varchar(100)CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT'消费项⽬的名称',
`money`float NOT NULL COMMENT'⾦额',
PRIMARY KEY(`id`,`name`)USING BTREE
)ENGINE=InnoDB AUTO_INCREMENT=39CHARACTER SET= utf8 COLLATE= utf8_general_ci ROW_FORMAT = Compact;
-------------------------------
-- Table structure for front --
-------------------------------
DROP TABLE IF EXISTS`front`;
CREATE TABLE`front`(
`front_id`varchar(50)CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT'前台管理员的⼯号',
`name`varchar(50)CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMM
ENT'前台管理员的姓名',
`password`varchar(1000)CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT'前台管理的登录密码',
`phone`varchar(50)CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT'前台管理员的电话',
PRIMARY KEY(`front_id`)USING BTREE
)ENGINE=InnoDB CHARACTER SET= utf8 COLLATE= utf8_general_ci ROW_FORMAT = Compact;
CREATE TABLE`guest`(
`id_card`varchar(50)CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT'客户的⾝份证号',
`name`varchar(50)CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT'客户的姓名',
`contact`varchar(50)CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT'客户的联系⽅式',
PRIMARY KEY(`id_card`)USING BTREE
)ENGINE=InnoDB CHARACTER SET= utf8 COLLATE= utf8_general_ci ROW_FORMAT = Compact;
------------------------------
-- Table structure for room --
------------------------------
DROP TABLE IF EXISTS`room`;
CREATE TABLE`room`(
`room_id`varchar(20)CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT'房间编号',
`size`double NOT NULL COMMENT'房间⼤⼩,以平⽅⽶为单位',
`rank`varchar(10)CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT'级别,分A,B,C,D级,级别⼀次降低', `rent`double NOT NULL COMMENT'租⾦,单位是⼈民币元',
`earnest`double NOT NULL COMMENT'⼊住定⾦,单位是⼈民币元',
`max_num`int(5)NOT NULL COMMENT'最⼤⼈数',
`position`varchar(100)CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT'地理位置', PRIMARY KEY(`room_id`)USING BTREE
)ENGINE=InnoDB CHARACTER SET= utf8 COLLATE= utf8_general_ci ROW_FORMAT = Compact;
五、系统功能设计
(⼀)登录模块
针对不同⽤户设置不同的⽤户名和密码前台管理员
⽤户名:0001
密码:123456
超级管理员
⽤户名:admin
密码:981028
客户
springboot框架是干嘛的⽤户名:暂⽆(后续设计)
密码:暂⽆(后续设计)
设计效果图展⽰
关键代码

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。