《小型餐饮管理系统功能模块设计harv.docx》由会员分享,可在线阅读,更多相关《小型餐饮管理系统功能模块设计harv.docx(25页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、第一章 设计任务务与要求求目的及意意义:此小型餐餐饮业管管理系统统的设计计主要是是为了方方便管理理,对于于各个进进出账目目,支出出和收入入的管理理便于系系统化,在在每月汇汇总计算算中分析析运营趋趋势和餐餐馆的发发展方向向进行一一定的规规划。通通过各个个月的盈盈利进行行对比,分分析那种种方式更更适合餐餐馆的有有利运营营和更好好地服务务顾客。实现对餐馆内部各种管理的电子化、自动化,提高各个模块之间的办公效率,为高质量餐馆服务提供保证。任务:1.能够够实现对对该系统统进行管管理的人人员的权权限限制制;2.使餐餐馆能够够及时并并灵活的的对菜品品品种其其价位等等进行管管理;3.为餐餐馆提供供从客户户点餐
2、到到结算等等一系列列操作的的服务,使使之能简简单易行行、方便便、 清楚地地进行管管理第二章 系统功能能分析一功能能需求:餐饮管管理系统统中主要要包括对对以下几几种管理理:账单单管理,财财务管理理,订餐餐管理,菜菜品管理理,系统统管理。(1)系系统管理理:系统统管理包包括用户户名和密密码,主主要用于于用户登登陆界面面登陆和和查询。(2)账账单管理理:账单单管理包包括账单单号和餐餐台,每每一个餐餐台对应应一个一一个账单单号,通通过餐台台号的记记录来对对对应的的餐台进进行记账账管理,即即就是记记录每一一个餐台的的消费金金额。账账单管理理是财务务管理的的一个小小分支,是是服务于于财务管管理的。(3)财
3、财务管理理:包括括账单号号,时间间和账目目。账目目用于记记录账单单号的消消费金额额及时间间,以便便用于结结算和汇汇总。每每日的结结算要通通过对每每个餐台台号的消消费金额额汇总来来记录,然然后由每每日的结结算汇总总得出每每月的结结算。帐帐务系统统功能的的完整性性。一旦旦该系统统正式运运行,餐餐厅每日日营业帐帐和全部部往来客客户帐务务的操作作结算都都将依靠靠计算机机,该系系统面对对当前餐餐饮业各各种复杂杂的结算算要求应应具有很很强的应应变能力力。(4)订订餐管理理:订餐餐管理仅仅包括单单价。订订餐管理理是便于于顾客订订餐和账账单管理理时对各各个菜品品消费金金额的记记录,这这样便于于账单管管理和财财
4、务汇总总。 (5)菜菜品管理理:菜品品管理包包括菜名名,菜品品类别和和菜品品品种。菜菜品管理理便于顾顾客点菜菜和记录录各个餐餐台的消消费记账账,菜品品品种也也便于餐餐馆的食食材采购购。二.数据据需求:账单管管理中账账单号是是主键,每每一个餐餐台对应应一个账账单号。财财务管理理中账单单号是主主键,每每一个账账单号都都有对应应的时间间和账目目记录。订订餐管理理中单价价就是主主键。菜菜品管理理中菜名名是主键键。系统统管理中中用户名名是主键键。三. 性能需需求:该该餐饮系系统操作作简单方方便可适适应各类类中小型型餐馆。第三章 系统功能能模块设设计一.在该该系统功功能分析析的基础础上,考考虑Poower
5、rBuiildeer程序序编制的的特点,得得到如下下功能模模块图。小型餐饮业管理系统系统管理账单管理订餐管理财务管理菜品管理用户管理密码管理账单号管理餐台管理订单查询餐台点餐管理每日账目管理账目时间管理菜名管理菜品管理菜价管理类别管理图1 系系统功能能模块图图二.数据据库设计计1. 概概念结构构设计2. 逻辑结结构设计计3.数据据库实施施1) 数数据库及及表结构构的创建建设本系统统使用的的数据库库名为小小型餐饮饮业管理理系统,根据已已设计的的关系模模式及各各模式的的完整性性要求,现现在就可可以在SSQL Serrverr 6.x数据据库系统统中实现现这些逻逻辑结构构。下面是创创建基本本表的SS
6、QL语语句:/* = */* Taablee: CCAIPPINGGL */* = */creaate tabble CAIIPINNGL( CCPGLL_NAAME ccharr(200) nott nuull, CPGGL_DDANJJIA inttegeer noot nnulll, CPGGL_LLEIBBIE chaar(88) nuull , CPGGL_PPINGGZHOONG chaar(88) nuull , CPGGL_DDIANNCAII inttegeer nuull , connstrrainnt PPK_CCAIPPINGGL pprimmaryy keey (CP
7、GGL_NNAMEE, CCPGLL_DAANJIIA)go/* = */* Taablee: XXTGLL */* = */creaate tabble XTGGL( USEERNAAME chaar(220) noot nnulll, PASSSWOORD chaar(88) noot nnulll, connstrrainnt PPK_XXTGLL prrimaary keyy (UUSERRNAMME, PASSSWOORD)go/* = */* Taablee: ZZHANNGDAAGL */* = */creaate tabble ZHAANGDDAGLL( ZHAANGDDAN_
8、NUMMBERR nummeriic noot nnulll, ZHAANGDDAN_CANNTAII nummeriic nuull , CAII_ZHHANGGDANN_NUUMBEER nummeriic nuull , connstrrainnt PPK_ZZHANNGDAAGL priimarry kkey (ZHHANGGDANN_NUUMBEER)go/* = */* Inndexx: RRELAATIOON_3383_FK */* = */creaate inddex RELLATIION_3833_FKK onn ZHHANGGDAGGL (CAII_ZHHANGGDANN_
9、NUUMBEER)go/* = */* Taablee: CCAIWWUGLL */* = */creaate tabble CAIIWUGGL( ZHAANGDDAN_NUMMBERR nummeriic noot nnulll, CAIIWU_TIMME timmesttampp nuull , CAIIWU_AMOOUNTT chaar(110) nuull , connstrrainnt PPK_CCAIWWUGLL prrimaary keyy (ZZHANNGDAAN_NNUMBBER)go/* = */* Taablee: DDINGGCANNGL */* = */creaate
10、 tabble DINNGCAANGLL( ZHAANGDDAN_NUMMBERR nummeriic noot nnulll, DCGGL_NNAMEE chaar(220) noot nnulll, DCGGL_DDANJJIA intt noot nnulll, connstrrainnt PPK_DDINGGCANNGL priimarry kkey (ZHHANGGDANN_NUUMBEER, DCGGL_NNAMEE, DDCGLL_DAANJIIA)go/* = */* Inndexx: RRELAATIOON_4451_FK */* = */creaate inddex REL
11、LATIION_4511_FKK onn DIINGCCANGGL (ZHAANGDDAN_NUMMBERR)go建立相关关触发器器,执行行级联删删除* = */* Daatabbasee naame: MMODEEL_11 */* DBBMS namme: MMicrrosooft SQLL Seerveer 66.x */* Crreatted on: 220100-1-21 188:155 */* = */* Inssertt trriggger tii_caaiwuugl foor ttablle CAIIWUGGL */creaate triiggeer tti_ccaiwwugll
12、 onn CAAIWUUGL forr innserrt aasbegiin decclarre nuumroows innt, nuumnuull innt, errrnoo innt, errrmssg vaarchhar(2555) sellectt nummrowws = rowwcouunt if nuumroows = 00 retturnn /* Paarennt ZHAANGDDAGLL mmustt exxistt whhen insserttingg a chiild in CAAIWUUGL */ if upddatee(ZHHANGGDANN_NUUMBEER) beg
13、gin if (seelecct ccounnt(*) frrom ZZHANNGDAAGL t1, innserrtedd t22 whheree tt1.ZZHANNGDAAN_NNUMBBER = tt2.ZZHANNGDAAN_NNUMBBER) != nnumrrowss beggin sellectt eerrnno = 3300002, eerrmmsg = Parrentt dooes nott exxistt inn ZZHANNGDAAGL. CCannnot creeatee chhildd inn CCAIWWUGLL. gotto eerroor endd endd
14、retturnn/* Errrorss haandllingg */erroor: raiiserrrorr eerrnno errrmsgg rolllbaack trranssacttionnendgo/* Upddatee trriggger tuu_caaiwuugl foor ttablle CAIIWUGGL */creaate triiggeer ttu_ccaiwwugll onn CAAIWUUGL forr uppdatte aasbegiin ddecllaree nummrowws intt, nummnulll intt, errrno intt, errrmssg
15、vaarchhar(2555) sseleect nnumrrowss = rrowccounnt iif nummrowws = 0 rretuurn /* Parrentt ZZHANNGDAAGL muust exiist wheen uupdaatinng aa chhildd inn CCAIWWUGLL */ iif uupdaate(ZHAANGDDAN_NUMMBERR) bbegiin iif (sellectt coountt(*) froom ZHHANGGDAGGL tt1, inssertted t2 wheere t11.ZHHANGGDANN_NUUMBEER =
16、 t22.ZHHANGGDANN_NUUMBEER) != nuumroows bbegiin sseleect errrnoo = 3000033, errrmssg = ZHAANGDDAGLL ddoess noot eexisst. Cannnott moodiffy cchilld iin CAIIWUGGL. ggotoo errrorr eend eend /* Moddifyy paarennt ccodee off CCAIWWUGLL ffor alll chhilddrenn inn ZZHANNGDAAGL */ iif uupdaate(ZHAANGDDAN_NUMM
17、BERR) bbegiin uupdaate ZHAANGDDAGLL sett CAII_ZHHANGGDANN_NUUMBEER = i11.ZHHANGGDANN_NUUMBEER ffromm ZHAANGDDAGLL t22, iinseerteed ii1, delleteed dd1 wwherre t2.CAII_ZHHANGGDANN_NUUMBEER = d11.ZHHANGGDANN_NUUMBEER andd (i1.ZHAANGDDAN_NUMMBERR != d11.ZHHANGGDANN_NUUMBEER) eend rretuurn/* Errrorss haa
18、ndllingg */erroor: raiiserrrorr eerrnno errrmsgg rolllbaack trranssacttionnendgo/* Delletee trriggger tdd_caaiwuugl foor ttablle CAIIWUGGL */creaate triiggeer ttd_ccaiwwugll onn CAAIWUUGL forr deelette aasbegiin decclarre nuumroows innt, errrnoo innt, errrmssg vaarchhar(2555) sellectt nummrowws = ro
19、wwcouunt if nuumroows = 00 retturnn /* Deelette aall chiildrren in ZHHANGGDAGGL */ delletee ZHHANGGDAGGL froom ZHHANGGDAGGL tt2, delleteed tt1 wheere t22.CAAI_ZZHANNGDAAN_NNUMBBER = tt1.ZZHANNGDAAN_NNUMBBER retturnn/* Errrorss haandllingg */erroor: raiiserrrorr eerrnno errrmsgg rolllbaack trranssact
20、tionnendgo/* Inssertt trriggger tii_diingccanggl forr taablee DDINGGCANNGL */creaate triiggeer tti_ddinggcanngl on DINNGCAANGLL foor iinseert asbegiin decclarre nuumroows innt, nuumnuull innt, errrnoo innt, errrmssg vaarchhar(2555) sellectt nummrowws = rowwcouunt if nuumroows = 00 retturnn /* Paaren
21、nt ZHAANGDDAGLL mmustt exxistt whhen insserttingg a chiild in DIINGCCANGGL */ if upddatee(ZHHANGGDANN_NUUMBEER) beggin if (seelecct ccounnt(*) frrom ZZHANNGDAAGL t1, innserrtedd t22 whheree tt1.ZZHANNGDAAN_NNUMBBER = tt2.ZZHANNGDAAN_NNUMBBER) != nnumrrowss beggin sellectt eerrnno = 3300002, eerrmmsg
22、 = Parrentt dooes nott exxistt inn ZZHANNGDAAGL. CCannnot creeatee chhildd inn DDINGGCANNGL. gotto eerroor endd endd retturnn/* Errrorss haandllingg */erroor: raiiserrrorr eerrnno errrmsgg rolllbaack trranssacttionnendgo/* Upddatee trriggger tuu_diingccanggl forr taablee DDINGGCANNGL */creaate triig
23、geer ttu_ddinggcanngl on DINNGCAANGLL foor uupdaate asbegiin ddecllaree nummrowws intt, nummnulll intt, errrno intt, errrmsgg varrchaar(2255) sseleect nnumrrowss = rrowccounnt iif nummrowws = 0 rretuurn /* Paarennt ZHAANGDDAGLL mmustt exxistt whhen upddatiing a cchilld iin DINNGCAANGLL */ iif uupdaa
24、te(ZHAANGDDAN_NUMMBERR) bbegiin iif (sellectt coountt(*) froom ZHHANGGDAGGL tt1, inssertted t2 wheere t11.ZHHANGGDANN_NUUMBEER = t22.ZHHANGGDANN_NUUMBEER) != nuumroows bbegiin sseleect errrnoo = 3000033, errrmssg = ZHAANGDDAGLL ddoess noot eexisst. Cannnott moodiffy cchilld iin DINNGCAANGLL. ggotoo
25、errrorr eend eend rretuurn/* Errrorss haandllingg */erroor: raiiserrrorr eerrnno errrmsgg rolllbaack trranssacttionnendgo/* Inssertt trriggger tii_zhhanggdaggl forr taablee ZZHANNGDAAGL */creaate triiggeer tti_zzhanngdaagl on ZHAANGDDAGLL foor iinseert asbegiin decclarre nuumroows innt, nuumnuull in
26、nt, errrnoo innt, errrmssg vaarchhar(2555) sellectt nummrowws = rowwcouunt if nuumroows = 00 retturnn /* Paarennt CAIIWUGGL musst eexisst wwhenn innserrtinng aa chhildd inn ZZHANNGDAAGL */ if upddatee(CAAI_ZZHANNGDAAN_NNUMBBER) beggin sellectt nnumnnulll = (seelecct ccounnt(*) frrom iinseerteed whhe
27、ree CCAI_ZHAANGDDAN_NUMMBERR iss nuull) if nuumnuull != nuumroows if (seelecct ccounnt(*) frrom CCAIWWUGLL t11, iinseerteed tt2 wheere t11.ZHHANGGDANN_NUUMBEER = t22.CAAI_ZZHANNGDAAN_NNUMBBER) != nnumrrowss - nuumnuull beggin sellectt eerrnno = 3300002, eerrmmsg = Parrentt dooes nott exxistt inn CCA
28、IWWUGLL. Cannnott crreatte cchilld iin ZHAANGDDAGLL. gotto eerroor endd endd retturnn/* Errrorss haandllingg */erroor: raiiserrrorr eerrnno errrmsgg rolllbaack trranssacttionnendgo/* Upddatee trriggger tuu_zhhanggdaggl forr taablee ZZHANNGDAAGL */creaate triiggeer ttu_zzhanngdaagl on ZHAANGDDAGLL fo
29、or uupdaate asbegiin ddecllaree nummrowws intt, nummnulll intt, errrno intt, errrmsgg varrchaar(2255) sseleect nnumrrowss = rrowccounnt iif nummrowws = 0 rretuurn /* Parrentt CCAIWWUGLL mmustt exxistt whhen upddatiing a cchilld iin ZHAANGDDAGLL */ iif uupdaate(CAII_ZHHANGGDANN_NUUMBEER) bbegiin ssel
30、eect nuumnuull = (sellectt coountt(*) froom innserrtedd wheere CAAI_ZZHANNGDAAN_NNUMBBER is nulll) iif nummnulll != nummrowws iif (sellectt coountt(*) froom CAAIWUUGL t1, innserrtedd t22 wheere t11.ZHHANGGDANN_NUUMBEER = t22.CAAI_ZZHANNGDAAN_NNUMBBER) != nnumrrowss - nuumnuull bbegiin sseleect errrnoo = 3000033, errrmssg = CAIIWUGGL doees nnot exiist. Caannoot mmodiify chiild in ZHHANGGDAGGL. ggotoo errrorr e