|
|
@@ -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; // 跳过空行
|