Merge branch 'tolag3' into advc

This commit is contained in:
leejunho 2023-11-27 16:46:32 +09:00
commit 943e1b4965
5 changed files with 206 additions and 11 deletions

View File

@ -321,6 +321,10 @@ public class FndtnEnhanceTrnController {
if(vEEduAplctVO != null && StringUtils.isNotEmpty(vEEduAplctVO.getAprvlCd())) {
t.setAprvlCd(vEEduAplctVO.getAprvlCd());
}
if(vEEduAplctVO != null && StringUtils.isNotEmpty(vEEduAplctVO.getEduAplctOrd())) {
t.setEduAplctOrd(vEEduAplctVO.getEduAplctOrd());
}
});
}
//대상 리스트, 페이징 정보 전달
@ -513,7 +517,11 @@ public class FndtnEnhanceTrnController {
VEEduAplctVO vEEduAplctVO = new VEEduAplctVO();
vEEduAplctVO.setEduAplctOrd(eduAplctGnrService.getNextStringId());
if(StringUtil.isEmpty(vEPrcsDetailVO.getEduAplctOrd())) {
vEEduAplctVO.setEduAplctOrd(eduAplctGnrService.getNextStringId());
}else {
vEEduAplctVO.setEduAplctOrd(vEPrcsDetailVO.getEduAplctOrd());
}
vEEduAplctVO.setLctrDivCd("50"); // 기반강화
vEEduAplctVO.setAprvlCd("10"); // 승인코드 VE0003 10 - 요청, 20 - 승인, 30 - 반려
@ -869,7 +877,58 @@ public class FndtnEnhanceTrnController {
}
/**
* 기반강화 찜하기
*/
@RequestMapping("/web/ve/aplct/fndtnEnhanceTrn/eduGgimAjax.do")
public ModelAndView eduGgimAjax(
@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.setLctrDivCd("50"); //강의구분코드 VE0011 10-청소년강의, 20-성인강의, 30-체험, 50-기반강화, 60-조건부
VEEduAplctVO vEEduAplctVO = new VEEduAplctVO();
vEEduAplctVO.setEduAplctOrd(eduAplctGnrService.getNextStringId());
vEEduAplctVO.setLctrDivCd("50"); // 기반강화
vEEduAplctVO.setAprvlCd("100"); // 승인코드 VE0003 10 - 요청, 20 - 승인, 30 - 반려, 100 - 찜하기
// sbmt_pnttm 제출일시
vEEduAplctVO.setSbmtYn("Y"); // 제출여부
vEEduAplctVO.setFrstRegisterId(loginVO.getUniqId());
// frst_regist_pnttm
vEEduAplctVO.setUserId(loginVO.getUniqId());
vEEduAplctVO.setPrcsOrd(vEPrcsDetailVO.getPrcsAplctPrdOrd());
fndtnEnhanceTrnService.insertVeEduAplct(vEEduAplctVO);
modelAndView.addObject("result", "success");
return modelAndView;
}

View File

@ -920,10 +920,10 @@
#mberId#,
#password#,
#emplyrSttusCode#,
SYSTIMESTAMP,
SYSDATE,
#uniqId#,
SYSTIMESTAMP,
SYSTIMESTAMP
SYSDATE,
SYSDATE
)
</insert>

View File

