| | |
| | | String parentModel = productApproving.getParentModel(); |
| | | String parentCode = productApproving.getParentCode(); |
| | | String customCode = productApproving.getCustomCode(); |
| | | Product product = productService.getVersion(parentCode, customCode); |
| | | ProductHistory latestProduct = phService.getLatestVersion(parentCode, customCode); |
| | | int currentVersion = 0; |
| | | if (product != null) { |
| | | currentVersion = product.getVersion(); |
| | | if (latestProduct != null) { |
| | | currentVersion = latestProduct.getVersion(); |
| | | } |
| | | Integer nextVersion = currentVersion + 1; |
| | | //将产品文件复制至正式路径 |
| | |
| | | //doc_file/product/{产品型号}/standard或者{customCode}}/{version}/ |
| | | //跟子件挂钩的转移到子件图纸下:doc_file/material/ |
| | | String customCodeString = null; |
| | | if(customCode==null) { |
| | | customCodeString = "standard"; |
| | | }else{ |
| | | if(customCode!=null && !customCode.equals("")) { |
| | | customCodeString = customCode; |
| | | }else{ |
| | | customCodeString = "standard"; |
| | | } |
| | | String productDir = projectDir + File.separator + "doc_file" + File.separator + "product" + File.separator + parentModel |
| | | + File.separator + customCodeString + File.separator +nextVersion; |
| | |
| | | materialList.add(temp); |
| | | } |
| | | }); |
| | | if(materialList.size()!=0) { |
| | | mService.insertBatch(materialList); |
| | | |
| | | } |
| | | //将dwg图纸,全部更新到对应的记录url中 |
| | | mService.updateDwgUrl(materialDwgUrlNameList); |
| | | /*List<ProductBomApproving> fileBomApprovingList = approvingList.stream() |