Design and Development of general inventory computing module
Source: Internet
Author: User
Recently I am working on a general inventory computing module. The initial idea is that you can set the computing logic by yourself! For example, if you want inventory = invoice-return, you can first add a sub-method for obtaining the invoice quantity and a sub-method for obtaining the return quantity, then set the inventory calculation Master Logic to [invoice]-[Return]. The customer must ensure the correctness of the sub-method and the correctness of the calculation Master Logic, what I want to do is to effectively manage these methods to ensure that the main logic is easy to maintain and modify. The most important thing is to ensure that the execution efficiency of the main logic is within the tolerable scope of the customer. This process encountered many problems:
1. How to dynamically maintain the parameters required by the customer's sub-methods?
Because the sub-methods to be set for different customers to calculate inventory are different, the parameters required by the sub-methods are also different. For example, the same is the method for obtaining the invoice return invoice quantity, customer A may need to obtain the number of invoices generated by a person within a period of time, while Customer B may need the number of invoices generated by a product within a period of time. At this time, the parameters of Customer A's sub-methods are identified by people, while those of Customer B's sub-methods are product identifiers. In this way, the parameter types may be different, or the number of parameters may be different. All these parameters need to be passed in by the main logic!
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.