|
@@ -15,6 +15,7 @@ import com.qmth.themis.business.service.TOeExamRecordService;
|
|
|
import com.qmth.themis.business.templete.TaskExportCommon;
|
|
|
import com.qmth.themis.business.templete.TaskExportTemplete;
|
|
|
import com.qmth.themis.business.templete.service.TempleteLogicService;
|
|
|
+import com.qmth.themis.common.exception.BusinessException;
|
|
|
import com.qmth.themis.common.util.Result;
|
|
|
import com.qmth.themis.common.util.ResultUtil;
|
|
|
import org.apache.poi.ss.usermodel.*;
|
|
@@ -171,6 +172,11 @@ public class TaskMarkResultSimpleExportTemplete implements TaskExportTemplete {
|
|
|
} catch (Exception e) {
|
|
|
log.error("导出报错", e);
|
|
|
taskExportCommon.exception(min, e, taskExportCommon.getTxtList());
|
|
|
+ if (e instanceof BusinessException) {
|
|
|
+ throw new BusinessException(e.getMessage());
|
|
|
+ } else {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }
|
|
|
} finally {
|
|
|
//这里写入txt文件
|
|
|
taskExportCommon.writeExportResultTxt(stringJoiner.toString(), taskExportCommon.getTxtList().toString(), excelFilePath);
|