Method and device for creating users in batches based on Excel table and electronic equipment

Through the batch creation method based on Excel tables, the use of file templates and data verification technology, the time-consuming problem of manually creating users is solved, efficient user management is achieved, and the compatibility and universality of the system is improved.

CN119088813APending Publication Date: 2024-12-06SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD

Patent Information

Application Number
CN202411195789.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

In many business scenarios, the amount of new users is large, and it is time-consuming to create users manually, resulting in low user creation efficiency.

Method used

Using the batch creation method based on Excel tables, the Excel file template associated with the business system is pre-created, the business data is filled, the required fill-in, data format and user data association attributes are checked, the target version of the business file is generated, and the business file is to be completed. It is stored in the database to enable batches of new users.

Benefits of technology

It improves the efficiency of user creation, avoids the time-consuming process of manually adding a single new user, and enhances the coverage and versatility of the system's user management functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088813A_ABST
    Figure CN119088813A_ABST
Patent Text Reader

Abstract

The invention provides a method and device for creating users in batches based on an Excel table and electronic equipment. According to the method, firstly, file templates in an Excel format matched with various business scenes need to be created, a user selects the matched file template of an Excel table, and meanwhile business data needing to be filled is edited so that the business data can be imported. In addition, in order to ensure the accuracy of each data, data verification is also required. And finally, analyzing the service data based on the association relationship between the pre-created file template and the database table, and obtaining the information of the newly-added users to realize the creation work of batch newly-added users. Through the process, a single user does not need to be newly added in a manual creation mode, so that the creation efficiency of the user can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device and electronic device for batch creating users based on Excel tables. Background Art

[0002] With the development of the Internet, various operating systems have emerged. However, in response to complex needs and business scenarios, the way a system is displayed and used in different scenarios will vary depending on the deployment environment. Users are an indispensable part of many management systems, and many business scenarios require the creation of new users.

[0003] Currently, the creation of new users is mainly done manually one by one.

[0004] However, in some business scenarios, the amount of new user data is very large, and manually creating a new user individually is very time-consuming, resulting in low user creation efficiency. Summary of the invention

[0005] The embodiments of the present invention provide a method, device and electronic device for batch creating users based on Excel tables, which can improve the efficiency of user creation.

[0006] In a first aspect, an embodiment of the present invention provides a method for creating users in batches based on an Excel spreadsheet, comprising:

[0007] A1: Based on the business type in the business system, at least one file template is created in advance, and an association relationship is established between the file template and a database table based on the business type, wherein the file template is in Excel format;

[0008] A2: Select a corresponding file template according to different business scenarios, and aggregate business data to fill the file template to generate a current version of the business file, wherein the current version of the business file includes at least one newly added user information;

[0009] A3: Performing data verification operation on the current version of the business file to generate a target version of the business file, wherein the data verification includes mandatory item verification, data format verification and user data related attribute verification;

[0010] A4: Based on the association relationship and the target version business file, the business data in the target version business file is parsed and stored in the corresponding database table.

[0011] Preferably,

[0012] Before selecting corresponding file templates according to different business scenarios, aggregating business data to fill in the file templates, and generating the current version of the business file, the method further includes:

[0013] Determine whether the current user has the operation authority. If yes, execute step A2; otherwise, end the current process.

[0014] Preferably,

[0015] After performing the data verification operation on the current version of the business file to generate the target version of the business file, the method further includes:

[0016] Create an import log record table in the database library table;

[0017] The batch import records of the target version business files in Excel format are stored in the import log record table, wherein the import log record table includes the primary key id, import batch id, import user name, import success record, import failure record and failure reason record.

[0018] Preferably,

[0019] The performing of a data verification operation on the current version of the business file to generate a target version of the business file includes:

[0020] D1: Determine at least one required item in the Excel table corresponding to the current version of the business file;

[0021] D2: Determine whether the current business data corresponding to each required item is empty. If so, execute step D3; otherwise, execute step D4;

