From 3ad798d9cd0f5579506ce9c086a6b6c4e6d14d2b Mon Sep 17 00:00:00 2001
From: whycxzp <perryhsu@163.com>
Date: 星期四, 11 八月 2022 12:03:05 +0800
Subject: [PATCH] 更新散装件审批

---
 src/main/java/com/whyc/service/ComponentApprovingService.java |   30 +++++++++++++-----------------
 1 files changed, 13 insertions(+), 17 deletions(-)

diff --git a/src/main/java/com/whyc/service/ComponentApprovingService.java b/src/main/java/com/whyc/service/ComponentApprovingService.java
index e6c0e26..8178a09 100644
--- a/src/main/java/com/whyc/service/ComponentApprovingService.java
+++ b/src/main/java/com/whyc/service/ComponentApprovingService.java
@@ -2,6 +2,8 @@
 
 import com.whyc.dto.FileUrlDTO;
 import com.whyc.dto.Response;
+import com.whyc.pojo.ComponentApproving;
+import com.whyc.pojo.ComponentProductApproving;
 import com.whyc.pojo.DocUser;
 import com.whyc.pojo.ProductBomApproving;
 import com.whyc.util.ActionUtil;
@@ -32,8 +34,7 @@
      * @throws InvalidFormatException
      */
     public Response zipParse(MultipartFile file) throws IOException, InvalidFormatException {
-        List<ProductBomApproving> list = new LinkedList<>();
-        List<ProductBomApproving> referenceList = new LinkedList<>();
+        List<ComponentApproving> list = new LinkedList<>();
         Response response = new Response();
         //妫�鏌ユ槸鍚︿负zip
         boolean isZip = Zip4jUtil.checkZipFileParam(file);
@@ -82,11 +83,7 @@
                 Row row3 = sheet.getRow(3);
                 String productVersion = row3.getCell(5).getStringCellValue();
                 for (int l = 8; l < lastRowNum-1; l++) {
-                    ProductBomApproving bomApproving = new ProductBomApproving();
-                    bomApproving.setParentModel(productModel);
-                    bomApproving.setParentVersion(productVersion);
-                    bomApproving.setType(type);
-                    bomApproving.setExcelName(fileTempUrl.substring(fileTempUrl.lastIndexOf(File.separator)+1));
+                    ComponentApproving approving = new ComponentApproving();
 
                     for (int m = 2; m < lastCellNum; m++) {
                         row = sheet.getRow(l);
@@ -107,18 +104,17 @@
                         }
 
                         switch (m){
-                            case 2:{bomApproving.setCategory(cellValue);}break;
-                            case 3:{bomApproving.setSubCode(cellValue);}break;
-                            case 4:{bomApproving.setSubName(cellValue);}break;
-                            case 5:{
-                            }break;
-                            case 6:{bomApproving.setMaterial(cellValue);}break;
-                            case 7:{bomApproving.setThickness(cellValue);}break;
-                            case 8:{bomApproving.setQuantity(cellValueDouble.intValue());}break;
-                            case 9:{bomApproving.setSurfaceDetail(cellValue);}break;
+                            case 2:{approving.setCategory(cellValue);}break;
+                            case 3:{approving.setSubCode(cellValue);}break;
+                            case 4:{approving.setSubName(cellValue);}break;
+                            case 5:{approving.setSubModel(cellValue);}break;
+                            case 6:{approving.setUnit(cellValue);}break;
+                            case 7:{approving.setQuantity(cellValueDouble.intValue());}break;
+                            case 8:{approving.setProducer(cellValue);}break;
+                            case 9:{approving.setNotes(cellValue);}break;
                         }
                     }
-                    list.add(bomApproving);
+                    list.add(approving);
                 }
             }
         }

--
Gitblit v1.9.1