|
@@ -122,6 +122,7 @@ public class SyncBasicExamStudentImportService extends SyncImportTaskTemplate {
|
|
FINISH_TOTAL_SIZE, successCount, FINISH_SUCCESS_SIZE, errorCount, FINISH_ERROR_SIZE));
|
|
FINISH_TOTAL_SIZE, successCount, FINISH_SUCCESS_SIZE, errorCount, FINISH_ERROR_SIZE));
|
|
if (CollectionUtils.isNotEmpty(errorDataList)) {
|
|
if (CollectionUtils.isNotEmpty(errorDataList)) {
|
|
tbTask.setResult(TaskResultEnum.ERROR);
|
|
tbTask.setResult(TaskResultEnum.ERROR);
|
|
|
|
+ String createExcelError = "";
|
|
try {
|
|
try {
|
|
File excelFileTemp = SystemConstant.getFileTempVar(SystemConstant.EXCEL_PREFIX);
|
|
File excelFileTemp = SystemConstant.getFileTempVar(SystemConstant.EXCEL_PREFIX);
|
|
this.createLocalErrorExcel(errorDataList, excelFileTemp);
|
|
this.createLocalErrorExcel(errorDataList, excelFileTemp);
|
|
@@ -129,9 +130,10 @@ public class SyncBasicExamStudentImportService extends SyncImportTaskTemplate {
|
|
FilePathVo filePathVo = fileUploadService.uploadFile(excelFileTemp, UploadFileEnum.FILE, fileName);
|
|
FilePathVo filePathVo = fileUploadService.uploadFile(excelFileTemp, UploadFileEnum.FILE, fileName);
|
|
tbTask.setErrorFilePath(JSON.toJSONString(filePathVo));
|
|
tbTask.setErrorFilePath(JSON.toJSONString(filePathVo));
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
- log.error("创建考生字典导入错误数据文件失败");
|
|
|
|
|
|
+ createExcelError = e.getMessage();
|
|
|
|
+ log.error("创建考生字典导入错误数据文件失败: " + e.getMessage());
|
|
} finally {
|
|
} finally {
|
|
- tbTask.setSummary("创建考生字典导入错误数据文件失败" + stringJoinerSummary);
|
|
|
|
|
|
+ tbTask.setSummary("创建考生字典导入错误数据文件失败" + stringJoinerSummary + createExcelError);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
tbTask.setSummary(stringJoinerSummary.toString());
|
|
tbTask.setSummary(stringJoinerSummary.toString());
|
|
@@ -234,7 +236,8 @@ public class SyncBasicExamStudentImportService extends SyncImportTaskTemplate {
|
|
}
|
|
}
|
|
for (int i = 0; i < cellCount; i++) {
|
|
for (int i = 0; i < cellCount; i++) {
|
|
sheet.autoSizeColumn(i);
|
|
sheet.autoSizeColumn(i);
|
|
- sheet.setColumnWidth(i, sheet.getColumnWidth(i) * 17 / 10);
|
|
|
|
|
|
+ int width = sheet.getColumnWidth(i) * 17 / 10;
|
|
|
|
+ sheet.setColumnWidth(i, Math.min(width, 255 * 256));
|
|
}
|
|
}
|
|
|
|
|
|
FileOutputStream outputStream = new FileOutputStream(excelFileTemp);
|
|
FileOutputStream outputStream = new FileOutputStream(excelFileTemp);
|