[0022] D3: Fill in the current business data, and add a first failure record and a first failure reason to the import log record table, wherein the first failure reason is a required item and is left blank;

[0023] D4: Determine whether the data format of the current business data is correct, if so, execute step D5, otherwise, execute step D6;

[0024] D5: Determine whether the user-related attributes of the current business data are correct. If so, execute step D7; otherwise, execute step D8.

[0025] D6: modifying the format of the current business data based on the preset data format rule, and adding a second failure record and a second failure reason to the import log record table, wherein the second failure reason is that the data format of the current business data does not conform to the preset data format rule;

[0026] D7: Add a new import success record to the import log record table and end the current process;

[0027] D8: Based on the preset user association attribute rules, modify the user association attributes of the current business data, generate a target version of the business file, and add a third failure record and a third failure reason in the import log record table, wherein the third failure reason is that the user association attributes of the current business data do not comply with the preset user association attribute rules.

[0028] In a second aspect, an embodiment of the present invention provides a device for creating users in batches based on an Excel table, the device comprising:

[0029] Creation module: used to pre-create at least one file template based on the business type in the business system, and establish an association relationship between the file template and a database table based on the business type, wherein the file template is in Excel format;

[0030] Data aggregation module: used to select corresponding file templates in the creation module according to different business scenarios, and aggregate business data to fill the file templates to generate a current version of the business file, wherein the current version of the business file contains at least one newly added user information;

[0031] Data verification module: used to perform data verification operation on the current version of the business file summarized by the data summary module to generate a target version of the business file, wherein the data verification includes mandatory item verification, data format verification and user data related attribute verification;

[0032] Parsing module: used for parsing the business data in the target version business file based on the association relationship created by the creation module and the target version business file generated by the data verification module, and storing the business data in the corresponding database table.

[0033] Preferably,

[0034] Before the data aggregation module, it further includes: an authority verification module;

[0035] The permission verification module is used to determine whether the current user has the operation permission. If yes, execute step A2; otherwise, end the current process.

[0036] Preferably,

[0037] After the data verification module, it further includes: a log import module;

[0038] The log import module is used to execute:

[0039] Create an import log record table in the database library table;

[0040] The batch import records of the target version business files in Excel format are stored in the import log record table, wherein the import log record table includes the primary key id, import batch id, import user name, import success record, import failure record and failure reason record.

[0041] Preferably,

[0042] The data verification module is further used to execute:

[0043] D1: Determine at least one required item in the Excel table corresponding to the current version of the business file;

[0044] D2: Determine whether the current business data corresponding to each required item is empty. If so, execute step D3; otherwise, execute step D4;

[0045] D3: Fill in the current business data, and add a first failure record and a first failure reason to the import log record table, wherein the first failure reason is a required item and is left blank;

[0046] D4: Determine whether the data format of the current business data is correct, if so, execute step D5, otherwise, execute step D6;

[0047] D5: Determine whether the user-related attributes of the current business data are correct. If so, execute step D7; otherwise, execute step D8.

[0048] D6: modifying the format of the current business data based on the preset data format rule, and adding a second failure record and a second failure reason to the import log record table, wherein the second failure reason is that the data format of the current business data does not conform to the preset data format rule;

[0049] D7: Add a new import success record to the import log record table and end the current process;

[0050] D8: Based on the preset user association attribute rules, modify the user association attributes of the current business data, generate a target version of the business file, and add a third failure record and a third failure reason in the import log record table, wherein the third failure reason is that the user association attributes of the current business data do not comply with the preset user association attribute rules.

[0051] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: at least one memory and at least one processor;

[0052] The at least one memory is used to store a machine-readable program;

[0053] The at least one processor is used to call the machine-readable program to execute any method described in the first aspect of claim 1.

[0054] In a fourth aspect, an embodiment of the present invention provides a computer-readable medium, on which computer instructions are stored. When the computer instructions are executed by a processor, the processor executes any one of the methods described in the first aspect.

