Przeglądaj źródła

新增采购询价批量导入修改;个人产品批量导入修改

dongbw 8 lat temu
rodzic
commit
456d2dd32d

+ 22 - 14
src/main/java/com/uas/platform/b2b/service/impl/ProductUsersServiceImpl.java

@@ -188,54 +188,62 @@ public class ProductUsersServiceImpl implements ProductUsersService {
                         product.setTitle(row.getCell(1).getStringCellValue().trim());
                     }
 
-                    // 原厂型号
+                    // 物料规格
                     if (row.getCell(2) != null) {
                         row.getCell(2).setCellType(Cell.CELL_TYPE_STRING);
-                        product.setCmpCode(row.getCell(2).getStringCellValue().trim());
+                        product.setSpec(row.getCell(2).getStringCellValue().trim());
                     }
 
-                    // 品牌
+                    // 原厂型号
                     if (row.getCell(3) != null) {
                         row.getCell(3).setCellType(Cell.CELL_TYPE_STRING);
-                        product.setBrand(row.getCell(3).getStringCellValue().trim());
+                        product.setCmpCode(row.getCell(3).getStringCellValue().trim());
                     }
 
-                    // 单位
+                    // 品牌
                     if (row.getCell(4) != null) {
                         row.getCell(4).setCellType(Cell.CELL_TYPE_STRING);
-                        product.setUnit(row.getCell(4).getStringCellValue().trim());
+                        product.setBrand(row.getCell(4).getStringCellValue().trim());
                     }
 
-                    // 最小包装量
+                    // 单位
                     if (row.getCell(5) != null) {
                         row.getCell(5).setCellType(Cell.CELL_TYPE_STRING);
                         if (null != row.getCell(5).getStringCellValue()
                                 && !row.getCell(5).getStringCellValue().trim().equals("")) {
-                            product.setMinPack(Double.valueOf(row.getCell(5).getStringCellValue()));
+                            product.setUnit(row.getCell(5).getStringCellValue());
                         }
                     }
-                    // 最小订购
+                    // 最小包装
                     if (row.getCell(6) != null) {
                         row.getCell(6).setCellType(Cell.CELL_TYPE_STRING);
                         if (null != row.getCell(6).getStringCellValue().trim()
                                 && !row.getCell(6).getStringCellValue().trim().equals("")) {
-                            product.setMinOrder(Double.valueOf(row.getCell(6).getStringCellValue()));
+                            product.setMinPack(Double.valueOf(row.getCell(6).getStringCellValue()));
                         }
                     }
-                    // 交货周期
+                    // 最小订购量
                     if (row.getCell(7) != null) {
                         row.getCell(7).setCellType(Cell.CELL_TYPE_STRING);
                         if (null != row.getCell(7).getStringCellValue().trim()
                                 && !row.getCell(7).getStringCellValue().trim().equals("")) {
-                            product.setLeadtime(Double.valueOf(row.getCell(7).getStringCellValue()));
+                            product.setMinOrder(Double.valueOf(row.getCell(7).getStringCellValue()));
                         }
                     }
-                    // 交货提前
+                    // 交货
                     if (row.getCell(8) != null) {
                         row.getCell(8).setCellType(Cell.CELL_TYPE_STRING);
                         if (null != row.getCell(8).getStringCellValue().trim()
                                 && !row.getCell(8).getStringCellValue().trim().equals("")) {
-                            product.setLtinstock(Double.valueOf(row.getCell(8).getStringCellValue()));
+                            product.setLeadtime(Double.valueOf(row.getCell(8).getStringCellValue()));
+                        }
+                    }
+                    // 交货提前期
+                    if (row.getCell(9) != null) {
+                        row.getCell(9).setCellType(Cell.CELL_TYPE_STRING);
+                        if (null != row.getCell(9).getStringCellValue().trim()
+                                && !row.getCell(9).getStringCellValue().trim().equals("")) {
+                            product.setLtinstock(Double.valueOf(row.getCell(9).getStringCellValue()));
                         }
                     }
                     // 判断物料编号是否存在

+ 12 - 6
src/main/java/com/uas/platform/b2b/service/impl/PurcInquiryServiceImpl.java

@@ -935,21 +935,27 @@ public class PurcInquiryServiceImpl implements PurcInquiryService {
                         info.setProdTitle(row.getCell(2).getStringCellValue().trim());
                     }
 
-                    // 品牌
+                    // 产品规格
                     if (row.getCell(3) != null) {
                         row.getCell(3).setCellType(Cell.CELL_TYPE_STRING);
-                        info.setInbrand(row.getCell(3).getStringCellValue());
+                        info.setSpec(row.getCell(3).getStringCellValue());
                     }
 
-                    // 单位
+                    // 品牌
                     if (row.getCell(4) != null) {
                         row.getCell(4).setCellType(Cell.CELL_TYPE_STRING);
-                        info.setUnit(row.getCell(4).getStringCellValue());
+                        info.setInbrand(row.getCell(4).getStringCellValue());
+                    }
+
+                    // 单位
+                    if (row.getCell(5) != null) {
+                        row.getCell(5).setCellType(Cell.CELL_TYPE_STRING);
+                        info.setUnit(row.getCell(5).getStringCellValue());
                     }
 
                     // 价格有效期
-                    if (row.getCell(5) != null && row.getCell(5).getDateCellValue() != null) {
-                        Date date = row.getCell(5).getDateCellValue();
+                    if (row.getCell(6) != null && row.getCell(6).getDateCellValue() != null) {
+                        Date date = row.getCell(6).getDateCellValue();
                         info.setToDate(date);
                     }
                     if (alters.size() > 0) {

BIN
src/main/resources/jxls-tpl/sale/PurcInquiry_product_example.xls


BIN
src/main/resources/jxls-tpl/sale/upload_userproduct_example.xls