CN114132091B - Bar code printing method and device - Google Patents

Bar code printing method and device Download PDF

Info

Publication number
CN114132091B
CN114132091B CN202111254735.3A CN202111254735A CN114132091B CN 114132091 B CN114132091 B CN 114132091B CN 202111254735 A CN202111254735 A CN 202111254735A CN 114132091 B CN114132091 B CN 114132091B
Authority
CN
China
Prior art keywords
printing
content
bar code
original
product
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.)
Active
Application number
CN202111254735.3A
Other languages
Chinese (zh)
Other versions
CN114132091A (en
Inventor
陈鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home 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 Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202111254735.3A priority Critical patent/CN114132091B/en
Publication of CN114132091A publication Critical patent/CN114132091A/en
Application granted granted Critical
Publication of CN114132091B publication Critical patent/CN114132091B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41JTYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
    • B41J3/00Typewriters or selective printing or marking mechanisms characterised by the purpose for which they are constructed
    • B41J3/01Typewriters or selective printing or marking mechanisms characterised by the purpose for which they are constructed for special character, e.g. for Chinese characters or barcodes
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41JTYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
    • B41J29/00Details of, or accessories for, typewriters or selective printing mechanisms not otherwise provided for
    • B41J29/38Drives, motors, controls or automatic cut-off devices for the entire printing mechanism
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The invention provides a bar code printing method and a device, wherein the method comprises the following steps: determining an original printing template of a target product according to product type information of the target product; matching the order data of the target product with a preset database, and generating bar code printing content corresponding to the target product according to the field content obtained by matching; replacing the original bar code printing content in the original printing template through the bar code printing content to obtain a target printing file; and printing according to the target printing file. According to the invention, based on the mapping relation between the product and the database, the bar code printing content corresponding to the product is obtained, so that the content in the original printing template is replaced, and then the bar code of the product is printed by the printing template after the content is replaced.

Description

Bar code printing method and device
Technical Field
The invention relates to the technical field of information management, in particular to a barcode printing method and a barcode printing device.
Background
A production Execution System (MES) can track the flow process of the product according to real-time production data collected on a production line, including material movement, material conversion, material splitting, material merging, material consumption and other related operations, and a user can scan a barcode on the product in the MES System to query information such as the position, quantity and the like of the product.
When the MES system is applied, bar code printing is a necessary and extremely important step in the production process of a modern factory, and the speed and the efficiency of the printing process determine whether the production link of the factory is simplified or not and whether the working result of a worker is beneficial to product tracing or not. In the bar code printing process of the product, the template is a necessary design process for printing the bar code, and the layout and the font needed in the printing process need to be set according to different types of products or certain objects needing to be traced.
At present, a printing process which is more general is used for printing by a previewing printing program, but the method is relatively inflexible and configurable, and the barcode printing efficiency is lower; in addition, in the process of converting the template, the printing performance may not be expected due to the poor interface design, and the efficiency of the production process may be affected. Therefore, a barcode printing method and apparatus are needed to solve the above problems.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a barcode printing method and a barcode printing device.
The invention provides a barcode printing method, which comprises the following steps:
determining an original printing template of a target product according to product type information of the target product;
matching the order data of the target product with a preset database, and generating barcode printing content corresponding to the target product according to the field content obtained by matching;
replacing the original bar code printing content in the original printing template through the bar code printing content to obtain a target printing file;
and printing according to the target printing file.
According to the barcode printing method provided by the invention, before the determining the original printing template of the target product according to the product type information of the target product, the method further comprises the following steps:
acquiring a plurality of printing templates according to the bar code printing requirements of different products;
constructing original bar code printing content based on a character string format, wherein the original bar code printing content is replaceable bar code content;
and setting the original bar code printing content in a printing template to obtain an original printing template corresponding to each product.
According to the barcode printing method provided by the invention, the preset database is constructed by the following steps:
acquiring order data of each product, wherein the order data comprises an order number, a product code label and an order date;
and constructing a preset database based on the mapping relation between the order data and the bar code printing content.
According to the barcode printing method provided by the invention, the step of matching the order data of the target product with a preset database and generating the barcode printing content corresponding to the target product according to the field content obtained by matching comprises the following steps:
matching and obtaining field contents of the order to be printed from the preset database according to the order number and/or the product code label of the target product;
and generating bar code printing content corresponding to the target product according to the field content and the order date of the target product.
According to the barcode printing method provided by the invention, the original barcode printing content in the original printing template is replaced by the barcode printing content to obtain a target printing file, and the method comprises the following steps:
and judging the bar code printing content, and replacing the original bar code printing content in the original printing template with the bar code printing content to obtain a target printing file if the bar code printing content meets the format requirement of a preset printing command through judgment.
According to the barcode printing method provided by the present invention, after the original barcode printing content in the original printing template is replaced by the barcode printing content, the method further comprises:
and generating a target printing file corresponding to each preset printer program according to the replaced original printing template based on a plurality of different preset printer programs.
According to a barcode printing method provided by the present invention, after the printing according to the target print file, the method further comprises:
and updating the preset database according to the printing template corresponding to the target printing file.
The present invention also provides a barcode printing apparatus, comprising:
the original printing template determining module is used for determining an original printing template of a target product according to the product type information of the target product;
the barcode content generating module is used for matching the order data of the target product with a preset database and generating barcode printing content corresponding to the target product according to the field content obtained by matching;
the target printing file generation module is used for replacing the original bar code printing content in the original printing template through the bar code printing content to obtain a target printing file;
and the bar code printing module is used for printing according to the target printing file.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the steps of the bar code printing method.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the barcode printing method as described in any one of the above.
According to the bar code printing method and device, the bar code printing content corresponding to the product is obtained based on the mapping relation between the product and the database, so that the content in the original printing template is replaced, and then the bar code of the product is printed through the printing template with the replaced content.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart of a barcode printing method provided by the present invention;
FIG. 2 is a schematic diagram of the construction of an original printed object provided by the present invention;
FIG. 3 is a schematic view of the overall process of printing barcodes according to the present invention;
FIG. 4 is a schematic structural diagram of a barcode printing apparatus according to the present invention;
fig. 5 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the production process of the modern engineering, the information of each product on the production line can be inquired through the bar code on the product. In the bar code printing process, the layout, font, etc. formed by the relevant information of the product and the bar code printing template of the relevant information in the production process of the product need to be determined in advance before printing. However, the factory production process cannot print the material codes used in the related production process based on the same template, and cannot manually adjust the printing template and fill the printing information each time the related information is printed. At present, the template printing is a more general technical scheme in the printing process, and the selectable modes comprise: the method comprises the steps of designing a form by using excel or word, filling corresponding printing information into the designed form by using a related program, converting the form into information which can be identified by a printer by using a related tool, and finally sending the information to the printer for printing.
In the existing printing process, a previewable printing program is used for printing, but the method is relatively inflexible and configurable, and in the template conversion process, due to poor interface design, the use performance cannot be expected, and further the efficiency of the production process is influenced; meanwhile, the printing process can not be embodied in an MES system, and the tracing of the product with problems according to the bar code at the later stage is not facilitated.
According to the bar code printing method provided by the invention, the printing program of the configurable template is used, so that on one hand, the modification of the printing program can be reduced, various templates can be configured, the bar code printing method can be used for a long time, and the printing is convenient; on one hand, in the adaptation of various printers, the printing can be started only by modifying the template and connecting the template with a database of the MES system.
Fig. 1 is a schematic flow chart of a barcode printing method provided by the present invention, and as shown in fig. 1, the present invention provides a barcode printing method, including:
step 101, determining an original printing template of a target product according to product type information of the target product;
in the invention, the layout and the font of the original printing template are preset in the previous period, and the part of the content mainly describes the basic properties of the product, which can be understood as the basic properties of the same product are consistent, so that the layout and the font can be kept unchanged in the subsequent printing process. In the invention, firstly, according to the type information of the product, the original printing template of the product is determined, such as a box bar code, a power supply bar code and the like of an intelligent refrigerator.
And 102, matching the order data of the target product with a preset database, and generating bar code printing content corresponding to the target product according to the field content obtained by matching.
In the invention, the order data of the product comprises information such as an order number, a product code label and an order date, and the information is stored in a preset database of an MES system, when the product is produced or maintained, the order data of the product is matched with the data of the preset database, if the matching is successful, the bar code printing of the product is required, and the bar code printing content is produced according to the matched field content. In the invention, the field content is a group of numbers generated based on the order number, the product code label and the order date after the matching is successful, besides, the preset database also stores the information of the workshop number, the assembly worker number and the like corresponding to the product, and the part of content can be added in the process of generating the bar code printing content in a preset combination mode.
And 103, replacing the original barcode printing content in the original printing template through the barcode printing content to obtain a target printing file.
In the invention, the original bar code printing template recognized by each printer can be output according to different printer programs. In the original barcode print template, original barcode print contents filled by a character string format (for example, @ xxx @ format) are set, and the layout and font of the original barcode print template may be set in advance. Then, the original barcode printing content in the original barcode printing template is replaced by the barcode printing content corresponding to the target product obtained in the above embodiment, so as to generate a target printing file.
And 104, printing according to the target printing file.
In the invention, an original printing template is constructed in a preset printing program, in the construction process, the content in a character string format is added into the template to serve as the original bar code printing content, then the original bar code printing content is replaced according to a target product, a target printing file is generated and then uploaded to an MES system, and the target printing file is sent to printing equipment for printing through the MES system.
Preferably, in an embodiment, after the content in the character string format is added into the template as the original barcode printing content, a prn file is generated and uploaded to the MES system; then, the original bar code printing content is replaced in the MES system to generate a target printing file, and a bar code printing command is sent to a corresponding printer through the MES system. Specifically, the printing device can be coupled to the MES system via associated logic and can query the MES system for associated barcode data and maintained template data, the template data comprising: the original template content, the label to be replaced (i.e. the bar code printing content), the label and the field corresponding relation of the preset database, and then the corresponding field content is inquired from the preset database, thereby completing the bar code printing according to the target printing file.
According to the bar code printing method provided by the invention, the bar code printing content corresponding to the product is obtained based on the mapping relation between the product and the database, so that the content in the original printing template is replaced, and then the bar code of the product is printed by the printing template after the content is replaced.
On the basis of the above embodiment, before the determining the original printing template of the target product according to the product type information of the target product, the method further includes:
acquiring a plurality of printing templates according to the bar code printing requirements of different products;
constructing original bar code printing content based on a character string format, wherein the original bar code printing content is replaceable bar code content;
and setting the original bar code printing content in a printing template to obtain an original printing template corresponding to each product.
Fig. 2 is a schematic diagram of a construction of an original printing target provided by the present invention, which can be referred to in fig. 2, after a preset printing program is installed, a template size is designed based on different product requirements through the printing program; then, filling the preset position of the template by using a group of character strings so as to construct original bar code printing content; and further, according to the template after the original bar code printing content is filled, generating a prn file through the printing program and uploading the prn file to the MES system, thereby configuring an original printing template corresponding to each finished product in the MES system.
On the basis of the above embodiment, the preset database is constructed by the following steps:
acquiring order data of each product, wherein the order data comprises an order number, a product code tag and an order date;
and constructing a preset database based on the mapping relation between the order data and the bar code printing content.
In the present invention, the order number and the product code tag of each product are fixed, and thus, the barcode print contents can be generated based on the order number and the product code tag. And generating a prefix part in the bar code according to the two order data, and then constructing a suffix part in the bar code according to the order date so as to construct a preset database according to the mapping relation. In each matching process, if order data of the target product exists in the preset database, generating barcode printing content based on the mapping relation. It should be noted that, in the present invention, the replaceable character string established by the MES system is used as a key according to the @ xxx @ character format, and value is the corresponding database table field, according to which the printer can query.
On the basis of the above embodiment, the matching the order data of the target product with a preset database, and generating the barcode print content corresponding to the target product according to the field content obtained by matching includes:
matching to obtain field contents of the order to be printed from the preset database according to the order number and/or the product code label of the target product;
and generating bar code printing content corresponding to the target product according to the field content and the order date of the target product.
In the invention, the preset database can automatically generate the bar code printing content according to the mapping relation between the order data and the bar code printing content. In one embodiment, the prefix part of the barcode print content can be generated according to the order number or the product code label, or the order number and the product code label can be combined into the prefix part of the barcode print content according to a preset barcode combination mode, and the prefix part is used as field content; then, an order date (the order date is a suffix part of the barcode print content) is added to the field content, thereby generating the barcode print content.
On the basis of the above embodiment, the replacing the original barcode print content in the original print template by the barcode print content to obtain the target print file includes:
and judging the bar code printing content, and replacing the original bar code printing content in the original printing template with the bar code printing content to obtain a target printing file if the bar code printing content meets the format requirement of a preset printing command through judgment.
In the invention, after generating the bar code printing content, the printing content needs to be compared with the printing command format requirement preset in the MES system for judgment, for example, whether the printing content exceeds the preset word number, whether the font meets the industrial requirement, and the like. And when the preset conditions are met, the contents of the original printing template are replaced, so that the bar code which does not meet the requirements in the printing process is avoided.
On the basis of the above embodiment, after the original barcode print content in the original print template is replaced by the barcode print content, the method further includes:
and generating a target printing file corresponding to each preset printer program according to the replaced original printing template based on a plurality of different preset printer programs.
In the invention, the printing file can be generated for different printer programs through the MES system according to the replaced original printing template without modifying the source code, thereby driving various printers to print the bar code.
On the basis of the above embodiment, after the printing according to the target print file, the method further includes:
and updating the preset database according to the printing template corresponding to the target printing file.
In the invention, the printing template generated for each product is stored in the preset database, when the bar code needs to be printed in the production process of the subsequent same product, because the products are the same (for example, the same order number and the product code label in a batch), the printing template is directly called for the subsequent product, and if the production cycle is longer (for example, the order is required to be completed for multiple days), the new printing template can be generated only by modifying the order date and the like.
Fig. 3 is a schematic view of an overall flow of a barcode printing process provided by the present invention, which can be referred to in fig. 3, and first, according to product information, an order of a product and a range of a barcode to be printed are queried; then, based on each order, further determining the range of the printed bar code, namely determining the printing content; then, according to the product, selecting a corresponding original printing template; the printing is confirmed on the MES system, the MES system judges the printing content, and when the printing condition of the MES system is met, the printing content is allowed to perform the subsequent bar code printing, otherwise, the printing is finished; when the printing content is confirmed to be correct, further expanding according to the printing content (more detailed bar code content can be inquired, such as a factory serial number, an operator work number and the like), and calling an original printing template selected at the early stage to replace the content in the template; and finally, generating a corresponding printing command according to the replaced template to print the bar code, and updating the printing template data in the MES system database.
The barcode printing apparatus provided by the present invention is described below, and the barcode printing apparatus described below and the barcode printing method described above may be referred to in correspondence with each other.
Fig. 4 is a schematic structural diagram of a barcode printing apparatus provided by the present invention, and as shown in fig. 4, the present invention provides a barcode printing apparatus, which includes an original printing template determining module 401, a barcode content generating module 402, a target printing file generating module 403, and a barcode printing module 404, where the original printing template determining module 401 is configured to determine an original printing template of a target product according to product type information of the target product; the barcode content generating module 402 is configured to match order data of the target product with a preset database, and generate barcode print content corresponding to the target product according to field content obtained through matching; the target print file generating module 403 is configured to replace, through the barcode print content, the original barcode print content in the original print template to obtain a target print file; the barcode printing module 404 is configured to print according to the target print file.
In the present invention, the original printing template determining module 401 determines an original printing template of a product, for example, a box barcode, a power barcode, and the like of an intelligent refrigerator, according to type information of the product. When a product is produced or maintained, the barcode content generating module 402 matches order data of the product with data of a preset database, and if the matching is successful, it indicates that barcode printing needs to be performed on the product; the barcode content generating module 402 then generates barcode print content according to the matched field content. In the invention, the field content is a group of numbers generated based on the order number, the product code label and the order date after the matching is successful, besides, the preset database also stores the information of the product corresponding to the workshop number, the assembly worker number and the like, and the barcode content generating module 402 can add the part of the content in the process of generating the barcode printing content in a preset combination mode.
Further, the target print file generating module 403 replaces the original barcode print content in the original barcode print template with the barcode print content corresponding to the target product obtained in the foregoing embodiment, so as to generate the target print file. Finally, the barcode print module 404 is coupled to the MES system and retrieves the associated barcode data and the maintained template data from the MES system, the template data comprising: the original template content, the label to be replaced (i.e. the bar code printing content), the label and the field corresponding relation of the preset database, and then the corresponding field content is inquired from the preset database, thereby completing the bar code printing according to the target printing file.
According to the bar code printing device, the bar code printing content corresponding to the product is obtained based on the mapping relation between the product and the database, so that the content in the original printing template is replaced, and then the bar code of the product is printed through the printing template after the content is replaced.
On the basis of the embodiment, the device further comprises a printing template generating module, an original barcode content constructing module and an original printing module constructing module, wherein the printing template generating module is used for acquiring various printing templates according to barcode printing requirements of different products; the system comprises an original barcode content construction module, a barcode content identification module and a barcode content identification module, wherein the original barcode content construction module is used for constructing original barcode printing content based on a character string format, and the original barcode printing content is replaceable barcode content; and the original printing module construction module is used for setting the original bar code printing content in a printing template to obtain an original printing template corresponding to each product.
In the invention, the printing template generation module sets the size of the template based on different product requirements; then, the original bar code content construction module is filled at a preset position of the template through a group of character strings, so that original bar code printing content is constructed; furthermore, the original printing module building module generates a prn file according to the template after the original barcode printing content is filled, and uploads the prn file to the MES system through a preset printing program, so that the original printing template corresponding to each product is configured and completed in the MES system.
On the basis of the embodiment, the device further comprises a database basic data acquisition module and a database construction module, wherein the database basic data acquisition module is used for acquiring order data of each product, and the order data comprises an order number, a product code label and an order date; and the database construction module is used for constructing a preset database based on the mapping relation between the order data and the bar code printing content.
In the invention, the order number and the product code label of each product are fixed, so that the order number and the product code label are obtained through the database basic data acquisition module, thereby generating the bar code printing content. Further, the database construction module generates a prefix part in the bar code according to the two order data, and then constructs a suffix part in the bar code according to the order date, so as to construct a preset database according to the mapping relation. In each matching process, if order data of the target product exists in the preset database, generating barcode printing content based on the mapping relation. It should be noted that, in the present invention, the replaceable character string established by the MES system is used as a key according to the @ xxx @ character format, and value is the corresponding database table field, and the printing program can query accordingly.
On the basis of the embodiment, the barcode content generating module comprises a matching unit and a barcode content processing unit, wherein the matching unit is used for matching field content of an order to be printed from the preset database according to the order number and/or the product code label of the target product; and the barcode content processing unit is used for generating barcode printing content corresponding to the target product according to the field content and the order date of the target product.
In the invention, the order data of the target product is matched with the data of the preset database through the matching unit, so that the mapping relation between the order data and the bar code printing content is obtained according to the matching result, and then the bar code printing content is automatically generated through the bar code content processing unit. In one embodiment, the barcode content processing unit may generate a prefix portion of the barcode print content according to the order number or the product code tag, or combine the order number and the product code tag into the prefix portion of the barcode print content according to a preset barcode combination mode, and use the prefix portion as field content; then, an order date (the order date is a suffix part of the barcode print content) is added to the field content, thereby generating the barcode print content.
On the basis of the above embodiment, the target print file generation module is further configured to determine the barcode print content, and if it is determined that the barcode print content meets a preset print command format requirement, replace the original barcode print content in the original print template with the barcode print content to obtain the target print file.
On the basis of the above embodiment, the apparatus further includes a print program file selection module configured to generate, based on a plurality of different preset printer programs, a target print file corresponding to each preset printer program according to the replaced original print template.
On the basis of the above embodiment, the apparatus further includes a database updating module, configured to update the preset database according to the print template corresponding to the target print file.
In one embodiment, a barcode printing apparatus provided by the present invention is explained in its entirety. Specifically, the original printing template determining module 401 queries the order of the product and the range of the bar code to be printed according to the product information, and selects a corresponding original printing template; then, the barcode content generating module 402 further determines the range of the printed barcode based on each order, i.e. determines the print content; then, printing is confirmed on the MES system, and the MES system further determines the printing content, and when the printing condition of the MES system is satisfied, the target printing file generating module 403 allows the printing content to perform subsequent barcode printing, otherwise, this printing is finished; when the print content is confirmed to be correct, the print content may be preferably expanded according to the print content (by querying more detailed barcode content, such as a factory serial number, an operator job number, etc.), and then the target print file generation module 403 may invoke the original print template selected in the previous stage to replace the content in the template; finally, the barcode printing module 404 generates a corresponding printing command according to the replaced template to perform barcode printing, and updates the printing template data in the MES system database.
According to the invention, based on the mapping relation between the product and the database, the bar code printing content corresponding to the product is obtained, so that the content in the original printing template is replaced, and then the bar code of the product is printed through the printing template after the content is replaced.
The apparatus provided by the present invention is used for executing the above method embodiments, and for details and flow, reference is made to the above embodiments, which are not described herein again.
Fig. 5 is a schematic structural diagram of an electronic device provided in the present invention, and as shown in fig. 5, the electronic device may include: a processor (processor) 501, a communication interface (communication interface) 502, a memory (memory) 503 and a communication bus 504, wherein the processor 501, the communication interface 502 and the memory 503 are communicated with each other through the communication bus 504. The processor 501 may invoke logic instructions in the memory 503 to perform a barcode printing method, the method comprising: determining an original printing template of a target product according to product type information of the target product; matching the order data of the target product with a preset database, and generating bar code printing content corresponding to the target product according to the field content obtained by matching; replacing the original bar code printing content in the original printing template through the bar code printing content to obtain a target printing file; and printing according to the target printing file.
In addition, the logic instructions in the memory 503 may be implemented in the form of software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention or a part thereof which substantially contributes to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform a barcode printing method provided by the above methods, the method comprising: determining an original printing template of a target product according to product type information of the target product; matching the order data of the target product with a preset database, and generating bar code printing content corresponding to the target product according to the field content obtained by matching; replacing the original bar code printing content in the original printing template through the bar code printing content to obtain a target printing file; and printing according to the target printing file.
In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, the computer program being implemented by a processor to perform the barcode printing method provided in the above embodiments, the method including: determining an original printing template of a target product according to product type information of the target product; matching the order data of the target product with a preset database, and generating bar code printing content corresponding to the target product according to the field content obtained by matching; replacing the original bar code printing content in the original printing template through the bar code printing content to obtain a target printing file; and printing according to the target printing file.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. Based on the understanding, the above technical solutions substantially or otherwise contributing to the prior art may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the various embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, and not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (9)

1. A method of printing a barcode, comprising:
determining an original printing template of a target product according to product type information of the target product;
matching the order data of the target product with a preset database, and generating barcode printing content corresponding to the target product according to the field content obtained by matching;
replacing the original bar code printing content in the original printing template through the bar code printing content to obtain a target printing file;
printing according to the target printing file;
the step of matching the order data of the target product with a preset database and generating the barcode printing content corresponding to the target product according to the field content obtained by matching comprises the following steps:
matching to obtain field contents of the order to be printed from the preset database according to the order number and/or the product code label of the target product; the field content is a prefix part of bar code printing content generated according to an order number and/or a product code label; or the field content is a prefix part of the bar code printing content obtained by combining the order number and the product code label according to a preset bar code combination mode;
and taking the order date of the target product as a suffix part of the bar code printing content, and generating the bar code printing content corresponding to the target product according to the field content and the order date.
2. The barcode printing method according to claim 1, wherein before the determining of the original printing template of the target product according to the product type information of the target product, the method further comprises:
acquiring a plurality of printing templates according to the bar code printing requirements of different products;
constructing original bar code printing content based on a character string format, wherein the original bar code printing content is replaceable bar code content;
and setting the original bar code printing content in a printing template to obtain an original printing template corresponding to each product.
3. The method of printing barcodes of claim 1, wherein the preset database is constructed by:
acquiring order data of each product, wherein the order data comprises an order number, a product code tag and an order date;
and constructing a preset database based on the mapping relation between the order data and the bar code printing content.
4. The barcode printing method according to claim 1, wherein the replacing the original barcode printing content in the original printing template with the barcode printing content to obtain a target printing file comprises:
and judging the bar code printing content, and replacing the original bar code printing content in the original printing template with the bar code printing content to obtain a target printing file if the bar code printing content meets the format requirement of a preset printing command through judgment.
5. The method of barcode printing according to claim 4, wherein after said replacing original barcode print content in said original print template by said barcode print content, said method further comprises:
and generating a target printing file corresponding to each preset printer program according to the replaced original printing template based on a plurality of different preset printer programs.
6. The method of printing barcodes according to claim 1, wherein after said printing according to said target print file, the method further comprises:
and updating the preset database according to the printing template corresponding to the target printing file.
7. A barcode printing apparatus, comprising:
the original printing template determining module is used for determining an original printing template of a target product according to the product type information of the target product;
the barcode content generating module is used for matching the order data of the target product with a preset database and generating barcode printing content corresponding to the target product according to the field content obtained by matching;
the target printing file generation module is used for replacing the original bar code printing content in the original printing template through the bar code printing content to obtain a target printing file;
the bar code printing module is used for printing according to the target printing file;
the barcode content generating module is specifically configured to:
matching to obtain field contents of the order to be printed from the preset database according to the order number and/or the product code label of the target product; the field content is a prefix part of bar code printing content generated according to an order number and/or a product code label; or the field content is a prefix part of the bar code printing content obtained by combining the order number and the product code label according to a preset bar code combination mode;
and taking the order date of the target product as a suffix part of the bar code printing content, and generating the bar code printing content corresponding to the target product according to the field content and the order date.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the barcode printing method according to any one of claims 1 to 6 when executing the computer program.
9. A non-transitory computer-readable storage medium on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the barcode printing method according to any one of claims 1 to 6.
CN202111254735.3A 2021-10-27 2021-10-27 Bar code printing method and device Active CN114132091B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111254735.3A CN114132091B (en) 2021-10-27 2021-10-27 Bar code printing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111254735.3A CN114132091B (en) 2021-10-27 2021-10-27 Bar code printing method and device

Publications (2)

Publication Number Publication Date
CN114132091A CN114132091A (en) 2022-03-04
CN114132091B true CN114132091B (en) 2023-03-31

Family

ID=80394626

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111254735.3A Active CN114132091B (en) 2021-10-27 2021-10-27 Bar code printing method and device

Country Status (1)

Country Link
CN (1) CN114132091B (en)

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE4309750C2 (en) * 1993-03-26 1995-08-24 F & O Elektronic Systems Gmbh Process for printing labels
JP4132029B2 (en) * 2002-07-16 2008-08-13 株式会社サイバーネット Web printing system
AU2014201619A1 (en) * 2013-03-15 2014-10-02 Sticker-Art Pty. Ltd. Personalisation of printed material
CN106355219A (en) * 2016-08-22 2017-01-25 金蝶软件(中国)有限公司 Material label barcode updating method, device, PDA and warehouse management system
CN107766900B (en) * 2017-09-11 2021-05-28 深圳市共进电子股份有限公司 Method, system and computing device for printing bar code
CN107728967A (en) * 2017-11-13 2018-02-23 成都创慧科达科技有限公司 It is a kind of can Automatic Typesetting printer sharing and printer sharing composition method
CN108215521B (en) * 2017-12-18 2019-07-26 深圳市双翼科技股份有限公司 The online Method of printing of label, apparatus and system
CN109919259A (en) * 2019-02-21 2019-06-21 苏州宏软信息技术有限公司 A kind of universal bar code printer system and method for industrial products retrospect
CN111775572A (en) * 2020-07-17 2020-10-16 浪潮商用机器有限公司 Method and related device for replacing label printer content
CN111783414A (en) * 2020-07-20 2020-10-16 上海乾臻信息科技有限公司 Label printing template generation method and device
CN112416267A (en) * 2020-10-30 2021-02-26 山东浪潮通软信息科技有限公司 Configurable printing data processing method and device
CN112496553A (en) * 2020-11-20 2021-03-16 航天信息股份有限公司 Method and system for printing card based on printing template
CN112486436A (en) * 2020-12-18 2021-03-12 上海中通吉网络技术有限公司 HTML dynamic filling data printing instruction generation method, system and printer
CN112669110A (en) * 2020-12-29 2021-04-16 苏州浪潮智能科技有限公司 Server label management method and related equipment

Also Published As

Publication number Publication date
CN114132091A (en) 2022-03-04

Similar Documents

Publication Publication Date Title
CN107256005B (en) BIM technology-based steel bar numerical control machining method and equipment
US5119307A (en) Method and system for automated bill-of-material generation
CN100341017C (en) Ratio calculating method of label printing system for suing printing plate
CN102662352B (en) System and method for automatically recording geometric parameters of numerical-control tools
CN108229614B (en) Label generation method, computer readable storage medium and system
JP2017207830A (en) Information processing device which processes processing information between a plurality of manufacturing cells
CN112810323B (en) System and method for marking identification code
CN104200300A (en) Packaging and printing enterprise production cost estimation system
CN112669110A (en) Server label management method and related equipment
CN107463710A (en) The order production process typing inquiry system applied based on wechat barcode scanning and public number
CN114132091B (en) Bar code printing method and device
CN108989382A (en) Method for replacing and/or cloning at least some equipment of machine
CN110941251A (en) Production control method, device, equipment and medium based on digital twin body
US20050010325A1 (en) Computer-aided manufacturing system and method for sheet-metal punching
CN112149764A (en) Printing method of label printing system and label printing system
CN111581456A (en) JSON character string comparison method, device, equipment and storage medium
CN113619291A (en) Online label printing system and printing method thereof
CN112785134B (en) Production plan management system and method for butt joint robot spraying operation
US20170336778A1 (en) On-demand tool kits
JP2017087690A (en) Printer, printer system, printer control method, and program
US11017596B2 (en) Methods, devices, and systems for part-to-build
CN114193940A (en) Bar code label printing method and system
CN107728965B (en) Method and system for automatically printing Chinese characters by bar code printer
CN113033169A (en) Service data processing method and device
CN115600998B (en) Process management method and system based on production management platform and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant