diff --git a/src/main/java/kcc/ve/aplct/fndtnEnhanceTrn/web/FndtnEnhanceTrnController.java b/src/main/java/kcc/ve/aplct/fndtnEnhanceTrn/web/FndtnEnhanceTrnController.java index a17fdf36..1e6ee48d 100644 --- a/src/main/java/kcc/ve/aplct/fndtnEnhanceTrn/web/FndtnEnhanceTrnController.java +++ b/src/main/java/kcc/ve/aplct/fndtnEnhanceTrn/web/FndtnEnhanceTrnController.java @@ -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; + + } diff --git a/src/main/resources/egovframework/sqlmap/let/uss/umt/EgovUserManage_SQL_Tibero.xml b/src/main/resources/egovframework/sqlmap/let/uss/umt/EgovUserManage_SQL_Tibero.xml index 8223ee94..a30335ee 100644 --- a/src/main/resources/egovframework/sqlmap/let/uss/umt/EgovUserManage_SQL_Tibero.xml +++ b/src/main/resources/egovframework/sqlmap/let/uss/umt/EgovUserManage_SQL_Tibero.xml @@ -920,10 +920,10 @@ #mberId#, #password#, #emplyrSttusCode#, - SYSTIMESTAMP, + SYSDATE, #uniqId#, - SYSTIMESTAMP, - SYSTIMESTAMP + SYSDATE, + SYSDATE ) diff --git a/src/main/resources/egovframework/sqlmap/ve/edu/VEEduAplct_SQL_Tibero.xml b/src/main/resources/egovframework/sqlmap/ve/edu/VEEduAplct_SQL_Tibero.xml index 58f5f09e..ea1e2157 100644 --- a/src/main/resources/egovframework/sqlmap/ve/edu/VEEduAplct_SQL_Tibero.xml +++ b/src/main/resources/egovframework/sqlmap/ve/edu/VEEduAplct_SQL_Tibero.xml @@ -256,7 +256,7 @@ - INSERT INTO ( + + /* VEEduAplctDAO.insertVeEduAplct */ + MERGE INTO + 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# + + ,LCTR_DIV_CD = #lctrDivCd# + + + ,USER_ID = #userId# + + + ,PRCS_ORD = #prcsOrd# + + + ,SBMT_YN = #sbmtYn# + ,SBMT_PNTTM = sysdate + + + ,APRVL_CD = #aprvlCd# + ,APRVL_PNTTM = sysdate + + + ,APRVL_CN = #aprvlCn# + + + ,CHRG_NM = #chrgNm# + + + ,INSTT_NM = #insttNm# + + + ,D_BIRTH = #dBirth# + + diff --git a/src/main/webapp/WEB-INF/jsp/web/ve/aplct/fndtnEnhanceTrn/eduAplctList.jsp b/src/main/webapp/WEB-INF/jsp/web/ve/aplct/fndtnEnhanceTrn/eduAplctList.jsp index f46b1f87..24a4cc3a 100644 --- a/src/main/webapp/WEB-INF/jsp/web/ve/aplct/fndtnEnhanceTrn/eduAplctList.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/ve/aplct/fndtnEnhanceTrn/eduAplctList.jsp @@ -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); + } + }); + } + } + @@ -403,7 +459,7 @@ $(document).ready(function(){ - "> + " data-eduAplctOrd=""> <%-- ');" style="cursor:pointer;"> --%> <%-- --%> @@ -436,7 +492,7 @@ $(document).ready(function(){ <%-- --%> - + diff --git a/src/main/webapp/WEB-INF/jsp/web/ve/aplct/fndtnEnhanceTrn/popup/eduAplctPop.jsp b/src/main/webapp/WEB-INF/jsp/web/ve/aplct/fndtnEnhanceTrn/popup/eduAplctPop.jsp index 3de379fd..e4cd5561 100644 --- a/src/main/webapp/WEB-INF/jsp/web/ve/aplct/fndtnEnhanceTrn/popup/eduAplctPop.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/ve/aplct/fndtnEnhanceTrn/popup/eduAplctPop.jsp @@ -113,6 +113,7 @@ $(document).ready(function(){ +