Word-based custom certificate printing method and device, and computer equipment
The method employs Microsoft Word to generate and print customizable environmental vehicle lists, addressing the inefficiencies of static template systems by automating template updates and printing, thus efficiently adapting to regulatory changes.
Patent Information
- Application Number
- CN202311281704.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-28
- Publication Date
- 2025-03-28
AI Technical Summary
Existing systems for printing environmental vehicle lists require frequent updates and modifications due to changing regulations, leading to long cycles, high costs, and significant workloads, as they are based on static templates that do not support business user customization.
A method utilizing Microsoft Word to create customizable certificates, where configuration rules are used to generate templates, upload them to a server, and match vehicle information to print the relevant templates via FTP, allowing for automatic editing and printing.
This approach reduces the complexity of system interactions, shortens template maintenance cycles, and enables rapid adaptation to regulatory changes without disrupting business operations, providing a flexible and efficient solution for updating environmental vehicle list styles.
Smart Images

Figure CN119718219A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of printing technology, and in particular to a Word-based custom certificate printing method, device, computer equipment and storage medium. Background Art
[0002] With the continuous development of the automotive industry, the requirements of the regulations on environmental protection vehicle checklists are constantly changing. The traditional fixed environmental protection vehicle checklist printing template can no longer meet the development needs of the business. For each change in regulations, the environmental protection vehicle checklist printing system needs to be upgraded and renovated, which will inevitably lead to increasing work pressure on regulatory personnel.
[0003] The existing on-vehicle checklist printing is implemented based on H5 static templates, that is, the environmental protection checklist template is implemented based on a static page through H5 technology, and the printer is called for printing. The defects of this method are: because it is based on a static template, each time the regulations and policies change, a new environmental protection on-vehicle checklist template needs to be developed twice to deal with it, and it needs to be released after the system version is effective, which has problems such as long cycle, high cost, and large workload; the template maintenance is cumbersome, the business scalability is weak, and a specific development group is required to upgrade and transform it, which creates an additional burden on the business system, and does not support business personnel to customize the configuration template.
[0004] However, the healthy and stable operation of the environmental protection vehicle list printing business will become an important part of the company's development. Therefore, it will become particularly important to respond to changes in laws and regulations through efficient means. Summary of the invention
[0005] The purpose of the embodiments of the present invention is to propose a custom certificate printing method, device, computer equipment and storage medium based on Word to solve the existing vehicle checklist printing. Since it is based on a static template, each time the laws and policies change, a new environmental protection vehicle checklist template needs to be developed twice to deal with it. It needs to be released before the system version takes effect, which has problems such as long cycle, high cost and heavy workload.
[0006] In order to solve the above technical problems, the present invention provides a custom certificate printing method based on Word, which adopts the following technical solution, including:
[0007] Get the printing configuration rules;
[0008] According to the printing configuration rules, configure the Word template;
[0009] Upload the Word template to the server;
[0010] Obtaining a printing instruction, wherein the printing instruction includes a vehicle order type;
[0011] According to the vehicle order type, a corresponding certificate template is matched from the Word template;
[0012] The certificate template is retrieved from the server through FTP and matched with the vehicle information array parameter value transmitted by the background interface. If the match is successful, the printer driver is called to print the certificate template.
[0013] Preferably, the step of obtaining the printing configuration rule specifically includes:
[0014] Obtain vehicle announcement model information and vehicle series information from the database;
[0015] According to the announcement information, the environmental protection vehicle list information is maintained. Preferably, the step of configuring the Word template according to the printing configuration rule specifically includes:
[0016] Use the word tool to create a new upload Word template, and set the template name to the announcement vehicle model + "-" + environmental information disclosure number;
[0017] The Word template is obtained from the uploaded server FTP according to the corresponding configured rule information. Preferably, the step of uploading the Word template to the server specifically includes:
[0018] The database reads FTP configuration information;
[0019] Upload the environmental protection vehicle checklist template to the server, and record the file name and corresponding announced vehicle model, effective time, and activation status to the server.
[0020] Preferably, the step of obtaining a printing instruction, wherein the printing instruction includes the vehicle order type, specifically comprises:
[0021] Acquire vehicle order information according to the VIN code, wherein the vehicle order information includes a vehicle order type;
[0022] A printing instruction is obtained from a user operation interface, where the printing instruction carries the vehicle order information.
[0023] Preferably, the step of matching a corresponding certificate template from the Word template according to the vehicle order type specifically includes:
[0024] Query vehicle information, the vehicle model announcement number is consistent with the template model announcement number, and the effective status is activated, and the activation date is before the manufacturing date of the template information;
[0025] Get the file name of the template based on the template information.
[0026] Preferably, the certificate template is retrieved from the server through FTP, and matched with the vehicle information array parameter value transmitted by the background interface. If the match is successful, the printer driver is called to print the certificate template. Specifically, the step includes:
[0027] Automatically edit the template based on vehicle information, add the QR code of the environmental protection vehicle list, vehicle VIN, engine number, and manufacturing date;
[0028] Convert the edited template into a PDF file and call the driver to print the PDF file.
[0029] In order to solve the above technical problems, the present invention also provides a custom certificate printing device based on Word, which adopts the following technical solution, including:
[0030] An acquisition module is used to acquire printing configuration rules;
[0031] A configuration module, used to configure a Word template according to the printing configuration rule;
[0032] An upload module, used for uploading the Word template to a server;
[0033] An instruction module, used for obtaining a printing instruction, wherein the printing instruction includes a vehicle order type;
[0034] A matching module, used for matching a corresponding certificate template from the Word template according to the vehicle order type;
[0035] The printing module is used to retrieve the certificate template from the server through FTP, match it with the vehicle information array parameter value transmitted by the background interface, and if the match is successful, call the printer driver to print the certificate template.
[0036] In order to solve the above technical problems, the present invention also provides a computer device, which adopts the technical solution described below, including a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, it implements the steps of the above-mentioned Word-based custom certificate printing method.
[0037] In order to solve the above technical problems, the present invention also provides a computer-readable storage medium, which adopts the technical solution described below, and stores computer-readable instructions on the computer-readable storage medium. When the computer-readable instructions are executed by the processor, the steps of the above-mentioned Word-based custom certificate printing method are implemented.
[0038] Compared with the prior art, the present invention mainly has the following beneficial effects: firstly, based on the flexible, fast and easy configuration characteristics of Word, it well solves the template style maintenance problem caused by the change of the environmental protection vehicle list and the style of the environmental protection vehicle list due to changes in laws and policies; secondly, based on Word configuration of the environmental protection vehicle list style and parameters, the complexity of system interaction is reduced, and it is easy to expand. When the style of the environmental protection vehicle list is modified, it is only necessary to modify the Word document style and upload it to the server; thirdly, since the template style maintenance cycle is short, it is possible to quickly configure and upload the environmental protection vehicle list style template without affecting the system business, and efficiently respond to changes in business needs caused by business changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the scheme in the present invention, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present invention. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0040] Figure 1 is an exemplary system architecture diagram in which the present invention can be applied;
[0041] Figure 2 It is a flow chart of an embodiment of a Word-based custom certificate printing method of the present invention;
[0042] Figure 3 It is a schematic diagram of setting printing configuration rules used in the Word-based custom certificate printing method of the present invention;
[0043] Figure 4 It is a structural schematic diagram of an embodiment of a Word-based custom certificate printing device of the present invention;
[0044] Figure 5 It is a structural schematic diagram of another embodiment of a Word-based custom certificate printing device of the present invention;
[0045] Figure 6 It is a schematic structural diagram of an embodiment of a computer device of the present invention. DETAILED DESCRIPTION
[0046] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present invention; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention; the terms "including" and "having" and any variations thereof in the specification and claims of the present invention and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present invention or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0047] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0048] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings.
[0049] like Figure 1 As shown, the system architecture 100 may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0050] The user can use the first terminal device 101, the second terminal device 102 or the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0051] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, desktop computers, etc.
[0052] The server 105 may be a server that provides various services, for example, a background server that provides support for pages displayed on the first terminal device 101 , the second terminal device 102 , and the third terminal device 103 .
[0053] It should be noted that the Word-based custom certificate printing method provided in the embodiment of the present invention is generally executed by a server / terminal device, and accordingly, the Word-based custom certificate printing device is generally arranged in the server / terminal device.
[0054] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0055] Embodiment 1
[0056] Continue to refer Figure 2 , shows a flow chart of an embodiment of a Word-based custom certificate printing method of the present invention. The Word-based custom certificate printing method comprises the following steps:
[0057] Step S1, obtaining printing configuration rules.
[0058] In this embodiment, the electronic device (eg, Figure 1 The server / terminal device shown in the figure can receive the Word-based custom certificate printing request through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAXX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0059] Figure 3Schematic diagram of the printing configuration rules used in the Word-based custom certificate printing method of the present invention. Figure 3 As shown, the printing configuration rules include configuring the vehicle announcement model, effective date, activation status, environmental information disclosure number and other information rules.
[0060] In specific implementation, step S1, obtaining the printing configuration rule may further include the following steps:
[0061] S11. Obtain vehicle announcement model information and vehicle series information from a database.
[0062] In some optional implementations of this embodiment, Oracle database, ACCESS database, SQL database, DB2 database, Sybase, MySQL, MariaDB, VF, SqlServer and SQLite databases can be selected according to specific needs to store printing configuration rules. Printing configuration rules are used as a reference for customizing the style of the environmental protection vehicle list.
[0063] S12. Maintain the environmental protection vehicle inventory information based on the announcement information.
[0064] The purpose of maintaining the environmental protection vehicle list information based on the announcement information is to establish the relationship between the announcement vehicle model and the environmental protection list information, and to ensure the corresponding matching relationship between the announcement information and the environmental protection vehicle list information.
[0065] Step S2, configuring the Word template according to the printing configuration rules.
[0066] In specific implementation, step S2, according to the printing configuration rule, configuring the Word template may further include the following steps:
[0067] S21. Use the word tool to create a new upload Word template, and set the template name to the announced vehicle model + "-" + environmental protection information disclosure number.
[0068] S22. Obtain the Word template from the uploaded server FTP according to the corresponding configured rule information.
[0069] The corresponding configured rule information includes vehicle announcement model, effective date, activation status, environmental information disclosure number, etc. The Word template is the environmental information printing template.
[0070] 1. Template download: Template refers to downloading from the Word template uploaded to the server.
[0071] / / / <summary>
[0072] / / / Download as a workflow
[0073] / / / < / summary>
[0074] / / / <param name="docName">
[0075] / / / <returns>< / returns>
[0076] public static Stream downLoad(string docName)
[0077] {
[0078] FtpWebRequest request;
[0079] string url = ftpUri + "docModel / " + docName;
[0080] request = (FtpWebRequest)FtpWebRequest.Create(new Uri(url));
[0081] / / Specify the FTP username and password for storing the Word template file
[0082] request.Credentials = new NetworkCredential(ftpUserName, ftpPassWord);
[0083] request.Method = WebRequestMethods.Ftp.DownloadFile;
[0084] request.UseBinary = true;
[0085] FtpWebResponse response = request.GetResponse() as
[0086] FtpWebResponse;
[0087] Stream stream = response.GetResponseStream();
[0088] var ms = new MemoryStream();
[0089] CopyTo(stream, ms, 4096);
[0090] stream.Close();
[0091] response.Close();
[0092] return ms;
[0093] }
[0094] 2. Code configuration is based on engine parameters, edit word file information
[0095] According to the vehicle production information, edit the downloaded environmental protection vehicle checklist printing template, and then replace the corresponding data identifier "
Engine Number
[0096] / / Get the environmental protection vehicle inventory template based on the VIN code.
[0097] Aspose.Words.Document doc2=new
[0098] Aspose.Words.Document(FtpOnLoad.downLoad(modelName));
[0099] string text=doc2.GetText();
[0100] / / Replace the engine, edit the template, and add engine information.
[0101] int retfdj=doc2.Range.Replace("
Engine Number
[0102] doc.AppendDocument(doc2,
[0103] Aspose.Words.ImportFormatMode.KeepSourceFormatting);
[0104] 3. Code configuration vehicle VIN information
[0105] 1) Get the QR code content, which is the configuration path string and VIN, which together form the address for viewing the environmental protection public information of the vehicle.
[0106] 2) Use the qrCodeEncoder.Encode(Content) method of the open source ThoughtWorks.QRCode.dll to convert the vehicle's environmental protection public information viewing address information into a QR code, and adjust the image size generated by the QR code according to the set target image size.
[0107] 3) Add the QR code to the PDF fixed area corresponding to the image.
[0108] / / Load the QR code image
[0109] / / Stream QRStream=new MemoryStream();
[0110] string QRContent=epCodeUrl+VIN;
[0111] Bitmap QRImage=CreateQRCode(QRContent,
[0112] QRCodeEncoder.ENCODE_MODE.BYTE,QRCodeEncoder.ERROR_CORRECTION.M,5,6,512,0);
[0113] QRImage.RotateFlip(RotateFlipType.Rotate180FlipX);
[0114] ewmName=VIN+"_ewm.jpg";
[0115] QRImage.MakeTransparent(System.Drawing.Color.White);
[0116] QRImage.Save(ewmName);
[0117] / / Bitmap bm=new Bitmap("ewm.jpg");
[0118] imageStream=new FileStream(ewmName,FileMode.Open);
[0119] / / page.Resources.Images.Add(QRStream);
[0120] / / QRImage.Save(QRStream,ImageFormat.Jpeg);
[0121] page.Resources.Images.Add(imageStream);
[0122] Step S3, uploading the Word template to the server.
[0123] In specific implementation, step S3, uploading the Word template to the server may further include the following steps:
[0124] S31. The database reads FTP configuration information.
[0125] FTP configuration information includes FTP user and password.
[0126] S32, uploading the environmental protection vehicle list template to the server, and recording the file name and the corresponding announced vehicle model, effective time, and activation status to the server.
[0127] Step S4, obtaining a printing instruction, the printing instruction including the vehicle order type.
[0128] In specific implementation, step S4, obtaining a printing instruction, the printing instruction including the vehicle order type may further include the following steps:
[0129] S41. Obtain vehicle order information according to the VIN code, where the vehicle order information includes a vehicle order type.
[0130] Vehicle order information includes vehicle VIN, assembly code, announced model information, engine information, vehicle order type, etc.
[0131] S42. Obtain a printing instruction from the user operation interface, where the printing instruction carries vehicle order information.
[0132] The user operates the system interface, specifies the vehicle VIN code, and issues a print signal.
[0133] Step S5, matching the corresponding certificate template from the Word template according to the vehicle order type.
[0134] In specific implementation, step S5, matching the corresponding certificate template from the Word template according to the vehicle order type may further include the following steps:
[0135] S51. Query vehicle information. The vehicle model announcement number is consistent with the template model announcement number, and the effective status is enabled. The template information with the activation date before the manufacturing date.
[0136] S52. Obtain the file name of the template according to the template information.
[0137] The purpose of step S5 is to match the corresponding certificate template, that is, the Word environmental protection checklist template, according to the vehicle order type, and add matching parameters to the Word environmental protection checklist template through the Aspose plug-in.
[0138] Step S6, fetch the certificate template from the server through FTP, and match it with the vehicle information array parameter value transmitted by the background interface. If the match is successful, call the printer driver to print the certificate template.
[0139] In the specific implementation, step S6, through FTP, the certificate template is taken out from the server, and matched with the vehicle information array parameter value transmitted by the background interface. If the match is successful, the printer driver is called, and the printing of the certificate template may also include the following steps:
[0140] The background refers to the background interface, and the vehicle information array parameter values transmitted by the background interface include vehicle VIN code, engine number, engine model, and manufacturing date.
[0141] S61. Automatically edit the template based on the vehicle information, add the QR code of the environmental protection vehicle list, vehicle VIN, engine number, and manufacturing date.
[0142] S62, converting the edited template into a PDF file, and calling a driver to print the PDF file.
[0143] You can convert the certificate template into a PDF file first, and then add the QR code information to the PDF file. When you need to obtain the certificate module later, you can obtain it by scanning the QR code information.
[0144] In some optional implementations of this embodiment, after step S6, the electronic device may further perform the following steps:
[0145] S7. Back up the output and printed certificate template as a PDF file.
[0146] The purpose of backing up the output and printed certificate template as a PDF file is to facilitate information sharing on multiple servers and terminals.
[0147] In some optional implementations of this embodiment, after step S7, the electronic device may further perform the following steps:
[0148] S8. The certificate template PDF file is uploaded to the server, and the environmental protection vehicle list information is stored in the database.
[0149] You can select the database type according to actual needs, such as Oracle database, ACCESS database, SQL database, DB2 database, Sybase, MySQL, MariaDB, VF, SqlServer, SQLite, etc. By storing the environmental protection vehicle list information in the database, users can easily obtain it through other terminals or servers to share information.
[0150] The beneficial effects of implementing this embodiment are: first, based on the flexible, fast and easy configuration characteristics of Word, it well solves the template style maintenance problem caused by changes in the environmental protection vehicle list and the style of the environmental protection vehicle list due to changes in laws and policies; secondly, the environmental protection vehicle list style and parameters are configured based on Word, which reduces the complexity of system interaction and is easy to expand. When the environmental protection vehicle list style is modified, only the Word document style needs to be modified and uploaded to the server; thirdly, since the template style maintenance cycle is short, it is possible to quickly configure and upload the environmental protection vehicle list style template without affecting the system business, thereby efficiently responding to changes in business needs caused by business changes.
[0151] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned environmental protection vehicle list information, the above-mentioned environmental protection vehicle list information can also be stored in a blockchain node.
[0152] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0153] The present invention can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present invention can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0154] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0155] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0156] Embodiment 2
[0157] Further references Figure 4 , as a response to the above Figure 2 The present invention provides an embodiment of a custom certificate printing device based on Word, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0158] like Figure 4 As shown, the Word-based custom certificate printing device 70 of this embodiment includes: an acquisition module 71, a configuration module 72, an upload module 73, an instruction module 74, a matching module 75 and a printing module 76. Among them:
[0159] An acquisition module 71, used to acquire a printing configuration rule;
[0160] Configuration module 72, configured to configure the Word template according to the printing configuration rules;
[0161] The upload module 73 is used to upload the Word template to the server;
[0162] An instruction module 74 is used to obtain a printing instruction, where the printing instruction includes a vehicle order type;
[0163] A matching module 75, for matching a corresponding certificate template from a Word template according to the vehicle order type;
[0164] The printing module 76 is used to retrieve the certificate template from the server through FTP and match it with the parameter value of the vehicle information array (including vehicle VIN, announced model, assembly code, manufacturing date, etc.) transmitted by the background interface. If the match is successful, the printer driver is called to print the certificate template.
[0165] In some optional implementations of this embodiment, the Word-based custom certificate printing device 70 further includes: a backup module 77, which is used to back up the output and printed certificate template as a PDF file.
[0166] In some optional implementations of this embodiment, the Word-based custom certificate printing device 70 further includes: a storage module 78, which is used to upload the certificate template PDF file to the server and store the environmental protection vehicle list information in the database.
[0167] Figure 5 FIG. 1 is a schematic diagram of another embodiment of the Word-based custom certificate printing device of the present invention. Figure 5 As shown, in a custom certificate printing device based on Word, a terminal, a custom style configuration certificate printing module, and a server are connected in sequence, and the custom style configuration certificate printing module is also connected to a database. The user calls the custom style configuration certificate printing module through the terminal to print a custom style configuration certificate, and the custom style configuration certificate printing module stores the certificate information into a database. The server calls the custom style configuration certificate printing module, and the custom style configuration certificate printing module backs up the certificate through the server.
[0168] The beneficial effects of implementing this embodiment are: first, based on the flexible, fast and easy configuration characteristics of Word, it well solves the template style maintenance problem caused by changes in the environmental protection vehicle list and the style of the environmental protection vehicle list due to changes in laws and policies; secondly, the environmental protection vehicle list style and parameters are configured based on Word, which reduces the complexity of system interaction and is easy to expand. When the environmental protection vehicle list style is modified, only the Word document style needs to be modified and uploaded to the server; thirdly, since the template style maintenance cycle is short, it is possible to quickly configure and upload the environmental protection vehicle list style template without affecting the system business, thereby efficiently responding to changes in business needs caused by business changes.
[0169] Embodiment 3
[0170] To solve the above technical problems, the embodiment of the present invention also provides a computer device. Figure 6 , Figure 6This is a basic structural block diagram of the computer device in this embodiment.
[0171] The above-mentioned computer device 8 includes a memory 81, a processor 82, and a network interface 83 that are interconnected and communicated through a system bus. It should be noted that the figure only shows a computer device 8 having components of a memory 81, a processor 82, and a network interface 83, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to a microprocessor, an application specific integrated circuit (ASIC), a programmable gate array (FPGA), a digital processor (DSP), an embedded device, etc.
[0172] The computer device may be a desktop computer, a notebook computer, a PDA, a cloud server, etc. The computer device may interact with the user through a keyboard, a mouse, a remote control, a touch pad, or a voice control device.
[0173] The memory 81 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 81 may be an internal storage unit of the computer device 8, such as a hard disk or memory of the computer device 8. In other embodiments, the memory 81 may also be an external storage device of the computer device 8, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the computer device 8. Of course, the memory 81 may also include both the internal storage unit of the computer device 8 and its external storage device. In this embodiment, the memory 81 is generally used to store the operating system and various application software installed on the computer device 8, such as computer-readable instructions of a custom certificate printing method based on Word, etc. In addition, the memory 81 can also be used to temporarily store various types of data that have been output or are to be output.
[0174] The processor 82 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 82 is generally used to control the overall operation of the computer device 8. In this embodiment, the processor 82 is used to run the computer-readable instructions stored in the memory 81 or process data, such as running the computer-readable instructions of the Word-based custom certificate printing method.
[0175] The network interface 83 may include a wireless network interface or a wired network interface. The network interface 83 is generally used to establish a communication connection between the computer device 8 and other electronic devices.
[0176] The beneficial effects of implementing this embodiment are: first, based on the flexible, fast and easy configuration characteristics of Word, it well solves the template style maintenance problem caused by changes in the environmental protection vehicle list and the style of the environmental protection vehicle list due to changes in laws and policies; secondly, the environmental protection vehicle list style and parameters are configured based on Word, which reduces the complexity of system interaction and is easy to expand. When the environmental protection vehicle list style is modified, only the Word document style needs to be modified and uploaded to the server; thirdly, since the template style maintenance cycle is short, it is possible to quickly configure and upload the environmental protection vehicle list style template without affecting the system business, thereby efficiently responding to changes in business needs caused by business changes.
[0177] Embodiment 4
[0178] The present invention also provides another embodiment, namely, providing a computer-readable storage medium, which stores computer-readable instructions. The computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the above-mentioned Word-based custom certificate printing method.
[0179] The beneficial effects of implementing this embodiment are: first, based on the flexible, fast and easy configuration characteristics of Word, it well solves the template style maintenance problem caused by changes in the environmental protection vehicle list and the style of the environmental protection vehicle list due to changes in laws and policies; secondly, the environmental protection vehicle list style and parameters are configured based on Word, which reduces the complexity of system interaction and is easy to expand. When the environmental protection vehicle list style is modified, only the Word document style needs to be modified and uploaded to the server; thirdly, since the template style maintenance cycle is short, it is possible to quickly configure and upload the environmental protection vehicle list style template without affecting the system business, thereby efficiently responding to changes in business needs caused by business changes.
[0180] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the various embodiment methods of the present invention.
[0181] Obviously, the embodiments described above are only some embodiments of the present invention, rather than all embodiments. The preferred embodiments of the present invention are given in the accompanying drawings, but they do not limit the patent scope of the present invention. The present invention can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive. Although the present invention has been described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific embodiments, or to perform equivalent replacements for some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of the present invention, directly or indirectly used in other related technical fields, is also within the scope of patent protection of the present invention.
Claims
1. A custom certificate printing method based on Word, characterized in that: The steps include: Get the printing configuration rules; According to the printing configuration rules, configure the Word template; Upload the Word template to the server; Obtaining a printing instruction, wherein the printing instruction includes a vehicle order type; According to the vehicle order type, a corresponding certificate template is matched from the Word template; The certificate template is retrieved from the server through FTP and matched with the vehicle information array parameter value transmitted by the background interface. If the match is successful, the printer driver is called to print the certificate template.
2. The Word-based custom certificate printing method according to claim 1, characterized in that: The step of obtaining the printing configuration rule specifically includes: Obtain vehicle announcement model information and vehicle series information from the database; Maintain the environmental protection vehicle inventory information based on the announcement information.
3. The method for printing a custom certificate based on Word according to claim 1, characterized in that: The step of configuring the Word template according to the printing configuration rule specifically includes: Use the word tool to create a new upload Word template, and set the template name to the announcement vehicle model + "-" + environmental information disclosure number; Get the Word template from the uploaded server FTP according to the corresponding configured rule information.
4. The Word-based custom certificate printing method according to claim 3, characterized in that: The step of uploading the Word template to the server specifically includes: The database reads FTP configuration information; Upload the environmental protection vehicle checklist template to the server, and record the file name and corresponding announced vehicle model, effective time, and activation status to the server.
5. The Word-based custom certificate printing method according to claim 1, characterized in that: The step of obtaining a printing instruction, wherein the printing instruction includes a vehicle order type, specifically comprises: Acquire vehicle order information according to the VIN code, wherein the vehicle order information includes a vehicle order type; A printing instruction is obtained from a user operation interface, where the printing instruction carries the vehicle order information.
6. The Word-based custom certificate printing method according to claim 1, characterized in that: The step of matching a corresponding certificate template from the Word template according to the vehicle order type specifically includes: Query vehicle information, the vehicle model announcement number is consistent with the template model announcement number, and the effective status is activated, and the activation date is before the manufacturing date of the template information; Get the file name of the template based on the template information.
7. The Word-based custom certificate printing method according to claim 1, characterized in that: The steps of taking the certificate template from the server through FTP and matching it with the vehicle information array parameter value transmitted by the background interface, and if the match is successful, calling the printer driver to print the certificate template specifically include: Automatically edit the template based on vehicle information, add the QR code of the environmental protection vehicle list, vehicle VIN, engine number, and manufacturing date; Convert the edited template into a PDF file and call the driver to print the PDF file.
8. A custom certificate printing device based on Word, characterized in that: include: An acquisition module is used to acquire printing configuration rules; A configuration module, used to configure a Word template according to the printing configuration rule; An upload module, used for uploading the Word template to a server; An instruction module, used for obtaining a printing instruction, wherein the printing instruction includes a vehicle order type; A matching module, used for matching a corresponding certificate template from the Word template according to the vehicle order type; The printing module is used to retrieve the certificate template from the server through FTP, match it with the vehicle information array parameter value transmitted by the background interface, and if the match is successful, call the printer driver to print the certificate template.
9. A computer device comprising a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the Word-based custom certificate printing method as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the Word-based custom certificate printing method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Printing platform based on Word template and functional plug-in
CN115098047A
Motor vehicle-mounted certificate printing and information uploading method and system
CN115297106A
A certificate automatic issue system and method thereof
KR1020030088082A