当前位置:文档之家› 酒店管理系统项目开发设计报告

酒店管理系统项目开发设计报告

项目开发设计报告文档编号:版本号:项目名称:酒店客房管理系统项目负责人:马静项目团队成员:许江燕丁芳王静吕新芳填写时间:2014.6.6目录1 系统分析 (3)1.1 系统开发背景、开发范围、建设目标与必要性 (3)1.2 业务流程分析 (4)1.3 数据流程图 (5)2 系统设计 (6)2.1 功能模块设计 (6)2.2 系统运行环境 (8)2.2.1 操作平台 (8)2.2.2 系统实现平台 (8)2.2.3 计算机硬件要求 (8)2.3 数据库设计 (8)2.3.1 数据库逻辑设计(e-r) (8)2.3.2 数据库逻辑设计 (9)2.3.3 数据库模型 (11)2.4 输入/输出设计 (11)2.4.1 公告模块设计 (11)2.4用户界面设计 (12)3 系统实施 (12)4 参考文献 (27)附录(程序关键代码) (27)项目开发设计总结 (29)1 系统分析1.1 系统开发背景、开发范围、建设目标与必要性随着经济的迅猛发展,第三产业在国民经济中扮演着越来越重要的角色。

而随着近年来我国旅游行业的不断扩大,酒店行业的发展趋势不断看涨。

旅游业的持续火热随之而来的是酒店需求的剧增。

酒店行业的不断扩大,面临的问题也就越来越多。

对于任何一个有一定规模的酒店来说都需要有与之相媲美的管理系统。

酒店经营管理面临着越来越高的要求,一个高质量的管理信息系统不仅会为酒店创造更多的经济效益,更关乎着酒店的整体形象跟运行效率,为酒店本身及顾客带来更多的利益。

对于一个酒店来说,其最核心的业务就是住房业务,现在一般的酒店管理系统都把住房系统归结于整个管理系统之中,这对于大型的酒店集团来说造成了管理上的不便之处。

越来越多的酒店连锁集团需要一个专门的酒店住房系统,独立于其他酒店管理系统。

针对于此,由我们小组成员精心设计,采用电脑技术开发而成的酒店住房管理系统,对提高酒店管理水平,改善服务质量,增进资源利用率起了重要作用。

建设目标与必要性每个酒店规模不同,经营方向不同,对酒店管理系统设计目标的要求存明显差异.例如大型酒店有客房、餐饮、康乐、会务、购物中心等分,因此要求饭店管理信息系统的功能比较齐全,能够完成客房、餐饮、会务等各种事务处理,而住房型酒店则仅要求酒店管理信息系统能完成客房、财务等的管理即可.此外,不同酒店的组织机构也相同,供其使用的酒店管理信息系统的系统结构应与其组织机构相适应。

在系统中,主要是对客房信息、房间备品信息、经营情况、营业统计、客户的入住信息、员工信息、客户信息反馈、客户网上订房信息、房间类型等管理。

为客户提供满意的服务、便捷的通道,通过互联网了解酒店详细情况,为服务员工、管理者提供迅速、高效的服务,减免手工处理的繁琐与误差,及时、准确的反映酒店的工作情况、经营情况。

比如,快速的查询、快速的登记顾客订房情况等本系统的建设需求。

具体来说,客户从界面上输入入住地区,时间,价位/房间类型就可以查询到符合条件的房间,并且可以切入预定,选择房间类性及付款方式等。

内部管理人员从界面上直接输入某个房间号我们就会看到客人的个人信息、住宿期间各种消费、以及是否客满,同样我们输入某个部门名称也会显示它的运营相关情况,并且能够对其实现相应的管理、查询、添加、删除、统计等功能。

1.2 业务流程分析1.客人入住登记, 客户来到酒店,首先进行入住:(1) 首先,客人对前台的管理员提出住宿要求。

管理员根据顾客的要求,查询客房资源,并根据客人提出的条件看是否有符合客人要求的客房。

(2)如果没有,向客人说明情况并同时向客人推荐其它客房(3)如果有合适的客房,对客人进行住宿登记。

住宿登记包括顾客信息登记,住房记录登记。

(4)最后,发放房间钥匙或者住房凭证。

2.退房结账当客人不再需要住宿的时候,需要执行退房登记步骤。

1.3 数据流程图零层数据流:图1—3—1零层数据流图核心数据流:图1—3—2核心数据流图2 系统设计2.1 功能模块设计本系统主要分为五大模块:客户入住服务模块,客户查询模块,客房管理模块,客房预定模块,管理员操作模块。

1.客户入住服务模块分为客户入住,客户退房。

