|
@@ -836,6 +836,13 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
|
map.put("size", successMap.size());
|
|
|
//执行情况写入到excel
|
|
|
String path = fileStoreUtil.buildPath(UploadFileEnum.PDF, false, school.getName(), basicSemester.getName(),basicExam.getName());
|
|
|
+ File file = new File(path);
|
|
|
+ if(!file.exists()) {
|
|
|
+ boolean dirFlag = file.mkdirs();
|
|
|
+ if(!dirFlag) {
|
|
|
+ log.error("[pdf生成] excel存放目录 创建失败:{}",path);
|
|
|
+ }
|
|
|
+ }
|
|
|
createPdfExcel(path, toBeGeneratedList, successMap, errorMap);
|
|
|
} catch (Exception e) {
|
|
|
throw ExceptionResultEnum.ERROR.exception(e.getMessage());
|
|
@@ -852,7 +859,10 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
|
String pdfRootPath = getPdfRootPath(paperScanTask, student);
|
|
|
File dir = new File(pdfRootPath);
|
|
|
if (!dir.exists()) {
|
|
|
- dir.mkdirs();
|
|
|
+ boolean dirFlag = dir.mkdirs();
|
|
|
+ if (!dirFlag) {
|
|
|
+ log.error("[pdf生成] 目录创建失败:{}", pdfRootPath);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//文件的完整路径
|