이지우 - 관리자 실무,기소 강의계획서, 결과보고서 업로드 기능 추가

This commit is contained in:
jiwoo 2024-02-02 12:05:59 +09:00
parent d5b0f256e9
commit a2f098f013
7 changed files with 245 additions and 16 deletions

View File

@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import kcc.com.cmm.LoginVO;
import kcc.com.cmm.util.StringUtil;
import kcc.com.utl.fcc.service.EgovStringUtil;
import kcc.kccadr.accdnt.ans.service.AnsVO;
import kcc.kccadr.cmm.RestResponse;
@ -155,7 +156,9 @@ public class InnorixFileController {
if(userId.equals("")) {
return ResponseEntity.ok(new RestResponse(HttpStatus.UNAUTHORIZED, "로그인이 필요합니다.", LocalDateTime.now()));
}
adrInnorixFileVO.setUniqId(userId);
if(StringUtil.isEmpty(adrInnorixFileVO.getUniqId())) {
adrInnorixFileVO.setUniqId(userId);
}
return ResponseEntity.ok(innorixService.insertInnorixLctrPlanFile(adrInnorixFileVO));
}
@ -301,8 +304,9 @@ public class InnorixFileController {
if(userId.equals("")) {
return ResponseEntity.ok(new RestResponse(HttpStatus.UNAUTHORIZED, "로그인이 필요합니다.", LocalDateTime.now()));
}
adrInnorixFileVO.setUniqId(userId);
if(StringUtil.isEmpty(adrInnorixFileVO.getUniqId())) {
adrInnorixFileVO.setUniqId(userId);
}
return ResponseEntity.ok(innorixService.insertInnorixDocAtchFile(adrInnorixFileVO));
}
}

View File

@ -43,6 +43,7 @@ public class VEAPrcsAplctPrdInstrAsgnmVO extends ComDefaultVO implements Seriali
// ve_instr_detail
private String instrNm; // 강사 이름
private String phone; // phone
private String rprtFileType; // 첨부파일 종류
public String getPrcsAplctPrdOrd() {
return prcsAplctPrdOrd;
@ -156,6 +157,14 @@ public class VEAPrcsAplctPrdInstrAsgnmVO extends ComDefaultVO implements Seriali
this.phone = phone;
}
public String getRprtFileType() {
return rprtFileType;
}
public void setRprtFileType(String rprtFileType) {
this.rprtFileType = rprtFileType;
}

View File

@ -656,6 +656,19 @@ public class OprtnStateMngController {
return "oprtn/cpyrgExprnClsrm/popup/auldtRsltRprtfileInsertPopup";
}
/* 관리자 결과보고 등록 팝업(실무)
*
*
* */
@RequestMapping(value = "popup/fndthRsltRprtfileInsertPopup.do")
public String fndthRsltRprtfileInsertPopup(
@ModelAttribute("vEAPrcsAplctPrdInstrAsgnmVO") VEAPrcsAplctPrdInstrAsgnmVO vEAPrcsAplctPrdInstrAsgnmVO, ModelMap model
) throws Exception {
return "oprtn/cpyrgExprnClsrm/popup/fndthRsltRprtfileInsertPopup";
}
/**
* 교육실적통계 화면
*/

View File