[0055] The embodiments of the present invention provide a method, device and electronic device for batch creation of users based on Excel tables. First, it is necessary to create a file template in Excel format that is adapted to various business scenarios, so that when the user needs to download the template, the file template of the corresponding Excel table can be selected, and the business data that needs to be filled in the Excel table can be edited at the same time, so as to import the business data. In addition, in order to ensure the accuracy of each data, it is also necessary to verify the data of the newly added user information in the current version of the business file filled with the business data, including the verification of the required items, the verification of the data format and the verification of the user data associated attributes, so as to generate a target version of the business file that meets the target requirements. Finally, based on the association relationship between the pre-created file template and the database table, the business data of the target version of the business file stored in the database can be parsed, and the newly added user information can be obtained to realize the creation of batch new users. Through the above process, there is no need to manually create a single new user, thereby improving the efficiency of user creation. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0057] Figure 1 It is a flow chart of a method for batch creating users based on Excel tables provided by one embodiment of the present invention;

[0058] Figure 2 It is a flowchart of another method for creating users in batches based on an Excel table provided by an embodiment of the present invention;

[0059] Figure 3 It is a schematic diagram of a device for batch creating users based on an Excel table provided by an embodiment of the present invention;

[0060] Figure 4 It is a schematic diagram of another device for batch creating users based on Excel tables provided by an embodiment of the present invention;

[0061] Figure 5 It is a schematic diagram of another device for creating users in batches based on an Excel spreadsheet provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0063] like Figure 1 As shown, an embodiment of the present invention provides a method for creating users in batches based on an Excel spreadsheet, and the method may include the following steps:

[0064] Step 101: based on the business type in the business system, at least one file template is created in advance, and an association relationship is established between the file template and a database table based on the business type, and the file template is in Excel format;

[0065] Step 102: Select a corresponding file template according to different business scenarios, and summarize the business data to fill in the file template to generate a current version of the business file, wherein the current version of the business file contains at least one newly added user information;

[0066] Step 103: Perform data verification operations on the current version of the business file to generate a target version of the business file, where data verification includes mandatory field verification, data format verification and user data association attribute verification; Step 104: Based on the association relationship and the target version of the business file, parse the business data in the target version of the business file and store it in the corresponding database table.

[0067] In an embodiment of the present invention, a method for batch creation of users based on an Excel table is provided. First, it is necessary to create a file template in an Excel format that is adapted to various business scenarios, so that when the user needs to download the template, the file template of the corresponding Excel table can be selected, and the business data that needs to be filled in the Excel table can be edited at the same time, so as to import the business data. In addition, in order to ensure the accuracy of each data, it is also necessary to verify the data of the newly added user information in the current version of the business file filled with the business data, including the verification of the required items, the verification of the data format and the verification of the user data associated attributes, so as to generate a target version of the business file that meets the target requirements. Finally, based on the association relationship between the pre-created file template and the database table, the target version of the business file stored in the database can be parsed for business data, and the newly added user information can be obtained to realize the creation of batch new users. Through the above process, there is no need to manually create a single new user, thereby improving the efficiency of user creation.

[0068] In order to determine the user's operation authority, in one embodiment of the present invention, in the above embodiment, in step 102, the corresponding file template is selected according to different business scenarios, and the business data is aggregated to fill the file template, and before the current version of the business file is generated, the following is further included:

[0069] Determine whether the current user has the operation authority. If yes, execute step A2; otherwise, end the current process.

[0070] In an embodiment of the present invention, the user management page will display buttons for template import and template download when and only when a user with operation authority (such as a super administrator) logs in to view the user management page. Other ordinary users do not have viewing authority. The front-end code can obtain the information of the currently logged-in user (such as a message prompt indicating that the super administrator account has successfully logged in) based on the data on the initialization page. If the currently logged-in user is a super administrator, the front-end page buttons will be displayed, otherwise they will be hidden.

[0071] For example, after the user clicks the template download button, the code first determines the information of the logged-in user. If the user is a super administrator, the method call interface is executed: after the browser downloads the Excel spreadsheet returned by the backend, the user edits the data to be imported according to the downloaded file template.

[0072] In order to achieve data tracking and management, in one embodiment of the present invention, after performing a data verification operation on the current version of the business file in step 103 to generate a target version of the business file, the above embodiment further includes:

[0073] Create an import log record table in the database library table;

[0074] The batch import records of the target version business files in Excel format are stored in the import log record table, wherein the import log record table includes the primary key id, import batch id, import user name, import success record, import failure record and failure reason record.

[0075] In an embodiment of the present invention, the import operation is logged and the successful data, failed data and the reasons for the failure are returned. At the same time, the failed data is returned to the front end for displaying the import failure data and the reasons for the failure on the user management page.

[0076] For example, the import log record table includes the primary key id, the batch id of this import, the user name of this import, the result of this row of data import, the reason for failure and the creation time. The reason for failure is only displayed when the import fails. In addition, a corresponding button for this import failure is added to the user management page. After the user clicks the template import, the backend performs the import processing of the template data and returns the failure information after the processing is completed. If all succeeds, the failure information is empty. This button is only used to display the failure column of this import of Excel template data. It will not be displayed after the page is refreshed or re-entered, which is convenient for users to view the error data of the file template and improve the accuracy of the template data.

[0077] In order to ensure the accuracy of the data, in one embodiment of the present invention, step 103 in the above embodiment performs a data verification operation on the current version of the business file to generate a target version of the business file, including:

[0078] D1: Determine at least one required item in the Excel table corresponding to the current version of the business file;

[0079] D2: Determine whether the current business data corresponding to each required item is empty. If so, execute step D3; otherwise, execute step D4;

[0080] D3: Fill in the current business data, and add a first failure record and a first failure reason to the import log record table, wherein the first failure reason is a required item and is left blank;

[0081] D4: Determine whether the data format of the current business data is correct, if so, execute step D5, otherwise, execute step D6;

[0082] D5: Determine whether the user-related attributes of the current business data are correct. If so, execute step D7; otherwise, execute step D8.

[0083] D6: modifying the format of the current business data based on the preset data format rule, and adding a second failure record and a second failure reason to the import log record table, wherein the second failure reason is that the data format of the current business data does not conform to the preset data format rule;

[0084] D7: Add a new import success record to the import log record table and end the current process;

[0085] D8: Based on the preset user association attribute rules, modify the user association attributes of the current business data, generate a target version of the business file, and add a third failure record and a third failure reason in the import log record table, wherein the third failure reason is that the user association attributes of the current business data do not comply with the preset user association attribute rules.

[0086] In the embodiment of the present invention, after obtaining the template data of the current version of the business file, the template data needs to be verified, including: required item verification, data format verification and user data related attribute verification. Only after the verification of each business data is completed, the user data can be entered into the warehouse, and the transaction management of the entry operation is performed. When the processing is completed, the processing results are recorded in the import log table, and the failed list is returned to the front end for display.

[0087] Specifically, the display of the import failure button on the front end can be designed using local variables. It is not displayed by default. Only when the import template interface is called and there is failure information in the interface return, the local variable is enabled. At this time, the import failure button will be displayed on the front-end user management page due to the activation of the local variable. When the user clicks the button, a pop-up box will be displayed, showing the record of this import failure. Through the design of this button, the reason for the import failure can be clarified, which is helpful for data modification and further operations.

[0088] For example, mandatory fields need to be checked for non-empty values, and other data such as mobile phone numbers, email addresses, and passwords need to be checked for format in addition to being checked for non-empty values. In addition, MSS approval verification is also required for MSS order approval scenarios, and product center data such as product types, project data, business system data, and department information need to be checked for inventory in addition to being checked for non-empty values.

