CN115639998A - Report management method and device, storage medium and electronic device - Google Patents

Report management method and device, storage medium and electronic device Download PDF

Info

Publication number
CN115639998A
CN115639998A CN202211186895.3A CN202211186895A CN115639998A CN 115639998 A CN115639998 A CN 115639998A CN 202211186895 A CN202211186895 A CN 202211186895A CN 115639998 A CN115639998 A CN 115639998A
Authority
CN
China
Prior art keywords
target
report
query statement
query
statement
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211186895.3A
Other languages
Chinese (zh)
Inventor
邵京凯
姚彬
姜山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd, Haier Uplus Intelligent Technology Beijing Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202211186895.3A priority Critical patent/CN115639998A/en
Publication of CN115639998A publication Critical patent/CN115639998A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a report management method, a storage medium and an electronic device, which relate to the technical field of smart home/smart home, and the report management method comprises the following steps: acquiring a first source database matched with the target report, wherein the first source database is used for providing source data to be called for the target report; displaying attribute information of each report form associated with the first source database on a statement generating interface, and establishing an association relation between the attribute information and a target condition corresponding to a target condition identifier in response to an association operation executed on the target condition identifier on the statement generating interface; acquiring a first query statement based on the incidence relation, wherein the first query statement is used for querying source data from a first source database; and managing the target report by utilizing the first query statement. The report management method and the report management system solve the technical problem that the management efficiency of the report is low.

Description

