|
@@ -10,8 +10,6 @@ import java.util.Map;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.apache.commons.io.FileUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.apache.poi.ss.usermodel.Sheet;
|
|
|
-import org.apache.poi.ss.usermodel.Workbook;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Component;
|
|
@@ -107,13 +105,8 @@ public class ExamStudentImportParsingFileTask extends AbstractTask {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- Workbook workBook = ExcelParser.getWorkBook(new File(destFilePath),
|
|
|
- importEntity.getFileName());
|
|
|
-
|
|
|
- Sheet sheet = workBook.getSheetAt(0);
|
|
|
-
|
|
|
- List<String[]> lineList = ExcelParser.readSheet(sheet, 13);
|
|
|
- ExcelParser.close(workBook);
|
|
|
+ List<String[]> lineList = ExcelParser.readSheetBySax(PathUtil.getCanonicalPath(file), 1,
|
|
|
+ 13);
|
|
|
|
|
|
if (CollectionUtils.isEmpty(lineList)) {
|
|
|
importEntity.setStatus(ExamStudentImportStatus.ERROR);
|