入住需要客户提供姓名,身份证,电话,房间类型和入住日期。

如果客户没有预定,输入用户的基本信息,单击“入住”按钮,完成客户的入住,对于没有预定的客户,将客户信息提交至前台管理员,并修改房间状态为“入住”; 如果是已预订的客户入住,获取用户预订信息,单击“入住”按钮,完成客户入住。

对于已经预定的客户,将其预订信息从库中删除,并修改房间状态为“入住”。

当客户入住结束要退房时,在退房界面,获取客户开房的信息,单击“退房”按钮,弹出用户酒店消费记录单,并提示用户交费。

将用户消费添加至库中,并修改房间状态为“空闲”。

2.客户查询模块当前台管理员需要客户的信息时,可以对预定过的、入住的、已经离开的客户的信息(顾客姓名、身份证号、房间类型、入住日期、结账日期、消费金额) 进行查询。

系统在查询模块设置的权限,只有酒店的管理人员登录可以查询所有信息,而工作人员不能对该模块进行操作。

3.客房管理模块在房间信息设置界面,输入房间基本信息,单击“添加”按钮,将新的房间信息添加至数据库中。

当管理员想要修改某一个房间信息时,在界面上选择要修改的房间记录,获得房间信息,进行相应修改后,单击“修改”按钮,将原来的房间信息改为新的房间信息。

当管理员想要删除某一个房间时,在界面上选择要删除的房间,单击“删除”按钮,从数据库中删除原纪录。

管理员添加房间信息时,将新的房间添加到数据库。

管理员修改房间信息时,修改数据库中相应记录的房间信息。

管理员删除房间信息时,从数据库中删除此房间。

新添加的房间号码在数据库中已经存在,则不允许添加。

删除和修改房间信息时,如果当前房间的状态为“预定”或者“在住”则不允许操作。

4.客房预定模块客房预订模块在订单信息界面中,输入客户姓名,客户证件号码,预定房间号码,单击“预定”按钮。

将此预定信息记录至数据库中。

客人证件号码,客户姓名,预定房间号码如果为空,则不允许预定。

5.管理员操作模块管理员对账户名、密码的管理和注册新的账户。

综合以上介绍与描述,可以得到系统的功能结构图如2—1所示。

图2—2—1功能模块图2.2 系统运行环境2.2.1 操作平台本系统使用Microsoft Windows 7前台使用了Eclipse来完成整个系统和其他软件系统的数据接口:ODBC2.2.2 系统实现平台编程语言:Java数据库:SqlServer 20082.2.3 计算机硬件要求本系统的运行要求不是很高,可用于CPU:1.0GZ,256PMB 内存500M以上。

硬盘在2G 以上2.3 数据库设计2.3.1 数据库逻辑设计(e-r)图2—3—1管理员e-r图图2—3—2订房信息e-r图图2—3—3客房信息e-r图图2—3—4退房信息e-r图图2—3—5顾客信息e-r图2.3.2 数据库逻辑设计根据概念实际的结果,将其转换为关系模型:1,管理员信息表(账户,密码)2,订房信息表(订单号,房间编号,房间数量,身份证,姓名,入住时间,电话)3,客房信息表(房间编号,房间类型,价格,状态)4,退房信息表(姓名,日期,数量,房间编号)5,顾客信息表(姓名,身份证,电话,房间编号)表2-3-1 管理员信息表表2-3-4退房信息表表2-3-5顾客信息2.3.3 数据库模型2.4 输入/输出设计输入要求:输入数据基本为:账户,密码,客户姓名,身份证,电话,房间编号,房间数量,房间类型,价格,房间状态,入住日期。

入住日期是datetime类型,价格是money类型,其余均为字符型。

输入一般采用界面的形式,如编辑框等。

输出要求:输出一般采用对话框或打印到纸张上。

输出数据只要有客户的住房信息,退房信息以及顾客信息,房间信息。

