CN117785196A - Form page generation method and device with adding, deleting and checking functions - Google Patents

Form page generation method and device with adding, deleting and checking functions Download PDF

Info

Publication number
CN117785196A
CN117785196A CN202311828890.0A CN202311828890A CN117785196A CN 117785196 A CN117785196 A CN 117785196A CN 202311828890 A CN202311828890 A CN 202311828890A CN 117785196 A CN117785196 A CN 117785196A
Authority
CN
China
Prior art keywords
component
information
deleting
code
code file
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
CN202311828890.0A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202311828890.0A priority Critical patent/CN117785196A/en
Publication of CN117785196A publication Critical patent/CN117785196A/en
Pending legal-status Critical Current

Links

Abstract

The application discloses a method and a device for generating form pages with functions of adding, deleting and checking. Relates to the field of financial science and technology, and the method comprises the following steps: determining a code file path and data table information related to the addition, deletion and verification; configuring a code file path and data table information in a back-end code generating tool, and operating the back-end code generating tool to generate a code file for realizing an add-delete-check function interface in the code file path; determining form page style information and contents to be displayed of form pages, and acquiring interface information from a code file for realizing an interface of the adding, deleting and modifying function; and configuring interface information, form page style information and contents to be displayed as form configuration parameters, and transmitting the form configuration parameters to a form generation component to generate a form page with the functions of adding, deleting and checking. By the method and the device, the problems of complex implementation and high cost of form page adding, deleting and checking function development in a front-end and rear-end separation mode in the related technology are solved.

Description

