민원 원본 내역 한글파일 다운로드 수정

main
이범준 9 months ago
parent 15c142fd4e
commit 835873e7f3

@ -41,7 +41,7 @@ public interface CrdnCvlcptService {
* <li>fileName: </li>
* </ul>
*/
Map<String, String> makeFileFromHwpFormat(CrdnQuery query);
Map<String, Object> makeFileFromHwpFormat(CrdnQuery query);
/** ().
* @param crdnID ID

@ -145,7 +145,7 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv
}
@Override
public Map<String, String> makeFileFromHwpFormat(CrdnQuery query) {
public Map<String, Object> makeFileFromHwpFormat(CrdnQuery query) {
String baseFormatFilePath = ("template/hwp/cvlcptOrgnl_text.hwp");
String attachFormatFilePath = ("template/hwp/cvlcptOrgnl_photo.hwp");
@ -250,6 +250,7 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv
if(i+3 < photoCnt)
InsertingImageCell.IMPL_InsertPicture(attachFormatFile, "오른쪽아래사진", fileInfoList.get(i+3).string("URL"));
AddUtil.appendToLast(attachFormatFile, resultFile);
}
HWPWriter.toFile(resultFile, resultHwpPath);
@ -257,9 +258,10 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv
}
String downlaodFileName = "민원내역원본_" + currentTime + ".hwp";
Map<String, String> result = Map.of(
Map<String, Object> result = Map.of(
"filename", downlaodFileName,
"filePath", resultHwpPath,
"fileName", downlaodFileName
"file", new File(resultHwpPath)
);
return result;

@ -189,9 +189,9 @@ public class Cvlc01Controller extends ApplicationController {
* @return hwp
*/
public ModelAndView makeFileFromHwpFormat(CrdnQuery query) {
ModelAndView mav = new ModelAndView("downloadView");
Map<String, Object> result = crdnCvlcptService.makeFileFromHwpFormat(query);
Map<String,String> result = crdnCvlcptService.makeFileFromHwpFormat(query);
ModelAndView mav = new ModelAndView("jsonView");
mav.addAllObjects(result);
return mav;
}

@ -651,7 +651,7 @@ $(document).ready(function(){
content : resp,
size : "xl",
init : () => {
setDialogZindex();
}
});
}

@ -174,21 +174,10 @@ $(document).ready(function() {
}
$P.fnMakeHwp = () => {
var url = wctx.url("/"+$P.taskSeCd+"/cvlc/cvlc01/050/makeFileFromHwpFormat.do");
var parameter = toQuery({ crdnId : $("#crdnId--${pageName}").val() });
ajax.post({
url : wctx.url("/"+$P.taskSeCd+"/cvlc/cvlc01/050/makeFileFromHwpFormat.do"),
data : { crdnId : $("#crdnId--${pageName}").val() },
success : (resp) => {
var a = document.createElement("a");
a.href = resp.filePath;
a.download = resp.fileName;
document.getElementById("tempArea--${pageName}").appendChild(a);
a.click();
document.getElementById("tempArea--${pageName}").removeChild(a);
}
});
document.location.href = url + "?" + parameter;
}
/**************************************************************************

Loading…
Cancel
Save