CN106096987A - A kind of real-time recursive calculation cost and the JXC System of profit and method - Google Patents

A kind of real-time recursive calculation cost and the JXC System of profit and method Download PDF

Info

Publication number
CN106096987A
CN106096987A CN201610459931.7A CN201610459931A CN106096987A CN 106096987 A CN106096987 A CN 106096987A CN 201610459931 A CN201610459931 A CN 201610459931A CN 106096987 A CN106096987 A CN 106096987A
Authority
CN
China
Prior art keywords
commodity
stocking
stock
profit
shipment
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
CN201610459931.7A
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.)
Shanghai Kingnew Information Technology Co Ltd
Original Assignee
Shanghai Kingnew Information 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 Shanghai Kingnew Information Technology Co Ltd filed Critical Shanghai Kingnew Information Technology Co Ltd
Priority to CN201610459931.7A priority Critical patent/CN106096987A/en
Publication of CN106096987A publication Critical patent/CN106096987A/en
Pending legal-status Critical Current

Links

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
    • G06Q30/00Commerce
    • G06Q30/01Customer relationship services
    • G06Q30/015Providing customer assistance, e.g. assisting a customer within a business location or via helpdesk
    • G06Q30/016After-sales
    • 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/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0605Supply or demand aggregation
    • 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/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a kind of real-time recursive calculation cost and the JXC System of profit and method, wherein, described system includes tables of data logging modle and computing module, described tables of data logging modle includes stocking up tables of data set, type of stocking up set, stock withdrawal data table set, shipment type set and entering pin contingency table, and described computing module includes cost calculation unit and profit computing unit.A kind of real-time recursive calculation cost that the present invention provides and the JXC System of profit and method, it is achieved merchandise cost and the accurate calculating of profit.

Description

A kind of real-time recursive calculation cost and the JXC System of profit and method
Technical field
The present invention relates to goods entry, stock and sales technical field, be specifically related to a kind of real-time recursive calculation cost and the goods entry, stock and sales system of profit System and method.
Background technology
In order to meet the various demands of client, reduce the operation cost of enterprise of retail shop, the typically company of employing of enterprise of existing retail shop The mode that lock is managed, carries out artificial purchase, sales and stock management by unified to each retail shop, i.e. to the procurement of commodities of retail shop, sale, storehouse Deposit and statistics of concluding the business carries out integrated management, become effectively to reduce each retail shop and carry out respectively purchasing, to manage, to sell required operation This, but under the chain operation developing state growed in intensity, also it is flooded with various not convenient during the operation and management of retail shop Situation, the not convenient feelings that the material handling in managing with regard to shop purchase, sales and inventory below, stock-taking, the aspect such as sales management exist Condition is briefly described.
Material handling, including the aspects such as management, order management, return management and merchandise control of receiving, is mainly used in The submission of order, the arrival warehouse-in of commodity, added sales situation, the inquiry of commodity, return service, merchandise cost and profit calculate Etc. aspect.General employing special material handling personnel be managed, but traditional labor management method both wasted time and energy, the most not It is easy to preserve and inquiry complementary goods management information.
Stock-taking, mainly includes stock control and two aspects of management of making an inventory, by goods is formed form, form Mode, the data of record foreground sales situation, and according to the data of foreground sales situation, form, the form of stock are repaiied Change, update, form form, the form made an inventory, in the process, it is also desirable to substantial amounts of human and material resources, not only make work efficiency Relatively low, also easily occur to omit or typing by mistake in Data Input Process, make form, report messages accuracy relatively low.
Sales management, including the sales situation of product is managed and with sell correlation analysis decision-making.Apply to commodity originally The typing of the essential informations such as the price after body data, classification, detail, price, condition of sales, whether Discount Promotion, Discount Promotion, The aspects such as reading, amendment, there is also the technical problem that the accuracy of information is relatively low.
As can be seen here, the purchase, sales and stock management method of existing retail shop, need different staff in different on-the-spot difference Material handling, stock-taking, sales management are carried out merchandise news typing, and carry out sorting out, analyze and adding up so that goods entry, stock and sales Workflow is complex, work efficiency is relatively low in management, and the information accuracy of acquisition is relatively low.
Although prior art there is also some goods entry, stock and sales methods being applied to cell phone end, but cannot in these methods Cost and profit to commodity accurately calculate, and cause being difficult to effectively analyze to the effective sale situation of commodity.
It should be noted that introduction to technical background above be intended merely to the convenient technical scheme to the application carry out clear, Complete explanation, and facilitate the understanding of those skilled in the art to illustrate.Can not be merely because these schemes be the application's Background section is set forth and thinks that technique scheme is known to those skilled in the art.
Summary of the invention
It is an object of the invention to provide a kind of real-time recursive calculation cost and the JXC System of profit and method, permissible Improve the accuracy that merchandise news obtains, and cost and the profit of commodity can be accurately determined.
For achieving the above object, one aspect of the present invention provides a kind of real-time recursive calculation cost and the goods entry, stock and sales system of profit System, described system includes that tables of data logging modle and computing module, described tables of data logging modle include tables of data collection of stocking up Conjunction, type of stocking up set, stock withdrawal data table set, shipment type set and enter pin contingency table, described computing module includes Cost calculation unit and profit computing unit, wherein: described in each type of stocking up of stocking up in type set all stock up with described At least one in tables of data set tables of data of stocking up is associated, and each shipment type in described shipment type set is all and institute At least one the stock withdrawal data table stated in stock withdrawal data table set is associated, whenever described tables of data or the described shipment number of stocking up When there is change according to the data in table, in described stock up tables of data or described stock withdrawal data table, only write data;When described Type of stocking up in type of stocking up set produces when stocking up behavior, and the tables of data write of stocking up being associated with described type of stocking up is worked as The layer serial number that advance trader's product are corresponding, stock up unit price and quantity in;When going out in described shipment type set When goods type produces shipment behavior, the commodity that layer serial number in current stock is minimum are defined as shipment commodity, with institute State the stock withdrawal data table that shipment type is associated write shipment batch serial number corresponding to described shipment commodity, shipment unit price and Shipping Qty.;Described cost calculation unit is according to from big to small suitable of layer serial number in described tables of data set of stocking up Sequence, compares the quantity in of each batch with the quantity of commodity in current stock, and according to comparison result recursive calculation The cost of commodity in current stock, and enter in pin contingency table described in the cost write of calculating;Described profit computing unit is from institute State and stock withdrawal data table set determined goods commodity amount, and according to layer serial number in described tables of data set of stocking up from Little to big order, the quantity in of each batch is compared with described shipment commodity amount, and passs according to comparison result Return and calculate the profit corresponding with described shipment commodity amount, and enter in pin contingency table described in the profit write of calculating.
For achieving the above object, another aspect of the present invention also provides for a kind of real-time recursive calculation cost and the goods entry, stock and sales of profit Method, described method includes: when behavior is stocked up in generation, by layer serial number corresponding for commodity of currently stocking up, receiving tally Valency and quantity in write are stocked up in tables of data;When producing shipment behavior, by layer serial number in current stock Little commodity are defined as shipment commodity, and by corresponding for described shipment commodity shipment batch serial number, shipment unit price and shipment In quantity write stock withdrawal data table;According to layer serial number order from big to small in described tables of data of stocking up, by each The quantity in of batch is compared with the quantity of commodity in current stock, and according in the current stock of comparison result recursive calculation The cost of commodity, and the cost of calculating is write in pin contingency table;Goods commodity amount is determined from described stock withdrawal data table, And according to layer serial number order from small to large in described tables of data of stocking up, by the quantity in of each batch with described Shipment commodity amount is compared, and according to the comparison result recursive calculation profit corresponding with described shipment commodity amount, and Enter in pin contingency table described in the profit of calculating is write.
A kind of real-time recursive calculation cost of present invention offer and the JXC System of profit and method have the advantage that
1) present invention utilizes data list structure to valuate commodity by pen and registers detailed account and sends and surplus, it is achieved Stock up and the sequential flowing of shipment;
2) present invention is by writing data rather than more new data in tables of data, solves data list structure diversification Problem, solves in tradition JXC System high-frequency renewal stock, and what when concurrency is too high, data base cannot carry asks Topic, thus improve efficiency and the accuracy that merchandise news obtains;
3) present invention is according to the principle of first in first out, by the calculation of recurrence calculate stock cost and The profit of shipment commodity, it is possible to be accurately determined cost and the profit of commodity.
With reference to explanation hereinafter and accompanying drawing, disclose in detail the particular implementation of the application, specify the former of the application Reason can be in adopted mode.It should be understood that presently filed embodiment is not so limited in scope.In appended power In the range of the spirit and terms that profit requires, presently filed embodiment includes many changes, revises and be equal to.
The feature described for a kind of embodiment and/or illustrate can be in same or similar mode one or more Other embodiment uses, combined with the feature in other embodiment, or substitute the feature in other embodiment.
It should be emphasized that term " includes/comprises " existence referring to feature, one integral piece, step or assembly herein when using, but also It is not excluded for the existence of one or more further feature, one integral piece, step or assembly or additional.
Accompanying drawing explanation
Data in a kind of real-time recursive calculation cost that Fig. 1 provides for the application embodiment and the JXC System of profit The schematic diagram of table record module;
Fig. 2 is the flow chart calculating cost of goods on hand in the application embodiment;
Fig. 3 is the flow chart calculating trader's product profit in the application embodiment;
A kind of real-time recursive calculation cost that Fig. 4 provides for the application embodiment and the flow process of the goods entry, stock and sales method of profit Figure.
Detailed description of the invention
For the technical scheme making those skilled in the art be more fully understood that in the application, real below in conjunction with the application Execute the accompanying drawing in mode, the technical scheme in the application embodiment is clearly and completely described, it is clear that described Embodiment is only a part of embodiment of the application rather than whole embodiments.Based on the embodiment party in the application Formula, other embodiments all that those of ordinary skill in the art are obtained under not making creative work premise, all answer When the scope belonging to the application protection.
The application embodiment provides a kind of real-time recursive calculation cost and the JXC System of profit.Described system is permissible Including tables of data logging modle and computing module.A kind of recursive calculation cost in real time that Fig. 1 provides for the application embodiment and The schematic diagram of tables of data logging modle in the JXC System of profit.As it is shown in figure 1, described tables of data logging modle include into Goods tables of data set, type of stocking up set, stock withdrawal data table set, shipment type set and enter pin contingency table.Wherein, described Tables of data of stocking up set can include at least one tables of data table of stocking up, described in tables of data of stocking up such as can include stream of stocking up Water tables of data, purchasing order tables of data, funds on account tables of data of stocking up, sale returns data table, sale are removed forms data table and make an inventory Tables of data.
In the present embodiment, type of stocking up described in set can and described stock up between tables of data set set up map close System.Specifically, type of stocking up described in set can include shop stock up type, sell return of goods type, sell remove single type with And inventory profit type.For described each type of stocking up stocked up in type set, all can stock up in tables of data set with described At least one tables of data of stocking up be associated.Such as, described shop stock up type and described pipelined data table of stocking up, described in stock up Order data table and described in funds on account tables of data of stocking up be associated.So, when behavior is stocked up in generation shop, can be by described shop Paving stock up commodity of stocking up corresponding to type parameters write described in stock up pipelined data table, described purchasing order tables of data with Stock up described in and in funds on account tables of data.It is to say, whenever the described data stocked up in tables of data or described stock withdrawal data table When there is change, only write data in described stock up tables of data or described stock withdrawal data table, and number of stocking up described in not updating According to the data in table or described stock withdrawal data table.
In the present embodiment, the parameters of commodity of stocking up described in such as can include stocking up the layer sequence of commodity Row number, stock up unit price and quantity in.Wherein, can to characterize the batch of commodity of currently stocking up suitable for described layer serial number Sequence, described layer serial number can arrange from small to large according to the order stocked up.Such as, first batch is stocked up The layer serial number that commodity are corresponding can be 1, and the layer serial number that commodity that subsequent batches is stocked up are corresponding can depend on Secondary cumulative.The unit price of stocking up that the commodity stocked up due to different batches are corresponding may be different, therefore, in the present embodiment, permissible Layer serial number that the commodity same batch stocked up are corresponding, stock up unit price and quantity in be associated being stored in right In the tables of data answered.So, according to the layer serial number of commodity of stocking up, just can inquire about that to obtain these commodity of stocking up corresponding Stock up unit price and quantity in.It is to say, in the present embodiment, when the described type of stocking up stocked up in type set is produced Raw stock up behavior time, the tables of data write of stocking up being associated with described type of stocking up currently is stocked up layer sequence corresponding to commodity Row number, stock up unit price and quantity in.In the present embodiment, layer serial number is minimum commodity corresponding when stocking up Between the earliest, time of stocking up corresponding to the maximum commodity of layer serial number is the latest.
In the present embodiment, as it is shown in figure 1, described stock withdrawal data table set can include at least one stock withdrawal data Table table, described stock withdrawal data table such as can include sell pipelined data table, sales order tables of data, sell funds on account tables of data, Stock up returns data table, report damages tables of data and tables of data of making an inventory.
In the present embodiment, described shipment type set can and described stock withdrawal data table set between set up map close System.Specifically, described shipment type set can include shop type of sale, return of goods type of stocking up, commodity report damage type with And loss on disposal type.For each shipment type in described shipment type set, all can with in described stock withdrawal data table set At least one stock withdrawal data table be associated.Such as, described shop type of sale and described sale pipelined data table, described sale Order data table and described sale funds on account tables of data are associated.So, when producing shop sales behavior, can be by described shop The parameters of paving shipment commodity corresponding to type of sale write described sale pipelined data table, described sales order tables of data with And in described sale funds on account tables of data.
In the present embodiment, the parameters of described shipment commodity such as can include the shipment batch sequence of shipment commodity Row number, shipment unit price and shipping Qty..Wherein, the batch that described shipment batch serial number can characterize current shipment commodity is suitable Sequence, described shipment batch serial number can be identical with described layer serial number.Such as, what the commodity of current shipment were corresponding is Layer Serial No. 1 commodity, then the shipment commodity serial number that these commodity are corresponding just can be 1.Owing to different batches goes out The shipment unit price that the commodity of goods are corresponding may be different, therefore, in the present embodiment, and can be by the commodity pair of same batch shipment Shipment batch serial number, shipment unit price and the shipping Qty. answered is associated being stored in the tables of data of correspondence.So, according to The shipment batch serial number of shipment commodity, just can inquire about and obtain shipment unit price corresponding to these shipment commodity and shipping Qty..
In the present embodiment, when performing shipment behavior, the principle of first in first out can be followed, the business that will stock up at first Product shipment at first.Such as, in current stock storage have layer serial number from 1 to 10 the identical goods of 10 batches, So when shipment behavior produces, can be from the beginning of the commodity of layer Serial No. 1, shipment successively.So, this embodiment party By the principle of first in first out in formula, it is possible to ensure the commodity sequential flowing in stock, system will not be caused due to chains of commodity flow The situation that meter information is chaotic.It is to say, in the present embodiment, when the shipment type in described shipment type set produces During goods behavior, the commodity that layer serial number in current stock is minimum can be defined as shipment commodity, with described shipment class Stock withdrawal data table that type is associated such that it is able to write shipment batch serial number corresponding to described shipment commodity, shipment unit price and Shipping Qty..
In the present embodiment, to stocking up commodity and after shipment commodity sequentially write the parameter of correspondence, just can be based on Described stock up tables of data set and stock withdrawal data table set, calculate the merchandise cost in current stock and can unite The profit that meter shipment commodity are corresponding.
Specifically, in the present embodiment, can be calculated by the cost calculation unit in described computing module and profit Unit calculates the profit that the merchandise cost in current stock is corresponding with shipment commodity respectively.
Refer to Fig. 2.Fig. 2 is the flow chart calculating cost of goods on hand in the application embodiment.In present embodiment In, described cost calculation unit can according to layer serial number order from big to small in described tables of data set of stocking up, The quantity in of each batch is compared with the quantity of commodity in current stock, and current according to comparison result recursive calculation The cost of commodity in stock, and enter in pin contingency table described in the cost write of calculating.In the present embodiment, due to most advanced The commodity of goods can shipment at first, the layer serial number that therefore in stock, the commodity of non-shipment are corresponding is bigger.So, in this reality Execute in mode, can be by the commodity parameter acquiring unit of stocking up in described cost calculation unit, from described tables of data collection of stocking up Conjunction determines the commodity of stocking up that layer serial number is maximum, and commodity of stocking up described in reading from described tables of data set of stocking up Corresponding quantity in anWith the unit price P that stocks upn
After determining the commodity that last batch is stocked up, can be by the first computing unit in described cost calculation unit By described quantity in anCompare with quantity b of commodity in current stock.Work as anDuring equal to b, the business in current stock is described Product are the commodity that last batch is stocked up, and therefore can calculate the cost of commodity in current stock according to the following equation:
M=b × Pn
Wherein, M represents the cost of commodity in current stock, n represent described in stock up layer serial number corresponding to commodity.
In the present embodiment, the commodity amount that the commodity amount in current stock is stocked up more than last batch, namely Described quantity in anLess than quantity b of commodity in described current stock.In this case, commodity the completeest in current stock It is the commodity stocked up of last batch entirely, the commodity that before also comprising, batch is stocked up.In such a case, it is possible to by current stock Commodity calculate cost in batches.Specifically, can be by the second computing unit in described cost calculation unit, according to following public affairs Formula is stocked up the cost of commodity described in calculating:
Mn=an×Pn
The cost calculation of the commodity just can batch last in current stock stocked up by above formula is out.
Then, the cost of other commodity in addition to the commodity that last batch is stocked up can be continued to calculate in current stock. Specifically, unit can be reset by the parameter in described cost calculation unit, from described tables of data set of stocking up really Determine the commodity of stocking up of layer Serial No. n-1, the commodity of stocking up of described layer Serial No. n-1 are redefined into Stock up commodity, and the quantity in a of the commodity of stocking up that reading redefines from described tables of data set of stocking upn-1And receiving tally Valency Pn-1, by b-anRedefine as the quantity of commodity in current stock.
So, in above-mentioned quantity in, stock up unit price and current stock, the quantity of commodity resets the most.At this In embodiment, described second computing unit and described can be repeated by the cycling element in described cost calculation unit Parameter resets the execution process of unit, until the quantity in of the commodity of stocking up redefined is current equal to redefine In stock till the quantity of commodity.So, present embodiment can amount to list by the cost in described cost calculation unit Unit, the according to the following equation cost of commodity in calculating stock:
M t = ( b - Σ i = 1 N a n - i + 1 ) × P n - N + Σ i = 1 N ( a n - i + 1 × P n - i + 1 )
Wherein, MtFor the cost of commodity in stock, N is described second computing unit and described parameter resets unit altogether With the number of times performed.
So, the present invention can be the most inverse according to comparison result between commodity amount and commodity amount in current stock Sequence recurrence, batch calculates the cost of commodity in stock, thus ensures the accuracy that in stock, merchandise cost calculates.
Referring to Fig. 3, Fig. 3 is the flow chart calculating trader's product profit in the application embodiment.In present embodiment In, due to the commodity shipment the most at first stocked up at first, the layer serial number that therefore commodity of shipment are corresponding is often from little To big distribution.Therefore, in the present embodiment, the profit computing unit in described computing unit can be from described stock withdrawal data Table set determines goods commodity amount, and according to from small to large suitable of layer serial number in described tables of data set of stocking up Sequence, compares the quantity in of each batch with described shipment commodity amount, and according to comparison result recursive calculation and institute State the profit that shipment commodity amount is corresponding, and enter in pin contingency table described in the profit write of calculating.Specifically, described profit Shipment commodity parameter acquiring unit in computing unit, can determine the shipment of trader's product from described stock withdrawal data table set Quantity c and shipment unit price P, and from described tables of data set of stocking up, determine the commodity pair of stocking up that layer serial number is minimum The quantity in a answeredmWith the unit price P that stocks upm.Then, the 3rd computing unit in described profit computing unit can be by described shipment Quantity c and described quantity in amCompare, when shipping Qty. c is less than or equal to quantity in amTime, shipment commodity are described In be all the commodity that batch is stocked up at first, so, described 3rd computing unit just can calculate trader's product according to the following equation Profit:
B=(P-Pm)×c
Wherein, B is the profit of described shipment commodity, m be described in stock up the layer serial number of commodity.
In the present embodiment, when described shipping Qty. is more than described quantity in, then show in the commodity of shipment, also Commodity including the subsequent batches in addition to batch stocks up commodity at first.In such a case, it is possible to calculated by described profit Profit corresponding to commodity of first batch at first being stocked up of the 4th computing unit in unit is calculated.Specifically, described 4th meter Calculate unit can calculate according to the following equation described in stock up the profit of commodity:
Bm=(P-Pm)×am
Wherein, BmProfit for described commodity of stocking up.
Then, can continue to calculate subsequent batches in trader's product to stock up profit corresponding to commodity.In the present embodiment, Layer sequence can be determined from described tables of data set of stocking up by the parameter reset unit in described profit computing unit Row number are the commodity of stocking up of m+1, are redefined by the commodity of stocking up of described layer Serial No. m+1 as stocking up commodity, and The quantity in a of the commodity of stocking up redefined is read from described tables of data set of stocking upm+1With the unit price P that stocks upm+1, by c-am Redefine as shipping Qty..
So, above-mentioned quantity in, unit price is stocked up and shipping Qty. is all reset.In the present embodiment, Described 4th computing unit and described parameter reset can be repeated by the circulation performance element in described profit computing unit The execution process of unit, until the shipping Qty. redefined is less than or equal to the quantity in of the commodity of stocking up redefined Till.So, present embodiment can amount to unit by the profit in described profit computing unit, count according to the following equation Calculate the profit of trader's product:
B t = ( c - Σ j = 1 K a m + j - 1 ) × P m + K + Σ j = 1 K [ a m + j - 1 × ( P - P m + j - 1 ) ]
Wherein, BtFor the profit of shipment commodity, K is described 4th computing unit and described parameter reset unit performs jointly Number of times.
So, the present invention can pass in chronological order according to the comparison result between the quantity of shipment commodity and commodity amount Returning, batch calculates the profit of trader's product, thus ensures the accuracy that shipment commodity profit calculates.
JXC System in the application can be based on JAVA and Mysql data base, with Spring+Portal framework Realize data service logical layer and the data access layer of system.Each tables of data be maintained in Business Logic and data access layer Can on-demand create when interacting, user is made without any maintenance.The Database Systems used support multi-process, multi-thread Rope, supports multiple concurrent user, has good inquiry and runnability.And can support Andriod version, iOS version, Webpage version, full platform data intercommunication.Wherein, the data of system are stored in high in the clouds, safe and reliable.
Referring to Fig. 4, the application also provides for a kind of real-time recursive calculation cost and the goods entry, stock and sales method of profit, described method Including:
Step S1: when behavior is stocked up in generation, by layer serial number corresponding for commodity of currently stocking up, stock up unit price with And quantity in write pre-build stock up in tables of data;
The commodity that layer serial number in current stock is minimum are defined as by step S2: when producing shipment behavior Trader's product, and the write of shipment batch serial number corresponding for described shipment commodity, shipment unit price and shipping Qty. is pre-build Stock withdrawal data table in;
Step S3: according to layer serial number order from big to small in described tables of data of stocking up, by each batch Quantity in is compared with the quantity of commodity in current stock, and works as according to the calculating of comparison result temporally backward recurrence batch The cost of commodity in front stock, and enter what the cost write of calculating pre-build in pin contingency table;
Step S4: determine goods commodity amount from described stock withdrawal data table, and stock up according in described tables of data of stocking up Batch serial number order from small to large, compares the quantity in of each batch with described shipment commodity amount, and root The profit corresponding with described shipment commodity amount, and the profit that will calculate is calculated according to comparison result recurrence batch in chronological order Enter described in write in pin contingency table.
In the application one preferred implementation, according to layer serial number in described tables of data of stocking up from big to small Sequentially, the quantity in of each batch is compared with the quantity of commodity in current stock, and according to comparison result temporally Backward recurrence batch calculates the cost of commodity in current stock and specifically includes:
The commodity of stocking up that layer serial number is maximum are determined from described tables of data of stocking up, and from described tables of data of stocking up The quantity in a that commodity of stocking up described in middle reading are correspondingnWith the unit price P that stocks upn
By described quantity in anCompare with quantity b of commodity in current stock, work as anDuring equal to b, according to following public affairs The cost of commodity in the formula current stock of calculating:
M=b × Pn
Wherein, M represents the cost of commodity in current stock, n represent described in stock up layer serial number corresponding to commodity.
In the application one preferred implementation, described method also includes:
S31: as described quantity in anLess than in described current stock during quantity b of commodity, calculate according to the following equation The cost of described commodity of stocking up:
Mn=an×Pn
Wherein, MnCost for described commodity of stocking up;
S32: determine the commodity of stocking up of layer Serial No. n-1 from described tables of data of stocking up, criticizes described stocking up The commodity of stocking up of secondary Serial No. n-1 redefine as commodity of stocking up, and read from described tables of data of stocking up and to redefine Stock up the quantity in a of commodityn-1With the unit price P that stocks upn-1, by b-anRedefine as the quantity of commodity in current stock;
S33: for repeating the execution process of S31 and S32, until the quantity in of the commodity of stocking up redefined more than or Till person is equal to the quantity of commodity in the current stock redefined;
S34: the cost of commodity in calculating stock according to the following equation:
M t = ( b - Σ i = 1 N a n - i + 1 ) × P n - N + Σ i = 1 N ( a n - i + 1 × P n - i + 1 )
Wherein, MtFor the cost of commodity in stock, N is the number of times that described S31 and S32 performs jointly.
In the application one preferred implementation, from described stock withdrawal data table, determine goods commodity amount, and according to institute State layer serial number order from small to large in tables of data of stocking up, by the quantity in of each batch and described shipment commodity Quantity is compared, and calculates the profit corresponding with described shipment commodity amount according to comparison result recurrence batch in chronological order Profit specifically includes:
Shipping Qty. c and the shipment unit price P of trader's product is determined from described stock withdrawal data table, and from described number of stocking up According to the quantity in a that the commodity of stocking up determining layer serial number minimum in table are correspondingmWith the unit price P that stocks upm
By described shipping Qty. c and described quantity in amCompare, when c is less than or equal to amTime, according to following public affairs Formula calculates the profit of trader's product:
B=(P-Pm)×c
Wherein, B is the profit of described shipment commodity, m be described in stock up the layer serial number of commodity.
In the application one preferred implementation, described method also includes:
S41: when described shipping Qty. c is more than described quantity in amTime, commodity of stocking up described in calculating according to the following equation Profit:
Bm=(P-Pm)×am
Wherein, BmProfit for described commodity of stocking up;
S42: determine the commodity of stocking up of layer Serial No. m+1 from described tables of data of stocking up, criticizes described stocking up The commodity of stocking up of secondary Serial No. m+1 redefine as commodity of stocking up, and read from described tables of data of stocking up and to redefine Stock up the quantity in a of commoditym+1With the unit price P that stocks upm+1, by c-amRedefine as shipping Qty.;
S43:: repeat the execution process of described S41 and S42, until the quantity in of the commodity of stocking up redefined is more than Or till the shipping Qty. redefined;
S44: calculate the profit of trader's product according to the following equation:
B t = ( c - Σ j = 1 K a m + j - 1 ) × P m + K + Σ j = 1 K [ a m + j - 1 × ( P - P m + j - 1 ) ]
Wherein, BtFor the profit of shipment commodity, K is the number of times that described S41 and S42 performs jointly.
It should be noted that each embodiment in this specification all uses the mode gone forward one by one to describe, each embodiment party Between formula, identical similar part sees mutually, and what each embodiment stressed is with other embodiments not Same part.For method embodiment, owing to it is substantially similar to system embodiment, so the comparison described Simply, relevant part sees the part of method embodiment and illustrates.
Therefore, a kind of real-time recursive calculation cost of present invention offer and the JXC System of profit and method have Following advantage:
1) present invention utilizes data list structure to valuate commodity by pen and registers detailed account and sends and surplus, it is achieved Stock up and the sequential flowing of shipment;
2) present invention is by writing data rather than more new data in tables of data, solves data list structure diversification Problem, solves in tradition JXC System high-frequency renewal stock, and what when concurrency is too high, data base cannot carry asks Topic, thus improve efficiency and the accuracy that merchandise news obtains;
3) present invention is according to the principle of first in first out, by the calculation of recurrence calculate stock cost and The profit of shipment commodity, it is possible to be accurately determined cost and the profit of commodity.
Although, the present invention is described in detail to have used general explanation and specific embodiment, but at this On the basis of invention, can make some modifications or improvements it, this will be apparent to those skilled in the art.Therefore, These modifications or improvements without departing from theon the basis of the spirit of the present invention, belong to the scope of protection of present invention.

Claims (10)

1. real-time recursive calculation cost and a JXC System for profit, described system includes tables of data logging modle and calculating Module, it is characterised in that described tables of data logging modle includes stock up tables of data set, type of stocking up set, stock withdrawal data Table set, shipment type set and enter pin contingency table, it is single that described computing module includes that cost calculation unit and profit calculate Unit, wherein:
Described each type of stocking up stocked up in type set is all stocked up with at least one stocked up in tables of data set described number Be associated according to table, each shipment type in described shipment type set all with at least one in described stock withdrawal data table set Stock withdrawal data table is associated, whenever the described data stocked up in tables of data or described stock withdrawal data table occur change time, only to Described stock up tables of data or described stock withdrawal data table write data;
When the described type of stocking up stocked up in type set produces and stocks up behavior, the number of stocking up being associated with described type of stocking up Layer serial number corresponding to commodity of currently stocking up, stock up unit price and quantity in, wherein, layer sequence is write according to table Row time of stocking up corresponding to number minimum commodity, time of stocking up corresponding to the maximum commodity of layer serial number was the latest the earliest;
When the shipment type in described shipment type set produces shipment behavior, by layer serial number in current stock Little commodity are defined as shipment commodity, write described shipment commodity with the stock withdrawal data table that described shipment type is associated corresponding Shipment batch serial number, shipment unit price and shipping Qty.;
Described cost calculation unit, will be each according to layer serial number order from big to small in described tables of data set of stocking up The quantity in of individual batch is compared with the quantity of commodity in current stock, and according to the current stock of comparison result recursive calculation The cost of middle commodity, and enter in pin contingency table described in the cost write of calculating;
Described profit computing unit determines goods commodity amount from described stock withdrawal data table set, and according to described data of stocking up Layer serial number order from small to large in table set, enters the quantity in of each batch with described shipment commodity amount Row comparison, and according to the comparison result recursive calculation profit corresponding with described shipment commodity amount, and the profit of calculating is write Enter described in entering in pin contingency table.
Real-time recursive calculation cost the most according to claim 1 and the JXC System of profit, it is characterised in that described one-tenth This computing unit specifically includes:
Stock up commodity parameter acquiring unit, for determining maximum the entering of layer serial number from described tables of data set of stocking up Trader's product, and the quantity in a that commodity of stocking up described in reading from described tables of data set of stocking up are correspondingnWith the unit price P that stocks upn
First computing unit, for by described quantity in anCompare with quantity b of commodity in current stock, work as anEqual to b Time, calculate the cost of commodity in current stock according to the following equation:
M=b × Pn
Wherein, M represents the cost of commodity in current stock, n represent described in stock up layer serial number corresponding to commodity.
Real-time recursive calculation cost the most according to claim 2 and the JXC System of profit, it is characterised in that described one-tenth This computing unit also includes:
Second computing unit, for as described quantity in anLess than in described current stock during quantity b of commodity, according to following The cost of the commodity of stocking up that formula calculating layer serial number is maximum:
Mn=an×Pn
Wherein, MnCost for described commodity of stocking up;
Parameter resets unit, for determining stocking up of layer Serial No. n-1 from described tables of data set of stocking up The commodity of stocking up of described layer Serial No. n-1 are redefined as commodity of stocking up by commodity, and from described tables of data of stocking up Set is read the quantity in a of the commodity of stocking up redefinedn-1With the unit price P that stocks upn-1, by b-anRedefine as current storehouse Deposit the quantity of middle commodity;
Cycling element, for repeating described second computing unit and described parameter resets the execution process of unit, until Till in the current stock redefined, the quantity of commodity is equal to the commodity amount of stocking up redefined;
Cost amounts to unit, for calculating the cost of commodity in stock according to the following equation:
M t = ( b - Σ i = 1 N a n - i + 1 ) × P n - N + Σ i = 1 N ( a n - i + 1 × P n - i + 1 )
Wherein, MtFor the cost of commodity in stock, N is described second computing unit and described parameter resets unit and performs Number of times.
Real-time recursive calculation cost the most according to claim 1 and the JXC System of profit, it is characterised in that described profit Profit computing unit specifically includes:
Shipment commodity parameter acquiring unit, for determine from described stock withdrawal data table set shipping Qty. c of trader's product with And shipment unit price P, and from described tables of data set of stocking up, determine corresponding the entering of commodity of stocking up that layer serial number is minimum Goods quantity amWith the unit price P that stocks upm
3rd computing unit, for by described shipping Qty. c and described quantity in amCompare, when described shipping Qty. c is little In or equal to described quantity in amTime, calculate the profit of trader's product according to the following equation:
B=(P-Pm)×c
Wherein, B is the profit of described shipment commodity, m be described in stock up the layer serial number of commodity.
Real-time recursive calculation cost the most according to claim 4 and the JXC System of profit, it is characterised in that described profit Profit computing unit also includes:
4th computing unit, for when described shipping Qty. c is more than described quantity in amTime, calculate described according to the following equation Stock up the profit of commodity:
Bm=(P-Pm)×am
Wherein, BmProfit for described commodity of stocking up;
Parameter reset unit, for determining the commodity of stocking up of layer Serial No. m+1 from described tables of data set of stocking up, The commodity of stocking up of described layer Serial No. m+1 are redefined for commodity of stocking up, and from described tables of data set of stocking up The quantity in a of what middle reading redefined stock up commoditym+1With the unit price P that stocks upm+1, by c-amRedefine as shipping Qty.;
Circulation performance element, for repeating the execution process of described 4th computing unit and described parameter reset unit, until Till the shipping Qty. redefined is less than or equal to the commodity amount of stocking up redefined;
Profit amounts to unit, for calculating the profit of trader's product according to the following equation:
B t = ( c - Σ j = 1 K a m + j - 1 ) × P m + K + Σ j = 1 K [ a m + j - 1 × ( P - P m + j - 1 ) ]
Wherein, BtFor the profit of shipment commodity, K is described 4th computing unit and the number of times of described parameter reset unit execution.
6. a real-time recursive calculation cost and the goods entry, stock and sales method of profit, it is characterised in that described method includes:
When behavior is stocked up in generation, by layer serial number corresponding for commodity of currently stocking up, stock up unit price and quantity in What write pre-build stocks up in tables of data, and wherein, time of stocking up corresponding to the minimum commodity of layer serial number the earliest, enters Time of stocking up corresponding to the maximum commodity of goods batch serial number is the latest;
When producing shipment behavior, the commodity that layer serial number in current stock is minimum are defined as shipment commodity, and will Shipment batch serial number, shipment unit price and shipping Qty. that described shipment commodity are corresponding write the stock withdrawal data table pre-build In;
According to layer serial number order from big to small in described tables of data of stocking up, by the quantity in of each batch with work as In front stock, the quantity of commodity is compared, and according to the cost of commodity in the current stock of comparison result recursive calculation, and will meter What the cost write calculated pre-build enters in pin contingency table;
From described stock withdrawal data table, determine goods commodity amount, and according to layer serial number in described tables of data of stocking up from Little to big order, the quantity in of each batch is compared with described shipment commodity amount, and passs according to comparison result Return and calculate the profit corresponding with described shipment commodity amount, and enter in pin contingency table described in the profit write of calculating.
Real-time recursive calculation cost the most according to claim 6 and the goods entry, stock and sales method of profit, it is characterised in that according to institute State layer serial number order from big to small in tables of data of stocking up, by the quantity in of each batch and business in current stock The quantity of product is compared, and specifically includes according to the cost of commodity in the comparison result current stock of calculating:
From described tables of data of stocking up, determine the commodity of stocking up that layer serial number is maximum, and read from described tables of data of stocking up The quantity in a that commodity of stocking up described in taking are correspondingnWith the unit price P that stocks upn
By described quantity in anCompare with quantity b of commodity in current stock, work as anDuring equal to b, count according to the following equation Calculate the cost of commodity in current stock:
M=b × Pn
Wherein, M represents the cost of commodity in current stock, n represent described in stock up layer serial number corresponding to commodity.
Real-time recursive calculation cost the most according to claim 6 and the goods entry, stock and sales method of profit, it is characterised in that
S31: calculate the merchandise cost of stocking up that described layer serial number is maximum according to the following equation:
Mn=an×Pn
Wherein, MnCost for described commodity of stocking up;
S32: determine the commodity of stocking up of layer Serial No. n-1 from described tables of data of stocking up, by described layer sequence Row number redefine as stocking up commodity for the commodity of stocking up of n-1, and read stocking up of redefining from described tables of data of stocking up The quantity in a of commodityn-1With the unit price P that stocks upn-1, by b-anRedefine as the quantity of commodity in current stock;
S33: for repeating the execution process of S32, until the quantity of commodity is equal to redefining in the current stock redefined Commodity of stocking up quantity in till;
S34: the cost of commodity in calculating stock according to the following equation:
M t = ( b - Σ i = 1 N a n - i + 1 ) × P n - N + Σ i = 1 N ( a n - i + 1 × P n - i + 1 )
Wherein, MtFor the cost of commodity in stock, N is the number of times that described S31 and S32 performs jointly.
Real-time recursive calculation cost the most according to claim 6 and the goods entry, stock and sales method of profit, it is characterised in that from described Stock withdrawal data table determines goods commodity amount, and according to from small to large suitable of layer serial number in described tables of data of stocking up Sequence, compares the quantity in of each batch with described shipment commodity amount, and according to comparison result recursive calculation and institute The profit stating shipment commodity amount corresponding specifically includes:
Shipping Qty. c and the shipment unit price P of trader's product is determined from described stock withdrawal data table, and from described tables of data of stocking up The middle quantity in a determining that the minimum commodity of stocking up of layer serial number are correspondingmWith the unit price P that stocks upm
By described shipping Qty. c and described quantity in amCompare, be less than or equal to when described shipping Qty. c described in enter Goods quantity amTime, calculate the profit of trader's product according to the following equation:
B=(P-Pm)×c
Wherein, B is the profit of described shipment commodity, m be described in stock up the layer serial number of commodity.
Real-time recursive calculation cost the most according to claim 9 and the goods entry, stock and sales method of profit, it is characterised in that described Method also includes:
S41: when described shipping Qty. c is more than quantity in amTime described, the profit of commodity of stocking up described in calculating according to the following equation Profit:
Bm=(P-Pm)×am
Wherein, BmProfit for described commodity of stocking up;
S42: determine the commodity of stocking up of layer Serial No. m+1 from described tables of data of stocking up, by described layer sequence Row number redefine as stocking up commodity for the commodity of stocking up of m+1, and read stocking up of redefining from described tables of data of stocking up The quantity in a of commoditym+1With the unit price P that stocks upm+1, by c-amRedefine as shipping Qty.;
S43: repeat the execution process of described S42, until the shipment commodity redefined shipping Qty. be less than or equal to Till the quantity in of the commodity of stocking up redefined;
S44: calculate the profit of trader's product according to the following equation:
B t = ( c - Σ j = 1 K a m + j - 1 ) × P m + K + Σ j = 1 K [ a m + j - 1 × ( P - P m + j - 1 ) ]
Wherein, BtFor the profit of shipment commodity, K is the number of times that described S41 and S42 performs jointly.
CN201610459931.7A 2016-06-22 2016-06-22 A kind of real-time recursive calculation cost and the JXC System of profit and method Pending CN106096987A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610459931.7A CN106096987A (en) 2016-06-22 2016-06-22 A kind of real-time recursive calculation cost and the JXC System of profit and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610459931.7A CN106096987A (en) 2016-06-22 2016-06-22 A kind of real-time recursive calculation cost and the JXC System of profit and method

Publications (1)

Publication Number Publication Date
CN106096987A true CN106096987A (en) 2016-11-09

Family

ID=57252179

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610459931.7A Pending CN106096987A (en) 2016-06-22 2016-06-22 A kind of real-time recursive calculation cost and the JXC System of profit and method

Country Status (1)

Country Link
CN (1) CN106096987A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106651257A (en) * 2016-12-14 2017-05-10 深圳市大东车慧科技股份有限公司 Logistics company transportation cost management system and usage method thereof
CN107085779A (en) * 2017-04-27 2017-08-22 上海藤丰信息技术有限公司 A kind of logistics management automated system and method
CN109767149A (en) * 2017-11-09 2019-05-17 普天信息技术有限公司 The acquisition methods and device of inventory data
CN112365102A (en) * 2020-12-07 2021-02-12 上海找钢网信息科技股份有限公司 Data processing method and device, electronic equipment and storage medium
CN113487256A (en) * 2021-06-30 2021-10-08 深圳市观麦网络科技有限公司 Purchase, sale and storage management method, device and equipment and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106651257A (en) * 2016-12-14 2017-05-10 深圳市大东车慧科技股份有限公司 Logistics company transportation cost management system and usage method thereof
CN107085779A (en) * 2017-04-27 2017-08-22 上海藤丰信息技术有限公司 A kind of logistics management automated system and method
CN109767149A (en) * 2017-11-09 2019-05-17 普天信息技术有限公司 The acquisition methods and device of inventory data
CN112365102A (en) * 2020-12-07 2021-02-12 上海找钢网信息科技股份有限公司 Data processing method and device, electronic equipment and storage medium
CN113487256A (en) * 2021-06-30 2021-10-08 深圳市观麦网络科技有限公司 Purchase, sale and storage management method, device and equipment and storage medium
CN113487256B (en) * 2021-06-30 2024-05-10 深圳市观麦网络科技有限公司 Method, device, equipment and storage medium for managing purchase, sale and stock