Report management method and device, storage medium and electronic device
Technical Field
The present application relates to the field of computers, and in particular, to a report management method, a storage medium, and an electronic apparatus.
Background
The management of report forms in the related art usually depends on the autonomous configuration of developers, but the management mode of the autonomous configuration lacks a uniform standard and cannot finish the efficient management of report forms. That is, the related art has a technical problem that the management efficiency of the report is low.
Disclosure of Invention
The embodiment of the application provides a report management method and device, a storage medium and an electronic device, so as to at least solve the technical problem of low report management efficiency.
According to an aspect of an embodiment of the present application, there is provided a report management method, including: acquiring a first source database matched with a target report, wherein the first source database is used for providing source data to be called for the target report; displaying attribute information of each report form associated with the first source database on a statement generation interface, and establishing an association relationship between the attribute information and a target condition corresponding to a target condition identifier in response to an association operation performed on the target condition identifier on the statement generation interface, wherein a plurality of condition identifiers are displayed on the statement generation interface, the plurality of condition identifiers include the target condition identifier, and the condition identifier is used for representing a query rule of a statement on source data; acquiring a first query statement based on the association relationship, wherein the first query statement is used for querying the source data from the first source database; and managing the target report by using the first query statement.
According to another aspect of the embodiments of the present application, there is also provided a report management apparatus, including:
the first obtaining unit is used for obtaining a first source database matched with a target report, wherein the first source database is used for providing source data to be called for the target report; a generating unit, configured to display attribute information of each report associated with the first source database on a statement generating interface, and establish an association relationship between the attribute information and a target condition corresponding to a target condition identifier in response to an association operation performed on the target condition identifier on the statement generating interface, where a plurality of condition identifiers are displayed on the statement generating interface, the plurality of condition identifiers include the target condition identifier, and the condition identifier is used to indicate a query rule of a statement for source data;
a second obtaining unit, configured to obtain a first query statement based on the association relationship, where the first query statement is used to query the source data from the first source database;
and the first management unit is used for managing the target report by using the first query statement.
As an optional solution, the apparatus further includes: an error unit configured to perform a preview and syntax test on the first query sentence after the first query sentence is acquired based on the association relationship, display a preview result of the first query sentence, and highlight the syntax error in the preview result when a test result of the syntax test includes a syntax error; the first management unit also comprises a first editing module which is used for editing the target report in real time by using the first query statement after the first query statement passes the syntax test.
As an optional solution, the first editing module further includes: the first modification sub-module is used for modifying the basic information of the target report by using the first query statement after the first query statement passes the syntax test; the second modification submodule is used for modifying the display attribute of the target report by using the first query statement after the first query statement passes the syntax test; a third modification submodule, configured to modify the content style of the target report by using the first query statement after the first query statement passes the syntax test; and the fourth modification submodule is used for modifying the query condition of the target report by using the first query statement after the first query statement passes the syntax test.
As an optional solution, the first management module further includes: and the first display module is used for previewing and displaying the target report by using the first query statement after the first query statement passes the syntax test, wherein the previewing and displaying comprise a table file corresponding to the target report.
As an optional solution, the first display module further includes: and a first response sub-module configured to export and generate the table file in response to an export instruction triggered by the target report after the target report is managed by the first query statement.
As an alternative, the apparatus includes: a second management unit, configured to obtain a second source database matching the target report after the target report is managed by using the first query statement; acquiring a second query statement corresponding to the second source database; and after the second query statement passes the syntax test, managing the target report by using the second query statement.
As an optional solution, the first management unit further includes: a first obtaining module, configured to obtain a query request triggered by the target report, where the query instruction carries a target character for querying the source data; a first response module, configured to respond to the query request and obtain a target query statement corresponding to the target character, where the first query statement includes the target query statement; and a second display module, configured to display a query result when the source data corresponding to the target query statement is queried from the first source database, where the query result includes the source data corresponding to the target query statement.
According to still another aspect of embodiments of the present application, there is provided a computer-readable storage medium including a stored program.
According to another aspect of the embodiments of the present application, there is provided an electronic apparatus including a memory and a processor, wherein the memory stores a computer program.
In the embodiment of the application, a first source database matched with a target report is obtained, wherein the first source database is used for providing source data to be called for the target report; displaying attribute information of each report associated with the first source database on a statement generation interface, and establishing an association relationship between the attribute information and a target condition corresponding to a target condition identifier in response to an association operation performed on the target condition identifier on the statement generation interface, where multiple condition identifiers are displayed on the statement generation interface, the multiple condition identifiers include the target condition identifier, and the condition identifier is used to indicate a query rule of a statement on source data; acquiring a first query statement based on the association relationship, wherein the first query statement is used for querying the source data from the first source database; and managing the target report by using the first query statement. The advantage that the dynamic data source is ready to use is utilized, a large number of mainstream databases are supported, developers can modify and edit the dynamic data source conveniently, the technical purposes of reducing the difficulty of the developers in starting, improving the flexibility of system access and increasing the diversity of system functions are achieved, the system development speed is improved, the development period is saved, and the technical problem of low report management efficiency is solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a schematic diagram of a hardware environment of an interaction method of a smart device according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating an alternative report management method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an example of another alternative report management method according to an embodiment of the present application;
FIG. 4 is a schematic diagram of an example of another alternative report management method according to an embodiment of the present application;
FIG. 5 is a schematic diagram of an example of another alternative report management method according to an embodiment of the present application;
FIG. 6 is a schematic diagram of an example of another alternative report management method according to an embodiment of the present application;
FIG. 7 is a diagram illustrating an alternative report management method apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an alternative electronic device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be implemented in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to one aspect of the embodiment of the application, an interaction method of intelligent household equipment is provided. The interaction method of the intelligent Home equipment is widely applied to full-house intelligent digital control application scenes such as intelligent homes (Smart Home), intelligent homes, intelligent Home equipment ecology, intelligent house (intelligence House) ecology and the like. Optionally, in this embodiment, the interaction method for the smart home devices may be applied to a hardware environment formed by the terminal device 102 and the server 104 as shown in fig. 1. As shown in fig. 1, the server 104 is connected to the terminal device 102 through a network, and may be configured to provide a service (e.g., an application service) for the terminal or a client installed on the terminal, set a database on the server or independent of the server, and provide a data storage service for the server 104, and configure a cloud computing and/or edge computing service on the server or independent of the server, and provide a data operation service for the server 104.
The network may include, but is not limited to, at least one of: wired network, wireless network. The wired network may include, but is not limited to, at least one of: wide area networks, metropolitan area networks, local area networks, which may include, but are not limited to, at least one of the following: WIFI (Wireless Fidelity), bluetooth. Terminal equipment 102 can be but not limited to be PC, the cell-phone, the panel computer, intelligent air conditioner, intelligent cigarette machine, intelligent refrigerator, intelligent oven, intelligent kitchen range, intelligent washing machine, intelligent water heater, intelligent washing equipment, intelligent dish washer, intelligent projection equipment, intelligent TV, intelligent clothes hanger, intelligent (window) curtain, intelligence audio-visual, smart jack, intelligent stereo set, intelligent audio amplifier, intelligent new trend equipment, intelligent kitchen guarding equipment, intelligent bathroom equipment, intelligence robot of sweeping the floor, intelligence robot of wiping the window, intelligence robot of mopping the ground, intelligent air purification equipment, intelligent steam ager, intelligent microwave oven, intelligent kitchen is precious, intelligent clarifier, intelligent water dispenser, intelligent lock etc..
Optionally, as an optional implementation manner, as shown in fig. 2, the report management method includes:
s202, acquiring a first source database matched with the target report, wherein the first source database is used for providing source data to be called for the target report;
s204, displaying attribute information of each report related to the first source database on a statement generation interface, and establishing a correlation between the attribute information and target conditions corresponding to target condition identifiers in response to correlation operations executed on the target condition identifiers on the statement generation interface, wherein a plurality of condition identifiers are displayed on the statement generation interface, the plurality of condition identifiers comprise the target condition identifiers, and the condition identifiers are used for representing query rules of statements on source data;
s206, acquiring a first query statement based on the association relationship, wherein the first query statement is used for querying source data from a first source database;
and S208, managing the target report by using the first query statement.
Optionally, in this embodiment, the report management method may be but is not limited to be applied to a simple report system that needs to be used when a developer develops, but the report system in the prior art has many problems, that is, firstly, the number of reports is large, the existing system cannot further optimize the large number, furthermore, the framework of the target is complex, and it is not convenient enough when a novice developer uses the report system, and the report system can be used only by learning the framework, so that the efficiency is low, and moreover, the report system also has the advantages of simple function, high code repetition rate, beautiful form, and further optimization of functional diversity.
According to the technical problems which are not solved in the prior art, the method and the system provide a new system, a dynamic code management platform is provided, developers only need to simply write SQL sentences and develop a small amount of SQL sentences in the original system, and reports with powerful functions and exquisite styles can be introduced. The system not only fundamentally reduces the report development difficulty and development period, but also improves the code reuse rate and greatly reduces the labor cost. The dynamic database and the matched query sentences are utilized to realize a dynamic system with strong accessibility and higher development efficiency, and editing management is carried out through the query sentences, so that the modification, preview, derivation and other functions of developers are facilitated, the richness of the functions is increased, the efficiency of further increasing the richness of the functions on the basis of reducing the operation difficulty is achieved, the technical effect of efficiently generating reports is realized, and the technical problem of lower report management efficiency is solved.
Alternatively, in this embodiment, the target report may be understood as a report finally output after management according to the dynamic database and the first query statement, such as a table of employee performance ranking, household information of an apartment, and the like; the first source database is defined as a dynamic data source which is ready to use and is ready to be prepared, has the characteristics of no need of initialization and modification, and can support main stream databases such as Mysql and Oracle; the source data to be called is data stored in a first source database, such as personal information of a user, work performance of an employee and the like; the first query statement is a statement for performing addition, deletion, modification and check on the first source database by using an SQL language; the grammar test may be, but not limited to, testing grammar rules of the first query statement, testing what kind of query statement the first query statement is, testing whether the grammar of the first query statement has contradictions and whether the semantics are clear, and automatically completing missing items of the first query statement to improve the accuracy of the query statement. The management means of the query statement is not limited to editing or replacing the target report, for example, hidden editing can be performed on rows and columns which are not needed by the report, when two reports need to be processed at the same time, the report a is replaced by the report b by the query statement, or the column Nth of the report a is replaced by the query statement.
Optionally, in this embodiment, the statement generation interface may, but is not limited to, provide a plurality of statement generation modes, such as automatic or manual, for the user, taking the manual statement generation mode as an example, that is, support the user to directly and manually write, and provide the user with an editor with an attractive style and convenient use, and provide functions of automatic completion, keyword highlighting, SQL formatting, and the like; taking an automatic statement generation mode as an example, the statement generation interface comprises a graphical interface, a user can finish dragging operation on the graphical interface, specifically, the system can automatically pull all table names and table structures of the data source, the user only needs to drag the interface and set certain association conditions according to rules, the system can automatically generate corresponding SQL statements, the functions provide SQL preview and verification functions, syntax errors are highlighted, and subsequent modification is facilitated.
It should be noted that, a first source database matched with the target report is obtained, where the first source database is used to provide source data to be called for the target report; displaying attribute information of each report form associated with a first source database on a statement generation interface, and establishing an association relation between the attribute information and target conditions corresponding to target condition identifications in response to association operations executed on the target condition identifications on the statement generation interface, wherein a plurality of condition identifications are displayed on the statement generation interface, the plurality of condition identifications comprise the target condition identifications, and the condition identifications are used for representing query rules of statements on source data; acquiring a first query statement based on the incidence relation, wherein the first query statement is used for querying source data from a first source database; and managing the target report by using the first query statement. Through the matching of the dynamic data source and the query statement, the report method has the advantages of high adaptability and simple access, so that the learning difficulty of developers is reduced, the operation steps of editing the report are optimized, the development efficiency and speed are improved, and the application range is expanded. Through the management of the report forms by the query statements, the diversity of functions is enriched, and therefore the operation efficiency of report form generation is improved.
For further example, optionally as shown in fig. 3, a matched first source database 302 is obtained from the target report 306, the first source database 302 contains source data 308 containing information such as names and telephones, a corresponding first query statement 304 is obtained according to the first source database 302, the source data is queried by using the first query statement 304, and the target report 306 is managed after syntax test.
According to the embodiment provided by the application, in the embodiment of the application, a first source database matched with a target report is obtained, wherein the first source database is used for providing source data to be called for the target report; displaying attribute information of each report form associated with a first source database on a statement generation interface, and establishing an association relation between the attribute information and target conditions corresponding to target condition identifications in response to association operations executed on the target condition identifications on the statement generation interface, wherein a plurality of condition identifications are displayed on the statement generation interface, the plurality of condition identifications comprise the target condition identifications, and the condition identifications are used for representing query rules of statements on source data; acquiring a first query statement based on the incidence relation, wherein the first query statement is used for querying source data from a first source database; and managing the target report by utilizing the first query statement. The advantage that the dynamic data source can be used immediately after being matched is utilized, a large number of mainstream databases are supported, developers can modify and edit the dynamic data source conveniently, the technical purposes of reducing the difficulty of the developers in starting, improving the flexibility of system access and increasing the diversity of system functions are achieved, the system development speed is improved, the development period is saved, and the technical effect of improving the report management efficiency is achieved.
As an optional solution, after obtaining the first query statement based on the association relationship, the method further includes: previewing and grammatical testing the first query statement, displaying a preview result of the first query statement, and highlighting a grammatical error in the preview result under the condition that the test result of the grammatical testing comprises a grammatical error;
as an optional solution, the managing the target report by using the first query statement includes: and after the first query statement passes the syntax test, editing the target report in real time by using the first query statement.
Optionally, in this embodiment, the real-time editing may be, but is not limited to, modifying, adding, modifying, and searching the basic information. In addition, the real-time editing is not limited to the function of calculation, the numbers of the a column and the c column are selected by the query sentence according to the needs to perform weighted calculation, so that a more accurate calculation result is obtained, and the query efficiency is increased.
It should be noted that, after the first query statement passes the syntax test, the target report is edited in real time by using the first query statement. The editing has higher flexibility, the more abundant the functions are, the larger the operable space of the developer is, and thus, the operating efficiency of the developer is improved.
For further example, as shown in fig. 4, optionally, by taking personal information of a statistical employee as an example, a source database is obtained, and a query statement is matched, a developer may edit a target report using the query statement, but not limited to adding a permission to a target report editing function, for example, a developer with a management permission may edit the report, or an employee with a lower permission may only modify telephone information in a column report, hide personal address information of a column c, a manager with a higher permission may modify all columns in the report using the query statement, and a person with the highest permission may also highlight an important column using the query statement.
According to the embodiment provided by the application, after the first query statement passes the syntax test, the target report is edited in real time by using the first query statement, so that the aim of editing the report in a user-defined manner according to different requirements is fulfilled, and the technical effects of improving the flexibility and diversity of report management are achieved.
As an optional scheme, the real-time editing of the target report by using the first query statement includes at least one of:
s1, modifying basic information of a target report by using a first query statement;
s2, modifying the display attribute of the target report by using the first query statement;
s3, modifying the content style of the target report by using the first query statement;
and S4, modifying the query condition of the target report by using the first query statement.
Optionally, in this embodiment, the basic information of the target report is modified, but not limited to modifying the column name, modifying the header, and locking the column; modifying the display attribute of the target report, wherein the display attribute can be used for hiding and displaying temporarily-unnecessary columns and highlighting more important columns; the modification of the content style of the target report can be but is not limited to the modification of the header and the content style, the modification of the query condition of the target report can be set to be various decimal styles, the modification of the query condition of the target report can be set to be various types of query conditions, and the modification can be divided into three modes of simple query, advanced query and accurate query, so that the accurate query of developers is facilitated.
For further example, taking the personal information of the statistical employee as an example, the source database is obtained, the query statement is matched, the developer can edit the target report by using the query statement, but not limited to adding the authority to the editing function of the target report, for example, the developer with the management authority can edit the report, or the employee with the lower authority can only modify the telephone information in the report in the column a, hide the personal address information in the column c, and the manager with the higher authority can perform comprehensive modification.
It should be noted that, after the first query statement passes the syntax test, the basic information of the target report is modified by using the first query statement; after the first query statement passes the syntax test, modifying the display attribute of the target report by using the first query statement; after the first query statement passes the syntax test, modifying the content style of the target report by using the first query statement; and after the first query statement passes the syntax test, modifying the query condition of the target report by using the first query statement. After the syntax test is passed, the header and the column of the report can be modified in various modes, so that the beneficial effect of improving the versatility of the report can be achieved, and the operation space is improved for developers.
According to the embodiment provided by the application, after the first query statement passes the syntax test, the basic information of the target report is modified by using the first query statement; after the first query statement passes the syntax test, modifying the display attribute of the target report by using the first query statement; after the first query statement passes the syntax test, modifying the content style of the target report by using the first query statement; after the first query statement passes the syntax test, the query condition of the target report is modified by using the first query statement, so that the aim of improving the flexibility and diversity of editing is fulfilled, and the technical effect of enriching the report editing function is realized.
As an optional solution, the managing the target report by using the first query statement includes: and after the first query statement passes the syntax test, previewing and displaying the target report by using the first query statement, wherein the previewing and displaying comprise the table file corresponding to the target report.
Optionally, in this embodiment, the preview display may be, but is not limited to, modify and beautify the basic attribute and the content format of the generated preview report, provide a report format carried by the system, and recommend that the format is conveniently adjusted and beautified by a developer on the side, so as to check the effect of the preview report.
It should be noted that, after the first query statement passes the syntax test, the target report is previewed and displayed by using the first query statement, where the previewing and displaying include the table file corresponding to the target report. By adding the function of preview display, the function of the report system is perfected, and the functionality of the report system is further improved.
Through the embodiment provided by the application, after the first query statement passes the grammar test, the first query statement is utilized to preview and display the target report, wherein the preview and display comprises the form file corresponding to the target report, and in consideration of the fact that when developers face relatively complex reports, format errors and the like are easy to occur and are not easy to detect by the grammar test, the query statement is further utilized to preview and display after passing the grammar test, when the developers do not have problems after previewing and displaying and then exporting, if the problems occur, the developers can return to modify and edit, the error rate is reduced, the modifying steps of the developers are saved, and the technical effect of improving the system report completing efficiency is achieved.
As an optional solution, after the target report is managed by using the first query statement, the method includes: and exporting and generating the table file in response to the export instruction triggered by the target report.
Optionally, in this embodiment, the export and generation table file may be, but is not limited to, an Excel file.
Through the embodiment provided by the application, after the target report is managed by using the first query statement, the method comprises the following steps: responding to the export instruction triggered by the target report, exporting and generating the table file, thereby achieving the purpose of improving the export instruction of report editing, and further achieving the technical effect of generating the efficiency of the table file
As an optional solution, after the target report is managed by using the first query statement, the method includes:
s1, acquiring a second source database matched with a target report;
s2, acquiring a second query statement corresponding to a second source database;
and S3, after the second query statement passes the syntax test, managing the target report by using the second query statement.
Optionally, in this embodiment, the second source database is a database different from the first source database, and is also limited to have a dynamic state and need not to be initialized, the second query statement is a statement for querying the second source database, and part of information of the first source database and part of information of the second source database may overlap with each other, so that when the report is edited, the overlapped part of information may be edited in the corresponding column, which is convenient for a developer to merge two reports after subsequently generating the report.
It should be noted that, after the target report is managed by using the first query statement, the method includes: acquiring a second source database matched with the target report; acquiring a second query statement corresponding to a second source database; and after the second query statement passes the syntactic test, managing the target report by using the second query statement.
For further example, as shown in fig. 5, optionally, the first source database is a personal information database of the employee, the second source database is a work attendance time database of the employee, the database is used from the first source database, the name, the home address, the telephone number, and the work number ID of the employee are queried in the first query language, the first report 502 is generated by editing, the work number ID and the work attendance time of the employee are obtained from the second source database by using the second query statement, the second report 504 is generated by editing, when the developer needs two reports at the same time, the first report 502 and the second report 504 can be combined to generate one report by using a merging function, and the degree of association between the distance of the employee from the company and the work attendance time can be known in the report; when a developer edits the first report form at the same time, the developer needs to check the second report form, so that the developer can use the switching function to directly switch from the first report form to the second report form, thereby being convenient to use.
By the embodiment provided by the application, after the target report is managed by the first query statement, the method comprises the following steps: acquiring a second source database matched with the target report; acquiring a second query statement corresponding to a second source database; after the second query statement passes the syntax test, the second query statement is used for managing the target report, and it is shown that the method is not limited to performing the query process of only one source database in the same time period, and can also be a multi-threaded query report mode, so that when the number of reports is large, a developer can conveniently switch, and further the purpose of respectively managing the query statements matched with the two databases at the same time is achieved, thereby achieving the technical effect of flexibility in report management.
As an optional solution, in the process of managing the target report by using the first query statement, the method includes:
s1, acquiring a query request triggered by a target report, wherein a query instruction carries target characters for querying source data;
s2, responding to the query request, and acquiring a target query statement corresponding to the target character, wherein the first query statement comprises the target query statement;
and S3, under the condition that the source data corresponding to the target query statement is queried from the first source database, displaying a query result, wherein the query result comprises the source data corresponding to the target query statement.
Optionally, in this embodiment, the query request carries a query requirement code of a developer when editing a report, the target character is a key character in query, and the first query statement may be generated by automatically completing a statement of the target character.
It should be noted that, a query request triggered by a target report is obtained, where a query instruction carries a target character for querying source data; responding to the query request, and acquiring a target query statement corresponding to the target character, wherein the first query statement comprises the target query statement; and under the condition that the source data corresponding to the target query statement is queried from the first source database, displaying a query result, wherein the query result comprises the source data corresponding to the target query statement. And the query result is displayed through the query sentence corresponding to the target character, so that the query accuracy is improved.
According to the embodiment provided by the application, the query request triggered by the target report is obtained, wherein the query instruction carries the target characters for querying the source data; responding to the query request, and acquiring a target query statement corresponding to the target character, wherein the first query statement comprises the target query statement; and under the condition that the source data corresponding to the target query statement is queried from the first source database, displaying a query result, wherein the query result comprises the source data corresponding to the target query statement, and a developer can generate a delicate report by using automatic completion of the report only by mastering basic knowledge, so that the aim of reducing the technical requirement of the developer is fulfilled, and the technical effect of improving the efficiency of report editing is realized.
For convenience of understanding, the report method is applied to a specific report management scene:
an alternative is to view and configure a Data Source (Data Source), i.e. a Source that provides the Data required by the application, as shown in fig. 6, for example. The data source ensures the interaction specification and protocol between the application program and the target data, defines the configuration of position information, user authentication information and some characteristics required during interaction, and encapsulates how to establish connection with the data source and exposes an interface for acquiring the connection outwards; generating an SQL statement: SQL (Structured Query Language) is a standard computer Language for ANSI, a standard computer Language for accessing and processing databases. SQL can work in conjunction with database programs, such as Mysql, oracle, and other database systems. The system mainly uses Data Query Language (DQL), which is a statement in SQL Language responsible for Data Query without modifying Data itself, and is the most basic SQL statement. The reserved word SELECT is the verb that DQL (and all SQL) uses most, and other commonly used reserved words for DQL are FROM, WHERE, GROUP BY, HAVING and ORDER BY. These DQL reserved words are often used with other types of SQL statements. Data can be captured from a database as required by reasonably writing DQL statements; the system supports 2 ways to generate SQL sentences. The first is direct writing. The system provides an editor with beautiful style and convenient use, provides functions of automatic completion, keyword highlight display, SQL formatting and the like, and can be selected by personnel with certain database development foundation. And secondly, dragging a graphical interface, wherein the system can automatically pull all table names and table structures of the data source, and the system can automatically generate corresponding SQL sentences only by dragging the interface and setting certain association conditions according to rules by a user. The function provides SQL preview and check function, and highlights grammar error parts, thereby facilitating subsequent modification. The scheme is suitable for all people. The system does not support SQL types such as Data Definition Language (DDL), data Manipulation Language (DML), data Control Language (Data Control Language) and the like; and (4) editing a report form: element UI is a component library realized by adopting Vue 2.0 as a basic framework, and provides matched design resources, simple style and standard documents; the maintenance SQL and the report editing page of the system are developed by Element UI, so that the permission control is realized through the current login user, and the data leakage is prevented. After the SQL sentence is compiled and is tested by syntax, the report can be edited and previewed in real time. The report editing function is powerful, and the report editing function comprises column name modification, column hiding display, header and content style modification, column locking, user-defined highlight display, various decimal styles and various query condition settings and is exported to be an Excel file.
It is understood that in the specific implementation of the present application, related data such as user information, when the above embodiments of the present application are applied to specific products or technologies, user permission or consent needs to be obtained, and the collection, use and processing of related data need to comply with related laws and regulations and standards of related countries and regions.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
According to another aspect of the embodiment of the application, a report management device for implementing the report management method is further provided. As shown in fig. 7, the apparatus includes:
a first obtaining unit 702, configured to obtain a first source database matched for a target report, where the first source database is used to provide source data to be called for the target report;
a generating unit 704, configured to display attribute information of each report associated with the first source database on a statement generation interface, and establish an association relationship between the attribute information and a target condition corresponding to a target condition identifier in response to an association operation performed on the target condition identifier on the statement generation interface, where multiple condition identifiers are displayed on the statement generation interface, the multiple condition identifiers include the target condition identifier, and the condition identifier is used to indicate a query rule of a statement for source data;
a second obtaining unit 706, configured to obtain a first query statement based on the association relationship, where the first query statement is used to query the source data from the first source database;
the first management unit 708 is configured to manage the target report by using the first query statement.
For a specific embodiment, reference may be made to the example shown in the report management device, and details are not described herein in this example.
As an optional solution, the apparatus further includes: the error unit is used for previewing and grammatical testing the first query statement after the first query statement is obtained based on the incidence relation, displaying a preview result of the first query statement, and highlighting a grammatical error in the preview result under the condition that the test result of the grammatical testing comprises the grammatical error; the first management unit 708 further includes: and the first editing module is used for editing the target report in real time by using the first query statement after the first query statement passes the syntactic test.
As an alternative, the first editing module includes at least one of the following:
the first modification sub-module is used for modifying the basic information of the target report by using the first query statement after the first query statement passes the syntax test;
the second modification sub-module is used for modifying the display attribute of the target report by using the first query statement after the first query statement passes the syntax test;
the third modification submodule is used for modifying the content style of the target report by using the first query statement after the first query statement passes the syntax test;
and the fourth modification submodule is used for modifying the query condition of the target report by using the first query statement after the first query statement passes the syntax test.
For a specific embodiment, reference may be made to the example shown in the report management device, and details are not described herein in this example.
As an optional solution, the first management unit 708 further includes: and the first display module is used for previewing and displaying the target report by using the first query statement after the first query statement passes the syntax test, wherein the previewing and displaying comprise the table file corresponding to the target report.
For a specific embodiment, reference may be made to the example shown in the report management method, and details are not described herein in this example.
As an optional scheme, the first display module further includes a first response sub-module, and after the target report is managed by using the first query statement, the first response sub-module responds to an export instruction triggered by the target report, and exports and generates the table file.
For a specific embodiment, reference may be made to the example shown in the report management method, and details are not described herein in this example.
As an optional scheme, the apparatus includes a second management unit, configured to obtain a second source database matched to the target report after the target report is managed by using the first query statement; acquiring a second query statement corresponding to a second source database; and after the second query statement passes the syntactic test, managing the target report by using the second query statement.
For a specific embodiment, reference may be made to the example shown in the report management method, and details are not described herein in this example.
As an alternative, the first management unit 708 includes: the first acquisition module is used for acquiring a query request triggered by a target report, wherein a query instruction carries target characters used for querying source data;
the first response module is used for responding to the query request and acquiring a target query statement corresponding to the target character, wherein the first query statement comprises the target query statement;
and the second display module is used for displaying the query result under the condition that the source data corresponding to the target query statement is queried from the first source database, wherein the query result comprises the source data corresponding to the target query statement.
For a specific embodiment, reference may be made to the example shown in the report management method, and details are not described herein in this example.
According to another aspect of the embodiment of the present application, there is further provided an electronic device for implementing the report management method, as shown in fig. 8, the electronic device includes a memory 802 and a processor 804, the memory 802 stores a computer program, and the processor 804 is configured to execute the steps in any one of the method embodiments through the computer program.
Optionally, in this embodiment, the electronic device may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, acquiring a first source database matched with a target report, wherein the first source database is used for providing source data to be called for the target report;
s2, displaying attribute information of each report form related to the first source database on a statement generation interface, and establishing a correlation relation between the attribute information and target conditions corresponding to target condition identifications in response to correlation operations executed on the target condition identifications on the statement generation interface, wherein a plurality of condition identifications are displayed on the statement generation interface, the plurality of condition identifications comprise the target condition identifications, and the condition identifications are used for representing query rules of statements on source data;
s3, acquiring a first query statement based on the incidence relation, wherein the first query statement is used for querying source data from a first source database;
and S4, managing the target report by using the first query statement.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 8 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palmtop computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 8 does not limit the structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 8, or have a different configuration than shown in FIG. 8.
The memory 802 may be used to store software programs and modules, such as program instructions/modules corresponding to the report management method and apparatus in the embodiments of the present application, and the processor 804 executes various functional applications and data processing by running the software programs and modules stored in the memory 802, that is, the report management method described above is implemented. The memory 802 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 802 can further include memory located remotely from the processor 804, which can be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The memory 802 may be specifically, but not limited to, used to store information such as a first source database, a first query statement, and the like. As an example, as shown in fig. 8, the memory 802 may include, but is not limited to, a first obtaining unit 702, a generating unit 704, a second obtaining unit 706, and a first managing unit 708 in the report managing apparatus. In addition, the report management device may further include, but is not limited to, other module units in the report management device, which is not described in detail in this example.
Optionally, the transmitting device 806 is configured to receive or transmit data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 806 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmission device 806 is a Radio Frequency (RF) module, which is used to communicate with the internet via wireless.
In addition, the electronic device further includes: a display 808, configured to display information such as the first source database and the first query statement; and a connection bus 810 for connecting the respective module components in the above electronic apparatus.
In other embodiments, the terminal device or the server may be a node in a distributed system, where the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting a plurality of nodes through a network communication. A Peer-To-Peer (P2P) network may be formed between the nodes, and any type of computing device, such as a server, a terminal, and other electronic devices, may become a node in the blockchain system by joining the Peer-To-Peer network.
According to an aspect of the application, there is provided a computer program product comprising a computer program/instructions containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section, and/or installed from a removable medium. When executed by the central processing unit, the computer program performs various functions provided by the embodiments of the present application.
The above-mentioned serial numbers of the embodiments of the present application are merely for description, and do not represent the advantages and disadvantages of the embodiments.
It should be noted that the computer system of the electronic device is only an example, and should not bring any limitation to the functions and the application scope of the embodiments of the present application.
The computer system includes a Central Processing Unit (CPU) that can perform various appropriate actions and processes according to a program stored in a Read-Only Memory (ROM) or a program loaded from a storage section into a Random Access Memory (RAM). In the random access memory, various programs and data necessary for system operation are also stored. The central processor, the read-only memory and the random access memory are connected with each other through a bus. An Input/Output interface (i.e., I/O interface) is also connected to the bus.
The following components are connected to the input/output interface: an input section including a keyboard, a mouse, and the like; an output section including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section including a hard disk and the like; and a communication section including a network interface card such as a local area network card, a modem, or the like. The communication section performs communication processing via a network such as the internet. The driver is also connected to the input/output interface as needed. A removable medium such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive as necessary, so that a computer program read out therefrom is mounted into the storage section as necessary.
In particular, the processes described in the various method flowcharts may be implemented as computer software programs, according to embodiments of the present application. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section, and/or installed from a removable medium. The computer program, when executed by the central processor, performs various functions defined in the system of the present application.
According to an aspect of the present application, there is provided a computer-readable storage medium from which a processor of a computer device reads computer instructions, the processor executing the computer instructions to cause the computer device to perform the method provided in the above-mentioned various alternative implementations.
Alternatively, in the present embodiment, the above-mentioned computer-readable storage medium may be configured to store a computer program for executing the steps of:
s1, acquiring a first source database matched with a target report, wherein the first source database is used for providing source data to be called for the target report;
s2, displaying attribute information of each report form related to the first source database on a statement generation interface, and establishing a correlation between the attribute information and target conditions corresponding to target condition identifications in response to correlation operations executed on the target condition identifications on the statement generation interface, wherein a plurality of condition identifications are displayed on the statement generation interface, the plurality of condition identifications comprise the target condition identifications, and the condition identifications are used for representing query rules of statements on source data;
s3, acquiring a first query statement based on the incidence relation, wherein the first query statement is used for querying source data from a first source database;
and S4, managing the target report by using the first query statement.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the various methods in the foregoing embodiments may be implemented by a program instructing hardware related to the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, read-Only memories (ROMs), random Access Memories (RAMs), magnetic or optical disks, and the like.
The above-mentioned serial numbers of the embodiments of the present application are merely for description, and do not represent the advantages and disadvantages of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including instructions for causing one or more computer devices (which may be personal computers, servers, network devices, or the like) to execute all or part of the steps of the method of the embodiments of the present application.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is only a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be an indirect coupling or communication connection through some interfaces, units or modules, and may be electrical or in other forms.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. A report management method is characterized by comprising the following steps:
acquiring a first source database matched with a target report, wherein the first source database is used for providing source data to be called for the target report;
displaying attribute information of each report form associated with the first source database on a statement generation interface, and establishing an association relationship between the attribute information and a target condition corresponding to a target condition identifier in response to an association operation performed on the target condition identifier on the statement generation interface, wherein a plurality of condition identifiers are displayed on the statement generation interface, the plurality of condition identifiers include the target condition identifier, and the condition identifier is used for representing a query rule of a statement on source data;
acquiring a first query statement based on the incidence relation, wherein the first query statement is used for querying the source data from the first source database according to the target condition;
and managing the target report by utilizing the first query statement.
2. The method of claim 1,
after the obtaining the first query statement based on the incidence relation, the method further comprises: previewing and grammatical testing the first query statement, displaying a preview result of the first query statement, and highlighting the grammatical error in the preview result under the condition that the test result of the grammatical testing comprises the grammatical error;
the managing the target report by using the first query statement comprises: and after the first query statement passes the syntax test, editing the target report in real time by using the first query statement.
3. The method of claim 2, wherein the editing the target report in real-time using the first query statement comprises at least one of:
modifying the basic information of the target report by using the first query statement;
modifying the display attribute of the target report by using the first query statement;
modifying the content style of the target report by utilizing the first query statement;
and modifying the query condition of the target report by utilizing the first query statement.
4. The method of claim 1, wherein managing the target report using the first query statement comprises:
and previewing and displaying the target report by using the first query statement, wherein the previewing and displaying comprise a table file corresponding to the target report.
5. The method of claim 4, wherein after said managing the target report with the first query statement, the method further comprises:
and exporting and generating the table file in response to an export instruction triggered by the target report.
6. The method of any of claims 1-5, wherein after managing the target report with the first query statement, the method further comprises:
acquiring a second source database matched with the target report;
acquiring a second query statement corresponding to the second source database;
and after the second query statement passes the syntax test, managing the target report by using the second query statement.
7. The method according to any one of claims 1 to 5, wherein in the managing the target report using the first query statement, the method further comprises:
acquiring a query request triggered by the target report, wherein the query instruction carries target characters used for querying the source data;
responding to the query request, and acquiring a target query statement corresponding to the target character, wherein the first query statement comprises the target query statement;
and displaying a query result under the condition that the source data corresponding to the target query statement is queried from the first source database, wherein the query result comprises the source data corresponding to the target query statement.
8. A report management apparatus, comprising:
the system comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring a first source database matched with a target report, and the first source database is used for providing source data to be called for the target report;
a generating unit, configured to display attribute information of each report associated with the first source database on a statement generation interface, and establish an association relationship between the attribute information and a target condition corresponding to a target condition identifier in response to an association operation performed on the target condition identifier on the statement generation interface, where a plurality of condition identifiers are displayed on the statement generation interface, where the plurality of condition identifiers include the target condition identifier, and the condition identifier is used to represent a query rule of a statement for source data;
a second obtaining unit, configured to obtain a first query statement based on the association relationship, where the first query statement is used to query the source data from the first source database;
and the first management unit is used for managing the target report by utilizing the first query statement.
9. A computer-readable storage medium, comprising a stored program, wherein the program when executed performs the method of any of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 7 by means of the computer program.
CN202211186895.3A 2022-09-27 2022-09-27 Report management method and device, storage medium and electronic device Pending CN115639998A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211186895.3A CN115639998A (en) 2022-09-27 2022-09-27 Report management method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211186895.3A CN115639998A (en) 2022-09-27 2022-09-27 Report management method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN115639998A true CN115639998A (en) 2023-01-24

