CN117669528A - Document generation method, device, computer equipment and storage medium - Google Patents

Document generation method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN117669528A
CN117669528A CN202311780078.5A CN202311780078A CN117669528A CN 117669528 A CN117669528 A CN 117669528A CN 202311780078 A CN202311780078 A CN 202311780078A CN 117669528 A CN117669528 A CN 117669528A
Authority
CN
China
Prior art keywords
bill
field
document
data
initial
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311780078.5A
Other languages
Chinese (zh)
Inventor
王建彪
段秀伟
杨俊杰
崔轶
王怀帅
叶俊宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China 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 Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN202311780078.5A priority Critical patent/CN117669528A/en
Publication of CN117669528A publication Critical patent/CN117669528A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

The application relates to a document generation method, a document generation device, computer equipment and a storage medium. The method comprises the following steps: determining an initial bill under a target service, and determining a plurality of bill fields of data to be recorded in the initial bill; responding to a data input request sent by a terminal, and acquiring interface input data obtained through a bill input interface of the terminal; determining an input field value corresponding to each document field from the interface input data based on attribute mapping relations corresponding to a plurality of document fields; and responding to an input confirmation request sent by the terminal, and generating a target bill based on the initial bill and input field values corresponding to the bill fields. By adopting the method, the bill generation efficiency can be improved.

Description

