기업회원 첨부파일 뷰어 사업자등록증/재직증명서 한화면에서 보기 기능 추가
@eae766b3bd20e0cf2cccf4013fb1c067739afa30
--- src/main/java/itn/com/cmm/util/PdfUtil.java
+++ src/main/java/itn/com/cmm/util/PdfUtil.java
... | ... | @@ -131,8 +131,8 @@ |
| 131 | 131 |
PDPageContentStream contents = new PDPageContentStream(doc, page); |
| 132 | 132 |
contents.drawImage(pdImage, pageWidthPosition, pageHeightPosition, imgWidth, imgHeight); |
| 133 | 133 |
contents.close(); |
| 134 |
- doc.save("/usr/local/tomcat/file/sht/pdf/" + uuid + ".pdf");
|
|
| 135 |
- //doc.save("C:/TEST/" + uuid + ".pdf");
|
|
| 134 |
+ //doc.save("/usr/local/tomcat/file/sht/pdf/" + uuid + ".pdf");
|
|
| 135 |
+ doc.save("C:/TEST/" + uuid + ".pdf");
|
|
| 136 | 136 |
|
| 137 | 137 |
} catch (Exception e) {
|
| 138 | 138 |
System.out.println("Exception! : " + e.getMessage());
|
--- src/main/java/itn/com/cmm/web/EgovFileDownloadController.java
+++ src/main/java/itn/com/cmm/web/EgovFileDownloadController.java
... | ... | @@ -465,8 +465,8 @@ |
| 465 | 465 |
String fileNm = (String) commandMap.get("fileNm");
|
| 466 | 466 |
try {
|
| 467 | 467 |
|
| 468 |
- File uFile = new File("/usr/local/tomcat/file/sht/pdf/", fileNm);
|
|
| 469 |
- //File uFile = new File("C:/TEST/", fileNm);
|
|
| 468 |
+ //File uFile = new File("/usr/local/tomcat/file/sht/pdf/", fileNm);
|
|
| 469 |
+ File uFile = new File("C:/TEST/", fileNm);
|
|
| 470 | 470 |
|
| 471 | 471 |
long fSize = uFile.length(); |
| 472 | 472 |
|
--- src/main/java/itn/let/mjo/msg/web/MjonMsgController.java
+++ src/main/java/itn/let/mjo/msg/web/MjonMsgController.java
... | ... | @@ -5046,7 +5046,21 @@ |
| 5046 | 5046 |
public String pdfView(FileVO fileVO |
| 5047 | 5047 |
, ModelMap model |
| 5048 | 5048 |
, HttpServletRequest request) throws Exception {
|
| 5049 |
- |
|
| 5049 |
+ |
|
| 5050 |
+ // 파라미터 |
|
| 5051 |
+ String docuDiv = request.getParameter("docuDiv");
|
|
| 5052 |
+ String atchFileId = request.getParameter("atchFileId");
|
|
| 5053 |
+ String workAtchFileId = request.getParameter("workAtchFileId");
|
|
| 5054 |
+ String mberNm = request.getParameter("mberNm");
|
|
| 5055 |
+ String bizNo = request.getParameter("bizNo");
|
|
| 5056 |
+ String ceoNm = request.getParameter("ceoNm");
|
|
| 5057 |
+ String hstManagerNm = request.getParameter("hstManagerNm");
|
|
| 5058 |
+ String hstMbtlNum = request.getParameter("hstMbtlNum");
|
|
| 5059 |
+ |
|
| 5060 |
+ if (docuDiv.equals("2")) {
|
|
| 5061 |
+ fileVO.setAtchFileId(workAtchFileId); |
|
| 5062 |
+ } |
|
| 5063 |
+ |
|
| 5050 | 5064 |
FileVO fvo = fileService.selectFileInf(fileVO); |
| 5051 | 5065 |
String path = ""; |
| 5052 | 5066 |
String fileType = ""; |
... | ... | @@ -5068,15 +5082,11 @@ |
| 5068 | 5082 |
} |
| 5069 | 5083 |
} |
| 5070 | 5084 |
|
| 5071 |
- String mberNm = request.getParameter("mberNm");
|
|
| 5072 |
- String bizNo = request.getParameter("bizNo");
|
|
| 5073 |
- String ceoNm = request.getParameter("ceoNm");
|
|
| 5074 |
- String hstManagerNm = request.getParameter("hstManagerNm");
|
|
| 5075 |
- String hstMbtlNum = request.getParameter("hstMbtlNum");
|
|
| 5076 |
- |
|
| 5077 | 5085 |
model.addAttribute("pdfPath", path);
|
| 5078 | 5086 |
model.addAttribute("fileType", fileType);
|
| 5079 |
- model.addAttribute("atchFileId", fileVO.getAtchFileId());
|
|
| 5087 |
+ model.addAttribute("docuDiv", docuDiv);
|
|
| 5088 |
+ model.addAttribute("atchFileId", atchFileId);
|
|
| 5089 |
+ model.addAttribute("workAtchFileId", workAtchFileId);
|
|
| 5080 | 5090 |
model.addAttribute("mberNm", mberNm);
|
| 5081 | 5091 |
model.addAttribute("bizNo", bizNo);
|
| 5082 | 5092 |
model.addAttribute("ceoNm", ceoNm);
|
--- src/main/webapp/WEB-INF/jsp/cmm/uss/umt/EgovMberCmpHstListByType.jsp
+++ src/main/webapp/WEB-INF/jsp/cmm/uss/umt/EgovMberCmpHstListByType.jsp
... | ... | @@ -22,8 +22,10 @@ |
| 22 | 22 |
}); |
| 23 | 23 |
|
| 24 | 24 |
// PdfView |
| 25 |
-function pdfViewPop(atchFileId,mberNm,bizNo,ceoNm,hstManagerNm,hstMbtlNum) {
|
|
| 25 |
+function pdfViewPop(docuDiv,atchFileId,workAtchFileId,mberNm,bizNo,ceoNm,hstManagerNm,hstMbtlNum) {
|
|
| 26 |
+ document.pdfForm.docuDiv.value = docuDiv; |
|
| 26 | 27 |
document.pdfForm.atchFileId.value = atchFileId; |
| 28 |
+ document.pdfForm.workAtchFileId.value = workAtchFileId; |
|
| 27 | 29 |
document.pdfForm.fileSn.value = 0; |
| 28 | 30 |
document.pdfForm.mberNm.value = mberNm; |
| 29 | 31 |
document.pdfForm.bizNo.value = bizNo; |
... | ... | @@ -284,7 +286,9 @@ |
| 284 | 286 |
<body> |
| 285 | 287 |
|
| 286 | 288 |
<form name="pdfForm" method="post"> |
| 289 |
+ <input type="hidden" name="docuDiv"/> |
|
| 287 | 290 |
<input type="hidden" name="atchFileId"/> |
| 291 |
+ <input type="hidden" name="workAtchFileId"/> |
|
| 288 | 292 |
<input type="hidden" name="fileSn"/> |
| 289 | 293 |
<input type="hidden" name="mberNm"/> |
| 290 | 294 |
<input type="hidden" name="bizNo"/> |
... | ... | @@ -469,7 +473,7 @@ |
| 469 | 473 |
<!--/cmm/fms/selectAddrAgencyFileInfs.do--> |
| 470 | 474 |
<!--/cmm/fms/selectMberFileInfs.do--> |
| 471 | 475 |
<c:if test="${result.atchFileId ne '' && result.atchFileId ne null}">
|
| 472 |
- <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>
|
|
| 476 |
+ <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>
|
|
| 473 | 477 |
</c:if> |
| 474 | 478 |
|
| 475 | 479 |
</td> |
... | ... | @@ -481,7 +485,7 @@ |
| 481 | 485 |
</c:if> |
| 482 | 486 |
|
| 483 | 487 |
<c:if test="${result.workAtchFileId ne '' && result.workAtchFileId ne null}">
|
| 484 |
- <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>
|
|
| 488 |
+ <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>
|
|
| 485 | 489 |
</c:if> |
| 486 | 490 |
|
| 487 | 491 |
</td> |
--- src/main/webapp/WEB-INF/jsp/uss/ion/msg/pdfView.jsp
+++ src/main/webapp/WEB-INF/jsp/uss/ion/msg/pdfView.jsp
... | ... | @@ -41,6 +41,21 @@ |
| 41 | 41 |
overflow-y: auto; |
| 42 | 42 |
} |
| 43 | 43 |
</style> |
| 44 |
+ |
|
| 45 |
+<script type="text/javaScript" language="javascript"> |
|
| 46 |
+ |
|
| 47 |
+$(document).ready(function() {
|
|
| 48 |
+ |
|
| 49 |
+}); |
|
| 50 |
+ |
|
| 51 |
+//PdfView |
|
| 52 |
+function pdfViewPop(docuDiv) {
|
|
| 53 |
+ document.pdfForm.docuDiv.value = docuDiv; |
|
| 54 |
+ document.pdfForm.action = "<c:url value='/uss/ion/msg/pdfView.do'/>"; |
|
| 55 |
+ document.pdfForm.submit(); |
|
| 56 |
+} |
|
| 57 |
+ |
|
| 58 |
+</script> |
|
| 44 | 59 |
</head> |
| 45 | 60 |
<body> |
| 46 | 61 |
|
... | ... | @@ -76,14 +91,45 @@ |
| 76 | 91 |
<td title="${hstManagerNm}">${hstManagerNm}</td>
|
| 77 | 92 |
<td title="${hstMbtlNum}">${hstMbtlNum}</td>
|
| 78 | 93 |
<td> |
| 79 |
- <c:import url="/cmm/fms/selectMberFileInfs.do" charEncoding="utf-8"> |
|
| 80 |
- <c:param name="param_atchFileId" value="${atchFileId}" />
|
|
| 81 |
- </c:import> |
|
| 94 |
+ <c:choose> |
|
| 95 |
+ <c:when test="${docuDiv eq '1'}">
|
|
| 96 |
+ <c:import url="/cmm/fms/selectMberFileInfs.do" charEncoding="utf-8"> |
|
| 97 |
+ <c:param name="param_atchFileId" value="${atchFileId}" />
|
|
| 98 |
+ </c:import> |
|
| 99 |
+ </c:when> |
|
| 100 |
+ <c:otherwise> |
|
| 101 |
+ <c:import url="/cmm/fms/selectMberFileInfs.do" charEncoding="utf-8"> |
|
| 102 |
+ <c:param name="param_atchFileId" value="${workAtchFileId}" />
|
|
| 103 |
+ </c:import> |
|
| 104 |
+ </c:otherwise> |
|
| 105 |
+ </c:choose> |
|
| 82 | 106 |
</td> |
| 83 | 107 |
</tr> |
| 84 | 108 |
</tbody> |
| 85 | 109 |
</table> |
| 86 | 110 |
</div> |
| 111 |
+ |
|
| 112 |
+ <c:if test="${not empty atchFileId || not empty workAtchFileId}">
|
|
| 113 |
+ <div style="width: 100%; text-align: center; margin: 30px 0 30px 0;"> |
|
| 114 |
+ <c:set var="btnClass1" value="btnType1"/> |
|
| 115 |
+ <c:set var="btnClass2" value="btnType1"/> |
|
| 116 |
+ <c:choose> |
|
| 117 |
+ <c:when test="${docuDiv eq '1'}">
|
|
| 118 |
+ <c:set var="btnClass1" value="btnType2"/> |
|
| 119 |
+ </c:when> |
|
| 120 |
+ <c:otherwise> |
|
| 121 |
+ <c:set var="btnClass2" value="btnType2"/> |
|
| 122 |
+ </c:otherwise> |
|
| 123 |
+ </c:choose> |
|
| 124 |
+ |
|
| 125 |
+ <c:if test="${not empty atchFileId}">
|
|
| 126 |
+ <button class="<c:out value="${btnClass1}"/>" onclick="pdfViewPop('1'); return false;"> 사업자등록증 </button>
|
|
| 127 |
+ </c:if> |
|
| 128 |
+ <c:if test="${not empty workAtchFileId}">
|
|
| 129 |
+ <button class="<c:out value="${btnClass2}"/>" onclick="pdfViewPop('2'); return false;"> 재직증명서 </button>
|
|
| 130 |
+ </c:if> |
|
| 131 |
+ </div> |
|
| 132 |
+ </c:if> |
|
| 87 | 133 |
|
| 88 | 134 |
<c:if test="${fileType eq 'etc'}">
|
| 89 | 135 |
<div style="width: 100%; text-align: center; margin: 30px 0 30px 0; color: red;"> |
... | ... | @@ -102,6 +148,19 @@ |
| 102 | 148 |
</div> |
| 103 | 149 |
<br /><br /> |
| 104 | 150 |
|
| 151 |
+<form name="pdfForm" method="post"> |
|
| 152 |
+<input type="hidden" name="atchFileId" value="${atchFileId}"/>
|
|
| 153 |
+<input type="hidden" name="workAtchFileId" value="${workAtchFileId}"/>
|
|
| 154 |
+<input type="hidden" name="0"/> |
|
| 155 |
+<input type="hidden" name="fileType" value="${fileType}"/>
|
|
| 156 |
+<input type="hidden" name="docuDiv"/> |
|
| 157 |
+<input type="hidden" name="mberNm" value="${mberNm}"/>
|
|
| 158 |
+<input type="hidden" name="bizNo" value="${bizNo}"/>
|
|
| 159 |
+<input type="hidden" name="ceoNm" value="${ceoNm}"/>
|
|
| 160 |
+<input type="hidden" name="hstManagerNm" value="${hstManagerNm}"/>
|
|
| 161 |
+<input type="hidden" name="hstMbtlNum" value="${hstMbtlNum}"/>
|
|
| 162 |
+</form> |
|
| 163 |
+ |
|
| 105 | 164 |
</body> |
| 106 | 165 |
</html> |
| 107 | 166 |
<script type="text/javaScript" language="javascript"> |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?