Merge branch 'JIWOO' into advc

This commit is contained in:
jiwoo 2023-11-17 12:37:09 +09:00
commit 9d3beb8e1b
17 changed files with 264 additions and 17 deletions

View File

@ -3,6 +3,8 @@ package kcc.com.cmm.service;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctVO;
/** /**
* @Class Name : EgovFileMngService.java * @Class Name : EgovFileMngService.java
* @Description : 파일정보의 관리를 위한 서비스 인터페이스 * @Description : 파일정보의 관리를 위한 서비스 인터페이스
@ -127,4 +129,6 @@ public interface EgovFileMngService {
public void deleteFmsFileInf(FileVO fileVO) throws Exception; public void deleteFmsFileInf(FileVO fileVO) throws Exception;
public void updateFileName(FileVO fileVO) throws Exception; public void updateFileName(FileVO fileVO) throws Exception;
public void deleteOffeduFile(FileVO fvo, VEEduAplctVO vEEduAplctVO) throws Exception;
} }

View File

@ -12,6 +12,8 @@ import org.springframework.stereotype.Service;
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl; import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
import kcc.com.cmm.service.EgovFileMngService; import kcc.com.cmm.service.EgovFileMngService;
import kcc.com.cmm.service.FileVO; import kcc.com.cmm.service.FileVO;
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctVO;
import kcc.ve.instr.tngrVisitEdu.rprtInfo.service.VEEduRprtVO;
/** /**
* @Class Name : EgovFileMngServiceImpl.java * @Class Name : EgovFileMngServiceImpl.java
@ -196,4 +198,20 @@ public class EgovFileMngServiceImpl extends EgovAbstractServiceImpl implements E
public void updateFileName(FileVO fileVO) throws Exception { public void updateFileName(FileVO fileVO) throws Exception {
fileMngDAO.updateFileName(fileVO); fileMngDAO.updateFileName(fileVO);
} }
@Override
public void deleteOffeduFile(FileVO fileVO, VEEduAplctVO vEEduAplctVO) throws Exception {
//결과 보고 첨부파일 ID 삭제 처리
fileMngDAO.updateOffeduFileNull(vEEduAplctVO);
//파일 삭제처리
FileVO returnFileVO = new FileVO();
returnFileVO = fileMngDAO.selectFileInf(fileVO);
if(returnFileVO !=null) {
File delFile = new File(returnFileVO.getFileStreCours()+returnFileVO.getStreFileNm());
delFile.delete();
}
fileMngDAO.deleteFileInf(fileVO); //DB삭제
}
} }

View File

@ -6,6 +6,7 @@ import java.util.List;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import kcc.com.cmm.service.FileVO; import kcc.com.cmm.service.FileVO;
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctVO;
/** /**
* @Class Name : EgovFileMngDAO.java * @Class Name : EgovFileMngDAO.java
@ -198,4 +199,8 @@ public class FileManageDAO extends EgovComAbstractDAO {
public void updateFileName(FileVO vo) throws Exception { public void updateFileName(FileVO vo) throws Exception {
insert("FileManageDAO.updateFileName", vo); insert("FileManageDAO.updateFileName", vo);
} }
public int updateOffeduFileNull(VEEduAplctVO vEEduAplctVO) throws Exception {
return update("FileManageDAO.updateOffeduFileNull", vEEduAplctVO);
}
} }

View File

@ -12,10 +12,15 @@ import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper; import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import kcc.com.cmm.LoginVO;
import kcc.com.cmm.service.EgovFileMngService; import kcc.com.cmm.service.EgovFileMngService;
import kcc.com.cmm.service.FileVO; import kcc.com.cmm.service.FileVO;
import kcc.com.uss.ion.fms.service.FmsFileVO;
import kcc.com.utl.user.service.CheckLoginUtil;
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctVO;
/** /**
* 파일 조회, 삭제, 다운로드 처리를 위한 컨트롤러 클래스 * 파일 조회, 삭제, 다운로드 처리를 위한 컨트롤러 클래스
@ -40,6 +45,9 @@ public class EgovFileMngController {
@Resource(name = "EgovFileMngService") @Resource(name = "EgovFileMngService")
private EgovFileMngService fileService; private EgovFileMngService fileService;
//로그인 체크 util
@Resource(name = "checkLoginUtil")
private CheckLoginUtil checkLoginUtil;
/** /**
* 첨부파일에 대한 목록을 조회한다. * 첨부파일에 대한 목록을 조회한다.
* *
@ -410,4 +418,61 @@ public class EgovFileMngController {
return "cmm/fms/selectForNmChgFile"; return "cmm/fms/selectForNmChgFile";
} }
/**
* ve_edu_aplct 첨부파일 목록 - 타입별로 첨부파일 삭제 데이터 null 처리를 위한
*
* @param fileVO
* @param commandMap
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/cmm/fms/selectOffeduFile.do")
public String selectEduAplctFile(@ModelAttribute("searchVO") FileVO fileVO, @RequestParam Map<String, Object> commandMap, ModelMap model) throws Exception {
String atchFileId = (String) commandMap.get("param_atchFileId");
String type = (String) commandMap.get("type");
String deleteFlag = (String) commandMap.get("deleteFlag");
String dateFlag = (String) commandMap.get("dateFlag");
String table = (String) commandMap.get("table");
String eduAplctOrd = (String) commandMap.get("eduAplctOrd");
fileVO.setAtchFileId(atchFileId);
List<FileVO> result = fileService.selectFileInfs(fileVO);
model.addAttribute("fileList", result);
model.addAttribute("fileListCnt", result.size());
model.addAttribute("atchFileId", atchFileId);
model.addAttribute("type", type);
model.addAttribute("deleteFlag", deleteFlag);
model.addAttribute("dateFlag", dateFlag);
model.addAttribute("table", table);
model.addAttribute("eduAplctOrd", eduAplctOrd);
return "cmm/fms/selectEduAplctFile";
}
/* 교육신청관리 첨부파일 삭제 */
@RequestMapping(value = "/cmm/fms/offedufileDeleteAjax.do")
public ModelAndView fmsfileDeleteAjax(
FmsFileVO fmsFileVO,
@ModelAttribute("fileVO") FileVO fileVO,
VEEduAplctVO vEEduAplctVO
) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); //권한에 따른 로그인 정보 가져오기
vEEduAplctVO.setLastUpdusrId(loginVO.getUniqId());
try {
fileService.deleteOffeduFile(fileVO, vEEduAplctVO);
modelAndView.addObject("result", "success");
}catch (Exception e) {
modelAndView.addObject("result", "fail");
System.out.println("Exception Occured!!!");
return modelAndView;
}
return modelAndView;
}
} }

View File

@ -223,6 +223,8 @@ public class InnorixFileServiceImpl extends EgovAbstractServiceImpl implements I
vEEduAplctVO.setAttendAtchFileId(atchFileId); //강사 참석 확인서 첨부파일 vEEduAplctVO.setAttendAtchFileId(atchFileId); //강사 참석 확인서 첨부파일
} else if("PHT".equals(fileType)) { } else if("PHT".equals(fileType)) {
vEEduAplctVO.setPhtAtchFileId(atchFileId); //교육사진 첨부파일 vEEduAplctVO.setPhtAtchFileId(atchFileId); //교육사진 첨부파일
} else if("RSLT".equals(fileType)) {
vEEduAplctVO.setRsltAtchFileId(atchFileId); //결과보고 첨부파일
} }

View File

@ -200,6 +200,8 @@ public class CommonWebController {
fileVO.setAtchFileId(vEEduAplctVO.getAttendAtchFileId()); fileVO.setAtchFileId(vEEduAplctVO.getAttendAtchFileId());
} else if("PHT".equals(fileType)) { } else if("PHT".equals(fileType)) {
fileVO.setAtchFileId(vEEduAplctVO.getPhtAtchFileId()); fileVO.setAtchFileId(vEEduAplctVO.getPhtAtchFileId());
} else if("RSLT".equals(fileType)) {
fileVO.setAtchFileId(vEEduAplctVO.getRsltAtchFileId());
} }
List<FileVO> result = fileService.selectFileInfs(fileVO); List<FileVO> result = fileService.selectFileInfs(fileVO);

