Embodiment
Provided by the present inventionly a kind ofly generate the method and system of material inventory list based on hardware circuit principle figure, clearer, clear and definite for making purpose of the present invention, technical scheme and advantage, below develop simultaneously with reference to accompanying drawing that the present invention is described in more detail for embodiment.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
The a kind of of the embodiment of the invention generates the method for material inventory list based on hardware circuit principle figure, adopts B/S(Browser/Server browser and server) framework, all functions are all finished at server.
The user enters in the native system by the account number cipher registration, can see all operations that left side explicit user can carry out then, and the limit is the detailed demonstration on a certain of the corresponding left side in addition.Just can continue each step operation of the system of going deep into by the operation on the right.In the embodiment of the invention by the SSH(struts of java, spring, hibernate) three big framework exploitations form, database is Mssql.
As shown in Figure 1, the described method that generates material inventory list based on hardware circuit principle figure mainly may further comprise the steps:
Step S100, reception also import the raw data file of deriving from hardware circuit principle figure; And this raw data file is kept in the server generates the raw data file copy.
In the embodiment of the invention, it is big to receive the data volume that imports, and is the derived data of winter 09 Protel system, so native system adopts the mode that imports file to import data.And the file that imports all is the csv file that adopts comma to separate, i.e. plain text format.
For compatibility, done two kinds of compatibilities that import file layouts among the present invention, a kind of is the forms data file, a kind of is single item file, specifically surface analysis as follows.Make things convenient for the user no matter importing is any, can operate as normal.
Wherein, promptly described raw data file comprises the forms data file, single item file.
Wherein, each line data of preserving in first kind of forms data file all is a material data, and materials of all row are different material; As follows:
Comment,Description,Designator,Footprint,LibRef,Quantity
"0.1uF-0402","","C26,?C106,?C175","C0402N","C,?CAP?NP","3"
"10pF-0402","","C32,?C110","C0402N","CAP?NP","2"
"10uF-0805","","C49,?C92,?C153,?C156","C0805","CAP?NP","4"
The item of each line data of preserving in the 2nd kind of single item file is one.As follows:
"Part?Type","Designator","Footprint"
"0.01uF-0402-X7R-±10%-50V","C176","C0402N"
"0.01uF-0402-X7R-±10%-50V","C183","C0402N"
"0.01uF-0402-X7R-±10%-50V","C198","C0402N"
"0.01uF-0402-X7R-±10%-50V","C348","C0402N"
"0.01uF-0402-X7R-±10%-50V","C32","C0402N"
"0.1uF-0402-Y5V-+80%-20%-25V","C351","C0402N"
"0.1uF-0402-Y5V-+80%-20%-25V","C63","C0402N"
"0.1uF-0402-Y5V-+80%-20%-25V","C66","C0402N"
"0.1uF-0402-Y5V-+80%-20%-25V","C341","C0402N"
More than the form of two kinds of importings all be the raw data file of deriving by hardware circuit principle figure winter 09 Protel system.
Embodiment S10 as shown in Figure 2, the operation that receives the user imports raw data file A, and preserves the copy B that raw data file A that the user uploads generates raw data file A.Among this embodiment, raw data file A is derived by winter 09 Protel system, comprises the forms data file, the single item file of person.The copy B of raw data file A is duplicating of A, and their pass is the local computing of A the user, and B is user when A is uploaded, and is kept at the duplicate of the document of server.
From system interface, receive the former data file A that exerts that the user imports, be (forms data file or single item file) above-mentioned, can be earlier with a file their all preservations get up to be called B, i.e. the copy of the former data file uploaded of user.Enter step S200 then.
Step S200, this raw data file copy is carried out the intermediate data file that treatment conversion becomes consolidation form; Wherein, described intermediate data file is the column data file of set form.
In this step, referring to S20 shown in Figure 2, this raw data file copy is carried out the intermediate data file C that simple process converts consolidation form to, promptly no matter by the forms data file is uploaded or the raw data file B that single item file is uploaded, all unify the convenient form of handling of the system that is treated to, the intermediate data file C that converts an independent band consolidation form to is kept in the server.This intermediate data file C is exactly the column data file of a set form, as preserving data in the middle of most important, is provided with the back inquiry and uses.
The data of the intermediate data file C of present embodiment are made up of following:
"ID","Comment","Description","Designator","FootPrint","LibRef","Quantity","WhichBom","BomName","BomCode","Unit","LinkType"
Reference data is as follows:
"ID","Comment","Description","Designator","FootPrint","LibRef","Quantity","WhichBom","BomName","BomCode","Unit","LinkType"
"0","CKX3-3.5-11-G","","AV1?","PHONE5","","1","","","","0","H"
" 1 ", " AV6-8.4-13D (upward turquoise red, following Huang Hongbai) ", " ", " AV2 ", " AV6-8.4-13 ", " ", " 1 ", " ", " ", " ", " 0 ", " H "
" 2 ", " AV-8.4-5 (orange) ", " ", " AV3 ", " AV-05 ", " ", " 1 ", " ", " ", " ", " 0 ", " H "
" 3 ", " NC/AV3-8.4-06 (yellow, red, white)-U ", " ", " AV5 ", " AV3-05-4 ", " ", " 1 ", " ", " ", " ", " ", " "
"4","CKS3.5-KJ25","","AV6?","PHONE17","","1","","","","0","H"
"5","NC/100pF-0402-NPO-±5%-50V","","C1?C121?C125?C131?C133?C164?C175?C189?C190?C191?C192?C195?C196?C210?","C0402N","","14","","","","",""
"6","NC/10uF-0805-X5R-±10%-6.3V","","C2?","C0805","","1","","","","",""
"7","0.1uF-0402-Y5V-+80%-20%-25V","","C3?C4?C5?C6?C7?C8?C10?C11?C13?C14?C15?C16?C17?C18?C19?C20?C21?C22?C23?C24?C27?C28?C29?C30?C31?C33?C34?C35?C36?C37?C38?C39?C40?C41?C42?C43?C44?C45?C46?C47?C49?C50?C51?C52?C53?C54?C55?C56?C57?C58?C59?C60?C61?C62?C64?C65?C66?C67?C68?C69?C70?C71?C72?C75?C76?C77?C78?C79?C80?C81?C82?C83?C84?C85?C86?C87?C90?C91?C92?C93?C94?C97?C98?C99?C100?C101?C102?C103?C105?C107?C109?C111?C112?C113?C114?C116?C117?C119?C120?C122?C123?C124?C134?C147?C158?C159?C160?C161?C162?C168?C180?C193?C213?C218?C222?C228?C229?C246?C253?C261?C262?C263?C264?C274?C276?C283?C284?C285?C286?C287?C288?C289?C290?C291?C292?C293?C294?C295?C298?C299?C300?C317?C318?C319?","C0402N","","144","","","","100000","S"
"8","NC/0.1uF-0402-Y5V-+80%-20%-25V","","C9?C26?C73?C89?C106?C183?","C0402N","","6",?"","","","",""
"9","NC/0.01uF-0402-X7R-±10%-50V","","C12?","C0402N","","1","","","","",""
"10","1500pF-0402-X7R-±10%-50V","","C25?C165?C306?","C0402N","","3","","","","1500","S"
"11","NC/1000pF-0402-X7R-±10%-50V","","C32?C320?C321?","C0402N","","3","","","","",""
In the present embodiment, the row of intermediate data file C are fixed, and it is unified into the row of forms data among the copy B of raw data file A and two kinds of forms of single item a kind of.So when system uses it, just need not judge again that it has been forms data file or single item file, and can know directly that what content its which row are.The effect of intermediate data file C is to do the data transfer to use.Because the back also will enter data retrieval and BOM table (material inventory list) is sorted, and all is to carry out on the basis of intermediate data file C.Enter step S300 then.
Step S300, by calling this intermediate data file Query Database, material data up-to-date in each material in this intermediate data file and the database is mated, with the title of each the bar material in this intermediate data file of material data completion up-to-date in the database and the code of material, generate the final data file.The final data file is for being kept at csv formatted file in the server system in the present embodiment, and link path is kept in the database simultaneously.
In the embodiment of the invention, the data in the server database are real-time update, by the material information in the operational order real-time update database that receives the user.The final data file is being used to complete back deletion automatically at every turn.
In the embodiment of the invention,, just can access the intermediate data file C that has system and go to have looked into database if the user wants to see that the bom that its raw data file A that uploads generates shows (material inventory list).Because each material all can often upgrade in the information of database, become such as supplier, such as having renewed material, replaced material such as changing.Therefore system all can access intermediate data file C at every turn and remove latest data in the matching database again, generates final data file D(and also is temporary file), show to the user again and see, so the result that sees of user is up-to-date result at every turn.Also thus the result who at every turn sees might be inconsistent.
As the S30 among Fig. 2, each material in the intermediate data file C data is removed to draw database, the assembling data generate final data file D, and final data file D can be in the process that each user checks can remove to upgrade Query Database again obtains up-to-date final data file D automatically.Final data file D has saved storage space be used to complete back deletion automatically at every turn in the present embodiment.
Wherein, described step S300 specifically comprises:
C1, call the Comment value of each bar record in this intermediate data file, remove material data up-to-date in the Query Database, with the material data that obtains being complementary;
C2, with the title of the material data completion that is complementary that obtains each the bar material in this intermediate data file and the code of material, obtain the final data file all identical with row with described intermediate data file form.
That is, the step by intermediate data file C generation final data file D process is as follows in the present embodiment:
Get the Comment value of each the bar record among the intermediate data file C, remove to look into database, with the material data that obtains being complementary, the data of lane database all are real-time update, data all are up-to-date, such as to same material, if the supplier of material has become, renewed material or changed and replaced material, will be in database new data more.So remove to look into database immediately with regard to available current up-to-date result.
Then, with the title of the material data completion that is complementary that obtains each the bar material in this intermediate data file C and the code of material, obtain the final data file D all identical with row with described intermediate data file D format, so the form of final data file D is all the same with intermediate data file C with row, unique different be final data file D data than the data of intermediate data file C more comprehensively, replenished the title of each bar material and the code of material.
Data were as follows after the data of top processing middle data file C obtained final data file D:
"ID","Comment","Description","Designator","FootPrint","LibRef","Quantity","WhichBom","BomName","BomCode","Unit","LinkType"
"0","NC/0ohm-0402-±5%-1/16W","","AHMU?AMMU?R191?R306?R307?R308?R323?","R0603N","","7","","","","",""
" 1 ", " 0ohm-0603-± 5%-1/10W ", " ", " ARMU R62 R82 R83 R84 R85 R90 R103 R142 R147 R162 R190 R192 R193 R196 R268 R269 R277 R280 R311 R321 R322 R324 ", " R0603N ", " ", " 23 ", " ", " Chip-R ", " R.C.000J10-0603-G00 ", " 0 ", " S "
" 2 ", " AV6-8.4-13D (going up turquoise red, following turquoise red) ", " ", " AV1 ", " AV6-8.4-13 ", " ", " 1 ", " ", " 6 AV terminal ", " J.A.68R413DL24-G00 ", " 0 ", " H "
" 3 ", " AV6-8.4-13D (going up Huang Hongbai, following Huang Hongbai) ", " ", " AV3 ", " AV6-8.4-13 ", " ", " 1 ", " ", " 6 AV terminal ", " J.A.68413DXL27-G00 ", " 0 ", " H "
" 4 ", " 0.1uF-0603-Y5V-+80%-20%-50V ", " ", " C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 C16 C17 C18 C19 C20 C21 C23 C24 C25 C26 C27 C28 C29 C30 C31 C32 C33 C35 C36 C37 C38 C39 C40 C41 C42 C43 C45 C46 C47 C48 C49 C50 C51 C69 C72 C75 C79 C108 C116 C117 C119 C127 C128 C131 C139 C173 C189 C199 C200 C202 C203 C204 C210 C211 C212 C218 C234 C240 CB3 CB4 CB5 CB6 CB8 CB9 CB16 CB17 CB18 CB19 CB21 CD6 CD7 CI1 ", " C0603N ", " ", " 87 ", " ", " patch capacitor ", " C.C.104Z44-0603-G00 ", " 100000 ", " S "
" 5 ", " 10uF-0805-Y5V-+80%-20%-10V ", " ", " C34 C103 C104 C105 C106 C107 C124 C129 C206 CB23 CB24 CD10 CD11 CD12 ", " C0805 ", " ", " 14 ", " ", " patch capacitor ", " C.C.106Z41-0805-G00 ", " 10000000 ", " S "
" 6 ", " 1000pF-0603-X7R-± 10%-50V ", " ", " C44 C78 C153 C190 C197 C198 C239 ", " C0603N ", " ", " 7 ", " ", " patch capacitor ", " C.C.102K24-0603-G00 ", " 1000 ", " S "
" 7 ", " 0.01uF-0603-X7R-± 10%-50V ", " ", " C52 C53 C54 C55 C56 C57 C58 C132 C134 C140 C142 C143 C147 C148 C150 C156 C162 C163 C164 C165 C168 C169 C170 C171 C172 C179 C180 C181 C182 ", " C0603N ", " ", " 29 ", " ", " patch capacitor ", " C.C.103K24-0603-G00 ", " 10000 ", " S "
" 8 ", " 22pF-0603-NPO-± 5%-50V ", " ", " C73 C74 C114 C115 C185 C186 C187 C188 C235 C236 C237 C238 ", " C0603N ", " ", " 12 ", " ", " patch capacitor ", " C.C.220J14-0603-G00 ", " 22 ", " S "
"9","NC/1000pF-0603-X7R-±10%-50V","","C76?C184?","C0603N","","2","","","","",""
"10","NC/22pF-0603-NPO-±5%-50V","","C77?","C0603N","","1","","","","",""
" 11 ", " 1uF-0603-Y5V-+80%-20%-10V ", " ", " C80 C81 C82 C83 C84 C85 C88 C89 C92 C93 C98 C99 C100 C101 C102 C111 C113 C120 C121 C122 C123 C125 C126 C208 C220 C257 CB28 CB29 CB30 ", " C0603N ", " ", " 29 ", " ", " patch capacitor ", " C.C.105Z41-0603-G00 ", " 1000000 ", " S "
Enter step S400 then.
Step S400, the data in the final data file are generated the PDF document and/or can directly import to excel file in the ERP system data to the one-tenth of the data-switching among the final data file D.
In the present embodiment, go to look into result that database obtains with intermediate data file C and preserve the final data file D that can conveniently see to the user.Wherein, this final data file D adopts and makes things convenient for the csv form of system management to be kept in the system, and link path is kept in the database simultaneously.The data of final data file D have been exactly final data.
Referring to Fig. 2, when the user checks, use intermediate data file C and go to look into several storehouses and generate final data file D, and show to the user and check.See in order to be shown to the user, as the S32 among Fig. 2, can check with the PDF document data of final data file D to user's download in the present embodiment, and/or the data of final data file D are changed into the excel file offer the user's download use.The Excel file can directly import in the ERP system database, generates material inventory list (BOM table).
Among the invention described above embodiment, the user enters into certain a BOM dot generation BOM by the system management tabulation just can enter preview interface.Preview interface is seen data presentation with the form of tabulation to the user.The item that comprises has: sequence number, code, title, material specification, quantity, position, unit, and modification item.
Simultaneously the material that special attribute is arranged is carried out color mark, for example comprise: dark blue, redness, green, blueness.In the present embodiment, the normal material that uses of predetermined dark blue expression, red expression forbidding material, green expression is about to spent material, and material is progressively eliminated in blue expression.
In the present embodiment, done interface, the data that allow the user that system handles is crossed are manually revised again.Amending method has two kinds:
1. data of manual modification.
In Preview List, all there is a modification item every data back, revises these data as long as the user clicks just can enter.Just can enter the modification page makes amendment to those data of being put.After revising well, click and preserve just.The point cancellation is not preserved
2. import the patch file batch modification.
The user makes amendment to many data for convenience, and there is an interface that imports patch in system.At first in managing listings, find certain a bom material.If want to revise the multirow data of its inside, can click the interpolation patch so.The patch that is added can be applied on the selected file automatically, and can generate the new bom of another part automatically.Can seeing in managing listings attends the meeting has more row.
Wherein, the form of patch file is:
2 0.1uF-0402-Y5V-+80%-20%-25V C311?C312
1 0ohm-0402-±5%-1/16W R99?R72?R79?R276?R277?R276?R277
7 4*33ohm-0402-±5%-1/16W RP7?RP9?RP10?RP11?RP12?RP13?RP14
7 4K7ohm-0402-±5%-1/16W R25?R62?R63?R64?R63?R64?R81?R82?R189
In the form of above-mentioned patch file, the first tabulation registration amount, secondary series is represented material specification, item is shown in the 3rd tabulation.
Because the modification of patch file has been arranged, so a function has also been done by system, can check that current bom table is that those bom tables have added those patches and form actually, system by a recursive tree table from the source one array to the end portion show, make things convenient for the user to watch.And every part all has raw data backup, make things convenient for data not to the time can verify.
Wherein, the output of the PDF data of the embodiment of the invention is the input that has realized data by the step of front, after the system handles and manual amendment of data, just can save as last file, generates pdf document by system then and has printed.
The data layout of PDF is for also being the same with preview the same form and top data sorting.After generating pdf document, system can file pdf document.Method is the own click function of user: save as production.Save as the pdf document of production, can not be modified again, and can preserve a raw data simultaneously, make things convenient for the user to check what the data of uploading before are.
The data of seeing during the each production preview in front save as the function of producing file and mainly are because all can be removed more new data, just bad to the bom that is defined as production like this, because can not know that what used when producing originally is that material, so will remember, can not become again.Because be provided with this function.As long as the user thinks that certain part of bom is final, produce, just can save as it and produce bom.Data so at that time just can be permanently stored in the system, convenient consulting later.
And the data of the embodiment of the invention are preserved three kinds, and a kind of is the pdf document that generates, and a kind of is that the excel file that generates imports ERP database usefulness, and a kind of is the pdf document that saves as production.
The pdf document that generates, system has a place of temporarily depositing, and generates the back and gives the link user's download, and use up just deletion.
The excel file that generates promptly changes a kind of form and preserves data also to user's download, and corresponding ERP database sequences data, can directly import in the ERP Database Systems after making things convenient for user's download.
Save as the pdf document of production.The permanent detail record of preserving certain part of bom when remembeing when to produce.
Therefore, the embodiment of the invention generate the method for material inventory list based on hardware circuit principle figure, it can generate material inventory list automatically, and the formation efficiency height, accuracy is good.
Based on the foregoing description, the embodiment of the invention also provides a kind of system that generates material inventory list based on hardware circuit principle figure, system in the embodiment of the invention adopts B/S(Browser/Server browser and server) framework, so the user need not install all functions that any software promptly can use native system.All functions are all finished at server.
The user enters in the native system by the account number cipher registration, can see all operations that left side explicit user can carry out then, and the limit is the detailed demonstration on a certain of the corresponding left side in addition.Just can continue each step operation of the system of going deep into by the operation on the right.
The system development of the embodiment of the invention is by the SSH(struts of java, spring, and hibernate) three big framework exploitations form.Database is Mssql.
Wherein, as shown in Figure 3, the described system that generates material inventory list based on hardware circuit principle figure comprises:
Receive memory module 510, be used to receive and import the raw data file of deriving from hardware circuit principle figure; And this raw data file is kept in the server generates the raw data file copy; Specifically as described in the above-mentioned step S100.
Modular converter 520 is used for this raw data file copy is carried out the intermediate data file that treatment conversion becomes consolidation form; Specifically as described in the above-mentioned step S200.
Data processing and generation module 530, be used for by calling this intermediate data file Query Database, material data up-to-date in each material in this intermediate data file and the database is mated, with the title of each the bar material in this intermediate data file of material data completion up-to-date in the database and the code of material, generate the final data file; Specifically as described in the above-mentioned step S300.
Output module 540 is used for the data of final data file are generated the PDF document and/or can directly import to excel file in the ERP system data to the one-tenth of the data-switching in the final data file; Specifically as described in the above-mentioned step S400.
Wherein, described data processing and generation module 530 comprise:
Call unit is used for calling the Comment value of each bar record of this intermediate data file, removes material data up-to-date in the Query Database, with the material data that obtains being complementary, specifically as mentioned above.
Data Matching unit, the material data completion that is complementary that is used for obtaining obtain the final data file all identical with row with described intermediate data file form, specifically as mentioned above to the title of each bar material of this intermediate data file and the code of material.
In sum, the method and system that generate material inventory list based on hardware circuit principle figure provided by the present invention receive and import the raw data file of deriving from hardware circuit principle figure owing to having adopted; And this raw data file is kept in the server generates the raw data file copy; And this raw data file copy carried out the intermediate data file that treatment conversion becomes consolidation form; , by calling this intermediate data file Query Database, material data up-to-date in each material in this intermediate data file and the database is mated, with the title of each the bar material in this intermediate data file of material data completion up-to-date in the database and the code of material, generate the final data file.It all finishes all functions at server, it has improved the efficient that generates material inventory list, and accuracy is good.
Should be understood that application of the present invention is not limited to above-mentioned giving an example, for those of ordinary skills, can be improved according to the above description or conversion that all these improvement and conversion all should belong to the protection domain of claims of the present invention.