Report development method and apparatus

CN116431118BActive Publication Date: 2026-09-08SHANGHAI ZHONGTONGJI NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310417216.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-18
Publication Date
2026-09-08
Estimated Expiration
2043-04-18

AI Technical Summary

Technical Problem

[0006]有鉴于此,本发明的目的在于克服现有技术的不足,提供一种报表开发方法及装置,以解决现有技术中报表开发存在不够灵活及成本较高的问题

Benefits of technology

[0031]This invention provides a report development method and apparatus. The method includes developing a report page plugin using the magic-api plugin mechanism to write and store AMIS JSON configuration report pages; setting a custom module based on the report page, the custom module being used to encapsulate user data permissions to filter preset data permissions. This invention achieves the integration of front-end and back-end low-code by developing a magic-api plugin to store the report page, completing the development of AMIS pages and back-end interfaces. It obtains user information through a magic-api interceptor, using the current thread object to pass user information, enabling the acquisition of current user information within the custom module. By developing a magic-api custom module, it uses comparison and intersection methods to filter data permissions. This technical solution provides flexible data permission control, seamless integration with existing business systems, and rich page styles, allowing for customization of the system's style.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116431118B_ABST
    Figure CN116431118B_ABST
Patent Text Reader

Abstract

The application relates to a report development method and device, which comprises the following steps: developing a report page plug-in by using a plug-in mechanism of magic-api, and using the plug-in to write and store a json configuration report page of amis; setting a custom module based on the report page, and using the custom module to encapsulate user data authority to filter preset data authority. The application stores the report page by developing the plug-in of magic-api, realizes the fusion use of front-end low code and back-end low code, completes the development of the amis page and the back-end interface, obtains user information by using a magic-api interceptor, and uses a current thread object to transmit the user information, so that the current user information can be obtained in the custom module; the magic-api custom module is developed, a comparison and intersection mode is used to realize data authority filtering, the above technical scheme can flexibly control the data authority, is perfectly fused with an existing business system, has rich page styles, and can customize the style of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of big data technology, specifically relating to a report development method and apparatus. Background Technology

[0002] Low-code is a rapid development framework primarily used in enterprise software development. With low-code frameworks, users can create simple forms, tables, and charts with minimal coding. Low-code frameworks on the market are broadly divided into front-end low-code (generating pages) and back-end low-code (generating interfaces), but these are relatively independent and cannot be well integrated.

[0003] In related technologies, big data report development generally adopts two development methods:

[0004] BI tools are typically commercial software, which often comes with high prices and numerous limitations. They usually have fixed styles, making it difficult to meet flexible and customized UI needs. Furthermore, they often have their own user systems, which makes it difficult to integrate with existing system user systems.

[0005] The traditional software development approach of front-end + back-end is very flexible and can basically meet any customized needs, but the development cost is relatively high. It usually requires the joint efforts of personnel from three major fields: front-end, back-end, and data. Summary of the Invention

[0006] In view of this, the purpose of the present invention is to overcome the shortcomings of the prior art and provide a report development method and apparatus to solve the problems of insufficient flexibility and high cost in the report development of the prior art.

[0007] To achieve the above objectives, the present invention adopts the following technical solution: a report development method, comprising:

[0008] Utilizing the plugin mechanism of magic-api, develop a report page plugin for writing and storing AMIS JSON configuration report pages;

[0009] The report page is set with a custom module, which is used to encapsulate user data permissions in order to filter preset data permissions.

[0010] Furthermore, the development of report page plugins using the magic-api plugin mechanism includes:

[0011] Create report pages using the AMIS report page editor, and save the AMIS report page editor as the magic-api report page plugin;

[0012] The report page is obtained based on the magic-api report page plugin;

[0013] Use the AMIS framework to render the report page.

[0014] Furthermore, a custom module is set based on the report page. This custom module is used to encapsulate user data permissions, including:

[0015] Receive magic-api processing requests by calling the data interface through the page;

[0016] Based on the aforementioned request, an API interceptor is used to parse the token and obtain the current user information;

[0017] The custom module is invoked to filter the current user information using preset data permissions and generate SQL.

[0018] Based on the SQL query, query the target data in the database;

[0019] The target data is then fed back to the front-end page.

[0020] Furthermore, the step of calling the custom module to filter the current user information based on preset data permissions includes:

[0021] Filter preset words.

[0022] Furthermore, the rendering of the report page using the AMIS framework includes:

[0023] Obtain the JSON object of the report page;

[0024] The AMIS framework generates corresponding page elements based on the JSON object and renders them into a visual page.

[0025] Furthermore, the report page plugin divides the report page into the following parts:

[0026] Grouping, page path, page name, page content, and page description.

