|
|
@ -1,5 +1,6 @@
|
|
|
|
package cokr.xit.fims.excl.service.bean;
|
|
|
|
package cokr.xit.fims.excl.service.bean;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.io.File;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
@ -78,8 +79,8 @@ public class OpnnSbmsnServiceBean extends AbstractServiceBean implements OpnnSbm
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public Map<String, String> makeDlbrDecsnFileFromHwpFormat(String formatType, String formatName, PrintOption printOption, LevyExclQuery req) {
|
|
|
|
public Map<String, Object> makeDlbrDecsnFileFromHwpFormat(String formatType, String formatName, PrintOption printOption, LevyExclQuery req) {
|
|
|
|
Map<String, String> result = new HashMap<>();
|
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
|
|
HWPPrintUtil printUtil = new HWPPrintUtil();
|
|
|
|
HWPPrintUtil printUtil = new HWPPrintUtil();
|
|
|
|
HWPFormatWriter hwpFormatWriter = new DlbrDecsnList();
|
|
|
|
HWPFormatWriter hwpFormatWriter = new DlbrDecsnList();
|
|
|
@ -99,8 +100,8 @@ public class OpnnSbmsnServiceBean extends AbstractServiceBean implements OpnnSbm
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
int dataIndex = 0;
|
|
|
|
int dataIndex = 0;
|
|
|
|
for(int partFileIndex = 0; partFileIndex < printUtil.getTotalPartFileCount(); partFileIndex++) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(int partFileIndex = 0; partFileIndex < printUtil.getTotalPartFileCount(); partFileIndex++) {
|
|
|
|
// 새 파일 생성
|
|
|
|
// 새 파일 생성
|
|
|
|
String resultHwpPath = printUtil.newFileFromFormatFile();
|
|
|
|
String resultHwpPath = printUtil.newFileFromFormatFile();
|
|
|
|
HWPFile resultFile = HWPReader.fromFile(resultHwpPath);
|
|
|
|
HWPFile resultFile = HWPReader.fromFile(resultHwpPath);
|
|
|
@ -141,12 +142,18 @@ public class OpnnSbmsnServiceBean extends AbstractServiceBean implements OpnnSbm
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
HWPWriter.toFile(baseFile, basePath);
|
|
|
|
HWPWriter.toFile(baseFile, basePath);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 2; i <= partFileList.size(); i++) {
|
|
|
|
|
|
|
|
(new File(partFileList.get(i-1))).delete();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
String downlaodFileName = printUtil.getFormatKorName() + "_" + printUtil.getPrintRequestDt() + ".hwp";
|
|
|
|
String downlaodFileName = printUtil.getFormatKorName() + "_" + printUtil.getPrintRequestDt() + ".hwp";
|
|
|
|
|
|
|
|
String filePath = partFileList.get(0);
|
|
|
|
|
|
|
|
|
|
|
|
result.put("fileName", downlaodFileName);
|
|
|
|
result.put("filename", downlaodFileName);
|
|
|
|
result.put("filePath", partFileList.get(0));
|
|
|
|
result.put("filePath", filePath);
|
|
|
|
|
|
|
|
result.put("file", new File(filePath));
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
throw new RuntimeException("한글 파일 출력 중 오류가 발생하였습니다.");
|
|
|
|
throw new RuntimeException("한글 파일 출력 중 오류가 발생하였습니다.");
|
|
|
|