CN114186925A - Stock value calculation method, stock value calculation device, computer equipment and storage medium - Google Patents

Stock value calculation method, stock value calculation device, computer equipment and storage medium Download PDF

Info

Publication number
CN114186925A
CN114186925A CN202111443960.1A CN202111443960A CN114186925A CN 114186925 A CN114186925 A CN 114186925A CN 202111443960 A CN202111443960 A CN 202111443960A CN 114186925 A CN114186925 A CN 114186925A
Authority
CN
China
Prior art keywords
inventory
value calculation
flow data
balance
warehouse
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111443960.1A
Other languages
Chinese (zh)
Inventor
朱猛
董佳佳
范大章
高雷
沈吴彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Suning Software Technology Co ltd
Original Assignee
Nanjing Suning Software Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Suning Software Technology Co ltd filed Critical Nanjing Suning Software Technology Co ltd
Priority to CN202111443960.1A priority Critical patent/CN114186925A/en
Publication of CN114186925A publication Critical patent/CN114186925A/en
Priority to CA3183615A priority patent/CA3183615A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/087Inventory or stock management, e.g. order filling, procurement or balancing against orders
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • G06Q30/0206Price or cost determination based on market factors

Abstract

The application relates to the field of inventory management, in particular to an inventory value calculation method, an inventory value calculation device, computer equipment and a storage medium. The method comprises the following steps: when inventory transaction flow data pushed by a target service system exists in the message middleware, pulling the inventory transaction flow data, acquiring service scene identification information of the inventory transaction flow data, and matching a target inventory value calculation rule from a plurality of inventory value calculation rules preconfigured in a service rule pool according to the service scene identification information; and calculating the inventory transaction flow data according to the target inventory value calculation rule to obtain the inventory value of the inventory transaction flow data. The embodiment of the invention can automatically adapt the stock value calculation scheme of the pricing rule according to different service scenes, thereby realizing accurate stock value calculation.

Description