Form page generation method and device with adding, deleting and checking functions
Technical Field
The application relates to the field of financial science and technology, in particular to a method and a device for generating form pages with an adding, deleting and checking function.
Background
In a bank internal management system, a large number of basic form pages related to deletion and correction are related, a complete deletion and correction function form page is realized based on a development mode of current front-end and rear-end separation, and the following task points are required to be repeatedly completed: front-end development engineers write a search condition area and a data display view interface; database development engineers write database operation sentences to realize the function logic of adding, deleting and modifying database tables; the back-end development engineer realizes adding, deleting and checking interface logic and realizes a data transmission function; front-end development engineers respectively call different adding, deleting and modifying interfaces to realize page logic functions and related embedded point tasks.
The method for realizing the function of adding, deleting and checking the form page based on the development mode of the current front-end and back-end separation has the following defects: first, since the internal management system of the bank involves a large number of data tables, and under the background of a large data age, the number and content of the data tables are very large, and for a back-end development engineer and a database development engineer, the workload of developing view pages, data deletion and correction interfaces and database operation sentences for each table individually is large. Secondly, in the aspect of front-end implementation, because the design style of the management system is unified in the same bank, and the form page layout of the adding, deleting and checking functions is relatively fixed, the front-end development engineer needs more repeated code quantity. In the aspect of the back-end implementation, because the interface logic is used for receiving the query parameters transmitted by the front-end, and returning the results to the front-end after executing the database operation language, the back-end development engineers need a large amount of repeated codes, so that the overall coupling degree of the system is relatively high, and the later maintenance cost is high. Thirdly, as the data security of the internal management system of the bank is related to the system security, a certain management requirement such as data protection and the like is usually required to be met, and the related operation and maintenance capability is difficult to upgrade and reform. Fourth, coding capability requirements of various development engineers are higher when codes are written based on form adding, deleting and checking functional requirements, and the phenomenon of poor code quality is easily caused due to different processing efficiency and performance of database operation sentences due to the dispersion of technical capability of the developers.
Aiming at the problems of complex realization and high cost of form page adding, deleting and checking function development in a front-end and back-end separation mode in the related art, no effective solution is proposed at present.
Disclosure of Invention
The application provides a method and a device for generating form pages with functions of adding, deleting and checking, which are used for solving the problems of complex realization and high cost of form page adding, deleting and checking function development in a front-end and rear-end separation mode in the related technology.
According to one aspect of the application, a method for generating a form page with an addition, deletion and check function is provided. The method comprises the following steps: determining a code file path and data table information related to the addition, deletion and verification; configuring a code file path and data table information in a back-end code generating tool, and operating the back-end code generating tool to generate a code file for realizing an add-delete-check function interface in the code file path; determining form page style information and contents to be displayed of form pages, and acquiring interface information from a code file for realizing an interface of the adding, deleting and modifying function; and configuring interface information, form page style information and contents to be displayed as form configuration parameters, and transmitting the form configuration parameters to a form generation component to generate a form page with the functions of adding, deleting and checking.
Optionally, the back-end code generating tool is configured with a template code file, the template code file at least includes a first template code file for defining a mapping relation between an add-delete-and-examine operation sentence and an object of the database and a database table, a second template code file for storing an item, a third template code file for defining a database query sentence and defining a mapping relation between a query result and an object, and running the back-end code generating tool, and generating a code file for implementing an add-delete-and-examine function interface in a code file path includes: generating a model file according to the data table information configuration, replacing class name placeholders in all the template code files with class names of the model file, and replacing class attribute placeholders in all the template code files with class attributes of the model file to obtain a replaced file; and outputting the replaced file to a code file path to obtain a code file for realizing the adding, deleting and checking function interface.
Optionally, the data table information related to the deletion and the correction includes database information and table information, the table information includes at least a database table name and field information of each table, and generating the model file according to the data table information configuration includes: accessing a target database according to database information, and acquiring a target data table indicated by table information from the target database, wherein the database information at least comprises a database uniform resource locator, a database type, a database user name and password information; and converting the database table name of the target data table into a class name, and converting the field information of the target data table into a class attribute to obtain the model file.
Optionally, before configuring the code file path and the data table information in the back-end code generation tool, the method further comprises: determining a code associated with the non-business function, wherein the non-business function comprises at least one of: a buried point function, a log recording function and a monitoring function; the code associated with the non-business function is configured in a second template file.
Optionally, the form generating component includes a parent component and a plurality of sub-components, the plurality of sub-components at least includes a form query component, a query form paging component, and a form submitting component, the form configuration parameters are transferred into the form generating component, and generating the form page with the adding, deleting and checking functions includes: form configuration parameters are transmitted into the parent component, and form configuration parameters required by each sub-component are determined through the parent component and the parameter description document; form configuration parameters required by each sub-component are transmitted into the corresponding sub-component, and form pages with the functions of adding, deleting and checking are generated.
Optionally, transmitting form configuration parameters required by each sub-component into the corresponding sub-component, and generating the form page with the functions of adding, deleting and checking comprises: for each sub-component, analyzing the input form configuration parameters to obtain basic component information, wherein the basic component at least comprises one of the following components: an input frame, a selection frame, and a selector; and determining a base component type label according to the base component information, adding a base component on a front-end page in a mode of adding the base component type label in an operation document object model, rendering the base component, and generating a form page with an addition, deletion and verification function.
Optionally, the form query component is configured to display the query condition area content in the form page by presenting the base component; the inquiry table paging component is used for paging and displaying the result data inquired based on the table inquiry component, and the result data supports the functions of customizing configuration, modifying and deleting; the form submitting component is used for displaying a popup window for viewing or modifying the result data in detail, and the popup window comprises a basic component.
According to another aspect of the application, a form page generating device with a deletion and correction function is provided. The device comprises: a first determination unit configured to determine a code file path and data table information related to addition, deletion, and examination; the first configuration unit is used for configuring the code file path and the data table information in the back-end code generation tool, operating the back-end code generation tool and generating a code file for realizing the addition, deletion and verification function interface in the code file path; the second determining unit is used for determining form page style information and contents to be displayed of form pages, and acquiring interface information from a code file for realizing the interface of the adding, deleting and checking function; the second configuration unit is used for configuring the interface information, the form page style information and the content to be displayed into form configuration parameters, transmitting the form configuration parameters into the form generation component and generating a form page with the functions of adding, deleting and checking.
According to another aspect of the embodiment of the present invention, there is further provided a computer storage medium, where the computer storage medium is configured to store a program, and when the program runs, control a device in which the nonvolatile storage medium is located to execute a method for generating a form page with a function of adding, deleting and modifying.
According to another aspect of the embodiment of the present invention, there is also provided an electronic device including a processor and a memory; the memory stores computer readable instructions, and the processor is configured to execute the computer readable instructions, where the computer readable instructions execute a method for generating a form page with an add-drop-check function.
Through the application, the following steps are adopted: determining a code file path and data table information related to the addition, deletion and verification; configuring a code file path and data table information in a back-end code generating tool, and operating the back-end code generating tool to generate a code file for realizing an add-delete-check function interface in the code file path; determining form page style information and contents to be displayed of form pages, and acquiring interface information from a code file for realizing an interface of the adding, deleting and modifying function; the interface information, the form page style information and the content to be displayed are configured as form configuration parameters, and the form configuration parameters are transmitted into a form generation component to generate the form page with the adding, deleting and checking function, so that the problems of complex realization and high cost of the form page adding, deleting and checking function development in a front-end and rear-end separation mode in the related technology are solved. The back-end code generating tool is used for generating the code file for realizing the adding, deleting and checking function interface in the code file path, and the form configuration parameters are transmitted into the form generating component to generate the form page with the adding, deleting and checking function, so that the effect of reducing the realization complexity and cost of the development of the adding, deleting and checking function of the form page is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application, illustrate and explain the application and are not to be construed as limiting the application. In the drawings:
FIG. 1 is a flow chart of a method of generating form pages with added pruning and censoring functions according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a form generation component in accordance with an embodiment of the present application;
FIG. 3 is a flow chart of a method of generating form pages with added pruning and censoring functions according to an embodiment of the present application;
FIG. 4 is a flow chart of an interface generating a pruned query function in accordance with an embodiment of the present application;
FIG. 5 is a schematic diagram of a generating device of a form page with a pruning and checking function according to an embodiment of the present application;
fig. 6 is a schematic diagram of an electronic device according to an embodiment of the application.
Detailed Description
It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe the embodiments of the present application 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.
It should be noted that, related information (including, but not limited to, user equipment information, user personal information, etc.) and data (including, but not limited to, data for presentation, analyzed data, etc.) related to the present disclosure are information and data authorized by a user or sufficiently authorized by each party.
According to the embodiment of the application, a method for generating a form page with a function of adding, deleting and checking is provided.
Fig. 1 is a flowchart of a method for generating a form page with a pruning and censoring function according to an embodiment of the present application.
As shown in fig. 1, the method comprises the steps of:
step S102, determining code file path and data table information related to the censoring.
The code file path refers to a path of a code file to be generated, the code file can be automatically generated on the path, an address is not required to be generated by the code file, the code file is exported, and the adding, deleting and checking is to add, delete and check a certain table or a plurality of tables in the database, wherein the added, deleted and checked data table information comprises database information and table information.
Step S104, the code file path and the data table information are configured in a back-end code generating tool, the back-end code generating tool is operated, and a code file for realizing the adding, deleting and checking function interface is generated in the code file path.
Specifically, a plurality of template code files are stored in the back-end code generating tool, the template files are generated according to the data table information, placeholders of classes in the plurality of template code files are replaced according to the classes of the template files, so that updated template code files are obtained, then the back-end code generating tool is operated, a plurality of code files, which can comprise model files, sqlMapper, javaRepository, javaMapper and other files, are generated on a code file path, and the code files are obtained, so that the function interface of adding, deleting and modifying is realized.
And S106, determining form page style information and contents to be displayed of the form page, and acquiring interface information from a code file for realizing the adding, deleting and checking function interface.
The form page style information may include a type of a base component and a layout style of the base component on a page, and the content to be displayed on the form page may include content to be displayed on the base component, for example, may include a component name.
And S108, configuring interface information, form page style information and contents to be displayed as form configuration parameters, and transmitting the form configuration parameters to a form generation component to generate a form page with the functions of adding, deleting and checking.
Specifically, form page style information, contents to be displayed of form pages and interface information are configured into form configuration parameters in a key value pair mode, then the form configuration parameters are transmitted into a form generation component designed in advance, and form pages with adding, deleting and modifying functions are generated on front-end page rendering.
The generation method of the form page with the adding, deleting and checking functions comprises the steps of determining a code file path and data table information related to adding, deleting and checking; configuring a code file path and data table information in a back-end code generating tool, and operating the back-end code generating tool to generate a code file for realizing an add-delete-check function interface in the code file path; determining form page style information and contents to be displayed of form pages, and acquiring interface information from a code file for realizing an interface of the adding, deleting and modifying function; the interface information, the form page style information and the content to be displayed are configured as form configuration parameters, and the form configuration parameters are transmitted into a form generation component to generate the form page with the adding, deleting and checking function, so that the problems of complex realization and high cost of the form page adding, deleting and checking function development in a front-end and rear-end separation mode in the related technology are solved. The back-end code generating tool is used for generating the code file for realizing the adding, deleting and checking function interface in the code file path, and the form configuration parameters are transmitted into the form generating component to generate the form page with the adding, deleting and checking function, so that the effect of reducing the realization complexity and cost of the development of the adding, deleting and checking function of the form page is achieved.
Optionally, in the method for generating a form page with an add-drop-check function provided in the embodiment of the present application, a template code file is configured in a back-end code generating tool, where the template code file includes at least a first template code file for defining an add-drop-check operation statement and a mapping relationship between an object of a database and a database table, a second template code file for storing a source code of an item, a third template code file for defining a database query statement and a mapping relationship between a query result and an object, and running the back-end code generating tool, where generating, in a code file path, a code file for implementing an interface of the add-drop-check function includes: generating a model file according to the data table information configuration, replacing class name placeholders in all the template code files with class names of the model file, and replacing class attribute placeholders in all the template code files with class attributes of the model file to obtain a replaced file; and outputting the replaced file to a code file path to obtain a code file for realizing the adding, deleting and checking function interface.
It should be noted that, in the template code file configured in the back-end code generating tool, the class name is presented in a placeholder manner, the first template code file may be a JavaMapper template file, the JavaMapper template file is an XML file, the mapping relationship between the Java object and the database table is mapped by a mapper (mapper) in the configuration file, and the SQL statement defining the add-delete-check operation of the database can be multiplexed and maintained by the SQL mapper file, so as to improve the development efficiency. The second template code file may be a Java restore template file, and the file may include source code, configuration file, document, etc. of the Java item, for tracking changes of the item, collaborative development, and backing up the source code of the item. The third template code file can be a Java map template file, and is used for defining database query sentences and mapping relations between query results and objects, and the database query results can be automatically mapped into corresponding Java objects according to the configuration in the Java map file, so that development of a data access layer is simplified, and maintainability and readability of codes are improved.
Specifically, a model file is generated according to the data table information configuration, namely, the model file is generated, class name placeholders in template code files such as sqlMapper, javaRepository, javaMapper are replaced by class names of the model file, class attribute placeholders in template code files such as sqlMapper, javaRepository, javaMapper are replaced by class attributes of the model file, and the replaced files and the model file are output to a code file path to obtain a code file for realizing an interface of the deletion and correction function.
Through the embodiment, a large number of back-end code files can be generated in batches, the problem that each table is independently developed, added, deleted, revised and checked for function interfaces and database operation sentences is avoided, all interfaces can be updated in batches only by maintaining the module code files in the later period, and the maintenance cost is reduced.
Optionally, in the method for generating a form page with an adding, deleting and checking function provided in the embodiment of the present application, the data table information related to adding, deleting and checking includes database information and table information, where the database information includes at least a database uniform resource locator, a database type, a database user name and password information, the table information includes at least a database table name and field information of each table, and generating a model file according to the configuration of the data table information includes: accessing a target database according to the database information, and acquiring a target data table indicated by the table information from the target database; and converting the database table name of the target data table into a class name, and converting the field information of the target data table into a class attribute to obtain the model file.
That is, the model file is obtained by locating the target database according to the uniform resource locator and the database type, logging in the target database through the user name and the password information of the database, reading the target data table in the target database, generating Java class according to the table name, and producing the attribute of the class according to the fields in the table.
In order to facilitate monitoring of services, optionally, in the method for generating a form page with an add-drop-check function provided in the embodiment of the present application, before configuring a code file path and data table information in a back-end code generating tool, the method further includes: determining a code associated with the non-business function, wherein the non-business function comprises at least one of: a buried point function, a log recording function and a monitoring function; the code associated with the non-business function is configured in a second template file.
Specifically, the second template code file may be a java response template file, and the generated java response file is used for calling an interface for adding, deleting and checking, and the interface can be monitored through the file to call operation, so that a buried point function, a log recording function and a monitoring function can be written in the java response template file, and the generated java response file can realize acquisition of buried point data, recording and monitoring of logs and the like.
By the embodiment, the operation and maintenance monitoring capability of non-business functions such as buried points, logs and monitoring can be uniformly managed, the defect of related capability is avoided, the non-business function is accessed, modified and upgraded, only the template file is required to be maintained, and the upgrading and modifying cost is reduced.
Optionally, in the method for generating a form page with an add-drop-check function provided in the embodiment of the present application, the form generation component includes a parent component and a plurality of sub-components, the plurality of sub-components includes at least a form query component, a query form paging component and a form submitting component, and transmitting the form configuration parameters to the form generation component, and generating the form page with the add-drop-check function includes: form configuration parameters are transmitted into the parent component, and form configuration parameters required by each sub-component are determined through the parent component and the parameter description document; form configuration parameters required by each sub-component are transmitted into the corresponding sub-component, and form pages with the functions of adding, deleting and checking are generated.
Fig. 2 is a schematic diagram of a form generating component according to an embodiment of the present application, as shown in fig. 2, a parent component (FormBuilder) in the form page generating component includes three sub-components, which are a form query component (SearchForm), a query table paging component (searchtable page processing), and a form submitting component (subtmitform), respectively, and the form page generating component receives external parameters in a key value pair form, including interface information, a style, data content, and the like, and has parameters that describe parameters required by the parent component, and transmits form configuration parameters to the parent component, parameters of the sub-component are all from the parent component, and which parameters required by the sub-component are also defined in the parameter description document, and then filters, and reassembles parameters of the parent component to obtain data required by the sub-component, and classifies and transmits the data required by the sub-component into the sub-component to generate a form page with an add-delete function.
Optionally, in the method for generating a form page with the function of adding, deleting and checking provided in the embodiment of the present application, transmitting form configuration parameters required by each sub-component into a corresponding sub-component, and generating the form page with the function of adding, deleting and checking includes: for each sub-component, analyzing the input form configuration parameters to obtain basic component information, wherein the basic component at least comprises one of the following components: an input frame, a selection frame, and a selector; and determining a base component type label according to the base component information, adding a base component on a front-end page in a mode of adding the base component type label in an operation document object model, rendering the base component, and generating a form page with an addition, deletion and verification function.
Specifically, for the content composition of each sub-component, one or more basic components such as an input box, a selector and the like are obtained by analyzing the input parameters, a basic component type label is added by operating a dom (operating a document object model), and different basic components are rendered to page nodes. For example, the input parameters are analyzed to obtain an input box for inputting the name, a label of the input box is placed at a dom node, the content of the input box is designated as a name component, and accordingly the input box for inputting the name is generated on a front-end page.
Through the embodiment, maintenance and updating of all the generated pages based on the components can be realized by only maintaining various basic components in the form page generation components, repeated codes are reduced in a component multiplexing mode, the coupling degree of the codes is reduced, and the later maintenance cost is greatly saved.
Optionally, in the method for generating a form page with the function of adding, deleting and checking provided by the embodiment of the present application, a form query component is configured to display contents of a query condition area in the form page by presenting a base component; the inquiry table paging component is used for paging and displaying the result data inquired based on the table inquiry component, and the result data supports the functions of customizing configuration, modifying and deleting; the form submitting component is used for displaying a popup window for viewing or modifying the result data in detail, and the popup window comprises a basic component.
Specifically, the form query component has the function of displaying the content of a query condition area in a form page, and presenting one or more commonly used retrieval conditions such as an input box, a selection box, a calendar selector and the like according to page and data requirements.
The function of the inquiry table paging component is to display the form results inquired according to the inquiry conditions submitted by the form inquiry component, present the form results in the form of a table, support the paging function, and support the functions of custom viewing, modifying, deleting and the like after each result data. Specifically, a view button is set in the last column of the table to expand table data in detail, a modify button is set to modify a certain field, a delete button is set to delete the whole record, and the delete button can be hidden without deletion.
The form submission component functions as a window presentation upon (editing is not allowed) or upon modification of (editing is allowed by) a window presentation of details of a query result, the base components can set whether editing is allowed or not, i.e., can support multiplexing into viewing the details window and modifying the content window, one or more input boxes (e.g., for entering names), selection boxes (e.g., for selecting gender), calendar selectors (e.g., for selecting date of birth), and the like, the selection boxes can include a single selection box. The check box can limit the input content through the detail page component, and simple parameters are provided for a developer to select the presented component form according to the requirement.
According to the embodiment of the application, another generation method of the form page with the addition, deletion and check functions is provided.
Fig. 3 is a flowchart of a method for generating a form page with a pruning and censoring function according to an embodiment of the present application.
As shown in fig. 3, the method comprises the steps of:
and filling in a back-end project file generation path and database related configuration at the back end, executing a back-end code generation tool, and obtaining an interface for adding, deleting and checking functions under the designated file path.
At the front end, a form page generating component is introduced into the page, a form parameter JSON is configured, and the parameters are transmitted into the form page generating component to obtain an expression page containing the functions of adding, deleting and checking.
Wherein fig. 4 is a flowchart of an interface for generating an added censoring function according to an embodiment of the present application, and as shown in fig. 4, the step of generating an interface for an added censoring function includes:
the back-end code generating tool is the database configuration information, expression and each file generation path in the configuration information, generates a Model file according to the analyzed content, writes sqlMapper, javaRepository, javaMapper template files, replaces class names in the template files with Model file class names, and inputs the generated files to a specified file target, thereby realizing a form page with complete functions of adding, deleting and checking.
Through the embodiment, a user can generate the front-end page meeting the design specification and design style only by configuring the related information, and generate the back-end code meeting the requirements of performance and efficiency, so that the form page adding, deleting and checking function is realized, the implementation is simple, the generated content is based on a certain template code style and quality convergence, the code management efficiency is effectively improved, the partial management problem caused by the difference of the technical capability of developers is improved, and the requirements on the technical capability of the developers are greatly reduced. Only one set of front and back logic is required to be maintained, all form pages can be easily multiplexed, the multiplexing capability is high, and the generation of a large number of pages can be rapidly realized, so that the development efficiency is greatly improved.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that illustrated herein.
The embodiment of the application also provides a generating device of the form page with the adding, deleting and checking functions, and it is to be noted that the generating device of the form page with the adding, deleting and checking functions of the embodiment of the application can be used for executing the generating method of the form page with the adding, deleting and checking functions provided by the embodiment of the application. The following describes a device for generating a form page with an addition, deletion and verification function provided in an embodiment of the present application.
Fig. 5 is a schematic diagram of a generating device of a form page with an addition, deletion, and check function according to an embodiment of the present application. As shown in fig. 5, the apparatus includes: a first determination unit 502, a first configuration unit 506, a second determination unit 506, and a second configuration unit 508.
A first determining unit 502 is configured to determine a code file path and data table information related to the addition, deletion, and investigation.
The first configuration unit 506 is configured to configure the code file path and the data table information in the back-end code generating tool, and run the back-end code generating tool to generate the code file for implementing the add-drop-check function interface in the code file path.
The second determining unit 506 is configured to determine form page style information and content to be displayed on the form page, and obtain interface information from a code file for implementing the add-drop-check function interface.
The second configuration unit 508 is configured to configure the interface information, the form page style information, and the content to be displayed as form configuration parameters, and transmit the form configuration parameters to the form generation component, so as to generate a form page with the function of adding, deleting and modifying.
The generation device of the form page with the adding, deleting and checking functions provided by the embodiment of the application determines a code file path and data table information related to adding, deleting and checking through the first determination unit 502; a first configuration unit 506 that configures the code file path and the data table information in the back-end code generation tool, and runs the back-end code generation tool, and generates a code file for implementing the add-drop-check function interface in the code file path; a second determining unit 506, configured to determine form page style information and contents to be displayed on a form page, and obtain interface information from a code file for implementing an interface of the deletion and correction function; the second configuration unit 508 configures the interface information, the form page style information and the content to be displayed as form configuration parameters, and transmits the form configuration parameters to the form generation component to generate a form page with an addition, deletion and check function, thereby solving the problems of complex implementation and high cost of form page addition, deletion and check function development in a front-end and rear-end separation mode in the related art, generating a code file for realizing an addition, deletion and check function interface in a code file path through a rear-end code generation tool, transmitting the form configuration parameters to the form generation component to generate the form page with the addition, deletion and check function, and further achieving the effect of reducing the implementation complexity and cost of form page addition, deletion and check function development.
Optionally, the back-end code generating tool is configured with a template code file, where the template code file includes at least a first template code file for defining a mapping relationship between an object and a database table and a deletion and correction operation sentence of the database, a second template code file for storing an item, a third template code file for defining a database query sentence and defining a mapping relationship between a query result and the object, and the running back-end code generating tool, where the first configuration unit 506 includes: the first generation module is used for configuring and generating a model file according to the data table information, replacing class name placeholders in all the template code files with class names of the model file, replacing class attribute placeholders in all the template code files with class attributes of the model file, and obtaining a replaced file; and the second generation module is used for outputting the replaced file to a code file path to obtain a code file for realizing the adding, deleting and checking function interface.
Optionally, the data table information related to the deletion and the correction includes database information and table information, the table information at least includes a database table name and field information of each table, the first generation module is used for accessing a target database according to the database information and acquiring a target data table indicated by the table information from the target database, wherein the database information at least includes a database uniform resource locator, a database type, a database user name and password information; and converting the database table name of the target data table into a class name, and converting the field information of the target data table into a class attribute to obtain the model file.
Optionally, the apparatus further comprises: a third determining unit, configured to determine, before configuring the code file path and the data table information in the back-end code generating tool, a code associated with a non-service function, where the non-service function includes at least one of: a buried point function, a log recording function and a monitoring function; the code associated with the non-business function is configured in a second template file.
Optionally, the form generating component includes a parent component and a plurality of sub-components, the plurality of sub-components including at least a form query component, a query form paging component, and a form submitting component, and the second configuration unit 508 includes: the determining module is used for transmitting the form configuration parameters into the parent component and determining the form configuration parameters required by each sub-component through the parent component and the parameter description document; and the third generation module is used for transmitting the form configuration parameters required by each sub-assembly into the corresponding sub-assembly to generate a form page with the functions of adding, deleting and checking.
Optionally, the third generating module includes: the analysis sub-module is used for analyzing the input form configuration parameters for each sub-component to obtain basic component information, wherein the basic component at least comprises one of the following components: an input frame, a selection frame, and a selector; and the generation sub-module is used for determining a basic component type label according to the basic component information, adding a basic component on the front page in a mode of adding the basic component type label in the operation document object model, rendering the basic component, and generating a form page with the functions of adding, deleting and checking.
Optionally, the form query component is configured to display the query condition area content in the form page by presenting the base component; the inquiry table paging component is used for paging and displaying the result data inquired based on the table inquiry component, and the result data supports the functions of customizing configuration, modifying and deleting; the form submitting component is used for displaying a popup window for viewing or modifying the result data in detail, and the popup window comprises a basic component.
The generating device of the form page with the adding/deleting function includes a processor and a memory, wherein the first determining unit 502, the first configuring unit 506, the second determining unit 506, the second configuring unit 508, and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can be provided with one or more than one kernel, and the problems of complex realization and high cost of form page adding, deleting and checking function development in a front-end and rear-end separation mode in the related technology are solved by adjusting kernel parameters.
The memory may include volatile memory, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including at least one memory chip.
The embodiment of the application also provides a computer storage medium, which is used for storing a program, wherein when the program runs, the equipment where the nonvolatile storage medium is located is controlled to execute the following generation method of the form page with the functions of adding, deleting and checking: determining a code file path and data table information related to the addition, deletion and verification; configuring a code file path and data table information in a back-end code generating tool, and operating the back-end code generating tool to generate a code file for realizing an add-delete-check function interface in the code file path; determining form page style information and contents to be displayed of form pages, and acquiring interface information from a code file for realizing an interface of the adding, deleting and modifying function; and configuring interface information, form page style information and contents to be displayed as form configuration parameters, and transmitting the form configuration parameters to a form generation component to generate a form page with the functions of adding, deleting and checking.
The embodiment of the application further provides an electronic device, fig. 6 is a schematic diagram of the electronic device according to the embodiment of the application, and the electronic device 60 includes a processor and a memory; the memory stores computer readable instructions, and the processor is configured to execute the computer readable instructions, where the computer readable instructions execute the following method for generating a form page with an add-drop-check function: determining a code file path and data table information related to the addition, deletion and verification; configuring a code file path and data table information in a back-end code generating tool, and operating the back-end code generating tool to generate a code file for realizing an add-delete-check function interface in the code file path; determining form page style information and contents to be displayed of form pages, and acquiring interface information from a code file for realizing an interface of the adding, deleting and modifying function; and configuring interface information, form page style information and contents to be displayed as form configuration parameters, and transmitting the form configuration parameters to a form generation component to generate a form page with the functions of adding, deleting and checking. The electronic device herein may be a server, a PC, a PAD, a mobile phone, etc.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may 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, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (10)

