Jelajahi Sumber

修改导入逻辑

cgp 3 hari lalu
induk
melakukan
9207f9e59f

+ 4 - 4
fs-company/src/main/java/com/fs/company/controller/qw/FsCompanyCustomerController.java

@@ -193,7 +193,7 @@ public class FsCompanyCustomerController extends BaseController {
     }
 
     /**
-     * 解析 Excel 文件(从第3行开始读取 A、B、C 列)
+     * 解析 Excel 文件(从第3行开始读取 B、C、D 列)
      */
     private List<ImportCustomerDTO> parseExcel(MultipartFile file) throws Exception {
         List<ImportCustomerDTO> list = new ArrayList<>();
@@ -206,9 +206,9 @@ public class FsCompanyCustomerController extends BaseController {
             Row row = sheet.getRow(i);
             if (row == null) continue;
 
-            String name = formatter.formatCellValue(row.getCell(0));  // A
-            String phone = formatter.formatCellValue(row.getCell(1)); // B
-            String address = formatter.formatCellValue(row.getCell(2)); // C
+            String name = formatter.formatCellValue(row.getCell(1));  // B
+            String phone = formatter.formatCellValue(row.getCell(2)); // C
+            String address = formatter.formatCellValue(row.getCell(3)); // D
 
             if (StringUtils.isEmpty(name) || StringUtils.isEmpty(phone) || StringUtils.isEmpty(address)) {
                 continue; // 跳过空行