기업회원 첨부파일 뷰어 사업자등록증/재직증명서 한화면에서 보기 기능 추가
This commit is contained in:
parent
59daa096aa
commit
eae766b3bd
@ -131,8 +131,8 @@ public final class PdfUtil {
|
|||||||
PDPageContentStream contents = new PDPageContentStream(doc, page);
|
PDPageContentStream contents = new PDPageContentStream(doc, page);
|
||||||
contents.drawImage(pdImage, pageWidthPosition, pageHeightPosition, imgWidth, imgHeight);
|
contents.drawImage(pdImage, pageWidthPosition, pageHeightPosition, imgWidth, imgHeight);
|
||||||
contents.close();
|
contents.close();
|
||||||
doc.save("/usr/local/tomcat/file/sht/pdf/" + uuid + ".pdf");
|
//doc.save("/usr/local/tomcat/file/sht/pdf/" + uuid + ".pdf");
|
||||||
//doc.save("C:/TEST/" + uuid + ".pdf");
|
doc.save("C:/TEST/" + uuid + ".pdf");
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println("Exception! : " + e.getMessage());
|
System.out.println("Exception! : " + e.getMessage());
|
||||||
|
|||||||
@ -465,8 +465,8 @@ public class EgovFileDownloadController {
|
|||||||
String fileNm = (String) commandMap.get("fileNm");
|
String fileNm = (String) commandMap.get("fileNm");
|
||||||
try {
|
try {
|
||||||
|
|
||||||
File uFile = new File("/usr/local/tomcat/file/sht/pdf/", fileNm);
|
//File uFile = new File("/usr/local/tomcat/file/sht/pdf/", fileNm);
|
||||||
//File uFile = new File("C:/TEST/", fileNm);
|
File uFile = new File("C:/TEST/", fileNm);
|
||||||
|
|
||||||
long fSize = uFile.length();
|
long fSize = uFile.length();
|
||||||
|
|
||||||
|
|||||||
@ -5047,6 +5047,20 @@ public class MjonMsgController {
|
|||||||
, ModelMap model
|
, ModelMap model
|
||||||
, HttpServletRequest request) throws Exception {
|
, HttpServletRequest request) throws Exception {
|
||||||
|
|
||||||
|
// 파라미터
|
||||||
|
String docuDiv = request.getParameter("docuDiv");
|
||||||
|
String atchFileId = request.getParameter("atchFileId");
|
||||||
|
String workAtchFileId = request.getParameter("workAtchFileId");
|
||||||
|
String mberNm = request.getParameter("mberNm");
|
||||||
|
String bizNo = request.getParameter("bizNo");
|
||||||
|
String ceoNm = request.getParameter("ceoNm");
|
||||||
|
String hstManagerNm = request.getParameter("hstManagerNm");
|
||||||
|
String hstMbtlNum = request.getParameter("hstMbtlNum");
|
||||||
|
|
||||||
|
if (docuDiv.equals("2")) {
|
||||||
|
fileVO.setAtchFileId(workAtchFileId);
|
||||||
|
}
|
||||||
|
|
||||||
FileVO fvo = fileService.selectFileInf(fileVO);
|
FileVO fvo = fileService.selectFileInf(fileVO);
|
||||||
String path = "";
|
String path = "";
|
||||||
String fileType = "";
|
String fileType = "";
|
||||||
@ -5068,15 +5082,11 @@ public class MjonMsgController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String mberNm = request.getParameter("mberNm");
|
|
||||||
String bizNo = request.getParameter("bizNo");
|
|
||||||
String ceoNm = request.getParameter("ceoNm");
|
|
||||||
String hstManagerNm = request.getParameter("hstManagerNm");
|
|
||||||
String hstMbtlNum = request.getParameter("hstMbtlNum");
|
|
||||||
|
|
||||||
model.addAttribute("pdfPath", path);
|
model.addAttribute("pdfPath", path);
|
||||||
model.addAttribute("fileType", fileType);
|
model.addAttribute("fileType", fileType);
|
||||||
model.addAttribute("atchFileId", fileVO.getAtchFileId());
|
model.addAttribute("docuDiv", docuDiv);
|
||||||
|
model.addAttribute("atchFileId", atchFileId);
|
||||||
|
model.addAttribute("workAtchFileId", workAtchFileId);
|
||||||
model.addAttribute("mberNm", mberNm);
|
model.addAttribute("mberNm", mberNm);
|
||||||
model.addAttribute("bizNo", bizNo);
|
model.addAttribute("bizNo", bizNo);
|
||||||
model.addAttribute("ceoNm", ceoNm);
|
model.addAttribute("ceoNm", ceoNm);
|
||||||
|
|||||||
@ -22,8 +22,10 @@ $( document ).ready(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// PdfView
|
// PdfView
|
||||||
function pdfViewPop(atchFileId,mberNm,bizNo,ceoNm,hstManagerNm,hstMbtlNum) {
|
function pdfViewPop(docuDiv,atchFileId,workAtchFileId,mberNm,bizNo,ceoNm,hstManagerNm,hstMbtlNum) {
|
||||||
|
document.pdfForm.docuDiv.value = docuDiv;
|
||||||
document.pdfForm.atchFileId.value = atchFileId;
|
document.pdfForm.atchFileId.value = atchFileId;
|
||||||
|
document.pdfForm.workAtchFileId.value = workAtchFileId;
|
||||||
document.pdfForm.fileSn.value = 0;
|
document.pdfForm.fileSn.value = 0;
|
||||||
document.pdfForm.mberNm.value = mberNm;
|
document.pdfForm.mberNm.value = mberNm;
|
||||||
document.pdfForm.bizNo.value = bizNo;
|
document.pdfForm.bizNo.value = bizNo;
|
||||||
@ -284,7 +286,9 @@ function fnSetCalMonth(val) {
|
|||||||
<body>
|
<body>
|
||||||
|
|
||||||
<form name="pdfForm" method="post">
|
<form name="pdfForm" method="post">
|
||||||
|
<input type="hidden" name="docuDiv"/>
|
||||||
<input type="hidden" name="atchFileId"/>
|
<input type="hidden" name="atchFileId"/>
|
||||||
|
<input type="hidden" name="workAtchFileId"/>
|
||||||
<input type="hidden" name="fileSn"/>
|
<input type="hidden" name="fileSn"/>
|
||||||
<input type="hidden" name="mberNm"/>
|
<input type="hidden" name="mberNm"/>
|
||||||
<input type="hidden" name="bizNo"/>
|
<input type="hidden" name="bizNo"/>
|
||||||
@ -469,7 +473,7 @@ function fnSetCalMonth(val) {
|
|||||||
<!--/cmm/fms/selectAddrAgencyFileInfs.do-->
|
<!--/cmm/fms/selectAddrAgencyFileInfs.do-->
|
||||||
<!--/cmm/fms/selectMberFileInfs.do-->
|
<!--/cmm/fms/selectMberFileInfs.do-->
|
||||||
<c:if test="${result.atchFileId ne '' && result.atchFileId ne null}">
|
<c:if test="${result.atchFileId ne '' && result.atchFileId ne null}">
|
||||||
<button class="btnType btnType20" onclick="pdfViewPop('${result.atchFileId}','${result.mberNm}','${result.bizNo}','${result.ceoNm}','${result.hstManagerNm}','${result.hstMbtlNum}'); return false;" style="height:20px !important; padding:0 2px !important;">V</button>
|
<button class="btnType btnType20" onclick="pdfViewPop('1','${result.atchFileId}','${result.workAtchFileId}','${result.mberNm}','${result.bizNo}','${result.ceoNm}','${result.hstManagerNm}','${result.hstMbtlNum}'); return false;" style="height:20px !important; padding:0 2px !important;">V</button>
|
||||||
</c:if>
|
</c:if>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
@ -481,7 +485,7 @@ function fnSetCalMonth(val) {
|
|||||||
</c:if>
|
</c:if>
|
||||||
|
|
||||||
<c:if test="${result.workAtchFileId ne '' && result.workAtchFileId ne null}">
|
<c:if test="${result.workAtchFileId ne '' && result.workAtchFileId ne null}">
|
||||||
<button class="btnType btnType20" onclick="pdfViewPop('${result.workAtchFileId}','${result.mberNm}','${result.bizNo}','${result.ceoNm}','${result.hstManagerNm}','${result.hstMbtlNum}'); return false;" style="height:20px !important; padding:0 2px !important;">V</button>
|
<button class="btnType btnType20" onclick="pdfViewPop('2','${result.atchFileId}','${result.workAtchFileId}','${result.mberNm}','${result.bizNo}','${result.ceoNm}','${result.hstManagerNm}','${result.hstMbtlNum}'); return false;" style="height:20px !important; padding:0 2px !important;">V</button>
|
||||||
</c:if>
|
</c:if>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@ -41,6 +41,21 @@ html {
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<script type="text/javaScript" language="javascript">
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
//PdfView
|
||||||
|
function pdfViewPop(docuDiv) {
|
||||||
|
document.pdfForm.docuDiv.value = docuDiv;
|
||||||
|
document.pdfForm.action = "<c:url value='/uss/ion/msg/pdfView.do'/>";
|
||||||
|
document.pdfForm.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
@ -76,15 +91,46 @@ html {
|
|||||||
<td title="${hstManagerNm}">${hstManagerNm}</td>
|
<td title="${hstManagerNm}">${hstManagerNm}</td>
|
||||||
<td title="${hstMbtlNum}">${hstMbtlNum}</td>
|
<td title="${hstMbtlNum}">${hstMbtlNum}</td>
|
||||||
<td>
|
<td>
|
||||||
<c:import url="/cmm/fms/selectMberFileInfs.do" charEncoding="utf-8">
|
<c:choose>
|
||||||
<c:param name="param_atchFileId" value="${atchFileId}" />
|
<c:when test="${docuDiv eq '1'}">
|
||||||
</c:import>
|
<c:import url="/cmm/fms/selectMberFileInfs.do" charEncoding="utf-8">
|
||||||
|
<c:param name="param_atchFileId" value="${atchFileId}" />
|
||||||
|
</c:import>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<c:import url="/cmm/fms/selectMberFileInfs.do" charEncoding="utf-8">
|
||||||
|
<c:param name="param_atchFileId" value="${workAtchFileId}" />
|
||||||
|
</c:import>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<c:if test="${not empty atchFileId || not empty workAtchFileId}">
|
||||||
|
<div style="width: 100%; text-align: center; margin: 30px 0 30px 0;">
|
||||||
|
<c:set var="btnClass1" value="btnType1"/>
|
||||||
|
<c:set var="btnClass2" value="btnType1"/>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${docuDiv eq '1'}">
|
||||||
|
<c:set var="btnClass1" value="btnType2"/>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<c:set var="btnClass2" value="btnType2"/>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
|
||||||
|
<c:if test="${not empty atchFileId}">
|
||||||
|
<button class="<c:out value="${btnClass1}"/>" onclick="pdfViewPop('1'); return false;"> 사업자등록증 </button>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${not empty workAtchFileId}">
|
||||||
|
<button class="<c:out value="${btnClass2}"/>" onclick="pdfViewPop('2'); return false;"> 재직증명서 </button>
|
||||||
|
</c:if>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
|
||||||
<c:if test="${fileType eq 'etc'}">
|
<c:if test="${fileType eq 'etc'}">
|
||||||
<div style="width: 100%; text-align: center; margin: 30px 0 30px 0; color: red;">
|
<div style="width: 100%; text-align: center; margin: 30px 0 30px 0; color: red;">
|
||||||
PDF 뷰어에서 지원하지 않는 형식의 파일입니다. 첨부파일 다운로드후 확인해주세요.
|
PDF 뷰어에서 지원하지 않는 형식의 파일입니다. 첨부파일 다운로드후 확인해주세요.
|
||||||
@ -102,6 +148,19 @@ html {
|
|||||||
</div>
|
</div>
|
||||||
<br /><br />
|
<br /><br />
|
||||||
|
|
||||||
|
<form name="pdfForm" method="post">
|
||||||
|
<input type="hidden" name="atchFileId" value="${atchFileId}"/>
|
||||||
|
<input type="hidden" name="workAtchFileId" value="${workAtchFileId}"/>
|
||||||
|
<input type="hidden" name="0"/>
|
||||||
|
<input type="hidden" name="fileType" value="${fileType}"/>
|
||||||
|
<input type="hidden" name="docuDiv"/>
|
||||||
|
<input type="hidden" name="mberNm" value="${mberNm}"/>
|
||||||
|
<input type="hidden" name="bizNo" value="${bizNo}"/>
|
||||||
|
<input type="hidden" name="ceoNm" value="${ceoNm}"/>
|
||||||
|
<input type="hidden" name="hstManagerNm" value="${hstManagerNm}"/>
|
||||||
|
<input type="hidden" name="hstMbtlNum" value="${hstMbtlNum}"/>
|
||||||
|
</form>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
<script type="text/javaScript" language="javascript">
|
<script type="text/javaScript" language="javascript">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user