2023-11-27 18:44 강의교환 수정 작업

This commit is contained in:
myname 2023-11-27 18:44:54 +09:00
parent 35f26dc753
commit 9dacd94929
4 changed files with 302 additions and 3 deletions

View File

@ -21,6 +21,7 @@ import kcc.ve.adv.tngr.stngInfo.service.VEAStngMixService;
import kcc.ve.adv.tngr.stngInfo.service.VEAStngVO;
import kcc.ve.aplct.cpyrgExprnClsrm.exprnClsrmAplct.service.ScholInfoService;
import kcc.ve.aplct.cpyrgExprnClsrm.exprnClsrmAplct.service.ScholInfoVO;
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctVO;
/**
* 학교검색(대국민)
@ -105,6 +106,63 @@ public class ScholInfoController {
return "/web/ve/aplct/cpyrgExprnClsrm/exprnClsrmInfo/popup/scholPopList";
}
/**
* 강의교안 팝업 리스트
*/
@RequestMapping("popup/changeLctrPopList.do")
public String changeLctrPopList(
//@ModelAttribute("scholInfoVO") ScholInfoVO scholInfoVO
@ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO
, ModelMap model
, HttpServletRequest request
) throws Exception {
/*
//1.paging step1
PaginationInfo paginationInfo = this.setPagingStep1(scholInfoVO);
//2. paging step2
scholInfoVO = this.setPagingStep2(scholInfoVO, paginationInfo);
if (!"".equals(scholInfoVO.getSearchKeyword())) {
scholInfoVO.setSelectPagingListQuery(" AND A.SCHOL_NM LIKE '%"+scholInfoVO.getSearchKeyword()+"%' ");
}
if (!"".equals(scholInfoVO.getSearchCondition())) {
if(scholInfoVO.getSearchCondition().equals("10")) {
scholInfoVO.setScholGrade(" AND A.SCHOL_GRADE_NM LIKE '%초등%' ");
}else if(scholInfoVO.getSearchCondition().equals("20")) {
scholInfoVO.setScholGrade(" AND A.SCHOL_GRADE_NM LIKE '%중학%' ");
}else if(scholInfoVO.getSearchCondition().equals("30")) {
scholInfoVO.setScholGrade(" AND A.SCHOL_GRADE_NM LIKE '%고등%' ");
}else if(scholInfoVO.getSearchCondition().equals("40")) {
scholInfoVO.setScholGrade(" AND A.SCHOL_GRADE_NM LIKE '%특수%' ");
}else if(scholInfoVO.getSearchCondition().equals("50")) {
scholInfoVO.setScholGrade(" AND A.SCHOL_GRADE_NM LIKE '%각종%' ");
}
}
List<ScholInfoVO> scholInfoVOList = scholInfoService.selectPagingList(scholInfoVO);
//3.paging step3
paginationInfo = this.setPagingStep3(scholInfoVOList, paginationInfo);
model.addAttribute("paginationInfo", paginationInfo);
//학교정보 리스트, 페이징 정보 전달
model.addAttribute("scholList", scholInfoVOList);
*/
System.out.println("request.getParameter(userId)");
System.out.println(request.getParameter("userId"));
System.out.println(request.getParameter("eduAplctOrd"));
System.out.println(request.getParameter("eduChasiOrd"));
System.out.println(vEEduAplctVO.getUserId());
System.out.println(vEEduAplctVO.getEduAplctOrd());
System.out.println(vEEduAplctVO.getEduChasiOrd());
return "/web/ve/aplct/cpyrgExprnClsrm/exprnClsrmInfo/popup/changeLctrPopList";
}
/**
* 교육일정당력보기
*/

View File

@ -422,6 +422,48 @@ public class EduAplctTngrController {
return modelAndView;
}
/**
* // 해당 강사가 강의교환이 가능한지 체크하는 로직
*/
@RequestMapping("eduInstrAsgnmChkAjax.do")
public ModelAndView eduInstrAsgnmChkAjax(
@ModelAttribute("vEAStngVO") VEAStngVO vEAStngVO
, ModelMap model
, HttpServletRequest request
) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
//로그인 처리====================================
//일자 정보 가져오기
//boolean flag = eduAplctTngrService.eduAplctDateChkProcess(vEEduAplctVO, request, modelAndView);
//String s_message = eduAplctTngrService.eduAplctDateChkProcess(vEEduAplctVO, request, modelAndView);
System.out.println("request.getParameter(userId)");
System.out.println(request.getParameter("userId"));
System.out.println(request.getParameter("eduAplctOrd"));
System.out.println(request.getParameter("eduChasiOrd"));
//String s_message = vEAStngMixService.eduAplctDateChkProcess(vEAStngVO, request, modelAndView);
//vEAStngMixService.selectDetail_VEADPTQS(paramVO)
//
/*
if(!"".equals(s_message) && s_message.indexOf("rndsOrd")<0){
//if(!flag){
modelAndView.addObject("result", "fail");
modelAndView.addObject("message", s_message);
return modelAndView;
}
modelAndView.addObject("result", "success");
modelAndView.addObject("rndsOrd", s_message);
*/
modelAndView.addObject("result", "success");
return modelAndView;
}
/**
* 교육신청서 상세 화면
*/

View File

@ -0,0 +1,153 @@
<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="kc" uri="/WEB-INF/tlds/kcc_tld.tld"%>
<script type="text/javascript" src="${pageContext.request.contextPath}/kccadrPb/usr/script/popup.js"></script>
<script type="text/javaScript" language="javascript">
function fncGoScholList(){
linkPage(1);
}
function linkPage(pageNo){
var data = {
pageIndex : pageNo,
searchKeyword : $("#searchKeyword").val(),
searchCondition : $("#searchCondition").val(),
pageUnit : 5,
formId : $("#formId").val(),
}
fncScholList(data);
}
function fncScholList(paramObj) {
if(paramObj == undefined || paramObj == ''){
paramObj = {
pageIndex : 1,
searchKeyword : "",
searchCondition : "",
pageUnit : 5,
formId : $("#formId").val(),
};
}
// 학교 리스트 팝업 호출
commonPopLayeropen(
"${pageContext.request.contextPath}/web/ve/aplct/cpyrgExprnClsrm/scholInfo/popup/changeLctrPopList.do"
, 500
, 600
, paramObj
, "N"
, "scholPop"
);
}
function fncScholDataSlct_back(p_code, p_nm){
var fNm = "#"+$("#formId").val();
$(fNm + " #stndrdScholCd").val(p_code);
$(fNm + " #scholInsttNm").val(p_nm);
$(".btn_popup_close").click();
}
function fncScholDataSlct(thisObj){
var inObj = $(thisObj).closest("td").find("input[type=hidden]");
var rsObj = new Object();
$.each(inObj, function(idx, value){
console.log(value.value);
rsObj[value.name] = value.value;
});
callBackSchPop(rsObj);
$(".btn_popup_close").click();
}
// 대상강사가 있는지 확인하는 로직
function checkAplctPsbl_date_check() {
//alert($("#searchKeyword").val());
if ($("#searchKeyword").val()==''){
alert("강사ID는 필수 입력값 입니다.");
return;
}
$.ajax({
type:"POST",
url:"${pageContext.request.contextPath}/web/ve/aplct/tngrVisitEdu/eduAplct/eduInstrAsgnmChkAjax.do",
data: {
},
dataType:'json',
async: false,
success:function(returnData){
if(returnData.result == "fail"){
//신청 버튼 숨기기
$("div.btn_layout01").hide();
//alert("신청가능한 기간이 아닙니다.");
alert("신청가능한 기간이 아닙니다.\n\n"+returnData.message+"\n\n(교사, 학부모 대상 교육은 ‘찾아가는 저작권 교육(성인)'에서 상시 신청 가능합니다)");
//location.href="<c:url value='/web/main/mainPage.do'/>"
psblFlag = 'N';
}else if(returnData.result == "success"){
alert("등록처리되었습니다.");
//location.href="<c:url value='/web/main/mainPage.do'/>"
$(".btn_popup_close").click();
}else{
$("input[name=rndsOrd]").val(returnData.rndsOrd);
}
},
error:function(request , status, error){
alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
}
});
}
$(document).ready(function(){
boardCaptionDetailToggle4();
// 레이어팝업 포커싱 이동 수정
$(".tooltip-close").click(function(){
var activeTarget = $('[data-tooltip-con="sub36_pop02"]');
activeTarget.hide();
$('[data-tooltip="sub01_pop02"]').focus();
});
//레이어팝업 초정 이동 시 필요한 data 값 추가
var btnLast = $('.popup_cont').find('.page').find('button:last-child');
btnLast.attr('data-focus-next','sub36_pop02');
btnLast.attr('data-focus','sub36_pop02_close');
})
</script>
<!-- 일정 상세 -->
<form:form commandName="scholInfoVO" id="popList" name="popList" method="post" onsubmit="return false;">
<input type="hidden" name="pageIndex" value="<c:out value='${scholInfoVO.pageIndex}' default='1' />"/>
<input type="hidden" name="searchSortCnd" value="<c:out value="${scholInfoVO.searchSortCnd}" />" />
<input type="hidden" name="searchSortOrd" value="<c:out value="${scholInfoVO.searchSortOrd}" />" />
<input type="hidden" name="formId" id="formId" value="<c:out value="${scholInfoVO.formId}" />" />
<div class="popup_wrap popType01" tabindex="0" data-tooltip-con="sub36_pop02" data-focus="sub36_pop02" data-focus-prev="sub36_pop02_close">
<div class="popup_tit">
<p>강의교환 대상강사 등록${vEEduAplctVO.userId}</p> <button class="btn_popup_close tooltip-close" data-focus="sub36_pop02_close" title="팝업 닫기"><i></i></button>
</div>
<div class="popup_cont">
<div class="cont_body">
<div class="list_top">
<div class="btn_wrap">
<label for="searchKeyword" class="label">강사ID 입력</label>
<input type="text" name="searchKeyword" id="searchKeyword" value="<c:out value='${scholInfoVO.searchKeyword}' />" placeholder="강사ID 입력" size="20"
onKeypress="javascript:if(event.keyCode==13) {checkAplctPsbl_date_check(); return false;}"/>
<button type="button" class="btnType07" onclick="checkAplctPsbl_date_check(); return false;">등록</button>
</div>
</div>
</div>
</div>
</div>
</form:form>