View File

@ -99,6 +99,7 @@ public class VEEduAplctVO extends ComDefaultVO implements Serializable {
private String broadroomEdu; //방송실교육 여부 private String broadroomEdu; //방송실교육 여부
private String rndsOrd; //회차순번(해당 신청이 속하는 회차 고유 순번) private String rndsOrd; //회차순번(해당 신청이 속하는 회차 고유 순번)
private String rsltAtchFileId; //결과보고첨부파일아이디
@ -324,6 +325,9 @@ public class VEEduAplctVO extends ComDefaultVO implements Serializable {
private String lastYear; //불성실여부 작년 private String lastYear; //불성실여부 작년
private String type; //첨부파일 삭제 종류
private String table; //첨부파일 삭제 테이블
public String getPrcsAplctPrdOrd() { public String getPrcsAplctPrdOrd() {
return prcsAplctPrdOrd; return prcsAplctPrdOrd;
@ -1708,6 +1712,25 @@ public class VEEduAplctVO extends ComDefaultVO implements Serializable {
public void setTrgtId(String trgtId) { public void setTrgtId(String trgtId) {
this.trgtId = trgtId; this.trgtId = trgtId;
} }
public String getRsltAtchFileId() {
return rsltAtchFileId;
}
public void setRsltAtchFileId(String rsltAtchFileId) {
this.rsltAtchFileId = rsltAtchFileId;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getTable() {
return table;
}
public void setTable(String table) {
this.table = table;
}
} }

View File

@ -105,6 +105,9 @@ public class VEEduChasiVO extends ComDefaultVO implements Serializable {
private String onewayDstnc; private String onewayDstnc;
private String acmdtAprvlCd; private String acmdtAprvlCd;
private String rsltAtchFileId; //ve_edu_aplct 결과보고 첨부파일아이디
public String getQustnrRespondId() { public String getQustnrRespondId() {
return qustnrRespondId; return qustnrRespondId;
} }
@ -569,4 +572,11 @@ public class VEEduChasiVO extends ComDefaultVO implements Serializable {
public void setMemoCn(String memoCn) { public void setMemoCn(String memoCn) {
this.memoCn = memoCn; this.memoCn = memoCn;
} }
public String getRsltAtchFileId() {
return rsltAtchFileId;
}
public void setRsltAtchFileId(String rsltAtchFileId) {
this.rsltAtchFileId = rsltAtchFileId;
}
} }

View File

@ -5,6 +5,7 @@
<typeAlias alias="egovMap" type="egovframework.rte.psl.dataaccess.util.EgovMap"/> <typeAlias alias="egovMap" type="egovframework.rte.psl.dataaccess.util.EgovMap"/>
<typeAlias alias="FileVO" type="kcc.com.cmm.service.FileVO"/> <typeAlias alias="FileVO" type="kcc.com.cmm.service.FileVO"/>
<typeAlias alias="vEEduAplctVO" type="kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctVO"/>
<resultMap id="fileList" class="kcc.com.cmm.service.FileVO"> <resultMap id="fileList" class="kcc.com.cmm.service.FileVO">
<result property="atchFileId" column="ATCH_FILE_ID" columnIndex="1"/> <result property="atchFileId" column="ATCH_FILE_ID" columnIndex="1"/>
@ -243,4 +244,13 @@
AND ATCH_FILE_ID = #atchFileId# AND ATCH_FILE_ID = #atchFileId#
AND FILE_SN = #fileSn# AND FILE_SN = #fileSn#
</update> </update>
<update id="FileManageDAO.updateOffeduFileNull" parameterClass="VEEduAplctVO" >
UPDATE
$table$
SET
$type$ = null
WHERE 1=1
AND edu_aplct_ord = #eduAplctOrd#
</update>
</sqlMap> </sqlMap>

View File

@ -160,6 +160,7 @@
A.BROADROOM_EDU AS broadroomEdu A.BROADROOM_EDU AS broadroomEdu
, A.RNDS_ORD AS rndsOrd , A.RNDS_ORD AS rndsOrd
, A.APLCT_CN AS aplctCn , A.APLCT_CN AS aplctCn
, A.RSLT_ATCH_FILE_ID AS rsltAtchFileId
</sql> </sql>
<!-- 강사 등록 C --> <!-- 강사 등록 C -->
@ -856,6 +857,9 @@
<isNotEmpty property="phtAtchFileId"> <isNotEmpty property="phtAtchFileId">
, PHT_ATCH_FILE_ID = #phtAtchFileId# , PHT_ATCH_FILE_ID = #phtAtchFileId#
</isNotEmpty> </isNotEmpty>
<isNotEmpty property="rsltAtchFileId">
, RSLT_ATCH_FILE_ID = #rsltAtchFileId#
</isNotEmpty>
<isNotEmpty property="isWait"> <isNotEmpty property="isWait">
, IS_WAIT = #isWait# , IS_WAIT = #isWait#
</isNotEmpty> </isNotEmpty>

View File

@ -3637,6 +3637,7 @@
, G.sbmt_yn AS acmdtSbmtYn , G.sbmt_yn AS acmdtSbmtYn
, G.aprvl_cd AS acmdtAprvlCd , G.aprvl_cd AS acmdtAprvlCd
, H.oneway_dstnc AS onewayDstnc , H.oneway_dstnc AS onewayDstnc
, A.rslt_atch_file_id AS rsltAtchFileId
FROM FROM
VE_EDU_APLCT A VE_EDU_APLCT A
, VE_EDU_CHASI B , VE_EDU_CHASI B

View File

@ -0,0 +1,104 @@
<%@ 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 delEduAplctFile(itemId , fileSn){
if(!confirm("삭제하시겠습니까?")){
return false;
}
$.ajax({
type: "POST",
url: "<c:url value='/cmm/fms/offedufileDeleteAjax.do' />",
data:{ "atchFileId" : itemId , "fileSn" : fileSn, "eduAplctOrd" : "${eduAplctOrd}", "type" : '${type}', "table" : '${table}'},
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}">
<input type="hidden" name="chgNm" id="chgNm" value="${chgNm}">
<input type="hidden" name="type" id="type" value="${type}">
<input type="hidden" name="table" id="table" value="${table}">
<input type="hidden" name="eduAplctOrd" id="eduAplctOrd" value="${eduAplctOrd}">
<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}"/>
<c:if test="${dateFlag eq 'Y' }">
<fmt:parseDate value="${fileVO.creatDt}" var="creatDt" pattern="yyyy-MM-dd HH:mm:ss"/>
(<fmt:formatDate value="${creatDt}" pattern="yyyy년MM월dd일"/>)
</c:if>
</a>
<c:if test="${deleteFlag eq 'Y' }">
<img src="<c:url value='/images/egovframework/com/cmm/btn/btn_del.png' />" class="cursor" onClick="delEduAplctFile('<c:out value="${fileVO.atchFileId}"/>','<c:out value="${fileVO.fileSn}" />'); return false;" alt="첨부파일">
</c:if>
<br/>
</c:forEach>
<c:if test="${fn:length(fileList) == 0}">
</c:if>

View File

@ -314,11 +314,14 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><p>교육사진파일</p></th> <th scope="row"><p>결과보고</p></th>
<td> <td>
<c:import url="/cmm/fms/selectBBSFileInfs.do" charEncoding="utf-8"> <c:import url="/cmm/fms/selectOffeduFile.do" charEncoding="utf-8">
<c:param name="param_atchFileId" value="${info.phtAtchFileId}" /> <c:param name="param_atchFileId" value="${info.rsltAtchFileId}" />
<c:param name="pdf_view" value="Y" /> <c:param name="type" value="rslt_atch_file_id" />
<c:param name="table" value="ve_edu_aplct" />
<c:param name="deleteFlag" value="Y" />
<c:param name="eduAplctOrd" value="${vEEduAplctVO.eduAplctOrd}" />
</c:import> </c:import>
</td> </td>
</tr> </tr>

View File

@ -1031,18 +1031,18 @@
</tr> </tr>
<tr> <tr>
<th scope="row"><p>교육 사진</p></th> <th scope="row"><p>결과보고</p></th>
<td colspan="3"> <td colspan="3">
<c:choose> <c:choose>
<c:when test="${info.phtAtchFileId ne null}"> <c:when test="${info.rsltAtchFileId ne null}">
<c:import url="/cmm/fms/selectSimpleDownInfs.do" charEncoding="utf-8"> <c:import url="/cmm/fms/selectSimpleDownInfs.do" charEncoding="utf-8">
<c:param name="param_atchFileId" value="${info.phtAtchFileId}" /> <c:param name="param_atchFileId" value="${info.rsltAtchFileId}" />
</c:import> </c:import>
<button type="button" class="btnType01 updownRoad" data-tooltip="sub35_pop01" id="PHT" onclick="filePopupLayer('PHT')" title="팝업 열림">교육 사진 변경</button> <!-- <button type="button" class="btnType01 updownRoad" data-tooltip="sub35_pop01" id="PHT" onclick="filePopupLayer('PHT')" title="팝업 열림">결과보고 변경</button> -->
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<button type="button" class="btnType01 updownRoad" data-tooltip="sub35_pop01" id="PHT" onclick="filePopupLayer('PHT')" title="팝업 열림">교육 사진 업로드</button> <button type="button" class="btnType01 updownRoad" data-tooltip="sub35_pop01" id="PHT" onclick="filePopupLayer('RSLT')" title="팝업 열림">결과보고 업로드</button>
</c:otherwise> </c:otherwise>
</c:choose> </c:choose>
</td> </td>

View File

@ -165,7 +165,7 @@
<td> <td>
<a href="javascript:goDetail('<c:out value="${list.eduAplctOrd}"/>', '<c:out value="${list.eduChasiOrd}"/>');"> <a href="javascript:goDetail('<c:out value="${list.eduAplctOrd}"/>', '<c:out value="${list.eduChasiOrd}"/>');">
<c:choose> <c:choose>
<c:when test="${not empty list.qustnrRespondId}"> <c:when test="${not empty list.rsltAtchFileId}">
제출 제출
</c:when> </c:when>
<c:otherwise> <c:otherwise>

View File

@ -233,6 +233,8 @@
setMsg = "강사 참석 확인서"; setMsg = "강사 참석 확인서";
} else if (type == 'PHT') { } else if (type == 'PHT') {
setMsg = "교육사진"; setMsg = "교육사진";
} else if (type == 'RSLT') {
setMsg = "결과보고";
} }
var url = "<c:url value='/web/common/insertInnorixFileAjax.do' />"; var url = "<c:url value='/web/common/insertInnorixFileAjax.do' />";
@ -278,6 +280,7 @@
<c:if test="${fileType eq 'PLAN'}">계획서</c:if> <c:if test="${fileType eq 'PLAN'}">계획서</c:if>
<c:if test="${fileType eq 'ATTEND'}">강사 참석 확인서</c:if> <c:if test="${fileType eq 'ATTEND'}">강사 참석 확인서</c:if>
<c:if test="${fileType eq 'PHT'}">교육 사진</c:if> <c:if test="${fileType eq 'PHT'}">교육 사진</c:if>
<c:if test="${fileType eq 'RSLT'}">결과보고</c:if>
업로드 업로드
</p> </p>
<button class="btn_popup_close tooltip-close" data-focus="list_popup_close" title="팝업 닫기"><i></i></button> <button class="btn_popup_close tooltip-close" data-focus="list_popup_close" title="팝업 닫기"><i></i></button>

View File

@ -305,13 +305,6 @@ $( document ).ready(function() {
</c:import> </c:import>
</td> </td>
</tr> </tr>
<tr>
<th scope="row">
<p>교육 사진</p>
</th>
<td colspan="3"><c:out value="${cryptoUtil.decrypt(info.chrgNm)}"/></td>
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>