酒店管理系统

酒店管理系统登录注册界面

酒店管理系统mysql数据库版本源码:

超级管理员表创建语句如下:


create table t_admin(
	id int primary key auto_increment comment '主键',
	username varchar(100) comment '超级管理员账号',
	password varchar(100) comment '超级管理员密码'
) comment '超级管理员';
insert into t_admin(username,password) values('admin','123456');

客户表创建语句如下:


create table t_customer(
	id int primary key auto_increment comment '主键',
	username varchar(100) comment '账号',
	password varchar(100) comment '密码',
	customerName varchar(100) comment '姓名',
	sex varchar(100) comment '性别',
	age varchar(100) comment '年龄',
	phone varchar(100) comment '电话',
	idcard varchar(100) comment '身份证',
	remark varchar(100) comment '备注'
) comment '客户';

消费记账记录表创建语句如下:


create table t_jl(
	id int primary key auto_increment comment '主键',
	kfId int comment '客房',
	beginDate datetime comment '开始日期',
	endDate datetime comment '结束日期',
	ts int comment '入住天数',
	customerId int comment '客户',
	jzrq datetime comment '结账日期',
	je int comment '金额',
	sh int comment '损耗赔偿金额',
	bz varchar(100) comment '备注',
	jsr varchar(100) comment '经手人',
	jsrdh varchar(100) comment '经手人电话'
) comment '消费记账记录';

客房表创建语句如下:


create table t_kf(
	id int primary key auto_increment comment '主键',
	kfName varchar(100) comment '客房号',
	je int comment '客房金额',
	wz varchar(100) comment '位置',
	remark varchar(100) comment '备注',
	status varchar(100) comment '状态'
) comment '客房';

入住退房表创建语句如下:


create table t_rztf(
	id int primary key auto_increment comment '主键',
	kfId int comment '客房',
	rzDate datetime comment '入住日期',
	tfDate datetime comment '退房日期',
	customerId int comment '客户',
	sfz varchar(100) comment '身份证',
	remark varchar(100) comment '备注'
) comment '入住退房';

预定表创建语句如下:


create table t_yd(
	id int primary key auto_increment comment '主键',
	kfId int comment '客房',
	ydBeginDate datetime comment '预定开始日期',
	ydEndDate datetime comment '预定结束日期',
	customerId int comment '客户'
) comment '预定';

酒店管理系统oracle数据库版本源码:

超级管理员表创建语句如下:


create table t_admin(
	id integer,
	username varchar(100),
	password varchar(100)
);
insert into t_admin(id,username,password) values(1,'admin','123456');
--超级管理员字段加注释
comment on column t_admin.id is '主键';
comment on column t_admin.username is '超级管理员账号';
comment on column t_admin.password is '超级管理员密码';
--超级管理员表加注释
comment on table t_admin is '超级管理员';

客户表创建语句如下:


create table t_customer(
	id integer,
	username varchar(100),
	password varchar(100),
	customerName varchar(100),
	sex varchar(100),
	age varchar(100),
	phone varchar(100),
	idcard varchar(100),
	remark varchar(100)
);
--客户字段加注释
comment on column t_customer.id is '主键';
comment on column t_customer.username is '账号';
comment on column t_customer.password is '密码';
comment on column t_customer.customerName is '姓名';
comment on column t_customer.sex is '性别';
comment on column t_customer.age is '年龄';
comment on column t_customer.phone is '电话';
comment on column t_customer.idcard is '身份证';
comment on column t_customer.remark is '备注';
--客户表加注释
comment on table t_customer is '客户';

消费记账记录表创建语句如下:


create table t_jl(
	id integer,
	kfId int,
	beginDate datetime,
	endDate datetime,
	ts int,
	customerId int,
	jzrq datetime,
	je int,
	sh int,
	bz varchar(100),
	jsr varchar(100),
	jsrdh varchar(100)
);
--消费记账记录字段加注释
comment on column t_jl.id is '主键';
comment on column t_jl.kfId is '客房';
comment on column t_jl.beginDate is '开始日期';
comment on column t_jl.endDate is '结束日期';
comment on column t_jl.ts is '入住天数';
comment on column t_jl.customerId is '客户';
comment on column t_jl.jzrq is '结账日期';
comment on column t_jl.je is '金额';
comment on column t_jl.sh is '损耗赔偿金额';
comment on column t_jl.bz is '备注';
comment on column t_jl.jsr is '经手人';
comment on column t_jl.jsrdh is '经手人电话';
--消费记账记录表加注释
comment on table t_jl is '消费记账记录';

客房表创建语句如下:


create table t_kf(
	id integer,
	kfName varchar(100),
	je int,
	wz varchar(100),
	remark varchar(100),
	status varchar(100)
);
--客房字段加注释
comment on column t_kf.id is '主键';
comment on column t_kf.kfName is '客房号';
comment on column t_kf.je is '客房金额';
comment on column t_kf.wz is '位置';
comment on column t_kf.remark is '备注';
comment on column t_kf.status is '状态';
--客房表加注释
comment on table t_kf is '客房';

入住退房表创建语句如下:


create table t_rztf(
	id integer,
	kfId int,
	rzDate datetime,
	tfDate datetime,
	customerId int,
	sfz varchar(100),
	remark varchar(100)
);
--入住退房字段加注释
comment on column t_rztf.id is '主键';
comment on column t_rztf.kfId is '客房';
comment on column t_rztf.rzDate is '入住日期';
comment on column t_rztf.tfDate is '退房日期';
comment on column t_rztf.customerId is '客户';
comment on column t_rztf.sfz is '身份证';
comment on column t_rztf.remark is '备注';
--入住退房表加注释
comment on table t_rztf is '入住退房';

预定表创建语句如下:


create table t_yd(
	id integer,
	kfId int,
	ydBeginDate datetime,
	ydEndDate datetime,
	customerId int
);
--预定字段加注释
comment on column t_yd.id is '主键';
comment on column t_yd.kfId is '客房';
comment on column t_yd.ydBeginDate is '预定开始日期';
comment on column t_yd.ydEndDate is '预定结束日期';
comment on column t_yd.customerId is '客户';
--预定表加注释
comment on table t_yd is '预定';

oracle特有,对应序列如下:


create sequence s_t_customer;
create sequence s_t_jl;
create sequence s_t_kf;
create sequence s_t_rztf;
create sequence s_t_yd;

酒店管理系统sqlserver数据库版本源码:

超级管理员表创建语句如下:


--超级管理员
create table t_admin(
	id int identity(1,1) primary key not null,--主键
	username varchar(100),--超级管理员账号
	password varchar(100)--超级管理员密码
);
insert into t_admin(username,password) values('admin','123456');

客户表创建语句如下:


--客户表注释
create table t_customer(
	id int identity(1,1) primary key not null,--主键
	username varchar(100),--账号
	password varchar(100),--密码
	customerName varchar(100),--姓名
	sex varchar(100),--性别
	age varchar(100),--年龄
	phone varchar(100),--电话
	idcard varchar(100),--身份证
	remark varchar(100)--备注
);

消费记账记录表创建语句如下:


--消费记账记录表注释
create table t_jl(
	id int identity(1,1) primary key not null,--主键
	kfId int,--客房
	beginDate datetime,--开始日期
	endDate datetime,--结束日期
	ts int,--入住天数
	customerId int,--客户
	jzrq datetime,--结账日期
	je int,--金额
	sh int,--损耗赔偿金额
	bz varchar(100),--备注
	jsr varchar(100),--经手人
	jsrdh varchar(100)--经手人电话
);

客房表创建语句如下:


--客房表注释
create table t_kf(
	id int identity(1,1) primary key not null,--主键
	kfName varchar(100),--客房号
	je int,--客房金额
	wz varchar(100),--位置
	remark varchar(100),--备注
	status varchar(100)--状态
);

入住退房表创建语句如下:


--入住退房表注释
create table t_rztf(
	id int identity(1,1) primary key not null,--主键
	kfId int,--客房
	rzDate datetime,--入住日期
	tfDate datetime,--退房日期
	customerId int,--客户
	sfz varchar(100),--身份证
	remark varchar(100)--备注
);

预定表创建语句如下:


--预定表注释
create table t_yd(
	id int identity(1,1) primary key not null,--主键
	kfId int,--客房
	ydBeginDate datetime,--预定开始日期
	ydEndDate datetime,--预定结束日期
	customerId int--客户
);

酒店管理系统登录后主页

酒店管理系统spring+springMVC+hibernate框架对象(javaBean,pojo)设计:

客户javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//客户
@Table(name = "t_customer")
public class Customer {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//账号
private String username;
//密码
private String password;
//姓名
private String customerName;
//性别
private String sex;
//年龄
private String age;
//电话
private String phone;
//身份证
private String idcard;
//备注
private String remark;
public String getUsername() {return username;}
public void setUsername(String username) {this.username = username;}
public String getPassword() {return password;}
public void setPassword(String password) {this.password = password;}
public String getCustomerName() {return customerName;}
public void setCustomerName(String customerName) {this.customerName = customerName;}
public String getSex() {return sex;}
public void setSex(String sex) {this.sex = sex;}
public String getAge() {return age;}
public void setAge(String age) {this.age = age;}
public String getPhone() {return phone;}
public void setPhone(String phone) {this.phone = phone;}
public String getIdcard() {return idcard;}
public void setIdcard(String idcard) {this.idcard = idcard;}
public String getRemark() {return remark;}
public void setRemark(String remark) {this.remark = remark;}
}

