CN114417787A - Material code generation method, material code management system and storage medium - Google Patents
Material code generation method, material code management system and storage medium Download PDFInfo
- Publication number
- CN114417787A CN114417787A CN202210071886.3A CN202210071886A CN114417787A CN 114417787 A CN114417787 A CN 114417787A CN 202210071886 A CN202210071886 A CN 202210071886A CN 114417787 A CN114417787 A CN 114417787A
- Authority
- CN
- China
- Prior art keywords
- code
- codes
- coding
- database
- rule
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
- G06F40/126—Character encoding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2291—User-Defined Types; Storage management thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/242—Query formulation
- G06F16/2433—Query languages
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Audiology, Speech & Language Pathology (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Software Systems (AREA)
- Mathematical Physics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention provides a material code generation method, a material code management system and a storage medium, comprising the following steps: s101, defining a coding mapping rule, wherein the coding mapping rule comprises the following steps: a mapping rule of the rule code; the rule-coded mapping rule comprises: an input item and an output item, the input item comprising: attribute features of the material, the output items including: regular material coding; s102, receiving the attribute characteristics of the provided materials; s103, converting key attributes, categories, types and technical routes in the attribute characteristics of the provided materials into corresponding characteristic codes; s104, automatically generating a random code; s105, combining all the feature codes and the random codes together to form a new code; s106, the newly generated codes are stored in the database after being checked for duplication; the invention has the beneficial effect of being capable of uniformly managing materials with different attributes, and is suitable for the field of material management.
Description
Technical Field
The invention relates to the technical field of material management, in particular to a material code generation method, a material code management system and a storage medium.
Background
Currently, a large number of material products are stocked and accumulated in a production process by a process department, and each material needs to be coded in order to uniformly manage the materials; at present, however, the coding management of materials mainly depends on manual input of excel tables, and the result efficiency is low and the error rate is high; some enterprises try to encode the materials by using the encoding rules, but because the uniform encoding rules are not available, the special codes which do not conform to the encoding rules are included, and the materials with different attributes cannot be uniformly managed, the cost of the enterprises in various aspects such as labor and time is increased.
Disclosure of Invention
Aiming at the defects in the related technology, the technical problem to be solved by the invention is as follows: a material code generation method, a material code management system and a storage medium capable of uniformly managing materials with different attributes are provided.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
the material code generation method comprises the following steps:
s101, defining a coding mapping rule, wherein the coding mapping rule comprises the following steps: a mapping rule of the rule code; the rule-coded mapping rule comprises: an input item and an output item, the input item comprising: attribute features of the material, the output items including: regular material coding;
s102, receiving the attribute characteristics of the provided materials;
s103, converting key attributes, categories, types and technical routes in the attribute characteristics of the provided materials into corresponding characteristic codes;
s104, automatically generating a random code;
s105, combining all the feature codes and the random codes together to form a new code;
and S106, the newly generated codes are stored in the database after being checked for duplication.
Preferably, the method further comprises the following steps:
s107, receiving an original code of the material, wherein the original code is an irregular code;
s108, the original code is checked for duplication in the database, if the original code does not appear in the database, the original code is used as the material code of the material and is stored in the database, and if not, the material is recorded.
Preferably, the regular material coding comprises: the system comprises a letter coding section and a number coding section, wherein the letter coding section is a characteristic code number corresponding to key attribute characteristics, category characteristics, type characteristics and technical route characteristics of a material; the digitally encoded segments are random codes generated for the provided material.
Preferably, in step S106, after the newly generated code is duplicated in the database, the newly generated code is stored in the database, and the method specifically includes:
s1061, checking the newly generated code in a database, if the newly generated code does not appear in the database, storing the newly generated code in the database as a regular material code of the material, otherwise, indicating that the same type of code exists, and executing the step S1062;
s1062, judging whether other attributes of the material corresponding to the new code are consistent with other attributes of the material corresponding to the same type of code, if so, indicating that the material is recorded, otherwise, executing the step S1063;
and S1063, processing the digital coding sections of the same type of codes to obtain processed regular material codes and storing the regular material codes in a database.
Preferably, the other properties of the material include: name, specification, brand, model, unit, quantity, application model, picture, and remark information.
Accordingly, an item code management system, comprising:
the code entry module is used for receiving the characteristics of the provided materials, generating corresponding new codes for the characteristics of the materials based on the code mapping rule and storing the new codes in the database;
wherein: the encoding mapping rule comprises: a mapping rule of the rule code; the rule-coded mapping rule comprises: an input item and an output item, the input item comprising: attribute features of the material, the output items including: regular material coding;
the code maintenance module is used for adding, deleting and updating the code mapping rule;
the BOM maintenance module is used for performing addition, deletion, version conversion, query and export operations on a BOM list;
and the user management module is used for setting system users at different levels and distributing corresponding authorities to the users at different levels.
Preferably, the different levels of system users set in the user management module include: primary users, secondary users, common users and user administrators.
Accordingly, a storage medium having stored therein a plurality of instructions adapted to be loaded by a processor and to perform a material code generation method as described above.
The invention has the beneficial technical effects that:
1. in the invention, a coding mapping rule is set, and key attributes, categories, types and technical routes of the materials are used as input items, so that the method has the advantages of simple and clear coding compared with the tedious and complicated coding caused by the traditional mode that all attributes of the materials are coded.
2. In the invention, the code mapping rule is set, so that when the materials are input into the system, the code segments can be automatically synthesized according to the set rule, which is favorable for correctly identifying the materials and comprehensively managing the materials.
3. In the invention, the existing codes are inquired before the material codes are generated, so that the code repetition is avoided.
4. The method changes the traditional code management mode of manually inputting Excel, which is time-consuming, labor-consuming and easy to make mistakes, into the mode of inputting codes by using a material code management system, generates unique codes of materials after checking and filling related attributes through a rule defined in advance, and can also inquire whether newly input materials are repeated with the existing materials, thereby avoiding input redundancy; the system provided by the invention uniformly manages the material codes, is beneficial to the effective identification and reasonable use of the materials by the staff using the system, and can reduce the labor cost for generating the material codes, so that the classification and operation process of the company materials are more orderly, and the comprehensive management of the materials is enhanced.
Drawings
Fig. 1 is a schematic flow chart of a material code generation method according to an embodiment of the present invention;
FIG. 2 is an exemplary diagram of regular material coding in an embodiment of the present invention;
FIG. 3 is a flowchart illustrating step S105 according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a material coding management system according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a material coding management system according to a second embodiment of the present invention;
FIG. 6 is a diagram illustrating different levels of system user permissions in an embodiment of the present invention;
in the figure: 10 is a code entry module, 20 is a code maintenance module, 30 is a BOM maintenance module, and 40 is a user management module;
101 is a single recording module, and 102 is a batch recording module;
201 is a help document management module, 202 is an application machine type adding module, 203 is a coding mapping rule adding module, and 204 is a coding management module;
301 is a BOM deletion module, 302 is a BOM conversion generation module, 303 is a BOM import module, 304 is a BOM query module, and 305 is a BOM export module;
401 is adding user modules, 402 is deleting user modules, and 403 is modifying user modules.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments, 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.
Next, the present invention will be described in detail with reference to the drawings, wherein the cross-sectional views illustrating the structure of the device are not enlarged partially according to the general scale for convenience of illustration when describing the embodiments of the present invention, and the drawings are only examples, which should not limit the scope of the present invention. In addition, the three-dimensional dimensions of length, width and depth should be included in the actual fabrication.
An embodiment of the present invention is described in detail below with reference to the accompanying drawings.
Example one
As shown in fig. 1, the method for generating the material code includes the following steps:
s101, defining a coding mapping rule, wherein the coding mapping rule comprises the following steps: a mapping rule of the rule code; the rule-coded mapping rule comprises: an input item and an output item, the input item comprising: attribute features of the material, the output items including: regular material coding;
s102, receiving the attribute characteristics of the provided materials;
s103, converting key attributes, categories, types and technical routes in the attribute characteristics of the provided materials into corresponding characteristic codes;
s104, automatically generating a random code;
s105, combining all the feature codes and the random codes together to form a new code;
and S106, the newly generated codes are stored in the database after being checked for duplication.
Fig. 2 is an exemplary diagram of a rule material code in the embodiment of the present invention, and as shown in fig. 2, the rule material code includes: the system comprises a letter coding section and a number coding section, wherein the letter coding section is a characteristic code number corresponding to key attribute characteristics, category characteristics, type characteristics and technical route characteristics of a material; the digital coding segment is a random code generated for the provided material; wherein the random code number may be generated by sequential numbers.
In this embodiment, the regular material code may be formed by combining six letters and two digits.
The traditional mode is long and complicated in coding caused by the fact that all attributes of materials are coded, the material coding of the invention converts main characteristics of the materials into characters to serve as coding basis, so that the used coding rule is simple and clear, meanwhile, products of different brands and specifications and the like of the same type are distinguished through two-digit coding of the last digit, the coding rule can be customized according to specific production requirements, and the application is flexible.
Generally, when the material is managed, the method further comprises the following steps: irregular codes which are already put into production and used and are inconvenient to modify; when the irregular code is used, the irregular code can be recorded into a system through the following steps:
s107, receiving an original code of the material, wherein the original code is an irregular code;
s108, the original code is checked for duplication in the database, if the original code does not appear in the database, the original code is used as the material code of the material and is stored in the database, and if not, the material is recorded.
In the embodiment, the original codes and other characteristic attributes of the materials can be obtained in a mode of scanning bar codes or two-dimensional codes arranged on the materials; similar to irregular encoding, all data is saved to the database after duplication is checked by encoding.
Further, as shown in fig. 3, in step S106, after the newly generated code is found in the database, the step saves the newly generated code in the database, and specifically includes:
s1061, checking the newly generated code in a database, if the newly generated code does not appear in the database, storing the newly generated code in the database as a regular material code of the material, otherwise, indicating that the same type of code exists, and executing the step S1062;
s1062, judging whether other attributes of the material corresponding to the new code are consistent with other attributes of the material corresponding to the same type of code, if so, indicating that the material is recorded, otherwise, executing the step S1063;
and S1063, processing the digital coding sections of the same type of codes to obtain processed regular material codes and storing the regular material codes in a database.
In this embodiment, other attributes of the material include: name, specification, brand, model, unit, quantity, application model, picture, and remark information.
The invention also provides a material coding management system.
As shown in fig. 4, the material coding management system includes:
the code entry module 10 is used for receiving the characteristics of the provided materials, generating corresponding new codes according to the characteristics of the materials based on the code mapping rules, and storing the new codes in the database;
wherein: the encoding mapping rule comprises: a mapping rule of the rule code; the rule-coded mapping rule comprises: an input item and an output item, the input item comprising: attribute features of the material, the output items including: regular material coding;
the code maintenance module 20 is used for adding, deleting and updating the code mapping rules;
a BOM maintenance module 30, configured to perform operations of adding, deleting, version conversion, query, and export on a BOM list;
and the user management module 40 is used for setting system users of different levels and distributing corresponding authorities to the users of different levels.
Specifically, the different levels of system users set in the user management module 40 include: primary users, secondary users, common users and user administrators.
In the embodiment, accounts with different permissions can be created according to different users, and the permissions are a primary user, a secondary user, a common user and a user manager from large to small; when an account is created, four kinds of information of an account name, an account password, a belonging department and an account authority need to be created; the design aims to ensure that different system users have different operation authorities so as to be convenient for the use of different requirements of different departments and the safety guarantee of material coding information; the feature is that the user's rights are hierarchical recursive.
As shown in fig. 6, in consideration of the present matter, the permissions of the primary user include: user adding, user modifying, user deleting, irregular code inputting, regular code inputting, code deleting, code query exporting, BOM importing, BOM converting and BOM deleting;
the secondary user's rights include: irregular code input, regular code input, code query export and BOM query export;
the rights of the general user include: inputting a rule code, inquiring and exporting a code, and inquiring and exporting BOM;
user administrator privileges include: user addition, user modification and user deletion.
As shown in fig. 5, in this embodiment, the code entry module 10 includes: a single logging module 101 and a batch logging module 102;
the code maintenance module 20 includes: a help document management module 201, an application model adding module 202, a coding mapping rule adding module 203 and a coding management module 204;
the BOM maintenance module 30 includes: a BOM deleting module 301, a BOM conversion generating module 302, a BOM importing module 303, a BOM inquiring module 304 and a BOM exporting module 305;
the user management module 40 includes: add user module 401, delete user module 402, modify user module 403.
In the code maintenance module 20, the primary user has the authority to add the code mapping rule and add the application model, and corresponding operations can be performed through the application model adding module 202 and the code mapping rule adding module 203, such as: the coding rule meeting the actual needs of the company is preset through a coding mapping rule adding module 203;
the code management module 204 can display all the entered code information, can also enable users with different authorities to perform screening, inquiring, editing, deleting and proofreading functions in corresponding authorities on the entered material codes, and can also export the code information in batches into excel form files; the primary user confirms the newly input code, corrects the material information and the confirmation of the input person, and the confirmed material is displayed in a code management table;
the help document management module 201 is a usage specification of the system, and replacement management of the help document can be performed according to the continuous update iteration of the system.
In order to facilitate maintenance and management of the bill of material, in this implementation, the BOM maintenance module 30 is to implement functions of adding, deleting, version conversion, query and export of the BOM bill; meanwhile, the BOM import module 303 may import a BOM file of a certain format and convert the BOM file into a process BOM file, where the column information of the research and development BOM file at least needs to include the column information of the material name.
When the invention is used, if uncoded products need to be recorded, after logging in the system,
firstly, property options corresponding to the product are selected from types, categories, attributes and technical routes in an encoding mapping rule adding module 203, and a letter encoding section is automatically formed by the system; clicking a query button to check the information of the same type of products existing in the database;
secondly, manually inputting other attributes of the product, including name, specification, brand, model, unit, quantity, application machine type, picture and remark information, and completing the input of other attributes;
thirdly, the system queries the generated letter code segment in a database, and if the database does not contain products of the same type, the digital code of the product is set to be 01; if the same type of codes exist in the database, searching and judging whether completely consistent data exists or not one by one according to other attribute data of the product; if the product exists, the product is recorded into the database, and the system can prompt that the product is put into the database; if the code does not exist, finding the maximum digital code item in the codes of the same type, and adding 1 to the number to be used as a digital code section of a newly recorded product; and finally, combining the character coding section and the digital coding section to form the coding information of the newly input material.
In addition, when the existing products with irregular codes are recorded, the codes and other attributes of the products can be manually input, the system inquires whether the same code attribute information exists in the database, if so, the codes are prompted to exist, and if not, the codes are continuously recorded into the database for storage.
Hereinafter, key codes of the material code management system according to the present invention are shown below.
In this embodiment, a MaterialInfo table and an IrregularCode table may be used to store the regular code and the irregular code, respectively;
1) the method comprises the steps that a first-level user defines letter mapping rules of types, categories, attributes and application models (technical routes) and stores the letter mapping rules in an Mclass table, a Mattr table, an Mtype table and an Mtech table respectively, the front end of a system obtains mapping rule data information from each table of a database through a get _ selections interface, analyzes two field attributes of entry and abc in the tables and displays the name attribute entry in a page. When the user selects the name attribute, the data passed to the back end will automatically match the letter attribute abc corresponding to the name attribute.
2) When a single rule code is input, a user selects the four property options of the material, a data list selected by the user is transmitted back to the rear end through a regular _ search interface, the rear end receives the data and converts the data into letter attributes, then the letters are combined to form a six _ code ═ mattr + mclass + mtype + mtech, the result of the six _ code is inquired into a MaterialInfo data table, if the same code exists, other inquired information of the material is displayed in a page, the information is stored in a name, code, spec, brand, model, match, and image list, the front end is transmitted back, and the user is prompted to find a similar code'; if not, prompting that similar codes do not exist, and entering the next operation; after a user manually inputs names, specifications, brands, models, units, quantities, application models, pictures and remark information of materials, the user clicks and inputs the names, the specifications, the brands, the models, the units, the quantities, the application models, the pictures and the remark information, the back end acquires all the input information through a single _ regular _ codein interface, and data of the materials are transmitted into a data table MaterialInfo.
3) When a single irregular code is entered, a user acquires (for example, acquires by scanning) or inputs a code sequence, clicks a query, and queries the irregular code table through an irregular _ search interface, as follows: objects filter (mcode __ contacts ═ irregular _ code); if the same codes exist, returning prompt information and displaying the recorded material information, if the same codes do not exist, inputting the property information of the material in the second step, clicking and recording the received data in the single _ predetermined _ codein interface, searching and comparing the data again, and if the same materials exist after comparison, returning the information prompt, and if the same materials do not exist, storing the information in the data table Irregularcode.
4) When typing other attributes, when typing the picture of material, acquire with FILES, for preventing the material from introducing into new material picture and covering the picture before when the modification, use the mode of concatenation picture timestamp to solve, following code statement: strftime ('% Y% M% d% H% M% S% f'),
image _ name ═ datetime. now (), stroftime ('% Y% M% d% H% M% S% f') + image.name; wherein Img information Img. chunks () is written to a file in the form of a binary stream.
5) When a batch rule code is imported, a user clicks and uploads an Excel file with a given writing format from an interface, a front-end system analyzes document data by using a reader, a readasarraybuffer (this. file), and converts the data into a json format in an XLSX, utilis, sheet _ to _ json mode, wherein the json format is convenient for transmitting the data to a back end; transferring the converted data through an interface many _ regular _ codein; after the back end receives the data, whether the file format is correct or not is judged, and if the file format is incorrect, the form data is indicated to be incorrect. If the code is correct, the codes of the materials in the table are put into a code table, the codes are compared with the recorded data in the data table MaterialInfo, and the code statement: objects filter (codec) is provided; if the same codes exist, the positions of the tables where the same codes are located are returned, and the fact that the batch entry fails is prompted. And if no repeated coding exists, assigning the incoming data to code, name, spec, unit, size, match, brand, type and comment fields respectively, storing the fields into the MaterialInfo, and prompting that the entry is successful.
6) The import batch irregular code is similar to the import batch regular code, and is different from the import of the many _ irregular _ code through an interface, whether data is repeated is searched in an irregular code table, and a code statement: exists code objects filter, and finally adds the correct data to the irregular code data table.
In this embodiment, the material code of the system is composed of eight digits, wherein the first six digits are the letter combination, and the last two digits are the number combination. The method comprises the steps that a six-bit letter combination is submitted to a system by a user, the system inquires whether a letter code identical to the submitted letter code exists in a MaterialInfo table through a make _ code interface, if so, a sort () function is used for sorting inquired material codes according to number combinations to find out one with the largest number combination, the number is added with 1, and then an apend () function is used for adding the letter combination of newly-recorded data, and the letter combinations are combined into eight-bit codes together; considering the variety change of the materials in practice, the maximum number combination is set to be 99, so that the change of the materials is met and the overlong code is not caused. If the MaterialInfo table has no same letter code, the digit combination is directly added to the newly-recorded data to be 01.
When the function of the coding mapping rule management module is realized:
7) selecting rules to be added in types, categories, attributes and technical routes by a user, and inputting rule contents;
receiving data of a user through an add _ map interface, inquiring the name of a rule in a Match table storing the rule, and carrying out code statement: old _ entry ═ match [ type ]. objects.filter (entry ═ entry); if the names are the same, returning to prompt that the material name attribute exists; if not, the rule name is stored in the entry field, the letter represents that the rule name is stored in the abc field, and the code statement: match [ type ]. objects create (entry, abc ═ abc).
The well-defined encoding rules are displayed in a page through a get _ map _ list interface, and the interface acquires all mapping rules in a Match table, and the code statement: map ═ match [ type ]. objects.all (), and the total number of rules code statement: total _ maps ═ len (maps). And assigning map _ id in the rule to id, assigning map _ entity to entity, assigning map _ abc to abc, and returning the result to the front end.
8) When a user deletes the coding rule, the id value of the rule returned to the back end through the front end, and the code statement: finding and deleting the data in a Match table, calculating a new rule quantity new _ total, and returning the new rule quantity new _ total to the front-end prompt information and a new total value; otherwise, prompting the deletion rule to delete the failure information.
9) When a user adds an application model, the user manually inputs the name of the application model, the name is transmitted to the back end through the add _ match interface, and the code statement: match [ 'match _ info' ] [ 'match' ]; the back end inquires the received Match data in a data table Match, judges whether the stored data exists or not, returns an information prompt if the stored data exists, adds the data into the Match table if the stored data does not exist, and codes: object, create (name) match;
displaying an application model: acquiring all data of the application model through a getmathhlist interface, wherein the code statement: objects, all (), and the number of rules total _ match, code statement: total _ match ═ len (matches). Analyzing database data, assigning id to match.id, assigning name to match, and returning a result, wherein the code statement: match _ info { 'id {' match.id, 'match': match.name }, and match _ info.
When the user deletes the application model, the id value returned by the delete _ Match interface is inquired in the Match table, and the code statement: object.filter (id ═ id). delete (). If the rule total number does not exist, returning an information prompt, if the rule total number exists, deleting the data, recalculating the rule total number, and returning a deletion success prompt and a new rule total number.
When the function of the material coding management module is realized:
10) and (3) encoding and querying: the method comprises the steps that a user inputs query contents, the front end transmits input content queryiinfo, data size pagesize in each page and page total number pagenum to the rear end through a get _ code _ by _ info interface, the rear end establishes four data tables according to query data and respectively provides new _ regular _ codes, old entry regular codes old _ regular _ codes, new _ irregular _ codes and old entry irregular codes old _ irregular _ codes for returned results. The old and new of the data table indicates whether the data is confirmed by the relevant user. If the data meeting the query conditions are in the new _ regular _ codes table, returning item-by-item information and total material data of the materials in the data table, and if no material picture information exists, returning the picture to be null. And if other data tables are inquired, the operation is similar, and the front-end display is returned.
11) And (3) encoding modification: firstly, acquiring material information, transmitting id and is _ regulated information through an interface get _ code _ by _ id, inquiring material data in a MaterialInfo table according to an id value if a field is _ regulated is 1, and performing the same inquiry in an Irregulated code table if is _ regulated is 0; the application model information of the material is inquired in the Match table according to the id, and finally, the application model information is returned to the front end to display all material information corresponding to the id; submitting data after the user finishes modification, transmitting the modified data to the back end through an edge _ code interface, judging the modified data by the back end according to the is _ regular value, and modifying the corresponding data in the MaterialInfo according to the id value if the modified data is in a rule table, namely the is _ regular is 1; if is _ regular is 0, then modify in the irregular table irregular code.
12) And (3) code deletion: the user deletes the material information, considering the possibility of deleting after searching, and transmits a search value info, a coding rule or not value is _ regular and a data size pagesize of each page to the back end through a delete _ code interface; firstly, judging according to the value of is _ regular, if is _ regular is 1, storing the material picture data in the data in a delist table according to an id value in a rule table MaterialInfo, if the delist table is not empty, dividing the picture data character string into a character string array, deleting the picture data, and then deleting the data from the data table MaterialInfo; if dellist is empty, the id data is directly deleted; if is _ regular is 0, then the data is in the irregular encoding table, and the data is processed in the same way as if is _ regular is 1; and respectively inquiring the obtained search result data in the regular table and the irregular table by the search value info, acquiring the total number of new data after deleting operation is executed, and calculating the paging value of the new data.
13) And managing material pictures. The user can modify the picture information of the material information, the front end needs to judge whether the operation of the user is addition or deletion, and the following parameters are transmitted to the rear end: whether the added is field is an is _ add field or not, whether the deleted is field is an is _ del field or not, a material id value of operation, whether a material coding rule is an is _ regular field or not, and a del _ list table and an add _ list table which are generated during adding and deleting respectively; after receiving, the back end judges whether the encoding rule of the operation material is regular or not according to the is _ regular field, if the encoding rule is regular encoding, the original picture information of the material is searched in a MaterialInfo table according to an id value and is stored in an old _ img _ list table, and if the table has a value, the material is divided into character string arrays; if the code is irregular, the same treatment is carried out in an IrregularCode table; judging whether the operation is adding or deleting according to the values of the is _ add and the is _ del, if the operation is adding, splicing a timestamp for the picture name in order to prevent the newly added picture from covering the original picture, and writing the timestamp into a file for storage by using binary stream; if the deletion is performed, the image address delurl in the dellist is removed.
14) Material authentication: the newly input material information needs to be confirmed by a primary user to be formally put in storage, and the operation is to ensure the safety and the accuracy of the material information put in storage. The front end transmits an id value and an is _ regular value to the back end through a confirm _ code interface, if the is _ regular is 1, a material information is _ new value corresponding to the id value is set to be 0 in a rule table MaterialInfo, and meanwhile, the name of an operator is stored as a record according to a login user name; if is _ regular is 0, the irregular table is processed.
15) Export to Excel table: the user can export selected material data into an Excel form, a header information table tHeader and a corresponding field name table filtVal of the Excel form are predefined by the system, a JSON formatting tool formJson is used for carrying out format corresponding matching on the selected data and the header field names, the formatted data is assigned to the data, the data and the tHeader are exported into a final Excel form by an export _ JSON _ to _ Excel method, and the code statement: export _ json _ to _ excel (tHeader, data, 'BOM export table'), the third parameter of the statement defines the name of the export table.
When the function of the help document management module is realized, the help document provides an instruction manual for developers to use the system, and when the update iteration of the system is changed in function, the help document needs to be updated timely. The front end uploads the pdf file by using an el-upload component, the back end receives file information through a help _ pdf _ main interface, removes the old version of the help document, reads the content of the file through a file.chunks () method, and writes the content into a database to store f.write (i).
When the function of the BOM maintenance module is realized:
16) BOM version management: the information for displaying the BOM file in the page comprises the file name and the version number of the file and the information of the corresponding application model, and a user can upload, download and delete the BOM file.
When a user uploads, data of an application machine type is selected in a drop-down selection box, a version number is input, a local BOM file is uploaded, the data is transmitted to the rear end through an adddomfile interface, the rear end receives the data, uploading time is analyzed, the uploading time and a file name file are stored in a file path file, and file contents are analyzed and then written into a database.
When a user needs to download a file, the front end transmits file path data to the rear end in a responseType: 'blob' format, receives a data stream transmitted back by the rear end and processes the data stream to obtain downloadable path information; the user may then download the BOM file to a local browser.
17) And deleting the BOM file: the front end transmits the id value of the file to the back end through a deletefile interface, searches the corresponding file in a data table VersionTable storing the BOM file according to the id value, calculates the number of the files after deletion and performs paging processing.
18) BOM conversion: the BOM conversion can perform the function of converting a BOM file imported with a certain format into a technical BOM file. The purpose of the design is to facilitate maintenance and management of the bill of materials. A user uploads a file to be converted, the front end reads a data stream by using a readAsArrayBuffer interface in the fileReader, a read result is converted into json data, and the json data are respectively matched with corresponding columns according to set header data to form a preview table; and the user selects data in the form and sends the data to the back end to request for adding coding information, the back end returns the data, the front end exports the data into the Excel form, and the user can check the data locally.
The present invention also provides a storage medium having stored therein a plurality of instructions adapted to be loaded by a processor and to perform a material code generation method as described above.
The storage medium may be a computer-readable storage medium, and may include: ROM, RAM, magnetic or optical disks, and the like.
The present invention also provides a terminal, which may include:
a processor adapted to implement instructions; and
a storage device adapted to store a plurality of instructions adapted to be loaded by a processor and to perform the material code generation method as described above.
In conclusion, the traditional code management mode of manually inputting Excel, which is time-consuming, labor-consuming and easy to make mistakes, is changed into the mode of inputting codes by using a material code management system, unique codes of materials are generated after relevant attributes are selected and filled in through a rule defined in advance, and whether newly input materials are repeated with existing materials can be inquired, so that the input redundancy is avoided; the system provided by the invention uniformly manages the material codes, is beneficial to the effective identification and reasonable use of the materials by the staff using the system, and can reduce the labor cost for generating the material codes, so that the classification and operation process of the company materials are more orderly, and the comprehensive management of the materials is enhanced.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It will be appreciated that the relevant features of the method, apparatus and system described above are referred to one another. In addition, "first", "second", and the like in the above embodiments are for distinguishing the embodiments, and do not represent merits of the embodiments.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the module described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a device will be apparent from the description above. In addition, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the embodiments provided in the present application, it should be understood that the disclosed system and method may be implemented in other ways. The above-described system embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and other divisions may be realized in practice, and for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules 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 units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.
Claims (8)
1. The material code generation method is characterized by comprising the following steps: the method comprises the following steps:
s101, defining a coding mapping rule, wherein the coding mapping rule comprises the following steps: a mapping rule of the rule code; the rule-coded mapping rule comprises: an input item and an output item, the input item comprising: attribute features of the material, the output items including: regular material coding;
s102, receiving the attribute characteristics of the provided materials;
s103, converting key attributes, categories, types and technical routes in the attribute characteristics of the provided materials into corresponding characteristic codes;
s104, automatically generating a random code;
s105, combining all the feature codes and the random codes together to form a new code;
and S106, the newly generated codes are stored in the database after being checked for duplication.
2. The material code generation method according to claim 1, characterized in that: further comprising:
s107, receiving an original code of the material, wherein the original code is an irregular code;
s108, the original code is checked for duplication in the database, if the original code does not appear in the database, the original code is used as the material code of the material and is stored in the database, and if not, the material is recorded.
3. The material code generation method according to claim 1, characterized in that: the regular material coding comprises: the system comprises a letter coding section and a number coding section, wherein the letter coding section is a characteristic code number corresponding to key attribute characteristics, category characteristics, type characteristics and technical route characteristics of a material; the digitally encoded segments are random codes generated for the provided material.
4. The material code generation method according to claim 3, characterized in that: in step S106, the newly generated code is stored in the database after being checked for duplication, and the method specifically includes:
s1061, checking the newly generated code in a database, if the newly generated code does not appear in the database, storing the newly generated code in the database as a regular material code of the material, otherwise, indicating that the same type of code exists, and executing the step S1062;
s1062, judging whether other attributes of the material corresponding to the new code are consistent with other attributes of the material corresponding to the same type of code, if so, indicating that the material is recorded, otherwise, executing the step S1063;
and S1063, processing the digital coding sections of the same type of codes to obtain processed regular material codes and storing the regular material codes in a database.
5. The material code generation method according to claim 4, characterized in that: other attributes of the material include: name, specification, brand, model, unit, quantity, application model, picture, and remark information.
6. Material code management system, its characterized in that: the method comprises the following steps:
the code entry module (10) is used for receiving the characteristics of the provided materials, generating corresponding new codes for the characteristics of the materials based on the code mapping rules and storing the new codes in the database;
wherein: the encoding mapping rule comprises: a mapping rule of the rule code; the rule-coded mapping rule comprises: an input item and an output item, the input item comprising: attribute features of the material, the output items including: regular material coding;
the code maintenance module (20) is used for adding, deleting and updating the code mapping rule;
the BOM maintenance module (30) is used for performing addition, deletion, version conversion, query and export operations on the BOM list;
and the user management module (40) is used for setting system users in different levels and distributing corresponding authorities to the users in different levels.
7. The material coding management system of claim 6, wherein: the different levels of system users set in the user management module (40) include: primary users, secondary users, common users and user administrators.
8. A storage medium having a plurality of instructions stored therein, characterized in that: the instructions are adapted to be loaded by a processor and to perform the material code generation method of any of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210071886.3A CN114417787A (en) | 2022-01-21 | 2022-01-21 | Material code generation method, material code management system and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210071886.3A CN114417787A (en) | 2022-01-21 | 2022-01-21 | Material code generation method, material code management system and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114417787A true CN114417787A (en) | 2022-04-29 |
Family
ID=81275718
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210071886.3A Pending CN114417787A (en) | 2022-01-21 | 2022-01-21 | Material code generation method, material code management system and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114417787A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114936300A (en) * | 2022-07-21 | 2022-08-23 | 济南鼎点数控设备有限公司 | List generation method and system for laser pipe cutter electrical design auxiliary system |
CN116186796A (en) * | 2023-02-21 | 2023-05-30 | 中国人民解放军海军工程大学 | Sequence number generation method, system, electronic equipment and storage medium |
-
2022
- 2022-01-21 CN CN202210071886.3A patent/CN114417787A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114936300A (en) * | 2022-07-21 | 2022-08-23 | 济南鼎点数控设备有限公司 | List generation method and system for laser pipe cutter electrical design auxiliary system |
CN116186796A (en) * | 2023-02-21 | 2023-05-30 | 中国人民解放军海军工程大学 | Sequence number generation method, system, electronic equipment and storage medium |
CN116186796B (en) * | 2023-02-21 | 2024-01-30 | 中国人民解放军海军工程大学 | Sequence number generation method, system, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114417787A (en) | Material code generation method, material code management system and storage medium | |
CN104685496B (en) | The disk block of cluster table is deleted in Relational DBMS | |
CN104778540B (en) | A kind of equipment for building materiaIs manufacturing BOM management method and management system | |
US6678693B1 (en) | Database design system, database design method and record medium | |
CN110543303B (en) | Visual service platform | |
CN102346785A (en) | Method and device for directly self-defining field of database | |
US7856428B2 (en) | Method, computer program product and device for importing a plurality of data sets into a system | |
CN110990403A (en) | Business data storage method, system, computer equipment and storage medium | |
CN111858544B (en) | Component information management system | |
CN103679515A (en) | Receipt printing method and receipt printing system | |
CN110956029B (en) | Technical document processing method and system | |
CN112541728A (en) | System and method for generating electric power material codes | |
CN109636303B (en) | Storage method and system for semi-automatically extracting and structuring document information | |
CN115525624A (en) | Method for modeling and processing batch data | |
CN114004587A (en) | Design system and method for automatic management and control of whole machine model | |
CN114706915A (en) | Method for building BOM information from PLM system by EDA software | |
CN102043769A (en) | Method and device for editing documents | |
CN112230900A (en) | Development engine system and method for self-defining setting form model | |
CN115510834A (en) | Laboratory data digital management system and method | |
CN114676229A (en) | Technical improvement major repair project file management system and management method | |
CN114881601A (en) | Multi-process route transmission method based on PLM system | |
CN114610710A (en) | Method and system for multi-user data reporting and collecting | |
CN115271360A (en) | System and method for generating batches in universal production process | |
JP2918735B2 (en) | Drawing and parts list creation management device | |
CN112286874B (en) | Time-based file management method |
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 |