Method, processor, and machine-readable storage medium for material cost presentation
By synchronizing material and cost data to the Doris database, creating non-partitioned tables, and utilizing the tree dataset function of the reporting software, the limitations of data volume and display capabilities in traditional material cost analysis methods are solved, achieving efficient and dynamic material cost display and meeting the lean management needs of manufacturing enterprises.
Patent Information
- Application Number
- CN202211493117.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-25
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2042-11-25
AI Technical Summary
Traditional material cost analysis methods are limited in terms of data volume, data source range, and dynamic data display capabilities, which cannot meet the increasingly sophisticated management needs of manufacturing enterprises. Furthermore, manual execution is time-consuming and costly, making them unsuitable for big data analysis.
By synchronizing material and cost data to the Doris database, creating non-partitioned tables, determining the cost and expense types, levels, and parent-child relationships of the data, and utilizing the tree dataset function of the reporting software, the data can be automatically integrated and quickly displayed.
It improves data processing and report loading efficiency, enhances the dynamic display capability of cost data, meets the lean management needs of enterprises, and realizes intuitive and convenient data display.
Smart Images

Figure CN115757661B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a method for material cost display, a processor and a machine readable storage medium. BACKGROUND
[0002] In the field of industrial production, cost management is a key link in enterprise internal management. Single-piece production or multi-variety small-batch production is common in manufacturing production process. The corresponding product composition and all materials involved are various when producing in this production form, and the material costs of different materials are not the same. The traditional data analysis method exports product BOM (Bill of Material) data and cost accounting details from the business system to an excel file respectively, to realize the merging of the two data packages in a manual way, and further analyzes by filtering, sorting, and data visualization functions, and finally draws the analysis conclusion for display.
[0003] The traditional data analysis method has limited data volume, data source range and data dynamic display capability. At the same time, manual execution is time-consuming and high-cost, which cannot be applied to big data analysis and cannot meet the increasing lean management needs of enterprises. There is an urgent need for an efficient and dynamic material data and financial cost data integration analysis method to improve the dynamic display capability of cost data and solve the problem of product cost management in manufacturing enterprises. SUMMARY
[0004] In view of the above deficiencies in the prior art, the purpose of the embodiments of the present application is to provide a method for material cost display, a processor and a machine readable storage medium.
[0005] In order to achieve the above-mentioned purpose, the first aspect of the present application provides a method for material cost display, comprising:
[0006] Determine the associated data synchronized to the Doris database;
[0007] Establish a non-partition table based on the detailed model and the associated data of the Doris database;
[0008] Determine the cost expense type, level and parent-child relationship between data in the non-partition table;
[0009] Determine the whole machine code and material code based on the level;
[0010] Determine the whole machine cost structure according to the cost expense type corresponding to the whole machine code;
[0011] Determine the material cost structure according to the cost expense type corresponding to the material code;
[0012] Determine the BOM structure based on the hierarchy, parent-child relationship and tree dataset function of the report software;
[0013] According to the display requirement information, associate the tree node button in the report software with any one of the whole machine cost structure, the material cost structure and the BOM structure;
[0014] In the case that the tree node button is triggered, display the whole machine cost table based on the whole machine cost structure or display the BOM cost detail table based on the material cost structure and the BOM structure.
[0015] In the embodiment of the present application, the associated data synchronized to the Doris database is determined, comprising:
[0016] The incremental data extracted from the business system is merged with the historical data to generate full data, wherein the full data includes material full data and cost full data;
[0017] The material full data and the cost full data are associated based on the business relationship to obtain the associated data;
[0018] The associated data is synchronized to the Doris database.
[0019] In the embodiment of the present application, the incremental data extracted from the business system is merged with the historical data to generate full data, comprising:
[0020] Based on the preset frequency, the material incremental data and the cost incremental data are extracted from the business system to the data warehouse by the data synchronization tool to generate data files;
[0021] The data files are mapped into database partition tables by the interactive query system;
[0022] The database processing files are executed based on the database partition tables by the timing scheduling platform to clean the data files;
[0023] The cleaned data files are merged with the historical data to obtain the full data.
[0024] In the embodiment of the present application, the material full data and the cost full data are associated based on the business relationship to obtain the associated data, comprising:
[0025] Determine the screening table based on the business scenario requirement information;
[0026] Screen the material full data based on the screening table to determine the target material full data;
[0027] The target material full data and the cost full data are associated based on the business relationship to obtain the associated data.
[0028] In the embodiment of the present application, the associated data is synchronized to the Doris database, comprising:
[0029] The associated data is synchronized to the Doris database by the timing scheduling platform based on the preset time timing execution of the data synchronization script.
[0030] In the embodiment of the present application, a non-partition table is established based on the detailed model of the Doris database and the associated data, comprising:
[0031] According to the query requirement information and the associated data, the sorting column in the detailed model of the Doris database is determined.
[0032] The non-partition table is established based on the detailed model, the sorting column and the associated data.
[0033] In the embodiment of the present application, further comprising:
[0034] The corresponding relationship between the whole machine cost table and the BOM cost detailed table is determined based on the hierarchy and the parent-child relationship.
[0035] According to the corresponding relationship, the whole machine code used for triggering the hyperlink jump is determined.
[0036] In the case that the whole machine code is triggered, the hyperlink jump from the whole machine cost table to the BOM cost detailed table is performed.
[0037] In the embodiment of the present application, further comprising:
[0038] According to the business requirement information, the target time range included by each row data in the whole machine cost table and the BOM cost detailed table is determined, wherein the target time range contains a plurality of first time ranges.
[0039] The row data corresponding to each first time range in the non-partition table is determined.
[0040] The plurality of row data corresponding to the target time range is converted into a plurality of column data by the table connection, so as to display the data corresponding to the target time range in the form of column data when the whole machine cost table or the BOM cost detailed table is displayed.
[0041] The second aspect of the present application provides a processor configured to execute the method for material cost display as described in the above embodiment.
[0042] The third aspect of the present application provides a machine readable storage medium, and the machine readable storage medium stores instructions for causing a machine to execute the method for material cost display as described in the above embodiment.
[0043] By the technical solution, the associated data synchronized to the Doris database is determined, the non-partition table is established based on the detail model and the associated data of the Doris database, the cost expense type, the level and the parent-child relationship between the data in the non-partition table are determined, the whole machine coding and the material coding are determined based on the level, the whole machine cost structure is determined according to the cost expense type corresponding to the whole machine coding, the material cost structure is determined according to the cost expense type corresponding to the material coding, the BOM structure is determined based on the level, the parent-child relationship and the tree dataset function of the report software, the tree node button in the report software is associated with any one of the whole machine cost structure, the material cost structure and the BOM structure according to the display requirement information, and in the case that the tree node button is triggered, the whole machine cost table is displayed based on the whole machine cost structure or the BOM cost detail table is displayed based on the material cost structure and the BOM structure. The data automatic integration and analysis are realized, the non-partition table is established through the Doris database, the report loading efficiency is improved, the report data is quickly displayed by using the tree node button of the report software, the display effect is more intuitive through the cost structure and the BOM structure, and the convenience and efficiency of the report display are improved.
[0044] Other features and advantages of the embodiments of the present application will be described in detail in the following specific embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0045] The accompanying drawings are included to provide a further understanding of the embodiments of the present application, and constitute a part of the specification, and are used to explain the embodiments of the present application together with the following specific embodiments, but do not constitute a limitation of the embodiments of the present application. In the drawings:
[0046] Figure 1 It is a flowchart of a method for material cost display according to an embodiment of the present application;
[0047] Figure 2 It is a schematic diagram of a non-partition table according to an embodiment of the present application;
[0048] Figure 3 It is a schematic diagram of a whole machine cost table according to an embodiment of the present application;
[0049] Figure 4 It is a schematic diagram of a BOM cost detail table according to an embodiment of the present application;
[0050] Figure 5 It is a schematic diagram of data association according to an embodiment of the present application. DETAILED DESCRIPTION
[0051] The specific embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application.
[0052] It should be noted that if the application embodiments involve directionality indication (such as up, down, left, right, front, back, etc.), the directionality indication is only used to explain the relative position relationship, motion condition, etc. between components in a certain posture (as shown in the drawings), and if the certain posture changes, the directionality indication also changes accordingly.
[0053] In addition, if the application embodiments involve "first", "second" and the like, the "first", "second" and the like are only for description purposes, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of indicated technical features. Therefore, the features limited by "first", "second" can be explicitly or implicitly included at least one of the features. In addition, the technical solutions of each embodiment can be combined with each other, but it must be based on the realization of ordinary skilled in the art, when the combination of technical solutions appears contradictory or unachievable, it should be considered that the combination of technical solutions does not exist, nor within the scope of protection claimed in the present application.
[0054] Figure 1 The flowchart of the method for material cost display according to an embodiment of the present application is shown. As shown in the figure, in the embodiment of the present application, a method for material cost display is provided, which is taken as an example for description by using a processor, and the method can include the following steps: Figure 1 As shown in the figure, in the embodiment of the present application, a method for material cost display is provided, which is taken as an example for description by using a processor, and the method can include the following steps:
[0055] Step S100, determine the associated data synchronized to the Doris database;
[0056] In the embodiment, it should be noted that in the production process, the data corresponding to the bill of materials and cost accounting details needs to be merged, so as to perform analysis operations such as screening, sorting, and data visualization on the merged data according to business requirements, determine the material cost analysis conclusion, and provide a reference for product cost management for users. The associated data includes mutually associated material data and cost data, that is, the data obtained after merging the data corresponding to the bill of materials and cost accounting details. The associated data can be incremental data, including mutually associated material incremental data and cost incremental data; or full data, including mutually associated material full data and cost full data. The Doris database is a high-performance, real-time analytical database, and in the embodiment, the associated data is synchronized to the Doris database, and the performance of the Doris database improves the data real-time analysis capability and improves the data analysis efficiency.
[0057] Step S200, establish a non-partition table based on the detail model of the Doris database and the associated data;
[0058] In this embodiment, it should be noted that the Doris database primarily uses three data models: detail model, aggregation model, and update model. The detail model is the default data model used by the Doris database. In the detail model, no processing is performed on the imported data; the original imported data is retained. In this embodiment, both material and cost data must retain their original values to suit the detail model. Doris database data is stored in a data structure similar to SSTable (Sorted String Table), which is an ordered data structure that can be sorted and stored according to specified columns. Based on the Doris database data storage structure, searches are performed using the sorted column as a condition to improve query efficiency. In this embodiment, by utilizing the sorted column in the detail model, columns frequently used for filtering in queries are placed at the beginning of the table during table creation to improve query speed.
[0059] Specifically, non-partitioned tables are built based on the detailed model and related data of the Doris database, including:
[0060] Step a: Determine the sorting column in the detailed model of the Doris database based on the query requirements and related data;
[0061] Step b: Create a non-partitioned table based on the detailed model, sorted sequence, and related data.
[0062] In this embodiment, it should be noted that the query requirement information includes frequently queried objects, such as the master material number field, factory, cost accounting date, etc. These frequently queried objects from the associated data are used as the sorting sequence in the Doris database's detailed model. When these frequently queried objects are searched, a rapid response is achieved to improve query efficiency. This query requirement information can be adaptively changed according to actual business scenario requirements to improve query efficiency under different business scenarios. The non-partitioned tables include data storage tables in the Doris database, serving as the base tables to provide a data foundation for subsequent report design. (Reference) Figure 2 Here is an example of a non-partitioned representation in one embodiment. The table has 19 fields, including field names, data types, and corresponding comments.
[0063] Step S300: Determine the cost type, level, and parent-child relationship of the data in the non-partitioned table;
[0064] It should be noted that the bill of materials and cost accounting details have multi-level comprehensive data in the embodiment. For example, the materials can include parts, semi-finished products, finished products, etc. For another example, the cost can include the whole machine cost and the material cost, and the cost expense type includes the specific cost types such as the material cost, labor cost, fixed cost, etc. corresponding to the whole machine or the materials. There can be a horizontal or superior-inferior relationship between the material data or the cost data. In the embodiment, when data analysis is performed, the hierarchy of the material data and the cost data and the parent-child relationship between the data are represented based on the relationship between the data, and are defined in the fields corresponding to the data when the non-partition table is established. Specifically, the processor determines the hierarchy of the data and the parent-child relationship between the data based on the field information in the non-partition table.
[0065] In step S400, the whole machine code and the material code are determined based on the hierarchy.
[0066] In step S500, the whole machine cost structure is determined according to the cost expense type corresponding to the whole machine code.
[0067] In step S600, the material cost structure is determined according to the cost expense type corresponding to the material code.
[0068] It should be noted that the cost structure includes the cost-related detailed information displayed in the report software, including the whole machine cost structure and the material cost structure. The data in the non-partition table correspond to the cost expense type and the hierarchy, and the data are determined to be the cost data of the whole machine or the cost data of the materials according to different hierarchies. The code corresponding to the cost data of the whole machine is the whole machine code; the code corresponding to the cost data of the materials is the material code. The cost expense type is a sub-item constituting the cost structure, including the material cost, labor cost, fixed cost, variable cost, etc. In the non-partition table, the code is associated with the cost expense type, and the cost expense type associated with the whole machine code constitutes the whole machine cost structure, and the cost expense type associated with the material code constitutes the material cost structure. For example, when the non-partition table is established, the codes of the data related to the whole machine are defined as the hierarchy of zero; the codes of the data related to the materials are defined as the hierarchy of 1 and 2, then the processor groups the data with the hierarchy of zero into the whole machine cost structure of the whole machine; and groups the data with the hierarchy of 1 and 2 into the material cost structure of the materials.
[0069] It can be understood that the cost structure includes the specific constituent components constituting a certain cost, for example, the specific constituent components of the whole machine cost can include the material cost, labor cost, fixed cost, variable cost, etc. of the whole machine. When the cost information related to the whole machine is queried, the specific constituent components can be displayed.
[0070] In step S700, the BOM structure is determined based on the hierarchy, the parent-child relationship, and the tree dataset function of the report software.
[0071] It should be noted that the BOM structure includes the structure information of the bill of materials corresponding to a certain complete machine displayed in the report software. The report software includes software for report display, and after determining the non-partition table in the Doris database, the report conversion of the non-partition table is displayed in the report software. The BOM structure includes the bill of materials information corresponding to a certain complete machine, and the materials corresponding to a complete machine can include materials such as parts, semi-finished products, finished products, etc. having a superior-inferior relationship. The processor determines the BOM structure based on the hierarchy and parent-child relationship defined when the non-partition table is established.
[0072] It can be understood that the BOM structure includes all material components constituting a certain complete machine, such as parts, semi-finished products, etc. The report software includes software for displaying final data analysis reports, and in this embodiment, it can include FineReport. The tree dataset function can generate a corresponding organization tree report based on the hierarchy and parent-child relationship. The BOM structure containing the parent-child relationship can be generated through the tree dataset function and the hierarchy and parent-child relationship in the non-partition table.
[0073] In step S800, the tree node button in the report software is associated with any one of the complete machine cost structure, the material cost structure, and the BOM structure according to the display requirement information;
[0074] It should be noted that the tree node button includes a trigger control for controlling the expansion or folding of the complete machine cost structure, the material cost structure, and the BOM structure. By associating the tree node button with any one of the complete machine cost structure, the material cost structure, and the BOM structure, the structure associated with the tree node button in the complete machine cost structure, the material cost structure, and the BOM structure can be displayed when the tree node button is triggered. The display requirement information includes corresponding information for associating the tree node button with the complete machine cost structure, the material cost structure, and the BOM structure, and is used to limit the degree or range of expansion or folding of the complete machine cost structure, the material cost structure, and the BOM structure after the tree node button is triggered. For example, the tree node button is limited to be associated with the first level of the BOM structure in the display requirement information, and the data level of the BOM structure is expanded to the first level after the tree node button is triggered.
[0075] It can be understood that the tree node button is a trigger control for expanding or folding the complete machine cost structure, the material cost structure, and the BOM structure. Each complete machine cost structure, material cost structure, and BOM structure will have a corresponding tree node button to display the corresponding complete machine cost structure or material cost structure or BOM structure when the tree node button is triggered.
[0076] Step S900, in the case that the tree node button is triggered, the whole machine cost table is displayed based on the whole machine cost structure or the BOM cost detail table is displayed based on the material cost structure and the BOM structure.
[0077] With reference to Figure 3 and Figure 4 In the embodiment, it should be noted that the whole machine cost table and the BOM cost detail table include the report finally output and displayed, the whole machine cost table displays the cost information of all whole machines, and the whole machine cost table includes the whole machine code, the whole machine description, the cost composition, the monthly detail and the like, wherein the sub-item of the cost composition corresponds to the cost structure of the whole machine, that is, the whole machine cost structure, and the control before the "standard cost" word in the cost composition item is the tree node button associated with the whole machine cost structure, triggering the tree node button to expand or fold the information including the material cost, the labor cost, the fixed cost and the variable cost, which is the whole machine cost structure. The BOM structure includes all material components of a certain whole machine, and the BOM detail report displays the BOM structure corresponding to a certain whole machine and the material cost structure corresponding to each material under the BOM structure. The BOM detail report includes the hierarchy code, the material code, the whole machine description, the cost composition and the monthly detail and the like, wherein the sub-item of the material code corresponds to all material components of a certain whole machine, that is, the BOM structure of the whole machine; the sub-item of the cost composition corresponds to the cost structure corresponding to each material component, that is, the material cost structure; the control before the material code is the tree node button associated with the BOM structure, triggering the tree node button to expand or fold the corresponding BOM structure; the control before the cost composition is the tree node button associated with the material cost structure, triggering the tree node button to expand or fold the corresponding material cost structure, for example, the tree node button is associated with the hierarchy code 2, and when the tree node button is triggered, the material code item under the BOM detail report is expanded to the level with the hierarchy code 2.
[0078] The method for material cost display determines associated data synchronized to a Doris database, establishes a non-partition table based on a detailed model of the Doris database and the associated data, and improves the efficiency of data processing by using the real-time analysis capability of the Doris database. The cost expense type, level, and parent-child relationship between data in the non-partition table are determined, the whole machine code and the material code are determined based on the level, the whole machine cost structure is determined according to the cost expense type corresponding to the whole machine code, the material cost structure is determined according to the cost expense type corresponding to the material code, the BOM structure is determined based on the level, the parent-child relationship, and the tree dataset function of the report software, so that the data is more intuitive in subsequent display process. The tree node button in the report software is associated with any one of the whole machine cost structure, the material cost structure, and the BOM structure according to the display requirement information. In the case that the tree node button is triggered, the whole machine cost table is displayed based on the whole machine cost structure or the BOM cost detail table is displayed based on the material cost structure and the BOM structure. The tree node button is used to realize the rapid display of report data, and the degree or range of expansion or folding of the cost structure or the BOM structure after the tree node button is triggered is limited by the display requirement information. The report data batch display in the whole machine cost table or the BOM cost detail table can meet the user requirements, and the applicability of report display is improved.
[0079] In one embodiment, the associated data synchronized to the Doris database is determined, including:
[0080] In step c, the incremental data extracted from the business system is merged with the historical data to generate full data, wherein the full data includes material full data and cost full data.
[0081] In this embodiment, it should be noted that the incremental data includes material incremental data and cost incremental data, which are data newly added compared to a preset time node. The historical data refers to data existing before the current data extraction. It can be understood that when data is first extracted from the business system, the full data in the business system is extracted. After the first extraction, data is still continuously added, and only the incremental data newly added compared to the full data needs to be extracted in the subsequent extraction. The full data extracted for the first time is used as the historical data, and the incremental data is merged with the historical data to generate the full data corresponding to this extraction. The material data and the cost data are not stored in association in the business system, so the incremental data extracted includes material incremental data and cost incremental data; and the full data after merging includes material full data and cost full data.
[0082] Specifically, the incremental data extracted from the business system is merged with the historical data to generate full data, including:
[0083] Step c1, based on a preset frequency, increment data of the material and increment data of the cost are extracted from the business system to the data warehouse by a data synchronization tool respectively to generate data files;
[0084] Step c2, the data files are mapped into database partition tables by an interactive query system;
[0085] Step c3, based on the database partition tables, database processing files are executed by a timing scheduling platform to clean the data files;
[0086] Step c4, the cleaned data files are combined with historical data to obtain full-amount data.
[0087] The preset frequency is used to limit the frequency of extracting the increment data, for example, extracting by day. The data synchronization tool is used to extract data from the business system to the data warehouse, for example, Nifi. The data warehouse can include a file system, and the data is saved in the form of a file, for example, a HDFS (Hadoop Distributed File System) data warehouse. The interactive query system is used to preliminarily process the data and associate the material data with the cost data, for example, Impala. In this embodiment, the interactive query system can map the data files in the data warehouse into database partition tables, and realize processing the data files by using a SQL (Structured Query Language) similar to a traditional database. The database processing file is a file for cleaning the data files, which is executed by the timing scheduling platform. The timing scheduling platform refers to a system responsible for scheduling and executing tasks, for example, Hera. Specifically, the processor maps the data files into the database partition tables by the interactive query system, and executes the database processing files based on the database partition tables by the timing scheduling platform to clean the data files, so as to combine the cleaned data files with the historical data to obtain the full-amount data.
[0088] In this embodiment, the data is automatically synchronized and stored based on a preset frequency, which improves the real-time and effectiveness of data analysis and processing.
[0089] Step d, based on the business relationship, the material full-amount data and the cost full-amount data are associated to obtain associated data;
[0090] It should be noted that the material data and the cost data in the report finally output for display need to be associated and displayed, so that the material cost can be clearly understood. In this embodiment, after the material full-amount data and the cost full-amount data are determined, the material full-amount data and the cost full-amount data are associated to obtain the associated data.
[0091] Specifically, the material total data is associated with the cost total data based on the business relationship to obtain associated data, including:
[0092] Step d1, determining a screening table based on the business scenario requirement information;
[0093] Step d2, screening the material total data based on the screening table to determine target material total data;
[0094] Step d3, associating the target material total data with the cost total data based on the business relationship to obtain associated data.
[0095] It should be noted that the business scenario requirement information includes data requirements that need to be displayed in actual application, for example, the display content is limited to data of a factory numbered "1100" and a material "finished product". The screening table includes data objects that need to be limited in the business scenario requirement information, and the material total data is associated with the screening table to achieve screening of the material total data to obtain target material total data that meets the data objects limited in the business scenario requirement information. Then, the target material total data is associated with the cost total data based on the business relationship to obtain associated data. In this embodiment, the screening table is associated with the material total data through field definition to achieve screening of the material total data, and the target material total data is associated with the cost total data through the field.
[0096] Reference Figure 5 , Figure 5 FIG. 1 is a schematic diagram of data association according to an embodiment of the present application, which includes a table a, a table b, a table c, a table d, the table a is material total data, the table b and the table c are screening tables, and the table d is cost total data. The screening tables b and c are associated through fields b.matnr and c.matnr, wherein the material number "Z100" in the table b represents a finished product, the table b is a screening table for screening the finished product in the material, "1100" in the table c represents a factory, the table c is a screening table for further screening the factory corresponding to the finished product based on the table b, the table a is associated with the table b through a.matnr and b.matnr to achieve screening of data of the factory "1100" and the material "finished product" in the entire material total data to obtain target material total data; the table d is cost total data, and the screening tables a and d are associated through fields a.idnrk and d.matr_id to obtain associated data.
[0097] Step e, synchronizing the associated data to a Doris database.
[0098] In this embodiment, the associated data is synchronized to the Doris database, and the real-time analysis capability of the Doris database is utilized to improve the efficiency of data processing.
[0099] Specifically, the associated data is synchronized to the Doris database, including:
[0100] In step e1, the associated data is synchronized to the Doris database by the timing scheduling platform based on preset timing.
[0101] It should be noted that the preset time can be adaptively adjusted according to actual needs, and is used to limit the frequency of synchronizing the associated data to the Doris database. The data synchronization script is used to realize the synchronization of the associated data to the Doris database, and the processor synchronizes the associated data to the Doris database by executing the data synchronization script based on the preset time through the timing scheduling platform. It can be understood that, in an embodiment, the timing scheduling platform executing the data synchronization script can also be in a real-time execution manner.
[0102] In this embodiment, after obtaining the associated data based on the full data, the associated data is synchronized to the Doris database, and the data base table is stored through the Doris database, thereby improving the report loading efficiency.
[0103] In one embodiment, the method for material cost display further includes:
[0104] In step f, the correspondence between the whole machine cost table and the BOM cost detail table is determined based on the hierarchy and the parent-child relationship.
[0105] In step g, the whole machine code for triggering hyperlink jump is determined according to the correspondence.
[0106] In step h, the BOM cost detail table is hyperlinked from the whole machine cost table when the whole machine code is triggered.
[0107] In this embodiment, it should be noted that the final report display can be the whole machine cost table or the BOM cost detail table. The whole machine cost table includes cost information corresponding to all whole machines, and the BOM cost detail table includes cost information of materials included in a single whole machine. The cost information of a certain whole machine in the whole machine cost table can correspond to the BOM cost detail table of the whole machine, and the whole machine cost table includes one or more whole machines, and each whole machine has a corresponding whole machine code. In this embodiment, the whole machine cost table and the BOM cost detail table of a certain whole machine are associated through the whole machine code. Specifically, the processor determines the correspondence between the whole machine cost table and the BOM cost detail table based on the hierarchy and the parent-child relationship, determines the whole machine code for triggering hyperlink jump according to the correspondence, and hyperlinks the BOM cost detail table from the whole machine cost table when the whole machine code is triggered.
[0108] In this embodiment, the hyperlink jump between the whole machine cost table and the BOM cost detail table is realized through the whole machine code, thereby improving the convenience of report data display.
[0109] In one embodiment, the method for material cost display further comprises:
[0110] Step i, determining the target time range included in each row of data in the whole machine cost table and the BOM cost detail table according to the business requirement information, wherein the target time range contains a plurality of first time ranges;
[0111] Step j, determining the row data corresponding to each first time range in the non-partition table;
[0112] Step k, converting the plurality of row data corresponding to the target time range into a plurality of column data through table connection, so as to display the data corresponding to the target time range in the form of column data when the whole machine cost table or the BOM cost detail table is displayed.
[0113] Reference Figure 3 and Figure 4 In this embodiment, it should be noted that the business requirement information includes the report display content expected in the actual requirement, for example, the whole machine code, the whole machine description, the cost composition, the data time range, etc. displayed in the whole machine cost table; and for example, the hierarchy code, the material code, the whole machine description, the cost composition, the data time range, etc. displayed in the BOM cost detail table. The target time range includes the range expected to be displayed in the actual requirement for each row of data in the whole machine cost table and the BOM cost detail table, for example, 1 to 12 months; 1 to 8 months. The first time range is a part of the target time range, for example, any one month from January to December, and each month corresponds to a first time range. In the non-partition table stored in the Doris database, there is only one month of data in a row. In order to make the whole machine cost table and the BOM cost detail table more efficient in analyzing the cost change trend, the data can be converted to make the whole machine cost table and the BOM cost detail table display 12 months of cost data per row. Taking the first time range of 1 month as an example, the row data includes one month of data in a row in the non-partition table. If the target time range is 12 months, the processor will obtain 12 months of row data in the non-partition table, and convert the 12 months of row data corresponding to the target time range into 12 column data through table connection, so as to display the 12 months of data in the form of column at the same time when the whole machine cost table or the BOM cost detail table is displayed.
[0114] In this embodiment, the target time range is used to determine the time range displayed in the whole machine cost table or the BOM cost detail table, so as to realize efficient data display and meet the demand of analysts for report loading efficiency.
[0115] In the prior art, product BOM data and cost accounting details are respectively exported from a business system to an excel file to manually merge the two data packages and further analyze by filtering, sorting, and data visualization functions, and finally manually execute the analysis conclusion to display. This method is time-consuming and costly, and cannot be applied to big data analysis and cannot meet the increasingly lean management needs of enterprises. In the embodiment, incremental data in the business system is automatically synchronized and stored as full data based on a preset frequency, improving the real-time and effectiveness of data analysis and processing. After obtaining the associated data based on the full data, the associated data is synchronized to the Doris database, and a non-partition table is established based on the detail model of the Doris database and the associated data. The real-time analysis capability of the Doris database is used to improve the efficiency of data processing. The cost type, level, and parent-child relationship of the data in the non-partition table are determined, the machine code and material code are determined based on the level, the machine cost structure is determined according to the cost type corresponding to the machine code, the material cost structure is determined according to the cost type corresponding to the material code, and the BOM structure is determined based on the level, the parent-child relationship, and the tree data set function of the report software. The data is more intuitive in the subsequent display process. According to the display requirement information, the tree node button in the report software is associated with any one of the machine cost structure, the material cost structure, and the BOM structure. When the tree node button is triggered, the machine cost table is displayed based on the machine cost structure or the BOM cost detail table is displayed based on the material cost structure and the BOM structure. The tree node button is used to quickly display the report data, and the display requirement information is used to limit the degree or range of expansion or folding of the cost structure or the BOM structure after the tree node button is triggered. The report data in the machine cost table or the BOM cost detail table is batch displayed, the user needs are met, and the applicability of the report display is improved.
[0116] The embodiment of the present application provides a processor used for running a program, wherein the program is used to execute the method for material cost display.
[0117] The embodiment of the present application provides a machine readable storage medium, which stores a program, and the program is executed by a processor to realize the method for material cost display.
[0118] Those skilled in the art will appreciate that embodiments of the application can be readily used as software, hardware, or a combination of software and hardware. In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0119] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more functions specified in the flowchart block or blocks. Figure 1 means for functionally implementing the one or more functions specified in the flowchart block or blocks.
[0120] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart block or blocks. Figure 1 one or more functions specified in the flowchart block or blocks. Figure 1 means for functionally implementing the one or more functions specified in the flowchart block or blocks.
[0121] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more functions specified in the flowchart block or blocks. Figure 1 means for functionally implementing the one or more functions specified in the flowchart block or blocks.
[0122] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0123] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) about which the processor can execute instructions. The memory can also include non-volatile memory, such as read only memory (ROM) or flash RAM, about which permanent information can be stored; such information can not change much and / or can only change slowly.
[0124] Computer-readable media includes permanent and non-permanent, movable and non-movable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carriers.
[0125] It should also be noted that the terms "comprising", "containing", or any other variant thereof are intended to cover non-exclusive inclusions, so that a process, method, article or apparatus that includes a list of elements does not only include those elements, but also includes other elements not explicitly listed, or further includes elements inherent in such a process, method, article or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.
[0126] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the scope of claims of the present application.
Claims
1. A method for material cost presentation, characterized by, The method comprises the following steps: determining associated data synchronized to a Doris database; establishing a non-partition table based on a detailed model of the Doris database and the associated data; determining the cost type, level and parent-child relationship between data in the non-partition table; determining the whole machine coding and material coding based on the level; determining the whole machine cost structure according to the cost type corresponding to the whole machine coding; determining the material cost structure according to the cost type corresponding to the material coding; determining the BOM structure based on the level, the parent-child relationship and the tree dataset function of the report software; associating the tree node button in the report software with any one of the whole machine cost structure, the material cost structure and the BOM structure according to the display requirement information; when the tree node button is triggered, displaying the whole machine cost table based on the whole machine cost structure or displaying the BOM cost detail table based on the material cost structure and the BOM structure; The method comprises the following steps: merging the incremental data extracted from the business system with the historical data to generate full data, wherein the full data comprises material full data and cost full data; associating the material full data with the cost full data based on business relationships to obtain associated data; synchronizing the associated data to the Doris database.
2. The method of claim 1, wherein, The method comprises the following steps: extracting material incremental data and cost incremental data from the business system to the data warehouse based on a preset frequency through a data synchronization tool to generate data files; mapping the data files into database partition tables through an interactive query system; performing database processing files based on the database partition tables through a timing scheduling platform to clean the data files; merging the cleaned data files with the historical data to obtain full data.
3. The method of claim 1, wherein, The method comprises the following steps: determining a filter table based on business scenario requirement information; filtering the material full data based on the filter table to determine target material full data; associating the target material full data with the cost full data based on business relationships to obtain associated data.
4. The method of claim 1, wherein, The method comprises the following steps: synchronizing the associated data to the Doris database by executing a data synchronization script based on a preset time through a timing scheduling platform.
5. The method of claim 1, wherein, The method comprises the following steps: determining the sorting column in the detailed model of the Doris database according to query requirement information and the associated data; establishing a non-partition table based on the detailed model, the sorting column and the associated data.
6. The method of claim 1, wherein, The method further comprises the following steps: determining the correspondence between the whole machine cost table and the BOM cost detail table based on the level and the parent-child relationship; determining the whole machine coding for triggering hyperlink jump according to the correspondence; In the case that the whole machine coding is triggered, jump from the whole machine cost table hyperlink to the BOM cost detail table.
7. The method of claim 1, wherein, Further comprising: determining a target time range included in each row of data in the whole machine cost table and the BOM cost detail table according to business requirement information, wherein the target time range contains a plurality of first time ranges; determining row data corresponding to each of the first time ranges in the non-partition table; converting the plurality of row data corresponding to the target time range into a plurality of column data through table connection, so as to display the data corresponding to the target time range in the form of column data when the whole machine cost table or the BOM cost detail table is displayed.
8. A processor, comprising: The machine readable storage medium has instructions stored thereon for causing a machine to perform the method for material cost display according to any one of claims 1 to 7.
9. A machine-readable storage medium, characterized in that, The machine readable storage medium has instructions stored thereon for causing a machine to perform the method for material cost display according to any one of claims 1 to 7.
Citation Information
Patent Citations
Material data processing method and device and electronic equipment
CN111597777A
Method and device for generating bill of materials, and medium
CN112347750A