当前位置:网站首页>Model problems of stock in and stock out and inventory system
Model problems of stock in and stock out and inventory system
2022-04-23 17:14:00 【ZHZHK001】
My current idea is :
Scheme 1 ,1 Tables : Only stock in / stock out table
No inventory table , Inventory data is calculated in real time according to receipt / issue
The disadvantage is that there are a lot of stock in and stock out data , The amount of real-time inventory query data will be larger and larger
There are also problems with scheme 2
Option two ,2 Tables : An inventory statement + Warehouse in and out table , In and out of the warehouse ,2 Data update of two tables at the same time
There is no problem when the stock in record is added
The problem is :
The issue record is added ( In particular, add the previous delivery record )、
Out of stock 、 Modification and deletion of warehousing records
These circumstances will affect the rationality of all subsequent records , The amount of data processing is large
such as
A library 2022-02-10 Enter into 100
A library 2022-02-11 Enter into 10 When deleting , Next 2 This piece of data is invalid , Enter into 10 Change to in 6 ,2-13 Out 15 It doesn't work
A library 2022-02-12 Out 105
A library 2022-02-13 Out 15
Option three , Scheme 2 upgrade
2 Tables : An inventory statement + Warehouse in and out table , In and out of the warehouse ,2 Data update of two tables at the same time
Issue / receipt records can only be added but not deleted 、 Change ,【 Notes of receipt / issue records can be changed 】
If there is a problem , Add a record for today , Hedge against previous data
such as 2022-02-14【 today 】 Find out 2022-02-13A There are too many entries in the warehouse 100 individual
So the way to deal with it is :
2022-02-14【 today 】 Add a record 2022-02-14 A Warehouse out 100 individual Type selection hedging
The delivery process
Inventory query whether there is enough stock out ,
yes , An inventory statement update, Warehouse in and out table insert
no , Cancel operation
remarks : The quantity of record lines in the inventory table may be... During delivery 0
Warehousing process
An inventory statement A library B Whether the material has inventory records
yes , An inventory statement UPDAGE, Warehouse in and out table insert
all , An inventory statement insert, Warehouse in and out table insert
Option four , Scheme I upgrade
Issue / receipt records can only be added but not deleted 、 Change ,【 Notes of receipt / issue records can be changed 】
If there is a problem , Add a record for today , Hedge against previous data
such as 2022-02-14【 today 】 Find out 2022-02-13A There are too many entries in the warehouse 100 individual
So the way to deal with it is :
2022-02-14【 today 】 Add a record 2022-02-14 A Warehouse out 100 individual Type selection hedging
I don't know what other better model
At present, I personally prefer to use the model of scheme 3 , If anyone has a better model , Please advise
The data table structure is :
An inventory statement
id
Warehouse id
materiel id
Number
remarks
The creator
Creation time
Reviser
Modification time
Warehouse in and out table
id
fromid
toid
materiel id
Number
remarks
type 【 Out of stock 、 Put in storage 、 hedging 】
The creator
Creation time
Reviser
Modification time
Other fields such as order number
版权声明
本文为[ZHZHK001]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230553251144.html
边栏推荐
- VLAN高级技术,VLAN聚合,超级Super VLAN ,Sub VLAN
- Understanding of RPC core concepts
- Self use learning notes - connectingstring configuration
- Summary of common websites
- About stream flow, write it down briefly------
- SPC introduction
- Paging SQL
- 手写事件发布订阅框架
- Shell - introduction, variables, and basic syntax
- Use between nodejs modules
猜你喜欢
Shell脚本——Shell编程规范及变量
CentOS MySQL multi instance deployment
1-1 NodeJS
2.Electron之HelloWorld
1-4 configuration executable script of nodejs installation
Change the password after installing MySQL in Linux
【生活中的逻辑谬误】稻草人谬误和无力反驳不算证明
RPC核心概念理解
Milvus 2.0 détails du système d'assurance de la qualité
Detailed explanation of C webpai route
随机推荐
tidb-server 的配置文件在哪里?
Sub database and sub table & shardingsphere
Go language RPC communication
Net standard
Generation of barcode and QR code
Further optimize Baidu map data visualization
How does matlab draw the curve of known formula and how does excel draw the function curve image?
Understanding of RPC core concepts
JS to find the character that appears three times in the string
[logical fallacy in life] Scarecrow fallacy and inability to refute are not proof
Document operation II (5000 word summary)
Use of Shell sort command
[C] thoroughly understand the deep copy
Nacos + aspnetcore + Ocelot actual combat code
ASP. NET CORE3. 1. Solution to login failure after identity registers users
Simulation of infrared wireless communication based on 51 single chip microcomputer
About stream flow, write it down briefly------
Using quartz under. Net core -- operation transfer parameters of [3] operation and trigger
MySQL modify master database
El cascade and El select click elsewhere to make the drop-down box disappear