Java implementation of restaurant ordering system

1. Background of ordering management system

With the development of science and technology, going to a restaurant for a meal and checking out are all done online.
a. Compared with the current systems, this system has table management, cuisine management, dish name management, order management, order details and other functions.
b. Compared with the existing system, this system is a B/S structure. Generally, the ordering system is a C/S structure, which is not as good as the B/S structure in performance. Moreover, the C/S interface needs to be installed with a client, which is under great pressure. My system only needs a computer or a mobile phone with a browser, and can order meals in the same LAN.
c. In terms of architecture, our system is a distributed architecture, and the traditional ordering system is not reasonable.

2. Technical framework of order management system

Main technology
Spring,SpringMVC,Mybatis
JSP,JSTL,jQuery,HTML,CSS,JS
Mysql
bootstrap
Development tools and environment
Eclipse
Maven
Tomcat 7
JDK 1.8
Mysql 5.6
Win10 operating system

3. System architecture and functions

4. Database design

-- Table
CREATE TABLE `dinnertable` (
  `id` int(11) NOT NULL AUTO_INCREMENT,--table id
  `tableName` varchar(20) DEFAULT NULL, -- Table name
  `tableStatus` int(11) DEFAULT '0',   -- Table status 0 indicates idle status 1 indicates reserved status
  `orderDate` datetime DEFAULT NULL,   -- Table reservation time
  PRIMARY KEY (`id`)
)
-- Sichuan cuisine, Hunan cuisine, etc
CREATE TABLE `foodtype` (
  `id` int(11) NOT NULL AUTO_INCREMENT,  --Cuisine id
  `typeName` varchar(20) DEFAULT NULL,      --Name of cuisine
  PRIMARY KEY (`id`)
)
-- Table of dishes
CREATE TABLE `food` (
  `id` int(11) NOT NULL AUTO_INCREMENT,  -- Dish name id
  `foodName` varchar(20) DEFAULT NULL,     -- Dish name
  `foodType_id` int(11) DEFAULT NULL,          -- Subordinate cuisine
  `price` double DEFAULT NULL,                     -- Price
  `mprice` double DEFAULT NULL,                  -- Membership price
  `remark` varchar(200) DEFAULT NULL,         --Description of dishes
  `img` varchar(100) DEFAULT NULL,              -- Path corresponding to dish name picture
  PRIMARY KEY (`id`),
  KEY `fk_food_foodType_id` (`foodType_id`),
  CONSTRAINT `fk_food_foodType_id` FOREIGN KEY (`foodType_id`) REFERENCES `foodtype` (`id`)
)

-- Order form
CREATE TABLE `orders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,   -- Order id
  `table_id` int(11) DEFAULT NULL,                  -- table id
  `orderDate` datetime DEFAULT NULL,           -- Order time
  `totalPrice` double DEFAULT NULL,              -- Total sum
  `orderStatus` int(11) DEFAULT '0',                --Payment status 0 unpaid 1 paid
  PRIMARY KEY (`id`),
  KEY `order_table_id` (`table_id`),
  CONSTRAINT `order_table_id` FOREIGN KEY (`table_id`) REFERENCES `dinnertable` (`id`)
) 

-- Order Details 
CREATE TABLE `orderdetail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,       -- order details id
  `orderId` int(11) DEFAULT NULL,             -- Subordinate orders id
  `food_id` int(11) DEFAULT NULL,             -- Dish name id
  `foodCount` int(11) DEFAULT NULL,           -- Ordering quantity
  PRIMARY KEY (`id`),
  KEY `orderDetail_order_id` (`orderId`),
  KEY `orderDetail_food_id` (`food_id`),
  CONSTRAINT `orderDetail_food_id` FOREIGN KEY (`food_id`) REFERENCES `food` (`id`),
  CONSTRAINT `orderDetail_order_id` FOREIGN KEY (`orderId`) REFERENCES `orders` (`id`)
)

-- Administrator table
CREATE TABLE `admin` (
  `id` varchar(20) NOT NULL,                     -- Administrators id
  `name` varchar(20) DEFAULT NULL,               -- Administrator name
  `password` varchar(32) DEFAULT NULL,           -- Administrator password
  PRIMARY KEY (`id`)
)

5. Background management function

Log in to the system Homepage

Table list: display table details. You can search similar tables through the search button above, or delete tables

Add new table features

Menu list: displays the details of the menu. You can search similar cuisines through the search button above, or delete the cuisines

Modify menu name function

Add menu function

Dishes list: displays the dishes list. You can search similar dishes through the above search button or delete the dishes

Modify dish function: you can modify the attributes of the dish, its name, price, introduction, picture, etc.
Add dish function
Order list management: displays the status of existing table orders. If it is not closed, you can click Close payment to close.

Order details: you can view which dishes the user has ordered, how much is the price and quantity of each menu

6. Front desk user order function

When ordering, the user enters the menu page and selects the table without reservation. Here, only the table without reservation is displayed


After selecting the table, you will enter the front page of the table, where you can view the information of all dishes

Users can search the corresponding dishes according to the menu series table and keywords

Click the dish to enter the dish details page, and the user can add the dish to the dining car

After putting it in the shopping cart, it will enter the list. Here we can go back to order, modify the quantity of added dishes, or remove dishes

After clicking the order, the back end will receive this message and start cooking; if the user finishes eating, he can click the checkout button to inform the waiter to checkout

37 original articles published, 156 praised, 90000 visitors+
Private letter follow

Keywords: MySQL Mobile Spring Mybatis

Added by mazman13 on Fri, 14 Feb 2020 09:31:41 +0200