Merge branch 'hylee' into advc
This commit is contained in:
commit
41ff71b2da
@ -28,6 +28,7 @@ import kcc.com.utl.user.service.CheckLoginUtil;
|
||||
import kcc.let.uat.uia.service.SsoLoginVO;
|
||||
import kcc.let.utl.fcc.service.EgovCryptoUtil;
|
||||
import kcc.ve.aplct.adultVisitEdu.eduAplct.service.EduAplctAdultService;
|
||||
import kcc.ve.aplct.fndtnEnhanceTrn.service.FndtnEnhanceTrnService;
|
||||
import kcc.ve.aplct.sspnIdtmt.service.SspnIdtmtService;
|
||||
import kcc.ve.cmm.VeConstants;
|
||||
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctOnlnService;
|
||||
@ -114,6 +115,10 @@ public class SspnIdtmtController {
|
||||
private VEPrcsAplctPrdService vEPrcsAplctPrdService;
|
||||
|
||||
|
||||
//온라인콘텐츠과정 관리
|
||||
@Resource(name = "fndtnEnhanceTrnService")
|
||||
private FndtnEnhanceTrnService fndtnEnhanceTrnService;
|
||||
|
||||
|
||||
//교육과정순번
|
||||
@Resource(name="prcsGnrService")
|
||||
@ -142,6 +147,9 @@ public class SspnIdtmtController {
|
||||
@Resource(name = "cndtnTrgtInfoMngService")
|
||||
private CndtnTrgtMngService cndtnTrgtInfoMngService;
|
||||
|
||||
//qna순번
|
||||
@Resource(name="prcsAplctPrdQnaOrdGnrService")
|
||||
private EgovIdGnrService prcsAplctPrdQnaOrdGnrService;
|
||||
|
||||
//코드
|
||||
@Resource(name="cmmUseDAO")
|
||||
@ -221,6 +229,14 @@ public class SspnIdtmtController {
|
||||
model.addAttribute("list", vEPrcsDetailVOList);
|
||||
model.addAttribute("countMap", countMap);
|
||||
|
||||
|
||||
|
||||
// Q&A 영역
|
||||
vEPrcsDetailVO.setQnaRegist(loginVO.getUniqId());
|
||||
List<VEPrcsDetailVO> vEPrcsDetailQnaVOList = fndtnEnhanceTrnService.selectVeEduQna(vEPrcsDetailVO);
|
||||
model.addAttribute("qnaList", vEPrcsDetailQnaVOList);
|
||||
|
||||
|
||||
return "/web/ve/aplct/sspnIdtmt/main";
|
||||
}
|
||||
|
||||
@ -703,6 +719,55 @@ public class SspnIdtmtController {
|
||||
return "/web/ve/aplct/sspnIdtmt/eduInfo";
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/web/ve/aplct/sspnIdtmt/qnaRegAjax.do")
|
||||
public ModelAndView qnaSspnIdtmtRegAjax(
|
||||
@ModelAttribute("vEPrcsDetailVO") VEPrcsDetailVO vEPrcsDetailVO
|
||||
, ModelMap model
|
||||
, HttpServletRequest request
|
||||
) throws Exception {
|
||||
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.setViewName("jsonView");
|
||||
|
||||
//로그인 처리====================================
|
||||
//로그인 정보 가져오기
|
||||
|
||||
String s_oprtnLoginCheckNInfo = checkLoginUtil.oprtnCheckNInfo(model);
|
||||
if (!"".equals(s_oprtnLoginCheckNInfo)) {
|
||||
modelAndView.addObject("result", "loginFail");
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
//로그인 처리====================================
|
||||
LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); //권한에 따른 로그인 정보 가져오기
|
||||
SsoLoginVO ssoLoginVO = checkLoginUtil.getSSOLoginVO(request); //SSO 로그인 정보 가져오기
|
||||
|
||||
|
||||
vEPrcsDetailVO.setFrstRegisterId(loginVO.getUniqId()); //esntl_id
|
||||
vEPrcsDetailVO.setQnaRegist(loginVO.getUniqId()); //esntl_id
|
||||
vEPrcsDetailVO.setLctrDivCd("60"); //강의구분코드 VE0011 10-청소년강의, 20-성인강의, 30-체험, 50-기반강화, 60-조건부
|
||||
vEPrcsDetailVO.setPrcsAplctPrdQnaOrd(prcsAplctPrdQnaOrdGnrService.getNextStringId());
|
||||
vEPrcsDetailVO.setQnaRegist(loginVO.getUniqId());
|
||||
|
||||
String msg = "등록되었습니다";
|
||||
try {
|
||||
fndtnEnhanceTrnService.insertVeEduQna(vEPrcsDetailVO);
|
||||
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
e.printStackTrace();
|
||||
msg = "등록에 실패하였습니다. 관리자에게 문의해주세요";
|
||||
}
|
||||
|
||||
|
||||
modelAndView.addObject("msg", msg);
|
||||
modelAndView.addObject("result", "success");
|
||||
|
||||
return modelAndView;
|
||||
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
|
||||
@ -1345,7 +1345,7 @@
|
||||
</insert>
|
||||
|
||||
<select id="VEEduAplctDAO.selectVeEduQna" parameterClass="VEPrcsDetailVO" resultClass="VEPrcsDetailVO">
|
||||
|
||||
/* VEEduAplctDAO.selectVeEduQna */
|
||||
SELECT
|
||||
PRCS_APLCT_PRD_QNA_ORD as prcsAplctPrdQnaOrd
|
||||
, LCTR_DIV_CD as lctrDivCd
|
||||
@ -1353,9 +1353,9 @@
|
||||
, QNA_CN as qnaCn
|
||||
, QNA_ANSWER_CN as qnaAnswerCn
|
||||
, QNA_ANSWERER as qnaAnswerer
|
||||
, FRST_REGIST_PNTTM as frstRegistPnttm
|
||||
, TO_CHAR(FRST_REGIST_PNTTM, 'YYYY-MM-DD') as frstRegistPnttm
|
||||
, FRST_REGISTER_ID as frstRegisterId
|
||||
, LAST_UPDT_PNTTM as lastUpdtPnttm
|
||||
, TO_CHAR(LAST_UPDT_PNTTM, 'YYYY-MM-DD') as frstRegistPnttm
|
||||
, LAST_UPDUSR_ID as lastUpdusrId
|
||||
FROM
|
||||
VEA_PRCS_APLCT_PRD_QNA
|
||||
|
||||
@ -214,6 +214,7 @@
|
||||
<button type="button" class="btnType04" data-tooltip="target_confirm_popup">교육문의</button>
|
||||
</div>
|
||||
</div>
|
||||
<c:if test="${not empty qnaList}">
|
||||
<div class="tb_list02">
|
||||
<div class="faq_wrap">
|
||||
<ul class="faq">
|
||||
@ -232,8 +233,10 @@
|
||||
<p class="qst_text"><span>답변</span>A</p>
|
||||
<c:choose>
|
||||
<c:when test="${not empty list.qnaAnswerCn }">
|
||||
<p class="awr_cont">${list.qnaAnswerCn }</p>
|
||||
<div>
|
||||
<p class="awr_cont">${list.qnaAnswerCn }11</p>
|
||||
<p class="date">${list.lastUpdtPnttm }</p>
|
||||
</div>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<p class="awr_cont">내용이 없습니다.</p>
|
||||
@ -244,12 +247,15 @@
|
||||
</div>
|
||||
</li>
|
||||
</c:forEach>
|
||||
<c:if test="${empty list}">
|
||||
<li><spring:message code="common.nodata.msg" /></li>
|
||||
</c:if>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${empty qnaList}">
|
||||
<div class="q_text">
|
||||
- 내용이 없습니다.
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
|
||||
</form:form>
|
||||
|
||||
@ -39,6 +39,64 @@
|
||||
$(this).val('');
|
||||
});
|
||||
}
|
||||
//FAQ 답변 open&close
|
||||
function faqOpen(item) {
|
||||
if($(item).is(".slide_open") == true) {
|
||||
$(item).removeClass("slide_open");
|
||||
$(item).next(".answer").slideUp(300);
|
||||
$(item).attr("title","답변 열기");
|
||||
} else {
|
||||
$(item).addClass("slide_open");
|
||||
$(item).next(".answer").slideDown(300);
|
||||
$(item).attr("title","답변 닫기");
|
||||
$(item).closest("li").siblings("li").children(".question").removeClass("slide_open");
|
||||
$(item).closest("li").siblings("li").children(".answer").slideUp(300);
|
||||
$(item).closest("li").siblings("li").children(".question").attr("title","답변 열기");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function fn_qnaReg(){
|
||||
if(!confirm("문의 등록을 하시겠습니까?")){
|
||||
$('#qnaCn').val('');
|
||||
$('.btn_popup_close').click();
|
||||
return false;
|
||||
}
|
||||
|
||||
var data = new FormData(document.getElementById("qnaForm"));
|
||||
|
||||
var url = "${pageContext.request.contextPath}/web/ve/aplct/sspnIdtmt/qnaRegAjax.do";
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
url: url,
|
||||
data: data,
|
||||
dataType:'json',
|
||||
async: false,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
cache: false,
|
||||
success:function(returnData){
|
||||
console.log('returnData : ', returnData);
|
||||
if(returnData.result == "success"){
|
||||
// 대상자 테이블 pk 값
|
||||
var sspnIdtmtTrgtOrd = returnData.id;
|
||||
alert(returnData.msg);
|
||||
}else{
|
||||
alert(returnData.msg);
|
||||
}
|
||||
// fn_target_confirm_clean();
|
||||
location.reload();
|
||||
},
|
||||
error:function(request , status, error){
|
||||
alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
$('#target_confirm_popup-close').click();
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- content -->
|
||||
@ -134,5 +192,104 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!--Q&A 내용 있을때-->
|
||||
<div class="q_wrap">
|
||||
<div class="btn_wrap btn_layout01">
|
||||
<div class="tb_tit02">
|
||||
<div class="tb_tit02_left">
|
||||
<div class="t_best q_title">Q&A</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn_right">
|
||||
<button type="button" class="btnType04" data-tooltip="target_confirm_popup">교육문의</button>
|
||||
</div>
|
||||
</div>
|
||||
<c:if test="${not empty qnaList}">
|
||||
<div class="tb_list02">
|
||||
<div class="faq_wrap">
|
||||
<ul class="faq">
|
||||
<c:forEach var="list" items="${qnaList}" varStatus="status">
|
||||
<li <c:if test="${status.index == 0}"> class='first' </c:if>>
|
||||
<button type="button" title="답변 열기" class="question" onclick="faqOpen(this);">
|
||||
<p class="qst_text"><span>질문</span>Q</p>
|
||||
<div>
|
||||
<p class="qst_cont">${list.qnaCn }</p>
|
||||
<p class="date">${list.frstRegistPnttm }</p>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<div class="answer">
|
||||
<div class="answer_in">
|
||||
<p class="qst_text"><span>답변</span>A</p>
|
||||
<c:choose>
|
||||
<c:when test="${not empty list.qnaAnswerCn }">
|
||||
<p class="awr_cont">${list.qnaAnswerCn }</p>
|
||||
<p class="date">${list.lastUpdtPnttm }</p>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<p class="awr_cont">내용이 없습니다.</p>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</c:forEach>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${empty qnaList}">
|
||||
<div class="q_text">
|
||||
- 내용이 없습니다.
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
|
||||
</form:form>
|
||||
</div>
|
||||
|
||||
|
||||
<form id="qnaForm" name="qnaForm" method="post">
|
||||
<!-- 교육대상자 확인 -->
|
||||
<div class="tooltip-wrap q_pop">
|
||||
<div class="popup_wrap popType01" tabindex="0" data-tooltip-con="target_confirm_popup" data-focus="target_confirm_popup" data-focus-prev="target_confirm_popup_close">
|
||||
<div class="popup_tit">
|
||||
<p>교육문의하기</p>
|
||||
<button class="btn_popup_close tooltip-close" data-focus="target_confirm_popup_close" title="팝업 닫기"><i></i></button>
|
||||
</div>
|
||||
<div class="popup_cont">
|
||||
<div class="cont_body">
|
||||
<div class="pop_tb_type01" style="overflow:visible;">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>문의내용</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<textarea type="text" id="qnaCn" name="qnaCn" style="height: 220px;width: 100%;"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="pop_btn_wrap btn_layout01">
|
||||
<div class="btn_left">
|
||||
</div>
|
||||
<div class="btn_center">
|
||||
<button type="button" class="btnType05" onclick="fn_qnaReg()">문의</button>
|
||||
<button type="button" class="btnType02 tooltip-close" id="target_confirm_popup-close" data-focus="target_confirm_popup-close" data-focus-next="target_confirm_popup">취소</button>
|
||||
</div>
|
||||
<div class="btn_right">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--// 신청 클릭 > 기소유예 대상자 확인 팝업 -->
|
||||
</form>
|
||||
Loading…
Reference in New Issue
Block a user