@ -51,8 +51,7 @@
<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> <!-- 관리자 결과보고 등록 팝업 -->
<pattern>*/kccadr/oprtn/cpyrgExprnClsrm/popup/**Popup.do</pattern> <!-- 관리자 결과보고 등록 팝업 -->
</decorator>
<!-- 찾교 추가 관리자 -->

View File

@ -337,11 +337,17 @@
form.action = "<c:url value='/kccadr/oprtn/fndthEnhanceTrn/popup/lctrEvalNewPopup.do'/>";
openPopupAndSubmitForm('popupNewForm', 'popupNewForm', 900, 1200);
}
function fncAttachFileCreate(){
alert("구현해야 합니다.");
function fncAttachFileCreate(userId, rprtFileType){
document.instrForm.userId.value = userId;
document.instrForm.rprtFileType.value = rprtFileType;
document.instrForm.action = "<c:url value='/kccadr/oprtn/cpyrgExprnClsrm/popup/fndthRsltRprtfileInsertPopup.do'/>";
window.open("#", "_attachFileCreatePop", "scrollbars = no, top=100px, left=100px, height=550px, width=850px");
document.instrForm.target = "_attachFileCreatePop";
document.instrForm.submit();
}
// 결과보고서 삭제
function fncAttachFileDelete(
p_atchFileId
@ -409,6 +415,7 @@
<form id="instrForm" name="instrForm" method="post">
<input type="hidden" name="prcsAplctPrdOrd" id="prcsAplctPrdOrd" value="<c:out value='${vEPrcsDetailVO.prcsAplctPrdOrd}' />"/>
<input type="hidden" name="userId" id="userId"/>
<input type="hidden" name="rprtFileType" id="rprtFileType"/>
</form>
<form id="statusChgForm" name="statusChgForm" method="post">
<input type="hidden" name="prcsAplctPrdOrd" id="prcsAplctPrdOrd" value="<c:out value='${vEPrcsDetailVO.prcsAplctPrdOrd}' />"/>
@ -589,7 +596,7 @@
<!-- 강의계획서 등록 -->
<c:if test="${empty list.lctrPlanAtchFileId}">
<button type="button" class="btn_type06" onclick="fncAttachFileCreate('${list.lctrPlanAtchFileId}', '${list.prcsAplctPrdOrd}', 'planCndtn')">강의계획서 등록</button>
<button type="button" class="btn_type06" onclick="fncAttachFileCreate('${list.userId}', 'planFndth')">강의계획서 등록</button>
</c:if>
</td>
<td>
@ -603,7 +610,7 @@
<!-- 결과보고서 등록 -->
<c:if test="${empty list.docAtchFileId}">
<button type="button" class="btn_type06" onclick="fncAttachFileCreate('${list.docAtchFileId}', '${list.prcsAplctPrdOrd}', 'rprtCndtn')">결과보고서 등록</button>
<button type="button" class="btn_type06" onclick="fncAttachFileCreate('${list.userId}', 'rprtFndth')">결과보고서 등록</button>
</c:if>
</td>
<td>

View File

@ -0,0 +1,188 @@
<%@ 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.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 : 1 // 첨부파일 최대 갯수
, allowExtension : ["txt","xls","xlsx","png","jpg","jpeg","doc","ppt","hwp","pdf","zip"]
});
//첨부파일 업로드 후속조치
control.on('uploadComplete', function (p) {
var data = p.files;
if($('#rprtFileType').val() == 'rprtFndth'){ //결과보고서
var url = "<c:url value='/web/common/insertInnorixDocAtchFileAjax.do' />";
var sendData = {
"prcsAplctPrdOrd": $('#prcsAplctPrdOrd').val()
, "uniqId": $('#uniqId').val()
, "innorixFileListVO": data
, "successMsg" : "제출 완료되었습니다."
, "fileType" : "DOCATCH"
}
}else{ //강의계획서
var url = "<c:url value='/web/common/insertInnorixLctrPlanFileAjax.do' />";
var sendData = {
"prcsAplctPrdOrd": $('#prcsAplctPrdOrd').val()
, "uniqId": $('#uniqId').val()
, "innorixFileListVO": data
, "successMsg" : "제출 완료되었습니다."
, "fileType" : "LCTRPLAN"
}
}
if(fn_innorixCmmAjax(sendData, url) == "OK")
{
window.close();
opener.location.reload();
}
});
});
function fncSave(){
//첨부파일 체크 및 요청
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;
}
}
}
</script>
<form:form id="rsltRprtForm" name="rsltRprtForm" method="post" commandName="vEEduRprtVO" onsubmit="return false;">
<input type="hidden" name="prcsAplctPrdOrd" id="prcsAplctPrdOrd" value="<c:out value="${vEAPrcsAplctPrdInstrAsgnmVO.prcsAplctPrdOrd}" />" />
<input type="hidden" name="uniqId" id="uniqId" value="<c:out value="${vEAPrcsAplctPrdInstrAsgnmVO.userId}" />" />
<input type="hidden" name="rprtFileType" id="rprtFileType" value="<c:out value="${vEAPrcsAplctPrdInstrAsgnmVO.rprtFileType}" />" />
<input type="hidden" name="sbmtYn" id="sbmtYn" value="Y" />
<!-- cont -->
<div class="area_popup">
<div class="cont_popup">
<div class="cont_tit" style="padding: 0 0 20px 0; margin-bottom: 30px;">
<h2>
<c:if test="${vEAPrcsAplctPrdInstrAsgnmVO.rprtFileType eq 'rprtFndth'}">
결과보고서
</c:if>
<c:if test="${vEAPrcsAplctPrdInstrAsgnmVO.rprtFileType eq 'planFndth'}">
강의계획서
</c:if>
등록
</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">
<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

@ -292,9 +292,6 @@
}
function fncAttachFileCreate(){
alert("구현해야 합니다.");
}
// 결과보고서 삭제
function fncAttachFileDelete(
@ -364,6 +361,17 @@
}
});
}
function fncAttachFileCreate(userId, rprtFileType){
document.instrForm.userId.value = userId;
document.instrForm.rprtFileType.value = rprtFileType;
document.instrForm.action = "<c:url value='/kccadr/oprtn/cpyrgExprnClsrm/popup/fndthRsltRprtfileInsertPopup.do'/>";
window.open("#", "_attachFileCreatePop", "scrollbars = no, top=100px, left=100px, height=550px, width=850px");
document.instrForm.target = "_attachFileCreatePop";
document.instrForm.submit();
}
</script>
</head>
@ -389,6 +397,7 @@
<form id="instrForm" name="instrForm" method="post">
<input type="hidden" name="prcsAplctPrdOrd" id="prcsAplctPrdOrd" value="<c:out value='${vEPrcsDetailVO.prcsAplctPrdOrd}' />"/>
<input type="hidden" name="userId" id="userId"/>
<input type="hidden" name="rprtFileType" id="rprtFileType"/>
</form>
<form id="statusChgForm" name="statusChgForm" method="post">
<input type="hidden" name="prcsAplctPrdOrd" id="prcsAplctPrdOrd" value="<c:out value='${vEPrcsDetailVO.prcsAplctPrdOrd}' />"/>
@ -579,7 +588,7 @@
<!-- 강의계획서 등록 -->
<c:if test="${empty list.lctrPlanAtchFileId}">
<button type="button" class="btn_type06" onclick="fncAttachFileCreate('${list.lctrPlanAtchFileId}', '${list.prcsAplctPrdOrd}', 'planFndth')">강의계획서 등록</button>
<button type="button" class="btn_type06" onclick="fncAttachFileCreate('${list.userId}', 'planFndth')">강의계획서 등록</button>
</c:if>
</td>
<td>
@ -593,7 +602,7 @@
<!-- 결과보고서 등록 -->
<c:if test="${empty list.docAtchFileId}">
<button type="button" class="btn_type06" onclick="fncAttachFileCreate('${list.docAtchFileId}', '${list.prcsAplctPrdOrd}', 'rprtFndth')">결과보고서 등록</button>
<button type="button" class="btn_type06" onclick="fncAttachFileCreate('${list.userId}', 'rprtFndth')">결과보고서 등록</button>
</c:if>
</td>
<td>