CN115879427A - Form template construction method, system, equipment and medium - Google Patents

Form template construction method, system, equipment and medium Download PDF

Info

Publication number
CN115879427A
CN115879427A CN202211717115.3A CN202211717115A CN115879427A CN 115879427 A CN115879427 A CN 115879427A CN 202211717115 A CN202211717115 A CN 202211717115A CN 115879427 A CN115879427 A CN 115879427A
Authority
CN
China
Prior art keywords
header
form template
template
configuration data
data
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
CN202211717115.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.)
Guangzhou Quwan Network Technology Co Ltd
Original Assignee
Guangzhou Quwan Network Technology 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 Guangzhou Quwan Network Technology Co Ltd filed Critical Guangzhou Quwan Network Technology Co Ltd
Priority to CN202211717115.3A priority Critical patent/CN115879427A/en
Publication of CN115879427A publication Critical patent/CN115879427A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Storage Device Security (AREA)

Abstract

The invention discloses a form template construction method, a system, equipment and a medium, which respond to a received form template construction request to obtain form configuration data corresponding to the form template construction request. And then, according to the form configuration data, a template header corresponding to the form template construction request is constructed, and an initial form template corresponding to the form template construction request is constructed by adopting the form configuration data and the template header. And then updating the initial form template by adopting the validity verification data corresponding to the template header to generate an intermediate form template corresponding to the form template construction request. And finally, respectively carrying out protection authority configuration on the target cells corresponding to the intermediate form template to generate a target form template corresponding to the form template construction request. The constructed target form template supports data verification and authority protection, so that the risk of filling errors by a user is reduced.

Description

