민원원본보기 한글파일 다운로드시 루트 폴더 생성하는 부분 추가

main
이범준 1 year ago
parent d1e0cbc186
commit c7ac1c3b75

@ -103,7 +103,14 @@ public class Crdn01ServiceBean extends AbstractServiceBean implements CrdnServic
FieldFinder.setClickHereText(baseFormatFile, "민원내용", strings); FieldFinder.setClickHereText(baseFormatFile, "민원내용", strings);
String currentTime = ymdhmsFormat.format(new Date()); String currentTime = ymdhmsFormat.format(new Date());
String resultPath = "files" + File.separator + "result" + File.separator + currentTime + ".hwp";
String formatFileResultRootPath = "files" + File.separator + "result";
File formatFileResultRootFolder = new File(formatFileResultRootPath);
if(!formatFileResultRootFolder.exists()) {
formatFileResultRootFolder.mkdirs();
}
String resultPath = formatFileResultRootPath + File.separator + currentTime + ".hwp";
HWPWriter.toFile(baseFormatFile, resultPath); HWPWriter.toFile(baseFormatFile, resultPath);
HWPFile resultFile = HWPReader.fromFile(resultPath); HWPFile resultFile = HWPReader.fromFile(resultPath);

Loading…
Cancel
Save