[0089] In an embodiment of the present invention, batch creation of users through Excel tables is implemented to address the situation where manual creation of users in the system does not meet business scenarios and requirements. Through this Excel batch creation method, it is possible to flexibly batch calibrate the user data that needs to be filled in, thereby improving the compatibility of user creation scenarios, making the system's user management function cover a wider range, greatly improving the robustness of the system, and making up for the time-consuming and labor-intensive shortcomings of single creation through the system. It can meet the needs of ordinary creation scenarios as well as the above batch creation scenarios, thereby improving the entire system's ability to manage system data and improving the versatility of the system.

[0090] like Figure 2 To more clearly illustrate the technical solution and advantages of the present invention, a method for batch creating users based on an Excel spreadsheet is described in detail below. The method may include the following steps:

[0091] Step 201: based on the business type in the business system, at least one file template is pre-created, and an association relationship is established between the file template and a database table based on the business type, and the file template is in Excel format;

[0092] Step 202: When the current user has the operation authority, a corresponding file template is selected according to different business scenarios, and the business data is aggregated to fill the file template to generate a current version of the business file, wherein the current version of the business file includes at least one newly added user information;

[0093] Specifically, two modules can be planned on the front-end user management page, one module is used to design the import function page, and the other module is used to manage the import function permission control. The import function page design is to add template download and template import buttons on the basis of the original page, and realize batch download and import through these two buttons. The import function permission control module is mainly used to control the permission on the batch import function page. This design is only open to super administrator accounts;

[0094] For example, when the super administrator user clicks the template download interface, the backend will provide different file templates according to the deployment scenario. When the main account is enabled, the template will add the main account sheet page information. The user needs to fill in the main account information corresponding to the data to be imported in the template. When the main account is closed, the main account sheet page information is not added to the template. In addition to returning the necessary template data, the template will also add the necessary data in the template, such as department list information for users to find when filling in the template data, in addition to the main account information.

[0095] Step 203: Perform data verification operation on the current version of the business file to generate a target version of the business file, wherein the data verification includes mandatory item verification, data format verification and user data related attribute verification; Step 204: Create an import log record table in the database table;

[0096] Step 205: storing the batch import records of the target version business files in Excel format into the import log record table, wherein the import log record table includes the primary key ID, the import batch ID, the import user name, the import success record, the import failure record and the failure reason record;

[0097] Step 206: Determine at least one required item in the Excel table corresponding to the current version of the business file;

[0098] Step 207: Determine whether the current business data corresponding to each required item is empty, if yes, execute step 208, otherwise, execute step 209;

[0099] Step 208: Fill in the current business data, and add a first failure record and a first failure reason in the import log record table, wherein the first failure reason is a required item and is left blank;

[0100] Step 209: Determine whether the data format of the current business data is correct, if so, execute step 210, otherwise, execute step 213;

[0101] Step 210: Determine whether the user-related attribute of the current business data is correct. If so, execute step 211; otherwise, execute step 212;

[0102] Step 211: Add a new import success record in the import log record table and end the current process; Step 212: Based on the preset user association attribute rule, modify the user association attribute of the current business data, generate a target version business file, and add a third failure record and a third failure reason in the import log record table, wherein the third failure reason is that the user association attribute of the current business data does not conform to the preset user association attribute rule;

[0103] Step 213: modify the format of the current business data based on the preset data format rule, and add a second failure record and a second failure reason in the import log record table, wherein the second failure reason is that the data format of the current business data does not conform to the preset data format rule.

[0104] Specifically, two new interfaces can be added to the backend, one for importing templates and the other for exporting templates. The interface for importing templates is used to process the user data that needs to be created when using Excel spreadsheet file templates to batch import, and finally form the new user information of the system. The interface for exporting templates is used to export Excel spreadsheets for batch supplementary data in different usage scenarios of each user unit for users to fill in the supplementary data. The interface for exporting templates also needs to add data that users need to fill in, such as the department information to which the user belongs, the main account information, etc.

[0105] like Figure 3 As shown, an embodiment of the present invention provides a device for creating users in batches based on an Excel table, the device comprising:

[0106] Creation module 301: used to pre-create at least one file template based on the business type in the business system, and establish an association relationship between the file template and a database table based on the business type, wherein the file template is in Excel format;

[0107] Data aggregation module 302: used to select a corresponding file template in the creation module according to different business scenarios, and aggregate business data to fill the file template to generate a current version of the business file, wherein the current version of the business file contains at least one newly added user information;

[0108] Data verification module 303: used to perform data verification operation on the current version of the business file summarized by the data summary module to generate a target version of the business file, wherein the data verification includes mandatory item verification, data format verification and user data related attribute verification;

[0109] The parsing module 304 is used to parse the business data in the target version business file based on the association relationship created by the creation module and the target version business file generated by the data verification module, and store the business data in the corresponding database table.

[0110] based on Figure 3 A device for creating users in batches based on an Excel spreadsheet is shown, such as Figure 4 As shown, in one embodiment of the present invention, before the data aggregation module 302, it further includes: an authority verification module 305;

[0111] The authority verification module 305 is used to determine whether the current user has the operation authority. If yes, execute step A2; otherwise, end the current process.

[0112] based on Figure 4 A device for creating users in batches based on an Excel spreadsheet is shown, such as Figure 5As shown, in one embodiment of the present invention, after the data verification module 303, it further includes: a log import module 306;

[0113] The log import module 306 is used to execute:

[0114] Create an import log record table in the database library table;

[0115] The batch import records of the target version business files in Excel format are stored in the import log record table, wherein the import log record table includes the primary key id, import batch id, import user name, import success record, import failure record and failure reason record.

[0116] like Figure 5 As shown, in one embodiment of the present invention, the data verification module 303 is also used to execute:

[0117] D1: Determine at least one required item in the Excel table corresponding to the current version of the business file;

[0118] D2: Determine whether the current business data corresponding to each required item is empty. If so, execute step D3; otherwise, execute step D4;

[0119] D3: Fill in the current business data, and add a first failure record and a first failure reason to the import log record table, wherein the first failure reason is a required item and is left blank;

[0120] D4: Determine whether the data format of the current business data is correct, if so, execute step D5, otherwise, execute step D6;

[0121] D5: Determine whether the user-related attributes of the current business data are correct. If so, execute step D7; otherwise, execute step D8.

[0122] D6: modifying the format of the current business data based on the preset data format rule, and adding a second failure record and a second failure reason to the import log record table, wherein the second failure reason is that the data format of the current business data does not conform to the preset data format rule;

[0123] D7: Add a new import success record to the import log record table and end the current process;

[0124] D8: Based on the preset user association attribute rules, modify the user association attributes of the current business data, generate a target version of the business file, and add a third failure record and a third failure reason in the import log record table, wherein the third failure reason is that the user association attributes of the current business data do not comply with the preset user association attribute rules.

[0125] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the apparatus for batch creating users based on an Excel table. In other embodiments of the present invention, the apparatus for batch creating users based on an Excel table may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0126] The information interaction, execution process and other contents between the units in the above-mentioned device are based on the same concept as the embodiment of the method of the present invention. For specific contents, please refer to the description in the embodiment of the method of the present invention, and no further description is given here.

[0127] An embodiment of the present invention further provides an electronic device, comprising: at least one memory and at least one processor;

[0128] at least one memory for storing a machine-readable program;

[0129] At least one processor is used to call a machine-readable program to execute a method for batch creating users based on an Excel spreadsheet in any embodiment of the present invention.

[0130] An embodiment of the present invention further provides a computer-readable medium on which computer instructions are stored. When the computer instructions are executed by a processor, the processor executes a method for batch creating users based on Excel tables in any embodiment of the present invention.

[0131] Specifically, a system or device equipped with a storage medium can be provided, on which software program code that implements the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device can be enabled to read and execute the program code stored in the storage medium.

[0132] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.

[0133] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.

[0134] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.

[0135] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or written to a memory provided in an expansion unit connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or the expansion unit is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.