Form template construction method, system, equipment and medium
Technical Field
The present invention relates to the field of form template construction technologies, and in particular, to a form template construction method, system, device, and medium.
Background
With the continuous development of computer technology, more and more enterprises have converted a large number of forms and documents used in the production and management processes into electronic forms to replace the traditional mode of information transmission and collection through paper forms and documents.
In most enterprise information systems, the form is a basic interface for interaction between the system and a user, the form provides information display and input information receiving, information collection, processing and circulation are achieved, and the form plays an important role in the enterprise information systems. In the development process of the enterprise information system, corresponding Excel form templates are respectively formulated according to different services, so that the user can conveniently use the Excel form templates for multiple times, and the form creation time is saved.
However, the existing form template construction method is only based on the service type to construct the corresponding form template, when a user uses the form template, the user needs to manually fill and examine the form template, when the number of forms to be filled in is large, examination omission easily occurs, and the filling errors of the forms cannot be found in time.
Disclosure of Invention
The invention provides a form template construction method, a form template construction system, a form template construction device and a form template construction medium, which solve the technical problems that the existing form template construction method is only based on business types to construct corresponding form templates, a user needs to manually fill and check when using the form templates, and when the number of forms needing to be filled is large, the checking omission easily occurs and the filling errors of the forms cannot be timely found.
The invention provides a form template construction method, which comprises the following steps:
responding to a received form template construction request, and acquiring form configuration data corresponding to the form template construction request;
according to the form configuration data, a template header corresponding to the form template construction request is constructed;
adopting the form configuration data and the template header to construct an initial form template corresponding to the form template construction request;
updating the initial form template by adopting validity verification data corresponding to the template header, and generating an intermediate form template corresponding to the form template construction request;
and respectively carrying out protection authority configuration on the target cells corresponding to the intermediate form template to generate a target form template corresponding to the form template construction request.
Optionally, the form configuration data includes header configuration data; the step of constructing the template header corresponding to the form template construction request according to the form configuration data includes:
acquiring a plurality of header identifications corresponding to the header configuration data;
respectively extracting first header character strings corresponding to the header identifications from a preset header database;
determining a header character string corresponding to the header configuration data according to the header type corresponding to the header configuration data and all the first header character strings;
analyzing the header character string to generate a header array corresponding to the header configuration data;
and constructing a template header corresponding to the form template construction request by adopting the header array.
Optionally, the step of determining the header character string corresponding to the header configuration data according to the header type corresponding to the header configuration data and all the first header character strings includes:
judging whether the header type corresponding to the header configuration data is a user-defined form type or not;
if yes, performing form field expansion on the form configuration data to generate a second form header character string corresponding to the form header configuration data;
merging the second header character strings with the corresponding first header character strings respectively to generate header character strings corresponding to the header configuration data;
and if not, taking all the first header character strings as header character strings corresponding to the header configuration data.
Optionally, the step of constructing an initial form template corresponding to the form configuration data by using the form configuration data and the template header includes:
acquiring a unique identifier to be dealt with and a unique identifier of flow definition corresponding to the form configuration data;
extracting global form authority data corresponding to the unique process definition identification from a preset authority database;
extracting node form permission data corresponding to the unique identifier to be handled from the preset permission database;
adopting the global form authority data and the node form authority data according to a preset authority priority to construct form authority data corresponding to the form template construction request;
and constructing an initial form template corresponding to the form configuration data by adopting the form authority data and the template header.
Optionally, the validity verification data comprises threshold range verification data and pull-down option verification data; the step of updating the initial form template by using the validity verification data corresponding to the template header to generate an intermediate form template corresponding to the form template construction request includes:
respectively constructing threshold range parameters corresponding to each initial cell in the initial form template by adopting the threshold range verification data;
updating corresponding initial cells by adopting the threshold range parameters respectively to generate corresponding intermediate cells;
adopting the pull-down option verification data to respectively construct a pull-down option array corresponding to each intermediate cell;
constructing a pull-down option expression corresponding to the middle cell by adopting the pull-down option array;
updating corresponding intermediate cells by adopting the pull-down option expressions respectively to generate corresponding target cells;
and constructing an intermediate form template corresponding to the form template construction request by adopting all the target cells.
Optionally, the step of respectively performing protection authority configuration on the target cells corresponding to the intermediate form template to generate a target form template corresponding to the form template construction request includes:
respectively judging whether the export data corresponding to the target cell is an export threshold value;
if so, closing the protection authority corresponding to the target cell to generate a corresponding first cell;
if not, starting the protection authority corresponding to the target cell to generate a corresponding second cell;
and updating the intermediate form template by adopting all the first cells and all the second cells to generate a target form template corresponding to the form template construction request.
Optionally, the method further comprises:
responding to the received import request corresponding to the target form template, and judging whether the form import mode corresponding to the import request is an additional mode;
if so, adding the additional field corresponding to the target form template to the last line of the initial form corresponding to the import request to generate a target form corresponding to the import request;
if not, comparing the cell data of the initial form with the cell data of the target form template to generate a corresponding comparison result;
and according to the comparison result, constructing a target form corresponding to the import request.
The invention also provides a form template construction system, which comprises:
the form configuration data acquisition module is used for responding to the received form template construction request and acquiring form configuration data corresponding to the form template construction request;
the template header construction module is used for constructing a template header corresponding to the form template construction request according to the form configuration data;
the initial form template construction module is used for constructing an initial form template corresponding to the form template construction request by adopting the form configuration data and the template header;
the intermediate form template generating module is used for updating the initial form template by adopting the validity verification data corresponding to the template header and generating an intermediate form template corresponding to the form template construction request;
and the target form template generating module is used for respectively carrying out protection authority configuration on the target cells corresponding to the intermediate form template and generating a target form template corresponding to the form template construction request.
The invention also provides an electronic device, which comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of implementing any form template construction method.
The invention also provides a computer-readable storage medium on which a computer program is stored, which, when executed, implements any of the above form template construction methods.
According to the technical scheme, the invention has the following advantages:
the form configuration data corresponding to the form template construction request is obtained by responding to the received form template construction request. And then, according to the form configuration data, a template header corresponding to the form template construction request is constructed, and an initial form template corresponding to the form template construction request is constructed by adopting the form configuration data and the template header. And then updating the initial form template by adopting the validity verification data corresponding to the template header to generate an intermediate form template corresponding to the form template construction request. And finally, respectively carrying out protection authority configuration on the target cells corresponding to the intermediate form template to generate a target form template corresponding to the form template construction request. The method solves the technical problems that the existing form template construction method only constructs a corresponding form template based on the service type, a user needs to manually fill and examine the form template when using the form template, examination omission easily occurs when the number of forms to be filled is large, and filling errors of the forms cannot be found in time. The constructed target form template supports data verification and authority protection, so that the risk of filling errors by a user is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without inventive labor.
Fig. 1 is a flowchart illustrating steps of a form template building method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating steps of a form template construction method according to a second embodiment of the present invention;
fig. 3 is a block diagram of a form template construction system according to a third embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a form template construction method, a form template construction system, a form template construction device and a form template construction medium, which are used for solving the technical problems that the existing form template construction method is only based on business types to construct corresponding form templates, when a user uses the form templates, the user needs to manually fill and check, when the number of forms needing to be filled is large, the checking omission easily occurs, and the filling errors of the forms cannot be found in time.
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the 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 invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for constructing a form template according to an embodiment of the present invention.
The invention provides a form template construction method, which comprises the following steps:
step 101, responding to the received form template construction request, and acquiring form configuration data corresponding to the form template construction request.
The form configuration data refers to configuration data of each component in the form template constructed based on the form template construction request. The form configuration data comprises necessary information such as form head configuration data, a form unique identifier, form data, a to-do unique identifier or a process definition unique identifier. The form template in the embodiment of the invention is an Excel template.
In the embodiment of the invention, a form design page is displayed on a smart platform, a configuration button is clicked to send out a form template construction request, a configuration dialog box is popped up to open a form designer, a unique form identifier, form data, a unique to-do identifier or a unique process definition identifier and other necessary information are input to call a download template interface in a system, and the system acquires form configuration data corresponding to the form template construction request.
And 102, constructing a template header corresponding to the form template construction request according to the form configuration data.
In the embodiment of the invention, a plurality of header identifications corresponding to header configuration data are obtained first. And then extracting first header character strings corresponding to the header identifications from a preset header database respectively. And then determining the header character string corresponding to the header configuration data based on the header type corresponding to the header configuration data and all the first header character strings. And finally, analyzing the header character string, generating a header array corresponding to the header configuration data, and constructing the template header corresponding to the form template construction request by adopting the header array.
And 103, constructing an initial form template corresponding to the form template construction request by adopting the form configuration data and the template header.
In the embodiment of the invention, the unique identifier to be handled and the unique identifier of the process definition corresponding to the form configuration data are firstly obtained, and the global form authority data corresponding to the unique identifier of the process definition is extracted from the preset authority database. And extracting the node form permission data corresponding to the unique identifier to be handled from a preset permission database. And then, according to the preset authority priority, adopting the global form authority data and the node form authority data to construct form authority data corresponding to the form template construction request. And finally, adopting the form authority data and the template header to construct an initial form template corresponding to the form configuration data.
And 104, updating the initial form template by adopting the validity verification data corresponding to the template header, and generating an intermediate form template corresponding to the form template construction request.
In an embodiment of the invention, the validity verification data comprises threshold range verification data and pull-down option verification data. Firstly, threshold range verification data are adopted to respectively construct threshold range parameters corresponding to all initial cells in an initial form template. And then updating the corresponding initial cells by adopting the threshold range parameters respectively to generate corresponding intermediate cells. And then adopting the pull-down option verification data to respectively construct pull-down option arrays corresponding to the middle cells, and adopting the pull-down option arrays to construct pull-down option expressions corresponding to the middle cells. And finally, updating the corresponding intermediate cells by adopting pull-down option expressions respectively, generating corresponding target cells, and constructing an intermediate form template corresponding to the form template construction request by adopting all the target cells.
And 105, respectively carrying out protection authority configuration on the target cells corresponding to the intermediate form template to generate a target form template corresponding to the form template construction request.
In the embodiment of the invention, whether derived data corresponding to the target cell is a derived threshold is respectively judged, if yes, the protection authority corresponding to the target cell is closed, and the corresponding first cell is generated. If not, the protection authority corresponding to the target cell is opened, and a corresponding second cell is generated. And finally, updating the intermediate form template by adopting all the first cells and all the second cells to generate a target form template corresponding to the form template construction request.
In the embodiment of the invention, firstly, the form configuration data corresponding to the form template construction request is obtained by responding to the received form template construction request. And then, according to the form configuration data, a template header corresponding to the form template construction request is constructed, and an initial form template corresponding to the form template construction request is constructed by adopting the form configuration data and the template header. And then updating the initial form template by adopting the validity verification data corresponding to the template header to generate an intermediate form template corresponding to the form template construction request. And finally, respectively carrying out protection authority configuration on the target cells corresponding to the intermediate form template to generate a target form template corresponding to the form template construction request. The method solves the technical problems that the existing form template construction method only constructs a corresponding form template based on the service type, a user needs to manually fill and examine the form template when using the form template, examination omission easily occurs when the number of forms to be filled is large, and filling errors of the forms cannot be found in time. The constructed target form template supports data verification and authority protection, so that the risk of filling errors by a user is reduced.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for constructing a form template according to an embodiment of the present invention.
The invention provides another form template construction method, which comprises the following steps:
step 201, responding to the received form template construction request, and acquiring form configuration data corresponding to the form template construction request.
In the embodiment of the invention, on a form design page on a smart platform, clicking a configuration button triggers a form template construction request. And opening the form designer, popping up a configuration dialog box corresponding to the form template construction request, and respectively adding or deleting imported and exported fields in the dialog box based on the form template construction request so as to obtain form configuration data corresponding to the form template construction request.
Step 202, according to the form configuration data, a template header corresponding to the form template construction request is constructed.
Further, the form configuration data comprises header configuration data, and step 202 may comprise the following substeps S11-S15:
s11, obtaining a plurality of header identifications corresponding to the header configuration data.
And S12, respectively extracting first header character strings corresponding to the header identifications from a preset header database.
And S13, determining the header character string corresponding to the header configuration data according to the header type corresponding to the header configuration data and all the first header character strings.
And S14, analyzing the header character string to generate a header array corresponding to the header configuration data.
And S15, constructing a template header corresponding to the form template construction request by adopting the header array.
In the embodiment of the present invention, the header configuration data includes header contents, a header number, and a header position. The preset header database is a database for storing header-related configuration information. The header data refers to a plurality of headers including a header of the build template. The method comprises the steps of obtaining a plurality of header identifications corresponding to header configuration data, and then respectively extracting first header character strings corresponding to the header identifications from a preset header database. And determining the header character string corresponding to the header configuration data based on the header type corresponding to the header configuration data and all the first header character strings. And then analyzing the respective header character strings by using a Json tool class of a Hutool library to generate a header array corresponding to the header character strings, creating an Excel object in the code, and setting a header for Excel by the header array so as to generate a template header corresponding to the form template construction request.
Further, step S13 may include the following steps S131-S134:
s131, judging whether the header type corresponding to the header configuration data is the user-defined form type.
And S132, if yes, performing form field expansion on the form configuration data to generate a second form header character string corresponding to the form header configuration data.
And S133, merging the second header character strings with the corresponding first header character strings respectively to generate the header character strings corresponding to the header configuration data.
And S134, if not, taking all the first header character strings as header character strings corresponding to the header configuration data.
In the embodiment of the present invention, the first header character string and the second header character string are JSON character strings. When the form type corresponding to the form configuration data is the self-defined form type, the form field corresponding to the form configuration data needs to be expanded and combined with the form corresponding to the first form character string. And judging whether the header type corresponding to the header configuration data is a user-defined form type, and when the header type corresponding to the header configuration data is the user-defined form type, indicating that two types of headers exist in the template header corresponding to the form template construction request and respectively correspond to the first header character string and the second header character string. And performing form field expansion on the form configuration data to generate one or more corresponding second form head character strings, wherein each second form head character string needs to be subjected to form head combination with the corresponding first form head character strings. And adopting all the second header character strings and the corresponding first header character strings to construct header character strings corresponding to the header configuration data, then generating header arrays corresponding to the header configuration data by analyzing the header character strings, wherein the header arrays are JSON arrays, at the moment, headers corresponding to the second header character strings and headers corresponding to the first header character strings are subjected to header merging, and as shown in the following table 1, the common payment detail template is the header corresponding to the second header character strings. The supplier, account opening branch and payment amount are headers of a plurality of first header character strings corresponding to the common payment detail template.
TABLE 1 template head
Figure BDA0004026789110000091
And when the header type corresponding to the header configuration data is not the self-defined form type, the header character string corresponding to the header configuration data is composed of all the first header character strings.
And 203, constructing an initial form template corresponding to the form template construction request by adopting the form configuration data and the template header.
Further, step 203 may comprise the following sub-steps S21-S25:
and S21, acquiring the unique to-do identification and the unique process definition identification corresponding to the form configuration data.
And S22, extracting the global form authority data corresponding to the unique process definition identifier from a preset authority database.
And S23, extracting the node form authority data corresponding to the unique identifier to be handled from a preset authority database.
And S24, adopting the global form authority data and the node form authority data according to the preset authority priority to construct form authority data corresponding to the form template construction request.
And S25, constructing an initial form template corresponding to the form configuration data by adopting the form authority data and the template header.
In the embodiment of the invention, the preset authority database refers to a database for storing various authority data. The preset authority priority refers to that the node authority is larger than the global authority, and when the node authority and the global authority are simultaneously met, the node form authority data are preferably considered. And acquiring a unique identifier to be handled and a unique identifier for flow definition corresponding to the form configuration data, and querying a preset authority database through the unique identifier to be handled (taskId) or the unique identifier for flow definition (defId) to acquire global form authority data (JSON character string) for flow definition. And extracting the global form authority configuration through the defId. And the node form authority data of the current node to be handled can be extracted through the taskId. And according to the current node authority > the global authority, respectively selecting corresponding global form authority data and node form authority data, and constructing form authority data corresponding to the form template construction request. And finally, adopting the form authority data and the template header to construct an initial form template corresponding to the form template construction request.
And 204, updating the initial form template by adopting the validity verification data corresponding to the template header, and generating an intermediate form template corresponding to the form template construction request.
Further, the validity verification data includes threshold range verification data and pull-down option verification data, and step 204 may include the following sub-steps S31-S36:
and S31, respectively constructing threshold range parameters corresponding to each initial cell in the initial form template by adopting the threshold range verification data.
And S32, updating the corresponding initial cells by respectively adopting the threshold range parameters, and generating corresponding middle cells.
And S33, adopting the pull-down option verification data to respectively construct pull-down option arrays corresponding to the middle cells.
And S34, constructing a pull-down option expression corresponding to the middle cell by adopting the pull-down option array.
And S35, updating the corresponding middle cells by adopting the pull-down option expressions respectively, and generating corresponding target cells.
And S36, constructing an intermediate form template corresponding to the form template construction request by adopting all the target cells.
In an embodiment of the present invention, the threshold range verification data includes threshold range parameters corresponding to each cell. The pull-down option verification data comprises pull-down option verification parameters corresponding to all cells, such as form components, import and export fields, component permissions (read-only, editable, and filling-in-necessary), and the like. And respectively constructing threshold range parameters corresponding to each initial cell in the initial form template by adopting threshold range verification data, and after the parameters are set, a user can only fill in values in the range when filling in the cells. Firstly, reading pull-down option verification data source configuration, calling different interfaces according to different source configurations, and respectively constructing pull-down option arrays corresponding to the intermediate cells. There is a length limit due to the pull down option verification setting. And after the pull-down option array is obtained, creating a second workbook in the excel for storing pull-down items, setting validity verification of the pull-down items in an expression mode, namely updating corresponding middle cells by respectively adopting pull-down option expressions, and generating corresponding target cells. After the parameters are set, the user can only fill in the values present in the drop-down options when filling in the target cell. And constructing an intermediate form template corresponding to the form template construction request by adopting all the target cells. In addition, the method for configuring the pull-down items of the middle cell comprises four methods, namely a data dictionary, a dialog box query, a custom query and a third-party interface. As shown in Table 2, there is a need in the system to return different data formats, both single and double, depending on the component type. Adopting a data dictionary to construct an obtained target cell, and selecting 'yes' when the target cell is selected in a pull-down selection process, wherein the corresponding single-value mode is 1; the binary mode is { "label": yes ":1}. And when the corresponding form template excel is exported, converting the value of the single-value mode into an item name, processing the data of the double-value mode, and taking a label value. When the corresponding form template excel is imported, the values of the excel cells are all item names, so that conversion is needed according to a value mode.
TABLE 2 Pull-Down entries for data dictionary
Item name Term value
Is that 1
Whether or not 0
And 205, respectively configuring the protection authority of the target cells corresponding to the intermediate form template to generate a target form template corresponding to the form template construction request.
Further, step 205 may comprise the following sub-steps S41-S44:
s41, whether the derived data corresponding to the target cell is a derived threshold value or not is judged.
And S42, if so, closing the protection authority corresponding to the target cell to generate a corresponding first cell.
And S43, if not, opening the protection authority corresponding to the target cell to generate a corresponding second cell.
And S44, updating the intermediate form template by adopting all the first cells and all the second cells to generate a target form template corresponding to the form template construction request.
In the embodiment of the present invention, deriving the threshold means that the derived data is empty. And (4) carrying out protection authority configuration on the target cell, namely carrying out cell setting protection attribute on the excel. Before setting protection, judging whether the exported data is empty or not. And if the derived data is empty, closing the protection authority corresponding to the target cell to generate a corresponding first cell. If the derived data is not empty, the protection authority corresponding to the target cell is started, the specific cell position can be accurately positioned through the configuration (column coordinates) of the head authority according to the line number (row coordinates) and the head authority of the derived data, the protection setting is set to TRUE, and the corresponding second cell is generated. The user can only modify the content in the editable area, i.e. the area formed by the first cell without protection being opened. And after all settings are finished, generating a template through an easy excel library for a user to download and use.
And step 206, responding to the received import request corresponding to the target form template, and judging whether the form import mode corresponding to the import request is an additional mode.
In the embodiment of the invention, when an import request corresponding to a target form template is received, whether a form import mode corresponding to the import request is an additional mode is judged according to the judgment.
And step 207, if so, adding the additional field corresponding to the target form template to the last line of the initial form corresponding to the import request to generate a target form corresponding to the import request.
In the embodiment of the present invention, when the form import mode is the add mode, all or part of the contents corresponding to the target form template is added to the last line of the form data, i.e., the initial form, based on the import request. The form template can be flexibly configured, and the import and export requirements of forms with various complex services are met. Assuming that the initial form is asset information, the target form template is a fixed asset warehousing asset detail, the corresponding form import mode is an additional mode, and a user can select the content corresponding to the target form template as an additional field based on actual needs. For example, the selected configuration application number, purchase order number, category, etc. are appended to the last line of the initial form.
And step 208, if not, comparing the cell data of the initial form with the cell data of the target form template to generate a corresponding comparison result.
In the embodiment of the present invention, if the form import mode is not the additional mode, the form import mode at this time is the replacement mode. Then validity check is needed to empty the data imported in the loading excel of the initial form. And comparing the imported target form template with the original value of the corresponding form data one by one. And when the value of the uneditable cell is not consistent with the original value of the form, directly prompting the failure of import.
And step 209, constructing a target form corresponding to the import request according to the comparison result.
In the embodiment of the present invention, if the comparison result is that the importing fails, the user needs to check and adjust the form and then re-import the form. And if the comparison result is that the import is successful, directly generating a target form corresponding to the import request. Each target form can be respectively provided with a corresponding data processor, and the data processor can perform corresponding data processing on the data before the data is returned to a user.
In the embodiment of the invention, the form configuration data corresponding to the form template construction request is obtained by responding to the received form template construction request. And constructing a template header corresponding to the form template construction request based on the form configuration data, and constructing an initial form template corresponding to the form template construction request by adopting the form configuration data and the template header. And updating the initial form template by adopting the validity verification data corresponding to the template header, and generating an intermediate form template corresponding to the form template construction request. And finally, respectively carrying out protection authority configuration on the target cells corresponding to the intermediate form template to generate a target form template corresponding to the form template construction request. And responding to the received import request corresponding to the target form template, and judging whether the form import mode corresponding to the import request is an additional mode. And if so, adding the additional field corresponding to the target form template to the last line of the initial form corresponding to the import request to generate the target form corresponding to the import request. If not, the cell data of the initial form and the target form template are compared to generate a corresponding comparison result. And according to the comparison result, constructing a target form corresponding to the import request. Different Excel templates can be generated by a configuration mode aiming at different services, the functions of the exported templates are expanded, pull-down options are provided, and data verification is supported. By carrying out authority control on some fields, the protection function of the unit cell is started, and the user can only edit the unit cell with the authority. Meanwhile, the function of importing the batch update fields is realized through the form import mode, and consistency check is also carried out during import.
Referring to fig. 3, fig. 3 is a block diagram illustrating a form template construction system according to a third embodiment of the present invention.
The invention provides a form template construction system, which comprises:
the form configuration data obtaining module 301 is configured to respond to the received form template construction request and obtain form configuration data corresponding to the form template construction request.
The template header construction module 302 is configured to construct a template header corresponding to the form template construction request according to the form configuration data.
The initial form template building module 303 is configured to build an initial form template corresponding to the form template building request by using the form configuration data and the template header.
And the intermediate form template generating module 304 is configured to update the initial form template by using the validity verification data corresponding to the template header, and generate an intermediate form template corresponding to the form template construction request.
And the target form template generating module 305 is configured to perform protection authority configuration on the target cells corresponding to the intermediate form template, and generate a target form template corresponding to the form template construction request.
Optionally, the form configuration data includes header configuration data, and the template header building module 302 includes:
and the header identifier acquisition module is used for acquiring a plurality of header identifiers corresponding to the header configuration data.
And the first header character string extraction module is used for extracting the first header character strings corresponding to the header identifications from a preset header database respectively.
And the header character string determining module is used for determining the header character string corresponding to the header configuration data according to the header type corresponding to the header configuration data and all the first header character strings.
And the header array generating module is used for analyzing the header character string and generating a header array corresponding to the header configuration data.
And the template header construction submodule is used for constructing the template header corresponding to the form template construction request by adopting the header array.
Optionally, the header string determination module may perform the following steps:
judging whether the header type corresponding to the header configuration data is a user-defined form type or not;
if so, performing form field expansion on the form configuration data to generate a second form header character string corresponding to the form header configuration data;
merging the second header character strings with the corresponding first header character strings respectively to generate header character strings corresponding to the header configuration data;
if not, all the first header character strings are used as header character strings corresponding to the header configuration data.
Optionally, the initial form template building module 303 includes:
and the unique to-do identification and unique process definition identification acquisition module is used for acquiring the unique to-do identification and the unique process definition identification corresponding to the form configuration data.
And the global form authority data extraction module is used for extracting global form authority data corresponding to the unique process definition identifier from a preset authority database.
And the node form permission data extraction module is used for extracting node form permission data corresponding to the unique identifier to be handled from a preset permission database.
And the form authority data construction module is used for constructing form authority data corresponding to the form template construction request by adopting the global form authority data and the node form authority data according to the preset authority priority.
And the initial form template construction sub-module is used for constructing the initial form template corresponding to the form configuration data by adopting the form authority data and the template header.
Optionally, the validity verification data comprises threshold range verification data and pull-down option verification data. The intermediate form template generation module 304 includes:
and the threshold range parameter construction module is used for respectively constructing the threshold range parameters corresponding to each initial cell in the initial form template by adopting the threshold range verification data.
And the intermediate cell generation module is used for updating the corresponding initial cells by adopting the threshold range parameters respectively and generating the corresponding intermediate cells.
And the pull-down option array construction module is used for adopting the pull-down option verification data to respectively construct pull-down option arrays corresponding to the middle cells.
And the pull-down option expression construction module is used for constructing the pull-down option expression corresponding to the middle cell by adopting the pull-down option array.
And the target cell generation module is used for updating the corresponding middle cells by adopting pull-down option expressions respectively and generating the corresponding target cells.
And the intermediate form template generation sub-module is used for adopting all the target cells to construct an intermediate form template corresponding to the form template construction request.
Optionally, the target form template generating module 305 includes:
and the derived data judging module is used for respectively judging whether the derived data corresponding to the target cell is a derived threshold value.
And the first cell generation module is used for closing the protection authority corresponding to the target cell and generating a corresponding first cell if the protection authority is the same as the protection authority corresponding to the target cell.
And the second cell generation module is used for opening the protection authority corresponding to the target cell and generating a corresponding second cell if the target cell is not the target cell.
And the target form template generation sub-module is used for updating the intermediate form template by adopting all the first cells and all the second cells to generate a target form template corresponding to the form template construction request.
Optionally, the system further comprises:
and the import request judging module is used for responding to the import request corresponding to the received target form template and judging whether the form import mode corresponding to the import request is an additional mode.
And if so, adding the additional fields corresponding to the target form template to the last line of the initial form corresponding to the import request to generate the target form corresponding to the import request.
And the comparison result generation module is used for comparing the cell data of the initial form with the cell data of the target form template if the initial form and the target form template do not have the cell data of the target form template, and generating a corresponding comparison result.
And the second generation module of the target form is used for constructing the target form corresponding to the import request according to the comparison result.
An embodiment of the present invention further provides an electronic device, where the electronic device includes: the computer system comprises a memory and a processor, wherein a computer program is stored in the memory; the computer program, when executed by a processor, causes the processor to perform a form template construction method as in any of the embodiments described above.
The memory may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. The memory has a memory space for program code for performing any of the method steps of the above-described method. For example, the memory space for the program code may comprise respective program codes for implementing the respective steps in the above method, respectively. The program code can be read from and written to one or more computer program products. These computer program products comprise a program code carrier such as a hard disk, a Compact Disc (CD), a memory card or a floppy disk. The program code may be compressed, for example, in a suitable form. The code, when executed by a computing processing device, causes the computing processing device to perform the various steps in the form template construction method described above.
The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method for constructing a form template according to any of the above embodiments is implemented.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of 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 mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
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 invention 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 may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A form template construction method is characterized by comprising the following steps:
responding to a received form template construction request, and acquiring form configuration data corresponding to the form template construction request;
according to the form configuration data, a template header corresponding to the form template construction request is constructed;
adopting the form configuration data and the template header to construct an initial form template corresponding to the form template construction request;
updating the initial form template by adopting validity verification data corresponding to the template header, and generating an intermediate form template corresponding to the form template construction request;
and respectively carrying out protection authority configuration on the target cells corresponding to the intermediate form template to generate a target form template corresponding to the form template construction request.
2. The form template construction method of claim 1, wherein the form configuration data comprises header configuration data; the step of constructing the template header corresponding to the form template construction request according to the form configuration data includes:
acquiring a plurality of header identifications corresponding to the header configuration data;
respectively extracting first header character strings corresponding to the header identifications from a preset header database;
determining a header character string corresponding to the header configuration data according to the header type corresponding to the header configuration data and all the first header character strings;
analyzing the header character string to generate a header array corresponding to the header configuration data;
and constructing a template header corresponding to the form template construction request by adopting the header array.
3. The form template construction method according to claim 2, wherein the step of determining the header character string corresponding to the header configuration data according to the header type corresponding to the header configuration data and all the first header character strings comprises:
judging whether the header type corresponding to the header configuration data is a user-defined form type or not;
if so, performing form field expansion on the form configuration data to generate a second form header character string corresponding to the form header configuration data;
merging the second header character strings with the corresponding first header character strings respectively to generate header character strings corresponding to the header configuration data;
and if not, taking all the first header character strings as header character strings corresponding to the header configuration data.
4. The form template construction method of claim 1, wherein the step of constructing the initial form template corresponding to the form configuration data using the form configuration data and the template header comprises:
acquiring a unique identifier to be handled and a unique identifier of process definition corresponding to the form configuration data;
extracting global form authority data corresponding to the unique process definition identifier from a preset authority database;
extracting node form permission data corresponding to the unique identifier to be handled from the preset permission database;
according to a preset authority priority, adopting the global form authority data and the node form authority data to construct form authority data corresponding to the form template construction request;
and constructing an initial form template corresponding to the form configuration data by adopting the form authority data and the template header.
5. The form template construction method of claim 1, wherein the validation data comprises threshold range validation data and pull-down option validation data; the step of updating the initial form template by using the validity verification data corresponding to the template header to generate an intermediate form template corresponding to the form template construction request includes:
respectively constructing threshold range parameters corresponding to each initial cell in the initial form template by adopting the threshold range verification data;
updating corresponding initial cells by adopting the threshold range parameters respectively to generate corresponding intermediate cells;
adopting the pull-down option verification data to respectively construct a pull-down option array corresponding to each intermediate cell;
constructing a pull-down option expression corresponding to the middle cell by adopting the pull-down option array;
updating corresponding intermediate cells by adopting the pull-down option expressions respectively to generate corresponding target cells;
and constructing an intermediate form template corresponding to the form template construction request by adopting all the target cells.
6. The form template construction method according to claim 1, wherein the step of respectively configuring the protection authority of the target cells corresponding to the intermediate form template to generate the target form template corresponding to the form template construction request includes:
respectively judging whether the export data corresponding to the target cell is an export threshold value;
if so, closing the protection authority corresponding to the target cell to generate a corresponding first cell;
if not, opening the protection authority corresponding to the target cell to generate a corresponding second cell;
and updating the intermediate form template by adopting all the first cells and all the second cells to generate a target form template corresponding to the form template construction request.
7. The form template building method of claim 1, further comprising:
responding to the received import request corresponding to the target form template, and judging whether a form import mode corresponding to the import request is an additional mode;
if so, adding the additional field corresponding to the target form template to the last line of the initial form corresponding to the import request to generate a target form corresponding to the import request;
if not, comparing the cell data of the initial form with the cell data of the target form template to generate a corresponding comparison result;
and according to the comparison result, constructing a target form corresponding to the import request.
8. A form template construction system, comprising:
the form configuration data acquisition module is used for responding to the received form template construction request and acquiring form configuration data corresponding to the form template construction request;
the template header construction module is used for constructing a template header corresponding to the form template construction request according to the form configuration data;
the initial form template construction module is used for constructing an initial form template corresponding to the form template construction request by adopting the form configuration data and the template header;
the intermediate form template generating module is used for updating the initial form template by adopting the validity verification data corresponding to the template header and generating an intermediate form template corresponding to the form template construction request;
and the target form template generating module is used for respectively carrying out protection authority configuration on the target cells corresponding to the intermediate form template and generating a target form template corresponding to the form template construction request.
9. An electronic device, comprising a memory and a processor, wherein the memory has stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of the form template construction method according to any one of claims 1-7.
10. A computer-readable storage medium on which a computer program is stored, the computer program, when executed, implementing the form template construction method of any of claims 1-7.
CN202211717115.3A 2022-12-29 2022-12-29 Form template construction method, system, equipment and medium Pending CN115879427A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211717115.3A CN115879427A (en) 2022-12-29 2022-12-29 Form template construction method, system, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211717115.3A CN115879427A (en) 2022-12-29 2022-12-29 Form template construction method, system, equipment and medium

Publications (1)

Publication Number Publication Date
CN115879427A true CN115879427A (en) 2023-03-31

Family

ID=85757379

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211717115.3A Pending CN115879427A (en) 2022-12-29 2022-12-29 Form template construction method, system, equipment and medium

Country Status (1)

Country Link
CN (1) CN115879427A (en)

Similar Documents

Publication Publication Date Title
CN110069449B (en) File processing method, device, computer equipment and storage medium
CN111027295B (en) Data processing method, device, computer equipment and storage medium
CN110457302B (en) Intelligent structured data cleaning method
CN109558440A (en) Batch data processing method, device, computer equipment and storage medium
CN112380213B (en) Information acquisition method and device, computer equipment and storage medium
CN111310427A (en) Service data configuration processing method and device, computer equipment and storage medium
US20210049711A1 (en) Method of automatically transmitting data information and device of automatically transmitting data information
WO2022134583A1 (en) Insurance data information generation method, apparatus, server, and storage medium
CN106294128B (en) A kind of automated testing method and device exporting report data
CN112667716A (en) Data processing method and device, electronic equipment and storage medium
CN107392560A (en) A kind of Excel list datas issue acquisition method and system based on internet
CN111061733A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN113626571A (en) Answer sentence generating method and device, computer equipment and storage medium
CN116452123A (en) Method and device for generating characteristic value of inventory item and computer equipment
CN115879427A (en) Form template construction method, system, equipment and medium
WO2018206819A1 (en) Data storage method and apparatus
CN115409014A (en) Document template generation method and device, computer equipment and storage medium
CN114168581A (en) Data cleaning method and device, computer equipment and storage medium
CN113434585A (en) Resource saving method and equipment
CN112115235A (en) Entity attribute data query and configuration method, device and server
CN111027296A (en) Report generation method and system based on knowledge base
CN113806372B (en) New data information construction method, device, computer equipment and storage medium
CN111143384B (en) Entity attribute updating method, device, equipment and readable medium
CN109254974B (en) Intelligent input order opening method and device and computer equipment
CN117827832A (en) Data verification method, device, computer equipment and storage medium

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