이지우 - 관리자 저작권체험교실 상세화면 첨부파일들에 업로드 날짜 추가

This commit is contained in:
jiwoo 2023-10-26 18:25:16 +09:00
parent 9c9cc98a37
commit 78087cbd65
5 changed files with 126 additions and 11 deletions

View File

@ -352,6 +352,23 @@ public class EgovFileMngController {
* @return
* @throws Exception
*/
@RequestMapping("/cmm/fms/selectRsltRprtFileWithDelete.do")
public String selectRsltRprtFileWithDelete(@ModelAttribute("searchVO") FileVO fileVO, @RequestParam Map<String, Object> commandMap, ModelMap model) throws Exception {
String atchFileId = (String) commandMap.get("param_atchFileId");
String eduAplctOrd = (String) commandMap.get("eduAplctOrd");
String type = (String) commandMap.get("type");
fileVO.setAtchFileId(atchFileId);
List<FileVO> result = fileService.selectFileInfs(fileVO);
model.addAttribute("fileList", result);
model.addAttribute("updateFlag", "N");
model.addAttribute("fileListCnt", result.size());
model.addAttribute("atchFileId", atchFileId);
model.addAttribute("eduAplctOrd", eduAplctOrd);
model.addAttribute("type", type);
return "cmm/fms/selectRsltRprtFileWithDelete";
}
@RequestMapping("/cmm/fms/selectRsltRprtFile.do")
public String selectRsltRprtFile(@ModelAttribute("searchVO") FileVO fileVO, @RequestParam Map<String, Object> commandMap, ModelMap model) throws Exception {
String atchFileId = (String) commandMap.get("param_atchFileId");

View File

@ -4,6 +4,7 @@
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
/**
@ -83,8 +84,9 @@
<c:forEach var="fileVO" items="${fileList}" varStatus="status">
<a href="javascript:fn_egov_downFile('<c:out value="${fileVO.atchFileId}"/>','<c:out value="${fileVO.fileSn}"/>')" class="file_download_a" title="다운로드" style="display:inline-block;">
<c:out value="${fileVO.orignlFileNm}"/>
<fmt:parseDate value="${fileVO.creatDt}" var="creatDt" pattern="yyyy-MM-dd HH:mm:ss"/>
(<fmt:formatDate value="${creatDt}" pattern="yyyy년MM월dd일"/>)
</a>
<img src="<c:url value='/images/egovframework/com/cmm/btn/btn_del.png' />" class="cursor" onClick="delRsltRprtFile('<c:out value="${fileVO.atchFileId}"/>','<c:out value="${fileVO.fileSn}" />', '<c:out value="${type}"/>'); return false;" alt="첨부파일">
<br/>
</c:forEach>

View File

@ -0,0 +1,96 @@
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
/**
* @Class Name : selectScholSealInfs.jsp
* @Description : 파일 목록화면
* @Modification Information
* @
* @ 수정일 수정자 수정내용
* @ ---------- ------ ---------------------------
* @ 2009.03.26 이삼섭 최초 생성
* @ 2011.07.20 옥찬우 <Input> Tag id속성 추가( Line : 68 )
*
* @author 공통서비스 개발팀 이삼섭
* @since 2009.03.26
* @version 1.0
* @see
*
*/
%>
<!-- link href="<c:url value='/css/egovframework/com/com.css' />" rel="stylesheet" type="text/css"-->
<script type="text/javascript">
function fn_egov_downFile(atchFileId, fileSn){
window.open("<c:url value='/cmm/fms/FileDown.do?atchFileId="+atchFileId+"&fileSn="+fileSn+"'/>");
}
/* 등록되어 있는 파일 삭제버튼 클릭시 */
function delRsltRprtFile(itemId , fileSn, rprtFileType){
if(!confirm("삭제하시겠습니까?")){
return false;
}
$.ajax({
type: "POST",
url: "<c:url value='/kccadr/oprtn/cpyrgExprnClsrm/rsltRprtfileDeleteAjax.do' />",
data:{ "atchFileId" : itemId , "fileSn" : fileSn, "eduAplctOrd" : "${eduAplctOrd}", "rprtFileType" : rprtFileType},
dataType:'json',
cache: false,
async: false,
timeout: 600000,
success: function (returnData, status) {
if(status == 'success'){
if(returnData.result == 'fail'){
alert("삭제처리가 실패하였습니다.");
}else if(returnData.result == 'auth_fail'){
alert("세션이 종료되었습니다.");
}else if(returnData.result =='success'){
$('.item_'+returnData.fmsFileVO.atchFileId+"_"+returnData.fmsFileVO.fileSn).remove();
alert("삭제되었습니다.");
window.location.reload()
}
}else{
alert("삭제처리에 실패하였습니다.");
}
},
error: function (e) {
console.log("ERROR : ", e);
alert("삭제처리에 실패하였습니다.");
}
});
}
</script>
<style type="text/css">
.cursor {
cursor: pointer;
vertical-align: middle;
}
</style>
<!-- <form name="fileForm" action="" method="post" > -->
<input type="hidden" name="atchFileId" value="${atchFileId}">
<input type="hidden" name="fileSn" >
<input type="hidden" name="fileListCnt" id="fileListCnt" value="${fileListCnt}">
<c:set var="fileCount" value="${fn:length(fileList) }" />
<!-- </form> -->
<!--<title>파일목록</title> -->
<c:forEach var="fileVO" items="${fileList}" varStatus="status">
<a href="javascript:fn_egov_downFile('<c:out value="${fileVO.atchFileId}"/>','<c:out value="${fileVO.fileSn}"/>')" class="file_download_a" title="다운로드" style="display:inline-block;">
<c:out value="${fileVO.orignlFileNm}"/>
<fmt:parseDate value="${fileVO.creatDt}" var="creatDt" pattern="yyyy-MM-dd HH:mm:ss"/>
(<fmt:formatDate value="${creatDt}" pattern="yyyy년MM월dd일"/>)
</a>
<img src="<c:url value='/images/egovframework/com/cmm/btn/btn_del.png' />" class="cursor" onClick="delRsltRprtFile('<c:out value="${fileVO.atchFileId}"/>','<c:out value="${fileVO.fileSn}" />', '<c:out value="${type}"/>'); return false;" alt="첨부파일">
<br/>
</c:forEach>
<c:if test="${fn:length(fileList) == 0}">
</c:if>

View File

@ -379,7 +379,7 @@
<p>첨부파일</p>
</th>
<td class="file_download" colspan="3">
<c:import url="/cmm/fms/selectScholSealInfs.do" charEncoding="utf-8">
<c:import url="/cmm/fms/selectRsltRprtFile.do" charEncoding="utf-8">
<c:param name="param_atchFileId" value="${info.oprtnFileId}" />
<c:param name="designTy" value="EMPTY" />
</c:import>

View File

@ -248,7 +248,7 @@
<p>첨부파일</p>
</th>
<td class="file_download">
<c:import url="/cmm/fms/selectSimpleDownInfs.do" charEncoding="utf-8">
<c:import url="/cmm/fms/selectRsltRprtFile.do" charEncoding="utf-8">
<c:param name="param_atchFileId" value="${info.scholSealAtchFileId}" />
</c:import>
</td>
@ -260,7 +260,7 @@
<td class="file_download">
<c:if test="${info.transAtchFileId ne null}">
<c:import url="/cmm/fms/selectSimpleDownInfs.do" charEncoding="utf-8">
<c:import url="/cmm/fms/selectRsltRprtFile.do" charEncoding="utf-8">
<c:param name="param_atchFileId" value="${info.transAtchFileId}" />
</c:import>
</c:if>
@ -275,7 +275,7 @@
<td class="file_download">
<c:if test="${info.oathAtchFileId ne null}">
<c:import url="/cmm/fms/selectSimpleDownInfs.do" charEncoding="utf-8">
<c:import url="/cmm/fms/selectRsltRprtFile.do" charEncoding="utf-8">
<c:param name="param_atchFileId" value="${info.oathAtchFileId}" />
</c:import>
</c:if>
@ -336,7 +336,7 @@
<td class="file_download">
<c:if test="${info.planAtchFileId ne null}">
<c:import url="/cmm/fms/selectSimpleDownInfs.do" charEncoding="utf-8">
<c:import url="/cmm/fms/selectRsltRprtFile.do" charEncoding="utf-8">
<c:param name="param_atchFileId" value="${info.planAtchFileId}" />
</c:import>
</c:if>
@ -363,7 +363,7 @@
<p>결과보고서 원본</p>
</th>
<td class="file_download" colspan="3">
<c:import url="/cmm/fms/selectRsltRprtFile.do" charEncoding="utf-8">
<c:import url="/cmm/fms/selectRsltRprtFileWithDelete.do" charEncoding="utf-8">
<c:param name="param_atchFileId" value="${info.orgnlRsltAtchFileId}" />
<c:param name="eduAplctOrd" value="${info.eduAplctOrd}" />
<c:param name="type" value="rslt" />
@ -375,7 +375,7 @@
<p>결과보고서 평가용</p>
</th>
<td class="file_download" colspan="3">
<c:import url="/cmm/fms/selectRsltRprtFile.do" charEncoding="utf-8">
<c:import url="/cmm/fms/selectRsltRprtFileWithDelete.do" charEncoding="utf-8">
<c:param name="param_atchFileId" value="${info.cpyRsltAtchFileId}" />
<c:param name="eduAplctOrd" value="${info.eduAplctOrd}" />
<c:param name="type" value="cpy" />
@ -387,7 +387,7 @@
<p>증빙사진</p>
</th>
<td class="file_download" colspan="3">
<c:import url="/cmm/fms/selectRsltRprtFile.do" charEncoding="utf-8">
<c:import url="/cmm/fms/selectRsltRprtFileWithDelete.do" charEncoding="utf-8">
<c:param name="param_atchFileId" value="${info.evdncPhtAtchFileId}" />
<c:param name="eduAplctOrd" value="${info.eduAplctOrd}" />
<c:param name="type" value="evdnc" />
@ -399,7 +399,7 @@
<p>원격연수 이수증</p>
</th>
<td class="file_download" colspan="3">
<c:import url="/cmm/fms/selectRsltRprtFile.do" charEncoding="utf-8">
<c:import url="/cmm/fms/selectRsltRprtFileWithDelete.do" charEncoding="utf-8">
<c:param name="param_atchFileId" value="${info.rmtTrnAtchFileId}" />
<c:param name="eduAplctOrd" value="${info.eduAplctOrd}" />
<c:param name="type" value="rmt" />