| | |
| | | |
| | | 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 |
| | |
| | | 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(); |
| | |
| | | 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); |
| | | |
| | | } |
| | | |
| | |
| | | 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); |
| | | } |
| | | }); |