[0136] Each embodiment of the present invention has at least the following beneficial effects:

[0137] 1. In an embodiment of the present invention, a method for batch creation of users based on an Excel table is provided. First, it is necessary to create a file template in an Excel format that is adapted to various business scenarios, so that when the user needs to download the template, the file template of the corresponding Excel table can be selected, and the business data that needs to be filled in the Excel table can be edited at the same time, so as to import the business data. In addition, in order to ensure the accuracy of each data, it is also necessary to verify the data of the newly added user information in the current version of the business file filled with the business data, including verification of required items, verification of data format and verification of user data related attributes, so as to generate a target version of the business file that meets the target requirements. Finally, based on the association relationship between the pre-created file template and the database table, the business data of the target version of the business file stored in the database can be parsed, and the newly added user information can be obtained to realize the creation of batch new users. Through the above process, there is no need to manually create a single new user, thereby improving the efficiency of user creation;

[0138] 2. In the embodiment of the present invention, the user management page will display the buttons for template import and template download only when and only when a user with operation authority (such as a super administrator) logs in to view the user management page. Other ordinary users do not have viewing authority. The front-end code can obtain the information of the current logged-in user (such as the message prompt information of the super administrator account successful login) according to the data of the initialization page. If the current logged-in user is a super administrator, the buttons on the front-end page are displayed, otherwise they are hidden;

[0139] 3. In an embodiment of the present invention, the import operation is logged, and the successful data, failed data and the reasons for the failure are returned. At the same time, the failed data is returned to the front end for display of the import failure data and the reasons for the failure on the user management page.

[0140] It should be noted that not all steps and modules in the above-mentioned processes and system structure diagrams are necessary, and some steps or modules can be ignored according to actual needs. The execution order of each step is not fixed and can be adjusted as needed. The system structure described in the above-mentioned embodiments can be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or some components in multiple independent devices may be implemented together.

[0141] In the above embodiments, the hardware unit can be realized by mechanical means or electrical means. For example, a hardware unit can include permanent dedicated circuits or logic (such as special processors, FPGA or ASIC) to complete the corresponding operation. The hardware unit can also include programmable logic or circuits (such as general-purpose processors or other programmable processors), which can be temporarily set by software to complete the corresponding operation. Concrete implementation (mechanical means or dedicated permanent circuits or temporarily set circuits) can be determined based on cost and time considerations.

[0142] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for creating users in batches based on Excel tables, characterized in that: include: A1: Based on the business type in the business system, at least one file template is created in advance, and an association relationship is established between the file template and a database table based on the business type, wherein the file template is in Excel format; A2: Select a corresponding file template according to different business scenarios, and aggregate business data to fill the file template to generate a current version of the business file, wherein the current version of the business file includes at least one newly added user information; A3: Performing data verification operation on the current version of the business file to generate a target version of the business file, wherein the data verification includes mandatory item verification, data format verification and user data related attribute verification; A4: Based on the association relationship and the target version business file, the business data in the target version business file is parsed and stored in the corresponding database table.

2. The method according to claim 1, characterized in that: Before selecting corresponding file templates according to different business scenarios, aggregating business data to fill in the file templates, and generating the current version of the business file, the method further includes: Determine whether the current user has the operation authority. If yes, execute step A2; otherwise, end the current process.

3. The method according to claim 1, characterized in that After performing the data verification operation on the current version of the business file to generate the target version of the business file, the method further includes: Create an import log record table in the database library table; The batch import records of the target version business files in Excel format are stored in the import log record table, wherein the import log record table includes the primary key id, import batch id, import user name, import success record, import failure record and failure reason record.

