이지우 - 관리자 청소년/성인 결과보고 등록 기능 추가

This commit is contained in:
jiwoo 2024-02-01 18:03:25 +09:00
parent 24334b9565
commit 0927ea4737
7 changed files with 570 additions and 9 deletions

View File

@ -576,9 +576,11 @@ public class VEEduEndController {
// 강사 상세정보
VEInstrDetailVO vEInstrDetailVOInfo = new VEInstrDetailVO();
vEInstrDetailVOInfo.setInstrDiv("10");
//영상 촬영을 위하여 임시로 로그인 ID 사용
/*vEInstrDetailVOInfo.setUserId(vEEduRprtVO.getUserId());*/
vEInstrDetailVOInfo.setUserId(loginVO.getUniqId());
/*vEInstrDetailVOInfo.setUserId(loginVO.getUniqId());*/
vEInstrDetailVOInfo.setUserId(vEEduRprtVO.getUserId());
vEInstrDetailVOInfo.setUseYn("Y");
vEInstrDetailVOInfo = vEInstrDetailService.selectDetail(vEInstrDetailVOInfo);
if (vEInstrDetailVOInfo != null) {

View File

@ -584,6 +584,57 @@ public class OprtnStateMngController {
return modelAndView;
}
/* 관리자 결과보고 등록 팝업(청소년)
*
*
* */
@RequestMapping(value = "popup/rsltRprtfileInsertNewPopup.do")
public String rsltRprtfileInsertNewPopup(
@ModelAttribute("vEEduRprtVO") VEEduRprtVO vEEduRprtVO
) throws Exception {
return "oprtn/cpyrgExprnClsrm/popup/rsltRprtfileInsertNewPopup";
}
/* 관리자 결과보고 등록 팝업(성인)
*
*
* */
@RequestMapping(value = "popup/auldtRsltRprtfileInsertPopup.do")
public String auldtRsltRprtfileInsertPopup(
@ModelAttribute("vEEduRprtVO") VEEduRprtVO vEEduRprtVO, ModelMap model
) throws Exception {
VEEduAplctVO vEEduAplctVO = new VEEduAplctVO();
vEEduAplctVO.setEduAplctOrd(vEEduRprtVO.getEduAplctOrd());
//기본데이터 불러오기
vEEduAplctVO = vEEduAplctService.selectDetail(vEEduAplctVO);
//데이터 복호화 - VO 단위로 만들어서 사용
vEEduAplctVO = egovCryptoUtil.decryptVEEduAplctVOInfo(vEEduAplctVO);
model.addAttribute("info", vEEduAplctVO);
//사용자 교육신청 차시 리스트
VEEduChasiVO vEEduChasiVO = new VEEduChasiVO();
vEEduChasiVO.setEduAplctOrd(vEEduAplctVO.getEduAplctOrd());
vEEduChasiVO.setInstrDiv(VeConstants.LCTR_DIV_CD_20);
vEEduChasiVO.setPageIndex(0);
vEEduChasiVO.setSiteId("20"); //설문정보를 위해서 설문지의 대상값을 넣는다. VE0011 10-청소년, 20-성인,30-체험, 40-외부, 50-기반, 60-기소
//List<VEEduChasiVO> vEEduChasiVOList = vEEduMIXService.selectChasiList(vEEduChasiVO);
List<VEEduChasiVO> vEEduChasiVOList = vEEduMIXService.selectChasiList202312(vEEduChasiVO);
//복호화
vEEduChasiVOList = egovCryptoUtil.decryptVEEduChasiVOList(vEEduChasiVOList);
model.addAttribute("chasiList", vEEduChasiVOList);
return "oprtn/cpyrgExprnClsrm/popup/auldtRsltRprtfileInsertPopup";
}
/**
* 교육실적통계 화면
*/

View File

@ -51,6 +51,8 @@
<pattern>*/ve/oprtn/instr/adultVisitEdu/instrInfo/instrMdfyRqstPopup.do</pattern> <!-- 성인강사변경승인팝업 -->
<pattern>*/kccadr/oprtn/cpyrgExprnClsrm/popup/slctnTeacherPopup.do</pattern> <!-- 관리자 저작권체험교실 교육과정안내 미리보기 팝업 -->
<pattern>*/kccadr/oprtn/cpyrgExprnClsrm/popup/slctnTeacherChkPopup.do</pattern> <!-- 관리자 저작권체험교실 선정교사 일괄 처리 팝업 -->
<pattern>*/kccadr/oprtn/cpyrgExprnClsrm/popup/rsltRprtfileInsertNewPopup.do</pattern> <!-- 관리자 결과보고 등록 팝업 -->
<pattern>*/kccadr/oprtn/cpyrgExprnClsrm/popup/auldtRsltRprtfileInsertPopup.do</pattern> <!-- 관리자 결과보고 등록 팝업 -->
</decorator>
<!-- 찾교 추가 관리자 -->

View File

@ -190,7 +190,11 @@
function fncAttachFileCreate(){
alert("구현해야 합니다.");
document.chasiStatusPopForm.action = "<c:url value='/kccadr/oprtn/cpyrgExprnClsrm/popup/auldtRsltRprtfileInsertPopup.do'/>";
window.open("#", "_attachFileCreatePop", "scrollbars = no, top=100px, left=100px, height=900px, width=950px");
document.chasiStatusPopForm.target = "_attachFileCreatePop";
document.chasiStatusPopForm.submit();
}
// 결과보고서 삭제
@ -509,7 +513,7 @@ function fncAttachFileDelete(
<!-- 결과보고서 등록 -->
<c:if test="${empty info.veaRsltRprtOrd}">
<button type="button" class="btn_type06" onclick="fncAttachFileCreate('${info.atchFileId}', '${info.eduAplctOrd}', '${info.eduChasiOrd}')">결과보고서 등록</button>
<button type="button" class="btn_type06" onclick="fncAttachFileCreate()">결과보고서 등록</button>
</c:if>
</td>

View File

@ -0,0 +1,278 @@
<%@ 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="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<%@ taglib prefix="kc" uri="/WEB-INF/tlds/kcc_tld.tld"%>
<%
/**
* @Class Name : filePopup.jsp
* @Description : 교육확정안 등록 팝업
* @Modification Information
* @
* @ 수정일 수정자 수정내용
* @ ------- -------- ---------------------------
* @ 2021.08.09 김봉호 최초 생성
* @author 김봉호
* @since 2021.08.21
* @version 1.0
* @see
*
*/
%>
<spring:eval expression="@property['Globals.Innorix.License']" var="license"/>
<script src="<c:url value='/innorix/innorix_${license}.js' />"></script>
<script src="<c:url value='/js/kccadr/innorixCommon.js' />"></script>
<link rel="stylesheet" href="<c:url value='/innorix/innorix.css'/>" type="text/css">
<style>
#fileControl{margin: 8px 0 0 0; border: 1px solid #d5d5d5; border-radius: 5px; height: 150px !important; background-color: #fafafa;}
.innorix_basic div.irx_filetree.empty-uploader{background: url(/offedu/visitEdu/usr/publish/images/content/dropzone_file_before_only_img.png) no-repeat center; height: 150px !important;}
.irx_filetree,.innorix_basic div.irx_infoBox{height: 150px !important;
}
</style>
<script type="text/javaScript" language="javascript">
$(document).ready(function(){
//파일첨부관련 설정들===============================================
$(".btn_add_file").on('click', function(){
$("#file_temp").click();
});
//파일첨부관련 설정들===============================================
$('#file_temp').change(function(e){
var objUpload = $(".upload_area");
var files = $('#file_temp')[0].files;
handleFileUpload(files,objUpload); //파일업로드
if($("#file_temp").length > 0){
$("#file_temp").val(""); //파일지우기
}
});
/*
* ==================================================================
* INNORIX
* 파일전송 컨트롤 생성
* ==================================================================
*/
control = innorix.create({
el: '#fileControl' // 컨트롤 출력 HTML 객체 ID
, transferMode: 'both' // 업로드, 다운로드 혼합사용
, installUrl: '<c:url value="/innorix/install/install.html" />' // Agent 설치 페이지
, uploadUrl: '<c:url value="/innorix/exam/upload.jsp" />' // 업로드 URL
, height:80
, width: 650
, maxFileCount : 2 // 첨부파일 최대 갯수
, allowExtension : ["png","jpg","jpeg"]
// , allowExtension : ["txt","xls","xlsx","png","jpg","jpeg","doc","ppt","hwp","pdf","zip"]
// 가능한 확장자 txt|xls|xlsx|png|jpg|jpeg|doc|ppt|hwp|pdf|zip
});
// 업로드 완료 후 이벤트
control.on('uploadComplete', function (p) {
console.log('uploadComplete : ', p);
fn_callBackInnorix(p.files); // 파일 정보 DB isnert function
});
});
function fncSave(){
if($('#lctrSbjct').val() == ''){
alert("강의주제를 입력해주세요");
return false;
}
//첨부파일 체크 및 요청
if(confirm("양식을 업로드 하시겠습니까?")){
if(control.getUploadFiles().length > 0){
var postObj = new Object();
postObj.innoDirPath = $('#innoDirPath').val();
control.setPostData(postObj); // 업로드시 함께 전달될 POST Param 추가
control.upload(); // 업로드 시작
}else{
alert("등록된 첨부파일이 없습니다.");
return false;
}
}
}
//서류 요청 양식 업로드 후 콜백
function fn_callBackInnorix(data){
var url = "<c:url value='/web/common/insertInnorixReqRsltAjax.do' />";
var sendData = {
"eduAplctOrd": '<c:out value='${info.eduAplctOrd}'/>'
, "innorixFileListVO": data
, "lctrSbjct" : $('#lctrSbjct').val()
, "type" : "RSLT"
, "successMsg" : "등록이 완료되었습니다."
}
/*
* 공통 : innorixCommon.js
* fn_innorixCmmAjax() 호출 후 status가 성공(OK)이면 실행
*/
if(fn_innorixCmmAjax(sendData, url) == "OK")
{
window.close();
opener.location.reload();
}
}
</script>
<form:form id="rsltRprtForm" name="rsltRprtForm" method="post" commandName="vEEduRprtVO" onsubmit="return false;">
<input type="hidden" name="eduAplctOrd" value="<c:out value="${vEEduRprtVO.eduAplctOrd}" />" />
<input type="hidden" name="eduChasiOrd" value="<c:out value="${vEEduRprtVO.eduChasiOrd}" />" />
<input type="hidden" name="sbmtYn" id="sbmtYn" value="Y" />
<input type="hidden" name="limitcount" id="limitcount" value="2" /><!-- 최대 업로드 파일갯수 -->
<input type="hidden" name="allrowFileExtsn" value="JPG,PNG,JPEG" /><!-- 확장자 제한-->
<!-- cont -->
<div class="area_popup">
<div class="cont_popup">
<div class="cont_tit" style="padding: 0 0 20px 0; margin-bottom: 30px;">
<h2>
결과보고 등록
</h2>
</div>
<table class="pop_tb_type02">
<colgroup>
<col style="width: 140px;">
<col style="width: auto;">
</colgroup>
<tbody>
<tr>
<th scope="row">
<p>강의주제</p>
</th>
<td colspan="3">
<label for="lctrSbjct" class="label">강의주제 입력</label>
<input type="hidden" id="lctrSbjct" name="lctrSbjct" placeholder="대학생이 알아야할 저작권" value="<c:out value="${info.hopeSbjct}"/>">
<c:out value="${info.hopeSbjct}"/>
</td>
</tr>
<c:forEach var="list" items="${chasiList}" varStatus="status">
<tr>
<th scope="row">
<p>강의날짜</p>
</th>
<td colspan="3">
<c:out value="${list.eduHopeDt}"/>
</td>
</tr>
<tr>
<th scope="row">
<p>강의시간</p>
</th>
<td colspan="3">
<fmt:parseDate value="${list.strtTm}" var="strtTm" pattern="kkmm"/>
<fmt:formatDate value="${strtTm}" pattern="kk:mm"/>
~
<fmt:parseDate value="${list.endTm}" var="endTm" pattern="kkmm"/>
<fmt:formatDate value="${endTm}" pattern="kk:mm"/>
(${list.lrnTm}분)
</td>
</tr>
</c:forEach>
<c:if test="${info.eduSlctCd eq '10'}">
<tr>
<th scope="row">
<p>교육매체</p>
</th>
<td colspan="3">
<c:if test="${info.eduMdCd eq '99' }">
<c:out value="${info.eduMd}"/>
</c:if>
<c:if test="${info.eduMdCd ne '99' }">
<ve:code codeId="VEA015" code="${info.eduMdCd}"/>
</c:if>
</td>
</tr>
</c:if>
<c:if test="${info.eduSlctCd ne '10'}">
<tr>
<th scope="row">
<p>장 소</p>
</th>
<td colspan="3">
<c:out value="(${info.post}) ${info.addr} ${info.addrDetail}"/>
</td>
</tr>
</c:if>
<tr>
<th scope="row">
<p>교육대상</p>
</th>
<td colspan="3">
<c:out value="${info.eduTrgt}"/>
</td>
</tr>
<tr>
<th scope="row">
<p>인 원</p>
</th>
<td colspan="3">
<c:out value="${info.eduPrsnl}"/>
</td>
</tr>
<tr>
<th scope="row">
<p>강사명(소속)</p>
</th>
<td colspan="3">
<c:forEach var="list" items="${chasiList}" varStatus="status">
<c:choose>
<c:when test="${empty list.instrNm }">
-
</c:when>
<c:otherwise>
<c:out value="${list.instrNm}(${list.blng})"/>
</c:otherwise>
</c:choose>
</c:forEach>
</td>
</tr>
<tr>
<th scope="row">
<p>첨부파일</p>
</th>
<td colspan="3">
<div class="popup_cont upload_area">
<div>
<div class="pop_search_wrap">
<label for="fileNm" class="label">첨부파일 선택</label>
<button type="button" onclick="control.openFileDialogSingle();" class="btn_type01 btn_add_file">파일찾기</button>
</div>
<div id="fileControl"></div><br/>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<div class="btnArea">
<div class="btn_wrap btn_layout01">
<div class="btn_left">
</div>
<div class="btn_center">
<button type="button" class="btn_type01" onclick="fncSave();" title="등록">등록</button>
<button type="button" class="btn_type01" onclick="window.close()" title="창닫기">닫기</button>
</div>
<div class="btn_right">
</div>
</div>
</div>
</div>
</div>
</div>
</form:form>

View File

@ -0,0 +1,218 @@
<%@ 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="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<%@ taglib prefix="kc" uri="/WEB-INF/tlds/kcc_tld.tld"%>
<%
/**
* @Class Name : filePopup.jsp
* @Description : 교육확정안 등록 팝업
* @Modification Information
* @
* @ 수정일 수정자 수정내용
* @ ------- -------- ---------------------------
* @ 2021.08.09 김봉호 최초 생성
* @author 김봉호
* @since 2021.08.21
* @version 1.0
* @see
*
*/
%>
<script type="text/javaScript" language="javascript">
$(document).ready(function(){
//파일첨부관련 설정들===============================================
$(".btn_add_file").on('click', function(){
$("#file_temp").click();
});
//파일첨부관련 설정들===============================================
$('#file_temp').change(function(e){
var objUpload = $(".upload_area");
var files = $('#file_temp')[0].files;
handleFileUpload(files,objUpload); //파일업로드
if($("#file_temp").length > 0){
$("#file_temp").val(""); //파일지우기
}
});
});
function fncSave(){
//첨부파일 등록 처리
$('#file_temp').val(""); //첨부파일 중복 등록 방지를 위해 추가
//var data = new FormData(form);
var data = new FormData(document.getElementById("rsltRprtForm"));
//첨부파일 등록 처리-step1
//if(!data.get("fileSize")){
if($('#tbody_fiielist tr').length*1<=0){
alert("첨부파일을 등록해 주세요");
return false;
}
//첨부파일 등록 처리-step2
_fileForm2.forEach(function(obj, idx) {
if (obj) data.append("file"+idx, obj.fileObj);
});
if(confirm("결과보고 등록을 하시겠습니까?")){
$.ajax({
type: "POST",
enctype: 'multipart/form-data',
url: "${pageContext.request.contextPath}/web/ve/instr/tngrVisitEdu/endInfo/popup/eduRsltRprtPopupAjax.do",
data: data,
dataType:'json',
async: false,
processData: false,
contentType: false,
cache: false,
success: function (returnData, status) {
if(status == 'success'){
alert("등록 되었습니다.");
window.close();
opener.location.reload();
} else if(status== 'fail'){
alert("등록에 실패하였습니다.");
}
},
error: function (e) { alert("저장에 실패하였습니다."); console.log("ERROR : ", e); }
});
}
}
</script>
<form:form id="rsltRprtForm" name="rsltRprtForm" method="post" commandName="vEEduRprtVO" onsubmit="return false;">
<input type="hidden" name="eduAplctOrd" value="<c:out value="${vEEduRprtVO.eduAplctOrd}" />" />
<input type="hidden" name="eduChasiOrd" value="<c:out value="${vEEduRprtVO.eduChasiOrd}" />" />
<input type="hidden" id="userId" name="userId" value="<c:out value="${vEEduRprtVO.userId}" />" />
<input type="hidden" name="sbmtYn" id="sbmtYn" value="Y" />
<input type="hidden" name="limitcount" id="limitcount" value="1" /><!-- 최대 업로드 파일갯수 -->
<input type="hidden" name="allrowFileExtsn" value="JPG,PNG,JPEG" /><!-- 확장자 제한-->
<!-- cont -->
<div class="area_popup">
<div class="cont_popup">
<div class="cont_tit" style="padding: 0 0 20px 0; margin-bottom: 30px;">
<h2>
결과보고 등록
</h2>
</div>
<table class="pop_tb_type02">
<colgroup>
<col style="width: 140px;">
<col style="width: auto;">
</colgroup>
<tbody>
<tr>
<th scope="row">
<p>특이사항</p>
</th>
<td colspan="3"><textarea name="unqIsues" title="특이사항"></textarea></td>
</tr>
<tr>
<th scope="row">
<p>건의사항</p>
</th>
<td colspan="3"><textarea name="sgstnIsues" title="건의사항"></textarea></td>
</tr>
<tr>
<th scope="row">
<p>첨부파일</p>
</th>
<td colspan="3" class="upload_area">
<button type="button" class="btn_type01 btn_add_file">파일 찾기</button>
<input type="file" id="file_temp" name="file_temp" class="uploadFile" style="display:none"/>
<div class="file_wrap file_upload_box no_img_box">
<table>
<caption>첨부파일 리스트 : 파일명, 종류, 크기</caption>
<colgroup>
<col style="width: auto;">
<col style="width: 15%;">
<col style="width: 15%;">
</colgroup>
<thead>
<th scope="col">파일 명</th>
<th scope="col">종류</th>
<th scope="col">크기</th>
</thead>
<tbody class="tb_file_before">
<tr>
<td colspan="3">
<p>첨부하실 파일을 <span>마우스끌어서</span> 넣어주세요.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="file_wrap fileAfter file_list_div" style="display: none;">
<table>
<caption>첨부파일 리스트 : 파일명, 종류, 크기, 삭제</caption>
<colgroup>
<col style="width: auto;">
<col style="width: 20%;">
<col style="width: 20%;">
<col style="width: 60px;">
</colgroup>
<thead>
<th scope="col">파일 명</th>
<th scope="col">종류</th>
<th scope="col">크기</th>
<th scope="col">삭제</th>
</thead>
<tbody id="tbody_fiielist" class="tb_file_after">
<c:forEach var="fileList" items="${fileList}" varStatus="status">
<tr class="item_${fileList.atchFileId}_${fileList.fileSn} uploaded_obj">
<input type="hidden" name="fileSize" class="item_file_size" value="${fileList.fileSize}">
<td class="td_filename">
<span class="file_name_text">${fileList.orignlFileNm}</span>
</td>
<td class="td_filesort">
<span class="file_filesort_text" value="<c:out value="${fileList.fileExtsn}"/>"><c:out value="${fileList.fileExtsn}"/></span>
</td>
<td class="td_filesize">
<span class="file_size_text" value="<c:out value="${fileList.fileMg}"/>"><c:out value="${fileList.fileMg}"/></span>
</td>
<td>
<button type="button" class="btn_del" onclick="delAtchFile('${fileList.atchFileId}', '${fileList.fileSn}'); return false;"><i></i></button>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
<div class="btnArea">
<div class="btn_wrap btn_layout01">
<div class="btn_left">
</div>
<div class="btn_center">
<button type="button" class="btn_type01" onclick="fncSave();" title="등록">등록</button>
<button type="button" class="btn_type01" onclick="window.close()" title="창닫기">닫기</button>
</div>
<div class="btn_right">
</div>
</div>
</div>
</div>
</div>
</div>
</form:form>

View File

@ -148,7 +148,12 @@ function replyCalculation(){
function fncAttachFileCreate(){
alert("구현해야 합니다.");
document.chasiStatusPopForm.userId.value = document.getElementById("chasiUserId").value;
document.chasiStatusPopForm.action = "<c:url value='/kccadr/oprtn/cpyrgExprnClsrm/popup/rsltRprtfileInsertNewPopup.do'/>";
window.open("#", "_attachFileCreatePop", "scrollbars = no, top=100px, left=100px, height=550px, width=750px");
document.chasiStatusPopForm.target = "_attachFileCreatePop";
document.chasiStatusPopForm.submit();
}
// 결과보고서 삭제
@ -388,6 +393,7 @@ function replyCalculation(){
<form:form id="chasiStatusPopForm" name="chasiStatusPopForm" action="">
<input type="hidden" name="eduAplctOrd" value="<c:out value="${vEEduAplctVO.eduAplctOrd}" />" />
<input type="hidden" name="eduChasiOrd" value="<c:out value="${vEEduAplctVO.eduChasiOrd}" />" />
<input type="hidden" name="userId" id="rsltRprtUserId" /> <!-- 강사 Id -->
</form:form>
<form:form id="listForm" name="listForm" method="post" onsubmit="return false;">
<input type="hidden" name="pageIndex" value="<c:out value='${vEEduAplctVO.pageIndex}' />"/>
@ -606,7 +612,7 @@ function replyCalculation(){
</thead>
<tbody>
<c:forEach var="list" items="${chasiList}" varStatus="status">
<input type="hidden" name="userId" value="${list.userId}" />
<input type="hidden" name="userId" id="chasiUserId"value="${list.userId}" />
<tr>
<td><c:out value="${status.count}" /></td>
<td>
@ -726,7 +732,7 @@ function replyCalculation(){
<!-- 결과보고서 등록 -->
<c:if test="${empty resultInfo}">
<button type="button" class="btn_type06" onclick="fncAttachFileCreate('${resultInfo.atchFileId}', '${resultInfo.eduAplctOrd}', '${resultInfo.eduChasiOrd}')">결과보고서 등록</button>
<button type="button" class="btn_type06" onclick="fncAttachFileCreate()">결과보고서 등록</button>
</c:if>
</p>
</div>