[0027] This application provides a report development apparatus, including:

[0028] The development module is used to develop report page plugins using the magic-api plugin mechanism, and to write and store AMIS JSON configuration report pages.

[0029] The filtering module is used to set custom modules based on the report page. The custom modules are used to encapsulate user data permissions in order to filter preset data permissions.

[0030] The beneficial effects that can be achieved by adopting the above technical solution in this invention include:

[0031] This invention provides a report development method and apparatus. The method includes developing a report page plugin using the magic-api plugin mechanism to write and store AMIS JSON configuration report pages; setting a custom module based on the report page, the custom module being used to encapsulate user data permissions to filter preset data permissions. This invention achieves the integration of front-end and back-end low-code by developing a magic-api plugin to store the report page, completing the development of AMIS pages and back-end interfaces. It obtains user information through a magic-api interceptor, using the current thread object to pass user information, enabling the acquisition of current user information within the custom module. By developing a magic-api custom module, it uses comparison and intersection methods to filter data permissions. This technical solution provides flexible data permission control, seamless integration with existing business systems, and rich page styles, allowing for customization of the system's style. Attached Figure Description

[0032] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0033] Figure 1 This is a schematic diagram illustrating the steps of the report development method of the present invention;

[0034] Figure 2 This is a flowchart illustrating the report development method of the present invention;

[0035] Figure 3 This is another flowchart illustrating the report development method of the present invention;

[0036] Figure 4 This is another flowchart illustrating the report development method of the present invention;

[0037] Figure 5 This is another flowchart illustrating the report development method of the present invention;

[0038] Figure 6 This is another flowchart illustrating the report development method of the present invention;

[0039] Figure 7 This is a schematic diagram of the report development device of the present invention. Detailed Implementation

[0040] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be described in detail below. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other implementation methods obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0041] The following describes a specific report development method and apparatus provided in an embodiment of this application, with reference to the accompanying drawings.

[0042] like Figure 1 , Figure 2 , Figure 3 As shown, the report development method provided in this application embodiment includes:

[0043] S101 utilizes the plugin mechanism of magic-api to develop a report page plugin for writing and storing AMIS JSON configuration report pages;

[0044] In some embodiments, the development of report page plugins using the magic-api plugin mechanism includes:

[0045] Create report pages using the AMIS report page editor, and save the AMIS report page editor as the magic-api report page plugin;

[0046] The report page is obtained based on the magic-api report page plugin;

[0047] Use the AMIS framework to render the report page.

[0048] In some embodiments, rendering the report page using the AMIS framework includes:

[0049] Obtain the JSON object of the report page;

[0050] The AMIS framework generates corresponding page elements based on the JSON object and renders them into a visual page.

[0051] In some embodiments, such as Figure 4 As shown, the report page plugin divides the report page into the following parts:

[0052] Grouping, page path, page name, page content, and page description.

[0053] Specifically, grouping: used to categorize report pages.

[0054] Page path: Defines the access path to the report page, for example: / page / data / list. The page path must strictly adhere to URL specifications, and the path will also serve as the unique identifier for the report page.

[0055] Page Name: Defines the name displayed in the title bar of the report page, e.g., xxx Data List

[0056] Page Content: This section is in JSON format and is used to store the configuration content of the AMIS page. Page Description: Defines the description of the report page, allowing users to quickly understand what data is included in the report.

[0057] like Figure 5 As shown, when a front-end user clicks on a report page, the web application initiates a request to retrieve page information based on the page path. Upon receiving this request, the page plugin searches the database for the record of that page based on the page path. Once found, it restores the page content as a JSON object and returns it. After obtaining the JSON object of the page content, the front-end hands it over to the AMIS framework for processing. The AMIS framework then generates the corresponding page elements based on this JSON object, ultimately rendering it into a visualization page.

[0058] S102, Based on the report page, a custom module is set. The custom module is used to encapsulate user data permissions in order to filter preset data permissions.

[0059] In some embodiments, such as Figure 3 As shown, a custom module is set based on the report page. This custom module is used to encapsulate user data permissions, including:

[0060] Receive magic-api processing requests by calling the data interface through the page;

[0061] Based on the aforementioned request, an API interceptor is used to parse the token and obtain the current user information;

[0062] The custom module is invoked to filter the current user information using preset data permissions and generate SQL.

[0063] Based on the SQL query, query the target data in the database;

[0064] The target data is then fed back to the front-end page.

[0065] In some embodiments, the step of calling a custom module to filter the current user information using preset data permissions includes:

[0066] Filter preset words.

