| | |
| | | mapper.updateMaterialField2BomHistoryBatch(bomHistoryList); |
| | | |
| | | } |
| | | //根据产品母料型号,定制单号,版本下载原始压缩包文件 |
| | | public Response getOriginalZip(String parentModel, String customCode, int version) { |
| | | String fileDirName = FileDirPath.getFileDirName(); |
| | | String withOutDwg=fileDirName+File.separator+"doc_file"+File.separator+"product"+File.separator+parentModel; |
| | | if(customCode!=null&&!customCode.isEmpty()){ |
| | | withOutDwg+=File.separator+customCode+File.separator+version; |
| | | }else{ |
| | | withOutDwg+=File.separator+"standard"+File.separator+version; |
| | | } |
| | | boolean bl=false; |
| | | File file = new File(withOutDwg); |
| | | if(!file.exists()) { |
| | | return new Response().setII(1,bl,withOutDwg.replace(fileDirName,""),"原始文件相对路径"); |
| | | } |
| | | String[] filePath = file.list();//获取该文件夹下的所有文件以及目录的名字 |
| | | if(filePath!=null&&filePath.length>0){ |
| | | for (String tmp:filePath) { |
| | | if(tmp.contains(".zip")){ |
| | | bl=true; |
| | | withOutDwg=withOutDwg+File.separator+tmp; |
| | | } |
| | | } |
| | | } |
| | | return new Response().setII(1,bl,withOutDwg.replace(fileDirName,""),"原始文件相对路径"); |
| | | } |
| | | } |