whycxzp
2022-08-26 54bd44a8c4d5052d86410e552c41d94370868c40
src/main/java/com/whyc/service/WorksheetLinkService.java
@@ -144,10 +144,10 @@
                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;
                //将产品文件复制至正式路径
@@ -211,10 +211,10 @@
                //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;
@@ -351,8 +351,9 @@
                        materialList.add(temp);
                    }
                });
                if(materialList.size()!=0) {
                mService.insertBatch(materialList);
                }
                //将dwg图纸,全部更新到对应的记录url中
                mService.updateDwgUrl(materialDwgUrlNameList);
                /*List<ProductBomApproving> fileBomApprovingList = approvingList.stream()