Cost accounting method, device, computer equipment and storage medium
By introducing a new cost accounting method in the ERP system, determining the business relationship between multiple objects and performing sequential identification processing, the problem that existing systems cannot effectively handle the cost accounting of multiple supporting components and bulk components is solved, and accurate cost accounting of complex business relationships is achieved.
Patent Information
- Application Number
- CN202210258496.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-16
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2042-03-16
AI Technical Summary
The existing ERP system cannot effectively handle the assembly and disassembly cost accounting business of multiple supporting components corresponding to multiple bulk parts, resulting in complex cost accounting and inability to meet actual needs.
A costing method is provided, by obtaining pending documents, determining business relationships between multiple objects, and determining the order identification of each object based on these relationships. Then, the cost of the smallest uncalculated object is identified based on the cost set accounting order, and the order identification of each uncalculated object is updated until all objects complete the cost accounting.
This method can effectively handle the costing of complex business relationships between multiple objects, ensure the accuracy and completeness of costing, and is suitable for assembly and disassembly between multiple supporting components and bulk parts.
Smart Images

Figure CN114595990B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a cost accounting method, apparatus, computer equipment and storage medium. Background Art
[0002] Assembly and disassembly are common businesses of enterprises. Usually, Enterprise Resource Planning (ERP) systems support assembly and disassembly businesses and can calculate costs through assembly documents and disassembly documents. Since the cost accounting of assembly documents and disassembly documents is relatively complicated, the current ERP system simplifies the cost accounting business of assembly documents and disassembly documents and only supports the cost accounting business of assembly and disassembly of multiple parts corresponding to one supporting part.
[0003] However, in reality, enterprises have a large number of cost accounting businesses for the assembly and disassembly of multiple supporting parts corresponding to multiple loose parts. The assembly and disassembly between multiple supporting parts and multiple loose parts has a very complex business relationship. The current ERP system cannot meet the cost accounting business of the assembly and disassembly of multiple supporting parts corresponding to multiple loose parts. Summary of the invention
[0004] Based on this, it is necessary to provide a cost accounting method, device, computer equipment and storage medium that can perform cost accounting on documents with complex business relationships between multiple objects in order to address the above technical problems.
[0005] In a first aspect, the present application provides a cost accounting method. The method comprises:
[0006] Acquire a document to be processed, determine a business relationship between multiple objects in the document to be processed based on the type of the document to be processed, and determine a sequence identifier of each object according to the business relationship between the multiple objects;
[0007] According to the type, obtaining a cost set of the plurality of objects;
[0008] The cost of the unaccounted object with the smallest accounting sequence identifier based on the cost set is used as the accounted object, and the sequence identifier of each unaccounted object is updated based on the business relationship between all unaccounted objects. The above process of calculating the cost of the unaccounted object with the smallest accounting sequence identifier based on the cost set and using the unaccounted object with the smallest accounting sequence identifier as the accounted object is repeated until the multiple objects do not include unaccounted objects.
[0009] In one embodiment, the plurality of objects include a plurality of parts and a plurality of matching parts, and the business relationship includes at least one of an assembly business relationship and a disassembly business relationship; determining the business relationship between the plurality of objects in the document to be processed based on the type of the document to be processed, and determining the sequence identifier of each object according to the business relationship between the plurality of objects, comprises:
[0010] If the type of the to-be-processed document is an assembly type, then according to the assembly business relationship of assembling multiple parts in the to-be-processed document to obtain multiple matching parts, the number of other objects assembled to obtain each object is determined, and the number of other objects assembled to obtain each object is used as a sequence identifier of each object;
[0011] If the type of the document to be processed is a disassembly type, the number of other objects obtained by disassembling each object is determined according to the disassembly business relationship of disassembling multiple parts from multiple matching parts in the document to be processed, and the number of other objects obtained by disassembling each object is used as the sequence identifier of each object.
[0012] In one embodiment, the type of the to-be-processed document is an assembly type, the multiple objects include multiple loose parts and multiple unaccounted matching parts, and the cost set includes the outbound cost of each loose part, the apportionment ratio of each unaccounted matching part, and the assembly cost of each unaccounted matching part;
[0013] The cost of the unaccounted object with the smallest sequential identifier based on the cost set includes:
[0014] Calculate the total outbound cost of individual parts based on the outbound cost of each individual part;
[0015] The incoming cost of the unaccounted accessory with the smallest sequence ID is determined according to the total outgoing cost of the parts, the apportionment ratio of the unaccounted accessory with the smallest sequence ID, and the assembly cost of the unaccounted accessory with the smallest sequence ID.
[0016] In one embodiment, the type of the to-be-processed document is a disassembly type, the multiple objects include multiple matching parts and multiple unaccounted parts, and the cost set includes the outbound cost of each matching part, the disassembly cost of each unaccounted part, and the apportionment ratio of each unaccounted part;
[0017] The cost of the unaccounted object with the smallest sequential identifier based on the cost set includes:
[0018] Calculate the total outbound cost of supporting parts based on the outbound cost of each supporting part;
[0019] The warehousing cost of the unaccounted part with the smallest sequence number is determined according to the total outbound cost of the matching parts, the disassembly cost of the unaccounted part with the smallest sequence number, and the allocation ratio of the unaccounted part with the smallest sequence number.
[0020] In one embodiment, the type of the to-be-processed document is a disassembly type, the multiple objects include multiple matching parts and multiple unaccounted parts, and the cost set includes the warehousing cost of each unaccounted part;
[0021] The cost of the unaccounted object with the smallest sequential identifier based on the cost set includes:
[0022] The incoming inventory cost of the unaccounted parts with the smallest sequence identifier is obtained from the cost set.
[0023] In one embodiment, the cost set also includes the outbound cost of each matching part and the disassembly cost of each unaccounted loose part; when the multiple objects do not include unaccounted loose parts, the method further includes:
[0024] Calculate the total outbound cost of supporting parts based on the outbound cost of each supporting part;
[0025] Calculate the total warehousing cost of the parts based on the disassembly cost and warehousing cost of each calculated part;
[0026] The cost difference of the documents to be processed is calculated based on the total cost of the parts entering the warehouse and the total cost of the matching parts leaving the warehouse.
[0027] In a second aspect, the present application also provides a cost accounting device. The device comprises:
[0028] A sequence identification determination module, used to obtain a to-be-processed document, determine the business relationship between multiple objects in the to-be-processed document based on the type of the to-be-processed document, and determine the sequence identification of each object according to the business relationship between the multiple objects;
[0029] A cost set acquisition module, used for acquiring a cost set of the plurality of objects according to the type;
[0030] A cost accounting module is used to identify the cost of the unaccounted object with the smallest accounting sequence based on the cost set, treat the unaccounted object that has been accounted for as the accounted object, update the sequence identification of each unaccounted object based on the business relationship between all the unaccounted objects, and repeat the above process of identifying the cost of the unaccounted object with the smallest accounting sequence based on the cost set and treating the unaccounted object that has been accounted for as the accounted object, until the multiple objects do not include unaccounted objects.
[0031] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0032] Acquire a document to be processed, determine a business relationship between multiple objects in the document to be processed based on the type of the document to be processed, and determine a sequence identifier of each object according to the business relationship between the multiple objects;
[0033] According to the type, obtaining a cost set of the plurality of objects;
[0034] The cost of the unaccounted object with the smallest accounting sequence identifier based on the cost set is used as the accounted object, and the sequence identifier of each unaccounted object is updated based on the business relationship between all unaccounted objects. The above process of calculating the cost of the unaccounted object with the smallest accounting sequence identifier based on the cost set and using the unaccounted object with the smallest accounting sequence identifier as the accounted object is repeated until the multiple objects do not include unaccounted objects.
[0035] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0036] Acquire a document to be processed, determine a business relationship between multiple objects in the document to be processed based on the type of the document to be processed, and determine a sequence identifier of each object according to the business relationship between the multiple objects;
[0037] According to the type, obtaining a cost set of the plurality of objects;
[0038] The cost of the unaccounted object with the smallest accounting sequence identifier based on the cost set is used as the accounted object, and the sequence identifier of each unaccounted object is updated based on the business relationship between all unaccounted objects. The above process of calculating the cost of the unaccounted object with the smallest accounting sequence identifier based on the cost set and using the unaccounted object with the smallest accounting sequence identifier as the accounted object is repeated until the multiple objects do not include unaccounted objects.
[0039] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0040] Acquire a document to be processed, determine a business relationship between multiple objects in the document to be processed based on the type of the document to be processed, and determine a sequence identifier of each object according to the business relationship between the multiple objects;
[0041] According to the type, obtaining a cost set of the plurality of objects;
[0042] The cost of the unaccounted object with the smallest accounting sequence identifier based on the cost set is used as the accounted object, and the sequence identifier of each unaccounted object is updated based on the business relationship between all unaccounted objects. The above process of calculating the cost of the unaccounted object with the smallest accounting sequence identifier based on the cost set and using the unaccounted object with the smallest accounting sequence identifier as the accounted object is repeated until the multiple objects do not include unaccounted objects.
[0043] In the above cost accounting method, according to the type of the document to be processed, the business relationship between multiple objects in the document to be processed is determined, and then the sequence identifier of each object is determined. The cost of the unaccounted object with the smallest sequence identifier is calculated according to the cost set, and the unaccounted object that has been accounted for is taken as the accounted object. The business relationship between the unaccounted objects is determined to update the sequence identifier of each unaccounted object. According to the sequence identifier of each unaccounted object, the next unaccounted object for cost accounting is determined until the cost accounting of all objects is completed. The above cost accounting method, by sorting out the business relationship between the unaccounted objects and successively calculating the cost of the unaccounted object with the smallest sequence identifier, is suitable for the cost accounting of documents with complex business relationships between multiple objects. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 is an application environment diagram of a cost accounting method in an embodiment;
[0045] Figure 2 A schematic diagram of a cost accounting method in one embodiment;
[0046] Figure 3 A schematic diagram of an assembly graphic structure between a plurality of separate parts and a plurality of matching parts in one embodiment;
[0047] Figure 4 A schematic diagram of a disassembly graphic structure between a plurality of loose parts and a plurality of matching parts in one embodiment;
[0048] Figure 5 A schematic diagram of an assembly graphic structure between a plurality of separate parts and a plurality of matching parts in another embodiment;
[0049] Figure 6 It is a schematic diagram of an assembly graphic structure between a plurality of loose parts (F, G, H, E) and a plurality of matching parts (C, D, B, A) in a specific embodiment;
[0050] Figure 7 for Figure 6 A schematic diagram of the assembly graphic structure between multiple matching parts (C, D, B, A);
[0051] Figure 8 A schematic diagram of a cost accounting process when the type of the document to be processed is an assembly type in an embodiment;
[0052] Fig. 9 It is a schematic diagram of a disassembly graphic structure between a plurality of loose parts (F, G, H, E) and a plurality of matching parts (C, D, B, A) in a specific embodiment;
[0053] Fig.10 A schematic diagram of a cost accounting process when the type of the document to be processed is a disassembly type in an embodiment;
[0054] Fig.11 A schematic diagram of a cost accounting process when the type of the document to be processed is a disassembly type in another embodiment;
[0055] Fig.12 is a structural block diagram of a cost accounting device in one embodiment;
[0056] Fig.13 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0058] The cost accounting method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. The cost accounting method is applied to the cost accounting system, and the cost accounting system includes: a terminal 102 and a service 104, and the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The server 104 can be implemented as an independent server or a server cluster consisting of multiple servers.
[0059] The terminal 102 can obtain the documents to be processed from the server 104. The terminal 102 can also determine the business relationship between multiple objects in the documents to be processed based on the type of the documents to be processed, and determine the sequence identification of each object based on the business relationship between the multiple objects. The terminal 102 can also obtain a cost set, and calculate the cost of each uncalculated object based on the cost set.
[0060] The above application environment is only one embodiment. In some embodiments, the terminal 102 can also send the obtained documents to be processed to the server 104. The server 104 determines the business relationship between multiple objects in the documents to be processed based on the type of the documents to be processed, determines the sequence identification of each object according to the business relationship between the multiple objects, obtains the cost set, calculates the cost of each object based on the cost set, and feeds back the cost of each object to the terminal 102.
[0061] In one embodiment, Figure 2 As shown, a cost accounting method is provided, which is applied to Figure 1 The terminal in is used as an example to illustrate, including the following steps:
[0062] S102, obtaining a document to be processed, determining a business relationship between multiple objects in the document to be processed based on the type of the document to be processed, and determining a sequence identifier of each object according to the business relationship between the multiple objects.
[0063] The to-be-processed documents are obtained through an Enterprise Resource Planning (ERP) system. The to-be-processed documents include multiple objects. The multiple objects include sellable commodities and may also include unsellable objects.
[0064] Any object is a matching part or a loose part. Multiple objects include multiple matching parts and multiple loose parts. Loose parts cannot be disassembled. Loose parts are part of matching parts. Multiple loose parts can be assembled into a matching part. Matching parts themselves can also be part of other matching parts.
[0065] For example, the motherboard and CPU are loose parts. The motherboard and CPU can be used as objects separately. The motherboard and CPU can be assembled into a matching part, which can be used as an object. The motherboard and CPU can also be assembled with the chassis, graphics card, and memory stick to form a host. The host can be used as an object, and the chassis, graphics card, and memory stick can all be used as objects separately. The host can be assembled with the monitor, mouse, and keyboard to form a computer. The computer can be used as an object, and the monitor, mouse, and keyboard can all be used as objects. In this example, the motherboard, CPU, chassis, graphics card, memory stick, monitor, mouse, and keyboard are loose parts. The object obtained by assembling the motherboard and CPU, the host, and the computer are matching parts. This example shows that loose parts are part of matching parts, and matching parts themselves can also be part of other matching parts.
[0066] The type of the document to be processed includes at least one of the assembly type and the disassembly type. The document to be processed of the assembly type is an assembly document, and the document to be processed of the disassembly type is a disassembly document. The business relationship includes at least one of the assembly business relationship and the disassembly business relationship. In the case where the type of the document to be processed is the assembly type, the sequence identification of each object is determined based on the assembly business relationship of multiple matching parts obtained by assembling multiple loose parts; in the case where the type of the document to be processed is the disassembly type, the sequence identification of each object is determined based on the disassembly business relationship of multiple loose parts obtained by disassembling multiple matching parts. The sequence identification of the object is used to determine the cost accounting sequence of the object.
[0067] In one embodiment, the to-be-processed documents may include multiple documents, the multiple documents include at least one identical object, and the multiple objects are all objects included in the multiple documents. For example, to perform cost accounting on an object, multiple documents including the object are obtained, and the order identifier of each object is determined based on the business relationship between the multiple objects in the multiple documents.
[0068] S104: Acquire a cost set of the multiple objects according to the type.
[0069] The type is an assembly type or a disassembly type. The cost set includes various expenses for calculating the cost of each object.
[0070] Specifically, when the type of the document to be processed is assembly type, the business of the document to be processed includes at least: multiple loose parts outbound and multiple matching parts inbound, and the cost set includes at least: the outbound cost of each loose part, which is used to calculate the inbound cost of each matching part.
[0071] When the type of the document to be processed is a disassembly type, the business of the document to be processed includes at least: multiple supporting parts outbound and multiple loose parts inbound, and the cost set includes at least: the outbound cost of each supporting part, and the cost set is used to calculate the inbound cost of each loose part.
[0072] S106, based on the cost of the unaccounted object with the smallest accounting sequence identifier in the cost set, the unaccounted object that has been accounted for is regarded as the accounted object, the sequence identifier of each unaccounted object is updated based on the business relationship between all the unaccounted objects, and the above process of calculating the cost of the unaccounted object with the smallest accounting sequence identifier in the cost set and treating the unaccounted object that has been accounted for as the accounted object is repeated until the multiple objects do not include unaccounted objects.
[0073] Specifically, the accounting priority of each object is determined according to the sequence identifier of each object. The sequence identifier and the accounting priority may be set to be negatively correlated, that is, the smaller the sequence identifier, the higher the accounting priority.
[0074] Calculating the cost of the unaccounted object with the smallest sequence identifier based on the cost set includes: determining the unaccounted object with the smallest sequence identifier among all unaccounted objects of the multiple objects, and calculating the cost of the unaccounted object with the smallest sequence identifier based on the cost set. The unaccounted object with the smallest sequence identifier determined for the first time among all unaccounted objects is determined among all objects included in the document to be processed.
[0075] In the case where the type of the document to be processed is an assembly type, the object with the smallest sequence identifier among multiple objects is multiple parts. The unaccounted part with the smallest sequence identifier is determined among the multiple objects, the cost of each unaccounted part is calculated, and each unaccounted part that has been accounted for is used as an accounted part. According to the assembly business relationship between the multiple unaccounted parts, the sequence identifier of each unaccounted part is updated, and the cost of the unaccounted part with the smallest sequence identifier is calculated based on the cost set, and the unaccounted part that has been accounted for is used as an accounted part. According to the assembly business relationship between the multiple unaccounted parts, the sequence identifier of each unaccounted part is updated, and the cost of the unaccounted part with the smallest sequence identifier is calculated based on the cost set, and the unaccounted part that has been accounted for is used as an accounted part. The process is repeated until the multiple objects do not include unaccounted parts.
[0076] When the type of the document to be processed is a disassembly type, the object with the smallest sequence identifier among multiple objects is a supporting part. The cost of the unaccounted supporting part with the smallest sequence identifier is calculated based on the cost set, and the unaccounted supporting part that has been calculated is regarded as an accounted supporting part. According to the disassembly business relationship between multiple unaccounted objects, the sequence identifier of each object is updated, and the above process of calculating the cost of the unaccounted supporting part with the smallest sequence identifier based on the cost set and treating the unaccounted supporting part that has been calculated as an accounted supporting part is repeated until multiple objects do not include unaccounted supporting parts, and the cost of each unaccounted loose part is calculated based on the cost set, and the unaccounted loose part that has been calculated is regarded as an accounted loose part.
[0077] In the above cost accounting method, according to the type of the document to be processed, the business relationship between multiple objects in the document to be processed is determined, and then the sequence identifier of each object is determined. The cost of the unaccounted object with the smallest sequence identifier is calculated according to the cost set, and the unaccounted object that has been accounted for is taken as the accounted object. The business relationship between the unaccounted objects is determined to update the sequence identifier of each unaccounted object. According to the sequence identifier of each unaccounted object, the next unaccounted object for cost accounting is determined until the cost accounting of all objects is completed. The above cost accounting method, by sorting out the business relationship between the unaccounted objects and successively calculating the cost of the unaccounted object with the smallest sequence identifier, is suitable for the cost accounting of documents with complex business relationships between multiple objects.
[0078] In one embodiment, determining the business relationship between multiple objects in the document to be processed based on the type of the document to be processed, and determining the sequence identifier of each object according to the business relationship between the multiple objects includes:
[0079] S111. If the type of the document to be processed is an assembly type, then according to the assembly business relationship of assembling multiple parts in the document to be processed to obtain multiple matching parts, determine the number of other objects assembled to obtain each object, and use the number of other objects assembled to obtain each object as the sequence identifier of each object.
[0080] Specifically, when the type of the document to be processed is an assembly type, the document to be processed is an assembly document, and the sequence identifier of the object in the assembly document can reflect the number of other objects assembled to obtain the object.
[0081] In the assembly document, loose parts are the smallest unit. Loose parts are used to assemble matching parts. Loose parts cannot be disassembled. The number of other objects assembled to obtain loose parts is 0. If the sequence identifier of an object in the assembly document is 0, the object is a loose part. Matching parts are assembled from loose parts and / or matching parts. For any matching part, the total number of loose parts and matching parts assembled to obtain the matching part is used as the sequence identifier of the matching part. The sequence identifier of the matching part in the assembly document is not 0.
[0082] It should be noted that the loose parts and supporting parts assembled to obtain any supporting part are the loose parts and supporting parts obtained by disassembling any supporting part once, or in other words, any supporting part can be obtained by assembling the loose parts and supporting parts once; for the supporting part obtained after disassembling any supporting part once, the supporting part may be further disassembled to obtain other supporting parts and / or other loose parts, but the number of other supporting parts and / or other loose parts obtained by further disassembling the supporting part will not be included in the total number of loose parts and supporting parts assembled to obtain any supporting part.
[0083] For example, if any accessory is a computer, the computer is disassembled once to obtain a monitor, a mouse, a keyboard and a host. Although the host can be further disassembled to obtain a chassis, a memory stick, a motherboard, a CPU, etc., the number of other objects obtained by disassembling the host is not included in the total number of parts and accessories for assembling the computer; in this example, the sequence identifier of the computer is 4.
[0084] S112. If the type of the document to be processed is a disassembly type, then according to the disassembly business relationship of disassembling multiple parts from multiple matching parts in the document to be processed, determine the number of other objects obtained by disassembling each object, and use the number of other objects obtained by disassembling each object as the sequence identifier of each object.
[0085] Specifically, when the type of the document to be processed is a disassembly type, the document to be processed is a disassembly document, and the sequence identifier of the object in the disassembly document can reflect the number of other objects that are disassembled to obtain the object.
[0086] For any object, the number of other objects that can be disassembled to obtain the object is the number of other objects that can be disassembled to obtain the object. In the disassembly document, if there is a matching part that cannot be disassembled by disassembling any other object (the matching part is not an assembled part of any object), the sequence identifier of the matching part is 0.
[0087] For example, in the disassembly document, biscuits can be disassembled into flour, sugar-oil mixture and water, and the sugar-oil mixture can be disassembled into sugar and oil; cakes can be disassembled into flour, water, milk, sugar and eggs; among them, biscuits and cakes cannot be disassembled from other objects, and the sequence identifiers of biscuits and cakes are both 0. Other objects that can be disassembled to obtain flour include biscuits and cakes, and the sequence identifier of flour is 2; other objects that can be disassembled to obtain sugar include sugar-oil mixture and cake, and the sequence identifier of sugar is 2; other objects that can be disassembled to obtain eggs include cakes, and the sequence identifier of eggs is 1.
[0088] In one embodiment, a graphic structure corresponding to the business relationship of multiple objects may be drawn, and a sequence identifier of each object may be determined according to the graphic structure.
[0089] According to the type of documents to be processed, the business relationship between multiple objects is abstracted to obtain the graph structure corresponding to the business relationship of multiple objects. The in-degree of each object is determined according to the graph structure, and the in-degree of each object is used as the sequence identifier of each object. Each object in the graph structure appears only once. The graph structure includes multiple arrows, which point from one object to another. The direction of the arrow between two objects is used to reflect the business relationship between the two objects.
[0090] If the type of the document to be processed is assembly type, draw an assembly graphic structure corresponding to the assembly business relationship between multiple objects. The assembly graphic structure includes multiple objects and multiple assembly arrows. According to the in-degree of each object in the assembly graphic structure, the order identification of each object is determined. The direction of the assembly arrow is: one object points to another object assembled from the object, the tail end of the arrow is the object, and the head end of the arrow is the other object assembled from the object.
[0091] For any object in the assembly graph structure, the object is used as the head of the assembly arrow, and the number of assembly arrows terminating at the object is determined. The number of assembly arrows terminating at the object is the in-degree of the object, and the in-degree of the object is the sequence identifier of the object. In other words, the number of times any object is pointed to is determined, and the number of times the object is pointed to is the in-degree of the object, which is also the sequence identifier of the object.
[0092] The multiple objects include multiple loose parts and multiple matching parts. For an assembly arrow, the head end of the assembly arrow is the matching part, and the tail end of the assembly arrow is the loose parts or other matching parts used to assemble the matching part.
[0093] like Figure 3 As shown, Figure 3 It is an assembly graph structure corresponding to the loose parts: D, E and B and the matching parts: A and C, wherein loose parts D and loose parts E are assembled to obtain matching part C, and matching part C and loose parts B are assembled to obtain matching part A. Therefore, the assembly graph structure includes: an assembly arrow from loose part D to matching part C, an assembly arrow from loose part E to matching part C, an assembly arrow from matching part C to matching part A, and an assembly arrow from loose part B to matching part A. The in-degree of D is 0, and the sequence identifier of D is 0, the in-degree of E is 0, and the sequence identifier of E is 0, the in-degree of C is 2, and the sequence identifier of C is 2, the in-degree of B is 0, and the sequence identifier of B is 0, the in-degree of A is 2, and the sequence identifier of A is 2.
[0094] If the type of the document to be processed is a disassembly type, a disassembly graphic structure corresponding to the disassembly business relationship between multiple objects is drawn. The disassembly graphic structure includes multiple objects and multiple disassembly arrows. The order identification of each object is determined according to the in-degree of each object in the disassembly graphic structure. The direction of the disassembly arrow is: one object points to another object obtained by disassembling the object, the tail end of the arrow is the object, and the head end of the arrow is the other object obtained by disassembling the object.
[0095] For any object in the disassembly graph structure, the object is used as the head of the assembly arrow, and the number of disassembly arrows terminating at the object is determined. The number of disassembly arrows terminating at the object is the in-degree of the object, and the in-degree of the object is the sequence identifier of the object. In other words, the number of times any object is pointed to is determined, and the number of times the object is pointed to is the in-degree of the object, which is also the sequence identifier of the object.
[0096] The multiple objects include multiple loose parts and multiple matching parts. For a disassembly arrow, the tail end of the disassembly arrow is the matching part, and the head end of the disassembly arrow is the loose parts or other matching parts obtained by disassembling the matching part.
[0097] like Figure 4 As shown, Figure 4 The disassembly graph structure corresponds to the loose parts: D, E and B and the matching parts: A and C, wherein the matching part A is disassembled to obtain the matching part C and loose part B, and the matching part C is disassembled to obtain the loose parts D and loose part E. Therefore, the disassembly graph structure includes: the disassembly arrow from the matching part A to the loose part B, the disassembly arrow from the matching part A to the matching part C, the disassembly arrow from the matching part C to the loose part D, and the disassembly arrow from the matching part C to the loose part E. The in-degree of D is 1, and the sequence identifier of D is 1, the in-degree of E is 1, and the sequence identifier of E is 1, the in-degree of C is 1, and the sequence identifier of C is 1, the in-degree of B is 1, and the sequence identifier of B is 1, the in-degree of A is 0, and the sequence identifier of A is 0.
[0098] Due to the complex business relationship between multiple supporting parts and multiple loose parts, it is possible that object 1 is a loose part of object 2, and object 1 is a supporting part of object 2. For example, biscuits can be produced from flour, sugar-oil mixture and water. Flour is a loose part and biscuits are supporting parts. The biscuits with poor shapes produced during the production of biscuits can be crushed into biscuit powder, and the biscuit powder can be used as flour. Flour, sugar-oil mixture and water can continue to produce biscuits. In this case, biscuits are loose parts and flour is a supporting part.
[0099] like Figure 5 As shown, Figure 5 It is a diagram of a graphical structure; object V is assembled to obtain object P, object P and object N are assembled to obtain object G, object G, object W and object K are assembled to obtain object C, and object C is assembled to obtain object V; there are complex business relationships among V, P, G, and C. It is difficult in the prior art to determine which object to cost first among multiple objects with complex business relationships, so it is impossible to perform cost accounting on documents with complex business between multiple objects.
[0100] In this embodiment, according to the type of the document to be processed, the business relationship between multiple objects in the document to be processed is sorted out, and then the sequence identifier of each object is determined. The sequence identifier is used to determine the cost accounting sequence of the object to assist in completing the cost accounting of the document to be processed. Cost accounting is first performed on the object with the smallest sequence identifier, and then the sequence identifiers of other objects are updated according to the business relationship between other objects, and then cost accounting is performed on other objects with the smallest sequence identifier. This is repeated, starting from the object with the smallest sequence identifier, and cost accounting is performed level by level according to the business relationship, ensuring the accuracy of the cost accounting of the document to be processed.
[0101] In one embodiment, the type of the document to be processed is assembly type, and the cost set includes the outbound cost of each individual component, the allocation ratio of each unaccounted matching component, and the assembly cost of each unaccounted matching component.
[0102] Specifically, the type of the document to be processed is the assembly type, and the document to be processed is an assembly document. The business corresponding to the assembly document includes: multiple loose parts outbound and multiple supporting parts inbound; the cost set is used to calculate the outbound cost of each loose part and the inbound cost of each supporting part.
[0103] The outbound cost of each component is obtained in the EPR system; the allocation ratio of the supporting parts can be determined according to the assembly quantity of the supporting parts, or, according to the reference cost setting of the supporting parts, the sum of the allocation ratio of each supporting part is 100%; the user can enter the allocation ratio of each supporting part through the ERP system so that the terminal can obtain the allocation ratio of each supporting part; the assembly cost of the supporting parts is pre-set, and the assembly cost of each supporting part can be directly obtained through the ERP system.
[0104] When the type of the document to be processed is assembly type, and the cost set includes the outbound cost of each individual component, the apportionment ratio of each unaccounted component, and the assembly cost of each unaccounted component, in S106, the cost of the unaccounted object with the smallest order identifier is calculated based on the cost set, including:
[0105] S611A. Calculate the total outbound cost of individual parts based on the outbound cost of each part.
[0106] Specifically, when the type of the document to be processed is the assembly type, the unaccounted object with the smallest sequence identifier is the loose part, the outbound cost of each loose part is obtained, and the outbound cost of each loose part is added to obtain the total outbound cost of the loose parts.
[0107] S612A, determining the incoming cost of the unaccounted accessory with the smallest sequence ID according to the total outgoing cost of the parts, the apportionment ratio of the unaccounted accessory with the smallest sequence ID, and the assembly cost of the unaccounted accessory with the smallest sequence ID.
[0108] Specifically, the incoming cost of the unaccounted supporting part with the smallest sequence identifier = the total outgoing cost of the parts * the apportionment ratio of the unaccounted supporting part with the smallest sequence identifier + the assembly cost of the unaccounted supporting part with the smallest sequence identifier.
[0109] After calculating the warehousing cost of each supporting component, the method further includes:
[0110] The total cost of the incoming parts is calculated based on the total cost of the outgoing parts and the assembly cost of each supporting part (the assembly cost of each unaccounted supporting part in the cost set). Specifically, the total cost of the incoming parts = the total cost of the outgoing parts + the total assembly cost, where the total assembly cost is the sum of the assembly costs of each supporting part.
[0111] For example, Figure 6As shown, the multiple parts in the document to be processed include: F, G, H, E, and the multiple matching parts include: C, D, B, A, Figure 6 It is the assembly graph structure of the assembly business relationship between F, G, H, E and C, D, B, A; the sequence identifiers of F, G, H, E are all 0, the sequence identifier of C is 2, the sequence identifier of D is 3, the sequence identifier of B is 2, and the sequence identifier of A is 3.
[0112] According to the outbound costs of parts F, G, H, and E, calculate the total outbound cost S1 of the parts. All the uncalculated parts in the multiple parts are: A, B, C, and D. According to the assembly business relationship of A, B, C, and D, update the sequence identifier of A, B, C, and D. The assembly business relationship between A, B, C, and D is as follows: Figure 7 As shown, the updated sequence identifier of A is 2, the updated sequence identifier of B is 0, the updated sequence identifier of C is 0, and the updated sequence identifier of D is 0. The unaccounted matching parts with the smallest sequence identifier are: B, C, and D. According to S1, the allocation ratio of B and the assembly cost of B, the storage cost of B is determined, according to S1, the allocation ratio of C and the assembly cost of C, the storage cost of C is determined, according to S1, the allocation ratio of D and the assembly cost of D, the storage cost of D is determined, and B, C, and D are taken as the accounted matching parts. All the unaccounted matching parts in the multiple matching parts are: A. Obviously, the updated sequence identifier of A is 0. According to S1, the allocation ratio of A and the assembly cost of A, the storage cost of A is determined. So far, the storage costs of matching parts A, B, C, and D are calculated. According to S1 and the assembly cost of each matching part, the total storage cost S2 of the matching parts is calculated.
[0113] In this embodiment, if Figure 8 As shown in the figure, when the type of the document to be processed is assembly type, and the cost set includes the outbound cost of each component, the allocation ratio of each unaccounted component, and the assembly cost of each unaccounted component, the cost accounting process includes:
[0114] When multiple loose parts are shipped out, obtain the shipping cost of each loose part, add up the shipping costs of each loose part to get the total shipping cost of the loose parts; obtain the allocation ratio and assembly cost of each supporting part, and determine the incoming cost of each supporting part based on the total shipping cost of the loose parts, the allocation ratio and assembly cost of each supporting part; determine the total incoming cost of the supporting parts based on the assembly cost of each supporting part set and the total shipping cost of the loose parts.
[0115] In this embodiment, the assembly business relationships between multiple objects in the assembly-type pending documents are sorted out, starting from the unaccounted object with the smallest sequence identifier, and accounting is performed step by step according to the assembly business relationships between multiple objects to ensure accurate cost accounting of the pending documents. The total outbound cost of the parts of the pending documents, the inbound cost of each supporting part, and the total inbound cost of the supporting parts can be calculated.
[0116] In one embodiment, the type of the document to be processed is a disassembly type, and the cost set includes the outbound cost of each supporting part, the disassembly cost of each unaccounted part, and the apportionment ratio of each unaccounted part.
[0117] Specifically, the type of the document to be processed is the disassembly type, and the document to be processed is a disassembly document. The business corresponding to the disassembly document includes: multiple supporting parts out of the warehouse and multiple loose parts in of the warehouse. In this embodiment, the cost set is used to calculate the outbound cost of each supporting part and the inbound cost of each loose part.
[0118] The outbound cost of each supporting part is obtained in the EPR system. The allocation ratio of the parts can be set according to the reference cost of the parts. The sum of the allocation ratios of each part is 100%. The disassembly cost of the parts is pre-set and can be directly obtained through the ERP system.
[0119] When the type of the to-be-processed document is a disassembly type, and the cost set includes the outbound cost of each supporting component, the disassembly cost of each unaccounted component, and the apportionment ratio of each unaccounted component, in S106, the cost of the unaccounted object with the smallest sequential identifier is calculated based on the cost set, including:
[0120] S611B. Calculate the total outbound cost of supporting parts based on the outbound cost of each supporting part.
[0121] Specifically, the outbound cost of each supporting component is obtained from the cost set, and the outbound cost of each supporting component is added together to obtain the total outbound cost of the supporting component.
[0122] S612B, determining the incoming cost of the unaccounted part with the smallest sequence ID according to the total outgoing cost of the matching parts, the disassembly cost of the unaccounted part with the smallest sequence ID, and the allocation ratio of the unaccounted part with the smallest sequence ID.
[0123] Specifically, the incoming cost of the unaccounted part with the smallest sequence number = the total outgoing cost of the supporting parts * the allocation ratio of the unaccounted part with the smallest sequence number + the disassembly cost of the unaccounted part with the smallest sequence number.
[0124] After calculating the warehousing cost of each component, the method further includes:
[0125] The total cost of incoming parts is calculated based on the disassembly cost of each part (the disassembly cost of each unaccounted part in the cost set) and the total cost of outgoing parts. Specifically, the total cost of incoming parts = the total cost of outgoing parts + the total disassembly cost. The total disassembly cost is the sum of the disassembly costs of each part.
[0126] For example, Fig. 9 As shown, the multiple parts in the document to be processed include: F, G, H, E, and the multiple matching parts include: C, D, B, A, Fig. 9 It is the disassembly graph structure of the disassembly business relationship between F, G, H, E and C, D, B, A; the sequence identifiers of A and B are 0, the sequence identifier of C is 1, the sequence identifier of D is 1, the sequence identifier of E is 2, the sequence identifier of F is 1, the sequence identifier of G is 3, and the sequence identifier of H is 2. The total outbound cost R1 of the supporting parts is calculated based on the outbound costs of multiple supporting parts: A, B, C, D; according to the disassembly business relationship between all unaccounted loose parts (F, G, H, E), the sequence identifier of each unaccounted loose part is updated, and the updated sequence identifiers of F, G, H, and E are all 0. Then, according to the disassembly cost of R1 and F and the allocation ratio of F, the incoming cost of F is determined, according to the disassembly cost of R1 and G and the allocation ratio of G, the incoming cost of G is determined, according to the disassembly cost of R1 and H and the allocation ratio of H, the incoming cost of H is determined, according to the disassembly cost of R1 and H and the allocation ratio of H, the incoming cost of E is determined according to the disassembly cost of R1 and E and the allocation ratio of E. Add up the disassembly costs of F, G, H, and E to get the total disassembly cost R2, and add the total cost of accessories out of the warehouse R1 and the total disassembly cost R2 to get the total cost of parts entering the warehouse R3.
[0127] In this embodiment, if Fig.10 As shown, when the type of the to-be-processed document is a disassembly type, and the cost set includes the outbound cost of each supporting component, the disassembly cost of each unaccounted component, and the allocation ratio of each unaccounted component, the cost accounting process includes:
[0128] When multiple supporting parts are shipped out, obtain the shipping cost of each supporting part, add up the shipping costs of each supporting part to get the total shipping cost of the supporting parts; obtain the disassembly cost and allocation ratio of each loose part, determine the incoming cost of each loose part based on the total shipping cost of the supporting parts, the disassembly cost of each loose part and the allocation ratio, and calculate the total incoming cost of the supporting parts based on the disassembly cost of each loose part and the total shipping cost of the supporting parts.
[0129] In this embodiment, the disassembly business relationship between multiple objects in the disassembly type pending documents is sorted out, and the total outbound cost of multiple supporting parts is calculated first, and then the incoming cost of each loose part is calculated to ensure that the cost accounting of the pending documents is accurate. The total outbound cost of supporting parts, the total incoming cost of loose parts and the incoming cost of each loose part of the pending documents can be obtained.
[0130] In one embodiment, the type of the document to be processed is a disassembly type, and the cost set includes the warehousing cost of each unaccounted part.
[0131] Specifically, the type of the document to be processed is a disassembly type, and the document to be processed is a disassembly document. The business corresponding to the disassembly document includes: multiple matching parts out of the warehouse and multiple loose parts in the warehouse. In this embodiment, the cost set is used to calculate the total cost of matching parts out of the warehouse, the total cost of loose parts in the warehouse, and the cost difference between the total cost of loose parts in the warehouse and the total cost of matching parts out of the warehouse. The in-warehousing cost of each loose part is obtained in the EPR system.
[0132] When the type of the to-be-processed document is a disassembly type and the cost set includes the warehousing cost of each unaccounted part, in S106, the cost of the unaccounted object with the smallest sequential identifier is calculated based on the cost set, including:
[0133] S611C. Obtain the inventory cost of the unaccounted parts with the smallest sequence identifier from the cost set.
[0134] Specifically, the incoming inventory cost of the unaccounted parts with the smallest sequence identifier is obtained from the cost set until the incoming inventory cost of each part is obtained.
[0135] The cost set also includes: the outbound cost of each matching part and the disassembly cost of each unaccounted part. After obtaining the inbound cost of each part, the multiple objects include multiple accounted parts and do not include unaccounted parts, and the method also includes:
[0136] S612C. Calculate the total outbound cost of the supporting parts based on the outbound cost of each supporting part. Calculate the total inbound cost of the parts based on the disassembly cost and inbound cost of each calculated loose part. Calculate the cost difference of the documents to be processed based on the total inbound cost of the loose parts and the total outbound cost of the supporting parts.
[0137] Specifically, the outbound costs of each supporting component are added together to obtain the total outbound cost of the supporting component, and the disassembly costs and inbound costs of each calculated loose component are added together to obtain the total inbound cost of the loose component. Cost difference = total outbound cost of the supporting component - total inbound cost of the loose component.
[0138] In this embodiment, if Fig.11 As shown, when the type of the to-be-processed document is a disassembly type and the cost set includes the warehousing cost of each unaccounted part, the cost accounting process includes:
[0139] When multiple supporting parts are shipped out, obtain the shipping cost of each supporting part, add up the shipping costs of each supporting part to get the total shipping cost of the supporting parts; obtain the disassembly cost and storage cost of each loose part, add up the disassembly cost and storage cost of each loose part, calculate the total storage cost of the loose parts, calculate the difference between the total shipping cost of the supporting parts and the total storage cost of the loose parts, and get the cost difference.
[0140] In this embodiment, the disassembly business relationship between multiple objects in the disassembly type pending documents is sorted out, the incoming cost of each loose part is calculated, the total incoming cost of the loose parts is calculated based on the incoming cost of each loose part, the total outgoing cost of the supporting parts is calculated based on the outgoing cost of each supporting part, and the cost difference of the pending documents is calculated based on the total incoming cost of the loose parts and the total outgoing cost of the supporting parts.
[0141] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0142] Based on the same inventive concept, the embodiment of the present application also provides a cost accounting device for implementing the cost accounting method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more cost accounting device embodiments provided below can refer to the limitations on the cost accounting method above, and will not be repeated here.
[0143] In one embodiment, Fig.12 As shown, a cost accounting device is provided, comprising:
[0144] The sequence identification determination module 100 is used to obtain a document to be processed, determine the business relationship between multiple objects in the document to be processed based on the type of the document to be processed, and determine the sequence identification of each object according to the business relationship between the multiple objects;
[0145] A cost set acquisition module 200, configured to acquire a cost set of the plurality of objects according to the type;
[0146] The cost accounting module 300 is used to identify the cost of the unaccounted object with the smallest accounting sequence based on the cost set, treat the unaccounted object that has been accounted for as the accounted object, update the sequence identification of each unaccounted object based on the business relationship between all the unaccounted objects, and repeat the above process of identifying the cost of the unaccounted object with the smallest accounting sequence based on the cost set and treating the unaccounted object that has been accounted for as the accounted object, until the multiple objects do not include unaccounted objects.
[0147] In one embodiment, the plurality of objects include a plurality of parts and a plurality of matching parts, the business relationship includes at least one of an assembly business relationship and a disassembly business relationship; and the sequence identification determination module includes:
[0148] A first sequence identification determination unit is used to determine the number of other objects assembled to obtain each object according to the assembly business relationship of assembling multiple parts in the document to be processed to obtain multiple matching parts if the type of the document to be processed is an assembly type, and use the number of other objects assembled to obtain each object as the sequence identification of each object;
[0149] The second sequence identification determination unit is used to determine the number of other objects obtained by disassembling each object according to the disassembly business relationship of disassembling multiple parts from multiple matching parts in the document to be processed if the type of the document to be processed is a disassembly type, and use the number of other objects obtained by disassembling each object as the sequence identification of each object.
[0150] In one embodiment, the type of the to-be-processed document is an assembly type, the multiple objects include multiple loose parts and multiple unaccounted matching parts, the cost set includes the outbound cost of each loose part, the allocation ratio of each unaccounted matching part, and the assembly cost of each unaccounted matching part, and the cost accounting module includes:
[0151] The first assembly type accounting unit is used to calculate the total outbound cost of the parts according to the outbound cost of each part;
[0152] The second assembly type accounting unit is used to determine the storage cost of the unaccounted supporting part with the smallest sequence identifier according to the total outgoing cost of the loose parts, the apportionment ratio of the unaccounted supporting part with the smallest sequence identifier, and the assembly cost of the unaccounted supporting part with the smallest sequence identifier;
[0153] In one embodiment, the type of the to-be-processed document is a disassembly type, the multiple objects include multiple matching parts and multiple unaccounted parts, the cost set includes the outbound cost of each matching part, the disassembly cost of each unaccounted part, and the allocation ratio of each unaccounted part, and the cost accounting module includes:
[0154] The first disassembly type accounting unit is used to calculate the total outbound cost of the supporting parts according to the outbound cost of each supporting part.
[0155] The second disassembly type accounting unit is used to determine the warehousing cost of the unaccounted part with the smallest sequence identifier based on the total outbound cost of the accessories, the disassembly cost of the unaccounted part with the smallest sequence identifier, and the apportionment ratio of the unaccounted part with the smallest sequence identifier.
[0156] In one embodiment, the type of the to-be-processed document is a disassembly type, the multiple objects include multiple matching parts and multiple unaccounted parts, the cost set includes the warehousing cost of each unaccounted part, and the cost accounting module includes:
[0157] The third disassembly type accounting unit is used to obtain the inventory cost of the unaccounted parts with the smallest sequence identifier from the cost set.
[0158] In one embodiment, the cost set also includes the outbound cost of each supporting component and the disassembly cost of each unaccounted component; when the multiple objects do not include unaccounted components, the cost accounting module further includes:
[0159] The fourth disassembly type accounting unit is used to calculate the total outbound cost of the supporting parts according to the outbound cost of each supporting part; calculate the total inbound cost of the parts according to the disassembly cost and inbound cost of each calculated loose part; and calculate the cost difference of the document to be processed according to the total inbound cost of the loose parts and the total outbound cost of the supporting parts.
[0160] Each module in the above-mentioned cost accounting device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.
[0161] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.13 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a cost accounting method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, a trackball or a touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0162] Those skilled in the art will understand that Fig.13The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0163] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0164] Acquire a document to be processed, determine a business relationship between multiple objects in the document to be processed based on the type of the document to be processed, and determine a sequence identifier of each object according to the business relationship between the multiple objects;
[0165] According to the type, obtaining a cost set of the plurality of objects;
[0166] The cost of the unaccounted object with the smallest accounting sequence identifier based on the cost set is used as the accounted object, and the sequence identifier of each unaccounted object is updated based on the business relationship between all unaccounted objects. The above process of calculating the cost of the unaccounted object with the smallest accounting sequence identifier based on the cost set and using the unaccounted object with the smallest accounting sequence identifier as the accounted object is repeated until the multiple objects do not include unaccounted objects.
[0167] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0168] Acquire a document to be processed, determine a business relationship between multiple objects in the document to be processed based on the type of the document to be processed, and determine a sequence identifier of each object according to the business relationship between the multiple objects;
[0169] According to the type, obtaining a cost set of the plurality of objects;
[0170] The cost of the unaccounted object with the smallest accounting sequence identifier based on the cost set is used as the accounted object, and the sequence identifier of each unaccounted object is updated based on the business relationship between all unaccounted objects. The above process of calculating the cost of the unaccounted object with the smallest accounting sequence identifier based on the cost set and using the unaccounted object with the smallest accounting sequence identifier as the accounted object is repeated until the multiple objects do not include unaccounted objects.
[0171] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0172] Acquire a document to be processed, determine a business relationship between multiple objects in the document to be processed based on the type of the document to be processed, and determine a sequence identifier of each object according to the business relationship between the multiple objects;
[0173] According to the type, obtaining a cost set of the plurality of objects;
[0174] The cost of the unaccounted object with the smallest accounting sequence identifier based on the cost set is used as the accounted object, and the sequence identifier of each unaccounted object is updated based on the business relationship between all unaccounted objects. The above process of calculating the cost of the unaccounted object with the smallest accounting sequence identifier based on the cost set and using the unaccounted object with the smallest accounting sequence identifier as the accounted object is repeated until the multiple objects do not include unaccounted objects.
[0175] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0176] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0177] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0178] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A cost accounting method, characterized in that: The method comprises: Acquire a document to be processed, where the type of the document to be processed includes an assembly type or a disassembly type, determine a business relationship between multiple objects in the document to be processed based on the type of the document to be processed, and determine a sequence identifier of each object according to the business relationship between the multiple objects; According to the type, obtaining a cost set of the plurality of objects; Calculating the cost of the unaccounted object with the smallest accounting sequence identifier based on the cost set, taking the unaccounted object that has been accounted for as the accounted object, updating the sequence identifier of each unaccounted object based on the business relationship between all the unaccounted objects, and repeating the above process of calculating the cost of the unaccounted object with the smallest accounting sequence identifier based on the cost set and taking the unaccounted object that has been accounted for as the accounted object, until the multiple objects do not include unaccounted objects; The multiple objects include multiple parts and multiple matching parts, and the business relationship includes an assembly business relationship or a disassembly business relationship; determining the business relationship between the multiple objects in the document to be processed based on the type of the document to be processed, and determining the sequence identifier of each object according to the business relationship between the multiple objects, includes: If the type of the to-be-processed document is an assembly type, then according to the assembly business relationship of assembling multiple parts in the to-be-processed document to obtain multiple matching parts, the number of other objects assembled to obtain each object is determined, and the number of other objects assembled to obtain each object is used as a sequence identifier of each object; If the type of the document to be processed is a disassembly type, the number of other objects obtained by disassembling each object is determined according to the disassembly business relationship of disassembling multiple parts from multiple matching parts in the document to be processed, and the number of other objects obtained by disassembling each object is used as the sequence identifier of each object.
2. The method according to claim 1, characterized in that The type of the document to be processed is assembly type, the multiple objects include multiple loose parts and multiple unaccounted matching parts, and the cost set includes the outbound cost of each loose part, the allocation ratio of each unaccounted matching part, and the assembly cost of each unaccounted matching part; The cost of the unaccounted object with the smallest sequential identifier based on the cost set includes: Calculate the total outbound cost of individual parts based on the outbound cost of each individual part; The incoming cost of the unaccounted accessory with the smallest sequence ID is determined according to the total outgoing cost of the parts, the apportionment ratio of the unaccounted accessory with the smallest sequence ID, and the assembly cost of the unaccounted accessory with the smallest sequence ID.
3. The method according to claim 1, characterized in that The type of the document to be processed is a disassembly type, the multiple objects include multiple supporting parts and multiple unaccounted parts, and the cost set includes the outbound cost of each supporting part, the disassembly cost of each unaccounted part, and the apportionment ratio of each unaccounted part; The cost of the unaccounted object with the smallest sequential identifier based on the cost set includes: Calculate the total outbound cost of supporting parts based on the outbound cost of each supporting part; The warehousing cost of the unaccounted part with the smallest sequence number is determined according to the total outbound cost of the matching parts, the disassembly cost of the unaccounted part with the smallest sequence number, and the allocation ratio of the unaccounted part with the smallest sequence number.
4. The method according to claim 1, characterized in that: The type of the document to be processed is a disassembly type, the multiple objects include multiple matching parts and multiple unaccounted parts, and the cost set includes the warehousing cost of each unaccounted part; The cost of the unaccounted object with the smallest sequential identifier based on the cost set includes: The incoming inventory cost of the unaccounted parts with the smallest sequence identifier is obtained from the cost set.
5. The method according to claim 4, characterized in that The cost set also includes the outbound cost of each supporting component and the disassembly cost of each unaccounted loose component; When the plurality of objects do not include unaccounted parts, the method further includes: Calculate the total outbound cost of supporting parts based on the outbound cost of each supporting part; Calculate the total warehousing cost of the parts based on the disassembly cost and warehousing cost of each calculated part; The cost difference of the documents to be processed is calculated based on the total cost of the parts entering the warehouse and the total cost of the matching parts leaving the warehouse.
6. A cost accounting device, characterized in that: The device comprises: A sequence identification determination module is used to obtain a document to be processed, wherein the type of the document to be processed includes an assembly type or a disassembly type, determine the business relationship between multiple objects in the document to be processed based on the type of the document to be processed, and determine the sequence identification of each object according to the business relationship between the multiple objects; A cost set acquisition module, used for acquiring a cost set of the plurality of objects according to the type; a cost accounting module, configured to calculate the cost of the unaccounted object with the smallest sequential identifier based on the cost set, take the unaccounted object that has been accounted for as the accounted object, update the sequential identifier of each unaccounted object based on the business relationship between all the unaccounted objects, and repeat the above process of calculating the cost of the unaccounted object with the smallest sequential identifier based on the cost set and taking the unaccounted object that has been accounted for as the accounted object, until the multiple objects do not include the unaccounted object; The multiple objects include multiple parts and multiple matching parts, and the business relationship includes an assembly business relationship or a disassembly business relationship; the sequence identification determination module includes: A first sequence identification determination unit is used to determine the number of other objects assembled to obtain each object according to the assembly business relationship of assembling multiple parts in the document to be processed to obtain multiple matching parts if the type of the document to be processed is an assembly type, and use the number of other objects assembled to obtain each object as the sequence identification of each object; The second sequence identification determination unit is used to determine the number of other objects obtained by disassembling each object according to the disassembly business relationship of disassembling multiple parts from multiple matching parts in the document to be processed if the type of the document to be processed is a disassembly type, and use the number of other objects obtained by disassembling each object as the sequence identification of each object.
7. The device according to claim 6, characterized in that The type of the document to be processed is assembly type, the multiple objects include multiple parts and multiple unaccounted matching parts, the cost set includes the outbound cost of each part, the allocation ratio of each unaccounted matching part, and the assembly cost of each unaccounted matching part, and the cost accounting module includes: The first assembly type accounting unit is used to calculate the total outbound cost of the parts according to the outbound cost of each part; The second assembly type accounting unit is used to determine the incoming cost of the unaccounted accessory with the smallest sequence identifier based on the total outgoing cost of the loose parts, the apportionment ratio of the unaccounted accessory with the smallest sequence identifier, and the assembly cost of the unaccounted accessory with the smallest sequence identifier.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Cost accounting method and device, computer equipment and storage medium
CN111178830A
Service updating method and device, storage medium and electronic device
CN112379906A