2024-02-01 12:50 청소년 결과보고 관리자 삭제 기능 추가
This commit is contained in:
parent
6ec29acb9e
commit
fc2ecd84e0
@ -405,7 +405,7 @@ public class EgovFileMngController {
|
||||
/**
|
||||
* 저작권 체험교실 결과보고 파일 조회
|
||||
*
|
||||
* FILE 삭제에 대한 정리#3
|
||||
* FILE 삭제에 대한 정리#4
|
||||
*
|
||||
* 0.삭제를 위한 페이지를 호출한다.
|
||||
*
|
||||
|
||||
@ -3,7 +3,6 @@ package kcc.ve.instr.tngrVisitEdu.rprtInfo.service;
|
||||
import java.util.List;
|
||||
|
||||
import kcc.com.cmm.service.FileVO;
|
||||
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduOprtnVO;
|
||||
|
||||
public interface VEEduRsltRprtService {
|
||||
|
||||
@ -28,4 +27,7 @@ public interface VEEduRsltRprtService {
|
||||
//결과보고 첨부파일 삭제 처리
|
||||
public void deleteRsltRprtFileInf(FileVO fileVO, VEEduRprtVO vEEduRprtVO) throws Exception;
|
||||
|
||||
//결과보고 첨부파일 삭제 처리 - 2024-02-01 제작
|
||||
public void deleteNewRsltRprtFileInf(FileVO fileVO, VEEduRprtVO vEEduRprtVO) throws Exception;
|
||||
|
||||
}
|
||||
|
||||
@ -10,7 +10,6 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import kcc.com.cmm.service.FileVO;
|
||||
import kcc.com.cmm.service.impl.FileManageDAO;
|
||||
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduOprtnVO;
|
||||
import kcc.ve.instr.tngrVisitEdu.rprtInfo.service.VEEduRprtVO;
|
||||
import kcc.ve.instr.tngrVisitEdu.rprtInfo.service.VEEduRsltRprtService;
|
||||
|
||||
@ -69,4 +68,31 @@ public class VEEduRsltRprtServiceImpl implements VEEduRsltRprtService {
|
||||
}
|
||||
fileMngDAO.deleteFileInf(fileVO); //DB삭제
|
||||
}
|
||||
|
||||
//결과보고 컬럼 삭제 하고 파일도 삭제 처리함
|
||||
public void deleteNewRsltRprtFileInf(FileVO fileVO, VEEduRprtVO vEEduRprtVO) throws Exception {
|
||||
//결과 보고 첨부파일 ID 삭제 처리
|
||||
//vEEduRsltRprtDAO.updateNullFile(vEEduRprtVO);
|
||||
vEEduRsltRprtDAO.delete(vEEduRprtVO);
|
||||
/*
|
||||
* "atchFileId" : p_atchFileId
|
||||
, "eduAplctOrd" : p_eduAplctOrd
|
||||
, "eduChasiOrd" : p_eduChasiOrd
|
||||
, "rprtFileType" : "rprt"/
|
||||
*/
|
||||
//파일 삭제처리
|
||||
List<FileVO> returnFileVO = null;
|
||||
returnFileVO = fileMngDAO.selectFileInfs(fileVO);
|
||||
if(returnFileVO !=null) {
|
||||
for(int i=0;i<returnFileVO.size();i++) {
|
||||
File delFile = new File(returnFileVO.get(i).getFileStreCours()+returnFileVO.get(i).getStreFileNm());
|
||||
delFile.delete();
|
||||
}
|
||||
|
||||
fileMngDAO.deleteFileInfs(returnFileVO); //DB삭제
|
||||
}
|
||||
|
||||
//fileMngDAO.deleteFileInfs(fileVO); //DB삭제
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -516,7 +516,13 @@ public class OprtnStateMngController {
|
||||
|
||||
}
|
||||
|
||||
/* 관리자 결과보고 첨부파일 삭제 */
|
||||
/* 관리자 결과보고 첨부파일 삭제
|
||||
*
|
||||
* FILE 삭제에 대한 정리#5
|
||||
* 1.DB
|
||||
* 2.물리파일
|
||||
*
|
||||
* */
|
||||
@RequestMapping(value = "rsltRprtfileDeleteAjax.do")
|
||||
public ModelAndView fmsfileDeleteAjax(
|
||||
FmsFileVO fmsFileVO,
|
||||
@ -531,7 +537,38 @@ public class OprtnStateMngController {
|
||||
|
||||
vEEduRprtVO.setLastUpdusrId(loginVO.getUniqId());
|
||||
try {
|
||||
vEEduRsltRprtService.deleteRsltRprtFileInf(fileVO, vEEduRprtVO);
|
||||
vEEduRsltRprtService.deleteRsltRprtFileInf(fileVO, vEEduRprtVO); /* DB & 물리파일 삭제 */
|
||||
modelAndView.addObject("result", "success");
|
||||
}catch (Exception e) {
|
||||
modelAndView.addObject("result", "fail");
|
||||
System.out.println("Exception Occured!!!");
|
||||
return modelAndView;
|
||||
}
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
/* 관리자 결과보고 첨부파일 삭제
|
||||
*
|
||||
* FILE 삭제에 대한 정리#6
|
||||
* 1.DB
|
||||
* 2.물리파일
|
||||
*
|
||||
* */
|
||||
@RequestMapping(value = "rsltRprtfileDeleteNewAjax.do")
|
||||
public ModelAndView rsltRprtfileDeleteNewAjax(
|
||||
FmsFileVO fmsFileVO,
|
||||
@ModelAttribute("fileVO") FileVO fileVO,
|
||||
VEEduRprtVO vEEduRprtVO
|
||||
) throws Exception {
|
||||
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.setViewName("jsonView");
|
||||
|
||||
LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); //권한에 따른 로그인 정보 가져오기
|
||||
|
||||
vEEduRprtVO.setLastUpdusrId(loginVO.getUniqId());
|
||||
try {
|
||||
vEEduRsltRprtService.deleteNewRsltRprtFileInf(fileVO, vEEduRprtVO); /* DB & 물리파일 삭제 */
|
||||
modelAndView.addObject("result", "success");
|
||||
}catch (Exception e) {
|
||||
modelAndView.addObject("result", "fail");
|
||||
|
||||
@ -108,6 +108,7 @@
|
||||
</insert>
|
||||
|
||||
<delete id="FileManageDAO.deleteFileDetail" parameterClass="FileVO" >
|
||||
/* FileManageDAO.deleteFileDetail */
|
||||
<![CDATA[
|
||||
DELETE FROM LETTNFILEDETAIL
|
||||
WHERE
|
||||
@ -117,6 +118,15 @@
|
||||
]]>
|
||||
</delete>
|
||||
|
||||
<delete id="FileManageDAO.deleteFileDetails" parameterClass="FileVO" >
|
||||
/* FileManageDAO.deleteFileDetails */
|
||||
<![CDATA[
|
||||
DELETE FROM LETTNFILEDETAIL
|
||||
WHERE
|
||||
ATCH_FILE_ID = #atchFileId#
|
||||
]]>
|
||||
</delete>
|
||||
|
||||
<select id="FileManageDAO.getMaxFileSN" parameterClass="FileVO" resultClass="java.lang.Integer">
|
||||
/* FileManageDAO.getMaxFileSN */
|
||||
<![CDATA[
|
||||
@ -141,6 +151,19 @@
|
||||
]]>
|
||||
</select>
|
||||
|
||||
<select id="FileManageDAO.selectFileInfs" parameterClass="FileVO" resultMap="fileDetail" >
|
||||
/* FileManageDAO.selectFileInfs */
|
||||
<![CDATA[
|
||||
SELECT
|
||||
ATCH_FILE_ID, FILE_CN, FILE_SN, FILE_STRE_COURS, STRE_FILE_NM,
|
||||
FILE_EXTSN, ORIGNL_FILE_NM, FILE_SIZE, THUMB_FILE_NM
|
||||
FROM
|
||||
LETTNFILEDETAIL
|
||||
WHERE
|
||||
ATCH_FILE_ID = #atchFileId#
|
||||
]]>
|
||||
</select>
|
||||
|
||||
<update id="FileManageDAO.deleteCOMTNFILE" parameterClass="FileVO" >
|
||||
<![CDATA[
|
||||
UPDATE LETTNFILE
|
||||
|
||||
@ -192,7 +192,7 @@
|
||||
DELETE FROM
|
||||
<include refid="VEEduRsltRprtDAO.table_name"/>
|
||||
WHERE
|
||||
a.edu_aplct_ord = #eduAplctOrd#
|
||||
edu_aplct_ord = #eduAplctOrd#
|
||||
AND edu_chasi_ord = #eduChasiOrd#
|
||||
|
||||
</delete>
|
||||
|
||||
@ -146,6 +146,55 @@ function replyCalculation(){
|
||||
document.filePopForm.submit();
|
||||
}
|
||||
|
||||
function fncAttachFileCreate(){
|
||||
|
||||
alert("구현해야 합니다.");
|
||||
}
|
||||
|
||||
// 결과보고서 삭제
|
||||
function fncAttachFileDelete(
|
||||
p_atchFileId
|
||||
, p_eduAplctOrd
|
||||
, p_eduChasiOrd
|
||||
//, p_rprtFileType
|
||||
) { //메뉴생성 화면 호출
|
||||
|
||||
if (!confirm("삭제 하시겠습니까?\n(삭제 후 복구가 불가능합니다.)")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "${pageContext.request.contextPath}/kccadr/oprtn/cpyrgExprnClsrm/rsltRprtfileDeleteNewAjax.do",
|
||||
|
||||
//data:{ "atchFileId" : itemId , "fileSn" : fileSn, "eduAplctOrd" : "${eduAplctOrd}", "rprtFileType" : rprtFileType},
|
||||
|
||||
data: {
|
||||
"atchFileId" : p_atchFileId
|
||||
, "eduAplctOrd" : p_eduAplctOrd
|
||||
, "eduChasiOrd" : p_eduChasiOrd
|
||||
, "rprtFileType" : "rprt"
|
||||
|
||||
},
|
||||
dataType:'json',
|
||||
async: true, // 동기
|
||||
success: function (data, status) {
|
||||
if (data.result == "success") {
|
||||
//alert(JSON.stringify(data.fileList));
|
||||
//setJsonListShow(data.fileList);
|
||||
alert("삭제성공");
|
||||
location.reload();
|
||||
} else {
|
||||
alert("Msg : " + data.msg);
|
||||
}
|
||||
},
|
||||
error : function(xhr, status, error) {
|
||||
alert("Err : " + JSON.stringify(status));
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//특이사항
|
||||
/*
|
||||
function fncUnqIsuesInfo() { //메뉴생성 화면 호출
|
||||
@ -669,7 +718,17 @@ function replyCalculation(){
|
||||
|
||||
<!-- list_상세 -->
|
||||
<div class="tb_tit01">
|
||||
<p>결과보고</p>
|
||||
<p>결과보고
|
||||
<!-- 결과보고서 삭제 -->
|
||||
<c:if test="${!empty resultInfo}">
|
||||
<button type="button" class="btn_type06" onclick="fncAttachFileDelete('${resultInfo.atchFileId}', '${resultInfo.eduAplctOrd}', '${resultInfo.eduChasiOrd}')">결과보고서 삭제</button>
|
||||
</c:if>
|
||||
|
||||
<!-- 결과보고서 등록 -->
|
||||
<c:if test="${empty resultInfo}">
|
||||
<button type="button" class="btn_type06" onclick="fncAttachFileCreate('${resultInfo.atchFileId}', '${resultInfo.eduAplctOrd}', '${resultInfo.eduChasiOrd}')">결과보고서 등록</button>
|
||||
</c:if>
|
||||
</p>
|
||||
</div>
|
||||
<div class="tb_type02">
|
||||
<table>
|
||||
|
||||
@ -145,6 +145,28 @@
|
||||
frm.submit();
|
||||
|
||||
}
|
||||
|
||||
// 첨부파일 목록
|
||||
function deleteAttachFileList() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "${pageContext.request.contextPath}/kccadr/oprtn/adultVisitEdu/popup/fileListAjax.do",
|
||||
data: {"atchFileId" : "${scholSealAtchFileId}"},
|
||||
dataType:'json',
|
||||
async: true, // 동기
|
||||
success: function (data, status) {
|
||||
if (data.isSuccess == true) {
|
||||
//alert(JSON.stringify(data.fileList));
|
||||
setJsonListShow(data.fileList);
|
||||
} else {
|
||||
alert("Msg : " + data.msg);
|
||||
}
|
||||
},
|
||||
error : function(xhr, status, error) {
|
||||
alert("Err : " + JSON.stringify(status));
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@ -137,7 +137,7 @@
|
||||
<th scope="col">시간</th>
|
||||
<th scope="col">지역</th>
|
||||
<th scope="col">기관(단체)명</th>
|
||||
<th scope="col">총 금액</th>
|
||||
<th scope="col">강사료</th>
|
||||
<th scope="col">신청상태</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -174,19 +174,22 @@
|
||||
|
||||
<td><p>
|
||||
|
||||
<c:set var = "fee" value="" />
|
||||
<c:choose>
|
||||
<c:when test="${list.instrFeeSbmtYn ne 'Y'}">
|
||||
정산중
|
||||
</c:when>
|
||||
<c:when test="${list.acmdtSbmtYn eq 'Y' and empty list.acmdtAprvlCd}">
|
||||
정산중
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<%-- <c:set var = "fee" value="" /> --%>
|
||||
<%-- <c:choose> --%>
|
||||
<%-- <c:when test="${list.instrFeeSbmtYn ne 'Y'}"> --%>
|
||||
<!-- 정산중 -->
|
||||
<%-- </c:when> --%>
|
||||
<%-- <c:when test="${list.acmdtSbmtYn eq 'Y' and empty list.acmdtAprvlCd}"> --%>
|
||||
<!-- 정산중 -->
|
||||
<%-- </c:when> --%>
|
||||
<%-- <c:otherwise> --%>
|
||||
<%-- <c:set var = "fee" value="${list.feeSum4Dp}" /> --%>
|
||||
<%-- <fmt:formatNumber value="${fee}" pattern="#,###"/> --%>
|
||||
<%-- </c:otherwise> --%>
|
||||
<%-- </c:choose> --%>
|
||||
|
||||
<c:set var = "fee" value="${list.feeSum4Dp}" />
|
||||
<fmt:formatNumber value="${fee}" pattern="#,###"/>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
</p></td>
|
||||
<c:set var="statCd" value="" />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user