Disclosure of Invention
In view of the above, it is necessary to provide an ERP database recording method, an ERP database recording apparatus, a computer device, and a storage medium, for solving the above problems of low work efficiency and no permission of outgoing of confidential messages.
An ERP database recording method, the method comprising:
when detecting that the ERP database is modified through the database script, judging whether a database recording function is started or not;
when the database recording function is started, corresponding database scripts for modifying the database are sequentially inserted into a pre-generated script table;
and acquiring the operation of closing the database recording function, generating a script file from the database script in the script table, and storing the script file in an appointed directory.
In one embodiment, before the detecting of the modification of the ERP database by the database script, the method further includes:
acquiring the attribute of a database recording function mark added in ERP software;
and displaying a database recording function mark in an interface of the ERP software according to the attribute.
In one embodiment, the default attribute of the database record function flag is an off state; before the detecting that the ERP database is modified through the database script, the method further includes:
acquiring a starting instruction of the database recording function mark;
and changing the attribute of the database recording function mark into an opening state according to the opening instruction.
In one embodiment, the determining whether the database recording function is turned on includes:
and judging the attribute of the database recording function mark, wherein when the attribute is in an open state, the database recording function is opened, and when the attribute is in a closed state, the database recording function is closed.
In one embodiment, when the database recording function is started, sequentially inserting the corresponding database scripts for modifying the database into a pre-generated script table, including:
acquiring the sequence of modifying the database;
and sequentially inserting the database scripts into a pre-generated script table according to the sequence.
In one embodiment, the obtaining an operation of closing a database recording function, generating a script file from a database script in the script table, and storing the script file in a designated directory includes:
acquiring a closing instruction of the database recording function mark;
and generating a script file from the database script in the script table according to the closing instruction, and storing the script file in an appointed directory.
An ERP database recording apparatus, the apparatus comprising:
the function judging module is used for judging whether a database recording function is started or not when the ERP database is detected to be modified through the database script;
the script insertion module is used for sequentially inserting the corresponding database scripts of the modified database into a pre-generated script table when the database recording function is started;
and the file generation module is used for acquiring the operation of closing the database recording function, generating a script file from the database script in the script table, and storing the script file in the specified directory.
In one embodiment, the apparatus further comprises:
the attribute acquisition module is used for acquiring the attribute of a database recording function mark added in the ERP software;
and the mark adding module is used for displaying a database recording function mark in the interface of the ERP software according to the attribute.
A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method as described above when executing the computer program.
A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method as set forth above.
According to the ERP database recording method, the ERP database recording device, the computer equipment and the storage medium, when the ERP database is modified through the database script, whether the database recording function is started or not is judged, when the database recording function is started, the corresponding database scripts for modifying the database are sequentially inserted into the pre-generated script table, the operation of closing the database recording function is obtained, the database scripts in the script table are generated into script files, and the script files are stored in the designated directory. Because the ERP database is detected to be modified, after the recording function of the database is started, the corresponding database script of the modified database is inserted into the script table and the script file is generated, so that a huge database does not need to be backed up, more time can be saved, and the working efficiency is improved; in addition, only the corresponding database script of the modified database is inserted into the script table and the script file is generated, and only the database script needs to be transmitted, so that the confidential information is protected.
Detailed Description
In order to make the objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein, but rather should be construed as broadly as the present invention is capable of modification in various respects, all without departing from the spirit and scope of the present invention.
Fig. 1 is an internal structural diagram of an execution terminal that implements the ERP database recording method in one embodiment. As shown in fig. 1, the terminal includes a processor, a storage medium, a display, a memory, a network interface, and an input device, which are connected through a system bus. The storage medium of the terminal comprises an operating system, a database and a computer program, wherein the computer program is used for realizing an ERP database recording device. The processor is used for providing calculation and control capability and supporting the operation of the whole terminal. The memory of the terminal provides an environment for running a computer program in a storage medium for implementing the ERP database recording device, and the memory may store computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor may be caused to execute an ERP database recording method. The network interface of the terminal is used for carrying out network communication with the server. The display of the terminal is used for displaying an application interface, such as an interface for displaying a database recording function mark; the input device may be a touch layer covered on the display, or an external keyboard, a touch pad, a mouse, or the like. The terminal may be, but is not limited to, a notebook computer, a desktop computer, a personal digital computer, a portable laptop computer, etc. It will be appreciated by those skilled in the art that the configuration shown in fig. 1 is a block diagram of only a portion of the configuration associated with the inventive arrangements and does not constitute a limitation of the terminal to which the inventive arrangements are applied, and that a particular terminal may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
As shown in fig. 2, in an embodiment, an ERP database recording method is provided, which is exemplified by being applied to a terminal in the application environment, and includes the following steps:
step S202, when detecting that the ERP database is modified through the database script, judging whether a database recording function is started.
The database script is a piece of code which can be compiled, interpreted and executed in a database management system and can complete a specific task. Tasks that can be accomplished include the creation of database objects, querying, modification of data, and the like.
Specifically, when the ERP software is used, an operation of modifying the database may be involved, for example, a new document is added, some data is filled in the document, and then the data is stored. When this operation is saved, a modification of the database by the database script may be detected.
Specifically, when the database recording function is specifically displayed on the interface, the database recording function is a database recording function mark, and the mark has an attribute in the underlying code. When the database is modified, whether the recording function of the database is opened or not can be known through judging the attributes in the bottom layer code.
And step S204, when the database recording function is started, sequentially inserting the corresponding database scripts for modifying the database into a pre-generated script table.
Specifically, when the attribute is judged to indicate that the database recording function is in an open state, the corresponding database script for modifying the database is inserted into the script table. The script table is generated in the database in advance and used for recording the database script.
Step S206, the operation of closing the database recording function is obtained, the database script in the script table is generated into a script file, and the script file is stored in the designated directory.
Wherein the script file is similar to a batch file in a DOS operating system, and can combine different commands and automatically and continuously execute the commands according to a determined sequence.
Specifically, the operation of closing the database recording function is obtained through the interface of the database recording function mark, and the database script is recorded in the script table, and the script file can combine different commands, so that the database script can be combined to generate the script file. And storing the script file in a specified directory for executing the script file.
When the database script is detected to modify the ERP database, whether the database recording function is started is judged, when the database recording function is started, corresponding database scripts for modifying the database are sequentially inserted into a pre-generated script table, the operation of closing the database recording function is obtained, the database scripts in the script table are generated into script files, and the script files are stored in a designated directory. Because the ERP database is detected to be modified, after the recording function of the database is started, the corresponding database script of the modified database is inserted into the script table and the script file is generated, so that a huge database does not need to be backed up, more time can be saved, and the working efficiency is improved; in addition, only the corresponding database script of the modified database is inserted into the script table and the script file is generated, and only the database script needs to be transmitted, so that the confidential information is protected.
As shown in fig. 3, in an embodiment, the provided ERP database recording method further includes a process of adding a database recording function flag, where the specific process includes:
step S302, obtaining the attribute of the database record function mark added in the ERP software.
Specifically, adding a database record function mark in the ERP software is to add an attribute, such as isstartrordboperation, to a code for submitting a script instruction to a database.
And step S304, displaying a database record function mark in an interface of the ERP software according to the attributes.
Specifically, the database recording function mark is displayed on the interface according to the attribute of the added database recording function mark. This flag may be a specific button or may be a radio box.
As shown in fig. 4, in an embodiment, the provided ERP database recording method further includes a process of opening a database recording function flag, which specifically includes:
step S402, obtaining the opening instruction of the database record function mark.
Specifically, the terminal may obtain the opening instruction for the database recording function flag through the interface of the database recording function flag. The terminal can obtain the instruction by a button or a radio box.
Step S404, the attribute of the database record function mark is changed into an open state according to the open instruction.
Specifically, the attribute of the database recording function mark is defaulted to a closed state, and after the terminal acquires the opening instruction, the attribute of the database recording function mark is changed, that is, the attribute of the database recording function mark is changed into an open state.
In one embodiment, as shown in FIG. 5, FIG. 5 is an interface diagram showing the database record function flag. Specifically, the interface diagram of fig. 5 shows the labels of the database record function. As shown in FIG. 5, the flag for the database logging function is "begin logging database operations," indicating that the default attribute of this flag is that the database logging function is in an off state. When the terminal acquires the button for "start recording database operation" clicked through the interface, the button on the interface becomes "end recording database operation". For example, a button "start recording database operation" is added, the attribute of isstartrocorddboperation defaults to off state, the attribute of isstartrocorddboperation is on state after clicking the button, and the button text becomes "end recording database operation". If this button is clicked again, IsStartRecordDBOperation is in the OFF state and the text changes back to "begin recording database operations". Specifically, the mark of the database recording function on the interface may be a button or a radio box. The mode of the radio box is that the 'start recording database operation' or 'end recording database operation' is clicked on the interface.
In one embodiment, the provided ERP database recording method further includes a process of determining whether a database recording function is started, specifically including:
and judging the attribute of the database recording function mark, wherein when the attribute is in an open state, the database recording function is opened, and when the attribute is in a closed state, the database recording function is closed.
Specifically, continuing to take the attribute isstartrecord dboperation as an example, when the attribute is in an on state, that is, the attribute isstartrecord dboperation is in an on state, it indicates that the database recording function is already on, and at this time, the button text displayed on the interface is "end to record the database operation"; when the attribute is in the off state, indicating that the database recording function is off, that is, isstartrecord dboperation is in the off state, the button displayed on the interface is "start recording database operation".
In one embodiment, the provided ERP database recording method further includes a process of sequentially inserting corresponding database scripts for modifying the database into a pre-generated script table, including:
and acquiring the sequence of modifying the database, and sequentially inserting the database scripts into a pre-generated script table according to the sequence.
Specifically, there is an order in which modifications are made to the database. For example, in the process of using ERP software, a document is added and stored, data in the document is changed and stored again, and in the stored code, a database script is generated, and the script is submitted to the database for execution and inserted into the script table according to the stored sequence.
As shown in fig. 6, in an embodiment, the provided ERP database recording method further includes a process of generating a script file, which specifically includes:
step S602, a close instruction for the database recording function flag is acquired.
Specifically, the terminal may obtain a closing instruction for the database recording function flag through the interface of the database recording function flag. The terminal can obtain the closing instruction through the button and can also obtain the closing instruction through a radio box on the interface.
And step S604, generating a script file from the database script in the script table according to the closing instruction, and storing the script file in the specified directory.
Specifically, the database scripts are recorded in the script table, and the script files can combine different commands, so that the database scripts can be combined to generate the script files. And storing the script file in a specified directory for executing the script file.
In one embodiment, an ERP database recording method is provided, and the specific steps for implementing the method are as follows:
firstly, the attribute of a database record function mark added in ERP software is obtained. Specifically, adding a database record function mark in the ERP software is to add an attribute, such as isstartrordboperation, to a code for submitting a script instruction to a database.
And secondly, displaying a database record function mark in an interface of the ERP software according to the attributes. Specifically, the database recording function mark is displayed on the interface according to the attribute of the added database recording function mark. This flag may be a specific button or may be a radio box.
Then, a turn-on instruction for the database record function flag is acquired. Specifically, the terminal may obtain the opening instruction for the database recording function flag through the interface of the database recording function flag. The terminal can obtain the instruction by a button or a radio box.
Specifically, the attribute of the database recording function mark is changed into an open state according to the open instruction. And the attribute of the database recording function mark is defaulted to be in a closed state, and after the terminal acquires the opening instruction, the attribute of the database recording function mark is changed, namely the attribute of the database recording function mark is changed into an open state.
Further, when the ERP database is detected to be modified through the database script, whether the database recording function is started or not is judged. When the ERP software is used, operations for modifying the database are involved, for example, a new document is added, some data is filled in the document, and then the data is stored. When this operation is saved, a modification of the database by the database script may be detected.
Further, whether a database recording function is started or not is judged, and the method specifically comprises the following steps:
and judging the attribute of the database recording function mark, wherein when the attribute is in an open state, the database recording function is opened, and when the attribute is in a closed state, the database recording function is closed. Specifically, continuing to take the attribute isstartrecord dboperation as an example, when the attribute is in an on state, that is, the attribute isstartrecord dboperation is in an on state, it indicates that the database recording function is already on, and at this time, the button text displayed on the interface is "end to record the database operation"; when the attribute is in the off state, indicating that the database recording function is off, that is, isstartrecord dboperation is in the off state, the button displayed on the interface is "start recording database operation".
Specifically, when the database recording function is started, the corresponding database scripts for modifying the database are sequentially inserted into the pre-generated script table, and the method specifically includes the following steps:
and acquiring the sequence of modifying the database, and sequentially inserting the database scripts into a pre-generated script table according to the sequence. There is an order in which modifications are made to the database. For example, in the process of using ERP software, a document is added and stored, data in the document is changed and stored again, and in the stored code, a database script is generated, and the script is submitted to the database for execution and inserted into the script table according to the stored sequence.
The method comprises the following steps of obtaining the operation of closing the database recording function, generating a script file from a database script in a script table, and storing the script file under an appointed directory, and specifically comprises the following steps:
and acquiring a closing instruction of the database record function mark. Specifically, the terminal may obtain a closing instruction for the database recording function flag through the interface of the database recording function flag. The terminal can obtain the closing instruction through the button and can also obtain the closing instruction through a radio box on the interface.
And generating a script file from the database script in the script table according to the closing instruction, and storing the script file in the specified directory. Specifically, the database scripts are recorded in the script table, and the script files can combine different commands, so that the database scripts can be combined to generate the script files. And storing the script file in a specified directory for executing the script file.
As shown in fig. 7, in one embodiment, there is provided an ERP database recording apparatus including:
thefunction determining module 710 is configured to determine whether a database recording function is turned on when it is detected that the ERP database is modified by the database script.
And thescript insertion module 720 is configured to sequentially insert the corresponding database scripts for modifying the database into a pre-generated script table when the database recording function is started.
Thefile generating module 730 is configured to obtain an operation of closing a database recording function, generate a script file from a database script in the script table, and store the script file in an appointed directory.
As shown in fig. 8, in one embodiment, an ERP database recording apparatus further includes:
theattribute obtaining module 740 is configured to obtain an attribute of a database record function flag added in the ERP software.
And amark adding module 750, configured to display a database record function mark in an interface of the ERP software according to the attribute.
As shown in fig. 9, in an embodiment, the default attribute of the database recording function flag is a closed state, and an ERP database recording apparatus further includes:
the firstinstruction obtaining module 760 is configured to obtain an opening instruction for the database record function flag.
Anattribute changing module 770, configured to change the attribute of the database recording function flag to an open state according to the open instruction.
As shown in fig. 10, in one embodiment, thefunction determination module 710 includes:
theattribute determining module 712 is configured to determine an attribute of the database recording function flag, where the database recording function is turned on when the attribute is in an on state, and the database recording function is turned off when the attribute is in an off state.
As shown in FIG. 11, in one embodiment,script insertion module 720 includes:
anorder obtaining module 722, configured to obtain an order of modifying the database.
And the insertingmodule 724 is used for sequentially inserting the database scripts into the pre-generated script table according to the sequence.
As shown in FIG. 12, in one embodiment, thefile generation module 730 includes:
the secondinstruction obtaining module 732 is configured to obtain a closing instruction for the database record function flag.
Thefile storage module 734 is configured to generate a script file from the database script in the script table according to the close instruction, and store the script file in the designated directory.
In one embodiment, a computer-readable storage medium is further provided, which stores a computer program that, when executed by a processor, implements the steps of the ERP database recording method in the above embodiments.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.