Similar Documents

Publication Publication Date Title
CN106096987A (en) A kind of real-time recursive calculation cost and the JXC System of profit and method
Redman Improve data quality for competitive advantage
Blonigen et al. Cherries for sale: The incidence and timing of cross-border M&A
Claes et al. Merging event logs for process mining: A rule based merging method and rule suggestion algorithm
CN112668968B (en) Warehouse management modeling method and system based on field drive design
CN109472568A (en) A kind of block chain method of commerce, device, management system, equipment and storage medium
Drakaki et al. Investigating the impact of inventory inaccuracy on the bullwhip effect in RFID-enabled supply chains using colored petri nets
CN109214730A (en) Information-pushing method and device
CN108665156B (en) Supply chain selection evaluation method based on Markov chain under block chain
Wu [Retracted] Optimization of E‐Commerce Supply Chain Management Process Based on Internet of Things Technology
Qin The construction of corporate financial management risk model based on XGBoost algorithm
CN116090880A (en) Data index system modeling method and system based on big data CDP system
CN105378765A (en) Using commerce networks to facilitate business interactions among entities
US20140149186A1 (en) Method and system of using artifacts to identify elements of a component business model
Amaral et al. Cooperative CEP-based RFID framework: a notification approach for sharing complex business events among organizations
Liu et al. A conceptual framework for vendor selection based on supply chain risk management from a literature
Ramadas et al. A model to identify the factors of supplier communication and financial availability to support the lean manufacturing implementation in small and medium scale enterprises
Shikhli et al. Data Acquisition Model for Analyzing Schedule Delays Using KDD: Knowledge Discovery and Datamining
Mohan et al. A practical method for failure analysis using incomplete warranty data
Yang Evaluation of Large‐Scale Sports Project Based on Analytic Hierarchy Process
Salman Rahman et al. Modeling the smart factory manufacturing products characteristics: The perspective of energy consumption
Erlangga et al. Development of Automatic Real Time Inventory Monitoring System using RFID Technology in Warehouse
US20190180223A1 (en) Supply chain model generation system
Chen et al. Construction of Conceptual Framework of Intelligent Accounting Under the Condition of New Generation Information Technology
Mercado et al. Agile Dimensional Model for a Data Warehouse Implementation in a Software Developer Company.

Legal Events

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