Inventory data processing method, device and storage medium
By updating the information of the inventory table and outbound table, the problem of inventory data not being updated in time is solved, the success rate of resource outbound and the ability of multi-store managers to coordinate outbound is improved, and the workload of the warehouse managers is reduced.
Patent Information
- Application Number
- CN202011042771.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-28
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2040-09-28
AI Technical Summary
The existing resource approval outbound method is in high concurrency, and the inventory data is not updated in time, resulting in a high failure rate of resource approval outbound, and it is impossible to achieve the coordinated completion of outbound operations by multiple database managers, resulting in large workload and outbound. fail.
By obtaining the inventory information of the resource in the inventory table and the outbound information in the outbound table, determine the number of resources that can be obtained, and update the inventory table and outbound table when the number of resources that can be obtained is greater than or equal to the requested quantity. information to ensure the accuracy of approval conditions and successful outbound delivery.
It improves the success rate of resource outbound operations, allows multiple warehouse managers to collaborate in completing outbound operations, reduces the workload of warehouse managers, and ensures automation and accuracy of the approval process.
Smart Images

Figure CN112116302B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present specification relate to the field of computer technology, and more particularly to an inventory data processing method, device, and storage medium. Background Art
[0002] Warehouses are important places for enterprise storage, and warehouse management is the core work of enterprise logistics management. The level of inventory control represents the overall management level of an enterprise. Efficient inventory control management is an important step for enterprise operation innovation and cost reduction. How to improve and enhance the level of warehouse management is of great significance to enterprises to ensure production supply, save costs and enhance enterprise competitiveness.
[0003] Resource approval and outbound management are the common basic tasks of resource approvers and warehouse managers in large enterprises. Figure 1 As shown. The applicant submits a resource application for a certain inventory number. The resource with the same inventory number can exist in multiple application forms at the same time. The application forms are divided into the approval stage and the outbound stage. In the approval stage, each application form can only be approved by one person at a time. In the outbound stage, the same application form can only be outbound by the same warehouse keeper. In the approval stage, the current upper limit of the approved quantity is the current inventory quantity. Only one warehouse keeper is allowed to perform outbound operations on the same application form during outbound. If insufficient inventory is found during outbound, outbound will be rejected.
[0004] However, in the actual approval process, there will be multiple application forms under approval, and the maximum approval quantity of each form does not exceed the inventory quantity, but the sum of multiple application forms is greater than the inventory quantity, resulting in the failure of some application forms to be shipped out. Or there are too many resources for the same application form, and the same warehouse manager is responsible for the shipping workload, so it is difficult for multiple warehouse managers to complete the shipping of the same application form in collaboration, or during the batch shipping, the corresponding warehouse manager leaves the application form due to other issues, and the shipping cannot be completed by others.
[0005] With the existing resource approval and delivery method, each approver can only approve the delivery quantity of each application based on the current inventory quantity. When the concurrency is high, the current inventory data cannot be updated in time, resulting in resource approval conflicts and a high approval and delivery failure rate. Summary of the invention
[0006] The purpose of the embodiments of this specification is to provide an inventory data processing method, device and storage medium to improve the success rate of approved resource outbound delivery.
[0007] To solve the above problem, an embodiment of the present specification provides an inventory data processing method, the method comprising: in response to a resource acquisition request, acquiring inventory information of the resource in an inventory table, a version number representing a version of the inventory information, and outbound information in an outbound table of the resource; wherein the resource acquisition request includes a requested quantity of the resource; determining the quantity of the resource that can be acquired according to the inventory information and the outbound information; when the quantity of the resource that can be acquired is greater than or equal to the requested quantity of the resource, reading the current version number of the current inventory information of the resource in the inventory table; when the current version number is the same as the acquired version number, updating the current inventory information in the inventory table, the current version number of the current inventory information, and the outbound information in the outbound table based on the requested quantity of the resource.
[0008] To solve the above problems, an embodiment of the present specification also provides an inventory data processing device, which includes: an acquisition module, which is used to respond to a resource acquisition request to acquire the inventory information of the resource in the inventory table, the version number representing the inventory information version, and the outbound information in the outbound table of the resource; wherein the resource acquisition request includes the requested quantity of the resource; a determination module, which is used to determine the quantity of the resource that can be acquired based on the inventory information and the outbound information; a reading module, which is used to read the current version number of the current inventory information of the resource in the inventory table when the quantity of the resource that can be acquired is greater than or equal to the requested quantity of the resource; and an update module, which is used to update the current inventory information in the inventory table, the current version number of the current inventory information, and the outbound information in the outbound table based on the requested quantity of the resource when the current version number is the same as the acquired version number.
[0009] To solve the above problems, an embodiment of the present specification also provides an electronic device, including: a memory for storing a computer program; a processor for executing the computer program to implement: in response to a resource acquisition request, obtaining inventory information of the resource in an inventory table, a version number representing the inventory information version, and outbound information in an outbound table of the resource; wherein the resource acquisition request includes a requested quantity of the resource; determining the quantity of the resource that can be acquired based on the inventory information and the outbound information; when the quantity of the resource that can be acquired is greater than or equal to the requested quantity of the resource, reading the current version number of the current inventory information of the resource in the inventory table; when the current version number is the same as the acquired version number, updating the current inventory information in the inventory table, the current version number of the current inventory information, and the outbound information in the outbound table based on the requested quantity of the resource.
[0010] To solve the above problems, an embodiment of the present specification also provides a computer-readable storage medium on which computer instructions are stored, and when the instructions are executed, the following are achieved: in response to a resource acquisition request, the inventory information of the resource in the inventory table, the version number representing the inventory information version, and the outbound information in the outbound table of the resource are acquired; wherein the resource acquisition request includes the requested quantity of the resource; the quantity of the resource that can be acquired is determined according to the inventory information and the outbound information; when the quantity of the resource that can be acquired is greater than or equal to the requested quantity of the resource, the current version number of the current inventory information of the resource in the inventory table is read; when the current version number is the same as the acquired version number, the current inventory information in the inventory table, the current version number of the current inventory information, and the outbound information in the outbound table are updated based on the requested quantity of the resource.
[0011] It can be seen from the technical solutions provided by the above embodiments of this specification that in the embodiments of this specification, the inventory information of the resource in the inventory table, the version number representing the version of the inventory information, and the outbound information in the outbound table of the resource can be obtained in response to a resource acquisition request; wherein the resource acquisition request includes the requested quantity of the resource; the quantity of the resource that can be acquired is determined according to the inventory information and the outbound information; when the quantity of the resource that can be acquired is greater than or equal to the requested quantity of the resource, the current version number of the current inventory information of the resource in the inventory table is read; when the current version number is the same as the acquired version number, the current inventory information in the inventory table, the current version number of the current inventory information, and the outbound information in the outbound table are updated based on the requested quantity of the resource. The method provided by the embodiments of this specification enables the approval personnel to approve the current application without paying attention to the specific circumstances of other applications. The system automatically prompts whether the approval conditions are met according to the relationship between the summarized approved quantity, the current application approved quantity, and the current approved quantity, thereby improving the success rate of the approved resource outbound. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0013] Figure 1 A schematic diagram of an example scenario of an embodiment of this specification;
[0014] Figure 2This is a flow chart of an inventory data processing method according to an embodiment of this specification;
[0015] Figure 3 This is a functional structure diagram of an electronic device according to an embodiment of this specification;
[0016] Figure 4 This is a functional structure diagram of an inventory data processing device according to an embodiment of this specification. DETAILED DESCRIPTION
[0017] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0018] In the embodiments of this specification, the resources may include physical resources, such as signature pens, notebooks, A4 paper, clothes, pants, and other physical resources; the resources may also include virtual resources that are not physical, such as game point cards, gift cards, coupons, and other non-physical resources.
[0019] like Figure 1 As shown, the embodiment of this specification provides a scenario example.
[0020] In this scenario example, business personnel can submit resource applications, and each resource application can correspond to an application number. Based on the resource application submitted by the business personnel, a resource acquisition request can be generated, and the resource acquisition request can include the requested quantity of the resource. After receiving the resource acquisition request pushed by the system, the approval personnel can approve the resource acquisition request and adjust the requested quantity of the resource based on the inventory information. The warehouse keeper performs a depot operation on the resources corresponding to the resource acquisition request approved by the approval personnel. Among them, the warehouse keeper can be the administrator of the warehouse, and a warehouse can be configured with multiple warehouse managers. A resource acquisition request that has completed approval can be operated by multiple warehouse managers.
[0021] In this scenario example, two database tables are designed. As shown in Table 1 and Table 2, Table 1 is an inventory table, and Table 2 is an outbound table. The inventory table includes inventory information of at least one resource and a version number corresponding to the inventory information; the outbound table includes outbound information of at least one resource and a version number corresponding to the outbound information. The inventory information may include the inventory quantity of the resource, the total quantity of the resource applied for, and other information; the outbound information may include the quantity of the resource requested to be outbound and the quantity of the resource that has been outbound.
[0022] Table 1
[0023]
[0024] Table 2
[0025]
[0026]
[0027] Wherein, invSeq is the resource number, which is the number of the same type of resources in a certain warehouse. There is only one record for the same resource number in the inventory table, and there may be multiple records for the same resource number in the outbound table. invNum is the inventory quantity, which indicates the inventory quantity corresponding to the resource recorded in the warehouse. sumAdtAprvNum is the total requested quantity of the resource, which is equal to the number of resources requested to be obtained and the number of resources requested to be outbound but not outbound. Wherein, the number of resources requested to be obtained may include the sum of the requested quantities of resources included in multiple different resource acquisition requests; the number of resources requested to be outbound but not outbound includes the sum of the number of resources requested to be outbound but not outbound corresponding to multiple resource acquisition requests that have been approved. version1 is the version number of the inventory information, and the version number is updated every time the inventory information is updated. bsnNo is the application number, which is an application initiated by the business personnel according to the needs, and each application corresponds to an application number. adtAprvNum is the number of resources requested to be outbound, which is equal to the sum of the requested quantities of resources corresponding to multiple resource acquisition requests that have been approved. alrdyOutStgNum is the number of resources that have been shipped out. version2 is the version number of the shipping information. The version number is updated every time the shipping information is updated.
[0028] In this scenario example, after the business personnel submits a resource application, if the inventory quantity of the resource is greater than the quantity of the resource application submitted by the business personnel, the inventory information of the resource in the inventory table will be updated, and after the resource application submitted by the business personnel is approved, the outbound information of the resource in the outbound table will also be updated. In this scenario example, the updates to the inventory table and the outbound table can be placed in the same transaction. Submitting multiple resource applications for multiple business personnel is a concurrency problem in the updates of the inventory table and the outbound table, which can be solved by the version number of the inventory table and the version number of the outbound table. Taking the update of the inventory table as an example, after the business personnel submits a resource application, the version number corresponding to the inventory information of the resource in the inventory table can be obtained once. If the inventory quantity of the resource is greater than the quantity applied for the resource by the business personnel, the inventory information of the resource in the inventory table will be updated. Before the update, the current version number corresponding to the current inventory information of the resource in the inventory table is obtained again. If the current version number is the same as the version number obtained for the first time, it means that the inventory information has not changed within the time interval between the two inventory information acquisitions, and the inventory information of the resource in the inventory table can be updated. If the current version number is different from the version number obtained for the first time, it means that the inventory information has changed within the time interval between the two inventory information acquisitions, and the inventory information may be updated in response to the resource application of other business personnel. Therefore, it can be considered that the inventory information obtained for the first time is expired data, and the inventory information in the inventory table cannot be updated.
[0029] The transaction is atomic, and the transaction is the logical work unit of the database, and must be an atomic work unit. For its data modification, either all or none of it is executed. The transaction is consistent, and when the transaction is completed, all data must remain consistent. In the relevant database, all rules must be applied to the modification of the transaction to maintain the integrity of all data. The transaction is isolated, and the execution of a transaction cannot be affected by other transactions. The transaction is persistent, and once a transaction is submitted, the operation of the transaction is permanently saved in the database. Even if the database system encounters a failure, the operation of the submitted transaction will not be lost.
[0030] In this scenario example, the steps for processing inventory data are as follows.
[0031] Step 1: Initiate a resource acquisition request.
[0032] The resource acquisition request may include the requested quantity of resources.
[0033] Step 2: Get inventory information, version number of inventory information and delivery information.
[0034] In this scenario example, the resource has a corresponding resource number in the inventory table and the outbound table; accordingly, the inventory information of the resource in the inventory table, the version number representing the inventory information version, and the outbound information of the resource in the outbound table can be obtained based on the resource number.
[0035] Step 3: Check whether the available quantity of resources is greater than or equal to the requested quantity of resources.
[0036] For the same resource, it is usually possible for multiple different users to apply for it. After the requests for different users are approved, since some of these resources may not be out of the warehouse, the inventory quantity in the inventory table has not been updated. Therefore, the inventory quantity in the inventory table does not mean that these quantities of resources can be applied for by new users. For example, the inventory quantity of pens is 100, user A applies for 30, user B applies for 20, user C applies for 20, and user A. User B and user C's acquisition requests have been approved. Since these pens may not be taken out of the warehouse immediately after approval, the inventory quantity of pens in the inventory table is still 100, but in fact, the number of pens that can be applied for by new users is 30, so it is necessary to judge whether the number of pens that new users can apply for can be met based on the number of pens that can be applied for by new users.
[0037] In this scenario example, the available quantity of the resource can be determined based on the inventory information and the outbound information. Specifically, the available quantity of the resource is calculated based on the inventory quantity of the resource in the inventory information, the total requested quantity of the resource, and the requested outbound quantity of the resource in the outbound information. During the verification process, verification can be performed according to the following formula:
[0038] invNum-sumAdtAprvNum+adtAprvNum>=curAdtAprvNum
[0039] Wherein, curAdtAprvNum represents the requested quantity of the resource.
[0040] If the verification passes, proceed to step 4; if the verification fails, proceed to step 2.
[0041] Step 4: Update the inventory table and the outbound table.
[0042] In this scenario example, before updating the inventory table and the outbound table, the current version number of the current inventory information of the resource in the inventory table can be read. During the verification process, if the inventory information in the inventory table changes, for example, the inventory information in the inventory table is updated according to a resource acquisition request initiated by another user, or the inventory information in the inventory table is updated when the resource in the warehouse is outbound, the inventory information used during the verification is outdated. In this case, the inventory table cannot be updated according to the inventory information.
[0043] Since the inventory information corresponds to a version number, each time the inventory information is updated, the version number is also updated, so that whether the inventory information has been updated can be determined based on the version number of the inventory information. The version number can be represented by a number, or a combination of numbers and letters, and each time the inventory information is updated, the numeric part of the version number can be incremented in sequence. For example, if the version number of the original inventory information is 0, then after the inventory information is updated once, the version number can be updated to 1, and if the inventory information is updated again, the version number can be updated to 2. Of course, the version number can also be expressed in other forms and updated in other ways. By comparing different version numbers of the same inventory information, it can be determined which version number corresponds to the new inventory information and which version number corresponds to the old inventory information.
[0044] In this scenario example, the current version number corresponding to the current inventory information read can be compared with the version number corresponding to the inventory information used in the verification step. If the two are the same, it means that the inventory information in the inventory table has not been updated during the verification process, and the current inventory information in the inventory table, the current version number of the current inventory information, and the outbound information in the outbound table can be updated based on the requested quantity of the resource; if the two are different, it means that the inventory information in the inventory table has been updated during the verification process, and step 4 fails.
[0045] Specifically, updating the outbound information in the outbound table includes: updating the quantity of the resources requested to be outbound in the outbound information to the requested quantity of the resources, that is, updating adtAprvNum of the corresponding records of bsnNo and invSeq in the outbound table to curAdtAprvNum.
[0046] Updating the current inventory information in the inventory table includes: updating the total requested quantity of the resource in the current inventory information according to the requested quantity of the resource and the requested quantity of the resource in the outbound information, that is, updating sumAdtAprvNum to sumAdtAprvNum-adtAprvNum+curAdtAprvNum. Since the current inventory information in the inventory table is updated, the current version number of the current inventory information needs to be updated. Specifically, version1 can be version1=version1+1.
[0047] In this scenario example, if step 4 fails or succeeds but the operator chooses to continue the approval, the next operation jumps to step 2. If step 4 succeeds and the operator chooses to complete the approval, the next operation jumps to step 5.
[0048] Step 5: Get the version number of the inventory information, the delivery information, and the version number of the delivery information.
[0049] In this scenario example, the version number of the inventory information of the resource in the inventory table, the outbound information of the resource in the outbound table, and the version number representing the outbound information version can be obtained based on the resource number.
[0050] Step 6: Check whether the available quantity of the resource is greater than or equal to the requested quantity of the resource.
[0051] In this scenario example, the available number of the resource can be determined based on the outbound information. Specifically, the available number of the resource can be calculated based on the number of resources requested to be outbound and the number of resources that have been outbound in the outbound information. During the verification process, verification can be performed according to the following formula:
[0052] adtAprvNum-alrdyOutStgNum>=curOutStgNum
[0053] Wherein, curOutStgNum represents the requested outbound quantity of the resource.
[0054] In this scenario example, if the verification passes, jump to step 7; if the verification fails, jump to step 5.
[0055] Step 7: Update the inventory table and the outbound table.
[0056] In this scenario example, before updating the inventory table and the outbound table, the current version number of the current inventory information of the resource in the inventory table and the current version number of the current outbound information of the resource in the outbound table can be read. During the verification process, if any of the inventory information in the inventory table or the outbound information in the outbound table changes. For example, for inventory information, the inventory information in the inventory table is updated according to a resource acquisition request initiated by another user, or the resource in the warehouse is outbound, and the inventory information in the inventory table is updated, so that the inventory information used during the verification is expired inventory information. For outbound information, the outbound information in the outbound table is updated according to a resource outbound request initiated by another user, or the resource in the warehouse is outbound, and the outbound information in the outbound table is updated, so that the outbound information used during the verification is expired outbound information. In this case, the inventory table and the outbound table cannot be updated.
[0057] In this scenario example, the current version number corresponding to the read current inventory information can be compared with the version number corresponding to the inventory information obtained before verification, and the current version number corresponding to the read current outbound information can be compared with the version number corresponding to the outbound information used during verification. If the current version number of the current inventory information is the same as the version number of the obtained inventory information, and the current version number of the current outbound information is the same as the version number of the obtained outbound information, it means that the inventory information in the inventory table and the outbound information in the outbound table have not been updated during the verification process, and the current inventory information in the inventory table, the current version number of the current inventory information, the current outbound information in the outbound table, and the current version number of the current outbound information can be updated based on the requested outbound quantity of the resource. If the current version number of the current inventory information is different from the version number of the obtained inventory information, and the current version number of the current outbound information is different from the version number of the obtained outbound information, it means that the inventory information in the inventory table and the outbound information in the outbound table have been updated during the verification process, and step 7 fails to execute.
[0058] Specifically, updating the current outbound information in the outbound table includes: updating the number of resources that have been outbound in the current outbound information according to the requested outbound number of the resource, that is, updating the alrdyOutStgNum of the corresponding records of bsnNo and invSeq in the outbound table to alrdyOutStgNum=alrdyOutStgNum+curOutStgNum. Since the current outbound information in the outbound table is updated, the current version number of the current outbound information also needs to be updated. Specifically, version2 can be updated to version2=version2+1.
[0059] Updating the current inventory information in the inventory table includes: updating the inventory quantity of the resource and the total requested quantity of the resource in the current inventory information according to the requested outbound quantity of the resource, that is, updating the sumAdtAprvNum of the corresponding record of invSeq to sumAdtAprvNum=sumAdtAprvNum-curOutStgNum, and updating invNum to invNum=invNum-curOutStgNum. Since the current inventory information in the inventory table is updated, the current version number of the current inventory information also needs to be updated. Specifically, version1 can be updated to version1=version1+1.
[0060] In this scenario, if step 7 is executed successfully and the warehouse manager clicks "Complete Approval", the delivery is completed; otherwise, jump to step 5.
[0061] In this scenario example, the approver can approve the current application without paying attention to the specific circumstances of other application forms. The system automatically prompts whether the approval conditions are met based on the relationship between the approved quantity, the approved quantity of the current application form, and the current approved quantity, ensuring that all approved application forms can be shipped out smoothly. Multiple warehouse managers can perform shipping operations on the same application form without concurrent exceptions. Based on the relationship between the approved quantity of the application form, the shipped quantity, and the current shipped quantity, the system automatically prompts whether the current shipping operation can be performed, thereby improving the success rate of approved resource shipping.
[0062] See also Figure 2 . This specification embodiment provides an inventory data processing method. In the embodiment of this specification, the subject that executes the inventory data processing method may be an electronic device with a logical operation function, and the electronic device may be a server. The server may be an electronic device with a certain operation and processing capability. It may have a network communication unit, a processor, a memory, etc. Of course, the server is not limited to the above-mentioned electronic device with a certain entity, and it may also be software running in the above-mentioned electronic device. The server may also be a distributed server, which may be a system with multiple processors, memories, network communication modules, etc. operating in collaboration. Alternatively, the server may also be a server cluster formed by several servers. The method may include the following steps.
[0063] S210: In response to a resource acquisition request, obtain inventory information of the resource in an inventory table, a version number representing a version of the inventory information, and outbound information of the resource in an outbound table; wherein the resource acquisition request includes a requested quantity of the resource.
[0064] In some embodiments, business personnel can submit resource applications through the client, each resource application can correspond to an application number, and each resource application includes the requested number of resources. Based on the resource application submitted by the business personnel, the client can generate a resource acquisition request and send the resource acquisition request to the server. The client can be an electronic device with display, calculation and network access functions. Specifically, for example, the client can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc. Alternatively, the client can also be software that can run in the above-mentioned electronic devices. The client can communicate with the server, for example, it can communicate with the server through a wired network and / or a wireless network.
[0065] In some embodiments, as shown in Table 1, the inventory table includes inventory information of at least one resource and a version number corresponding to the inventory information. The inventory information may include the inventory quantity of the resource, the total quantity of the resource applied for, and other information.
[0066] Among them, invSeq is the resource number, and the resource number is the number for the same type of resources in a certain warehouse. There is only one record for the same resource number in the inventory table, and there can be multiple records for the same resource number in the outbound table. invNum is the inventory quantity, which indicates the inventory quantity corresponding to the resource recorded in the warehouse. sumAdtAprvNum is the total requested quantity of resources, and the total requested quantity of resources is equal to the quantity of resources requested to be obtained and the quantity of resources requested to be shipped out but not shipped out. Among them, the quantity of resources requested to be obtained may include the sum of the requested quantities of resources included in multiple different resource acquisition requests; the quantity of resources requested to be shipped out but not shipped out includes the sum of the quantities of resources requested to be shipped out but not shipped out corresponding to multiple resource acquisition requests that have completed approval. version1 is the version number of the inventory information. The version number is updated every time the inventory information is updated.
[0067] In some embodiments, as shown in Table 2, the outbound table includes outbound information of at least one resource and a version number corresponding to the outbound information. The outbound information may include the number of resources requested to be outbound and the number of resources that have been outbound.
[0068] bsnNo is the application number. Each application initiated by the business personnel is based on the needs. Each application corresponds to an application number. adtAprvNum is the number of resources requested to be shipped out, which is equal to the sum of the number of resource requests corresponding to multiple approved resource acquisition requests. alrdyOutStgNum is the number of resources shipped out. version2 is the version number of the shipping information. The version number is updated every time the shipping information is updated.
[0069] In some embodiments, the resource has a corresponding resource number in the inventory table and the outbound table; accordingly, the server can obtain the inventory information of the resource in the inventory table, the version number representing the inventory information version, and the outbound information in the outbound table of the resource based on the resource number in response to the resource acquisition request.
[0070] S220: Determine the available quantity of the resource according to the inventory information and the outbound information.
[0071] In some embodiments, for the same resource, it may usually include multiple different users applying for acquisition. After the acquisition requests of different users are approved, since some of these resources may not be out of the warehouse, the inventory quantity in the inventory table has not been updated. Therefore, the inventory quantity in the inventory table does not mean that these quantities of resources can be applied for by new users. For example, the inventory quantity of pens is 100, user A applies for 30, user B applies for 20, user C applies for 20, and user A. User B and user C's acquisition requests have been approved. Since these pens may not be taken out of the warehouse immediately after approval, the inventory quantity of pens in the inventory table is still 100, but in fact, the number of pens that can be applied for by new users is 30, so it is necessary to judge whether the number of pens that the new user applies for can be met based on the number of pens that can be applied for by the new user.
[0072] In some embodiments, the available quantity of the resource can be determined according to the inventory information and the outbound information. Specifically, the available quantity of the resource is calculated according to the inventory quantity of the resource in the inventory information, the total requested quantity of the resource, and the requested outbound quantity of the resource in the outbound information. Specifically, the available quantity of the resource is equal to invNum-sumAdtAprvNum+adtAprvNum.
[0073] S230: When the quantity of the resource that can be obtained is greater than or equal to the requested quantity of the resource, read the current version number of the current inventory information of the resource in the inventory table.
[0074] In some embodiments, before updating the inventory table and the outbound table, the current version number of the current inventory information of the resource in the inventory table can be read. During the verification process, if the inventory information in the inventory table changes, for example, the inventory information in the inventory table is updated according to a resource acquisition request initiated by another user, or the resource in the warehouse is outbound, the inventory information in the inventory table is updated, so that the inventory information used during the verification is expired inventory information. In this case, the inventory table cannot be updated according to the inventory information.
[0075] Since the inventory information corresponds to a version number, each time the inventory information is updated, the version number is also updated, so that whether the inventory information has been updated can be determined based on the version number of the inventory information. The version number can be represented by a number, or a combination of numbers and letters, and each time the inventory information is updated, the numeric part of the version number can be incremented in sequence. For example, if the version number of the original inventory information is 0, then after the inventory information is updated once, the version number can be updated to 1, and if the inventory information is updated again, the version number can be updated to 2. Of course, the version number can also be expressed in other forms and updated in other ways. By comparing different version numbers of the same inventory information, it can be determined which version number corresponds to the new inventory information and which version number corresponds to the old inventory information.
[0076] In some embodiments, the current version number corresponding to the read current inventory information can be compared with the version number corresponding to the inventory information used to determine the quantity of the resource that can be obtained. If the two are the same, it means that the inventory information in the inventory table has not been updated during the verification process, and the current inventory information in the inventory table, the current version number of the current inventory information and the outbound information in the outbound table can be updated based on the requested quantity of the resource; if the two are different, it means that the inventory information in the inventory table has been updated during the verification process, and the current inventory information in the inventory table, the current version number of the current inventory information and the outbound information in the outbound table cannot be updated based on the requested quantity of the resource.
[0077] S240: When the current version number is the same as the obtained version number, the current inventory information in the inventory table, the current version number of the current inventory information, and the outbound information in the outbound table are updated based on the requested quantity of the resource.
[0078] In some embodiments, updating the outbound information in the outbound table based on the requested quantity of the resource includes: updating the quantity of the resources requested to be outbound in the outbound information to the requested quantity of the resource, i.e. updating the adtAprvNum of the corresponding records of bsnNo and invSeq in the outbound table to curAdtAprvNum.
[0079] In some embodiments, the updating of the current inventory information in the inventory table based on the requested quantity of the resource includes: updating the total requested quantity of the resource in the current inventory information according to the requested quantity of the resource and the requested quantity of the resource in the outbound information, that is, updating sumAdtAprvNum to sumAdtAprvNum-adtAprvNum+curAdtAprvNum. Since the current inventory information in the inventory table is updated, the current version number of the current inventory information needs to be updated. Specifically, version1 can be version1=version1+1.
[0080] In some embodiments, the method may further include the following steps.
[0081] Step 1: In response to a resource outbound request, obtain the version number of the inventory information of the resource in the inventory table, the outbound information of the resource in the outbound table, and the version number representing the outbound information version; wherein the resource outbound request includes the requested outbound quantity of the resource.
[0082] In some embodiments, the business personnel may submit resource outbound applications through the client, and each resource outbound application includes the requested outbound quantity of the resource. Based on the resource outbound application submitted by the business personnel, the client may generate a resource outbound request and send the resource outbound request to the server.
[0083] In some embodiments, the resource has a corresponding resource number in the inventory table and the outbound table. Accordingly, in response to the resource outbound request, the server can obtain the version number of the inventory information of the resource in the inventory table, the outbound information of the resource in the outbound table, and the version number representing the outbound information version based on the resource number.
[0084] Step 2: Determine the available outbound quantity of the resource according to the outbound information.
[0085] In some embodiments, the available number of the resource can be determined according to the outbound information. Specifically, the available number of the resource can be calculated according to the number of the resource requested to be outbound and the number of the resource already outbound in the outbound information. Specifically, the available number of the resource is equal to adtAprvNum-alrdyOutStgNum.
[0086] Step 3: When the available outbound quantity of the resource is greater than or equal to the requested outbound quantity of the resource, read the current version number of the current inventory information of the resource in the inventory table and the current version number of the current outbound information of the resource in the outbound table.
[0087] In some embodiments, before updating the inventory table and the outbound table, the current version number of the current inventory information of the resource in the inventory table and the current version number of the current outbound information of the resource in the outbound table can be read. Because in the process of determining the outbound quantity of the resource, if any of the inventory information in the inventory table or the outbound information in the outbound table changes. For example, for inventory information, the inventory information in the inventory table is updated according to a resource acquisition request initiated by another user, or the resource in the warehouse is outbound, the inventory information in the inventory table is updated, so that the inventory information used during verification is expired inventory information. For outbound information, the outbound information in the outbound table is updated according to a resource outbound request initiated by another user, or the resource in the warehouse is outbound, the outbound information in the outbound table is updated, so that the outbound information used when determining the outbound quantity of the resource is expired outbound information. In this case, the inventory table and the outbound table cannot be updated.
[0088] In some embodiments, the current version number corresponding to the read current inventory information may be compared with the version number corresponding to the inventory information obtained before determining the available quantity of the resource to be shipped, and the current version number corresponding to the read current shipping information may be compared with the version number corresponding to the shipping information used when determining the available quantity of the resource to be shipped. If the current version number of the current inventory information is the same as the version number of the obtained inventory information, and the current version number of the current shipping information is the same as the version number of the obtained shipping information, it means that the inventory information in the inventory table and the shipping information in the shipping table have not been updated during the process of determining the available quantity of the resource to be shipped, and the current inventory information in the inventory table, the current version number of the current inventory information, the current shipping information in the shipping table, and the current version number of the current shipping information may be updated based on the requested shipping quantity of the resource. If the current version number of the current inventory information is different from the version number of the acquired inventory information, and the current version number of the current outbound information is different from the version number of the acquired outbound information, it means that the inventory information in the inventory table and the outbound information in the outbound table are updated in the process of determining the available outbound quantity of the resource, and the current inventory information in the inventory table, the current version number of the current inventory information, the current outbound information in the outbound table and the current version number of the current outbound information cannot be updated based on the requested outbound quantity of the resource.
[0089] Step 4: When the current version number of the current inventory information is the same as the version number of the acquired inventory information, and the current version number of the current outbound information is the same as the version number of the acquired outbound information, the current inventory information in the inventory table, the current version number of the current inventory information, the current outbound information in the outbound table, and the current version number of the current outbound information are updated based on the requested outbound quantity of the resource.
[0090] In some embodiments, the updating of the current inventory information in the inventory table based on the requested outbound quantity of the resource includes: updating the inventory quantity of the resource and the total requested quantity of the resource in the current inventory information according to the requested outbound quantity of the resource, that is, updating the sumAdtAprvNum of the corresponding record of invSeq to sumAdtAprvNum=sumAdtAprvNum-curOutStgNum, and updating invNum to invNum=invNum-curOutStgNum. Since the current inventory information in the inventory table is updated, the current version number of the current inventory information also needs to be updated. Specifically, version1 can be updated to version1=version1+1.
[0091] In some embodiments, the updating of the current outbound information in the outbound table based on the requested outbound quantity of the resource includes: updating the outbound quantity of the resource in the current outbound information according to the requested outbound quantity of the resource, that is, updating the alrdyOutStgNum of the corresponding records of bsnNo and invSeq in the outbound table to alrdyOutStgNum=alrdyOutStgNum+curOutStgNum. Since the current outbound information in the outbound table is updated, the current version number of the current outbound information also needs to be updated. Specifically, version2 can be updated to version2=version2+1.
[0092] The inventory data processing method provided in the embodiment of this specification can respond to a resource acquisition request to obtain the inventory information of the resource in the inventory table, the version number representing the inventory information version, and the outbound information in the outbound table of the resource; wherein the resource acquisition request includes the requested quantity of the resource; the quantity of the resource that can be acquired is determined according to the inventory information and the outbound information; when the quantity of the resource that can be acquired is greater than or equal to the requested quantity of the resource, the current version number of the current inventory information of the resource in the inventory table is read; when the current version number is the same as the acquired version number, the current inventory information in the inventory table, the current version number of the current inventory information, and the outbound information in the outbound table are updated based on the requested quantity of the resource. The method provided in the embodiment of this specification enables the approval personnel to approve the current application without paying attention to the specific circumstances of other applications. The system automatically prompts whether the approval conditions are met according to the relationship between the summarized approved quantity, the current application approved quantity, and the current approved quantity, thereby improving the success rate of the approved resource outbound.
[0093] Figure 3 This is a functional structure diagram of an electronic device according to an embodiment of the present specification. The electronic device may include a memory and a processor.
[0094] In some embodiments, the memory can be used to store the computer program and / or module, and the processor implements various functions of the inventory data processing method by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the user terminal. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0095] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor can execute the computer instructions to implement the following steps: in response to a resource acquisition request, obtain the inventory information of the resource in the inventory table, the version number representing the inventory information version, and the outbound information in the outbound table of the resource; wherein the resource acquisition request includes the requested quantity of the resource; determine the quantity of the resource that can be acquired according to the inventory information and the outbound information; when the quantity of the resource that can be acquired is greater than or equal to the requested quantity of the resource, read the current version number of the current inventory information of the resource in the inventory table; when the current version number is the same as the acquired version number, update the current inventory information in the inventory table, the current version number of the current inventory information, and the outbound information in the outbound table based on the requested quantity of the resource.
[0096] In the embodiments of this specification, the functions and effects specifically implemented by the electronic device can be explained in comparison with other embodiments and will not be repeated here.
[0097] Figure 4 This is a functional structural diagram of an inventory data processing device according to an embodiment of the present specification. The device may specifically include the following structural modules.
[0098] The acquisition module 410 is used to obtain the inventory information of the resource in the inventory table, the version number representing the inventory information version, and the outbound information of the resource in the outbound table in response to the resource acquisition request; wherein the resource acquisition request includes the requested quantity of the resource;
[0099] A determination module 420, configured to determine the available quantity of the resource according to the inventory information and the outbound information;
[0100] A reading module 430 is configured to read a current version number of current inventory information of the resource in the inventory table when the quantity of the resource that can be obtained is greater than or equal to the requested quantity of the resource;
[0101] The updating module 440 is used to update the current inventory information in the inventory table, the current version number of the current inventory information, and the outbound information in the outbound table based on the requested quantity of the resource when the current version number is the same as the acquired version number.
[0102] In some embodiments, the acquisition module 410 may also be used to obtain, in response to a resource outbound request, a version number of the inventory information of the resource in the inventory table, outbound information of the resource in the outbound table, and a version number representing the outbound information version; wherein the resource outbound request includes a requested outbound quantity of the resource;
[0103] The determination module 420 may also be used to determine the available outbound quantity of the resource according to the outbound information;
[0104] The reading module 430 may also be used to read the current version number of the current inventory information of the resource in the inventory table and the current version number of the current outbound information of the resource in the outbound table when the available outbound quantity of the resource is greater than or equal to the requested outbound quantity of the resource;
[0105] The update module 440 can also be used to update the current inventory information in the inventory table, the current version number of the current inventory information, the current outbound information in the outbound table, and the current version number of the current outbound information based on the requested outbound quantity of the resource, when the current version number of the current inventory information is the same as the version number of the acquired inventory information, and the current version number of the current outbound information is the same as the version number of the acquired outbound information.
[0106] The embodiment of the present specification also provides a computer-readable storage medium of an inventory data processing method, the computer-readable storage medium storing computer program instructions, which, when executed, implement: in response to a resource acquisition request, acquiring inventory information of the resource in an inventory table, a version number representing a version of the inventory information, and outbound information in an outbound table of the resource; wherein the resource acquisition request includes a requested quantity of the resource; determining the quantity of the resource that can be acquired based on the inventory information and the outbound information; when the quantity of the resource that can be acquired is greater than or equal to the requested quantity of the resource, reading the current version number of the current inventory information of the resource in the inventory table; and when the current version number is the same as the acquired version number, updating the current inventory information in the inventory table, the current version number of the current inventory information, and the outbound information in the outbound table based on the requested quantity of the resource.
[0107] In the embodiments of this specification, the above-mentioned storage medium includes but is not limited to random access memory (Random Access Memory, RAM), read-only memory (Read-Only Memory, ROM), cache (Cache), hard disk (Hard Disk Drive, HDD) or memory card (Memory Card). The memory can be used to store the computer program and / or module, and the memory can mainly include a storage program area and a storage data area, wherein the storage program area can store an operating system, at least one application required for a function, etc.; the storage data area can store data created according to the use of the user terminal, etc. In addition, the memory may include a high-speed random access memory and may also include a non-volatile memory. In the embodiments of this specification, the functions and effects specifically implemented by the program instructions stored in the computer-readable storage medium can be explained in comparison with other implementations, and will not be repeated here.
[0108] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment and the equipment embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0109] After reading this specification, those skilled in the art can conceive of any combination of some or all of the embodiments listed in this specification without creative work, and these combinations are also within the scope of disclosure and protection of this specification.
[0110] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog2. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0111] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0112] It can be known from the above description of the implementation mode that the technicians in this field can clearly understand that the present specification can be implemented by means of software plus the necessary general hardware platform. Based on such an understanding, the technical solution of the present specification can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present specification or some parts of the embodiments.
[0113] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0114] This specification can be used in many general or special computer system environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, and distributed computing environments that include any of the above systems or devices.
[0115] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0116] Although the present specification is described through embodiments, those skilled in the art will appreciate that there are many modifications and changes to the present specification without departing from the spirit of the present specification, and it is intended that the appended claims include these modifications and changes without departing from the spirit of the present specification.
Claims
1. A method for processing inventory data, characterized in that: The method comprises: In response to a resource acquisition request, acquiring inventory information of the resource in an inventory table, a version number representing a version of the inventory information, and outbound information of the resource in an outbound table; wherein the resource acquisition request includes a requested quantity of the resource; Determine the available quantity of the resource according to the inventory information and the outbound information; Verify whether the available quantity of the resource is greater than or equal to the requested quantity of the resource, and if the available quantity of the resource is greater than or equal to the requested quantity of the resource, read the current version number of the current inventory information of the resource in the inventory table; In the case where the current version number is the same as the obtained version number, the current inventory information in the inventory table, the current version number of the current inventory information, and the outbound information in the outbound table are updated based on the requested quantity of the resource, wherein the case where the current version number is the same as the obtained version number indicates that the inventory information used in the verification is not expired inventory information; The checking whether the quantity of the resources that can be obtained is greater than or equal to the requested quantity of the resources includes: Use the following formula to verify: invNum-sumAdtAprvNum+adtAprvNum>=curAdtAprvNum; Among them, invNum is the inventory quantity of the resource in the inventory information; sumAdtAprvNum is the total requested quantity of the resource in the inventory information; adtAprvNum is the quantity of the resource requested to be shipped out in the shipping information; invNum-sumAdtAprvNum+adtAprvNum is the quantity of the resource that can be obtained; curAdtAprvNum is the requested quantity of the resource; Wherein, updating the outbound information in the outbound table based on the requested quantity of the resource includes: The quantity of the resource requested to be shipped out in the shipping information is updated to the requested quantity of the resource.
2. The method according to claim 1, characterized in that: The inventory information includes the inventory quantity of resources and the total requested quantity of resources; the total requested quantity of resources includes the quantity of resources requested to be obtained and the quantity of resources requested to be shipped out but not shipped out.
3. The method according to claim 1, characterized in that The outbound information includes the quantity of resources requested to be outbound and the quantity of resources that have been outbound.
4. The method according to claim 1, characterized in that: The resource has a corresponding resource number in the inventory table and the outbound table; Correspondingly, the inventory information of the resource in the inventory table, the version number representing the version of the inventory information, and the outbound information of the resource in the outbound table are obtained based on the resource number.
5. The method according to claim 1, characterized in that Determining the quantity of the resource that can be obtained based on the inventory information and the outbound information includes: calculating the quantity of the resource that can be obtained based on the inventory quantity of the resource in the inventory information, the total requested quantity of the resource, and the quantity of the resource requested to be outbound in the outbound information.
6. The method according to claim 1, characterized in that The updating of the current inventory information in the inventory table based on the requested quantity of the resource includes: The total requested quantity of the resource in the current inventory information is updated according to the requested quantity of the resource and the quantity of the resource requested to be shipped out in the shipping information.
7. The method according to claim 1, characterized in that The method further comprises: In response to a resource outbound request, obtaining a version number of the inventory information of the resource in the inventory table, outbound information of the resource in the outbound table, and a version number representing the outbound information version; wherein the resource outbound request includes a requested outbound quantity of the resource; Determine the available outbound quantity of the resource according to the outbound information; When the available outbound quantity of the resource is greater than or equal to the requested outbound quantity of the resource, reading the current version number of the current inventory information of the resource in the inventory table and the current version number of the current outbound information of the resource in the outbound table; When the current version number of the current inventory information is the same as the version number of the acquired inventory information, and the current version number of the current outbound information is the same as the version number of the acquired outbound information, the current inventory information in the inventory table, the current version number of the current inventory information, the current outbound information in the outbound table, and the current version number of the current outbound information are updated based on the requested outbound quantity of the resource.
8. The method according to claim 7, characterized in that The resource has a corresponding resource number in the inventory table and the outbound table; Correspondingly, based on the resource number, the version number of the inventory information of the resource in the inventory table, the outbound information of the resource in the outbound table, and the version number representing the outbound information version are obtained.
9. The method according to claim 7, characterized in that: Determining the available quantity of the resource according to the outbound information includes: calculating the available quantity of the resource according to the quantity of the resource requested to be outbound and the quantity of the resource already outbound in the outbound information.
10. The method according to claim 7, characterized in that The updating of the current inventory information in the inventory table based on the requested outbound quantity of the resource includes: The inventory quantity of the resource and the total requested quantity of the resource in the current inventory information are updated according to the requested outbound quantity of the resource.
11. The method according to claim 7, characterized in that The updating of the current outbound information in the outbound table based on the requested outbound quantity of the resource includes: The quantity of the resource that has been shipped out in the current shipping information is updated according to the requested shipping quantity of the resource.
12. An inventory data processing device, characterized in that: The device comprises: An acquisition module, configured to acquire, in response to a resource acquisition request, inventory information of the resource in an inventory table, a version number representing a version of the inventory information, and outbound information of the resource in an outbound table; wherein the resource acquisition request includes a requested quantity of the resource; A determination module, used to determine the available quantity of the resource according to the inventory information and the outbound information; a reading module, used to verify whether the available quantity of the resource is greater than or equal to the requested quantity of the resource, and if the available quantity of the resource is greater than or equal to the requested quantity of the resource, read the current version number of the current inventory information of the resource in the inventory table; an update module, configured to update the current inventory information in the inventory table, the current version number of the current inventory information, and the outbound information in the outbound table based on the requested quantity of the resource when the current version number is the same as the obtained version number, wherein the fact that the current version number is the same as the obtained version number indicates that the inventory information used during verification is not expired inventory information; The checking whether the quantity of the resources that can be obtained is greater than or equal to the requested quantity of the resources includes: Use the following formula to verify: invNum-sumAdtAprvNum+adtAprvNum>=curAdtAprvNum; Among them, invNum is the inventory quantity of the resource in the inventory information; sumAdtAprvNum is the total requested quantity of the resource in the inventory information; adtAprvNum is the quantity of the resource requested to be shipped out in the shipping information; invNum-sumAdtAprvNum+adtAprvNum is the quantity of the resource that can be obtained; curAdtAprvNum is the requested quantity of the resource; The updating of the outbound information in the outbound table based on the requested quantity of the resource includes: updating the quantity of the resource requested to be outbound in the outbound information to the requested quantity of the resource.
13. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement: in response to a resource acquisition request, acquiring inventory information of the resource in an inventory table, a version number representing a version of the inventory information, and outbound information in an outbound table of the resource; wherein the resource acquisition request includes a requested quantity of the resource; determining the quantity of the resource that can be acquired based on the inventory information and the outbound information; verifying whether the quantity of the resource that can be acquired is greater than or equal to the requested quantity of the resource, and in the case where the quantity of the resource that can be acquired is greater than or equal to the requested quantity of the resource, reading a current version number of the current inventory information of the resource in the inventory table; and in the case where the current version number is the same as the acquired version number, updating the current inventory information in the inventory table, the current version number of the current inventory information, and the outbound information in the outbound table based on the requested quantity of the resource, wherein the case where the current version number is the same as the acquired version number indicates that the current version number adopted in the verification is the same. The inventory information is not expired inventory information; wherein, the verification whether the quantity of the resource that can be obtained is greater than or equal to the requested quantity of the resource includes: verifying according to the following formula: invNum-sumAdtAprvNum+adtAprvNum>=curAdtAprvNum; wherein, invNum is the inventory quantity of the resource in the inventory information; sumAdtAprvNum is the total requested quantity of the resource in the inventory information; adtAprvNum is the quantity of the resource requested to be out of the warehouse in the outbound information; invNum-sumAdtAprvNum+adtAprvNum is the quantity of the resource that can be obtained; curAdtAprvNum is the requested quantity of the resource; wherein, updating the outbound information in the outbound table based on the requested quantity of the resource includes: updating the quantity of the resource requested to be out of the warehouse in the outbound information to the requested quantity of the resource.
14. A computer-readable storage medium, characterized in that: Computer instructions are stored thereon, and when the instructions are executed, the following are achieved: in response to a resource acquisition request, the inventory information of the resource in the inventory table, the version number representing the version of the inventory information, and the outbound information in the outbound table of the resource are acquired; wherein the resource acquisition request includes the requested quantity of the resource; the quantity of the resource that can be acquired is determined according to the inventory information and the outbound information; it is verified whether the quantity of the resource that can be acquired is greater than or equal to the requested quantity of the resource, and if the quantity of the resource that can be acquired is greater than or equal to the requested quantity of the resource, the current version number of the current inventory information of the resource in the inventory table is read; if the current version number is the same as the acquired version number, the current inventory information in the inventory table, the current version number of the current inventory information, and the outbound information in the outbound table are updated based on the requested quantity of the resource, and if the current version number is the same as the acquired version number, it indicates that the current version number obtained during the verification is the same as the acquired version number. The inventory information used is not expired inventory information; wherein, the verification of whether the quantity of the resource that can be obtained is greater than or equal to the requested quantity of the resource includes: verifying according to the following formula: invNum-sumAdtAprvNum+adtAprvNum>=curAdtAprvNum; wherein, invNum is the inventory quantity of the resource in the inventory information; sumAdtAprvNum is the total requested quantity of the resource in the inventory information; adtAprvNum is the quantity of the resource requested to be out of the warehouse in the outbound information; invNum-sumAdtAprvNum+adtAprvNum is the quantity of the resource that can be obtained; curAdtAprvNum is the requested quantity of the resource; wherein, updating the outbound information in the outbound table based on the requested quantity of the resource includes: updating the requested quantity of the resource in the outbound information to the requested quantity of the resource.
