24282 1 жил өмнө
parent
commit
bc450893c3

+ 2 - 2
sd-business/src/main/java/com/sd/business/service/order/impl/OrderServiceImpl.java

@@ -500,7 +500,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, OrderInfo> implem
         semiFinishedProductInOutStorageDto.setWarehouseId(WarehouseConstant.SEMI_FINISHED_PRODUCT);
         semiFinishedProductInOutStorageDto.setDepartmentId(orderInfo.getOutDepartmentId());
         semiFinishedProductInOutStorageDto.setApplicant(SecurityUtils.getLoginUser().getUser().getNickName());
-        semiFinishedProductInOutStorageDto.setRemark("删除订单:" + orderInfo.getWlnCode() + " 主材退货入库");
+        semiFinishedProductInOutStorageDto.setRemark("删除订单:" + orderInfo.getCode() + " 主材退货入库");
         semiFinishedProductInOutStorageDto.setInOutStorageBomList(semiFinishedProductInOutStorageBomList);
         inOutStorageService.add(semiFinishedProductInOutStorageDto);
 
@@ -521,7 +521,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, OrderInfo> implem
         packagingMaterialInOutStorageDto.setWarehouseId(WarehouseConstant.PACKAGING_MATERIAL);
         packagingMaterialInOutStorageDto.setDepartmentId(orderInfo.getOutDepartmentId());
         packagingMaterialInOutStorageDto.setApplicant(SecurityUtils.getLoginUser().getUser().getNickName());
-        packagingMaterialInOutStorageDto.setRemark("删除订单:" + orderInfo.getWlnCode() + " 包材退货入库");
+        packagingMaterialInOutStorageDto.setRemark("删除订单:" + orderInfo.getCode() + " 包材退货入库");
         packagingMaterialInOutStorageDto.setInOutStorageBomList(packagingMaterialInOutStorageBomList);
         inOutStorageService.add(packagingMaterialInOutStorageDto);
 

+ 33 - 14
sd-starter/src/test/java/B1_SyncSkuTest.java

@@ -45,7 +45,7 @@ public class B1_SyncSkuTest {
 
         DataListener<ExcelData> listener = new DataListener<>();
 
-        FileInputStream fileInputStream = new FileInputStream("E:\\峰燕-胜德体育-品号汇总模板-2.xlsx");
+        FileInputStream fileInputStream = new FileInputStream("E:\\峰燕-胜德体育-品号汇总模板-2 (2).xlsx");
 
         ExcelReaderBuilder read = EasyExcel.read(fileInputStream, ExcelData.class, listener);
         read.sheet(0).doRead();
@@ -60,15 +60,12 @@ public class B1_SyncSkuTest {
         for (SkuSpec skuSpec : skuSpecList) {
             String code = skuSpec.getCode();
             ExcelData excelData = map.get(code);
+
             if (excelData == null) {
                 if (code.startsWith("ST") || code.startsWith("SK")) {
                     String name = skuSpec.getName();
 
-                    if (code.endsWith("W")) {
-                        ArtworkLibrary artworkLibrary = artworkLibraryMap.get("EMPTY");
-                        skuSpec.setDesignImgUrl(artworkLibrary.getImgUrl());
-                        skuSpec.setSharedFolder(artworkLibrary.getFileUrl());
-                    } else if (code.endsWith("T")) {
+                    if (code.endsWith("T")) {
                         if (name.contains("183*80")) {
                             ArtworkLibrary artworkLibrary = artworkLibraryMap.get("体位线-183_80");
                             skuSpec.setDesignImgUrl(artworkLibrary.getImgUrl());
@@ -90,15 +87,34 @@ public class B1_SyncSkuTest {
                             skuSpec.setSharedFolder(artworkLibrary.getFileUrl());
                             System.out.println(61);
                         }
+                        skuSpec.setMachinedPanel("10");
+                    }
+
+                    if (code.endsWith("W")) {
+                        ArtworkLibrary artworkLibrary = artworkLibraryMap.get("EMPTY");
+                        skuSpec.setDesignImgUrl(artworkLibrary.getImgUrl());
+                        skuSpec.setSharedFolder(artworkLibrary.getFileUrl());
+                    }
+
+                    if (code.endsWith("CG")) {
+                        ArtworkLibrary artworkLibrary = artworkLibraryMap.get("跳绳垫165_61");
+                        skuSpec.setDesignImgUrl(artworkLibrary.getImgUrl());
+                        skuSpec.setSharedFolder(artworkLibrary.getFileUrl());
+                        skuSpec.setMachinedPanel("10");
                     }
 
                     if (code.endsWith("DT")) {
                         skuSpec.setDesignImgUrl("");
                         skuSpec.setSharedFolder("");
-                    }
-                    if (code.endsWith("T") || code.endsWith("DT")) {
                         skuSpec.setMachinedPanel("10");
                     }
+
+                    if (code.endsWith("L")) {
+                        skuSpec.setDesignImgUrl("");
+                        skuSpec.setSharedFolder("");
+                        skuSpec.setMachinedPanel("20");
+                    }
+
                 }
                 continue;
             }
@@ -115,15 +131,18 @@ public class B1_SyncSkuTest {
 
             String machinedPanelFileStr = excelData.getMachinedPanelFileStr();
             if (StrUtil.isBlank(machinedPanelFileStr)) {
-                if (code.startsWith("FY")) {
-                    ArtworkLibrary artworkLibrary = artworkLibraryMap.get("EMPTY");
-                    skuSpec.setDesignImgUrl(artworkLibrary.getImgUrl());
-                    skuSpec.setSharedFolder(artworkLibrary.getFileUrl());
-                }
+                ArtworkLibrary artworkLibrary = artworkLibraryMap.get("EMPTY");
+                skuSpec.setDesignImgUrl(artworkLibrary.getImgUrl());
+                skuSpec.setSharedFolder(artworkLibrary.getFileUrl());
                 continue;
             }
 
-            String sp = excelData.getSpec().split("\\*")[1].replace("cm", "").replace(" ", "");
+
+            String spec = excelData.getSpec();
+            if (StrUtil.isBlank(spec)) {
+                continue;
+            }
+            String sp = spec.split("\\*")[1].replace("cm", "").replace(" ", "");
             for (ArtworkLibrary artworkLibrary : artworkLibraryList) {
                 String[] ar = artworkLibrary.getArtworkName().split("_");
                 String ar0 = ar[0];