diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn01ServiceBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn01ServiceBean.java index b80b3864..c12a5388 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn01ServiceBean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn01ServiceBean.java @@ -58,15 +58,14 @@ public class Crdn01ServiceBean extends AbstractServiceBean implements CrdnServic return crdn01Bean.removeCivilComplaint(crdnIDs); } - public ModelAndView makeFileFromHwpFormat(CrdnQuery crdnQuery) { + public ModelAndView makeFileFromHwpFormat(CrdnQuery crdnQuery, String formatFilePath) { + crdnQuery.setView("hwp"); DataObject dataObject = crdn01Bean.getCivilComplaintOriginalInfo(crdnQuery); SimpleDateFormat ymdhmsFormat = new SimpleDateFormat("yyyyMMddHHmmss"); SimpleDateFormat ymdFormat = new SimpleDateFormat("yyyyMMdd"); SimpleDateFormat ymdHypenFormat = new SimpleDateFormat("yyyy-MM-dd"); - String formatFilePath = "files" + File.separator + "format" + File.separator + "cvlcptOrgnl.hwp"; - HWPFile hwpFile; try { hwpFile = HWPReader.fromFile(formatFilePath); diff --git a/src/main/java/cokr/xit/fims/crdn/web/Crdn01Controller.java b/src/main/java/cokr/xit/fims/crdn/web/Crdn01Controller.java index 877b1eb2..8105ab25 100644 --- a/src/main/java/cokr/xit/fims/crdn/web/Crdn01Controller.java +++ b/src/main/java/cokr/xit/fims/crdn/web/Crdn01Controller.java @@ -179,7 +179,10 @@ public class Crdn01Controller extends ApplicationController { * @return hwp파일 */ @RequestMapping(name="민원내역 원본 한글 파일 생성", value="/050/makeFileFromHwpFormat.do") - public ModelAndView makeFileFromHwpFormat(CrdnQuery crdnQuery) { - return crdn01Service.makeFileFromHwpFormat(crdnQuery); + public ModelAndView makeFileFromHwpFormat(CrdnQuery crdnQuery, HttpServletRequest request) { + + String formatFilePath = request.getServletContext().getRealPath("resources/format/cvlcptOrgnl.hwp"); + + return crdn01Service.makeFileFromHwpFormat(crdnQuery, formatFilePath); } } diff --git a/src/main/webapp/resources/format/cvlcptOrgnl.hwp b/src/main/webapp/resources/format/cvlcptOrgnl.hwp new file mode 100644 index 00000000..a20edc00 Binary files /dev/null and b/src/main/webapp/resources/format/cvlcptOrgnl.hwp differ