CN111414739A - Excel data entry component, entry method and device - Google Patents

Excel data entry component, entry method and device Download PDF

Info

Publication number
CN111414739A
CN111414739A CN202010125413.8A CN202010125413A CN111414739A CN 111414739 A CN111414739 A CN 111414739A CN 202010125413 A CN202010125413 A CN 202010125413A CN 111414739 A CN111414739 A CN 111414739A
Authority
CN
China
Prior art keywords
template table
data
rule
verification
field
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.)
Granted
Application number
CN202010125413.8A
Other languages
Chinese (zh)
Other versions
CN111414739B (en
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.)
Chinaetek Service & Technology Co ltd
Original Assignee
Chinaetek Service & 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 Chinaetek Service & Technology Co ltd filed Critical Chinaetek Service & Technology Co ltd
Priority to CN202010125413.8A priority Critical patent/CN111414739B/en
Publication of CN111414739A publication Critical patent/CN111414739A/en
Application granted granted Critical
Publication of CN111414739B publication Critical patent/CN111414739B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention discloses an Excel data entry component, an entry method and an entry device, wherein the method comprises the following steps: the system comprises a calibration rule base, a data template table, a rule template table, a data verification module and a data entry module; the data template table is used for a user to input field information contained in the target Excel file in the data template table; the rule template table is used for configuring corresponding verification rules for the fields which are input in the data template table in the rule template table by a user; the data verification module is used for verifying the entered field information in the data template table by using the verification rule in the rule template table; and the data entry module is used for entering the entered field information in the data template table into the database when the verification result is passed. In the embodiment of the invention, the data can be imported only by configuring the data template table and the rule template table, so that the data import work is easier, more flexible and faster.

Description

Excel data entry component, entry method and device
Technical Field
The invention relates to the technical field of computers, in particular to an Excel data entry component, an entry method and an entry device.
Background
In the current data age, particularly data centers, huge amounts of data are accumulated to support various business functions. Behind such huge data, the function of data entry is not avoided, which is simply interpreted as entering the desired data into a background database table. The data entry of each table has its own differences, such as different tables, and each field in the table has its own different check rules, and because of these differences, the corresponding data entry codes are written for different database tables.
However, when different database table data is entered, since each table field has different data checking rules, it will lead to complicated development work and low work efficiency.
Disclosure of Invention
Because the existing method has the problems, the embodiment of the invention provides an Excel data entry component, an entry method and an entry device.
Specifically, the embodiment of the invention provides the following technical scheme:
in a first aspect, an embodiment of the present invention provides an Excel data entry component, including: the system comprises a calibration rule base, a data template table, a rule template table, a data verification module and a data entry module;
the data template table is used for a user to input field information contained in a target Excel file in the data template table; the target Excel file is an Excel file to be recorded;
the rule template table is used for configuring corresponding verification rules for the fields which are input in the data template table by a user in the rule template table, wherein when the corresponding verification rules are configured for the fields which are input in the data template table, the corresponding verification rules are selected for the fields from the verification rule base according to the constraint conditions of the fields;
the data verification module is used for verifying the entered field information in the data template table by using the verification rule in the rule template table and feeding back a verification result;
and the data entry module is used for entering the entered field information in the data template table into a preset database when the verification result is passed.
Further, the rule template table is configured to be used by a user to configure, in the rule template table, a corresponding check rule for a field already entered in the data template table, where when configuring a corresponding check rule for a field already entered in the data template table, a corresponding check rule is selected for each field from the check rule base according to a constraint condition of each field, and specifically includes:
the rule template table comprises table fields corresponding to field information in the data template table, and a user sets rules matched with the fields selected from the check rule base in the check rules corresponding to the table fields in the data template table according to the constraint conditions of the fields, sets whether the check is actively or passively executed, and sets triggering conditions when the check is passively executed.
Further, the rule template table is further used for a user to set a table name, a hibernate _ sequence, a first row of data lines and all record unification rules in the rule template table;
wherein the table name represents a table name of a data template table; the hibernate _ sequence represents a rule for generating a primary key, and the primary key is not generated by a hibernate serial number when the key is empty; the first row of data lines represents a starting number of lines of data in the data template table; the unified rule of all records represents that one record is used as a dimension to execute the check rule.
Furthermore, a checkFlag field and a checkMesg field are set in the data template table;
the data verification module is used for verifying the field information which is already input in the data template table by using the verification rule in the rule template table, displaying Y in a checkFlag field of the data template table when the verification is passed, and displaying the verification passed in a checkMesg field; and displaying N in a checkFlag field of the data template table when the check fails, and displaying specific information corresponding to which field fails in check due to any reason in a checkMesg field.
In a second aspect, an embodiment of the present invention further provides an Excel data entry method, including:
creating a data template table and a rule template table; the data template table is used for a user to input field information contained in a target Excel file in the data template table; the target Excel file is an Excel file to be recorded; the rule template table is used for configuring corresponding verification rules for the fields which are input in the data template table by a user in the rule template table, wherein when the corresponding verification rules are configured for the fields which are input in the data template table, the corresponding verification rules are selected for the fields from the verification rule base according to the constraint conditions of the fields;
inputting field information of a target Excel file to be input into the data template table;
selecting corresponding checking rules for each field from the checking rule base according to the constraint conditions of each field which are input in the data template table, and configuring the corresponding checking rules in the rule template table;
verifying the entered field information in the data template table by using a verification rule configured in the rule template table, and feeding back a verification result;
and when the verification result is that the verification is passed, inputting the field information which is already input in the data template table into a preset database.
Further, the rule template table comprises table fields corresponding to the field information in the data template table; correspondingly, selecting corresponding verification rules for each field from the verification rule base according to the constraint conditions of each field which is already input in the data template table, and configuring the corresponding verification rules in the rule template table, which specifically comprises the following steps:
setting rules selected from the check rule base and matched with the fields in the check rules corresponding to the corresponding table fields of the rule template table according to the constraint conditions of the fields which are input in the data template table, and setting whether to actively execute the check or passively execute the check; and setting a trigger condition when the verification is passively performed.
Furthermore, a checkFlag field and a checkMesg field are set in the data template table;
correspondingly, the verification of the entered field information in the data template table is performed by using the verification rule configured in the rule template table, and the feedback of the verification result specifically includes:
checking the field information which is already input in the data template table by using a checking rule in the rule template table, displaying Y in a checkFlag field of the data template table when the checking is passed, and displaying that the checking is passed in a checkMesg field; and displaying N in a checkFlag field of the data template table when the check fails, and displaying specific information corresponding to which field fails in check due to any reason in a checkMesg field.
In a third aspect, an embodiment of the present invention further provides an Excel data entry apparatus, including:
the creating module is used for creating a data template table and a rule template table; the data template table is used for a user to input field information contained in a target Excel file in the data template table; the target Excel file is an Excel file to be recorded; the rule template table is used for configuring corresponding verification rules for the fields which are input in the data template table by a user in the rule template table, wherein when the corresponding verification rules are configured for the fields which are input in the data template table, the corresponding verification rules are selected for the fields from the verification rule base according to the constraint conditions of the fields;
the first entry module is used for entering the field information of the target Excel file to be entered into the data template table;
a rule configuration module, configured to select a corresponding check rule from the check rule base for each field according to the constraint condition of each field already entered in the data template table, and configure the corresponding check rule in the rule template table;
the verification module is used for verifying the entered field information in the data template table by utilizing the verification rules configured in the rule template table and feeding back a verification result;
and the second entry module is used for entering the entered field information in the data template table into a preset database when the verification result is that the verification is passed.
In a fourth aspect, an embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the Excel data entry method according to the second aspect when executing the computer program.
In a fifth aspect, the present invention further provides a non-transitory computer readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the Excel data entry method according to the second aspect.
According to the technical scheme, the Excel data entry component, the entry method and the device provided by the embodiment of the invention have the advantages that the data can be easily entered and verified by directly configuring the data template table and the rule template table, the complex development workload is avoided, the operation and maintenance personnel who do not know the development can also realize the data import function, the operation and maintenance personnel only need to learn to configure the data template table and the rule template table, and the configuration of the data template table and the rule template table is simple, flexible and rapid compared with the development work, so that the data import becomes easier, flexible and rapid. In addition, in the embodiment of the invention, the check rule is extracted and put into the rule base, so that the check rule has the characteristics of reusability and low coupling, and related personnel can flexibly call various required check rules. Compared with the conventional data importing mode, the data importing method is easier, more flexible and faster in data importing work in the embodiment of the invention.
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 description of the embodiments or 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 these drawings without creative efforts.
FIG. 1 is a schematic structural diagram of an Excel data entry component according to an embodiment of the present invention;
FIG. 2 is a flowchart of an Excel data entry method according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an Excel data entry device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following further describes embodiments of the present invention with reference to the accompanying drawings. The following examples are only for illustrating the technical solutions of the present invention more clearly, and the protection scope of the present invention is not limited thereby.
In the current data age, particularly data centers, huge amounts of data are accumulated to support various business functions. Behind such huge data, the function of data entry is not avoided, which is simply interpreted as entering the desired data into a background database table. The data entry of each table has its own differences, such as different tables, and each field in the table has its own different check rules, and because of these differences, corresponding data entry codes need to be written for different database tables, which inevitably results in a reduction in development efficiency, and at the same time makes the data entry work become particularly inefficient. Based on the problem, in order to improve the efficiency, the embodiment of the invention designs a universal Excel data entry component, and by using the Excel data entry component, relevant personnel can realize the entry of data only by configuring a data template table and a rule template table, so that the complicated development workload is avoided, and the import function of the data can be realized even if operation and maintenance personnel who do not know the development are not required. The Excel data entry component, the entry method and the device provided by the invention are explained in detail by specific embodiments.
Fig. 1 shows a schematic structural diagram of an Excel data entry component according to an embodiment of the present invention, and as shown in fig. 1, the Excel data entry component according to the embodiment of the present invention includes: the system comprises a verification rule base 11, a data template table 12, a rule template table 13, a data verification module 14 and a data entry module 15;
the data template table 12 is used for a user to enter field information contained in a target Excel file in the data template table; the target Excel file is an Excel file to be recorded;
the rule template table 13 is configured to be used by a user to configure corresponding verification rules for the fields already entered in the data template table in the rule template table, wherein when configuring corresponding verification rules for the fields already entered in the data template table, corresponding verification rules are selected for the fields from the verification rule base 11 according to the constraint conditions of the fields;
the data verification module 14 is configured to verify the field information that has been entered in the data template table by using the verification rule in the rule template table, and feed back a verification result;
and the data entry module 15 is configured to enter the entered field information in the data template table into a preset database when the verification result is that the verification result passes.
In this embodiment, a universal Excel data entry component is designed, and by using the Excel data entry component, relevant personnel can realize entry verification of data only by configuring a data template table and a rule template table, so that the dependence on development personnel is reduced, and entry verification of data can be realized as long as relevant personnel learn to perform configuration of the data template table and the rule template table.
According to the technical scheme, the Excel data entry component provided by the embodiment of the invention can realize easy entry and verification of data by directly configuring the data template table and the rule template table, so that the complex development workload is avoided, operation and maintenance personnel who do not know the development can realize the data entry function, the operation and maintenance personnel only need to learn to configure the data template table and the rule template table, and the configuration of the data template table and the rule template table is simple, flexible and rapid compared with the development work, so that the embodiment of the invention enables the data entry to be easier, more flexible and more rapid. In addition, in the embodiment of the invention, the check rule is extracted and put into the rule base, so that the check rule has the characteristics of reusability and low coupling, and related personnel can flexibly call various required check rules. Compared with the conventional data importing mode, the data importing method is easier, more flexible and faster in data importing work in the embodiment of the invention.
Based on the content of the foregoing embodiment, in this embodiment, the rule template table 13 is configured to be used by a user to configure, in the rule template table, a corresponding check rule for a field already entered in the data template table, where when configuring a corresponding check rule for a field already entered in the data template table, the corresponding check rule is selected from the check rule base for each field according to a constraint condition of each field, and specifically includes:
the rule template table comprises table fields corresponding to field information in the data template table, and a user sets rules matched with the fields selected from the check rule base in the check rules corresponding to the table fields in the data template table according to the constraint conditions of the fields, sets whether the check is actively or passively executed, and sets triggering conditions when the check is passively executed.
In this embodiment, the data template table 12 is used for a user to enter field information contained in a target Excel file in the data template table; the target Excel file is an Excel file to be recorded. For example, the data template table 12 contains data to be imported, as shown in table 1 below.
TABLE 1
Figure BDA0002394257030000081
In this embodiment, the rule template table 13 is used to configure the verification rule, specifically as described in the following text and shown in table 2:
template field: the table field corresponds to the data table field of the data table 1, and each table field is provided with respective rules;
table field: setting the table field to correspond to the specific field in the database table;
table field type: setting the type of the database field corresponding to the table field;
whether to actively execute: setting whether a rule of the table field is actively executed or passively executed; if the 'active execution' is 'yes', the check rule corresponding to the table field is actively triggered before each record is recorded, otherwise, the check rule is triggered by a certain rule to be executed or not executed. For example, table 2 has a template field of "married", and this field is set to be executed actively, then checkNotNull (a rule that the check cannot be empty) is executed, and after the execution is finished, it will continue to trigger the check rule "checkNotNull" of "partner name", so the effect achieved in this way is: if yes, the name of the partner is 'must be filled in';
rule: a rule name, which is written in advance in the verification rule base; if the check NotNull is the mandatory check, the check Phone is the mobile phone number check; "checkUserId" is an identification card check; "checkDateFormat" is a time format check;
triggering: the format is 'the template field corresponding to the rule needs to be triggered, namely the calling condition', namely the rule corresponding to the template field is called only when the calling condition is met; if the value of the table field of 'married' in the current record is 'yes', the rule of 'companion name' is called.
TABLE 2
Figure BDA0002394257030000091
Figure BDA0002394257030000101
Based on the above description, in this embodiment, the rule template table includes the table fields corresponding to the field information in the data template table, so that the user sets the rule selected from the verification rule base and matched with each field in the verification rule corresponding to the corresponding table field of the data template table according to the constraint condition of each field, sets whether to actively perform verification or passively perform verification, and sets the trigger condition when passively perform verification, thereby it can be seen that this embodiment can implement configuration of the verification rule for the rule template table, and further can perform rule verification on the data already entered in the data configuration table by using the configured rule template table. When the rule template table is configured with the verification rules, only the corresponding verification rules (such as whether the rules are empty, the rules for identity card verification, time format verification and the like) are needed to be selected from the verification rule base for setting, and conditions for actively executing the verification and triggering the verification are needed to be set, so that development work of developers is not needed, complicated development work is avoided, operation and maintenance personnel who do not develop can achieve the function of importing data, the operation and maintenance personnel only need to learn to configure the data template table and the rule template table, and the configuration of the data template table and the rule template table is simple, flexible, fast and much relative to the development work, so that the embodiment of the invention enables the data import to be easier, flexible and fast. In addition, in the embodiment of the invention, the check rule is extracted and put into the rule base, so that the check rule has the characteristics of reusability and low coupling, and related personnel can flexibly call various required check rules.
Based on the content of the foregoing embodiment, in this embodiment, the rule template table is further configured to allow a user to set a table name, a hibernate _ sequence, a first row data line number, and all record unification rules in the rule template table;
wherein the table name represents a table name of a data template table; the hibernate _ sequence represents a rule for generating a primary key, and the primary key is not generated by a hibernate serial number when the key is empty; the first row of data lines represents a starting number of lines of data in the data template table; the unified rule of all records represents that one record is used as a dimension to execute the check rule.
In this embodiment, for example, the table name, hibernate _ sequence, the first row data line number, and the unified rule of all records are as follows:
table name: table name of data template table (table 1);
hibernate _ sequence: generating a primary key rule, wherein the primary key is not generated for the empty time by using the hibernate serial number;
number of data lines in first row: the starting row number of data in the data template table (table 1);
all the records are unified: filled in here is a rule that is executed with a record as a dimension, such as recording the submission of the record.
In this embodiment, the rule template table is further configured to allow a user to set a table name, a hibernate _ sequence, a first row of data rows, and all record unification rules in the rule template table, so that the rule verification of the rule template table by using the rule template table becomes simpler and more convenient, for example, a main key may be automatically generated according to the hibernate _ sequence, a starting row of data in the rule template table may be automatically determined according to the first row of data rows, and an automatic rule verification process is facilitated.
Based on the content of the foregoing embodiment, in this embodiment, a checkFlag field and a checkMesg field are set in the data template table;
the data verification module is used for verifying the field information which is already input in the data template table by using the verification rule in the rule template table, displaying Y in a checkFlag field of the data template table when the verification is passed, and displaying the verification passed in a checkMesg field; and displaying N in a checkFlag field of the data template table when the check fails, and displaying specific information corresponding to which field fails in check due to any reason in a checkMesg field.
In this embodiment, the component verifies the data files in the data template table according to the verification rules in the rule template table. Wherein, two fields must be present in the data template table: checkFlag and checkMesg; if the check is passed, the checkFlag is assigned as Y, the checkMesg is assigned as 'check passed', otherwise, the checkFlag is assigned as N, and the checkMesg is assigned as 'specific information corresponding to which table field fails to be checked due to what reason'.
In this embodiment, it should be noted that after the component interprets the data, the database component is called to batch-store the data.
Therefore, in the embodiment, the data entry can be realized by directly configuring the data template table and the rule template table, the component is provided with the rule base, and the maintenance personnel only need to configure the rule template table according to the specification and introduce the rule in the rule base into the table field to be verified, so that the purposes of data entry and data verification can be easily achieved.
Fig. 2 shows a flowchart of an Excel data entry method according to an embodiment of the present invention, and as shown in fig. 2, the Excel data entry method according to the embodiment of the present invention specifically includes the following contents:
step 101: creating a data template table and a rule template table; the data template table is used for a user to input field information contained in a target Excel file in the data template table; the target Excel file is an Excel file to be recorded; the rule template table is used for configuring corresponding verification rules for the fields which are input in the data template table by a user in the rule template table, wherein when the corresponding verification rules are configured for the fields which are input in the data template table, the corresponding verification rules are selected for the fields from the verification rule base according to the constraint conditions of the fields;
in this step, by creating the data template table and the rule template table, and performing data import of the data template table and configuration of the verification rules of the rule template table, the whole data import process (mainly, the rule verification process) does not need to depend on development work of developers, so that complicated development workload is avoided, and operation and maintenance personnel who do not know development can realize the import function of data as long as the operation and maintenance personnel learn to configure the data template table and the rule template table.
Step 102: inputting field information of a target Excel file to be input into the data template table;
step 103: selecting corresponding checking rules for each field from the checking rule base according to the constraint conditions of each field which are input in the data template table, and configuring the corresponding checking rules in the rule template table;
step 104: verifying the entered field information in the data template table by using a verification rule configured in the rule template table, and feeding back a verification result;
step 105: and when the verification result is that the verification is passed, inputting the field information which is already input in the data template table into a preset database.
In this embodiment, the data entry can be realized by directly creating and configuring the data template table and the rule template table, and the maintenance personnel only need to configure the rule template table according to the specification and introduce the rule in the rule base into the table field to be verified, so that the purposes of data entry and data verification can be easily achieved.
Therefore, in the embodiment, by creating the data template table and the rule template table and performing data import of the data template table and check rule configuration of the rule template table, the whole data import process (mainly the rule check process) does not need to depend on development work of developers, complex development workload is avoided, operation and maintenance personnel who do not know development can realize the import function of data, and the operation and maintenance personnel only need to learn to configure the data template table and the rule template table. In addition, in the embodiment of the invention, the check rule is extracted and put into the rule base, so that the check rule has the characteristics of reusability and low coupling, and related personnel can flexibly call various required check rules.
According to the technical scheme, the Excel data entry method provided by the embodiment of the invention can realize easy entry and verification of data by directly configuring the data template table and the rule template table, so that the complex development workload is avoided, operation and maintenance personnel who do not know the development can realize the data entry function, the operation and maintenance personnel only need to learn to configure the data template table and the rule template table, and the configuration of the data template table and the rule template table is simple, flexible and rapid compared with the development work, so that the data entry method provided by the embodiment of the invention has the advantages of easiness, flexibility and rapidness. In addition, in the embodiment of the invention, the check rule is extracted and put into the rule base, so that the check rule has the characteristics of reusability and low coupling, and related personnel can flexibly call various required check rules. Compared with the conventional data importing mode, the data importing method is easier, more flexible and faster in data importing work in the embodiment of the invention.
Based on the content of the above embodiment, in this embodiment, the rule template table includes a table field corresponding to the field information in the data template table; correspondingly, selecting corresponding verification rules for each field from the verification rule base according to the constraint conditions of each field which is already input in the data template table, and configuring the corresponding verification rules in the rule template table, which specifically comprises the following steps:
setting rules selected from the check rule base and matched with the fields in the check rules corresponding to the corresponding table fields of the rule template table according to the constraint conditions of the fields which are input in the data template table, and setting whether to actively execute the check or passively execute the check; and setting a trigger condition when the verification is passively performed.
In this embodiment, the configuration of the verification rule for the rule template table can be realized, and further, the configured rule template table can be used to perform rule verification on the data which is already recorded in the data configuration table. When the rule template table is configured with the verification rules, only corresponding verification rules (such as whether the rule template table is empty, the identity card verification, the time format verification and the like) need to be selected from the verification rule base for setting, and conditions for actively executing the verification and triggering the verification are set, so that the embodiment only needs to utilize the configured rule template table to perform the rule verification on the data which is already recorded in the data configuration table, development work of developers is not needed, complicated development workload is avoided, operation and maintenance personnel who do not know the development can realize the data import function, the operation and maintenance personnel only need to learn to configure the data template table and the rule template table, and the configuration of the data template table and the rule template table is simple, flexible and rapid compared with the development work, therefore, the embodiment of the invention ensures that the data import is easier and more rapid, Flexible and fast. In addition, in the embodiment of the invention, the check rule is extracted and put into the rule base, so that the check rule has the characteristics of reusability and low coupling, and related personnel can flexibly call various required check rules.
Based on the content of the foregoing embodiment, in this embodiment, a checkFlag field and a checkMesg field are set in the data template table;
correspondingly, the verification of the entered field information in the data template table is performed by using the verification rule configured in the rule template table, and the feedback of the verification result specifically includes:
checking the field information which is already input in the data template table by using a checking rule in the rule template table, displaying Y in a checkFlag field of the data template table when the checking is passed, and displaying that the checking is passed in a checkMesg field; and displaying N in a checkFlag field of the data template table when the check fails, and displaying specific information corresponding to which field fails in check due to any reason in a checkMesg field.
Since the Excel data entry method provided by the embodiment can be implemented by using the Excel data entry component provided by the above embodiment, the working principle and the beneficial effect are similar, and therefore, the specific processing procedure can be referred to the introduction of the above embodiment, and is not described in detail herein.
Fig. 3 is a schematic structural diagram of an Excel data entry device according to an embodiment of the present invention, and as shown in fig. 3, the Excel data entry device according to the embodiment of the present invention includes:
a creating module 21 for creating a data template table and a rule template table; the data template table is used for a user to input field information contained in a target Excel file in the data template table; the target Excel file is an Excel file to be recorded; the rule template table is used for configuring corresponding verification rules for the fields which are input in the data template table by a user in the rule template table, wherein when the corresponding verification rules are configured for the fields which are input in the data template table, the corresponding verification rules are selected for the fields from the verification rule base according to the constraint conditions of the fields;
the first entry module 22 is used for entering the field information of the target Excel file to be entered into the data template table;
a rule configuration module 23, configured to select, according to the constraint condition of each field already entered in the data template table, a corresponding check rule from the check rule base for each field, and configure the corresponding check rule in the rule template table;
the verification module 24 is configured to verify the field information entered in the data template table by using the verification rule configured in the rule template table, and feed back a verification result;
and the second entry module 25 is configured to, when the verification result is that the verification passes, enter the field information already entered in the data template table into a preset database.
The Excel data entry device provided by the embodiment can be used for executing the Excel data entry method provided by the embodiment, the working principle and the beneficial effect are similar, and the detailed description is omitted here.
Based on the same inventive concept, another embodiment of the present invention provides an electronic device, which specifically includes the following components, with reference to fig. 4: a processor 301, a memory 302, a communication interface 303, and a communication bus 304;
the processor 301, the memory 302 and the communication interface 303 complete mutual communication through the communication bus 304; the communication interface 303 is used for realizing information transmission between the devices;
the processor 301 is configured to call a computer program in the memory 302, and when the processor executes the computer program, all steps of the Excel data entry method are implemented, for example, when the processor executes the computer program, the following steps are implemented: creating a data template table and a rule template table; the data template table is used for a user to input field information contained in a target Excel file in the data template table; the target Excel file is an Excel file to be recorded; the rule template table is used for configuring corresponding verification rules for the fields which are input in the data template table by a user in the rule template table, wherein when the corresponding verification rules are configured for the fields which are input in the data template table, the corresponding verification rules are selected for the fields from the verification rule base according to the constraint conditions of the fields; inputting field information of a target Excel file to be input into the data template table; selecting corresponding checking rules for each field from the checking rule base according to the constraint conditions of each field which are input in the data template table, and configuring the corresponding checking rules in the rule template table; verifying the entered field information in the data template table by using a verification rule configured in the rule template table, and feeding back a verification result; and when the verification result is that the verification is passed, inputting the field information which is already input in the data template table into a preset database.
Based on the same inventive concept, another embodiment of the present invention provides a non-transitory computer readable storage medium, on which a computer program is stored, which when executed by a processor implements all the steps of the Excel data entry method described above, for example, the processor implements the following steps when executing the computer program: creating a data template table and a rule template table; the data template table is used for a user to input field information contained in a target Excel file in the data template table; the target Excel file is an Excel file to be recorded; the rule template table is used for configuring corresponding verification rules for the fields which are input in the data template table by a user in the rule template table, wherein when the corresponding verification rules are configured for the fields which are input in the data template table, the corresponding verification rules are selected for the fields from the verification rule base according to the constraint conditions of the fields; inputting field information of a target Excel file to be input into the data template table; selecting corresponding checking rules for each field from the checking rule base according to the constraint conditions of each field which are input in the data template table, and configuring the corresponding checking rules in the rule template table; verifying the entered field information in the data template table by using a verification rule configured in the rule template table, and feeding back a verification result; and when the verification result is that the verification is passed, inputting the field information which is already input in the data template table into a preset database.
In addition, the logic instructions in the memory may be implemented in the form of software functional units and may be stored in a computer readable storage medium when sold or used as a stand-alone product. 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-described embodiments of the apparatus are merely illustrative, and the 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 modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. Based on such understanding, the above technical solutions may be essentially or partially implemented in the form of software products, which may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and include several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the Excel data entry method according to the various embodiments or some parts of the embodiments.
In addition, in the present invention, terms such as "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Moreover, in the present invention, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Furthermore, in the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Finally, it should be noted that: 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 will 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. An Excel data entry component, comprising: the system comprises a calibration rule base, a data template table, a rule template table, a data verification module and a data entry module;
the data template table is used for a user to input field information contained in a target Excel file in the data template table; the target Excel file is an Excel file to be recorded;
the rule template table is used for configuring corresponding verification rules for the fields which are input in the data template table by a user in the rule template table, wherein when the corresponding verification rules are configured for the fields which are input in the data template table, the corresponding verification rules are selected for the fields from the verification rule base according to the constraint conditions of the fields;
the data verification module is used for verifying the entered field information in the data template table by using the verification rule in the rule template table and feeding back a verification result;
and the data entry module is used for entering the entered field information in the data template table into a preset database when the verification result is passed.
2. The Excel data entry assembly according to claim 1, wherein the rule template table is configured to allow a user to configure corresponding verification rules for fields already entered in the data template table in the rule template table, wherein when configuring corresponding verification rules for fields already entered in the data template table, selecting corresponding verification rules for the fields from the verification rule base according to constraint conditions of the fields specifically comprises:
the rule template table comprises table fields corresponding to field information in the data template table, and a user sets rules matched with the fields selected from the check rule base in the check rules corresponding to the table fields in the data template table according to the constraint conditions of the fields, sets whether the check is actively or passively executed, and sets triggering conditions when the check is passively executed.
3. The Excel data entry component of claim 2, wherein the rule template table is further configured for a user to set a table name, hibernate _ sequence, a first row of data lines, and all record unification rules in the rule template table;
wherein the table name represents a table name of a data template table; the hibernate _ sequence represents a rule for generating a primary key, and the primary key is not generated by a hibernate serial number when the key is empty; the first row of data lines represents a starting number of lines of data in the data template table; the unified rule of all records represents that one record is used as a dimension to execute the check rule.
4. The Excel data entry component of claim 2 wherein a checkFlag field and a checkMesg field are provided in the data template table;
the data verification module is used for verifying the field information which is already input in the data template table by using the verification rule in the rule template table, displaying Y in a checkFlag field of the data template table when the verification is passed, and displaying the verification passed in a checkMesg field; and displaying N in a checkFlag field of the data template table when the check fails, and displaying specific information corresponding to which field fails in check due to any reason in a checkMesg field.
5. An Excel data entry method, comprising:
creating a data template table and a rule template table; the data template table is used for a user to input field information contained in a target Excel file in the data template table; the target Excel file is an Excel file to be recorded; the rule template table is used for configuring corresponding verification rules for the fields which are input in the data template table by a user in the rule template table, wherein when the corresponding verification rules are configured for the fields which are input in the data template table, the corresponding verification rules are selected for the fields from the verification rule base according to the constraint conditions of the fields;
inputting field information of a target Excel file to be input into the data template table;
selecting corresponding checking rules for each field from the checking rule base according to the constraint conditions of each field which are input in the data template table, and configuring the corresponding checking rules in the rule template table;
verifying the entered field information in the data template table by using a verification rule configured in the rule template table, and feeding back a verification result;
and when the verification result is that the verification is passed, inputting the field information which is already input in the data template table into a preset database.
6. An Excel data entry method according to claim 5, characterized in that said rule template table includes therein table fields corresponding to field information in said data template table; correspondingly, selecting corresponding verification rules for each field from the verification rule base according to the constraint conditions of each field which is already input in the data template table, and configuring the corresponding verification rules in the rule template table, which specifically comprises the following steps:
setting rules selected from the check rule base and matched with the fields in the check rules corresponding to the corresponding table fields of the rule template table according to the constraint conditions of the fields which are input in the data template table, and setting whether to actively execute the check or passively execute the check; and setting a trigger condition when the verification is passively performed.
7. The Excel data entry method according to claim 6, wherein a checkFlag field and a checkMesg field are provided in the data template table;
correspondingly, the verification of the entered field information in the data template table is performed by using the verification rule configured in the rule template table, and the feedback of the verification result specifically includes:
checking the field information which is already input in the data template table by using a checking rule in the rule template table, displaying Y in a checkFlag field of the data template table when the checking is passed, and displaying that the checking is passed in a checkMesg field; and displaying N in a checkFlag field of the data template table when the check fails, and displaying specific information corresponding to which field fails in check due to any reason in a checkMesg field.
8. An Excel data entry device, comprising:
the creating module is used for creating a data template table and a rule template table; the data template table is used for a user to input field information contained in a target Excel file in the data template table; the target Excel file is an Excel file to be recorded; the rule template table is used for configuring corresponding verification rules for the fields which are input in the data template table by a user in the rule template table, wherein when the corresponding verification rules are configured for the fields which are input in the data template table, the corresponding verification rules are selected for the fields from the verification rule base according to the constraint conditions of the fields;
the first entry module is used for entering the field information of the target Excel file to be entered into the data template table;
a rule configuration module, configured to select a corresponding check rule from the check rule base for each field according to the constraint condition of each field already entered in the data template table, and configure the corresponding check rule in the rule template table;
the verification module is used for verifying the entered field information in the data template table by utilizing the verification rules configured in the rule template table and feeding back a verification result;
and the second entry module is used for entering the entered field information in the data template table into a preset database when the verification result is that the verification is passed.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the Excel data entry method according to any of claims 5 to 7 is implemented when the computer program is executed by the processor.
10. A non-transitory computer readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the Excel data entry method according to any of claims 5 to 7.
CN202010125413.8A 2020-02-27 2020-02-27 Excel data entry component, entry method and device Active CN111414739B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010125413.8A CN111414739B (en) 2020-02-27 2020-02-27 Excel data entry component, entry method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010125413.8A CN111414739B (en) 2020-02-27 2020-02-27 Excel data entry component, entry method and device