1. The method for generating the form page with the functions of adding, deleting and checking is characterized by comprising the following steps of:
determining a code file path and data table information related to the addition, deletion and verification;
configuring the code file path and the data table information in a back-end code generating tool, operating the back-end code generating tool, and generating a code file for realizing an add-drop-check function interface in the code file path;
determining form page style information and contents to be displayed of form pages, and acquiring interface information from the code file for realizing the adding, deleting and checking function interface;
and configuring the interface information, the form page style information and the content to be displayed as form configuration parameters, and transmitting the form configuration parameters to a form generation component to generate a form page with the functions of adding, deleting and checking.
2. The method of claim 1, wherein the back-end code generation tool is configured with template code files, the template code files including at least a first template code file for defining a database's pruned query operation statements and mappings between objects and database tables, a second template code file for storing items, a third template code file for defining a database query statement and mappings between query results and objects, the back-end code generation tool being run to generate a code file for implementing a pruned function interface in the code file path comprising:
generating a model file according to the data table information configuration, replacing class name placeholders in all template code files with class names of the model file, and replacing class attribute placeholders in all template code files with class attributes of the model file to obtain a replaced file;
and outputting the replaced file to the code file path to obtain the code file for realizing the adding, deleting and checking function interface.
3. The method of claim 2, wherein the data table information related to the pruning includes database information and table information, the table information including at least a database table name and field information of each table, and generating a model file according to the data table information configuration includes:
Accessing a target database according to the database information, and acquiring a target data table indicated by the table information from the target database, wherein the database information at least comprises a database uniform resource locator, a database type, a database user name and password information;
and converting the database table name of the target data table into a class name, and converting the field information of the target data table into a class attribute to obtain the model file.
4. The method of claim 2, wherein prior to configuring the code file path and the data table information at a back-end code generation tool, the method further comprises:
determining a code associated with a non-business function, wherein the non-business function comprises at least one of: a buried point function, a log recording function and a monitoring function;
and configuring codes associated with the non-business functions in the second template file.
5. The method of claim 1, wherein the form generation component comprises a parent component and a plurality of sub-components, the plurality of sub-components comprising at least a form query component, a query form paging component, and a form submission component, wherein passing the form configuration parameters to the form generation component, generating a form page having an add-drop-out functionality comprises:
The form configuration parameters are transmitted into the father component, and form configuration parameters required by each sub-component are determined through the father component and the parameter description document;
and transmitting form configuration parameters required by each sub-assembly into the corresponding sub-assembly to generate a form page with the functions of adding, deleting and checking.
6. The method of claim 5, wherein passing form configuration parameters required by the respective sub-components into the corresponding sub-components, generating a form page with a pruned-check function comprises:
for each sub-component, analyzing the input form configuration parameters to obtain basic component information, wherein the basic component at least comprises one of the following components: an input frame, a selection frame, and a selector;
and determining a basic component type label according to the basic component information, adding a basic component to a front page in a mode of adding the basic component type label in an operation document object model, and rendering the basic component to obtain the form page with the adding, deleting and checking functions.
7. The method of claim 5, wherein the form query component is configured to present the query terms area content in the form page by presenting the base component; the inquiry table paging component is used for paging and displaying the result data inquired based on the form inquiry component, and the result data supports the functions of customizing configuration, modifying and deleting; the form submitting component is used for displaying a popup window for carrying out detail viewing or modification on the result data, and the popup window comprises a base component.
8. The device for generating the form page with the functions of adding, deleting and checking is characterized by comprising the following components:
a first determination unit configured to determine a code file path and data table information related to addition, deletion, and examination;
the first configuration unit is used for configuring the code file path and the data table information in a back-end code generation tool, operating the back-end code generation tool and generating a code file for realizing an add-delete-check function interface in the code file path;
the second determining unit is used for determining form page style information and contents to be displayed of form pages, and acquiring interface information from the code file for realizing the adding, deleting and checking function interface;
the second configuration unit is used for configuring the interface information, the form page style information and the content to be displayed into form configuration parameters, and transmitting the form configuration parameters into a form generation component to generate a form page with a function of adding, deleting and checking.
9. A computer storage medium for storing a program, wherein the program when executed controls a device in which the computer storage medium is located to perform the method for generating a form page with an add-drop-check function according to any one 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 generating form pages with an add-drop-check function according to any one of claims 1 to 7 by means of the computer program.
CN202311828890.0A 2023-12-27 2023-12-27 Form page generation method and device with adding, deleting and checking functions Pending CN117785196A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311828890.0A CN117785196A (en) 2023-12-27 2023-12-27 Form page generation method and device with adding, deleting and checking functions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311828890.0A CN117785196A (en) 2023-12-27 2023-12-27 Form page generation method and device with adding, deleting and checking functions

