diff --git a/backend/src/main/java/com/yfd/platform/data/service/impl/FishImportServiceImpl.java b/backend/src/main/java/com/yfd/platform/data/service/impl/FishImportServiceImpl.java index 2d40178..3848f80 100644 --- a/backend/src/main/java/com/yfd/platform/data/service/impl/FishImportServiceImpl.java +++ b/backend/src/main/java/com/yfd/platform/data/service/impl/FishImportServiceImpl.java @@ -147,8 +147,6 @@ public class FishImportServiceImpl implements IFishImportService { Map columnIndexMap = new HashMap<>(EXCEL_COLUMN_INDEX_MAPPING); int totalRows = sheet.getLastRowNum(); - result.setTotalCount(totalRows); - for (int i = 1; i <= totalRows; i++) { Row row = sheet.getRow(i); if (row == null || isRowEmpty(row)) { @@ -156,6 +154,7 @@ public class FishImportServiceImpl implements IFishImportService { } FishImportResult.FishImportRow importRow = parseRow(row, columnIndexMap, i); + result.setTotalCount(result.getTotalCount() + 1); if (importRow.getData() != null && importRow.getWarnings().isEmpty()) { result.getSuccessRows().add(importRow); result.setSuccessCount(result.getSuccessCount() + 1);