2.4.1 公告模块设计………(对数据库连接类,数据与表转换类等进行必要说明)2.4用户界面设计A)系统主窗口B)管理员登陆窗口C)查询客房信息窗口D)删除客房信息窗口E)添加房间信息窗口………(输入界面、输出信息等的格式说明及安全性设计)3 系统实施1) 管理员登陆窗口package jiudian.Frame;import java.awt.*;import javax.swing.*;import java.awt.event.*;import java.sql.*;public class system extends JFrame implements ActionListener {static system ss;JPanel panel = new JPanel();JLabel label1 = new JLabel("用户名:");JTextField name = new JTextField();JLabel label2 = new JLabel("密码:");JPasswordField password = new JPasswordField();JButton Enter = new JButton("登录");JButton Exit = new JButton("退出");public system(){super("酒店客房管理登录系统");this.setResizable(false);Enter.setBounds(150,250,80,20);Exit.setBounds(270,250,80,20);Enter.addActionListener(this);Exit.addActionListener(this);panel.add(Enter);panel.add(Exit);panel.setLayout(null);this.add(panel);label1.setBounds(135,130,100,25);panel.add(label1);name.setBounds(265,130,100,25);panel.add(name);label2.setBounds(135,165,100,25);panel.add(label2);password.setBounds(265,165,100,25);panel.add(password);this.setBounds(100,100,500,350);this.setVisible(true);this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);}public void actionPerformed(ActionEvent e){if(e.getSource()==Enter){String username , pwd;username = name.getText();pwd = new String(password.getPassword());try{Class.forName("com.microsoft.sqlserver.jdbc.SQLServeDriver");}catch (ClassNotFoundException ce){//JOptionPane.showMessageDialog(ss,ce.getMessage());}try{Connection con = DriverManager.getConnection("jdbc:sqlserver://localhost:1433;DatabaseName=creat","sa","123");Statement stmt = con.createStatement();ResultSet rs = stmt.executeQuery("select * from [user]");while(rs.next()){if(rs.getString("name").equals(username))if((rs.getString("password").equals(pwd))){JOptionPane.showMessageDialog(ss,"登陆成功");Main rd = new Main();}else{JOptionPane.showMessageDialog(ss,"登录失败");}}rs.close();stmt.close();}catch (SQLException se){JOptionPane.showMessageDialog(ss,se.getMessage());}}}public static void main(String[] args){system sys = new system();}}管理员登陆窗口:实现了管理员管理系统的功能2)系统主窗口package jiudian.Frame;import java.awt.*;import javax.swing.*;import java.awt.event.*;import java.awt.font.*;import java.sql.*;public class Main extends JFrame implements ActionListener {JMenuBar bar = new JMenuBar();JMenu menu1 = new JMenu("客户信息");JMenu menu2 = new JMenu("客房信息");JMenu menu3 = new JMenu("订房信息");JMenu menu4 = new JMenu("退房信息");JMenuItem item1 = new JMenuItem("查看客户信息");JMenuItem item11 = new JMenuItem("添加客户信息");JMenuItem item12 = new JMenuItem("删除客户信息");JMenuItem item2 = new JMenuItem("查看客房信息");JMenuItem item21 = new JMenuItem("添加客房信息");JMenuItem item22 = new JMenuItem("删除客房信息");JMenuItem item3 = new JMenuItem("查看订房信息");JMenuItem item31 = new JMenuItem("添加订房信息"); JMenuItem item32 = new JMenuItem("删除订房信息"); JMenuItem item4 = new JMenuItem("查看退房信息"); JMenuItem item41 = new JMenuItem("添加退房信息"); JMenuItem item42 = new JMenuItem("删除退房信息"); JPanel jpl = new JPanel();public Main(){super("主界面");this.setSize(500,300);this.setResizable(false);this.setBounds(300,40,500,300);this.setVisible(true);this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);this.setJMenuBar(bar);this.add(jpl);jpl.setLayout(null);bar.add(menu1);bar.add(menu2);bar.add(menu3);bar.add(menu4);menu1.add(item1);menu1.add(item11);menu1.add(item12);menu2.add(item2);menu2.add(item21);menu2.add(item22);menu3.add(item3);menu3.add(item31);menu3.add(item32);menu4.add(item4);menu4.add(item41);menu4.add(item42);item1.addActionListener(this);item11.addActionListener(this);item12.addActionListener(this);item2.addActionListener(this);item21.addActionListener(this);item22.addActionListener(this);item3.addActionListener(this);item31.addActionListener(this);item32.addActionListener(this);item4.addActionListener(this);item41.addActionListener(this);item42.addActionListener(this);}public void actionPerformed(ActionEvent e){if(e.getSource()==item1){Customer ct= new Customer();}if(e.getSource()==item11){AddCustomer ck = new AddCustomer();}if(e.getSource()==item12){Dltcustomer dc= new Dltcustomer();}if(e.getSource()==item2){Room bk = new Room();}if(e.getSource()==item21){AddRoom rk = new AddRoom();}if(e.getSource()==item22){Dltroom dr= new Dltroom();}if(e.getSource()==item3){Broom cr= new Broom();}if(e.getSource()==item31){AddBroom br = new AddBroom();}if(e.getSource()==item32){Dltbroom db= new Dltbroom();}if(e.getSource()==item4){Troom br= new Troom();}if(e.getSource()==item41){AddTroom as = new AddTroom();}if(e.getSource()==item42){Dlttroom dt= new Dlttroom();}}public static void main(String[] args){Main rd = new Main();}}系统主窗口:实现了管理员能操作的功能3)查询客房信息窗口package jiudian.Frame;import java.awt.*;import javax.swing.*;import java.awt.event.*;import java.awt.font.*;import java.sql.*;public class Room extends JFrame implements ActionListener {static Main s;JLabel title = new JLabel("查询客房信息",JLabel.CENTER);Font f = new Font("楷体",Font.BOLD+Font.ITALIC,16);JPanel jpl = new JPanel();JLabel label1 = new JLabel("请输入房间编号:",JLabel.CENTER); JTextField num= new JTextField();JButton serch = new JButton("查询");JButton reset = new JButton("重置");JLabel label2 = new JLabel("状态:",JLabel.LEFT);JLabel label3 = new JLabel("价格:",JLabel.LEFT);JLabel label4 = new JLabel("类型:",JLabel.LEFT);JTextField[] txt ={ new JTextField() , new JTextField() , new JTextField()}; static int p = 140;public Room(){super("查询客房信息");this.setResizable(false);this.setSize(500,550);this.setVisible(true);this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);title.setFont(f);this.add(jpl);jpl.setLayout(null);title.setBounds(100,20,300,20);jpl.add(title);label1.setBounds(100,60,90,20);jpl.add(label1);num.setBounds(210,60,140,20);jpl.add(num);serch.setBounds(130,100,90,20);reset.setBounds(240,100,90,20);jpl.add(serch);jpl.add(reset);//重置serch.addActionListener(this);reset.addActionListener(this);label2.setBounds(100,140,140,20);label3.setBounds(100,180,140,20);label4.setBounds(100,220,140,20);jpl.add(label2);jpl.add(label3);jpl.add(label4);for(int i = 0;i<txt.length ; i++){txt[i].setBounds(260,p,140,20);jpl.add(txt[i]);p=p+40;}}public void actionPerformed(ActionEvent e){if(e.getSource()==serch){String RID =num.getText();try{Connection con = DriverManager.getConnection("jdbc:sqlserver://localhost:1433;DatabaseName=creat","sa","123");Statement stmt = con.createStatement();String sql1 ="select RID,state,price,type from room";ResultSet rs = stmt.executeQuery(sql1);while(rs.next()){for(int i = 0 ; i<txt.length ; i++){txt[i].setText(rs.getString(i+2));}}}catch (SQLException se){JOptionPane.showMessageDialog(s,se.getMessage());}}else{for(int i = 0;i<txt.length ; i++){txt[i].setText("");}num.setText("");}}public static void main(String[] args){Room bk= new Room();}}查询客房信息窗口:实现了查询客房信息的功能4)删除客房信息窗口package jiudian.Frame;import java.awt.Font;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.sql.Connection;import java.sql.DriverManager;import java.sql.PreparedStatement;import java.sql.Statement;import javax.swing.JButton;import javax.swing.JFrame;import javax.swing.JLabel;import javax.swing.JOptionPane;import javax.swing.JPanel;import javax.swing.JTextField;public class Dltroom extends JFrame implements ActionListener{static Main s;JLabel title = new JLabel("删除客房信息",JLabel.CENTER);Font f = new Font("楷体",Font.BOLD+Font.ITALIC,16);JPanel jpl = new JPanel();JLabel label1 = new JLabel("请输入客房号:",JLabel.CENTER);JTextField num= new JTextField();JButton dte= new JButton("删除");JButton reset = new JButton("重置");public Dltroom() {super("删除客房信息");this.setResizable(false);this.setSize(500,550);this.setVisible(true);this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);title.setFont(f);this.add(jpl);jpl.setLayout(null);title.setBounds(100,20,300,20);jpl.add(title);label1.setBounds(100,60,90,20);jpl.add(label1);num.setBounds(210,60,140,20);jpl.add(num);dte.setBounds(130,100,90,20);reset.setBounds(240,100,90,20);jpl.add(dte);jpl.add(reset);//重置dte.addActionListener(this);reset.addActionListener(this);}public void actionPerformed(ActionEvent e){if(e.getSource()==dte){String RID =num.getText();/*try{Class.forName("com.microsoft.sqlserver.jdbc.SQLServeDriver");}catch (ClassNotFoundException ce){JOptionPane.showMessageDialog(s,ce.getMessage());}*/// public static void dte(String IDcard) {try {Connection con = DriverManager.getConnection("jdbc:sqlserver://localhost:1433;DatabaseName=creat","sa","123");Statement stmt = con.createStatement(); // 获得连接// 创建PreparedStatement对象,并传递SQL语句String ID = num.getText();PreparedStatement ps = con.prepareStatement("delete from room where RID=?");ps.setString(1, ID); // 为参数赋值int flag = ps.executeUpdate(); // 执行SQL语句,获得更新记录数if (flag > 0) {JOptionPane.showMessageDialog(null, "删除成功!");} else {JOptionPane.showMessageDialog(null, "删除失败!");}ps.close();con.close(); // 关闭连接} catch (Exception ex) {JOptionPane.showMessageDialog(null, "删除失败!\n" + ex.getMessage());}}else{num.setText("");}}public static void main(String[] args){Dltroom dr= new Dltroom();}}删除客房信息:实现了删除指定的客房信息5) 添加客房信息窗口package jiudian.Frame;import java.awt.*;import javax.swing.*;import java.awt.event.*;import java.sql.*;public class AddRoom extends JFrame implements ActionListener {static AddRoom s;JPanel jpl = new JPanel();JLabel label1 = new JLabel("添加客房信息:",JLabel.CENTER);JLabel label2 = new JLabel("房间号:",JLabel.CENTER);JLabel label3 = new JLabel("价格:",JLabel.CENTER);JLabel label4 = new JLabel("客房状态:",JLabel.CENTER);JLabel label5 = new JLabel("客房类型:",JLabel.CENTER);JTextField RID = new JTextField();JTextField price = new JTextField();JTextField state = new JTextField();JTextField type = new JTextField();JButton reset = new JButton("重置");JButton addmsg = new JButton("添加");public AddRoom(){super("添加客房信息");this.setResizable(false);this.setSize(500,400);this.setVisible(true);this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);this.add(jpl);jpl.setLayout(null);addmsg.addActionListener(this);reset.addActionListener(this);/*插入面板*/label1.setBounds(100,20,300,20);jpl.add(label1);label2.setBounds(100,50,70,20);jpl.add(label2);RID.setBounds(190,50,140,20);jpl.add(RID);label3.setBounds(100,90,70,20);jpl.add(label3);price.setBounds(190,90,140,20);jpl.add(price);label4.setBounds(100,130,70,20);jpl.add(label4);state.setBounds(190,130,140,20);jpl.add(state);label5.setBounds(100,170,70,20);jpl.add(label5);type.setBounds(190,170,140,20);jpl.add(type);reset.setBounds(120,250,90,20);addmsg.setBounds(240,250,90,20);jpl.add(reset);jpl.add(addmsg);}public void actionPerformed(ActionEvent e){if(e.getSource()==addmsg){/*try{Class.forName("com.microsoft.sqlserver.jdbc.SQLServeDriver");}catch (ClassNotFoundException ce){//JOptionPane.showMessageDialog(s,ce.getMessage());}*/try{Connection con = DriverManager.getConnection("jdbc:sqlserver://localhost:1433;DatabaseName=creat","sa","123");Statement stmt = con.createStatement();String str = "insert into room(RID , price , state , type)values('"+RID.getText()+"','"+price.getText()+"','"+state.getText()+"','"+type.getText()+"')";System.out.println(str);int a = stmt.executeUpdate(str);if(a==1){JOptionPane.showMessageDialog(s,"已成功添加");}else{JOptionPane.showMessageDialog(s,"添加失败");}stmt.close();}catch (SQLException se){JOptionPane.showMessageDialog(s,se.getMessage());}}else{RID.setText("");price.setText("");state.setText("");type.setText("");RID.requestFocus();}}public static void main(String[] args){AddRoom rk = new AddRoom();}}添加客房信息:实现了指定客房信息的添加4 参考文献【1】王珊,萨师煊. 数据库系统概论(第4版).高等教育出版社,2006【2】(美)John E.Swanke著,Visual C++MFC 编程实例,机械工业出版社,2004 【3】张海藩.软件工程(第5版).清华大学出版社,2008【4】姚邻田,精通MFC程序设计.人民邮电出版社,2006【5】数据访问对象,/view/185335.html [5] 吕延杰,尹涛,王琦. 客户关系管理与主题分析[M].北京,中国邮电出版社,2002.附录(程序关键代码)小组成员分工说明系统分析人员:许江燕,吕新芳系统设计人员:丁芳,王静,马静系统编程:王静,马静撰写报告:许江燕,丁芳,吕新芳项目开发设计总结本次课程设计由于是初次接触数据库的课程设计,自己和同学都不是怎么懂,刚开始还是感觉到很吃力的,因为很多不明白,特别是在数据库与应用程序界面怎么来联系到一起上面不清楚。

相关主题