4. The method according to claim 3, characterized in that The performing of a data verification operation on the current version of the business file to generate a target version of the business file includes: D1: Determine at least one required item in the Excel table corresponding to the current version of the business file; D2: Determine whether the current business data corresponding to each required item is empty. If so, execute step D3; otherwise, execute step D4; D3: Fill in the current business data, and add a first failure record and a first failure reason to the import log record table, wherein the first failure reason is a required item and is left blank; D4: Determine whether the data format of the current business data is correct, if so, execute step D5, otherwise, execute step D6; D5: Determine whether the user-related attributes of the current business data are correct. If so, execute step D7; otherwise, execute step D8. D6: modifying the format of the current business data based on the preset data format rule, and adding a second failure record and a second failure reason to the import log record table, wherein the second failure reason is that the data format of the current business data does not conform to the preset data format rule; D7: Add a new import success record to the import log record table and end the current process; D8: Based on the preset user association attribute rules, modify the user association attributes of the current business data, generate a target version of the business file, and add a third failure record and a third failure reason in the import log record table, wherein the third failure reason is that the user association attributes of the current business data do not comply with the preset user association attribute rules.

5. A device for creating users in batches based on Excel tables, characterized in that: The device includes: Creation module: used to pre-create at least one file template based on the business type in the business system, and establish an association relationship between the file template and a database table based on the business type, wherein the file template is in Excel format; Data aggregation module: used to select corresponding file templates in the creation module according to different business scenarios, and aggregate business data to fill the file templates to generate a current version of the business file, wherein the current version of the business file contains at least one newly added user information; Data verification module: used to perform data verification operation on the current version of the business file summarized by the data summary module to generate a target version of the business file, wherein the data verification includes mandatory item verification, data format verification and user data related attribute verification; Parsing module: used for parsing the business data in the target version business file based on the association relationship created by the creation module and the target version business file generated by the data verification module, and storing the business data in the corresponding database table.

6. The device according to claim 5, characterized in that Before the data aggregation module, it further includes: an authority verification module; The permission verification module is used to determine whether the current user has the operation permission. If yes, execute step A2; otherwise, end the current process.

7. The device according to claim 5, characterized in that After the data verification module, it further includes: a log import module; The log import module is used to execute: Create an import log record table in the database library table; The batch import records of the target version business files in Excel format are stored in the import log record table, wherein the import log record table includes the primary key id, import batch id, import user name, import success record, import failure record and failure reason record.

8. The device according to claim 7, characterized in that The data verification module is further used to execute: D1: Determine at least one required item in the Excel table corresponding to the current version of the business file; D2: Determine whether the current business data corresponding to each required item is empty. If so, execute step D3; otherwise, execute step D4; D3: Fill in the current business data, and add a first failure record and a first failure reason to the import log record table, wherein the first failure reason is a required item and is left blank; D4: Determine whether the data format of the current business data is correct, if so, execute step D5, otherwise, execute step D6; D5: Determine whether the user-related attributes of the current business data are correct. If so, execute step D7; otherwise, execute step D8. D6: modifying the format of the current business data based on the preset data format rule, and adding a second failure record and a second failure reason to the import log record table, wherein the second failure reason is that the data format of the current business data does not conform to the preset data format rule; D7: Add a new import success record to the import log record table and end the current process; D8: Based on the preset user association attribute rules, modify the user association attributes of the current business data, generate a target version of the business file, and add a third failure record and a third failure reason in the import log record table, wherein the third failure reason is that the user association attributes of the current business data do not comply with the preset user association attribute rules.

9. An electronic device, characterized in that include: at least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is configured to call the machine-readable program to execute the method according to any one of claims 1 to 4.

10. A computer readable medium, characterized in that The computer readable medium stores computer instructions, which, when executed by a processor, cause the processor to perform any one of the methods of claims 1 to 4.

Citation Information

Patent Citations

  • Method and device for importing management database in batches based on excel

    CN106503222A

  • Message processing method and device, computer device and storage medium

    CN109325030A

  • Method and system for importing excel files in batches in domestic environment

    CN114356864A

  • Data importing method and device, equipment and storage medium

    CN115617780A

  • Excel document import processing method under multiple templates and plug-in

    CN116595077A

Cited By

  • Batch data importing method and device supporting offline and online data correction

    CN121255823A