Java fresh e-commerce platform - purchase order and inventory solution in fresh e-commerce (Applet / APP)

Java fresh e-commerce platform - purchase order and inventory solution in fresh e-commerce (Applet / APP) ...

Java fresh e-commerce platform - purchase order and inventory solution in fresh e-commerce (Applet / APP)

Note: this system is aimed at the purchase order in the fresh small program to explain, we know that many fresh e-commerce, such as: Daily excellent fresh, Ding Dong buy vegetables, etc., are committed to 29 minutes must answer an efficient delivery time.

This is not the focus of my discussion in this article. I will discuss the solution of purchase order and inventory today.

This paper needs to solve the following two problems:

1. Relationship between purchase order and general order.

2. How to do inventory?

3. How to design the system database?

4. How to write code and architecture?

5. Review and summary

1. Association and processing of purchase order and general order.

Note: as fresh e-commerce adopts the mode of placing an order today and sending it tomorrow, the purchase problem will be involved in it. Through the business order placed by the customer, our system will summarize the business, and finally generate the purchase order through the purchase order

The confirmation of the order and the final warehousing to the warehouse require manual review and processing at every step to ensure the integrity and efficiency of the whole business process

2. How to do inventory?

Note: due to the hot weather, many things can't be stored, especially vegetables, which need to be purchased on demand, but in terms of rice, flour, grain and oil, we call these raw and fresh food materials of the standard products, so we need to have inventory management,

It's impossible. You can buy several bottles of soy sauce at a time. They are all purchased in several batches of boxes. Then according to the inventory management regulations, the corresponding storage, some frozen products need the corresponding cold chain to complete.

3. How to design the system database?  

Basic information of purchasing personnel

CREATE TABLE `purchase` ( `purchase_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Auto add ID', `purchase_name` varchar(20) DEFAULT NULL COMMENT 'Purchaser name', `purchase_password` varchar(50) DEFAULT NULL COMMENT 'Purchaser password', `purchase_phone` varchar(255) DEFAULT NULL COMMENT 'Buyer's mobile number', `purchase_status` tinyint(4) DEFAULT '1' COMMENT 'state,1 Is available, 0 is disabled,-1 To delete, the default is 1', `create_time` datetime DEFAULT NULL COMMENT 'Creation time', PRIMARY KEY (`purchase_id`) ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COMMENT='Basic information of purchasing personnel';

Purchase order

CREATE TABLE `purchase_order` ( `purchase_order_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Auto add ID', `purchase_order_sn` varchar(255) DEFAULT NULL COMMENT 'Purchase order No', `purchase_type` tinyint(4) DEFAULT '0' COMMENT 'Purchase type, 0 is market self purchase, 1 is supplier direct supply', `purchase_user_id` int(11) DEFAULT NULL COMMENT 'Purchasing personnel ID', `purchase_user_name` varchar(255) DEFAULT NULL COMMENT 'Purchasing personnel', `purchase_status` tinyint(4) DEFAULT '0' COMMENT 'Purchase status, 0 is not purchased, 1 is purchased', `storehouse_id` int(11) DEFAULT NULL COMMENT 'Warehouse ID', `purchase_source` tinyint(11) DEFAULT NULL COMMENT 'Automatically generate Po from doc source 0 and manually create Po', `purchase_time` datetime DEFAULT NULL COMMENT 'Purchase time', `plan_delivery_time` datetime DEFAULT NULL COMMENT 'Planned delivery date', `purchase_remarks` varchar(255) DEFAULT NULL COMMENT 'Purchase notes', `create_time` datetime DEFAULT NULL COMMENT 'Record creation time', `deleted` tinyint(4) DEFAULT '0' COMMENT 'Delete status, 0 is not deleted, 1 is deleted', PRIMARY KEY (`purchase_order_id`) ) ENGINE=InnoDB AUTO_INCREMENT=80 DEFAULT CHARSET=utf8mb4 COMMENT='Purchase order information form';

Purchase order details

CREATE TABLE `purchase_order_item` ( `id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Auto add ID', `purchase_order_id` bigint(20) unsigned DEFAULT NULL COMMENT 'Purchase main table', `goods_id` int(11) DEFAULT NULL COMMENT 'commodity ID', `goods_name` varchar(255) DEFAULT NULL COMMENT 'Commodity name', `goods_unit` varchar(20) DEFAULT NULL COMMENT 'Commodity unit', `goods_number` varchar(255) DEFAULT NULL COMMENT 'Quantity of goods', `purchase_goods_price` decimal(12,2) DEFAULT NULL COMMENT 'Purchase price', `purchase_goods_amount` decimal(12,2) DEFAULT NULL COMMENT 'Purchase amount', `purchase_number` int(11) DEFAULT NULL COMMENT 'Purchase quantity', `purchase_goods_status` tinyint(4) DEFAULT NULL COMMENT 'Purchase details status, 0 is not purchased, 1 is purchased', `create_time` datetime DEFAULT NULL COMMENT 'Purchase time', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1181289 DEFAULT CHARSET=utf8mb4 COMMENT='Purchase details';

4. How to write code and architecture?

Note: a micro service can be designed separately for purchase. As fresh e-commerce may be designed to separate multiple modules, based on my own experience, I suggest that purchase be handled as a single service to facilitate business expansion.

5. Review and summary

Summary: the purpose of making Internet applications, whether fresh small programs or apps, is to retain and activate users, form their purchasing power, improve their satisfaction, and finally reach a deal. Of course, this article is just a piece of advice. I hope this article can give you some thoughts and suggestions.

QQ:137071249

Learning together QQ group: 793305035

26 May 2020, 12:00 | Views: 2199

Add new comment

For adding a comment, please log in
or create account

0 comments