의견제출 심의의결서 출력 수정.

main
jjh 9 months ago
parent e0cd01dcda
commit da1bee74e9

@ -82,6 +82,6 @@ public interface OpnnSbmsnService {
* <li>fileName: </li>
* </ul>
*/
Map<String, String> makeDlbrDecsnFileFromHwpFormat(String formatType, String formatName, PrintOption printOption, LevyExclQuery req);
Map<String, Object> makeDlbrDecsnFileFromHwpFormat(String formatType, String formatName, PrintOption printOption, LevyExclQuery req);
}

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

@ -338,12 +338,11 @@ public class Excl02Controller extends ApplicationController {
* }</code></pre>
*/
public ModelAndView makeDlbrDecsnFileFromHwpFormat(LevyExclQuery req) {
Map<String,String> result = null;
//
PrintOption printOption = new PrintOption();
result = opnnSbmsnService.makeDlbrDecsnFileFromHwpFormat("info", "dlbrDecsn", printOption, req);
ModelAndView mav = new ModelAndView("jsonView");
Map<String,Object> result = opnnSbmsnService.makeDlbrDecsnFileFromHwpFormat("info", "dlbrDecsn", printOption ,req);
ModelAndView mav = new ModelAndView("downloadView");
mav.addAllObjects(result);

@ -354,22 +354,14 @@
$P.makeHwpFileDlbrDecsn = (params) => {
if (!params) return;
ajax.get({
url : wctx.url("/" + params.taskSeCd + "/excl/excl02/010/makeHwp.do")
, data : params || {}
, success : resp => {
if (resp.filePath != null && resp.filePath != "") {
let a = document.createElement("a");
a.href = resp.filePath;
a.download = resp.fileName;
let url = wctx.url("/" + params.taskSeCd + "/excl/excl02/010/makeHwp.do")
document.getElementById("tempArea--${pageName}").appendChild(a);
a.click();
document.getElementById("tempArea--${pageName}").removeChild(a);
}
}
let parameter = toQuery({
opnnIds : params.opnnIds
, taskSeCd : params.taskSeCd
});
document.location.href = url + "?" + parameter;
}
/**************************************************************************
@ -499,7 +491,7 @@
}
let params = {
callPurpose : "view"
callPurpose : "download"
, title : title
, opnnIds : opnnId // 의견제출 ID
, sggCd : $P.control.dataset.getValue("SGG_CD") // 시군구 코드

Loading…
Cancel
Save