Publications (2)

Publication Number Publication Date
CN111414739A true CN111414739A (en) 2020-07-14
CN111414739B CN111414739B (en) 2023-04-14

Family

ID=71494177

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010125413.8A Active CN111414739B (en) 2020-02-27 2020-02-27 Excel data entry component, entry method and device

Country Status (1)

Country Link
CN (1) CN111414739B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112492000A (en) * 2020-11-18 2021-03-12 中盈优创资讯科技有限公司 Method and device for loading Internet of things access network rules
CN113642308A (en) * 2021-08-30 2021-11-12 重庆允成互联网科技有限公司 Data import method, system, equipment and storage medium based on data variability
CN114048194A (en) * 2022-01-12 2022-02-15 树根互联股份有限公司 Data management method and device and electronic equipment
CN115809644A (en) * 2022-11-15 2023-03-17 四川智慧高速科技有限公司 Data table generation method, electronic device and readable medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874866A (en) * 2018-04-22 2018-11-23 平安科技(深圳)有限公司 Data import management method, apparatus, mobile terminal and storage medium
CN109635300A (en) * 2018-12-14 2019-04-16 泰康保险集团股份有限公司 Data verification method and device
CN109783482A (en) * 2018-12-28 2019-05-21 远光软件股份有限公司 A kind of data violation monitoring method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874866A (en) * 2018-04-22 2018-11-23 平安科技(深圳)有限公司 Data import management method, apparatus, mobile terminal and storage medium
CN109635300A (en) * 2018-12-14 2019-04-16 泰康保险集团股份有限公司 Data verification method and device
CN109783482A (en) * 2018-12-28 2019-05-21 远光软件股份有限公司 A kind of data violation monitoring method and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112492000A (en) * 2020-11-18 2021-03-12 中盈优创资讯科技有限公司 Method and device for loading Internet of things access network rules
CN113642308A (en) * 2021-08-30 2021-11-12 重庆允成互联网科技有限公司 Data import method, system, equipment and storage medium based on data variability
CN114048194A (en) * 2022-01-12 2022-02-15 树根互联股份有限公司 Data management method and device and electronic equipment
CN115809644A (en) * 2022-11-15 2023-03-17 四川智慧高速科技有限公司 Data table generation method, electronic device and readable medium
CN115809644B (en) * 2022-11-15 2023-11-03 四川智慧高速科技有限公司 Data table generation method, electronic device and readable medium

