강사 - 성인 / 청소년 이력관리 첨부파일 추가

This commit is contained in:
hylee 2023-12-20 16:20:36 +09:00
parent 32c230b11b
commit 674f3c16c4
7 changed files with 165 additions and 8 deletions

View File

@ -224,6 +224,13 @@ public class VEAStngVO extends ComDefaultVO implements Serializable {
*/ */
private boolean allDay; private boolean allDay;
private String atchFileId;
public String getYr() { public String getYr() {
return yr; return yr;
@ -1031,5 +1038,11 @@ public class VEAStngVO extends ComDefaultVO implements Serializable {
public void setDdlnDt(String ddlnDt) { public void setDdlnDt(String ddlnDt) {
this.ddlnDt = ddlnDt; this.ddlnDt = ddlnDt;
} }
public String getAtchFileId() {
return atchFileId;
}
public void setAtchFileId(String atchFileId) {
this.atchFileId = atchFileId;
}
} }

View File

@ -2728,6 +2728,7 @@ public class OprtnInstrTngrPrflContoller {
public ModelAndView instrHstryMngPopupAjax( public ModelAndView instrHstryMngPopupAjax(
ModelMap model ModelMap model
, HttpServletRequest request , HttpServletRequest request
, final MultipartHttpServletRequest multiRequest
) throws Exception { ) throws Exception {
ModelAndView modelAndView = new ModelAndView(); ModelAndView modelAndView = new ModelAndView();
@ -2749,12 +2750,37 @@ public class OprtnInstrTngrPrflContoller {
//System.out.println(request.getParameter("ddlnStateCd")); //System.out.println(request.getParameter("ddlnStateCd"));
try { try {
//step2.파일 처리====================================
//파일 정상 처리 여부와 첨부 파일 정보
//String atchFileId = this.takeFile(multiRequest, modelAndView, bmVO);
//파일 제한 수량 가져오기, 없으면 기본값 사용
int i_file_limit = checkFileUtil.getLimitCount(request); // file count
int i_limit_size = checkFileUtil.getLimitSize(request); // file MB
String s_file_exts = checkFileUtil.getS_exts(); // file exts
String atchFileId = checkFileUtil.fileValCheckNdbInsert(
multiRequest, modelAndView
, "InstrH_" //file_name_prefix
, s_file_exts
, i_limit_size
, i_file_limit
); //EXT, MB size and ea
if ("ERROR".equals(atchFileId)) return modelAndView;
LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); //권한에 따른 로그인 정보 가져오기 LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); //권한에 따른 로그인 정보 가져오기
SsoLoginVO ssoLoginVO = checkLoginUtil.getSSOLoginVO(request); //SSO 로그인 정보 가져오기 SsoLoginVO ssoLoginVO = checkLoginUtil.getSSOLoginVO(request); //SSO 로그인 정보 가져오기
String s_ord = instrHstryOrdGnrService.getNextStringId(); String s_ord = instrHstryOrdGnrService.getNextStringId();
VEAStngVO vEAStngVO = new VEAStngVO(); VEAStngVO vEAStngVO = new VEAStngVO();
System.out.println("atchFileId : "+ atchFileId);
vEAStngVO.setInstrHstryOrd(s_ord); vEAStngVO.setInstrHstryOrd(s_ord);
vEAStngVO.setUserId(request.getParameter("userId")); vEAStngVO.setUserId(request.getParameter("userId"));
@ -2763,6 +2789,7 @@ public class OprtnInstrTngrPrflContoller {
vEAStngVO.setStrtDt(request.getParameter("rgstrStrtPnttm_dt")); vEAStngVO.setStrtDt(request.getParameter("rgstrStrtPnttm_dt"));
vEAStngVO.setDdlnDt(request.getParameter("rgstrDdlnPnttm_dt")); vEAStngVO.setDdlnDt(request.getParameter("rgstrDdlnPnttm_dt"));
vEAStngVO.setFrstRegisterId(loginVO.getUniqId()); vEAStngVO.setFrstRegisterId(loginVO.getUniqId());
vEAStngVO.setAtchFileId(atchFileId);
vEAStngService.insert_VEAIHM(vEAStngVO); vEAStngService.insert_VEAIHM(vEAStngVO);

View File

@ -21,7 +21,9 @@
ddln_dt, ddln_dt,
frst_regist_pnttm, frst_regist_pnttm,
frst_register_id frst_register_id,
atch_file_id
</sql> </sql>
@ -38,7 +40,8 @@
TO_CHAR(a.frst_regist_pnttm,'YYYY-MM-DD') AS frstRegistPnttm, TO_CHAR(a.frst_regist_pnttm,'YYYY-MM-DD') AS frstRegistPnttm,
a.frst_register_id AS frstRegisterId a.frst_register_id AS frstRegisterId ,
a.atch_file_id AS atchFileId
</sql> </sql>
@ -64,7 +67,8 @@
#ddlnDt#, #ddlnDt#,
SYSDATE, SYSDATE,
#frstRegisterId# #frstRegisterId#,
#atchFileId#
) )
WHEN MATCHED THEN WHEN MATCHED THEN
UPDATE UPDATE
@ -76,6 +80,7 @@
, ddln_dt = #ddlnDt# , ddln_dt = #ddlnDt#
, frst_regist_pnttm = SYSDATE , frst_regist_pnttm = SYSDATE
, frst_register_id = #frstRegisterId# , frst_register_id = #frstRegisterId#
, atch_file_id = #atchFileId#
</insert> </insert>
<!-- 강사 정보 R --> <!-- 강사 정보 R -->
@ -111,7 +116,8 @@
#ddlnDt#, #ddlnDt#,
SYSDATE, SYSDATE,
#frstRegisterId# #frstRegisterId#,
#atchFileId#
) )
WHEN MATCHED THEN WHEN MATCHED THEN
UPDATE UPDATE
@ -123,6 +129,7 @@
, ddlnDt = #ddlnDt# , ddlnDt = #ddlnDt#
, frst_regist_pnttm = SYSDATE , frst_regist_pnttm = SYSDATE
, frst_register_id = #frstRegisterId# , frst_register_id = #frstRegisterId#
, atch_file_id = #atchFileId#
</update> </update>
<!-- 강사 정보 U --> <!-- 강사 정보 U -->

View File

@ -943,6 +943,7 @@ function getYears(getYear){
<col style="width: 18%;"> <col style="width: 18%;">
<col style="width: 18%;"> <col style="width: 18%;">
<col style="width: 18%;"> <col style="width: 18%;">
<col style="width: 18%;">
<col style="width: 10%;"> <col style="width: 10%;">
</colgroup> </colgroup>
<thead> <thead>
@ -953,6 +954,7 @@ function getYears(getYear){
<th scope="col">비고</th> <th scope="col">비고</th>
<th scope="col">등록자</th> <th scope="col">등록자</th>
<th scope="col">등록일</th> <th scope="col">등록일</th>
<th scope="col">첨부파일</th>
<th scope="col">삭제</th> <th scope="col">삭제</th>
@ -966,7 +968,12 @@ function getYears(getYear){
<td><c:out value="${pList.cn}" /></td> <td><c:out value="${pList.cn}" /></td>
<td><c:out value="${pList.userNm}" /></td> <td><c:out value="${pList.userNm}" /></td>
<td><c:out value="${pList.frstRegistPnttm}" /></td> <td><c:out value="${pList.frstRegistPnttm}" /></td>
<td>
<c:import url="/cmm/fms/selectBBSFileInfs.do" charEncoding="utf-8">
<c:param name="param_atchFileId" value="${pList.atchFileId}" />
<c:param name="pdf_view" value="Y" />
</c:import>
</td>
<td> <td>
<button type="button" class="btn_type04" onclick="fnInstrHstryDelete('<c:out value="${pList.instrHstryOrd}" />'); return false;">삭제</button> <button type="button" class="btn_type04" onclick="fnInstrHstryDelete('<c:out value="${pList.instrHstryOrd}" />'); return false;">삭제</button>
</td> </td>

View File

@ -922,6 +922,7 @@
<col style="width: 18%;"> <col style="width: 18%;">
<col style="width: 18%;"> <col style="width: 18%;">
<col style="width: 18%;"> <col style="width: 18%;">
<col style="width: 18%;">
<col style="width: 10%;"> <col style="width: 10%;">
</colgroup> </colgroup>
<thead> <thead>
@ -932,6 +933,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>
<th scope="col">첨부파일</th>
<th scope="col">삭제</th> <th scope="col">삭제</th>
@ -945,7 +947,12 @@
<td><c:out value="${pList.cn}" /></td> <td><c:out value="${pList.cn}" /></td>
<td><c:out value="${pList.userNm}" /></td> <td><c:out value="${pList.userNm}" /></td>
<td><c:out value="${pList.frstRegistPnttm}" /></td> <td><c:out value="${pList.frstRegistPnttm}" /></td>
<td>
<c:import url="/cmm/fms/selectBBSFileInfs.do" charEncoding="utf-8">
<c:param name="param_atchFileId" value="${pList.atchFileId}" />
<c:param name="pdf_view" value="Y" />
</c:import>
</td>
<td> <td>
<button type="button" class="btn_type04" onclick="fnInstrHstryDelete('<c:out value="${pList.instrHstryOrd}" />'); return false;">삭제</button> <button type="button" class="btn_type04" onclick="fnInstrHstryDelete('<c:out value="${pList.instrHstryOrd}" />'); return false;">삭제</button>
</td> </td>

View File

@ -46,13 +46,20 @@
$("input[type=checkbox],textarea").not("textarea[name=rejtReson]").attr("disabled" , true); $("input[type=checkbox],textarea").not("textarea[name=rejtReson]").attr("disabled" , true);
} }
$("#filebutton").on('click', function(){
$("#file_temp").click();
});
}); });
function fncAprooval(){ function fncAprooval(){
//var msg = "강의가능시간 변경"; //var msg = "강의가능시간 변경";
var data1 = new FormData(document.getElementById("createForm")); var data1 = new FormData(document.getElementById("createForm"));
//첨부파일 등록 처리-step2
_fileForm2.forEach(function(obj, idx) {
if (obj) data1.append("file"+idx, obj.fileObj);
});
//console.log(data); //console.log(data);
console.log(data1); console.log(data1);
@ -390,7 +397,86 @@
value='' onkeyDown="press(event);"> value='' onkeyDown="press(event);">
</div> </div>
</td> </td>
</tr> </tr>
<tr>
<th scope="row">
<!-- <p class="req_text"><span>필수입력 항목</span>*</p> -->
<p>첨부파일</p>
</th>
<td class="upload_area" colspan="3">
<!-- <input type="text" id="fileNm" size="30" class="file_input" readonly> --><!-- <button type="button" class="btnType01 btn_add_file">파일 첨부하기</button> -->
<input type="file" id="file_temp" name="file_temp" class="uploadFile" style="display:none"/>
<button type="button" id="filebutton" class="btn_type01">파일 첨부하기</button>
<p style="padding-left:30px;">첨부파일 가능 용량은 20MB입니다. </p><!-- <p style="color:red;font-weight:500">업로드 순서는 1.신청서 2.안내문 입니다.</p> -->
<div class="file_wrap file_upload_box no_img_box">
<table class="tbType02">
<caption>첨부파일 리스트 : 파일명, 종류, 크기, 삭제</caption>
<colgroup>
<col style="width: 60%;">
<col style="width: auto;">
<col style="width: 20%;">
<col style="width: 10%;">
</colgroup>
<thead>
<!-- <th>
<input type="checkbox" id="all_check"><label for="all_check"></label>
</th> -->
<th scope="col">파일 명</th>
<th scope="col">종류</th>
<th scope="col">크기</th>
<th scope="col">삭제</th>
</thead>
<tbody class="tb_file_before">
<tr>
<td colspan="4">
<p>첨부하실 파일을 <span>마우스로 끌어서</span> 넣어주세요.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="file_wrap fileAfter file_list_div">
<table class="tbType02">
<caption>첨부파일 리스트 : 파일명, 종류, 크기, 삭제</caption>
<colgroup>
<col style="width: 60%">
<col style="width: 10%">
<col style="width: 20%">
<col style="width: 10%">
</colgroup>
<thead>
<!-- <th>
<input type="checkbox" id="all_check"><label for="all_check"></label>
</th> -->
<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_<c:out value='${fileList.atchFileId}' />_<c:out value='${fileList.fileSn}' /> uploaded_obj">
<input type="hidden" name="fileSize" class="item_file_size" value="${fileList.fileSize}">
<td class="td_filename">
<!-- <img src="/direct/img/upload_hwp_img.png" alt="" /> -->
<span class="file_name_text"><c:out value='${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('<c:out value='${fileList.atchFileId}' />', '<c:out value='${fileList.fileSn}' />'); return false;" title="파일삭제"><i></i></button>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</td>
</tr>
</tbody> </tbody>
</table> </table>

View File

@ -965,6 +965,7 @@
<col style="width: 18%;"> <col style="width: 18%;">
<col style="width: auto;"> <col style="width: auto;">
<col style="width: 18%;"> <col style="width: 18%;">
<col style="width: 22%;">
<col style="width: 18%;"> <col style="width: 18%;">
</colgroup> </colgroup>
<thead> <thead>
@ -973,6 +974,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>
<th scope="col">첨부파일</th>
<th scope="col">등록일</th> <th scope="col">등록일</th>
</tr> </tr>
</thead> </thead>
@ -983,6 +985,14 @@
<td><c:out value="${pList.strtDt}" />~<c:out value="${pList.ddlnDt}" /></td> <td><c:out value="${pList.strtDt}" />~<c:out value="${pList.ddlnDt}" /></td>
<td><c:out value="${pList.cn}" /></td> <td><c:out value="${pList.cn}" /></td>
<td><c:out value="${pList.userNm}" /></td> <td><c:out value="${pList.userNm}" /></td>
<td>
<c:if test="${pList.atchFileId ne null}">
<c:import url="/cmm/fms/selectScholSealInfs.do" charEncoding="utf-8">
<c:param name="param_atchFileId" value="${pList.atchFileId}" />
</c:import>
<!-- <button type="button" class="btnType01" data-tooltip="sub35_pop01" id="OATH" onclick="filePopupLayer('OATH')" title="팝업 열림">서약서 파일 변경</button> -->
</c:if>
</td>
<td><c:out value="${pList.frstRegistPnttm}" /></td> <td><c:out value="${pList.frstRegistPnttm}" /></td>
</tr> </tr>
</c:forEach> </c:forEach>