Stock value calculation method, stock value calculation device, computer equipment and storage medium
Technical Field
The present application relates to the field of inventory management, and in particular, to an inventory value calculation method, apparatus, computer device, and storage medium.
Background
With the development of intelligent retail, especially the development of intelligent retail in an online-offline fusion mode, the demand for inventory management of commodities is higher and higher. Daily inventory transactions such as stocking, selling, returning, cross-company transfer and the like all bring about increase and decrease of commodity inventory and floating of inventory cost. For complicated service scenes, how to accurately calculate the inventory value and the inventory cost becomes a problem to be solved urgently.
Traditional stock value calculation adopts a single rule to calculate, such as a moving average price method and the like, however, real service scenes are numerous, the stock value cannot be accurately calculated by a single pricing method, and different stock value calculation rules cannot be executed according to different service characteristics.
Therefore, an inventory value calculation scheme capable of automatically adapting pricing rules according to different service scenarios is urgently needed, so that the calculated inventory value and transaction cost are more accurate.
Disclosure of Invention
Aiming at the defects or shortcomings, the invention provides a stock value calculation method, a device, computer equipment and a storage medium.
The present invention provides, according to a first aspect, a method of inventory value calculation, which, in one embodiment, includes:
when inventory transaction flow data pushed by a target business system exists in the message middleware, pulling the inventory transaction flow data; the target business system is any one of a plurality of business systems butted by the message middleware;
acquiring service scene identification information of the inventory transaction flow data, and matching a target inventory value calculation rule from a plurality of inventory value calculation rules pre-configured in a service rule pool according to the service scene identification information;
and calculating the inventory transaction flow data according to the target inventory value calculation rule to obtain the inventory value of the inventory transaction flow data.
In one embodiment, calculating the inventory transaction flow data according to the target inventory value calculation rule to obtain the inventory value of the inventory transaction flow data includes:
determining the scene type of the inventory transaction flow data according to the service scene identification information, wherein the scene type is a non-sales ex-warehouse scene or a sales ex-warehouse scene;
when the scene type is a non-sales ex-warehouse scene, calculating the inventory transaction flow data in a real-time execution mode according to a target inventory value calculation rule to obtain the inventory value of the inventory transaction flow data;
and when the scene type is a sale warehouse-out scene, calculating the inventory transaction running water data according to the target inventory value calculation rule in a timing execution mode based on the first-in first-out queue to obtain the inventory value of the inventory transaction running water data.
In one embodiment, the calculating the inventory transaction running data according to the target inventory value calculation rule in a timing execution mode based on the first-in first-out queue to obtain the inventory value of the inventory transaction running data comprises the following steps:
creating a timing task;
analyzing and checking the inventory transaction running data by starting an analyzing and checking service in a multithread mode through a timing task;
and performing first-in first-out balance backrolling on the processed inventory transaction running data to obtain the inventory value of the inventory transaction running data.
In one embodiment, the processed inventory transaction flow data includes a plurality of balance details;
performing first-in first-out balance backrolling on the processed inventory transaction flow data, comprising:
acquiring corresponding balance details from the processed inventory transaction running data in sequence by using a specified first-in first-out dimension;
and carrying out batch occupation on the balance details acquired each time, and calculating corresponding transaction cost according to a processing result of the batch occupation.
In one embodiment, the batch occupation of the balance details acquired each time includes:
based on the appointed field, performing reverse sequencing on the balance details acquired each time to obtain a to-be-batched occupation list;
acquiring balance details item by item from the occupation list to be batched;
comparing the balance quantity of the day with the obtained warehouse-in quantity of the balance details,
when the daily balance amount is larger than the warehousing amount of the obtained balance details, the obtained balance details are occupied;
and when the daily balance quantity is not more than the obtained warehousing quantity of the balance details, ending the batch occupation process.
In one embodiment, the method further comprises: and after the transaction cost of the balance detail obtained each time is calculated, the balance is proportionally distributed to the material voucher for selling and delivering according to the total amount of delivering.
In one embodiment, the material voucher for sale and delivery is proportionally distributed according to the total delivery amount, and comprises the following components:
inquiring all the material vouchers which are delivered from the warehouse, and grouping according to the types of the material vouchers;
and proportionally allocating the total amount of money out of the warehouse according to the material voucher types, and updating the allocated amount of money out of the warehouse of the material voucher in the corresponding material voucher type.
The present invention provides according to a second aspect an inventory value calculation apparatus, which in one embodiment comprises:
the pull module is used for pulling the stock transaction flow data when the stock transaction flow data pushed by the target business system exists in the message middleware; the target business system is any one of a plurality of business systems butted by the message middleware;
the rule matching module is used for acquiring service scene identification information of the inventory transaction flow data and matching a target inventory value calculation rule from a plurality of inventory value calculation rules pre-configured in the service rule pool according to the service scene identification information;
and the inventory value calculation module is used for calculating the inventory transaction flow data according to the target inventory value calculation rule to obtain the inventory value of the inventory transaction flow data.
The present invention provides according to a third aspect a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of an embodiment of any of the methods described above when executing the computer program.
The present invention provides according to a fourth aspect a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the embodiments of the method of any one of the above.
In the embodiment of the invention, when the inventory transaction flow data pushed by a target business system exists in the message middleware, the inventory transaction flow data is pulled, the business scene identification information of the inventory transaction flow data is obtained, and a target inventory value calculation rule is matched from a plurality of inventory value calculation rules preconfigured in a business rule pool according to the business scene identification information; and calculating the inventory transaction flow data according to the target inventory value calculation rule to obtain the inventory value of the inventory transaction flow data. The embodiment of the invention can automatically adapt the stock value calculation scheme of the pricing rule according to different service scenes, thereby realizing accurate stock value calculation.
Drawings
FIG. 1 is a diagram of an application environment for a method of inventory value calculation, in one embodiment;
FIG. 2 is a schematic flow chart diagram illustrating a method for inventory value calculation, according to one embodiment;
FIG. 3 is a business process diagram of a method for inventory value calculation, in one embodiment;
FIG. 4 is a flow diagram illustrating a process for calculating rules for calculating value of inventory in real time, according to one embodiment;
FIG. 5 is a block diagram illustrating an exemplary processing architecture for timing calculations;
FIG. 6 is a flow diagram illustrating the process flow of batch occupancy in one embodiment;
FIG. 7 is a diagram of an example of a batch occupancy in one embodiment;
FIG. 8 is a schematic diagram of another example of batch occupancy in one embodiment;
FIG. 9 is inventory transaction flow data in one application embodiment;
FIG. 10 is a pending occupancy list in an application embodiment;
FIG. 11 is a processing result of batch occupation in one embodiment;
FIG. 12 shows the result of a transaction cost calculation process in one embodiment;
FIG. 13 is a result of a process for accounting for historical transaction costs in one embodiment of an application;
FIG. 14 is a flowchart illustrating the processing of step S3 in an exemplary embodiment;
FIG. 15 is a block diagram of an inventory value computing device, in one embodiment;
FIG. 16 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The invention provides an inventory value calculation method. In the present embodiment, the stock value calculation method can be applied to the application environment shown in fig. 1. The message middleware 20 is connected to a plurality of service systems (e.g. 11, 12, 1N in fig. 1), each service system pushes inventory transaction flow data in its own system to the message middleware 20, the inventory value calculation server 30 monitors the message middleware 20, when it is monitored that inventory transaction flow data pushed by a target service system (any one of the plurality of service systems) exists in the message middleware 20, pulls the inventory transaction flow data, obtains service scenario identification information of the inventory transaction flow data, and matches a target inventory value calculation rule from a plurality of inventory value calculation rules preconfigured in the service rule pool according to the service scenario identification information; and calculating the inventory transaction flow data according to the target inventory value calculation rule to obtain the inventory value of the inventory transaction flow data, so that an inventory value calculation scheme for automatically adapting to pricing rules according to different service scenes is realized, and accurate inventory value calculation is realized. The inventory value calculation server 30 may be implemented as a stand-alone server or a server cluster including a plurality of servers.
The inventory value calculation method provided by the present embodiment includes the steps shown in fig. 2, and the following description will take the example of the application of the method to the inventory value calculation server (hereinafter, simply referred to as calculation server) in fig. 1.
S110: when inventory transaction flow data pushed by a target business system is monitored to exist in the message middleware, the inventory transaction flow data is pulled, and the target business system refers to any one of a plurality of business systems which are in butt joint with the message middleware.
In this embodiment, when the computing server monitors that the message middleware has the stock transaction running data, the computing server pulls the message middleware to the server for processing.
S120: acquiring service scene identification information of the inventory transaction flow data, and matching a target inventory value calculation rule from a plurality of inventory value calculation rules pre-configured in a service rule pool according to the service scene identification information.
In this embodiment, a service person may allocate a unique service scene identifier to each service scene according to actual usage requirements, configure a corresponding inventory value calculation rule for each service scene, form an inventory value calculation service rule pool (hereinafter referred to as a "service rule pool"), and develop execution logic of each inventory value calculation rule.
S130: and calculating the inventory transaction flow data according to the target inventory value calculation rule to obtain the inventory value of the inventory transaction flow data.
In this embodiment, inventory transactions of different service scenarios are analyzed by the configurable service rule pool and then matched with different inventory value calculation rules, so that different modes of inventory value calculation can be performed based on different inventory value calculation rules.
In the embodiment, a calculation server monitors message middleware, pulls inventory transaction flow data when inventory transaction flow data pushed by a target service system exists in the message middleware, acquires service scene identification information of the inventory transaction flow data, and matches a target inventory value calculation rule from a plurality of inventory value calculation rules preconfigured in a service rule pool according to the service scene identification information; and calculating the inventory transaction flow data according to the target inventory value calculation rule to obtain the inventory value of the inventory transaction flow data. The embodiment of the invention can automatically adapt the stock value calculation scheme of the pricing rule according to different service scenes, thereby realizing accurate stock value calculation.
In one embodiment, calculating the inventory transaction flow data according to the target inventory value calculation rule to obtain the inventory value of the inventory transaction flow data includes:
determining the scene type of the inventory transaction flow data according to the service scene identification information, wherein the scene type is a non-sales ex-warehouse scene or a sales ex-warehouse scene;
when the scene type is a non-sales ex-warehouse scene, calculating the inventory transaction flow data in a real-time execution mode according to a target inventory value calculation rule to obtain the inventory value of the inventory transaction flow data;
and when the scene type is a sale warehouse-out scene, calculating the inventory transaction running water data according to the target inventory value calculation rule in a timing execution mode based on the first-in first-out queue to obtain the inventory value of the inventory transaction running water data.
The embodiment provides two modes of calculating the inventory value in real time and in a timing mode. Two scene types, namely a non-sales ex-warehouse scene or a sales ex-warehouse scene, are preset, data belonging to the non-sales ex-warehouse scene are calculated in real time, and data belonging to the sales ex-warehouse scene are calculated in a timing mode.
Illustratively, referring to fig. 3, the present example creates a business rule pool based on a pooling technical idea, through which a flexible switching service of an inventory value calculation rule can be provided, wherein, the inventory value calculation rule is matched based on the business rule pool, the inventory value real-time calculation is performed when the scene type is a non-sales warehouse-out scene, and the inventory value timing calculation is provided once a period of time (every day) based on a FIFO (first in first out) when the scene type is a sales warehouse-out scene.
When the inventory value calculation rule is matched, the target inventory value calculation rule is matched from the business rule pool according to information such as a source system (namely a target business system) of the inventory transaction flow, the business type and the like, and the inventory value is calculated based on the matched target inventory value calculation rule. The information for matching the target inventory value calculation rule may be set according to a specific scenario, for example, the information may include, in addition to the source system and the service type, an posting type, an in-out status, an in-out identification, whether the information is an AB initial supplier, an order type, a transfer type determination, a fresh liability assignment identification, and the like.
When calculating the stock value, each stock value calculation rule has corresponding execution logic (or called execution flow).
For example, taking the matched target inventory value calculation rule as an example of an inter-company pricing strategy, the execution flow of the real-time calculation is as follows:
1. calling a main data interface to obtain basic information such as the rate of addition, the exchange rate, the brand of the commodity, description, supply price, tax rate, tax code, transaction currency, regular discount, irregular discount and the like;
2. the calculation is performed according to the steps and formulas shown in fig. 4.
For another example, taking the matched target inventory value calculation rule as an example of a sales return original bill retroactive pricing strategy, the execution flow of the real-time calculation is as follows: and inquiring the original order, and calculating the warehousing value of the current sales returned order based on the ex-warehouse value and the commodity quantity of the original order.
Further, the flow of execution of the timing calculation is described below.
In one embodiment, the calculating the inventory transaction running data according to the target inventory value calculation rule in a timing execution mode based on the first-in first-out queue to obtain the inventory value of the inventory transaction running data comprises the following steps:
creating a timing task; analyzing and checking the inventory transaction running data by starting an analyzing and checking service in a multithread mode through a timing task; and performing first-in first-out balance backrolling on the processed inventory transaction running data to obtain the inventory value of the inventory transaction running data.
In this embodiment, the processed inventory transaction flow data includes a plurality of balance details.
For example, referring to fig. 5, when the stock value is calculated in a timed execution manner based on the first-in first-out queue, a timed task may be created according to specific requirements, and corresponding processing logic is executed by the timed task. The analysis and verification processing is carried out on the inventory transaction running data by starting analysis and verification service in a multithread mode, and a verification result is pushed to a value estimation module through an MQ (Message Queue) module to carry out FIFO balance backtracking.
In one embodiment, the first-in first-out balance backrolling is performed on the processed inventory transaction running data, and the method comprises the following steps:
acquiring corresponding balance details from the processed inventory transaction running data in sequence by using a specified first-in first-out dimension;
and carrying out batch occupation on the balance details acquired each time, and calculating corresponding transaction cost according to a processing result of the batch occupation.
The designated first-in first-out dimension may be set according to a specific scenario, and may be, for example, "accounting unit," commodity, "and" supplier. The accounting unit is an independent unit for performing inventory cost accounting, and generally corresponds to an independent company or a subsidiary company thereof, which needs to perform independent inventory cost accounting.
For example, referring to fig. 6, the step of performing batch occupation on the balance details acquired each time specifically includes: based on the appointed field, performing reverse sequencing on the balance details acquired each time to obtain a to-be-batched occupation list; acquiring balance details item by item from the occupation list to be batched; comparing the daily balance quantity with the obtained warehousing quantity of the balance details, and occupying the obtained balance details when the daily balance quantity is larger than the obtained warehousing quantity of the balance details; and when the daily balance quantity is not more than the obtained warehousing quantity of the balance details, ending the batch occupation process.
The processing procedure of occupying the obtained balance details may refer to two examples shown in fig. 7 and fig. 8. It should be noted that, for convenience of understanding the occupation process, in the example shown in fig. 7, it is assumed that field values of fields of each balance detail during accounting, an accounting unit, a place, a stock position, a commodity, a supplier, and the like are all the same; in the example shown in fig. 8, it is assumed that the initial balance amount is 0, and it is assumed that field values of fields of each balance detail during accounting, an accounting unit, a place, a stock, a commodity, a supplier, and the like are all the same. Wherein the accounting period can be understood as the posting date of the inventory transaction requiring the same day of accounting, and YYYMMDD format, such as 20210906, 20210907, etc
The end amount is calculated after the end of the occupation, specifically, the end amount ∑ batch occupation amount, thereby deriving the current day transaction cost. The calculation formula can be shown in fig. 9, and the definition of each element in the formula is as follows:
a: accounting the initial balance of the dimension of the unit, the commodity and the supplier;
b: accounting unit + commodity + warehousing total amount of supplier dimension;
c: accounting for end of term balances for unit + goods + supplier dimensions;
d: accounting unit + commodity + ex-warehouse quantity for supplier dimension.
In one embodiment, the method further comprises: and after the transaction cost of the balance detail obtained each time is calculated, the balance is proportionally distributed to the material voucher for selling and delivering according to the total amount of delivering.
Wherein, according to the total amount of money of going out of warehouse apportionment for selling the material voucher of going out of warehouse in proportion, include: inquiring all the material vouchers which are delivered from the warehouse, and grouping according to the types of the material vouchers; and proportionally allocating the total amount of money out of the warehouse according to the material voucher types, and updating the allocated amount of money out of the warehouse of the material voucher in the corresponding material voucher type.
In order to more fully explain the inventory calculation method provided by the present application, an application example is provided below for explanation.
(ii) stock transaction input (assuming initial balance: 0; single currency RMB)
The entered balance list is shown in fig. 9.
And secondly, 4 fields such as batch occupation priority, accounting period, inventory transaction posting time, inventory transaction serial number and the like are sorted in a reverse order to obtain a to-be-batched occupation list shown in the figure 10 (assuming that the batch occupation priority, the accounting period and the inventory transaction posting time are all consistent).
Calculating the batch occupation and the end amount
The result of the batch occupation is shown in fig. 11, wherein the four elements refer to the priority of the batch occupation, the accounting period, the posting time of the inventory transaction, and the serial number of the inventory transaction.
Calculating the occupied sum of the end sum sigma batch 46800+0 sum 46800
Calculating trade cost
The calculation result is shown in fig. 12, in which the calculation process of the transaction cost amount is as follows:
transaction cost amount (initial balance + total amount of warehousing-total balance-total amount of ex warehouse)/number of ex warehouse (0+72000-
Fifthly, accounting the historical transaction cost
The processing results are shown in fig. 13.
Material voucher for selling and delivering warehouse according to the proportion of total amount of warehouse-out
The treatment process is as follows:
s1: and inquiring all the material certificates which are delivered from the warehouse, and grouping according to the type of the material certificates.
S2: and (4) proportionally distributing the total amount of the warehouse according to the material voucher types (note: the last material voucher type does not participate in the distribution and is only used for tail-end difference processing).
The allocation formula is as follows: FJw ROUNDDOWN (Sw/Sz Jz)
Wherein FJw indicates the apportioned amount of the material voucher type, Sw indicates the total ex-warehouse amount of the material voucher type, Sz indicates the total ex-warehouse amount of the current accounting dimension (i.e., accounting period + accounting unit + commodity + supplier, the same shall apply hereinafter), and Jz indicates the total ex-warehouse amount of the current accounting dimension.
Considering that there will be tail differences after the split, i.e. Jz-sigma FJw >0, tail difference processing is needed.
The treatment method comprises the following steps: FJw (last) ═ Jz- Σ FJw
S3: updating the outbound amount of the material voucher within the corresponding material voucher type apportioned at S2.
Referring to fig. 14, the processing flow of S3 specifically includes the following steps:
s3.1: calculating tail differences in corresponding material voucher types, and executing (S3.2: amount allocation, when there is no material voucher for selling out of the warehouse, execute [ S3.2: tail difference treatment ].
Wherein, the calculation formula of the tail difference is as follows: TJw-FJw-Jw.
TJw in the formula refers to the tail amount in the material voucher type, FJw refers to the apportioned amount of the material voucher type, and Jw refers to the ex-warehouse amount in the material voucher type.
S3.2: and (4) the amount of the material certificate sold out of the warehouse is shared.
Formula for apportioning amount of material to be sold out of warehouse (apportioned according to quantity)
The ex-warehouse amount allocation formula is as follows: jow ROUNDDOWN (Sxs/Sxsz TJw)
Jow in the formula indicates the amount of the allocated ex-warehouse, TJw indicates the amount of the tail difference in the material voucher type, Sxsz indicates the total amount of the sold out-warehouse of the material voucher type, Sxs indicates the amount of the sold out-warehouse of the material voucher
The average price calculation formula of the material certificate sold out of the warehouse is as follows:
average price calculation formula: JJw ROUNDHALFUP (Jow/Sxs)
JJw in the formula refers to the average price of the material voucher, Jow refers to the amount of the allocated ex-warehouse, and Sxs refers to the number of sales ex-warehouse of the material voucher.
When the split is complete, there is a tail difference, i.e., TJw-sigma Jow! Step3-3 tail difference processing is performed when the value is 0
S3.3: and (5) tail difference processing.
And taking a first material voucher based on the type of the currently processed material voucher, and generating a tail difference line based on the material voucher and the tail difference.
FIG. 2 is a flow diagram of a method of inventory value calculation, according to one embodiment. It should be understood that, although the steps in the flowchart of fig. 2 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 2 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
Based on the same inventive concept, the invention also provides an inventory value calculating device. In the present embodiment, as shown in fig. 15, the stock value calculation means includes the following modules:
the pulling module 110 is configured to pull the stock transaction flow data when it is monitored that the stock transaction flow data pushed by the target service system exists in the message middleware; the target business system is any one of a plurality of business systems butted by the message middleware;
the rule matching module 120 is configured to obtain service scenario identification information of the inventory transaction flow data, and match a target inventory value calculation rule from multiple inventory value calculation rules preconfigured in the service rule pool according to the service scenario identification information;
and the inventory value calculation module 130 is configured to calculate the inventory transaction flow data according to the target inventory value calculation rule, so as to obtain the inventory value of the inventory transaction flow data.
In one embodiment, an inventory value calculation module, comprising:
the scene type determining submodule is used for determining the scene type of the inventory transaction flow data according to the service scene identification information, wherein the scene type is a non-sales ex-warehouse scene or a sales ex-warehouse scene;
the first calculation submodule is used for calculating the inventory transaction flow data according to the target inventory value calculation rule in a real-time execution mode when the scene type is a non-sales ex-warehouse scene to obtain the inventory value of the inventory transaction flow data;
and the second calculation submodule is used for calculating the inventory transaction running data according to the target inventory value calculation rule in a timing execution mode based on the first-in first-out queue when the scene type is a sales delivery scene to obtain the inventory value of the inventory transaction running data.
In one embodiment, the second computation submodule includes:
a creating unit configured to create a timing task;
the checking unit is used for starting analysis and check service in a multithread mode through the timing task to carry out analysis and check processing on the inventory transaction running data;
and the balance back rolling unit is used for carrying out first-in first-out balance back rolling on the processed inventory business flow data to obtain the inventory value of the inventory business flow data.
In one embodiment, the processed inventory transaction flow data includes a plurality of balance details.
Correspondingly, the balance back-rolling unit is specifically configured to, when configured to perform first-in first-out balance back-rolling on the processed stock transaction running data, sequentially acquire corresponding balance details from the processed stock transaction running data in a specified first-in first-out dimension, perform batch occupation on the balance details acquired each time, and calculate a corresponding transaction cost according to a processing result of the batch occupation.
In one embodiment, the balance back-rolling unit is specifically configured to perform reverse ordering on the balance details acquired each time based on a specified field when the balance details acquired each time are subjected to batch occupation to obtain a to-be-batch occupation list; acquiring balance details item by item from the occupation list to be batched; comparing the daily balance quantity with the obtained warehousing quantity of the balance details, and occupying the obtained balance details when the daily balance quantity is larger than the obtained warehousing quantity of the balance details; and when the daily balance quantity is not more than the obtained warehousing quantity of the balance details, ending the batch occupation process.
In one embodiment, the apparatus further comprises a apportioning module. And the apportionment module is used for apportioning the material voucher for selling and delivering the materials out of the warehouse according to the total amount of the materials out of the warehouse after calculating the transaction cost of the balance detail obtained each time.
In one embodiment, the apportioning module includes:
the voucher inquiry submodule is used for inquiring all the material vouchers which are delivered from the warehouse and grouping the voucher according to the types of the material vouchers;
and the apportionment submodule is used for apportioning the total amount of the warehouse according to the material voucher types and updating the amount of the warehouse which is apportioned and corresponds to the material voucher types.
For specific limitations of the inventory value calculating device, reference may be made to the above limitations of the inventory value calculating method, which are not described herein again. The respective modules in the stock value calculation apparatus described above may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, the internal structure of which may be as shown in fig. 16.
The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data such as balance details, material certificates and the like, and the specific stored data can also refer to the limitations in the above method embodiments. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an inventory value calculation method.
Those skilled in the art will appreciate that the architecture shown in fig. 16 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
The embodiment also provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the following steps are implemented:
when inventory transaction flow data pushed by a target business system exists in the message middleware, pulling the inventory transaction flow data; the target business system is any one of a plurality of business systems butted by the message middleware; acquiring service scene identification information of the inventory transaction flow data, and matching a target inventory value calculation rule from a plurality of inventory value calculation rules pre-configured in a service rule pool according to the service scene identification information; and calculating the inventory transaction flow data according to the target inventory value calculation rule to obtain the inventory value of the inventory transaction flow data.
In one embodiment, when the processor executes the computer program to realize the calculation of the inventory transaction flow data according to the target inventory value calculation rule to obtain the inventory value of the inventory transaction flow data, the following steps are further realized:
determining the scene type of the inventory transaction flow data according to the service scene identification information, wherein the scene type is a non-sales ex-warehouse scene or a sales ex-warehouse scene; when the scene type is a non-sales ex-warehouse scene, calculating the inventory transaction flow data in a real-time execution mode according to a target inventory value calculation rule to obtain the inventory value of the inventory transaction flow data; and when the scene type is a sale warehouse-out scene, calculating the inventory transaction running water data according to the target inventory value calculation rule in a timing execution mode based on the first-in first-out queue to obtain the inventory value of the inventory transaction running water data.
In one embodiment, the processor executes a computer program to realize the calculation of the inventory transaction running data according to the target inventory value calculation rule in a timing execution mode based on the first-in first-out queue, and when the inventory value of the inventory transaction running data is obtained, the following steps are further realized:
creating a timing task; analyzing and checking the inventory transaction running data by starting an analyzing and checking service in a multithread mode through a timing task; and performing first-in first-out balance backrolling on the processed inventory transaction running data to obtain the inventory value of the inventory transaction running data.
In one embodiment, the processed inventory transaction flow data includes a plurality of balance details; the processor executes the computer program to realize the following steps when the first-in first-out balance backrolling is carried out on the processed inventory transaction running data:
acquiring corresponding balance details from the processed inventory transaction running data in sequence by using a specified first-in first-out dimension; and carrying out batch occupation on the balance details acquired each time, and calculating corresponding transaction cost according to a processing result of the batch occupation.
In one embodiment, the processor executes a computer program to realize batch occupation of the balance details acquired each time, and further realizes the following steps:
based on the appointed field, performing reverse sequencing on the balance details acquired each time to obtain a to-be-batched occupation list; acquiring balance details item by item from the occupation list to be batched; comparing the daily balance quantity with the obtained warehousing quantity of the balance details, and occupying the obtained balance details when the daily balance quantity is larger than the obtained warehousing quantity of the balance details; and when the daily balance quantity is not more than the obtained warehousing quantity of the balance details, ending the batch occupation process.
In one embodiment, the processor executes the computer program and further performs the steps of:
and after the transaction cost of the balance detail obtained each time is calculated, the balance is proportionally distributed to the material voucher for selling and delivering according to the total amount of delivering.
In one embodiment, when the processor executes the computer program and realizes the material voucher which is sold out of the warehouse according to the proportion of the total amount of the warehouse out, the following steps are also realized:
inquiring all the material vouchers which are delivered from the warehouse, and grouping according to the types of the material vouchers; and proportionally allocating the total amount of money out of the warehouse according to the material voucher types, and updating the allocated amount of money out of the warehouse of the material voucher in the corresponding material voucher type.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
when inventory transaction flow data pushed by a target business system exists in the message middleware, pulling the inventory transaction flow data; the target business system is any one of a plurality of business systems butted by the message middleware; acquiring service scene identification information of the inventory transaction flow data, and matching a target inventory value calculation rule from a plurality of inventory value calculation rules pre-configured in a service rule pool according to the service scene identification information; and calculating the inventory transaction flow data according to the target inventory value calculation rule to obtain the inventory value of the inventory transaction flow data.
In one embodiment, the computer program executed by the processor, when calculating the inventory transaction flow data according to the target inventory value calculation rule to obtain the inventory value of the inventory transaction flow data, further implements the following steps:
determining the scene type of the inventory transaction flow data according to the service scene identification information, wherein the scene type is a non-sales ex-warehouse scene or a sales ex-warehouse scene; when the scene type is a non-sales ex-warehouse scene, calculating the inventory transaction flow data in a real-time execution mode according to a target inventory value calculation rule to obtain the inventory value of the inventory transaction flow data; and when the scene type is a sale warehouse-out scene, calculating the inventory transaction running water data according to the target inventory value calculation rule in a timing execution mode based on the first-in first-out queue to obtain the inventory value of the inventory transaction running water data.
In one embodiment, the computer program is executed by a processor, and when the inventory value of the inventory transaction running data is obtained by calculating the inventory transaction running data according to the target inventory value calculation rule in a timing execution mode based on the first-in first-out queue, the following steps are further implemented:
creating a timing task; analyzing and checking the inventory transaction running data by starting an analyzing and checking service in a multithread mode through a timing task; and performing first-in first-out balance backrolling on the processed inventory transaction running data to obtain the inventory value of the inventory transaction running data.
In one embodiment, the processed inventory transaction flow data includes a plurality of balance details; the computer program is executed by the processor, when the first-in first-out balance backrolling is carried out on the processed inventory transaction running data, the following steps are also realized:
acquiring corresponding balance details from the processed inventory transaction running data in sequence by using a specified first-in first-out dimension; and carrying out batch occupation on the balance details acquired each time, and calculating corresponding transaction cost according to a processing result of the batch occupation.
In one embodiment, the computer program is executed by a processor, and when performing batch occupation on the balance details acquired each time, further performs the following steps:
based on the appointed field, performing reverse sequencing on the balance details acquired each time to obtain a to-be-batched occupation list; acquiring balance details item by item from the occupation list to be batched; comparing the daily balance quantity with the obtained warehousing quantity of the balance details, and occupying the obtained balance details when the daily balance quantity is larger than the obtained warehousing quantity of the balance details; and when the daily balance quantity is not more than the obtained warehousing quantity of the balance details, ending the batch occupation process.
In one embodiment, the computer program is executed by a processor and further implements the steps of:
and after the transaction cost of the balance detail obtained each time is calculated, the balance is proportionally distributed to the material voucher for selling and delivering according to the total amount of delivering.
In one embodiment, when the computer program is executed by the processor and proportionally distributes the material voucher for sale of the warehouse according to the total amount of the warehouse, the following steps are further realized:
inquiring all the material vouchers which are delivered from the warehouse, and grouping according to the types of the material vouchers; and proportionally allocating the total amount of money out of the warehouse according to the material voucher types, and updating the allocated amount of money out of the warehouse of the material voucher in the corresponding material voucher type.
It will be understood by those skilled in the art that all or part of the processes of the embodiments of the methods described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the computer program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for inventory value calculation, the method comprising:
when inventory transaction flow data pushed by a target business system exists in the message middleware, pulling the inventory transaction flow data; the target business system is any one of a plurality of business systems which are butted by the message middleware;
acquiring service scene identification information of the inventory transaction flow data, and matching a target inventory value calculation rule from a plurality of inventory value calculation rules preconfigured in a service rule pool according to the service scene identification information;
and calculating the inventory transaction flow data according to the target inventory value calculation rule to obtain the inventory value of the inventory transaction flow data.
2. The method of claim 1, wherein said calculating the inventory transaction running data according to the target inventory value calculation rule to obtain the inventory value of the inventory transaction running data comprises:
determining the scene type of the inventory transaction flow data according to the service scene identification information, wherein the scene type is a non-sales ex-warehouse scene or a sales ex-warehouse scene;
when the scene type is a non-sales ex-warehouse scene, calculating the inventory transaction flow data in a real-time execution mode according to the target inventory value calculation rule to obtain the inventory value of the inventory transaction flow data;
and when the scene type is a sale warehouse-out scene, calculating the inventory transaction running water data according to the target inventory value calculation rule in a timing execution mode based on a first-in first-out queue to obtain the inventory value of the inventory transaction running water data.
3. The method of claim 2, wherein the computing the inventory transaction running data according to the target inventory value computation rule in a timed execution manner based on a first-in-first-out queue to obtain the inventory value of the inventory transaction running data comprises:
creating a timing task;
analyzing and checking the inventory transaction running data by starting an analyzing and checking service in a multithread mode through the timing task;
and performing first-in first-out balance backrolling on the processed inventory transaction running data to obtain the inventory value of the inventory transaction running data.
4. The method of claim 3, wherein the processed inventory transaction flow data comprises a plurality of balance details;
the first-in first-out balance backrolling of the processed inventory transaction running data comprises the following steps:
acquiring corresponding balance details from the processed inventory transaction running data in sequence by using a specified first-in first-out dimension;
and carrying out batch occupation on the balance details acquired each time, and calculating corresponding transaction cost according to a processing result of the batch occupation.
5. The method of claim 4, wherein the performing a batch occupation of each obtained balance detail comprises:
based on the appointed field, performing reverse sequencing on the balance details acquired each time to obtain a to-be-batched occupation list;
acquiring balance details one by one from the occupation list of the waiting batch;
comparing the balance quantity of the day with the obtained warehouse-in quantity of the balance details,
when the daily balance amount is larger than the warehousing amount of the obtained balance details, occupying the obtained balance details;
and when the daily balance quantity is not more than the obtained warehousing quantity of the balance details, ending the batch occupation process.
6. The method of claim 4, wherein the method further comprises:
and after the transaction cost of the balance detail obtained each time is calculated, the balance is proportionally distributed to the material voucher for selling and delivering according to the total amount of delivering.
7. The method of claim 6, wherein said apportioning material vouchers for sale out of the warehouse based on the total amount of the out of the warehouse comprises:
inquiring all the material vouchers which are delivered from the warehouse, and grouping according to the types of the material vouchers;
and proportionally allocating the total amount of money out of the warehouse according to the material voucher types, and updating the allocated amount of money out of the warehouse of the material voucher in the corresponding material voucher type.
8. An inventory value calculation device, the device comprising:
the pull module is used for pulling the stock transaction flow data when the stock transaction flow data pushed by the target business system exists in the message middleware; the target business system is any one of a plurality of business systems which are butted by the message middleware;
the rule matching module is used for acquiring service scene identification information of the inventory transaction flow data and matching a target inventory value calculation rule from a plurality of inventory value calculation rules preconfigured in a service rule pool according to the service scene identification information;
and the inventory value calculation module is used for calculating the inventory transaction flow data according to the target inventory value calculation rule to obtain the inventory value of the inventory transaction flow data.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 7 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202111443960.1A 2021-11-30 2021-11-30 Stock value calculation method, stock value calculation device, computer equipment and storage medium Pending CN114186925A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111443960.1A CN114186925A (en) 2021-11-30 2021-11-30 Stock value calculation method, stock value calculation device, computer equipment and storage medium
CA3183615A CA3183615A1 (en) 2021-11-30 2022-11-30 Inventory value calculation method, stock value calculation device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111443960.1A CN114186925A (en) 2021-11-30 2021-11-30 Stock value calculation method, stock value calculation device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114186925A true CN114186925A (en) 2022-03-15

Family

ID=80541799

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111443960.1A Pending CN114186925A (en) 2021-11-30 2021-11-30 Stock value calculation method, stock value calculation device, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN114186925A (en)
CA (1) CA3183615A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116993272A (en) * 2023-09-27 2023-11-03 罗普特科技集团股份有限公司 Logistics management method and system based on video monitoring and RFID

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116993272A (en) * 2023-09-27 2023-11-03 罗普特科技集团股份有限公司 Logistics management method and system based on video monitoring and RFID
CN116993272B (en) * 2023-09-27 2023-12-26 罗普特科技集团股份有限公司 Logistics management method and system based on video monitoring and RFID

Also Published As

Publication number Publication date
CA3183615A1 (en) 2023-05-30

Similar Documents

Publication Publication Date Title
Torabi et al. Fulfillment source allocation, inventory transshipment, and customer order transfer in e-tailing
CN106485558B (en) Commodity object pre-sale information processing method and device
CN106709774B (en) Commodity object transaction information processing method and device
CN112001681B (en) Warehouse management method, device, platform and computer readable storage medium
CN109961306B (en) Method and device for distributing inventory of articles
CN111260274A (en) Method and system for secondary inventory distribution
CN108108933B (en) Storage position distribution method and device
CN107886399A (en) A kind of cloud storehouse order processing system for the retail of full channel
US8069086B2 (en) Systems and methods for time-dependent protection of available quantities
CN113537861B (en) Goods supplementing method and goods supplementing device
CN110264133A (en) Vehicle deploying method, apparatus, computer equipment and storage medium
CN114186925A (en) Stock value calculation method, stock value calculation device, computer equipment and storage medium
Karaenke et al. Non-monetary coordination mechanisms for time slot allocation in warehouse delivery
CN113592382A (en) Order processing method and device, computer readable storage medium and processor
WO2023202326A1 (en) Data processing method and related apparatus
CN112465427A (en) Delivery plan generation method, system and terminal based on purchase demand
CN112200517A (en) Inventory information updating method and device, computer equipment and storage medium
CN115713200A (en) Method and device for processing inventory allocation, order processing and scheduling data
CN111260281A (en) Task processing method and device, electronic equipment and computer readable storage medium
CN111047248A (en) Resource transfer method, device, server and storage medium
CN114219247A (en) Processing method and device of equipment consumables, computer equipment and storage medium
CN111582780B (en) Commodity purchase waiting channel construction method, device, server and storage medium
CN112232953A (en) Bond transaction prepayment method, device, equipment and storage medium
CN112163809B (en) Inventory checking method, inventory checking device, computer equipment and storage medium
CN117035623B (en) Vehicle inventory control early warning method based on circulation quantity prediction and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination