feat(archives): 添加一人一档PDF生成功能的日志记录
parent
f40126022c
commit
19dcd2f7eb
|
|
@ -350,6 +350,8 @@ public class ArchivesQueryExe {
|
||||||
byteArrayList.add(execteExamRecord(params));
|
byteArrayList.add(execteExamRecord(params));
|
||||||
System.out.println("5-------------------------------------------------------------");
|
System.out.println("5-------------------------------------------------------------");
|
||||||
}
|
}
|
||||||
|
log.info("execteGeneratePdfList,开始转换pdf{}", JSONUtil.toJsonStr(byteArrayList));
|
||||||
|
|
||||||
byte[] pdf = WordToPdfUtil.mergeWordToPdf(byteArrayList);
|
byte[] pdf = WordToPdfUtil.mergeWordToPdf(byteArrayList);
|
||||||
Files.write(Paths.get(tempDir+"/"+params.getClassName()+"-一人一档-"+DateUtil.getSdfTimes()+".pdf"), pdf);
|
Files.write(Paths.get(tempDir+"/"+params.getClassName()+"-一人一档-"+DateUtil.getSdfTimes()+".pdf"), pdf);
|
||||||
stringList.add(new File(tempDir+"/"+params.getClassName()+"-一人一档-"+DateUtil.getSdfTimes()+".pdf"));
|
stringList.add(new File(tempDir+"/"+params.getClassName()+"-一人一档-"+DateUtil.getSdfTimes()+".pdf"));
|
||||||
|
|
@ -380,6 +382,8 @@ public class ArchivesQueryExe {
|
||||||
ByteArrayOutputStream outputStream = Tools.renderTemplate(templatePath, workItem);
|
ByteArrayOutputStream outputStream = Tools.renderTemplate(templatePath, workItem);
|
||||||
return outputStream.toByteArray();
|
return outputStream.toByteArray();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
log.error("execteHomepage,整理数据失败",e);
|
||||||
|
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -391,6 +395,7 @@ public class ArchivesQueryExe {
|
||||||
ByteArrayOutputStream outputStream = Tools.renderTemplate(templatePath, workItem);
|
ByteArrayOutputStream outputStream = Tools.renderTemplate(templatePath, workItem);
|
||||||
return outputStream.toByteArray();
|
return outputStream.toByteArray();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
log.error("execteAttendanceRecord,整理数据失败",e);
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -404,6 +409,7 @@ public class ArchivesQueryExe {
|
||||||
ByteArrayOutputStream outputStream = Tools.renderTemplate(templatePath, workItem);
|
ByteArrayOutputStream outputStream = Tools.renderTemplate(templatePath, workItem);
|
||||||
return outputStream.toByteArray();
|
return outputStream.toByteArray();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
log.error("execteStudentRecord,整理数据失败",e);
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -450,6 +456,7 @@ public class ArchivesQueryExe {
|
||||||
ByteArrayOutputStream outputStream = Tools.renderTemplate(templatePath, workItem);
|
ByteArrayOutputStream outputStream = Tools.renderTemplate(templatePath, workItem);
|
||||||
return outputStream.toByteArray();
|
return outputStream.toByteArray();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
log.error("execteStudyRecord,整理数据失败",e);
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -498,6 +505,7 @@ public class ArchivesQueryExe {
|
||||||
return outputStream.toByteArray();
|
return outputStream.toByteArray();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
log.error("execteExamRecord,整理数据失败",e);
|
||||||
return null;
|
return null;
|
||||||
// throw new BizException("导出失败");
|
// throw new BizException("导出失败");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue