当前位置:网站首页>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
边栏推荐
- matlab如何绘制已知公式的曲线图,Excel怎么绘制函数曲线图像?
- 1-3 components and modules
- C dapper basically uses addition, deletion, modification and query transactions, etc
- ClickHouse-表引擎
- Using quartz under. Net core -- job attributes and exceptions of [4] jobs and triggers
- AIOT产业技术全景结构-数字化架构设计(8)
- SQL: How to parse Microsoft Transact-SQL Statements in C# and to match the column aliases of a view
- Your brain expands and shrinks over time — these charts show how
- Customize my_ Strcpy and library strcpy [analog implementation of string related functions]
- New keyword learning and summary
猜你喜欢
JS, entries(), keys(), values(), some(), object Assign() traversal array usage
Document operation II (5000 word summary)
自定义my_strcpy与库strcpy【模拟实现字符串相关函数】
Detailed explanation of C webpai route
Path environment variable
Smart doc + Torna generate interface document
C# Task. Delay and thread The difference between sleep
2.Electron之HelloWorld
Detailed explanation of Milvus 2.0 quality assurance system
文件操作《二》(5000字总结篇)
随机推荐
Grpc gateway based on Ocelot
Self use learning notes - connected and non connected access to database
El date picker limits the selection range from the current time to two months ago
Using quartz under. Net core -- a simple trigger of [7] operation and trigger
ASP. Net core configuration options (Part 1)
Decimal format decimal / datetime conversion processing
[registration] tf54: engineer growth map and excellent R & D organization building
C listens for WMI events
New keyword learning and summary
[C] thoroughly understand the deep copy
Get the column name list of the table quickly in Oracle
Shell-入门、变量、以及基本的语法
Input file upload
Shell script -- shell programming specification and variables
Self use learning notes - connectingstring configuration
Detailed explanation of Milvus 2.0 quality assurance system
Use of shell awk command
Go language, array, string, slice
Linux MySQL data timing dump
VLAN advanced technology, VLAN aggregation, super VLAN, sub VLAN