Also Published As

Publication number Publication date
CN111414739B (en) 2023-04-14

Similar Documents

Publication Publication Date Title
CN111414739B (en) Excel data entry component, entry method and device
US9563617B2 (en) Custom validation of values for fields of submitted forms
US20140129457A1 (en) An interactive organizational decision-making and compliance facilitation portal
CN107797826B (en) Rule configuration method based on rule engine, terminal and equipment
KR20130126930A (en) Using text messages to interact with spreadsheets
CN105389184B (en) The configuration method and device of Product Interface information
US10776852B2 (en) Contextual solicitation in a starter application
US20110264703A1 (en) Importing Tree Structure
CN101641688A (en) Definable application assistant
CN115328759A (en) Form verification method and device
CN111062676A (en) Method and device for realizing government affair approval process
CN113378538A (en) Document structured information input method, electronic equipment and storage medium
CN114443039A (en) Input parameter verification method and device, electronic equipment and storage medium
CN115544417B (en) Method and device for verifying web form, electronic equipment and storage medium
CN111124883A (en) Test case library introduction method, system and equipment based on tree form
CN110362294A (en) Development task executes method, apparatus, electronic equipment and storage medium
CN113703753B (en) Method and device for product development and product development system
CN115544132A (en) Data import method and system and electronic equipment
CN114443634A (en) Data quality checking method, device, equipment and storage medium
CN103326892A (en) Web interface operation method and device
CN113392382A (en) Data management method, electronic device and readable storage medium
CN115579096A (en) Automatic generation and analysis verification method, system and storage medium for drug alert E2B R3 standard report
KR102300467B1 (en) Knowledge database management device for building a knowledge database using tables included in spreadsheet documents and enabling user access to the knowledge database, and operating method thereof
EP4235543A1 (en) Device for generating draft document and method therefor
CN117522319A (en) Universal data stream approval system, method, equipment and 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
GR01 Patent grant
GR01 Patent grant