[0067] like Figure 6As shown, when the magic-api service receives a data interface request, it first retrieves user information from SSO via an interceptor and stores it in the current thread for later use. Then, before executing the query SQL, it calls a custom module to perform data permission filtering. Upon receiving the request, the custom module first retrieves the user information in the current thread, compares the province, city, and district sent from the front end with the province, city, and district managed by the user, and returns the intersection. The magic-api service then uses the filtered province, city, and district as the WHERE condition in the SQL query to retrieve data from the database, and finally returns the retrieved data to the front end, completing the entire process.

[0068] The report development methodology works as follows: A plugin for magic-api is developed to store report pages, enabling the integration of low-level front-end and back-end coding, allowing for the development of both AMIS pages and back-end interfaces within a single system. User information is retrieved using a magic-api interceptor, passing this information via the current thread object, allowing for access to current user information within custom modules. A custom magic-api module is developed, using a comparison of the input province, city, and district, and the intersection of the managed province, city, and district, to implement data permission filtering.

[0069] like Figure 7 As shown in the figure, this application embodiment provides a report development device, including:

[0070] Module 201 is used to develop report page plugins using the plugin mechanism of magic-api, and is used to write and store AMIS JSON configuration report pages.

[0071] The filtering module 202 is used to set a custom module based on the report page. The custom module is used to encapsulate user data permissions in order to filter preset data permissions.

[0072] The working principle of the report development device provided in this application is as follows: the development module 201 uses the plugin mechanism of magic-api to develop a report page plugin, which is used to write and store the JSON configuration report page of AMIS; the filtering module 202 sets a custom module based on the report page, which is used to encapsulate user data permissions to filter preset data permissions.

[0073] In summary, this invention provides a report development method and apparatus, including developing a report page plugin using the magic-api plugin mechanism for writing and storing AMIS JSON configuration report pages; setting a custom module based on the report page, the custom module being used to encapsulate user data permissions to filter preset data permissions. This invention achieves the integration of front-end and back-end low-code by developing a magic-api plugin to store the report page, completing the development of AMIS pages and back-end interfaces. It obtains user information through a magic-api interceptor, using the current thread object to pass user information, enabling the acquisition of current user information within the custom module. By developing a magic-api custom module, it uses comparison and intersection methods to filter data permissions. This technical solution provides flexible data permission control, seamless integration with existing business systems, and rich page styles, allowing for customization of the system's style.

[0074] It is understood that the method embodiments provided above correspond to the device embodiments described above, and the specific details can be referred to each other, which will not be repeated here.

[0075] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0076] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0077] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction methods implemented in a process. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0078] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0079] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A report development method, characterized in that, include: Utilizing the plugin mechanism of magic-api, a report page plugin is developed for writing and storing AMS JSON configuration report pages. This includes: writing report pages using the AMS report page editor, saving the AMS report page editor as a magic-api report page plugin; obtaining the report page based on the magic-api report page plugin; and rendering the report page using the AMS framework. A custom module is set up based on the report page. This custom module is used to encapsulate user data permissions to filter preset data permissions. The module includes: receiving a magic-api processing request by calling the data interface through the page; parsing the token using an API interceptor based on the processing request to obtain the current user information; calling the custom module to filter the current user information for preset data permissions and generating SQL; querying the target data in the database based on the SQL; and feeding the target data back to the front-end page.

2. The method according to claim 1, characterized in that, The step of calling a custom module to filter the current user information using preset data permissions includes: Filter preset words.

3. The method according to claim 1, characterized in that, The process of rendering the report page using the AMIS framework includes: Obtain the JSON object of the report page; The AMIS framework generates corresponding page elements based on the JSON object and renders them into a visual page.

4. The method according to claim 1, characterized in that, The report page plugin divides the report page into the following parts: Grouping, page path, page name, page content, and page description.

5. A report development device, characterized in that, include: The development module is used to develop report page plugins using the magic-api plugin mechanism, and to write and store AMIS JSON configuration report pages. Specifically, it is used to create report pages through the AMIS report page editor and save the AMIS report page editor as the magic-api report page plugin; The report page is obtained based on the magic-api report page plugin; Render the report page using the AMIS framework; A filtering module is used to set a custom module based on the report page. The custom module is used to encapsulate user data permissions in order to filter preset data permissions. Specifically, it is used to receive magic-api processing requests through page calls to the data interface; Based on the aforementioned request, an API interceptor is used to parse the token and obtain the current user information; The custom module is invoked to filter the current user information using preset data permissions and generate SQL. Based on the SQL query, query the target data in the database; The target data is then fed back to the front-end page.

Citation Information

Patent Citations

  • Webpage low-code design method and device with separated design capability and analysis capability

    CN115309395A

  • Low code development system

    CN115934073A