Document generation method, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of data processing technology, and in particular, to a document generation method, apparatus, computer device, storage medium, and computer program product.
Background
With the popularization of applications of mobile terminals, a technology of performing data entry through the mobile terminal, thereby generating a document according to the entered data has emerged. For example, operators in warehouses, workshops can scan bar codes via mobile terminals to effect data entry.
In the traditional method, fields needing to be recorded in a bill are manually selected one by one, and then data recording is carried out on the selected fields. However, the document usually contains multiple fields or multiple lines of document data, and the method for performing data entry by adopting the conventional technology is complex in operation and long in time consumption, so that the document generation efficiency is low.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a document generating method, apparatus, computer device, computer-readable storage medium, and computer program product that can improve the document generating efficiency.
In a first aspect, the present application provides a document generation method. The method comprises the following steps: determining an initial bill under a target service, and determining a plurality of bill fields of data to be input in the initial bill; responding to a data input request sent by a terminal, and acquiring interface input data obtained through a bill input interface of the terminal; determining an input field value corresponding to each document field from the interface input data based on attribute mapping relations corresponding to the document fields; and responding to an input confirmation request sent by the terminal, and generating a target bill based on the initial bill and input field values corresponding to the bill fields.
In a second aspect, the present application further provides a document generating apparatus. The device comprises: the initial bill determining module is used for determining an initial bill under a target service and determining a plurality of bill fields of data to be recorded in the initial bill; the input data acquisition module is used for responding to a data input request sent by a terminal and acquiring interface input data obtained through a bill input interface of the terminal; the data matching module is used for determining the input field value corresponding to each document field from the interface input data based on the attribute mapping relation corresponding to the document fields; and the bill generation module is used for responding to the input confirmation request sent by the terminal and generating a target bill based on the initial bill and input field values corresponding to the bill fields.
In some embodiments, the plurality of document fields includes at least one matching field; the initial bill comprises at least one row of initial bill data; the document generation module is further configured to: determining matching bill data matched with the interface input data from the initial bill based on input field values corresponding to the matching fields; the initial field value corresponding to the matching field in the matching document data is consistent with the input field value; and updating an initial field value corresponding to each bill field in the matched bill data according to an input field value corresponding to each bill field, and generating the target bill.
In some embodiments, the matching document data is in a plurality of rows; the plurality of bill fields comprise a control quantity field; the document generation module is further configured to: splitting the input quantity corresponding to the control quantity field according to the initial quantity corresponding to the control quantity field in each piece of matched bill data to obtain the matched quantity corresponding to each piece of matched bill data; determining a bill field except the control quantity field and the matching field in the bill fields as a target field; and updating the matched bill data by utilizing the matched quantity corresponding to the matched bill data and the input field value corresponding to each target field aiming at each matched bill data to generate the target bill.
In some embodiments, after determining the initial document under the target service, the document generating device further includes a document copying module, where the document copying module is configured to: copying the initial bill to obtain a reference bill; the document generation module is further configured to: for each matched bill data, obtaining copy bill data corresponding to the matched bill data from the reference bill; updating the copied bill data by utilizing the matching quantity corresponding to the matched bill data and the input field value corresponding to each target field to obtain target bill data; and generating the target bill based on the target bill data.
In some embodiments, the data entry module is further to: determining attribute mapping relations corresponding to the plurality of bill fields according to the bill types of the initial bill; determining attribute identifiers corresponding to the bill fields from the attribute mapping relation; and searching the attribute value of the attribute identifier corresponding to the document field in the interface input data aiming at each document field to obtain an input field value corresponding to the document field.
In some embodiments, the initial document determination module is further to: acquiring at least one business document selected by a document display interface displayed by the terminal; determining a bill conversion rule corresponding to each business bill; and carrying out bill conversion on each business bill according to the bill conversion rule to generate the initial bill.
In some embodiments, the document conversion rule includes a document type mapping relationship and a field mapping relationship; the initial document determination module is further configured to: determining a target bill type associated with the bill type of the business bill according to the bill type mapping relation; acquiring a bill template corresponding to the target bill type; and determining an initial field value corresponding to each template field in the bill template according to the field mapping relation and the field value of each service bill field in the service bill, and generating the initial bill.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the steps of the document generation method described above when the processor executes the computer program.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the document generation method described above.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of the document generation method described above.
According to the bill generation method, the device, the computer equipment, the storage medium and the computer program product, the plurality of bill fields of data to be input in an initial bill are determined, the interface input data obtained through the bill input interface of the terminal is obtained in response to the data input request sent by the terminal, the input field value corresponding to each bill field is determined from the interface input data based on the attribute mapping relation corresponding to the plurality of bill fields, so that an operator only needs to simply scan and input the data when using the terminal, does not need to manually select the bill fields one by one, and can submit confirmation through the automatic assignment of the system to each bill field, and accordingly, in response to the input confirmation request sent by the terminal, the target bill is automatically generated based on the input field values corresponding to the initial bill and each bill field, and the bill generation efficiency is improved.
Drawings
FIG. 1 is an application environment diagram of a document generation method in one embodiment;
FIG. 2 is a flow diagram of a document generation method in one embodiment;
FIG. 3 is a schematic diagram of a process for automatic assignment of fields in one embodiment;
FIG. 4 is a schematic diagram of a process for establishing an attribute mapping relationship in one embodiment;
FIG. 5 is a schematic diagram of a process for determining matching document data in one embodiment;
FIG. 6 is a schematic diagram of a process for generating target document data in one embodiment;
FIG. 7 is a schematic diagram of an overall flow of data entry and document generation in one embodiment;
FIG. 8 is a block diagram of a document generation device in one embodiment;
FIG. 9 is an internal block diagram of a computer device in one embodiment;
fig. 10 is an internal structural view of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The bill generation method provided by the embodiment of the application can be applied to an application environment shown in fig. 1. The application environment comprises a terminal 102 and a server 104, wherein the terminal 102 can be a handheld intelligent terminal used by staff of a warehouse or a workshop; the server 104 may be a backend server of an enterprise, wherein the terminal 102 communicates with the server 104 over a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server.
The terminal 102 may be, but not limited to, various industries PDA (Personal Digital Assistant), smart phones, tablet computers, and industrial PDAs, and is mainly applied to industrial fields such as logistics express, production and manufacturing, store retail, etc. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
Those skilled in the art will appreciate that the application environment shown in fig. 1 is only a partial scenario related to the present application scenario, and does not constitute a limitation on the application environment of the present application scenario.
In some embodiments, as shown in fig. 2, a document generation method is provided, which may be executed by a terminal or a server, or may be executed by the terminal and the server together, where the method is applied to the server 104 in fig. 1, and is described by taking as an example, the following steps:
step 202, determining an initial bill under a target service, and determining a plurality of bill fields of data to be recorded in the initial bill.
The business processes of the enterprise generally include upstream business and downstream business, for example, in the business processes of purchase reservation, purchase receiving and purchase warehousing, the purchase reservation is the upstream business of purchase receiving and the purchase warehousing is the downstream business of purchase receiving. The business documents under different businesses are different, so that an upstream-downstream relationship is also generally existed between the business documents, including an upstream document and a downstream document, the upstream document can also be called a source document, the downstream document can also be called a target document, for example, the upstream document of a purchase order is a purchase order, namely the source document, and the purchase order is a downstream document of the purchase order, namely the target document. It can be understood that the target service refers to a downstream service of a certain service, and then the initial document is a service document with a data gap under the target service. The initial receipt comprises a plurality of receipt fields of data to be recorded, wherein the field value of the receipt fields can be null or updated, and the initial receipt can be also called an initial target receipt.
Specifically, the terminal enters a bill display interface, and displays a plurality of service bill identifications under an upstream service corresponding to a target service on the bill display interface. And the terminal responds to the selection operation aiming at least one service bill identifier and sends an initial bill generation request carrying each service bill identifier to the server. The server receives the initial bill generation request, acquires the business bill and bill conversion rule corresponding to each business bill identifier, converts the business bill according to the bill conversion rule, generates the initial bill under the target business, and caches the initial bill for subsequent use. For example, the document presentation interface presents identifications of a plurality of purchase orders, and the server generates a corresponding initial purchase receipt based on the selected purchase order. The bill conversion rule is preset, and the process of converting the upstream bill by using the bill conversion rule can also be called bill pushing.
In some embodiments, the server stores interface model configuration of the terminal, and multiple document fields of data to be recorded in the initial document can be determined according to the interface model configuration, and field identifiers corresponding to the initial document and the document fields are returned to the terminal. The terminal receives the initial bill and each bill field, enters the bill input interface, and displays the field identification corresponding to each bill field in the bill input interface. The interface model configuration defines a source list, a target list, a bill conversion rule and a target list input configuration corresponding to the target service, for example, as shown in the following table 1, a bill header configuration table of the interface model configuration is shown:
Table 1 bill header configuration table for interface model configuration
As shown in the following table 2, a configuration table of the target form input configuration is shown, and a document field with a value of 1 in a "visible" field is a document field of data to be input.
Table 2 configuration table of target list entry configuration
In some embodiments, in the case that the generated downstream document needs to be updated or verified, the terminal may further display a plurality of downstream document identifications under the target service through the document display interface, and respond to a selection operation for any one of the plurality of downstream document identifications, and send an initial document acquisition request carrying the downstream document identification to the server. The server receives an initial receipt acquisition request and acquires a downstream receipt corresponding to the selected downstream receipt identifier as an initial receipt.
And step 204, responding to a data input request sent by the terminal, and acquiring interface input data obtained through a bill input interface of the terminal.
The document input interface is an operation interface for the terminal to input data to the initial document, field identifiers corresponding to a plurality of document fields of the data to be input in the initial document are displayed in the interface, and field values corresponding to the document fields are null. The document entry interface also displays a scan code entry button, and the interface entry data is acquired through the document entry interface, which may be, for example, through a scan code. The interface input data comprises a plurality of attribute identifiers and attribute values corresponding to the attribute identifiers. For example, the interface entry data includes the following data:
"alias": "inventory organization",
"fieldType":"BaseDataType",
"key":"entryinvorg",
"purpose":"c",
"value":{
"id":"d100000",
"name": "xx organization";
the attribute is identified as an "inventory organization", and the attribute values corresponding to the "inventory organization" include "id": "d100000", "name": "xx organization".
Specifically, the terminal responds to data input operation triggered by a code scanning input button of a document input interface, starts a code scanning input function, acquires a bar code image acquired by a camera, and sends a bar code identification request carrying the bar code image to a server. The server receives a bar code identification request sent by the terminal, and identifies and analyzes the bar code or the two-dimensional code in the bar code image to obtain interface input data.
Step 206, determining the input field value corresponding to each document field from the interface input data based on the attribute mapping relation corresponding to the document fields.
The attribute mapping relationship is a mapping relationship between a field identifier of a preset document field and an attribute identifier, namely a mapping relationship between a form and an attribute.
Specifically, the server determines an attribute mapping relation corresponding to each document field, determines an attribute identifier corresponding to each document field from the attribute mapping relation, and searches attribute values of the attribute identifiers corresponding to the document fields in the interface input data for each document field to obtain input field values corresponding to the document fields.
In some embodiments, the server may return the entry value corresponding to each document field to the terminal, and the interface control of the terminal automatically fills the field value of each field identifier displayed in the document entry interface. For example, as shown in fig. 3, a schematic diagram of a process of automatic field assignment is shown, a document input interface of a terminal is used for scanning or inputting codes, so that a server analyzes a scanning result and obtains an attribute mapping relation, then the server determines input field values corresponding to each document field according to the attribute mapping relation, and the obtained general analysis result and the obtained individual analysis result are returned to the terminal. And the terminal performs assignment on the bill input interface according to the universal analysis result and the individual analysis result and the field identification, so that the field identification and the input field value of each bill field are displayed on the bill input interface.
In some embodiments, the process of establishing the attribute mapping relationship is as shown in fig. 4, firstly, defining an input rule, and defining a rule type, an effective date and an expiration date of the input rule; then, inputting attribute definition, namely defining an attribute name, an attribute type and a separator, wherein the attribute name is an attribute identifier, and the attribute type comprises at least one of text, numbers, basic data, auxiliary attributes and the like; and finally, defining an attribute mapping relation, namely defining an attribute name, a form identifier and a form field, wherein the form identifier is a bill identifier, and the form field is a field identifier of the bill field, so that a relation table between the attribute identifier and the bill field is established, and the attribute mapping relation is obtained.
And step 208, responding to an input confirmation request sent by the terminal, and generating a target bill based on the initial bill and input field values corresponding to the bill fields.
The target bill is a downstream bill under the target service generated based on the data input at the time.
Specifically, the terminal responds to an input confirmation operation triggered by the bill input interface, and sends an input confirmation request to the server. And the server responds to an input confirmation request sent by the terminal, and under the condition that the initial bill only comprises one line of initial bill data, the initial bill data in the initial bill is updated based on input field values corresponding to all bill fields, so that a target bill is generated. The initial bill data refers to one line of data in the initial bill, which can be understood as one line of data in a table, and also can be referred to as a bill entry line, and is used for storing detail service data, and one service bill generally has multiple lines of bill data, for example, a purchase order includes information such as multiple materials, quantity, metering units and the like of the current purchase.
In some embodiments, in the case that multiple lines of initial document data are included in the initial document, the server first needs to determine at least one matching document data matched with the interface input data from the multiple lines of initial document data, then splits the input number corresponding to the control number field in each document field, and updates each matching document data based on the split result and the input field value corresponding to each document field, so as to generate the target document.
According to the bill generation method, the plurality of bill fields of the data to be recorded in the initial bill are determined, the interface recording data obtained through the bill recording interface of the terminal is obtained in response to the data recording request sent by the terminal, the recording field values corresponding to the bill fields are determined from the interface recording data based on the attribute mapping relation corresponding to the plurality of bill fields, so that an operator can automatically assign a value to each bill field through a system without manually selecting the bill fields one by one when using the terminal to record the data, confirmation can be submitted, and accordingly, in response to the recording confirmation request sent by the terminal, a target bill is automatically generated based on the initial bill and the recording field values corresponding to the bill fields, and bill generation efficiency is improved.
In some embodiments, the plurality of document fields includes at least one matching field; before responding to the input confirmation request sent by the terminal and generating the target bill based on the initial bill and the field value corresponding to each bill field, the bill generation method further comprises the following steps: for each matching field, determining an initial field value corresponding to the matching field from the initial document; and determining that the interface entry data is invalid under the condition that the initial field value corresponding to the matching field is inconsistent with the entry field value corresponding to the matching field.
The matching field is a field for performing matching verification on the interface input data, and is preset through interface model configuration, for example, if the bill type of the initial bill is an inventory bill, the matching field can be three bill fields of a supplier, a material type and an auxiliary attribute.
Specifically, for each matching field, the server may determine an initial field value corresponding to the matching field from the initial document, and determine an entry field value corresponding to the matching field from the entry field values corresponding to the document fields. Under the condition that the initial field value corresponding to the matching field is consistent with the input field value corresponding to the matching field, the server determines that the interface input data is valid, and if the matching check is passed, other steps of bill generation can be continued; and under the condition that the initial field value corresponding to the matching field is inconsistent with the input field value corresponding to the matching field, the server determines that the interface input data is invalid, generates invalid prompt information and returns the invalid prompt information to the terminal. This process can be understood as a preliminary matching check of the interface entry data.
In some embodiments, in the case that the initial document includes multiple lines of initial document data, for each line of initial document data, the server may perform the matching verification according to the step of preliminary matching verification described above, and if the initial field value corresponding to the matching field in each line of initial document data is inconsistent with the input field value corresponding to the matching field, the server determines that the interface input data is invalid.
In the embodiment, the validity of the interface input data is automatically verified based on the initial bill by presetting the matching field, so that the condition of data misrecording is reduced, and the accuracy of bill generation is improved.
In some embodiments, the plurality of document fields includes at least one matching field; the initial bill comprises at least one row of initial bill data; responding to the input confirmation operation triggered by the bill input interface, generating a target bill based on the initial bill and input field values corresponding to the bill fields, comprising: determining matching bill data matched with the interface input data from the initial bill based on the input field values corresponding to the matching fields; the initial field value corresponding to the matching field in the matching document data is consistent with the input field value; and updating the initial field value corresponding to each bill field in the matched bill data according to the input field value corresponding to each bill field, and generating the target bill.
In particular, where multiple lines of initial document data are included in the initial document, the matching field may also be used to determine matching document data that matches the interface entry data. The input confirmation request carries the initial bill and input field values corresponding to the bill fields, the server responds to the input confirmation request sent by the terminal, at least one row of matched bill data matched with the interface input data can be determined from the initial bill data in the initial bill according to the input field values corresponding to the matched fields, and then the matched bill data is updated by utilizing the input field values corresponding to the bill fields except the matched fields to generate the target bill.
For example, as shown in fig. 5, a schematic process of determining matching document data is shown, where an initial document, that is, an initial target document, includes 3 rows of entry rows, and in the entry field value corresponding to each document field, that is, in the target document entry, the entry field value corresponding to the matching field 1 is "a", and the entry field value corresponding to the matching field 2 is "001", so that entry 1 and entry 2 in the initial target document can be determined as matching document data.
In the embodiment, by utilizing the matching field, the matching document data matched with the interface input data can be automatically determined from the initial document, namely, the automatic matching of the document entry row is realized, manual selection by an operator is not needed, and the document generation efficiency is improved.
In some embodiments, the matching document data is in multiple rows; the plurality of bill fields comprise a control quantity field; updating an initial field value corresponding to each document field in matching document data according to an input field value corresponding to each document field, and generating a target document, wherein the method comprises the following steps: splitting the input quantity corresponding to the control quantity field according to the initial quantity corresponding to the control quantity field in each piece of matched bill data to obtain the matched quantity corresponding to each piece of matched bill data; determining bill fields except a control number field and a matching field in a plurality of bill fields as target fields; and updating the matched bill data by utilizing the matching quantity corresponding to the matched bill data and the input field value corresponding to each target field aiming at each matched bill data to generate the target bill.
Wherein the control quantity field is a field for quantity allocation among the plurality of document fields.
Specifically, when the number of entries corresponding to the control number field is greater than the initial number of entries corresponding to the control number field in any matching document data, the server splits the number of entries corresponding to the control number field according to the initial number of entries corresponding to the control number field in each matching document data to obtain the matching number corresponding to each matching document data, for example, assuming that the initial number of entries corresponding to the control number field in the matching document data 1 and the matching document data 2 is 30 and 40 respectively, and the number of entries corresponding to the control number field is 70, the server may split 70 into 30 and 40. And then, for each matched bill data, the server updates the matched bill data by using the matched quantity corresponding to the matched bill data and the input field value corresponding to each target field to generate the target bill.
In some embodiments, if the number of entries corresponding to the control number field is greater than the sum of the initial numbers corresponding to the control number field in each matching document data, the server may perform tail insertion processing on the number of entries corresponding to the control number field according to a preset tail difference processing scheme, so as to achieve reasonable distribution of the number. For example, the initial number of the control number field in the matching document data 1 and the matching document data 2 is 30 and 40 respectively, the input number corresponding to the control number field is 78, the 78 can be split into 30, 40 and 8, the number 8 can be distributed to the matching document data 2, and the matching number corresponding to the matching document data 1 and the matching document data 2 is 30 and 48 respectively; the quantity 8 can be equally distributed to the matched bill data 1 and the matched bill data 2, and the matched quantity corresponding to the matched bill data 1 and the matched bill data 2 is 34 and 44 respectively.
In the embodiment, the number of the input data is split by controlling the number field, so that the input data of the interface input at one time is automatically split into the data corresponding to a plurality of document entry lines reasonably, and the document generation efficiency is improved. In addition, the input quantity is split according to the initial quantity, so that the initial quantity is not directly covered by the input quantity, and the accuracy of bill generation is improved.
In some embodiments, after determining the initial document under the target service, the document generation method further includes: copying the initial bill to obtain a reference bill; for each matched bill data, updating the matched bill data by using the matched quantity corresponding to the matched bill data and the input field value corresponding to each bill field to generate a target bill, wherein the method comprises the following steps: for each matched bill data, obtaining duplicate bill data corresponding to the matched bill data from the reference bill; updating the copied bill data by using the matching quantity corresponding to the matched bill data and the input field value corresponding to each target field to obtain target bill data; and generating the target bill based on the target bill data.
The reference bill is obtained by copying the initial bill, and the quantity of the copied bill data in the reference bill is consistent with the quantity of the initial bill data in the initial bill.
Specifically, the server may copy the initial document, empty the control number field of the copied document for the initial number to obtain the reference document, and cache the reference document, that is, the field value corresponding to the control number field in the data of each copied document is 0. And aiming at each matched bill data, acquiring duplicate bill data corresponding to the matched bill data from the reference bill, updating the duplicate bill data by utilizing the matched quantity corresponding to the matched bill data and the input field value corresponding to each target field to obtain target bill data consisting of field identifications and target field values corresponding to each bill field, and then generating a target bill based on the bill header and the target bill data of the initial bill. The business bill is composed of a bill header and bill data, wherein the bill header is used for storing public information of the bill, such as at least one of bill creator, bill state and the like.
For example, as shown in fig. 6, which illustrates a process diagram of generating target document data, the server first replicates an initial target ticket and clears the control number field to obtain a reference target ticket. Then, the server determines matching document data according to field entry values corresponding to the matching fields, namely entry 1 and entry 2 in the initial target list, splits entry quantity 70 corresponding to the control quantity field according to initial quantities 30 and 40 corresponding to the control quantity field in entry 1 and entry 2, obtains the quantity of skins corresponding to entry 1 and entry 2 respectively, and generates a matching record based on the matching quantities. The server can generate the target document data based on the input field value, the matching record and the reference target list corresponding to each target field, and can see that the field values corresponding to the field 1 and the field 2 in the target document data are derived from the matching field, the field value corresponding to the field 3 is derived from the input common field 1, the field value corresponding to the field 4 is derived from the reference target list, and the field value corresponding to the field 5 is derived from the matching record.
In some embodiments, after generating the target document data, the server may further perform a write-back check on an upstream document corresponding to the initial document according to the target document data, so as to ensure accuracy of the data.
In the embodiment, in the process of generating the bill, the initial bill is not updated, but is copied to obtain the reference bill, the copied bill data corresponding to the matched bill data is obtained from the reference bill, and the copied bill data is updated to obtain the target bill data, so that the target bill is generated based on the target bill data, and the data security is improved.
In some embodiments, determining an entry field value corresponding to each document field from the interface entry data based on attribute mappings corresponding to a plurality of document fields includes: determining attribute mapping relations corresponding to a plurality of bill fields according to the bill types of the initial bill; determining attribute identifiers corresponding to the bill fields from the attribute mapping relation; and searching the attribute value of the attribute identifier corresponding to the document field in the interface input data for each document field to obtain an input field value corresponding to the document field.
Specifically, different kinds of services correspond to different bill types, and attribute mapping relations corresponding to the bill types are stored in the server. The server can determine attribute mapping relations corresponding to a plurality of bill fields according to the bill types of the initial bill, determine attribute identifications corresponding to the bill fields from the attribute mapping relations according to the field identifications corresponding to the bill fields, and then search attribute values of the attribute identifications corresponding to the bill fields in the interface input data for each bill field to obtain input field values corresponding to the bill fields.
In the embodiment, the interface input data is automatically analyzed through the preset attribute mapping relation, firstly, the attribute identification corresponding to each document field is determined, then, the attribute value of the attribute identification corresponding to the document field is searched in the interface input data, the input field value corresponding to each document field is rapidly determined, and the document generation efficiency is improved.
In some embodiments, determining an initial document under a target service includes: acquiring at least one business document selected in a document display interface and displayed by a terminal; determining bill conversion rules corresponding to the business bills; and converting the bill of each business bill according to the bill conversion rule to generate an initial bill.
The bill consists of a bill header and bill data, wherein the bill header is used for storing public information of the bill, and the bill header also comprises a bill conversion rule identifier corresponding to the bill. The document data refers to field identifiers corresponding to the document fields.
Specifically, the terminal displays a bill display interface, and a plurality of service bill identifiers under an upstream service corresponding to the target service are displayed in the bill display interface. And the terminal responds to the selection operation aiming at least one service bill identifier and sends an initial bill generation request carrying each service bill identifier to the server. The server receives an initial bill generation request sent by the terminal, acquires service bills corresponding to each service bill identifier, acquires bill conversion rule identifiers from bill heads of service bills, determines bill conversion rules corresponding to each service bill by using the bill conversion rule identifiers, and performs bill conversion on each service bill according to the bill conversion rules to generate the initial bill.
In the embodiment, through determining the bill conversion rule corresponding to each business bill, the bill conversion is carried out on each business bill according to the bill conversion rule, the initial bill is automatically generated, a matching basis is provided for matching verification in the bill generation process, and the bill generation accuracy is improved.
In some embodiments, the document conversion rules include document type mappings and field mappings; performing bill conversion on each business bill according to bill conversion rules to generate an initial bill, including: determining a target bill type associated with the bill type of the business bill according to the bill type mapping relation; acquiring a bill template corresponding to a target bill type; and determining an initial field value corresponding to each template field in the bill template according to the field mapping relation and the field value of each service bill field in the service bill, and generating an initial bill.
The bill type mapping relation is used for representing the association mapping relation among different bill types. The document template includes a plurality of template fields, each of which has a field value of null. It will be appreciated that the initial document is generated on the basis of a document template, and that the number of document fields in the initial document for which data is to be entered may be less than or equal to the number of template fields in the document template. The field mapping relationship may include an association relationship between the template field and the business document field, and a calculation formula corresponding to the template field.
Specifically, templates corresponding to the bill types are stored in the server, a target bill type associated with the bill type of the business bill is determined according to the bill type mapping relation, for example, the bill type associated with the purchase order is purchase receiving, and the bill template corresponding to the target bill type is obtained from the database. For each template field in the bill template, the server can determine the service bill field associated with the template field from the service bill according to the field mapping relation, and calculate the field value of the service bill field according to the calculation formula corresponding to the template field to obtain the initial field value corresponding to the template field, so as to generate the initial bill field.
In this embodiment, the document conversion rule includes a document type mapping relationship and a field mapping relationship, and the document type mapping relationship is used to determine a target document type and obtain a document template, so that an initial field value corresponding to each template field in the document template is determined based on the field mapping relationship, an initial document is quickly generated, and document conversion between different document types is realized.
In some embodiments, as shown in FIG. 7, an overall flow diagram of data entry and document generation is shown, comprising a total of 8 steps: 1. the input rule definition is used for defining an attribute mapping relation between the document field and the attribute identifier; 2. the interface model configuration is used for defining a source list, a target list, a bill conversion rule and a target list input configuration corresponding to the target service; 3. entering a task list, namely, a terminal performs a bill display page, and displaying a service bill under an upstream service corresponding to a target service in a task list form; 4. selecting one or more source sheets, and enabling a server to push down the selected business document to generate an initial document, namely an initial target sheet; 5. entering a bill input interface, inputting an initial target list, caching the initial target list as a matching basis, and copying the initial target list to obtain a reference target list; 6. starting a record list, acquiring interface input data, automatically matching field assignment, and performing preliminary matching verification based on an initial target list; 7. confirming input, configuring and matching entry lines in an initial target list based on an interface model, carrying out quantity distribution according to a control quantity field, recording a matching relation to generate a matching record, copying the target list reference line, carrying out assignment according to interface input data, and finally carrying out operations such as tail insertion processing, simulation source list write-back and the like; 8. and before submitting the data, merging multiple rows of target bill data according to service requirements, such as merging target bill data which are the same in dimension or are obtained based on the same initial bill data into a row to generate a target bill, then executing the processes of saving, submitting and auditing aiming at the target bill, and executing the anti-writing on an upstream bill, namely a source bill according to the anti-writing rule.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a bill generating device for realizing the bill generating method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the document generating device or devices provided below may refer to the limitation of the document generating method hereinabove, and will not be repeated here.
In some embodiments, as shown in fig. 8, there is provided a document generation apparatus including: an initial document determination module 802, an entry data acquisition module 804, a data matching module 806, and a document generation module 808, wherein:
the initial bill determining module 802 is configured to determine an initial bill under a target service, and determine a plurality of bill fields of data to be entered in the initial bill.
The input data acquisition module 804 is configured to acquire interface input data obtained through a document input interface of the terminal in response to a data input request sent by the terminal.
The data matching module 806 is configured to determine an entry field value corresponding to each document field from the interface entry data based on attribute mapping relationships corresponding to the plurality of document fields.
And the bill generating module 808 is configured to generate, in response to an entry confirmation request sent by the terminal, a target bill based on the initial bill and entry field values corresponding to the bill fields.
In some embodiments, the plurality of document fields includes at least one matching field; after determining the input field value corresponding to each document field from the interface input data based on the attribute mapping relation corresponding to the plurality of document fields, the document generating device further comprises a matching checking module, wherein the matching checking module is used for: for each matching field, determining an initial field value corresponding to the matching field from the initial document; and determining that the interface entry data is invalid under the condition that the initial field value corresponding to the matching field is inconsistent with the entry field value corresponding to the matching field.
In some embodiments, the plurality of document fields includes at least one matching field; the initial bill comprises at least one row of initial bill data; the document generation module is also used for: determining matching bill data matched with the interface input data from the initial bill based on the input field values corresponding to the matching fields; the initial field value corresponding to the matching field in the matching document data is consistent with the input field value; and updating the initial field value corresponding to each bill field in the matched bill data according to the input field value corresponding to each bill field, and generating the target bill.
In some embodiments, the matching document data is in multiple rows; the plurality of bill fields comprise a control quantity field; the document generation module is also used for: splitting the input quantity corresponding to the control quantity field according to the initial quantity corresponding to the control quantity field in each piece of matched bill data to obtain the matched quantity corresponding to each piece of matched bill data; determining bill fields except a control number field and a matching field in a plurality of bill fields as target fields; and updating the matched bill data by utilizing the matching quantity corresponding to the matched bill data and the input field value corresponding to each target field aiming at each matched bill data to generate the target bill.
In some embodiments, after determining the initial document under the target service, the document generating device further includes a document copying module, where the document copying module is configured to: copying the initial bill to obtain a reference bill; the document generation module is also used for: for each matched bill data, obtaining duplicate bill data corresponding to the matched bill data from the reference bill; updating the copied bill data by using the matching quantity corresponding to the matched bill data and the input field value corresponding to each target field to obtain target bill data; and generating the target bill based on the target bill data.
In some embodiments, the data entry module is further to: determining attribute mapping relations corresponding to a plurality of bill fields according to the bill types of the initial bill; determining attribute identifiers corresponding to the bill fields from the attribute mapping relation; and searching the attribute value of the attribute identifier corresponding to the document field in the interface input data for each document field to obtain an input field value corresponding to the document field.
In some embodiments, the initial document determination module is further to: acquiring at least one business document selected in a document display interface and displayed by a terminal; determining bill conversion rules corresponding to the business bills; and converting the bill of each business bill according to the bill conversion rule to generate an initial bill.
In some embodiments, the document conversion rules include document type mappings and field mappings; the initial document determination module is further configured to: determining a target bill type associated with the bill type of the business bill according to the bill type mapping relation; acquiring a bill template corresponding to a target bill type; and determining an initial field value corresponding to each template field in the bill template according to the field mapping relation and the field value of each service bill field in the service bill, and generating an initial bill.
The modules in the document generation device may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In some embodiments, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 9. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing relevant data related to the bill generating method. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a document generation method.
In some embodiments, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 10. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a document generation method. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structures shown in fig. 9 or 10 are merely block diagrams of portions of structures related to the aspects of the present application and are not intended to limit the computer devices to which the aspects of the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or may have a different arrangement of components.
In some embodiments, a computer device is provided, comprising a memory having a computer program stored therein and a processor that when executing the computer program performs the steps of the document generation method described above.
In some embodiments, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, implements the steps of the document generation method described above.
In some embodiments, a computer program product is provided comprising a computer program which, when executed by a processor, implements the steps of the document generation method described above.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to comply with the related laws and regulations and standards of the related countries and regions.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (10)

1. A document generation method, the method comprising:
determining an initial bill under a target service, and determining a plurality of bill fields of data to be input in the initial bill;
responding to a data input request sent by a terminal, and acquiring interface input data obtained through a bill input interface of the terminal;
determining an input field value corresponding to each document field from the interface input data based on attribute mapping relations corresponding to the document fields;
And responding to an input confirmation request sent by the terminal, and generating a target bill based on the initial bill and input field values corresponding to the bill fields.
2. The method of claim 1, wherein the plurality of document fields includes at least one matching field; the initial bill comprises at least one row of initial bill data; the responding to the input confirmation request sent by the terminal generates a target bill based on the initial bill and input field values corresponding to the bill fields, and the method comprises the following steps:
determining matching bill data matched with the interface input data from the initial bill based on input field values corresponding to the matching fields; the initial field value corresponding to the matching field in the matching document data is consistent with the input field value;
and updating an initial field value corresponding to each bill field in the matched bill data according to an input field value corresponding to each bill field, and generating the target bill.
3. The method of claim 2, wherein the matching document data is in a plurality of rows; the plurality of bill fields comprise a control quantity field; updating an initial field value corresponding to each document field in the matched document data according to an input field value corresponding to each document field, and generating the target document, including:
Splitting the input quantity corresponding to the control quantity field according to the initial quantity corresponding to the control quantity field in each piece of matched bill data to obtain the matched quantity corresponding to each piece of matched bill data;
determining a bill field except the control quantity field and the matching field in the bill fields as a target field;
and updating the matched bill data by utilizing the matched quantity corresponding to the matched bill data and the input field value corresponding to each target field aiming at each matched bill data to generate the target bill.
4. A method according to claim 3, wherein after determining the initial document under the target service, the method further comprises:
copying the initial bill to obtain a reference bill;
for each matched bill data, updating the matched bill data by using the matched quantity corresponding to the matched bill data and the input field value corresponding to each bill field, and generating the target bill, including:
for each matched bill data, obtaining copy bill data corresponding to the matched bill data from the reference bill;
Updating the copied bill data by utilizing the matching quantity corresponding to the matched bill data and the input field value corresponding to each target field to obtain target bill data;
and generating the target bill based on the target bill data.
5. The method of claim 1, wherein determining, from the interface entry data, an entry field value corresponding to each document field based on the attribute mapping relationships corresponding to the plurality of document fields, comprises:
determining attribute mapping relations corresponding to the plurality of bill fields according to the bill types of the initial bill;
determining attribute identifiers corresponding to the bill fields from the attribute mapping relation;
and searching the attribute value of the attribute identifier corresponding to the document field in the interface input data aiming at each document field to obtain an input field value corresponding to the document field.
6. The method of claim 1, wherein determining the initial document under the target service comprises:
acquiring at least one business document selected by a document display interface displayed by the terminal;
determining a bill conversion rule corresponding to each business bill;
And carrying out bill conversion on each business bill according to the bill conversion rule to generate the initial bill.
7. The method of claim 6, wherein the document conversion rules include document type mappings and field mappings; and performing document conversion on each business document according to the document conversion rule to generate the initial document, including:
determining a target bill type associated with the bill type of the business bill according to the bill type mapping relation;
acquiring a bill template corresponding to the target bill type;
and determining an initial field value corresponding to each template field in the bill template according to the field mapping relation and the field value of each service bill field in the service bill, and generating the initial bill.
8. A document generation apparatus, the apparatus comprising:
the initial bill determining module is used for determining an initial bill under a target service and determining a plurality of bill fields of data to be recorded in the initial bill;
the input data acquisition module is used for responding to a data input request sent by a terminal and acquiring interface input data obtained through a bill input interface of the terminal;
The data matching module is used for determining the input field value corresponding to each document field from the interface input data based on the attribute mapping relation corresponding to the document fields;
and the bill generation module is used for responding to the input confirmation request sent by the terminal and generating a target bill based on the initial bill and input field values corresponding to the bill fields.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202311780078.5A 2023-12-21 2023-12-21 Document generation method, device, computer equipment and storage medium Pending CN117669528A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311780078.5A CN117669528A (en) 2023-12-21 2023-12-21 Document generation method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311780078.5A CN117669528A (en) 2023-12-21 2023-12-21 Document generation method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117669528A true CN117669528A (en) 2024-03-08

Family

ID=90076991

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311780078.5A Pending CN117669528A (en) 2023-12-21 2023-12-21 Document generation method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117669528A (en)

Similar Documents

Publication Publication Date Title
US9336245B2 (en) Systems and methods providing master data management statistics
CN115544183A (en) Data visualization method and device, computer equipment and storage medium
CN111310032A (en) Resource recommendation method and device, computer equipment and readable storage medium
CN115409014A (en) Document template generation method and device, computer equipment and storage medium
CN117669528A (en) Document generation method, device, computer equipment and storage medium
CN113934729A (en) Data management method based on knowledge graph, related equipment and medium
CN114596147A (en) Data reconciliation method and device, computer equipment and storage medium
CN117390011A (en) Report data processing method, device, computer equipment and storage medium
CN116303657A (en) Group image generation method, group image generation device, computer device, and storage medium
CN117494689A (en) Payroll template generation method, device, apparatus, storage medium and program product
CN116258597A (en) Document processing method, device, computer equipment and storage medium
CN114519062A (en) Basic data updating method and device, computer equipment and storage medium
CN117033452A (en) Database processing method, device, computer equipment and storage medium
CN114547066A (en) Nuclear power business data standardization method and device and computer equipment
CN117271563A (en) Data query method, apparatus, computer device, storage medium, and program product
CN116308352A (en) Credential generation method, apparatus, computer device, and storage medium
CN117437002A (en) Service carding method, device, computer equipment and storage medium
CN117933200A (en) Document editing method and device, computer equipment and storage medium
CN117556410A (en) Service data processing method, device, computer equipment and storage medium
CN116383138A (en) Document changing method, device, computer equipment and storage medium
CN117575765A (en) Product recommendation method, device, computer equipment and storage medium
CN116629852A (en) Financial payment service page processing method and device and computer equipment
CN116797189A (en) Information processing method, apparatus, computer device, and storage medium
CN116452214A (en) Block chain-based after-sales information processing method and device and computer equipment
CN117151841A (en) Service processing method, device, computer equipment, storage medium and program product

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