View File

@ -40,6 +40,31 @@
$(this).val('');
});
}
//강의교환
function fncChangeLctr(
p_userId
, p_eduAplctOrd
, p_eduChasiOrd
) {
paramObj = {
"userId" : p_userId,
"eduAplctOrd" : p_eduAplctOrd,
"eduChasiOrd" : p_eduChasiOrd,
formId : "createForm"
};
commonPopLayeropen(
"${pageContext.request.contextPath}/web/ve/aplct/cpyrgExprnClsrm/scholInfo/popup/changeLctrPopList.do"
, 500
, 600
, paramObj
, "Y"
, "scholPop"
);
}
</script>
<!-- cont -->
@ -168,7 +193,7 @@
<c:choose>
<c:when test="${list.asgnmAprvlCd eq '20'}">
<!-- 배정 수락 요청 상태 -->
<c:set var="statCd" value="대기" />
<c:set var="statCd" value="대기" />
</c:when>
<c:when test="${(list.asgnmAprvlCd eq '40' and list.userId eq loginVO.id) or
(list.hstryUserId eq loginVO.id and (list.hstryCd eq '10' or list.hstryCd eq '40'))}">
@ -180,7 +205,18 @@
<c:set var="statCd" value="수락" />
</c:when>
</c:choose>
<td><span class="app_status1">${statCd}</span></td>
<td><span class="app_status1">${statCd}</span>
<c:choose>
<c:when test="${list.asgnmAprvlCd eq '20'}">
<!-- 배정 수락 요청 상태 -->
<button type="button" class="btnType01" onclick="fncChangeLctr(
'<c:out value='${list.userId}'/>'
, '<c:out value='${list.eduAplctOrd}'/>'
, '<c:out value='${list.eduChasiOrd}'/>'
); return false;">강의교환</button>
</c:when>
</c:choose>
</td>
</tr>
</c:forEach>
<c:if test="${empty vEInstrAsgnmVOList}">
@ -238,7 +274,7 @@
<c:choose>
<c:when test="${list.asgnmAprvlCd eq '20'}">
<!-- 배정 수락 요청 상태 -->
<c:set var="statCd" value="대기" />
<c:set var="statCd" value="대기" />
</c:when>
<c:when test="${(list.asgnmAprvlCd eq '40' and list.userId eq loginVO.id) or
(list.hstryUserId eq loginVO.id and (list.hstryCd eq '10' or list.hstryCd eq '40'))}">
@ -255,6 +291,16 @@
<%-- <ve:code codeId="VE0019" code="${list.asgnmAprvlCd}"/> --%>
</span></span>
<c:choose>
<c:when test="${list.asgnmAprvlCd eq '20'}">
<!-- 배정 수락 요청 상태 -->
<button type="button" class="btnType01" onclick="fncChangeLctr(
'<c:out value='${list.userId}'/>'
, '<c:out value='${list.eduAplctOrd}'/>'
, '<c:out value='${list.eduChasiOrd}'/>'
); return false;">강의교환</button>
</c:when>
</c:choose>
</li>
</ul>
</c:forEach>