feat: 计算导入数据总数优化
This commit is contained in:
parent
65e669f9d9
commit
15db44b2f5
@ -147,8 +147,6 @@ public class FishImportServiceImpl implements IFishImportService {
|
||||
Map<Integer, String> 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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user