赞
踩
文末获取资源,收藏关注不迷路
在信息技术逐渐渗入到生活各个方面的今天,互联网在我们的生活中扮演着越来越重要的角色。现在信息化技术不仅可以提高我们的工作效率,而且能有效的规避错误风险,节约人力成本。美食行业现如今也越来越利用信息化技术来提高点餐效率和质量,餐厅点餐管理系统现在也越来越被个大中小餐厅加以有效利用。
随着餐饮业的发展,开发一套具有普遍通用意义的餐厅点菜管理系统会受到大部分餐厅的青睐,并且该系统必须具备操作简单,功能齐全,可扩展性好,易于维护等特点。由于系统的可扩展性好,我们很容易在原有的功能上进行扩展新的功能,来为每个客户开发一套符合自己特色的餐厅点菜管理系统。所以开发这样一套具有普遍通用意义的餐厅点菜管理系统是非常有必要的。
餐厅订餐系统不仅可以提高餐厅的档次,也减轻了服务员的工作量,便于餐厅管理后厨出菜,提高了服务效率,有效减少了因为人工点菜而会产生的错误,提高了用户体验和服务质量,也为餐厅减少了很大的人工成本支出。
二十一世纪互联网的出现,改变了几千年以来人们的生活,不仅仅是生活物资的丰富,还有精神层次的丰富。在互联网诞生之前,地域位置往往是人们思想上不可跨域的鸿沟,信息的传播速度极慢,信息处理的速度和要求还是通过人们骑马或者是信鸽传递,这些信息传递都是不可控制的,中间很有可能丢失,信息的传递水平决定了人们生活的水平。如今大家都在使用互联网软件产品,从内部管理设置计算机管理,提高内部信息化的管理水准,从外部市场也可以用计算机获取相关数据进行处理,如今各行各业已经严重依赖于计算机了。
本课题研究和开发餐厅点餐系统,让安装在计算机上的该系统变成管理人员的小帮手,提高餐厅点餐信息处理速度,规范餐厅点餐信息处理流程,让管理人员的产出效益更高。
传统处理数据,必须是一张张纸,然后处理完毕又是统计在一张张纸上面,不断的重复处理,最终有个结果给最高层作为参考,这个模式在互联网没有出现之前,是一种常见的事情,信息管理的效率提不上去,人多不一定力量大,因为人多肯定更加消耗资源,并且因为人类需要休息,需要管理,思想会不统一,会偷懒,所以人们研究出专门帮助人们计算的机器,就是计算机的前身,到了互联网时代,人们发现完全可以让程序供应商提供解决方案,自己挑选自己合适的方案来提高自己的产出比。所以在日常工作和生活中会发现各种各样方便人们的工具。
本课题研发的餐厅点餐系统,就是提供餐厅点餐信息处理的解决方案,它可以短时间处理完信息,并且这些信息都有专门的存储设备,而且数据的备份和迁移都可以设定为无人值守,从人力角度和信息处理角度以及信息安全角度,餐厅点餐系统是完胜传统纸质操作的。
环境需要
1.运行环境:python3.7/python3.8。
2.IDE环境:pycharm+mysql5.7;
3.数据库工具:Navicat11
4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
5.数据库:MySql 5.7版本;
技术栈
后端:python+django
前端:vue+CSS+JavaScript+jQuery+elementui
使用说明
使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
使用PyCharm 导入项目,修改配置,运行项目;
将项目中config.ini配置文件中的数据库配置改为自己的配置,然后运行;
运行成功后,在浏览器中输入:http://localhost:8080/项目名
本系统对于用户仅需一台装有浏览器的计算机,即可完成大多数操作,对用户个人电脑本身没有特殊要求,一般当前个人电脑即可满足要求。主要采用了Django框架。对于餐饮点餐系统十分的快捷和便利。用户利用这些开源软件丰富的解决方案可以快速开发系统。
酒店点餐系统,是以方便、简单、直观为前提所开发的,将我们所需要的各项菜品以及用户选项结合到系统中去,让我们的工作信息化,智能化,高效化,取代原有的纸质菜单点餐环节,目前,很多大型餐饮企业,都已经使用自己的点餐系统,通过这些,大大提高了酒店的服务效率。但是时代在发展,酒店系统也会越来越完善,现在的点餐系统,当然不能满足公司的需求,因此,这就推动了酒店点餐系统的进一步优化升级与再次开发。
酒店点餐系统的前端是由HTML加CSS主要构成的,与后端进行交互,使用的是Django框架,使用的数据库是Mysql。主要的内容:菜品信息管理、会员信息管理、大堂点餐管理,以及大堂店铺菜品展出和点餐购物车等。
#coding:utf-8 __author__ = "ila" import base64, copy, logging, os, time, xlrd from django.http import JsonResponse from django.apps import apps from django.db.models.aggregates import Count,Sum from .models import huiyuan from util.codes import * from util.auth import Auth from util.common import Common import util.message as mes from django.db import connection import random from django.core.mail import send_mail from django.conf import settings from django.shortcuts import redirect def huiyuan_register(request): if request.method in ["POST", "GET"]: msg = {'code': normal_code, "msg": mes.normal_code} req_dict = request.session.get("req_dict") error = huiyuan.createbyreq(huiyuan, huiyuan, req_dict) if error != None: msg['code'] = crud_error_code msg['msg'] = "用户已存在,请勿重复注册!" return JsonResponse(msg) def huiyuan_login(request): if request.method in ["POST", "GET"]: msg = {'code': normal_code, "msg": mes.normal_code} req_dict = request.session.get("req_dict") datas = huiyuan.getbyparams(huiyuan, huiyuan, req_dict) if not datas: msg['code'] = password_error_code msg['msg'] = mes.password_error_code return JsonResponse(msg) try: __sfsh__= huiyuan.__sfsh__ except: __sfsh__=None if __sfsh__=='是': if datas[0].get('sfsh')=='否': msg['code']=other_code msg['msg'] = "账号已锁定,请联系管理员审核!" return JsonResponse(msg) req_dict['id'] = datas[0].get('id') return Auth.authenticate(Auth, huiyuan, req_dict) def huiyuan_logout(request): if request.method in ["POST", "GET"]: msg = { "msg": "登出成功", "code": 0 } return JsonResponse(msg) def huiyuan_resetPass(request): ''' ''' if request.method in ["POST", "GET"]: msg = {"code": normal_code, "msg": mes.normal_code} req_dict = request.session.get("req_dict") columns= huiyuan.getallcolumn( huiyuan, huiyuan) try: __loginUserColumn__= huiyuan.__loginUserColumn__ except: __loginUserColumn__=None username=req_dict.get(list(req_dict.keys())[0]) if __loginUserColumn__: username_str=__loginUserColumn__ else: username_str=username if 'mima' in columns: password_str='mima' else: password_str='password' init_pwd = '123456' recordsParam = {} recordsParam[username_str] = req_dict.get("username") records=huiyuan.getbyparams(huiyuan, huiyuan, recordsParam) if len(records)<1: msg['code'] = 400 msg['msg'] = '用户不存在' return JsonResponse(msg) eval('''huiyuan.objects.filter({}='{}').update({}='{}')'''.format(username_str,username,password_str,init_pwd)) return JsonResponse(msg) def huiyuan_session(request): ''' ''' if request.method in ["POST", "GET"]: msg = {"code": normal_code,"msg": mes.normal_code, "data": {}} req_dict={"id":request.session.get('params').get("id")} msg['data'] = huiyuan.getbyparams(huiyuan, huiyuan, req_dict)[0] return JsonResponse(msg) def huiyuan_default(request): if request.method in ["POST", "GET"]: msg = {"code": normal_code,"msg": mes.normal_code, "data": {}} req_dict = request.session.get("req_dict") req_dict.update({"isdefault":"是"}) data=huiyuan.getbyparams(huiyuan, huiyuan, req_dict) if len(data)>0: msg['data'] = data[0] else: msg['data'] = {} return JsonResponse(msg) def huiyuan_page(request): ''' ''' if request.method in ["POST", "GET"]: msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}} req_dict = request.session.get("req_dict") #获取全部列名 columns= huiyuan.getallcolumn( huiyuan, huiyuan) #当前登录用户所在表 tablename = request.session.get("tablename") #authColumn=list(__authTables__.keys())[0] #authTable=__authTables__.get(authColumn) # if authTable==tablename: #params = request.session.get("params") #req_dict[authColumn]=params.get(authColumn) '''__authSeparate__此属性为真,params添加userid,后台只查询个人数据''' try: __authSeparate__=huiyuan.__authSeparate__ except: __authSeparate__=None if __authSeparate__=="是": tablename=request.session.get("tablename") if tablename!="users" and 'userid' in columns: try: req_dict['userid']=request.session.get("params").get("id") except: pass #当项目属性hasMessage为”是”,生成系统自动生成留言板的表messages,同时该表的表属性hasMessage也被设置为”是”,字段包括userid(用户id),username(用户名),content(留言内容),reply(回复) #接口page需要区分权限,普通用户查看自己的留言和回复记录,管理员查看所有的留言和回复记录 try: __hasMessage__=huiyuan.__hasMessage__ except: __hasMessage__=None if __hasMessage__=="是": tablename=request.session.get("tablename") if tablename!="users": req_dict["userid"]=request.session.get("params").get("id") # 判断当前表的表属性isAdmin,为真则是管理员表 # 当表属性isAdmin=”是”,刷出来的用户表也是管理员,即page和list可以查看所有人的考试记录(同时应用于其他表) __isAdmin__ = None allModels = apps.get_app_config('main').get_models() for m in allModels: if m.__tablename__==tablename: try: __isAdmin__ = m.__isAdmin__ except: __isAdmin__ = None break # 当前表也是有管理员权限的表 if __isAdmin__ == "是": if req_dict.get("userid"): del req_dict["userid"] else: #非管理员权限的表,判断当前表字段名是否有userid if tablename!="users" and 'huiyuan'[:7]!='discuss'and "userid" in huiyuan.getallcolumn(huiyuan,huiyuan): req_dict["userid"] = request.session.get("params").get("id") #当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的 try: __authTables__=huiyuan.__authTables__ except: __authTables__=None if __authTables__!=None and __authTables__!={}: try: del req_dict['userid'] except: pass for authColumn,authTable in __authTables__.items(): if authTable==tablename: params = request.session.get("params") req_dict[authColumn]=params.get(authColumn) break msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \ msg['data']['pageSize'] =huiyuan.page(huiyuan, huiyuan, req_dict, request) return JsonResponse(msg) def huiyuan_autoSort(request): ''' .智能推荐功能(表属性:[intelRecom(是/否)],新增clicktime[前端不显示该字段]字段(调用info/detail接口的时候更新),按clicktime排序查询) 主要信息列表(如商品列表,新闻列表)中使用,显示最近点击的或最新添加的5条记录就行 ''' if request.method in ["POST", "GET"]: msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}} req_dict = request.session.get("req_dict") if "clicknum" in huiyuan.getallcolumn(huiyuan,huiyuan): req_dict['sort']='clicknum' else: req_dict['sort']='clicktime' req_dict['order']='desc' msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \ msg['data']['pageSize'] = huiyuan.page(huiyuan,huiyuan, req_dict) return JsonResponse(msg) def huiyuan_list(request): ''' 前台分页 ''' if request.method in ["POST", "GET"]: msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}} req_dict = request.session.get("req_dict") #获取全部列名 columns= huiyuan.getallcolumn( huiyuan, huiyuan) #表属性[foreEndList]前台list:和后台默认的list列表页相似,只是摆在前台,否:指没有此页,是:表示有此页(不需要登陆即可查看),前要登:表示有此页且需要登陆后才能查看 try: __foreEndList__=huiyuan.__foreEndList__ except: __foreEndList__=None if __foreEndList__=="前要登": tablename=request.session.get("tablename") if tablename!="users" and 'userid' in columns: try: req_dict['userid']=request.session.get("params").get("id") except: pass #forrEndListAuth try: __foreEndListAuth__=huiyuan.__foreEndListAuth__ except: __foreEndListAuth__=None #authSeparate try: __authSeparate__=huiyuan.__authSeparate__ except: __authSeparate__=None if __foreEndListAuth__ =="是" and __authSeparate__=="是": tablename=request.session.get("tablename") if tablename!="users": req_dict['userid']=request.session.get("params",{"id":0}).get("id") tablename = request.session.get("tablename") if tablename == "users" and req_dict.get("userid") != None:#判断是否存在userid列名 del req_dict["userid"] else: __isAdmin__ = None allModels = apps.get_app_config('main').get_models() for m in allModels: if m.__tablename__==tablename: try: __isAdmin__ = m.__isAdmin__ except: __isAdmin__ = None break if __isAdmin__ == "是": if req_dict.get("userid"): del req_dict["userid"] else: #非管理员权限的表,判断当前表字段名是否有userid if "userid" in columns: try: pass # 本接口可以匿名访问,所以try判断是否为匿名 #req_dict['userid']=request.session.get("params").get("id") except: pass #当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的 try: __authTables__=huiyuan.__authTables__ except: __authTables__=None if __authTables__!=None and __authTables__!={} and __foreEndListAuth__=="是": try: del req_dict['userid'] except: pass for authColumn,authTable in __authTables__.items(): if authTable==tablename: params = request.session.get("params") req_dict[authColumn]=params.get(authColumn) break if huiyuan.__tablename__[:7]=="discuss": try: del req_dict['userid'] except: pass msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \ msg['data']['pageSize'] = huiyuan.page(huiyuan, huiyuan, req_dict) return JsonResponse(msg) def huiyuan_save(request): ''' 后台新增 ''' if request.method in ["POST", "GET"]: msg = {"code": normal_code, "msg": mes.normal_code, "data": {}} req_dict = request.session.get("req_dict") if 'clicktime' in req_dict.keys(): del req_dict['clicktime'] tablename=request.session.get("tablename") __isAdmin__ = None allModels = apps.get_app_config('main').get_models() for m in allModels: if m.__tablename__==tablename: try: __isAdmin__ = m.__isAdmin__ except: __isAdmin__ = None break #获取全部列名 columns= huiyuan.getallcolumn( huiyuan, huiyuan) if tablename!='users' and req_dict.get("userid")!=None and 'userid' in columns and __isAdmin__!='是': params=request.session.get("params") req_dict['userid']=params.get('id') error= huiyuan.createbyreq(huiyuan,huiyuan, req_dict) if error!=None: msg['code'] = crud_error_code msg['msg'] = error return JsonResponse(msg) def huiyuan_add(request): ''' 前台新增 ''' if request.method in ["POST", "GET"]: msg = {"code": normal_code, "msg": mes.normal_code, "data": {}} req_dict = request.session.get("req_dict") #获取全部列名 columns= huiyuan.getallcolumn( huiyuan, huiyuan) try: __authSeparate__=huiyuan.__authSeparate__ except: __authSeparate__=None if __authSeparate__=="是": tablename=request.session.get("tablename") if tablename!="users" and 'userid' in columns: try: req_dict['userid']=request.session.get("params").get("id") except: pass try: __foreEndListAuth__=huiyuan.__foreEndListAuth__ except: __foreEndListAuth__=None if __foreEndListAuth__ and __foreEndListAuth__!="否": tablename=request.session.get("tablename") if tablename!="users": req_dict['userid']=request.session.get("params").get("id") error= huiyuan.createbyreq(huiyuan,huiyuan, req_dict) if error!=None: msg['code'] = crud_error_code msg['msg'] = error return JsonResponse(msg) def huiyuan_thumbsup(request,id_): ''' 点赞:表属性thumbsUp[是/否],刷表新增thumbsupnum赞和crazilynum踩字段, ''' if request.method in ["POST", "GET"]: msg = {"code": normal_code, "msg": mes.normal_code, "data": {}} req_dict = request.session.get("req_dict") id_=int(id_) type_=int(req_dict.get("type",0)) rets=huiyuan.getbyid(huiyuan,huiyuan,id_) update_dict={ "id":id_, } if type_==1:#赞 update_dict["thumbsupnum"]=int(rets[0].get('thumbsupnum'))+1 elif type_==2:#踩 update_dict["crazilynum"]=int(rets[0].get('crazilynum'))+1 error = huiyuan.updatebyparams(huiyuan,huiyuan, update_dict) if error!=None: msg['code'] = crud_error_code msg['msg'] = error return JsonResponse(msg) def huiyuan_info(request,id_): ''' ''' if request.method in ["POST", "GET"]: msg = {"code": normal_code, "msg": mes.normal_code, "data": {}} data = huiyuan.getbyid(huiyuan,huiyuan, int(id_)) if len(data)>0: msg['data']=data[0] #浏览点击次数 try: __browseClick__= huiyuan.__browseClick__ except: __browseClick__=None if __browseClick__=="是" and "clicknum" in huiyuan.getallcolumn(huiyuan,huiyuan): try: clicknum=int(data[0].get("clicknum",0))+1 except: clicknum=0+1 click_dict={"id":int(id_),"clicknum":clicknum} ret=huiyuan.updatebyparams(huiyuan,huiyuan,click_dict) if ret!=None: msg['code'] = crud_error_code msg['msg'] = ret return JsonResponse(msg) def huiyuan_detail(request,id_): ''' ''' if request.method in ["POST", "GET"]: msg = {"code": normal_code, "msg": mes.normal_code, "data": {}} data =huiyuan.getbyid(huiyuan,huiyuan, int(id_)) if len(data)>0: msg['data']=data[0] #浏览点击次数 try: __browseClick__= huiyuan.__browseClick__ except: __browseClick__=None if __browseClick__=="是" and "clicknum" in huiyuan.getallcolumn(huiyuan,huiyuan): try: clicknum=int(data[0].get("clicknum",0))+1 except: clicknum=0+1 click_dict={"id":int(id_),"clicknum":clicknum} ret=huiyuan.updatebyparams(huiyuan,huiyuan,click_dict) if ret!=None: msg['code'] = crud_error_code msg['msg'] = retfo return JsonResponse(msg) def huiyuan_update(request): ''' ''' if request.method in ["POST", "GET"]: msg = {"code": normal_code, "msg": mes.normal_code, "data": {}} req_dict = request.session.get("req_dict") if req_dict.get("mima") and req_dict.get("password"): if "mima" not in huiyuan.getallcolumn(huiyuan,huiyuan) : del req_dict["mima"] if "password" not in huiyuan.getallcolumn(huiyuan,huiyuan) : del req_dict["password"] try: del req_dict["clicknum"] except: pass error = huiyuan.updatebyparams(huiyuan, huiyuan, req_dict) if error!=None: msg['code'] = crud_error_code msg['msg'] = error return JsonResponse(msg) def huiyuan_delete(request): ''' 批量删除 ''' if request.method in ["POST", "GET"]: msg = {"code": normal_code, "msg": mes.normal_code, "data": {}} req_dict = request.session.get("req_dict") error=huiyuan.deletes(huiyuan, huiyuan, req_dict.get("ids") ) if error!=None: msg['code'] = crud_error_code msg['msg'] = error return JsonResponse(msg) def huiyuan_vote(request,id_): ''' 浏览点击次数(表属性[browseClick:是/否],点击字段(clicknum),调用info/detail接口的时候后端自动+1)、投票功能(表属性[vote:是/否],投票字段(votenum),调用vote接口后端votenum+1) 统计商品或新闻的点击次数;提供新闻的投票功能 ''' if request.method in ["POST", "GET"]: msg = {"code": normal_code, "msg": mes.normal_code} data= huiyuan.getbyid(huiyuan, huiyuan, int(id_)) for i in data: votenum=i.get('votenum') if votenum!=None: params={"id":int(id_),"votenum":votenum+1} error=huiyuan.updatebyparams(huiyuan,huiyuan,params) if error!=None: msg['code'] = crud_error_code msg['msg'] = error return JsonResponse(msg) def huiyuan_importExcel(request): if request.method in ["POST", "GET"]: msg = {"code": normal_code, "msg": "成功", "data": {}} excel_file = request.FILES.get("file", "") file_type = excel_file.name.split('.')[1] if file_type in ['xlsx', 'xls']: data = xlrd.open_workbook(filename=None, file_contents=excel_file.read()) table = data.sheets()[0] rows = table.nrows try: for row in range(1, rows): row_values = table.row_values(row) req_dict = {} huiyuan.createbyreq(huiyuan, huiyuan, req_dict) except: pass else: msg.code = 500 msg.msg = "文件类型错误" return JsonResponse(msg) def huiyuan_sendemail(request): if request.method in ["POST", "GET"]: req_dict = request.session.get("req_dict") code = random.sample(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 4) to = [] to.append(req_dict['email']) send_mail('用户注册', '您的注册验证码是【'+''.join(code)+'】,请不要把验证码泄漏给其他人,如非本人请勿操作。', 'yclw9@qq.com', to, fail_silently = False) cursor = connection.cursor() cursor.execute("insert into emailregistercode(email,role,code) values('"+req_dict['email']+"','用户','"+''.join(code)+"')") msg = { "msg": "发送成功", "code": 0 } return JsonResponse(msg) def huiyuan_autoSort2(request): if request.method in ["POST", "GET"]: req_dict = request.session.get("req_dict") cursor = connection.cursor() leixing = set() try: cursor.execute("select inteltype from storeup where userid = %d"%(request.session.get("params").get("id"))+" and tablename = 'huiyuan' order by addtime desc") rows = cursor.fetchall() for row in rows: for item in row: if item != None: leixing.add(item) except: leixing = set() L = [] cursor.execute("select * from huiyuan where $intelRecomColumn in ('%s"%("','").join(leixing)+"') union all select * from huiyuan where $intelRecomColumn not in('%s"%("','").join(leixing)+"')") desc = cursor.description data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()] for online_dict in data_dict: for key in online_dict: if 'datetime.datetime' in str(type(online_dict[key])): online_dict[key] = online_dict[key].strftime( "%Y-%m-%d %H:%M:%S") else: pass L.append(online_dict) return JsonResponse({"code": 0, "msg": '', "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":5,"list": L[0:6]}}) def huiyuan_value(request, xColumnName, yColumnName, timeStatType): if request.method in ["POST", "GET"]: msg = {"code": normal_code, "msg": "成功", "data": {}} where = ' where 1 = 1 ' sql = '' if timeStatType == '日': sql = "SELECT DATE_FORMAT({0}, '%Y-%m-%d') {0}, sum({1}) total FROM huiyuan {2} GROUP BY DATE_FORMAT({0}, '%Y-%m-%d')".format(xColumnName, yColumnName, where, '%Y-%m-%d') if timeStatType == '月': sql = "SELECT DATE_FORMAT({0}, '%Y-%m') {0}, sum({1}) total FROM huiyuan {2} GROUP BY DATE_FORMAT({0}, '%Y-%m')".format(xColumnName, yColumnName, where, '%Y-%m') if timeStatType == '年': sql = "SELECT DATE_FORMAT({0}, '%Y') {0}, sum({1}) total FROM huiyuan {2} GROUP BY DATE_FORMAT({0}, '%Y')".format(xColumnName, yColumnName, where, '%Y') L = [] cursor = connection.cursor() cursor.execute(sql) desc = cursor.description data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()] for online_dict in data_dict: for key in online_dict: if 'datetime.datetime' in str(type(online_dict[key])): online_dict[key] = online_dict[key].strftime( "%Y-%m-%d %H:%M:%S") else: pass L.append(online_dict) msg['data'] = L return JsonResponse(msg) def huiyuan_o_value(request, xColumnName, yColumnName): if request.method in ["POST", "GET"]: msg = {"code": normal_code, "msg": "成功", "data": {}} where = ' where 1 = 1 ' sql = "SELECT {0}, sum({1}) AS total FROM huiyuan {2} GROUP BY {0}".format(xColumnName, yColumnName, where) L = [] cursor = connection.cursor() cursor.execute(sql) desc = cursor.description data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()] for online_dict in data_dict: for key in online_dict: if 'datetime.datetime' in str(type(online_dict[key])): online_dict[key] = online_dict[key].strftime( "%Y-%m-%d %H:%M:%S") else: pass L.append(online_dict) msg['data'] = L return JsonResponse(msg)
摘 要 I
ABSTRACT II
第1章 绪论 1
1.1 课题背景 1
1.2 课题意义 1
1.3 研究内容 1
第2章 开发环境与技术 3
2.1 PYTHON语言 3
2.2 MYSQL数据库 3
第3章 系统分析 4
3.1 可行性分析 4
3.1.1 技术可行性 4
3.1.2 经济可行性 4
3.1.3 操作可行性 4
3.2 系统流程 4
3.2.1 操作流程 5
3.2.2 登录流程 5
3.2.3 删除信息流程 6
3.2.4 添加信息流程 6
3.3 性能需求 7
3.4 功能需求 8
第4章 系统设计 10
4.1 系统设计思想 10
4.2 功能结构设计 11
4.3 数据库设计 12
4.3.1 数据库概念设计 12
4.3.2 数据库物理设计 15
第5章 系统实现 20
5.1 管理员功能实现 20
5.1.1 菜品信息管理 20
5.1.2 会员管理 20
5.1.3 已完成订单 21
5.1.4 已支付订单 21
5.1.5 已退款订单 22
5.2 会员功能实现 22
5.2.1 菜品信息 22
5.2.2 确认下单 23
5.2.3 我的订单 23
5.2.4 购物车 24
第6章 系统测试 25
6.1 测试任务 25
6.2 测试目标 25
6.3 功能测试 26
6.3.1 登录功能测试 26
6.3.2 修改密码功能测试 27
6.4 系统测试结果 27
结 论 28
参考文献 29
致 谢 30
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。