Family

ID=84942296

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211186895.3A Pending CN115639998A (en) 2022-09-27 2022-09-27 Report management method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN115639998A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117251457A (en) * 2023-11-20 2023-12-19 昆山华东信息科技有限公司 Grid report making method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117251457A (en) * 2023-11-20 2023-12-19 昆山华东信息科技有限公司 Grid report making method and device
CN117251457B (en) * 2023-11-20 2024-03-12 昆山华东信息科技有限公司 Grid report making method and device

Similar Documents

Publication Publication Date Title
CN111045655B (en) Page rendering method and device, rendering server and storage medium
WO2022048316A1 (en) Method and apparatus for designing front-end page, storage medium, and device
CN110297738A (en) Monitoring method, device, equipment and the storage medium of system service
CN105573224B (en) Monitoring method, apparatus and system based on abstract model
CN108038212B (en) Data interaction method, device, system, equipment and storage medium
CN104268241B (en) Attribute display method in a kind of configuration database
CN102184184A (en) Method for acquiring webpage dynamic information
CN110865843A (en) Page backtracking, information backup and problem solving method, system and equipment
CN111695827B (en) Business process management method and device, electronic equipment and storage medium
CN107480036A (en) Automatic test approach, device, storage medium and the terminal of iOS Mobile solutions
CN115687349A (en) Database table generation method and device, storage medium and electronic device
CN115639998A (en) Report management method and device, storage medium and electronic device
CN114564852A (en) Operation method of FMEA data node and electronic equipment
CN113485909B (en) Test method, test device, computing equipment and medium
CN106682210B (en) Log file query method and device
CN113326238A (en) Data processing method, device, equipment and storage medium
CN116360735A (en) Form generation method, device, equipment and medium
CN106776644B (en) A kind of reporting system configuration method and device
CN108388576B (en) Method and system for interactively generating map
US9430125B1 (en) Simplifying rules generation for an event-based analysis engine
CN108092959B (en) BACnet protocol analysis method based on configuration
CN113031928B (en) Web system generation method and device, electronic equipment and computer readable storage medium
CN114996554A (en) Database query method and device, storage medium and electronic equipment
CN109739884B (en) Graphical prompt information service design method for power monitoring system
CN110704154B (en) Multi-language template release method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination