whycxzp
2022-09-03 f40f45162d69d751628a8fa0c6784abb237d4eaa
src/main/java/com/whyc/service/ProductService.java
@@ -22,10 +22,7 @@
import java.io.*;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
import java.util.*;
import java.util.stream.Collectors;
@Service
@@ -110,7 +107,7 @@
        mapper.insert(product);
    }
    public Response zipParse(MultipartFile file) throws IOException, InvalidFormatException {
    public Response zipParse(MultipartFile file, Product baseProduct) throws IOException, InvalidFormatException {
        Product product = new Product();
        List<ProductBom> bomList = new LinkedList<>();
        Response response = new Response();
@@ -264,7 +261,9 @@
                product.setBomList(bomList);
            }
        }
        return response.setII(1, true, product, filePath);
        //产品bom对比
        Map<String,List> compareMap = pbhService.parseCompare(baseProduct,product);
        return response.setIII(1, true, product,compareMap, filePath);
    }
@@ -274,7 +273,7 @@
            if(fileUrl.substring(fileUrl.lastIndexOf(".")+1).equals("dwg")) {
                FileUrlDTO dto = new FileUrlDTO();
                dto.setFileName(fileUrl.substring(fileUrl.lastIndexOf(File.separator) + 1));
                dto.setHttpFileUrl(fileUrl.substring(fileUrl.lastIndexOf("doc_file" + File.separator + "product_approving")));
                dto.setHttpFileUrl(fileUrl.substring(fileUrl.lastIndexOf("doc_file" + File.separator + "product_submit")));
                list.add(dto);
            }
        });