消费记账记录javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//消费记账记录
@Table(name = "t_jl")
public class Jl {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//客房
private Integer kfId;
//开始日期
private Date beginDate;
//结束日期
private Date endDate;
//入住天数
private Integer ts;
//客户
private Integer customerId;
//结账日期
private Date jzrq;
//金额
private Integer je;
//损耗赔偿金额
private Integer sh;
//备注
private String bz;
//经手人
private String jsr;
//经手人电话
private String jsrdh;
public Integer getKfId() {return kfId;}
public void setKfId(Integer kfId) {this.kfId = kfId;}
public Date getBeginDate() {return beginDate;}
public void setBeginDate(Date beginDate) {this.beginDate = beginDate;}
public Date getEndDate() {return endDate;}
public void setEndDate(Date endDate) {this.endDate = endDate;}
public Integer getTs() {return ts;}
public void setTs(Integer ts) {this.ts = ts;}
public Integer getCustomerId() {return customerId;}
public void setCustomerId(Integer customerId) {this.customerId = customerId;}
public Date getJzrq() {return jzrq;}
public void setJzrq(Date jzrq) {this.jzrq = jzrq;}
public Integer getJe() {return je;}
public void setJe(Integer je) {this.je = je;}
public Integer getSh() {return sh;}
public void setSh(Integer sh) {this.sh = sh;}
public String getBz() {return bz;}
public void setBz(String bz) {this.bz = bz;}
public String getJsr() {return jsr;}
public void setJsr(String jsr) {this.jsr = jsr;}
public String getJsrdh() {return jsrdh;}
public void setJsrdh(String jsrdh) {this.jsrdh = jsrdh;}
}

客房javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//客房
@Table(name = "t_kf")
public class Kf {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//客房号
private String kfName;
//客房金额
private Integer je;
//位置
private String wz;
//备注
private String remark;
//状态
private String status;
public String getKfName() {return kfName;}
public void setKfName(String kfName) {this.kfName = kfName;}
public Integer getJe() {return je;}
public void setJe(Integer je) {this.je = je;}
public String getWz() {return wz;}
public void setWz(String wz) {this.wz = wz;}
public String getRemark() {return remark;}
public void setRemark(String remark) {this.remark = remark;}
public String getStatus() {return status;}
public void setStatus(String status) {this.status = status;}
}

入住退房javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//入住退房
@Table(name = "t_rztf")
public class Rztf {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//客房
private Integer kfId;
//入住日期
private Date rzDate;
//退房日期
private Date tfDate;
//客户
private Integer customerId;
//身份证
private String sfz;
//备注
private String remark;
public Integer getKfId() {return kfId;}
public void setKfId(Integer kfId) {this.kfId = kfId;}
public Date getRzDate() {return rzDate;}
public void setRzDate(Date rzDate) {this.rzDate = rzDate;}
public Date getTfDate() {return tfDate;}
public void setTfDate(Date tfDate) {this.tfDate = tfDate;}
public Integer getCustomerId() {return customerId;}
public void setCustomerId(Integer customerId) {this.customerId = customerId;}
public String getSfz() {return sfz;}
public void setSfz(String sfz) {this.sfz = sfz;}
public String getRemark() {return remark;}
public void setRemark(String remark) {this.remark = remark;}
}

预定javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//预定
@Table(name = "t_yd")
public class Yd {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//客房
private Integer kfId;
//预定开始日期
private Date ydBeginDate;
//预定结束日期
private Date ydEndDate;
//客户
private Integer customerId;
public Integer getKfId() {return kfId;}
public void setKfId(Integer kfId) {this.kfId = kfId;}
public Date getYdBeginDate() {return ydBeginDate;}
public void setYdBeginDate(Date ydBeginDate) {this.ydBeginDate = ydBeginDate;}
public Date getYdEndDate() {return ydEndDate;}
public void setYdEndDate(Date ydEndDate) {this.ydEndDate = ydEndDate;}
public Integer getCustomerId() {return customerId;}
public void setCustomerId(Integer customerId) {this.customerId = customerId;}
}

酒店管理系统spring+springMVC+mybatis框架对象(javaBean,pojo)设计:

客户javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//客户
public class Customer  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//账号
private String username;
//密码
private String password;
//姓名
private String customerName;
//性别
private String sex;
//年龄
private String age;
//电话
private String phone;
//身份证
private String idcard;
//备注
private String remark;
public String getUsername() {return username;}
public void setUsername(String username) {this.username = username;}
public String getPassword() {return password;}
public void setPassword(String password) {this.password = password;}
public String getCustomerName() {return customerName;}
public void setCustomerName(String customerName) {this.customerName = customerName;}
public String getSex() {return sex;}
public void setSex(String sex) {this.sex = sex;}
public String getAge() {return age;}
public void setAge(String age) {this.age = age;}
public String getPhone() {return phone;}
public void setPhone(String phone) {this.phone = phone;}
public String getIdcard() {return idcard;}
public void setIdcard(String idcard) {this.idcard = idcard;}
public String getRemark() {return remark;}
public void setRemark(String remark) {this.remark = remark;}
}

消费记账记录javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//消费记账记录
public class Jl  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//客房
private Integer kfId;
//开始日期
private Date beginDate;
//结束日期
private Date endDate;
//入住天数
private Integer ts;
//客户
private Integer customerId;
//结账日期
private Date jzrq;
//金额
private Integer je;
//损耗赔偿金额
private Integer sh;
//备注
private String bz;
//经手人
private String jsr;
//经手人电话
private String jsrdh;
public Integer getKfId() {return kfId;}
public void setKfId(Integer kfId) {this.kfId = kfId;}
public Date getBeginDate() {return beginDate;}
public void setBeginDate(Date beginDate) {this.beginDate = beginDate;}
public Date getEndDate() {return endDate;}
public void setEndDate(Date endDate) {this.endDate = endDate;}
public Integer getTs() {return ts;}
public void setTs(Integer ts) {this.ts = ts;}
public Integer getCustomerId() {return customerId;}
public void setCustomerId(Integer customerId) {this.customerId = customerId;}
public Date getJzrq() {return jzrq;}
public void setJzrq(Date jzrq) {this.jzrq = jzrq;}
public Integer getJe() {return je;}
public void setJe(Integer je) {this.je = je;}
public Integer getSh() {return sh;}
public void setSh(Integer sh) {this.sh = sh;}
public String getBz() {return bz;}
public void setBz(String bz) {this.bz = bz;}
public String getJsr() {return jsr;}
public void setJsr(String jsr) {this.jsr = jsr;}
public String getJsrdh() {return jsrdh;}
public void setJsrdh(String jsrdh) {this.jsrdh = jsrdh;}
}

客房javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//客房
public class Kf  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//客房号
private String kfName;
//客房金额
private Integer je;
//位置
private String wz;
//备注
private String remark;
//状态
private String status;
public String getKfName() {return kfName;}
public void setKfName(String kfName) {this.kfName = kfName;}
public Integer getJe() {return je;}
public void setJe(Integer je) {this.je = je;}
public String getWz() {return wz;}
public void setWz(String wz) {this.wz = wz;}
public String getRemark() {return remark;}
public void setRemark(String remark) {this.remark = remark;}
public String getStatus() {return status;}
public void setStatus(String status) {this.status = status;}
}

入住退房javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//入住退房
public class Rztf  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//客房
private Integer kfId;
//入住日期
private Date rzDate;
//退房日期
private Date tfDate;
//客户
private Integer customerId;
//身份证
private String sfz;
//备注
private String remark;
public Integer getKfId() {return kfId;}
public void setKfId(Integer kfId) {this.kfId = kfId;}
public Date getRzDate() {return rzDate;}
public void setRzDate(Date rzDate) {this.rzDate = rzDate;}
public Date getTfDate() {return tfDate;}
public void setTfDate(Date tfDate) {this.tfDate = tfDate;}
public Integer getCustomerId() {return customerId;}
public void setCustomerId(Integer customerId) {this.customerId = customerId;}
public String getSfz() {return sfz;}
public void setSfz(String sfz) {this.sfz = sfz;}
public String getRemark() {return remark;}
public void setRemark(String remark) {this.remark = remark;}
}

预定javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//预定
public class Yd  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//客房
private Integer kfId;
//预定开始日期
private Date ydBeginDate;
//预定结束日期
private Date ydEndDate;
//客户
private Integer customerId;
public Integer getKfId() {return kfId;}
public void setKfId(Integer kfId) {this.kfId = kfId;}
public Date getYdBeginDate() {return ydBeginDate;}
public void setYdBeginDate(Date ydBeginDate) {this.ydBeginDate = ydBeginDate;}
public Date getYdEndDate() {return ydEndDate;}
public void setYdEndDate(Date ydEndDate) {this.ydEndDate = ydEndDate;}
public Integer getCustomerId() {return customerId;}
public void setCustomerId(Integer customerId) {this.customerId = customerId;}
}

源代码下载点这里

评论