@ -256,7 +256,7 @@
<!-- 강사 등록 C -->
<insert id="VEEduAplctDAO.insertVeEduAplct" parameterClass="VEEduAplctVO">
INSERT INTO <include refid="VEEduAplctDAO.table_name"/> (
<!-- INSERT INTO <include refid="VEEduAplctDAO.table_name"/> (
EDU_APLCT_ORD,
LCTR_DIV_CD,
USER_ID,
@ -292,7 +292,86 @@
#chrgNm#,
#insttNm#,
#dBirth#
)
) -->
/* VEEduAplctDAO.insertVeEduAplct */
MERGE INTO <include refid="VEEduAplctDAO.table_name"/>
USING DUAL
ON(EDU_APLCT_ORD=#eduAplctOrd#)
WHEN NOT MATCHED THEN
INSERT
(
EDU_APLCT_ORD,
LCTR_DIV_CD,
USER_ID,
PRCS_ORD,
SBMT_YN,
SBMT_PNTTM,
APRVL_CD,
APRVL_PNTTM,
APRVL_CN,
FRST_REGIST_PNTTM,
FRST_REGISTER_ID,
USE_YN,
CHRG_NM,
INSTT_NM,
D_BIRTH
)
VALUES(
#eduAplctOrd#,
#lctrDivCd#,
#userId#,
#prcsOrd#,
#sbmtYn#,
SYSDATE,
#aprvlCd#,
SYSDATE,
#aprvlCn#,
SYSDATE,
#frstRegisterId#,
'Y',
#chrgNm#,
#insttNm#,
#dBirth#
)
WHEN MATCHED THEN
UPDATE
SET last_updt_pnttm = SYSDATE
, last_updusr_id = #frstRegisterId#
<isNotEmpty property="lctrDivCd">
,LCTR_DIV_CD = #lctrDivCd#
</isNotEmpty>
<isNotEmpty property="userId">
,USER_ID = #userId#
</isNotEmpty>
<isNotEmpty property="prcsOrd">
,PRCS_ORD = #prcsOrd#
</isNotEmpty>
<isNotEmpty property="sbmtYn">
,SBMT_YN = #sbmtYn#
,SBMT_PNTTM = sysdate
</isNotEmpty>
<isNotEmpty property="aprvlCd">
,APRVL_CD = #aprvlCd#
,APRVL_PNTTM = sysdate
</isNotEmpty>
<isNotEmpty property="aprvlCn">
,APRVL_CN = #aprvlCn#
</isNotEmpty>
<isNotEmpty property="chrgNm">
,CHRG_NM = #chrgNm#
</isNotEmpty>
<isNotEmpty property="insttNm">
,INSTT_NM = #insttNm#
</isNotEmpty>
<isNotEmpty property="dBirth">
,D_BIRTH = #dBirth#
</isNotEmpty>
</insert>

View File

@ -143,6 +143,32 @@ $(document).ready(function(){
if ($thisCell.text().trim() === "접수중") {
$applyButton.prop('disabled', false); // 버튼 비활성화
}
if ($thisCell.text().trim() === "접수전") {
$applyButton.prop('disabled', false); // 버튼 비활성화
$applyButton.text('찜하기');
$applyButton.attr('onclick', "fn_ggim('" + $($thisCell).closest('tr').data('value') + "');");
}
if ($thisCell.text().trim() === "찜하기") {
var $currentRow = $thisCell.closest('tr');
var strtPnttm = new Date($currentRow.find("td:eq(2)").text().split("~")[0].trim());
var endPnttm = new Date($currentRow.find("td:eq(2)").text().split("~")[1].trim());
var currentDate = new Date();
// 시간, 분, 초 초기화
strtPnttm.setHours(0, 0, 0, 0);
endPnttm.setHours(0, 0, 0, 0);
currentDate.setHours(0, 0, 0, 0);
var ddlnCdText = '';
if (currentDate >= strtPnttm && currentDate <= endPnttm && $thisCell.text().trim() === "찜하기") {
$applyButton.prop('disabled', false); // 버튼 비활성화
}
}
});
const dBirth = document.querySelector(".dBirth");
@ -259,9 +285,10 @@ $(document).ready(function(){
);
}
function fn_eduRegPopup(prcsAplctPrdOrd){
function fn_eduRegPopup(prcsAplctPrdOrd, eduAplctOrd){
var data ={
"prcsAplctPrdOrd": prcsAplctPrdOrd
"prcsAplctPrdOrd": prcsAplctPrdOrd,
"eduAplctOrd": eduAplctOrd
}
commonPopLayeropen(
@ -274,6 +301,35 @@ $(document).ready(function(){
);
}
function fn_ggim(prcsAplctPrdOrd){
var regForm = document.regForm;
regForm.prcsAplctPrdOrd.value = prcsAplctPrdOrd;
var data = new FormData(document.getElementById("regForm"));
if(confirm("찜하시겠습니까?")){
var url = "/offedu/web/ve/aplct/fndtnEnhanceTrn/eduGgimAjax.do";
$.ajax({
type:"POST",
url: url,
data: data,
dataType:'json',
async: false,
processData: false,
contentType: false,
cache: false,
success:function(returnData){
if(returnData.result == "success"){
alert("저장되었습니다.");
fncGoList();
}
},
error:function(request , status, error){
alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
}
});
}
}
</script>
<!-- content -->
@ -403,7 +459,7 @@ $(document).ready(function(){
</thead>
<tbody>
<c:forEach var="list" items="${list}" varStatus="status">
<tr class="listCount" data-value="<c:out value="${list.prcsAplctPrdOrd}"/>">
<tr class="listCount" data-value="<c:out value="${list.prcsAplctPrdOrd}"/>" data-eduAplctOrd="<c:out value="${list.eduAplctOrd}"/>">
<%-- <td onclick="fncGoDetail('<c:out value="${list.prcsAplctPrdOrd}"/>');" style="cursor:pointer;"> --%>
<%-- <c:out value="${status.count}"/> --%>
<!-- </td> -->
@ -436,7 +492,7 @@ $(document).ready(function(){
</td>
<td class="aplctBtn">
<%-- <button type="button" class="btnType04" onclick="fncEduReg('<c:out value="${list.prcsAplctPrdOrd}"/>');" disabled>신청</button> --%>
<button type="button" class="btnType04" onclick="fn_eduRegPopup('<c:out value="${list.prcsAplctPrdOrd}"/>');" data-tooltip="target_confirm_popup" disabled>신청</button>
<button type="button" class="btnType04" onclick="fn_eduRegPopup('<c:out value="${list.prcsAplctPrdOrd}"/>', '<c:out value="${list.eduAplctOrd}"/>');" data-tooltip="target_confirm_popup" disabled>신청</button>
</td>
</c:if>
</tr>

View File

@ -113,6 +113,7 @@ $(document).ready(function(){
<input type="hidden" name="chrgNm">
<input type="hidden" name="insttNm">
<input type="hidden" name="dBirth">
<input type="hidden" name="eduAplctOrd" value="${vEPrcsDetailVO.eduAplctOrd}">
</form>
<form id="popForm" name="popForm" method="post">