From d1a3ae950d0b2befcaceedc3353c0c81e7fc0373 Mon Sep 17 00:00:00 2001 From: hjjeong Date: Thu, 30 Oct 2025 18:11:45 +0900 Subject: [PATCH] =?UTF-8?q?Revert:=20PDF=20=EB=B3=80=ED=99=98=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EB=90=98=EB=8F=8C=EB=A6=BC=20(4a9577c)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/WEB-INF/dispatcher-servlet.xml | 11 - .../view/contractMgmt/estimateList_new.jsp | 155 +-------- .../view/contractMgmt/estimateTemplate1.jsp | 302 +++--------------- src/com/pms/common/utils/MailUtil.java | 5 +- .../controller/ContractMgmtController.java | 13 +- .../service/ContractMgmtService.java | 278 ++++++---------- tomcat-conf/server.xml | 8 +- 7 files changed, 152 insertions(+), 620 deletions(-) diff --git a/WebContent/WEB-INF/dispatcher-servlet.xml b/WebContent/WEB-INF/dispatcher-servlet.xml index 0769b0a..8a5b95d 100644 --- a/WebContent/WEB-INF/dispatcher-servlet.xml +++ b/WebContent/WEB-INF/dispatcher-servlet.xml @@ -42,17 +42,6 @@ - - - - - - - - - - - diff --git a/WebContent/WEB-INF/view/contractMgmt/estimateList_new.jsp b/WebContent/WEB-INF/view/contractMgmt/estimateList_new.jsp index bf768b7..1948ab4 100644 --- a/WebContent/WEB-INF/view/contractMgmt/estimateList_new.jsp +++ b/WebContent/WEB-INF/view/contractMgmt/estimateList_new.jsp @@ -668,169 +668,21 @@ function fn_sendEstimateMail(contractObjId){ return; } - // 1단계: 견적서 템플릿 정보 조회 - Swal.fire({ - title: '견적서 조회 중...', - text: '잠시만 기다려주세요.', - allowOutsideClick: false, - onOpen: () => { - Swal.showLoading(); - } - }); - - $.ajax({ - url: "/contractMgmt/getEstimateTemplateList.do", - type: "POST", - data: { objId: contractObjId }, - dataType: "json", - success: function(data){ - if(data.result === "success" && data.list && data.list.length > 0){ - // 최종 차수 견적서 찾기 - var latestEstimate = data.list[0]; // 이미 차수 내림차순으로 정렬되어 있음 - var templateObjId = latestEstimate.OBJID || latestEstimate.objid; - var templateType = latestEstimate.TEMPLATE_TYPE || latestEstimate.template_type || latestEstimate.templateType; - - // 2단계: 견적서 페이지를 새 창으로 열고 PDF 생성 - fn_generatePdfAndSendMail(contractObjId, templateObjId, templateType); - } else { - Swal.close(); - Swal.fire({ - title: '오류', - text: '견적서를 찾을 수 없습니다.', - icon: 'error' - }); - } - }, - error: function(xhr, status, error){ - Swal.close(); - console.error("견적서 조회 오류:", xhr, status, error); - Swal.fire({ - title: '오류', - text: '견적서 조회 중 오류가 발생했습니다.', - icon: 'error' - }); - } - }); -} - -// PDF 생성 및 메일 발송 -function fn_generatePdfAndSendMail(contractObjId, templateObjId, templateType){ - Swal.fire({ - title: 'PDF 생성 중...', - text: '견적서를 PDF로 변환하고 있습니다.', - allowOutsideClick: false, - onOpen: () => { - Swal.showLoading(); - } - }); - - // 견적서 페이지 URL 생성 - var url = ""; - if(templateType === "1"){ - url = "/contractMgmt/estimateTemplate1.do?templateObjId=" + templateObjId; - } else if(templateType === "2"){ - url = "/contractMgmt/estimateTemplate2.do?templateObjId=" + templateObjId; - } - - // 숨겨진 iframe으로 페이지 로드 - var iframe = $('