Publications (1)

Publication Number Publication Date
CN117785196A true CN117785196A (en) 2024-03-29

Family

ID=90383141

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311828890.0A Pending CN117785196A (en) 2023-12-27 2023-12-27 Form page generation method and device with adding, deleting and checking functions

Country Status (1)

Country Link
CN (1) CN117785196A (en)

Similar Documents

Publication Publication Date Title
US9792284B2 (en) System, method and computer program product for multilingual content management
CN110825362A (en) Low-code application software development system and method
US10452628B2 (en) Data analysis schema and method of use in parallel processing of check methods
CN109299178B (en) Model application method and data analysis system
CN108268525A (en) A kind of report implementation method and device based on Excel template
US11582170B2 (en) Conversation-enabled document system and method
CN106354483B (en) Data processing method and device and electronic equipment
CN106951231B (en) Computer software development method and device
US10885087B2 (en) Cognitive automation tool
CN109710250B (en) Visualization engine system and method for constructing user interface
Read et al. geoknife: reproducible web‐processing of large gridded datasets
CN107015903B (en) Interface test program generation method and device and electronic equipment
CN115878092A (en) Code generation method, device and medium based on micro-service architecture
CN113885860A (en) Method and equipment for automatically configuring management page to generate interface service
CN112163017B (en) Knowledge mining system and method
CN116301856B (en) Design method, device, equipment and medium of visual form designer
CN113485909A (en) Test method, test device, computing device, and medium
CN113485746B (en) Method and device for generating application program interface document
CN117785196A (en) Form page generation method and device with adding, deleting and checking functions
CN115617338A (en) Method and device for quickly generating service page and readable storage medium
US11720553B2 (en) Schema with methods specifying data rules, and method of use
CN113254455A (en) Dynamic configuration method and device of database, computer equipment and storage medium
CN112181407A (en) Service implementation processing method, device, system, electronic equipment and storage medium
CN113641644B (en) Data pushing system
JP7481056B2 (en) Operation support device, system, method and program

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