Report generation and distribution system, method and equipment and storage medium
By designing a report generation and distribution system, automatically executing structured query statements and managing Excel reports, the high labor cost and low data timeliness caused by manual reports are solved, and the automatic acquisition and automatic generation of report data is realized, and the data is improved. Quality and safety.
Patent Information
- Application Number
- CN202411246716.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-12-20
AI Technical Summary
In the existing technology, business personnel need to manually make complex EXCEL reports, resulting in high labor costs, low data timeliness, inconsistent indicator processing, incomplete data in the system and low data security, and the automatic collection and automatic generation of report data cannot be achieved. .
Design a report generation and distribution system, including query parameter determination module, report filling module, report management module and report distribution module, obtain data from different data sources by automatically executing structured query statements, fill and manage Excel reports, and realize data, Dynamic rendering of formulas and styles and distributed according to configuration information.
It realizes automatic acquisition and automatic generation of report data, reduces labor costs, improves data timeliness and quality, ensures data security, and reduces manual processing links outside the system.
Smart Images

Figure CN119166658A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of report generation, and in particular to a report generation and distribution system, method, device and storage medium. Background Art
[0002] In addition to the developed reports, there are still a large number of EXCEL reports that are manually made by business personnel every day. These reports are complex (including dynamic charts, conditional formats, built-in formulas and macro scripts, etc.), frequently used, with tight timeliness requirements, and extremely frequent changes in styles and parameters. Therefore, there are the following pain points at the business and technology levels: High labor costs: Each department needs to arrange a dedicated person to undertake data collection, script execution, form production and email sending. All steps need to be completed manually, and the operation is cumbersome and repetitive. Staff still needs to be arranged on weekends and holidays; Low data timeliness: There is a lot of batch waiting time and manual production time, which leads to the dependence of report data generation on various pre-programs; Inconsistent indicator processing caliber: Each business department has different ways of obtaining, processing and handling report data, lacks unified standards, and the caliber of the same indicator in different reports is inevitably different, which reduces data quality and affects decision-making; Incomplete data in the system: Some data are processed and counted separately outside the system, which does not meet the regulatory requirements for financial institutions to check data; Low data security: The bottom table data is processed by multiple people and circulated outside the system, which poses data security risks. Therefore, how to realize the automatic collection of report data and the automatic generation of reports is a problem that needs to be solved urgently. Summary of the invention
[0003] In view of this, the purpose of the present invention is to provide a report generation and distribution system, method, device and storage medium, which can automatically collect raw data and automatically generate reports to achieve dynamic presentation of data, formulas and styles. The specific scheme is as follows:
[0004] In a first aspect, the present application discloses a report generation and distribution system, comprising:
[0005] A query parameter determination module, used to determine a method for initiating report generation, and to determine corresponding query parameters according to the initiation method;
[0006] A report filling module, used for executing predefined structured query statements in sequence according to the query parameters, so as to obtain corresponding query results from different data sources based on the structured query statements, and filling the query results into a target Excel report based on the table interval corresponding to the structured query statements;
[0007] A report management module, used to determine whether the query result satisfies the preset row and column information and numerical value or conditional expression, and manage the rows, columns and data of the target Excel report according to the corresponding determination result to obtain the final displayed Excel report;
[0008] The report distribution module is used to determine the distribution method and the person to be distributed according to the query parameters or pre-configured information, and send the final displayed Excel report to the person to be distributed based on the distribution method.
[0009] Optionally, the query parameter determination module includes:
[0010] A first query parameter determination unit, configured to determine the query parameter through manual input of the front-end user if the report generation process is initiated by the front-end user clicking the query button;
[0011] The second query parameter determination unit is used to determine the query parameter based on a predefined default value if the report generation process is initiated through a notification sent by the background system kafka message middleware.
[0012] Optionally, the system further includes:
[0013] The report column number output module is used to create a dynamic structured query statement based on the execution of the Thymeleaf engine according to the number of check boxes in the front-end parameter multiple-choice box, and execute the dynamic structured query statement to output a dynamically changing number of report columns according to the corresponding execution results.
[0014] Optionally, the report filling module includes:
[0015] A report filling unit is used to fill the query result row by row or column by column into the target Excel report based on the table interval corresponding to the structured query statement according to a pre-configured filling direction.
[0016] Optionally, the report management module includes:
[0017] A first Excel report acquisition unit, configured to merge cells of the target Excel report according to column numbers or row numbers corresponding to the row and column information if the query result satisfies preset row and column information, so as to obtain a final displayed Excel report;
[0018] The second Excel report acquisition unit is used to hide the target row or target column corresponding to the query result if the query result meets the preset numerical value or conditional expression, so as to obtain the final displayed Excel report.
[0019] Optionally, the system further includes:
[0020] A judgment module is used to judge whether the Excel formula needs to be calculated according to the configuration information;
[0021] The calculation result saving module is used to calculate the Excel formula and save the corresponding calculation result to the final displayed Excel report so that the client can directly open the final displayed Excel report based on the calculation result.
[0022] Optionally, the system further includes:
[0023] The display module is used to take a screenshot of the target area of the Excel report finally displayed based on Windows COM technology through configuration information to obtain corresponding target information, and send the target information to a preset terminal for display.
[0024] In a second aspect, the present application discloses a report generation and distribution method, comprising:
[0025] Determine a method for initiating report generation, and determine corresponding query parameters according to the initiating method;
[0026] Executing predefined structured query statements in sequence according to the query parameters, so as to obtain corresponding query results from different data sources based on the structured query statements, and filling the query results into a target Excel report based on a table interval corresponding to the structured query statements;
[0027] Determine whether the query result satisfies the preset row and column information and numerical value or conditional expression, and manage the rows, columns and data of the target Excel report according to the corresponding determination result to obtain the final displayed Excel report;
[0028] The distribution method and the persons to be distributed are determined according to the query parameters or pre-configured information, and the final displayed Excel report is sent to the persons to be distributed based on the distribution method.
[0029] In a third aspect, the present application discloses an electronic device, comprising:
[0030] Memory, used to store computer programs;
[0031] The processor is used to execute the computer program to implement the report generation and distribution method as described above.
[0032] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the report generation and distribution method as described above.
[0033] The present application discloses a report generation and distribution system, including a query parameter determination module, which is used to determine the initiation mode of report generation, and determine the corresponding query parameters according to the initiation mode; a report filling module, which is used to execute pre-defined structured query statements in sequence according to the query parameters, so as to obtain corresponding query results from different data sources based on the structured query statements, and fill the query results into the target Excel report based on the table interval corresponding to the structured query statements; a report management module, which is used to determine whether the query results meet the pre-set row and column information and numerical or conditional expressions, and manage the rows and columns and data of the target Excel report according to the corresponding judgment results to obtain the final displayed Excel report; a report distribution module, which is used to determine the distribution mode and the personnel to be distributed according to the query parameters or pre-configured information, and send the final displayed Excel report to the personnel to be distributed based on the distribution mode. It can be seen that the present application configures the front-end parameters and structured query statements, transfers and binds the parameters, and executes the structured query statements, fills the query result data set into the specified cell area of the prefabricated Excel template, and then superimposes the custom attribute configuration to realize the dynamic presentation of data, formulas and styles. In this way, automation replaces manual work and improves staff work efficiency. The collection of original data is automatically obtained instead of manual operation, realizing the automatic acquisition of report data and the automatic generation of reports. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0035] Figure 1 A schematic diagram of the structure of a report generation and distribution system disclosed in this application;
[0036] Figure 2 A flow chart of a report generation and distribution method disclosed in this application;
[0037] Figure 3 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] In the current technology, foreign reporting tools (such as Cognos, Tableau) do not support dynamic column display based on query conditions, cannot meet the requirements of domestic substitution and information innovation, and the cost of customized development is expensive. The domestic tools already in use cannot quickly respond to business requirements that change at any time due to the high learning cost, cannot support the convenient development of complex tables, and have certain performance problems during peak traffic. EXCEL server: mainly deployed in C / S (Client / Server) architecture, only supports Windows clients, requires direct connection to the database, and cannot meet the management requirements of data security, permission control and report distribution. In order to solve the above technical problems, the present application discloses a report generation and distribution system that can automatically collect raw data and automatically generate reports to achieve dynamic presentation of data, formulas and styles.
[0040] See also Figure 1 As shown, the embodiment of the present invention discloses a report generation and distribution system, including:
[0041] The query parameter determination module 11 is used to determine a method for initiating report generation and determine corresponding query parameters according to the initiation method.
[0042] In this embodiment, in the process of report generation, there are two ways to initiate report generation. First, the initiation method of report generation is determined. Different initiation methods correspond to different query parameter determination methods. Therefore, the query parameter determination module includes: a first query parameter determination unit, which is used to determine the query parameter by the manual input of the front-end user if the report generation process is initiated by the front-end user clicking the query button; a second query parameter determination unit, which is used to determine the query parameter based on the predefined default value if the report generation process is initiated by the notification issued by the back-end system kafka message middleware. That is to say, if it is triggered by the front-end user interface, that is, the back-end interface is called by the front-end user clicking the query button. The front-end user can enter the query parameters of the report, such as date, product, organization, etc., which are predefined according to the report template. If it is initiated by the back-end system notification, when the business middle station and the data warehouse prepare the original indicators, they send a notification through the kafka message middleware, and the application starts the process after receiving the notification. In this way, the query parameters are predefined default values because there is no user input. It should be pointed out that these query parameters are dynamic parameters. You can configure the parameter name, control type, limited data range, etc., and specify the code table type to bind the key-value pairs of the front-end drop-down box. These parameters are bidirectionally bound to the front-end controls and the back-end SQL (Structured Query Language) parameters.
[0043] The report filling module 12 is used to execute the predefined structured query statements in sequence according to the query parameters, so as to obtain corresponding query results from different data sources based on the structured query statements, and fill the query results into the target Excel report based on the table interval corresponding to the structured query statements.
[0044] In this embodiment, the corresponding Excel template file is first loaded, and the predefined SQL statements are executed in sequence according to the query parameters. Each SQL corresponds to a data set, and each data set corresponds to a table interval, and the query results are filled into the corresponding table interval of the Excel file. Different SQLs can correspond to different data sources, which may be different databases such as oracle / mysql / oceanbase, or different business systems or data warehouses of system A and system B, which are all specified in the configuration library. By loading multiple database drivers, multiple data sources such as oracle, mysql, oceanbase, hadoop, etc. are supported, and query results can be obtained from different data sources and filled into the same result file. At the same time, the field can be dynamic, and the SQL field name is dynamically obtained by executing the Thymeleaf engine according to the user's check in the front-end multiple-choice box. Therefore, the system also includes a report column output module, which is used to create a dynamic structured query statement based on the execution of the Thymeleaf engine according to the number of check boxes in the front-end parameter multiple-choice box, and execute the dynamic structured query statement to output the dynamically changing report column number according to the corresponding execution result. Then the output table column number is dynamically changed. When filling data, the filling direction can be vertically filled row by row from top to bottom, or horizontally filled column by column from left to right, depending on the configuration. Therefore, the report filling module includes: a report filling unit, which is used to fill the query results into the target Excel report row by row or column by column based on the table interval corresponding to the structured query statement according to the pre-configured filling direction. Similarly, when filling data into the template file, you can fill it one by one in the order of the fields, or you can fill it according to the field name. And the field name supports multi-line and multi-level titles.
[0045] The report management module 13 is used to determine whether the query result satisfies the preset row and column information and numerical value or conditional expression, and manage the rows and columns and data of the target Excel report according to the corresponding judgment result to obtain the final displayed Excel report.
[0046] In this embodiment, each data set will have corresponding custom attributes, such as: which rows / columns need to be hidden under certain conditions, which cells need to be merged, which text boxes need to be added, and which positions of the query results need to be set with additional borders / shading / fonts. These attributes are determined according to the number of rows, columns, and values of the data set query results, and cannot be pre-defined in the template. To execute these custom attributes, certain values or judgment conditions need to be calculated. In general, the required values and conditions can be obtained by simply specifying the cell position. In complex situations, user-written groovy / javascript / python functions can also be executed by executing OGNL (Object GraphNavigation Language, object navigation graph language) or QLExpress (Quick Language Express, a dynamic script engine parsing tool) expression engine. Therefore, it is first necessary to determine whether the query result meets the pre-set row and column information and value or conditional expression, and manage the rows, columns and data of the target Excel report according to the corresponding judgment result. Therefore, the report management module includes: a first Excel report acquisition unit, which is used to merge the cells of the target Excel report according to the column number or row number corresponding to the row and column information if the query result meets the preset row and column information, so as to obtain the final displayed Excel report; a second Excel report acquisition unit, which is used to hide the target row or target column corresponding to the query result if the query result meets the preset numerical value or conditional expression, so as to obtain the final displayed Excel report. In layman's terms, according to the predefined numerical value or conditional expression, when the query result meets the numerical condition, some rows or columns are automatically hidden, thereby purifying the table data. According to the predefined column or row number, the specified cell area is merged. The merging of duplicate data is realized, which is convenient for displaying more beautiful statistical tables. The conditional expressions used in the functions of hiding rows / columns, name management, etc., can be directly compared by equality by default, and can also be completed using the popular OGNL and QLExpress expression engines in the industry, and groovy / javascript / python scripts can be additionally loaded to implement more complex business logic. After judgment and management, the final displayed Excel report is obtained.
[0047] The report distribution module 14 is used to determine the distribution method and the person to be distributed according to the query parameters or pre-configured information, and send the final displayed Excel report to the person to be distributed based on the distribution method.
[0048] In this embodiment, before saving and distributing, it will be decided according to the configuration whether to calculate the formula results in advance, protect the workbook / worksheet with a password, save it in binary format, and take a screenshot of the specified table area. In this process, the system of this application also includes a judgment module, which is used to determine whether the Excel formula needs to be calculated according to the configuration information; a calculation result saving module, which is used to calculate the Excel formula if so, and save the corresponding calculation results to the Excel report displayed in the end, so that the client can directly open the Excel report displayed in the end based on the calculation results. The display module is used to take a screenshot of the target area of the Excel report displayed in the end based on the Windows COM technology through the configuration information to obtain the corresponding target information, and send the target information to the preset terminal for display. Specifically, since some mobile phones do not support Excel formula calculation, in order to facilitate the opening of the mobile phone and improve the efficiency of opening the file by the client, the server can calculate the formula results in advance and save them to the file, and the client can quickly open the file. The screenshot of the specified area of the data table is realized through Windows COM technology, so that the key content of the report can be sent to the work group, email, MMS and other terminals.
[0049] In addition, before distributing the report, detection conditions and daily / weekly / monthly / quarterly conditions are predefined to detect whether the report data is ready before generating the report. By utilizing the workbook and worksheet protection functions of Excel files, the output files can be read-only, protect some areas, and have password protection, so as to achieve security protection for the report. It also includes some other built-in Excel functions, such as conditional formatting, name management, text boxes, etc. This application not only integrates these powerful built-in Excel functions, but also interacts with the data and script plug-ins in the data set. For example, based on the data query results, combined with configuration statements and script functions, the reference position of the name management is automatically adjusted in the actual output data file instead of the fixed position. For example, based on the acquired data, combined with conditional formatting, borders and shading are drawn for the table.
[0050] Finally, the distribution method and the persons to be distributed are determined according to the query parameters or pre-configured information, and the final displayed Excel report is sent to the persons to be distributed based on the distribution method. Specifically, the methods and persons to be distributed are determined according to the query parameters, email or MMS configuration. For example, if the query parameter is product A, it will only be sent to the persons related to group A. The template is only configured with email receiving method, and the generated report will only be distributed to the persons related to group A via email. In this way, the review and download services are provided through user permissions, which reduces the manual processing links outside the system, ensures the security of the report data, and realizes data sharing, thereby improving data quality and utilization.
[0051] In summary, the present application discloses a report generation and distribution system, including a query parameter determination module, which is used to determine the initiation mode of report generation, and determine the corresponding query parameters according to the initiation mode; a report filling module, which is used to execute pre-defined structured query statements in sequence according to the query parameters, so as to obtain corresponding query results from different data sources based on the structured query statements, and fill the query results into the target Excel report based on the table interval corresponding to the structured query statements; a report management module, which is used to determine whether the query results meet the pre-set row and column information and numerical or conditional expressions, and manage the rows and columns and data of the target Excel report according to the corresponding judgment results to obtain the final displayed Excel report; a report distribution module, which is used to determine the distribution mode and the personnel to be distributed according to the query parameters or pre-configured information, and send the final displayed Excel report to the personnel to be distributed based on the distribution mode. It can be seen that the present application configures the front-end parameters and structured query statements, passes the parameters to bind and executes the structured query statements, fills the query result data set into the specified cell area of the prefabricated Excel template, and then superimposes the custom attribute configuration to realize the dynamic presentation of data, formulas and styles. In this way, automation replaces manual work and improves staff work efficiency. The collection of original data is automatically obtained instead of manual operation, realizing the automatic acquisition of report data and the automatic generation of reports.
[0052] See also Figure 2 As shown, the embodiment of the present invention discloses a report generation and distribution method, including:
[0053] Step S11: determine a method for initiating report generation, and determine corresponding query parameters according to the initiating method.
[0054] Step S12: executing predefined structured query statements in sequence according to the query parameters, so as to obtain corresponding query results from different data sources based on the structured query statements, and filling the query results into a target Excel report based on a table interval corresponding to the structured query statements.
[0055] Step S13: determine whether the query result satisfies the preset row and column information and numerical value or conditional expression, and manage the rows, columns and data of the target Excel report according to the corresponding determination result to obtain the final displayed Excel report.
[0056] Step S14: determining a distribution method and a person to be distributed according to the query parameter or pre-configured information, and sending the final displayed Excel report to the person to be distributed based on the distribution method.
[0057] In summary, when generating and distributing reports, the present application first determines the initiation method of report generation, and determines the corresponding query parameters according to the initiation method; then, according to the query parameters, the predefined structured query statements are executed in sequence, so as to obtain the corresponding query results from different data sources based on the structured query statements, and fill the query results into the target Excel report based on the table interval corresponding to the structured query statements; judge whether the query results meet the pre-set row and column information and numerical or conditional expressions, and manage the rows and columns and data of the target Excel report according to the corresponding judgment results to obtain the final displayed Excel report; finally, the distribution method and the person to be distributed are determined according to the query parameters or pre-configured information, and the final displayed Excel report is sent to the person to be distributed based on the distribution method. It can be seen that the present application configures the front-end parameters and structured query statements, passes the binding parameters and executes the structured query statements, fills the query result data set into the specified cell area of the prefabricated Excel template, and then superimposes the custom attribute configuration to realize the dynamic presentation of data, formulas and styles. In this way, automation replaces manual work and improves staff work efficiency. The collection of original data is automatically obtained instead of manual operation, realizing the automatic acquisition of report data and the automatic generation of reports.
[0058] Furthermore, the present application also discloses an electronic device. Figure 3 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0059] Figure 3 The present invention provides a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the report generation and distribution method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0060] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0061] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0062] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, and may be Windows Server, Netware, Unix, Linux, etc. In addition to computer programs that can be used to complete the report generation and distribution method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 may further include computer programs that can be used to complete other specific tasks.
[0063] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned disclosed report generation and distribution method. The specific steps of the method can refer to the corresponding contents disclosed in the aforementioned embodiment, and will not be repeated here.
[0064] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0065] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0066] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0067] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0068] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A report generation and distribution system, characterized in that: include: A query parameter determination module, used to determine a method for initiating report generation, and to determine corresponding query parameters according to the initiation method; A report filling module, used for executing predefined structured query statements in sequence according to the query parameters, so as to obtain corresponding query results from different data sources based on the structured query statements, and filling the query results into a target Excel report based on the table interval corresponding to the structured query statements; A report management module, used to determine whether the query result satisfies the preset row and column information and numerical value or conditional expression, and manage the rows, columns and data of the target Excel report according to the corresponding determination result to obtain the final displayed Excel report; The report distribution module is used to determine the distribution method and the person to be distributed according to the query parameters or pre-configured information, and send the final displayed Excel report to the person to be distributed based on the distribution method.
2. The report generation and distribution system according to claim 1, characterized in that: The query parameter determination module includes: A first query parameter determination unit, configured to determine the query parameter through manual input of the front-end user if the report generation process is initiated by the front-end user clicking the query button; The second query parameter determination unit is used to determine the query parameter based on a predefined default value if the report generation process is initiated through a notification sent by the background system kafka message middleware.
3. The report generation and distribution system according to claim 1, characterized in that: Also includes: The report column number output module is used to create a dynamic structured query statement based on the execution of the Thymeleaf engine according to the number of check boxes in the front-end parameter multiple-choice box, and execute the dynamic structured query statement to output a dynamically changing number of report columns according to the corresponding execution results.
4. The report generation and distribution system according to claim 1, characterized in that: The report filling module includes: A report filling unit is used to fill the query result row by row or column by column into the target Excel report based on the table interval corresponding to the structured query statement according to a pre-configured filling direction.
5. The report generation and distribution system according to claim 1, characterized in that: The report management module includes: A first Excel report acquisition unit, configured to merge cells of the target Excel report according to column numbers or row numbers corresponding to the row and column information if the query result satisfies preset row and column information, so as to obtain a final displayed Excel report; The second Excel report acquisition unit is used to hide the target row or target column corresponding to the query result if the query result meets the preset numerical value or conditional expression, so as to obtain the final displayed Excel report.
6. The report generation and distribution system according to claim 1, characterized in that: Also includes: A judgment module is used to judge whether the Excel formula needs to be calculated according to the configuration information; The calculation result saving module is used to calculate the Excel formula and save the corresponding calculation result to the final displayed Excel report so that the client can directly open the final displayed Excel report based on the calculation result.
7. The report generation and distribution system according to claim 1, characterized in that: Also includes: The display module is used to take a screenshot of the target area of the Excel report finally displayed based on Windows COM technology through configuration information to obtain corresponding target information, and send the target information to a preset terminal for display.
8. A report generation and distribution method, characterized in that: include: Determine a method for initiating report generation, and determine corresponding query parameters according to the initiating method; Executing predefined structured query statements in sequence according to the query parameters, so as to obtain corresponding query results from different data sources based on the structured query statements, and filling the query results into a target Excel report based on the table interval corresponding to the structured query statements; Determine whether the query result satisfies the preset row and column information and numerical value or conditional expression, and manage the rows and columns and data of the target Excel report according to the corresponding determination result to obtain the final displayed Excel report; The distribution method and the persons to be distributed are determined according to the query parameters or pre-configured information, and the final displayed Excel report is sent to the persons to be distributed based on the distribution method.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor is used to execute the computer program to implement the report generation and distribution method as claimed in claim 8.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed by a processor, implements the report generation and distribution method as claimed in claim 8.
