whycxzp
2022-11-17 0d7df8b81ebc29b1e666c34c86c011c96da91651
产品bom提交留存原始压缩包
1个文件已修改
10 ■■■■ 已修改文件
src/main/java/com/whyc/service/ProductService.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/ProductService.java
@@ -293,7 +293,8 @@
        }
        //产品bom对比
        Map<String,List> compareMap = pbhService.parseCompare(baseProduct,product);
        return response.setIII(1, true, product,compareMap, filePath);
        //return response.setIII(1, true, product,compareMap, filePath);
        return response.setIII(1, true, product,compareMap, zipFile.toString());
    }
@@ -316,7 +317,8 @@
        String customCode = product.getCustomCode();
        String parentModel = product.getParentModel();
        List<ProductBom> bomList = product.getBomList();
        String fileUrl = product.getFileUrl();
        String zipFilePath = product.getFileUrl();
        String fileUrl = zipFilePath.substring(0,zipFilePath.lastIndexOf(File.separator));
        Date date = new Date();
        boolean isCopyCustom = false;
        Product relatedProduct = null;
@@ -557,6 +559,10 @@
            if (!materialFile.exists()) {
                materialFile.mkdirs();
            }
            //之前上传的产品bom压缩包,转移到正式版本下留存
            File zipFileNew = new File(productDir + File.separator + zipFilePath.substring(zipFilePath.lastIndexOf(File.separator) + 1));
            FileCopyUtils.copy(new File(zipFilePath), zipFileNew);
            productUrlList.forEach(productUrl -> {
                String fileName = productUrl.substring(productUrl.lastIndexOf(File.separator) + 1);