Bonded consumption computing system and its method are checked and write off applied to work order
Technical field
The present invention relates to a kind of bonded consumption computing system and its method are checked and write off applied to work order.
Background technology
China's legal provisions, import should pay import tariff;And export goods, then it can usually obtain tariff benefit
Patch.For processing shape of the mouth as one speaks enterprise, often it is related to import raw material etc., is subsequently processed into finished product, exported.For convenience of enterprise
Industry, customs is in actual mechanical process, using bonded management, i.e., from raw material import, the stage is exported to manufactured goods, enterprise into
Export cycles from burden of taxation collection, but need to be checked in some cycles import raw material and outlet finished product consume raw material it
Between equilibrium relation.Because in the production process of product, the raw material consumed are varied, and source is complicated, existing import
Raw material, the raw material for also having domestic procurement;The even raw material of import, it is also possible to there are same raw material, different suppliers
The supply of material, even unified supplier can also divide several batch difference imports;;Half used, can also into both can voluntarily produce
Directly buying etc..How the consumption species and quantity of import raw material in product are provided exactly, it is detailed so as to be provided to customs
Most outlet finished product consumes the information of raw material, this is the challenge that current enterprise faces.Its difficulty is:
1st, import raw material enter after warehouse, it will usually and the raw material of domestic procurement are managed collectively.In production process
In, it takes at random, thus be difficult to be accurate to that produce some product be using import raw material or domestic raw material on earth, it more difficult to
It is that batch import with the import raw material for being accurate to use.At present, it is to look forward to that existing outlet, which consumes calculation, in the industry
Industry provides unit finished product corresponding composition, is multiplied by outlet finished product number and draws, but the consumption of unit finished product is difficult to for these reasons
It is accurate to declare;Work order data in contact business actual production process, the materials and parts having recorded in the production of batch finished product consume relation,
But between outlet and work order Data Matching if using the date of manufacture of product, raw material the storage date as foundation, temporally
Axis is matched one by one, forms cartesian product so that operand greatly increases.
2nd, import raw material are both it is possible that directly apply in product, it is also possible to included in another semi-finished product.On
It states information to be recorded in the work order of production semi-finished product and finished product, how accurately be calculated from numerous work orders, it is every in product
The usage amount of kind import raw material, this equally also results in cartesian product so that operand increases in geometry multiple.
How to solve the above problems, simplify algorithm, improve the consumption computational efficiency that outlet finished product corresponds to raw material, be current
Industry urgent problem to be solved.
The content of the invention
In order to overcome the above problem, offer of the invention is a kind of efficiently, accurately checks and writes off bonded consumption calculating applied to work order
System and method.
The technical scheme is that provide one kind checks and writes off bonded consumption computing system applied to work order, including:
Enter library module:Type, quantity and the time of import raw material are recorded, generates storage bill;
Work order module:Record production finished product, the title of semi-finished product, quantity and the raw material of time and corresponding consumption
Title and quantity, generate record of production work order;
Product module need to be converted into:Title, quantity and the time of the finished product of outlet are recorded, it is single to form outlet;
Work order matching module:The outlet list is matched with the record of production work order, acquisition is related to the outlet
Single whole record of production work orders, outlet work order is denoted as by the record of production work order;If it is related in the outlet work order of any acquisition
And semi-finished product, then the whole record of production work orders for producing the semi-finished product are traced, to obtain relevant all outlet work orders;
Export work order relatively core button rate computing module:The relatively core button rate k of the import raw material of the outlet work order is calculated,
Its defined formula is:
K=n/N,
Wherein, when the product of this outlet work order production is semi-finished product:N is the number of the semi-finished product of this outlet work order production
Amount, n are the number of matches of the finished product that the outlet work order of subsequent processing produces or semi-finished product,
When the product of this outlet work order production is finished product:N is the quantity of the finished product of this outlet work order production, and n is outlet
The number of matches of single finished product;
Accumulative core button rate computing module:Calculate the accumulative core button rate a in all outlet work orders, an outlet work order
The computational methods of the accumulative core button rate a of upper any import raw material are that countershaft sorts on time by the outlet work order, this is exported
The relatively core button rate k of the outlet work order of work order and following whole processes is multiplied, and product is denoted as the accumulative core of the outlet work order
Button rate a;
Declare at customs single module:All outlet work orders are summarized, obtain whole import former materials in the outlet work order
The consumption of material, and generate customs declaration;The defined formula of relative consumption of the one outlet work order import raw material is:
B=c * a, wherein b are the relative consumption of the outlet work order import raw material, and c is the outlet work order
The consumption of import raw material, a are the total core button rate of the import raw material.
Preferably, the work order matching module, which uses, divides cake algorithm to carry out the outlet list with the record of production work order
Matching;Described point of cake algorithm includes several production queues and several consumption queues, and the production queue includes production number
Amount and time, the consumption queue include consumption quantity and time:
1)By the production queue and consumption queue, countershaft is ranked up on time, calculates the starting point of each production queue
CS and terminal CE:
CSn = CEn-1+ 1, wherein, CSnFor the starting point of presently described production queue, CEn-1 For the previous production team
The terminal of row, CS1=0,
CEn = CSn + dn, wherein, CEn For the terminal of presently described production queue, dnFor presently described production queue
Production quantity;
Calculate each consumption starting point BS of queue and terminal BE:
BSn = BEn-1+ 1, wherein, BSnFor the starting point of presently described consumption queue, BEn-1 For the previous consumption team
The terminal of row, BS1=0,
BEn = BSn + mn, wherein, BEn For the terminal of presently described consumption queue, mnFor presently described consumption queue
Production quantity;
2)The starting point BS and terminal BE of the consumption queue are mapped in production queue, so as to obtain the consumption team
Arrange corresponding production queue;
The work order matching module is using cake algorithm is divided, and the outlet is single to consume queue, and the record of production work order is
Produce queue.
Preferably, the step 2)In, the production queue of following two kinds of situations is retrieved in the production queue, thus will
The starting point BS and terminal BE of the consumption queue are mapped in production queue:
A) the production queue of starting point CS or terminal CE between BS and BE;
B) starting point CS is less than or equal to BS, and terminal CE is more than or equal to the production queue of BE.
Preferably, a)Situation includes following three kinds of situations:
A1) production queues of the only starting point CS between BS and BE;
A2) production queues of the only terminal CE between BS and BE;
A3) starting point CS and terminal CE is respectively positioned on the production queue between BS and BE.
Bonded consumption computational methods statistical method is checked and write off applied to work order the present invention also provides a kind of, including following step
Suddenly:
1)Type, quantity and the time of import raw material are recorded by entering library module, generates storage bill;
2)Production finished product, the title of semi-finished product, quantity and the original of time and corresponding consumption are recorded by work order module
The title and quantity of material generate record of production work order;
3)Title, quantity and time by the finished product that need to be converted into the outlet of product module record, it is single to form outlet;
4)The outlet list is matched with the record of production work order by work order matching module, acquisition is related to described
Single whole record of production work orders are exported, which is denoted as outlet work order;If the outlet work order of any acquisition
Involved in semi-finished product, then the whole record of production work orders for producing the semi-finished product are traced, with obtain it is relevant all export
Work order;
5)The relatively core for calculating the import raw material of the outlet work order by exporting work order relatively core button rate computing module
Button rate k, defined formula are:
K=n/N,
Wherein, when the product of this outlet work order production is semi-finished product:N is the number of the semi-finished product of this outlet work order production
Amount, n are the number of matches of the finished product that the outlet work order of subsequent processing produces or semi-finished product,
When the product of this outlet work order production is finished product:N is the quantity of the finished product of this outlet work order production, and n is outlet
The number of matches of single finished product;
Accumulative core button rate computing module:Calculate the accumulative core button rate a in all outlet work orders, an outlet work order
The computational methods of the accumulative core button rate a of upper any import raw material are that countershaft sorts on time by the outlet work order, this is exported
The relatively core button rate k of the outlet work order of work order and following whole processes is multiplied, and product is denoted as the accumulative core of the outlet work order
Button rate a;
6)All outlet work orders are summarized by declaring at customs single module, obtain whole imports in the outlet work order
The consumption of raw material, and generate customs declaration;The defined formula of relative consumption of the one outlet work order import raw material is:
B=c * a, wherein b are the relative consumption of the outlet work order import raw material, and c is the outlet work order
The consumption of import raw material, a are the total core button rate of the import raw material.
Preferably, the work order matching module, which uses, divides cake algorithm to carry out the outlet list with the record of production work order
Matching;Described point of cake algorithm includes several production queues and several consumption queues, and the production queue includes production number
Amount and time, the consumption queue include consumption quantity and time:
1)By the production queue and consumption queue, countershaft is ranked up on time, calculates the starting point of each production queue
CS and terminal CE:
CSn = CEn-1+ 1, wherein, CSnFor the starting point of presently described production queue, CEn-1 For the previous production team
The terminal of row, CS1=0,
CEn = CSn + dn, wherein, CEn For the terminal of presently described production queue, dnFor presently described production queue
Production quantity;
Calculate each consumption starting point BS of queue and terminal BE:
BSn = BEn-1+ 1, wherein, BSnFor the starting point of presently described consumption queue, BEn-1 For the previous consumption team
The terminal of row, BS1=0,
BEn = BSn + mn, wherein, BEn For the terminal of presently described consumption queue, mnFor presently described consumption queue
Production quantity;
2)The starting point BS and terminal BE of the consumption queue are mapped in production queue, so as to obtain the consumption team
Arrange corresponding production queue;
The work order matching module is using cake algorithm is divided, and the outlet is single to consume queue, and the record of production work order is
Produce queue.
Preferably, the step 2)In, the production queue of following two kinds of situations is retrieved in the production queue, thus will
The starting point BS and terminal BE of the consumption queue are mapped in production queue:
A) the production queue of starting point CS or terminal CE between BS and BE;
B) starting point CS is less than or equal to BS, and terminal CE is more than or equal to the production queue of BE.
Preferably, a)Situation includes following three kinds of situations:
A1) production queues of the only starting point CS between BS and BE;
A2) production queues of the only terminal CE between BS and BE;
A3) starting point CS and terminal CE is respectively positioned on the production queue between BS and BE.
The present invention be applied to work order check and write off it is bonded consumption computing system and its method redesign work order is checked and write off it is bonded
Consume the statistical method of computational methods so that its algorithm is simple, efficiently, can save it is substantial amounts of manually and the time so that its
During in face of big data, the accurate declaration material that provides is possibly realized.
Description of the drawings
Fig. 1 is the schematic diagram for the relatively core button rate for calculating outlet work order;
Fig. 2 is that queue is consumed in point cake algorithm to one schematic diagram of mapping mode of production queue;
Fig. 3 is that queue is consumed in point cake algorithm to two schematic diagram of mapping mode of production queue;
Fig. 4 is that queue is consumed in point cake algorithm to three schematic diagram of mapping mode of production queue;
Fig. 5 is that queue is consumed in point cake algorithm to four schematic diagram of mapping mode of production queue.
Specific embodiment
The specific embodiment of the present invention is described in further detail below.
The present invention one kind be applied to work order check and write off it is bonded consume computing system it include with lower module:
Enter library module:Type, quantity and the time of import raw material are recorded, generates storage bill;
Work order module:Record production finished product, the title of semi-finished product, quantity and the raw material of time and corresponding consumption
Title and quantity, generate record of production work order;
Product module need to be converted into:Title, quantity and the time of the finished product of outlet are recorded, it is single to form outlet;
Work order matching module:Outlet list is matched with record of production work order, acquisition is related to the whole of outlet list and produces
Work order is recorded, which is denoted as outlet work order;If semi-finished product involved in the outlet work order of any acquisition, right
The whole record of production work orders for producing the semi-finished product are traced, to obtain relevant all outlet work orders;
Export work order relatively core button rate computing module:The relatively core button rate k of the import raw material of outlet work order is calculated, is determined
Adopted formula is:
K=n/N,
Wherein, when the product of this outlet work order production is semi-finished product:N is the number of the semi-finished product of this outlet work order production
Amount, n are the number of matches of the finished product that the outlet work order of subsequent processing produces or semi-finished product,
When the product of this outlet work order production is finished product:N is the quantity of the finished product of this outlet work order production, and n is outlet
The number of matches of single finished product;
Accumulative core button rate computing module:Calculate all outlet work orders in accumulative core button rate a, one outlet work order on it is any into
The computational methods of the accumulative core button rate a of mouthful raw material is will export work order countershaft sequence on time, by the outlet work order and following
The relatively core button rate k of the outlet work order of whole processes is multiplied, and product is denoted as the accumulative core button rate a of the outlet work order.
As shown in Figure 1, if outlet list L01 outlets finished product A 100, outlet work order W01 production A 200, lead in W01
To semi-finished product PA 400, the outlet work order W02 total amounts of PA totally 1000.So accumulative core button rate a of outlet work order W02=
50% * 40%=20%。
Declare at customs single module:All outlet work orders are summarized, obtain the consumption of whole import raw material in outlet work order
Amount, and generate customs declaration;The defined formula of relative consumption of one outlet work order import raw material is:
B=c * a, wherein b are the relative consumption of outlet work order import raw material, and c is the outlet work order import former material
The consumption of material, a are the total core button rate of the import raw material.
In the present invention, work order matching module, which uses, divides cake algorithm to match outlet list with record of production work order;Divide cake
Algorithm includes several production queues and several consumption queues, and production queue includes production quantity and time, consumes queue
Including consumption quantity and time:
1)By production queue and consumption queue, countershaft is ranked up on time, calculates the starting point CS and terminal of each production queue
CE:
CSn = CEn-1+ 1, wherein, CSnCurrently to produce the starting point of queue, CEn-1 For it is previous production queue terminal,
CS1=0,
CEn = CSn + dn, wherein, CEn Currently to produce the terminal of queue, dnCurrently to produce the production number of queue
Amount;
Calculate each consumption starting point BS of queue and terminal BE:
BSn = BEn-1+ 1, wherein, BSnFor the starting point of current consumption queue, BEn-1 For it is previous consumption queue terminal,
BS1=0,
BEn = BSn + mn, wherein, BEn For the terminal of current consumption queue, mnFor the production number of current consumption queue
Amount;
2)The starting point BS for consuming queue and terminal BE are mapped in production queue, it is corresponding so as to obtain the consumption queue
Produce queue;
Work order matching module is using cake algorithm is divided, and outlet is single to consume queue, and record of production work order is production queue.
As shown in Figures 2 to 5, the production queue of following two kinds of situations is retrieved in queue is produced, so as to which queue will be consumed
Starting point BS and terminal BE be mapped to production queue in:
A) the production queue of starting point CS or terminal CE between BS and BE;
B) starting point CS is less than or equal to BS, and terminal CE is more than or equal to the production queue of BE.
a)Situation includes following three kinds of situations:
A1) production queues of the only starting point CS between BS and BE;
A2) production queues of the only terminal CE between BS and BE;
A3) starting point CS and terminal CE is respectively positioned on the production queue between BS and BE.
The characteristics of dividing cake algorithm:
1)It is to solve production and consumption(Put—Take)A kind of mathematical method of model assignment problem
2)It needs two ordered queues:Put queues, Take queues
3)Member in each queue is known as number(It cannot repeat), quantity(More than 0), serial number(Priority in queue is suitable
Sequence).
For convenience of description, Wo Menling
It is put into quantity:put_qty
Quantity is put into add up:addup_qty
It is put into accumulative lower limit:addup_qty_1
Get quantity:take_qty
Quantity is got to add up:p_addup_qty
Get accumulative lower limit:p_addup_qty_1
Receive rate:taked_percent
For some product P, its production queue(That is Put queues)
======================================
Produce odd numbers quantity serial number
--------------------------------------------------------------
P-wo-001 600 1
P-wo-002 1200 2
P-wo-003 700 3
P-wo-004 200 4
P-wo-005 2700 5
---------------------------------------------------------------
Consume queue(That is Take queues)
======================================
Consume odd numbers quantity serial number
--------------------------------------------------------------
B-wo-001 1000 1
C-wo-001 1000 2
C-wo-002 400 3
B-wo-002 1000 4
C-wo-003 550 5
Divide cake problem:(Cake algorithm is divided to solve the problems, such as)
By traditional algorithm, according to FIFO(First in first out)Principle, the quantity quilt of each production odd numbers in Put- queues
Which consumption odd numbers is got in Take- queuesRespectively get how manyThis is a permutation and combination problem, shares group in 5*5=25
Conjunction relation.It is exactly so that the arch-criminal that operand sharply increases.
And the present invention divides cake algorithm, first can establish production queue and consumption in daily production and exit procedure
Queue, then as shown in Figure 2-5, by simply mapping, so as to can simply obtain consumption queue and produce pair of queue
It should be related to, can be completed by the methods of retrieval of database, will not generate cartesian product, algorithm is simple and efficient.
A kind of above example only present invention embodiment therein, description is more specific and detailed, but can not
Therefore it is interpreted as the limitation to the scope of the claims of the present invention.It should be pointed out that for those of ordinary skill in the art,
Without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the protection model of the present invention
It encloses.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.