diff --git a/src/main/java/kcc/let/schdlr/service/web/AnotaionSchedule.java b/src/main/java/kcc/let/schdlr/service/web/AnotaionSchedule.java index 3fd17d49..bcd213ee 100644 --- a/src/main/java/kcc/let/schdlr/service/web/AnotaionSchedule.java +++ b/src/main/java/kcc/let/schdlr/service/web/AnotaionSchedule.java @@ -1,292 +1,292 @@ -package kcc.let.schdlr.service.web; - -import java.util.List; -import java.util.Map; - -import javax.annotation.Resource; -import javax.servlet.ServletContext; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.scheduling.annotation.EnableScheduling; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.stereotype.Controller; - -import egovframework.rte.fdl.cmmn.exception.FdlException; -import egovframework.rte.fdl.idgnr.EgovIdGnrService; -import egovframework.rte.fdl.property.EgovPropertyService; -import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; -import kcc.com.cmm.LoginVO; -import kcc.com.utl.user.service.CheckLoginUtil; -import kcc.let.sym.site.service.EgovSiteManagerService; -import kcc.let.sym.site.service.SiteManagerVO; -import kcc.let.uss.umt.service.EgovUserManageService; -import kcc.let.utl.fcc.service.EgovCryptoUtil; -import kcc.ve.cmm.VeSendMail; -import kcc.ve.cmm.VeSendSMS; -import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctService; -import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctSndHstryService; -import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctVO; -import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsAplctPrdService; -import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsDetailVO; - -@Controller -@EnableScheduling -public class AnotaionSchedule { - /** EgovPropertyService */ - @Resource(name = "propertiesService") - protected EgovPropertyService propertiesService; - - @Resource(name = "egovSiteManagerService") - private EgovSiteManagerService egovSiteManagerService; - - /** userManageService */ - @Resource(name = "userManageService") - private EgovUserManageService userManageService; - - /** vEEduAplctService */ - @Resource(name = "vEEduAplctService") - private VEEduAplctService vEEduAplctService; - - // 교육신청발송이력 - @Resource(name = "vEEduAplctSndHstryService") - private VEEduAplctSndHstryService vEEduAplctSndHstryService; - - //snd_hstry id gen - @Resource(name = "sndGnrService") - private EgovIdGnrService sndGnrService; - - //과정차시 관리 - @Resource(name = "vEPrcsAplctPrdService") - private VEPrcsAplctPrdService vEPrcsAplctPrdService; - - @Resource(name = "egovCryptoUtil") - EgovCryptoUtil egovCryptoUtil; - - //@RequestMapping("/sym/site/AdminLogMngTest.do") - //@Scheduled(fixedDelay = 1000) -// @Scheduled(cron="30 0 0 * * ?") - public void SchDeleteMember() throws Exception { //설정에 따른 회원삭제 / 관리자로그 설정삭제 - try { - SiteManagerVO siteManagerVO =new SiteManagerVO(); - /** paging */ - PaginationInfo paginationInfo = new PaginationInfo(); - paginationInfo.setCurrentPageNo(siteManagerVO.getPageIndex()); - paginationInfo.setRecordCountPerPage(siteManagerVO.getPageUnit()); - paginationInfo.setPageSize(siteManagerVO.getPageSize()); - siteManagerVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); - siteManagerVO.setLastIndex(paginationInfo.getLastRecordIndex()); - siteManagerVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); - List siteManagerList= egovSiteManagerService.selectSiteManagerList(siteManagerVO) ; - for(SiteManagerVO tempSiteManagerVO : siteManagerList){ - if(!"9".equals(tempSiteManagerVO.getIdWithdrawCd())) { //탈퇴회원 영구보관이 아니면 - userManageService.deleteMemberSchedule(tempSiteManagerVO); - } - - if(null!=tempSiteManagerVO.getAdminlogKpCd() && !"N".equals(tempSiteManagerVO.getAdminlogKpCd())) { //관리자로그 보관설정 영구보관이 아니면 - switch (tempSiteManagerVO.getAdminlogKpCd()) {// M:1개월,3:3개월,6:6개월보관,Y:1년, N:영구보관 - case "M": - tempSiteManagerVO.setAdminlogKpCd("1"); - case "Y": - tempSiteManagerVO.setAdminlogKpCd("12"); - default: - } - userManageService.deleteAdminLogSchedule(tempSiteManagerVO); - } - } - }catch(Exception e) { - System.out.println("Exception Error"); - } - } - - /* - * 매일 새벽1시에 청소년 찾교 신청자 개인 정보 초기화 (담당자, 휴대폰, 전화 , 이메일) - * */ - // Schdule Lock (2분동안) - @Scheduled(cron = "0 0 1 * * ?") - //@Scheduled(cron = "0 * * * * ?") - public void deletePrivacy4tngr() throws Exception { - - // do something... - try { - System.out.println("=============AnotaionSchedule=====deletePrivacy4tngr =============>"); - - //문자 환불, 팩스 환불 - deletePrivacy("10"); - deletePrivacy("TWO"); - /* - // 문자 환불 - schdlrManageService.msgFailPayBack(); - * */ - - - // do something... - - }catch(Exception ex) { - ex.printStackTrace(); - } - } - - /** - * @methodName : oneDayBeforeTrainingStartDate - * @author : 이호영 - * @date : 2023.12.01 - * @description : - * @throws Exception - */ - @Scheduled(cron = "0 21 18 * * ?") -// @Scheduled(cron = "0 0 9 * * ?") - public void oneDayBeforeTrainingStartDate() throws Exception { - - // do something... - try { - System.out.println("=============AnotaionSchedule=====deletePrivacy4tngr =============>"); - - - //권한에 따른 로그인 정보 가져오기 - - //메일 발송 부 시작 - //================================================================ - //메일 발송 VeSendMail 파라미터 정리 - //1. sndFlag = 메뉴 구분 - // C -> 찾교청소년 - // Z -> 찾교청소년-교육확정알림(교육배치목록-확정된 강의 알림 버튼) : 청소년>교육확정 메일본문 수정 메뉴에서 관리 - // S -> 찾교성인 - // G -> 체험교실 - // W -> 교육콘텐츠 - // A -> 기반강화 - // B -> 기소유예 - //2. sndTo = 수신자 - //3. vEEduAplctVO = eduAplctOrd(pk) - // sndHstryOrd(pk) - // sndCd(10 - sms, 20 - email) - // sndId(발송자) - // sndCn(발송내용) - //================================================================ - - // 기반 테스트 - this.sendLctrDivCd("50", "2", "A"); - // 기반강화 -// this.sendLctrDivCd50("50", "1", "A"); // LCTR_DIV_CD 50, A 기반강화, 1 하루후 - // 기소유예 -// this.sendLctrDivCd("60", "2", "B"); // LCTR_DIV_CD 60, A 기반강화, 1 하루후 - - - /* - - VeSendSMS sendSMS = new VeSendSMS(); - Map resultMap = sendSMS.VeSendSMS(vEEduAplctVO.getClphone(), vEEduAplctVO.getSndCn()); - - LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); - - //문자 발송 성공 시 로그 - if("1".equals(resultMap.get("result_code"))){ - String snd_ord = sndGnrService.getNextStringId(); - vEEduAplctVO.setSndHstryOrd(snd_ord); - vEEduAplctVO.setSndId(loginVO.getUniqId()); - vEEduAplctVO.setTrgt(vEEduAplctVO.getClphone()); - vEEduAplctSndHstryService.insert(vEEduAplctVO); - }else { - result = "fail"; - message = resultMap.get("message").toString(); - } - */ - }catch(Exception ex) { - ex.printStackTrace(); - } - } - - private void sendLctrDivCd(String lctrDivCd, String diffDay, String sndFlag) throws Exception { - VEPrcsDetailVO vEPrcsDetailVO = new VEPrcsDetailVO(); - vEPrcsDetailVO.setLctrDivCd(lctrDivCd); - vEPrcsDetailVO.setDiffDay(diffDay); - - List VEEduAplctVOList = vEPrcsAplctPrdService.selectOneDayBeforeTrainingStartDate(vEPrcsDetailVO); - - for(VEPrcsDetailVO vo : VEEduAplctVOList) { - VEEduAplctVO vEEduAplctVO = new VEEduAplctVO(); - vEEduAplctVO.setEduAplctOrd(vo.getEduAplctOrd()); - vEEduAplctVO.setEmail(vo.getEmail()); - vEEduAplctVO.setSndFlag(sndFlag); - - vEEduAplctVO.setSndCn("안녕하세요 \n"+egovCryptoUtil.decrypt(vo.getMberNm())+"님이 신청해주신 \n" - + vo.getPrcsNm()+"교육이 "+vo.getEduStrtPnttm()+"날 시작합니다."); - - System.out.println(" vEEduAplctVO.getSndCn() :: "+vEEduAplctVO.getSndCn()); - this.sendMailModule(vEEduAplctVO); - this.sendSmsModule(vEEduAplctVO); - - } - } - - private void sendSmsModule(VEEduAplctVO vEEduAplctVO) throws Exception { - VeSendSMS sendSMS = new VeSendSMS(); -// String phone = vEEduAplctVO.getClphone(); - // 테스트 - String phone = "01083584250"; - - Map resultMap = sendSMS.VeSendSMS(phone, vEEduAplctVO.getSndCn()); - - - //문자 발송 성공 시 로그 - if("1".equals(resultMap.get("result_code"))){ - String snd_ord = sndGnrService.getNextStringId(); - vEEduAplctVO.setSndHstryOrd(snd_ord); - vEEduAplctVO.setSndId(""); - vEEduAplctVO.setTrgt(vEEduAplctVO.getClphone()); - vEEduAplctSndHstryService.insert(vEEduAplctVO); - }else { - } - - } - - private void sendMailModule(VEEduAplctVO vEEduAplctVO) { - VeSendMail sendMail = new VeSendMail(); - if("".equals(vEEduAplctVO.getSndFlag())) { - vEEduAplctVO.setSndFlag("test"); - } - if("".equals(vEEduAplctVO.getEmail())) { - vEEduAplctVO.setEmail("tolag3@gmail.com"); - } - // 테스트 - // 테스트 - // 테스트 - vEEduAplctVO.setEmail("hehihoho3@gmail.com"); - - try { - - // String message = "정상적으로 발송되었습니다."; - String result = sendMail.VeSendMail(vEEduAplctVO.getSndFlag() // 기반강화 50 , 기소유예 60 - , vEEduAplctVO.getEmail() - , vEEduAplctVO - ); - - if("success".equals(result)) { - //메일 발송 로그 - vEEduAplctVO.setSndHstryOrd(sndGnrService.getNextStringId()); - - vEEduAplctVO.setSndId(""); - vEEduAplctVO.setTrgt(vEEduAplctVO.getEmail()); - vEEduAplctSndHstryService.insert(vEEduAplctVO); - }else { - // message = "발송 실패하였습니다."; - } - - } catch (Exception e) { - e.printStackTrace(); - // TODO: handle exception - } - } - - - //////////////////////////////////////////////// - //개인 정보 삭제 - //////////////////////////////////////////////// - private void deletePrivacy(String p_type) throws Exception { - //개인 정보 삭제 - ve_edu_aplct - System.out.println("==== deletePrivacy ===="+p_type); - VEEduAplctVO paramVO = new VEEduAplctVO(); - paramVO.setLctrDivCd(p_type); - vEEduAplctService.privacyUpdate(paramVO); - - } +package kcc.let.schdlr.service.web; + +import java.util.List; +import java.util.Map; + +import javax.annotation.Resource; +import javax.servlet.ServletContext; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Controller; + +import egovframework.rte.fdl.cmmn.exception.FdlException; +import egovframework.rte.fdl.idgnr.EgovIdGnrService; +import egovframework.rte.fdl.property.EgovPropertyService; +import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; +import kcc.com.cmm.LoginVO; +import kcc.com.utl.user.service.CheckLoginUtil; +import kcc.let.sym.site.service.EgovSiteManagerService; +import kcc.let.sym.site.service.SiteManagerVO; +import kcc.let.uss.umt.service.EgovUserManageService; +import kcc.let.utl.fcc.service.EgovCryptoUtil; +import kcc.ve.cmm.VeSendMail; +import kcc.ve.cmm.VeSendSMS; +import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctService; +import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctSndHstryService; +import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctVO; +import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsAplctPrdService; +import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsDetailVO; + +@Controller +@EnableScheduling +public class AnotaionSchedule { + /** EgovPropertyService */ + @Resource(name = "propertiesService") + protected EgovPropertyService propertiesService; + + @Resource(name = "egovSiteManagerService") + private EgovSiteManagerService egovSiteManagerService; + + /** userManageService */ + @Resource(name = "userManageService") + private EgovUserManageService userManageService; + + /** vEEduAplctService */ + @Resource(name = "vEEduAplctService") + private VEEduAplctService vEEduAplctService; + + // 교육신청발송이력 + @Resource(name = "vEEduAplctSndHstryService") + private VEEduAplctSndHstryService vEEduAplctSndHstryService; + + //snd_hstry id gen + @Resource(name = "sndGnrService") + private EgovIdGnrService sndGnrService; + + //과정차시 관리 + @Resource(name = "vEPrcsAplctPrdService") + private VEPrcsAplctPrdService vEPrcsAplctPrdService; + + @Resource(name = "egovCryptoUtil") + EgovCryptoUtil egovCryptoUtil; + + //@RequestMapping("/sym/site/AdminLogMngTest.do") + //@Scheduled(fixedDelay = 1000) +// @Scheduled(cron="30 0 0 * * ?") + public void SchDeleteMember() throws Exception { //설정에 따른 회원삭제 / 관리자로그 설정삭제 + try { + SiteManagerVO siteManagerVO =new SiteManagerVO(); + /** paging */ + PaginationInfo paginationInfo = new PaginationInfo(); + paginationInfo.setCurrentPageNo(siteManagerVO.getPageIndex()); + paginationInfo.setRecordCountPerPage(siteManagerVO.getPageUnit()); + paginationInfo.setPageSize(siteManagerVO.getPageSize()); + siteManagerVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); + siteManagerVO.setLastIndex(paginationInfo.getLastRecordIndex()); + siteManagerVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); + List siteManagerList= egovSiteManagerService.selectSiteManagerList(siteManagerVO) ; + for(SiteManagerVO tempSiteManagerVO : siteManagerList){ + if(!"9".equals(tempSiteManagerVO.getIdWithdrawCd())) { //탈퇴회원 영구보관이 아니면 + userManageService.deleteMemberSchedule(tempSiteManagerVO); + } + + if(null!=tempSiteManagerVO.getAdminlogKpCd() && !"N".equals(tempSiteManagerVO.getAdminlogKpCd())) { //관리자로그 보관설정 영구보관이 아니면 + switch (tempSiteManagerVO.getAdminlogKpCd()) {// M:1개월,3:3개월,6:6개월보관,Y:1년, N:영구보관 + case "M": + tempSiteManagerVO.setAdminlogKpCd("1"); + case "Y": + tempSiteManagerVO.setAdminlogKpCd("12"); + default: + } + userManageService.deleteAdminLogSchedule(tempSiteManagerVO); + } + } + }catch(Exception e) { + System.out.println("Exception Error"); + } + } + + /* + * 매일 새벽1시에 청소년 찾교 신청자 개인 정보 초기화 (담당자, 휴대폰, 전화 , 이메일) + * */ + // Schdule Lock (2분동안) + @Scheduled(cron = "0 0 1 * * ?") + //@Scheduled(cron = "0 * * * * ?") + public void deletePrivacy4tngr() throws Exception { + + // do something... + try { + System.out.println("=============AnotaionSchedule=====deletePrivacy4tngr =============>"); + + //문자 환불, 팩스 환불 + deletePrivacy("10"); + deletePrivacy("TWO"); + /* + // 문자 환불 + schdlrManageService.msgFailPayBack(); + * */ + + + // do something... + + }catch(Exception ex) { + ex.printStackTrace(); + } + } + + /** + * @methodName : oneDayBeforeTrainingStartDate + * @author : 이호영 + * @date : 2023.12.01 + * @description : + * @throws Exception + */ + @Scheduled(cron = "0 21 18 * * ?") +// @Scheduled(cron = "0 0 9 * * ?") + public void oneDayBeforeTrainingStartDate() throws Exception { + + // do something... + try { + System.out.println("=============AnotaionSchedule=====deletePrivacy4tngr =============>"); + + + //권한에 따른 로그인 정보 가져오기 + + //메일 발송 부 시작 + //================================================================ + //메일 발송 VeSendMail 파라미터 정리 + //1. sndFlag = 메뉴 구분 + // C -> 찾교청소년 + // Z -> 찾교청소년-교육확정알림(교육배치목록-확정된 강의 알림 버튼) : 청소년>교육확정 메일본문 수정 메뉴에서 관리 + // S -> 찾교성인 + // G -> 체험교실 + // W -> 교육콘텐츠 + // A -> 기반강화 + // B -> 기소유예 + //2. sndTo = 수신자 + //3. vEEduAplctVO = eduAplctOrd(pk) + // sndHstryOrd(pk) + // sndCd(10 - sms, 20 - email) + // sndId(발송자) + // sndCn(발송내용) + //================================================================ + + // 기반 테스트 +// this.sendLctrDivCd("50", "2", "A"); + // 기반강화 +// this.sendLctrDivCd50("50", "1", "A"); // LCTR_DIV_CD 50, A 기반강화, 1 하루후 + // 기소유예 +// this.sendLctrDivCd("60", "2", "B"); // LCTR_DIV_CD 60, A 기반강화, 1 하루후 + + + /* + + VeSendSMS sendSMS = new VeSendSMS(); + Map resultMap = sendSMS.VeSendSMS(vEEduAplctVO.getClphone(), vEEduAplctVO.getSndCn()); + + LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); + + //문자 발송 성공 시 로그 + if("1".equals(resultMap.get("result_code"))){ + String snd_ord = sndGnrService.getNextStringId(); + vEEduAplctVO.setSndHstryOrd(snd_ord); + vEEduAplctVO.setSndId(loginVO.getUniqId()); + vEEduAplctVO.setTrgt(vEEduAplctVO.getClphone()); + vEEduAplctSndHstryService.insert(vEEduAplctVO); + }else { + result = "fail"; + message = resultMap.get("message").toString(); + } + */ + }catch(Exception ex) { + ex.printStackTrace(); + } + } + + private void sendLctrDivCd(String lctrDivCd, String diffDay, String sndFlag) throws Exception { + VEPrcsDetailVO vEPrcsDetailVO = new VEPrcsDetailVO(); + vEPrcsDetailVO.setLctrDivCd(lctrDivCd); + vEPrcsDetailVO.setDiffDay(diffDay); + + List VEEduAplctVOList = vEPrcsAplctPrdService.selectOneDayBeforeTrainingStartDate(vEPrcsDetailVO); + + for(VEPrcsDetailVO vo : VEEduAplctVOList) { + VEEduAplctVO vEEduAplctVO = new VEEduAplctVO(); + vEEduAplctVO.setEduAplctOrd(vo.getEduAplctOrd()); + vEEduAplctVO.setEmail(vo.getEmail()); + vEEduAplctVO.setSndFlag(sndFlag); + + vEEduAplctVO.setSndCn("안녕하세요 \n"+egovCryptoUtil.decrypt(vo.getMberNm())+"님이 신청해주신 \n" + + vo.getPrcsNm()+"교육이 "+vo.getEduStrtPnttm()+"날 시작합니다."); + + System.out.println(" vEEduAplctVO.getSndCn() :: "+vEEduAplctVO.getSndCn()); + this.sendMailModule(vEEduAplctVO); + this.sendSmsModule(vEEduAplctVO); + + } + } + + private void sendSmsModule(VEEduAplctVO vEEduAplctVO) throws Exception { + VeSendSMS sendSMS = new VeSendSMS(); +// String phone = vEEduAplctVO.getClphone(); + // 테스트 + String phone = "01083584250"; + + Map resultMap = sendSMS.VeSendSMS(phone, vEEduAplctVO.getSndCn()); + + + //문자 발송 성공 시 로그 + if("1".equals(resultMap.get("result_code"))){ + String snd_ord = sndGnrService.getNextStringId(); + vEEduAplctVO.setSndHstryOrd(snd_ord); + vEEduAplctVO.setSndId(""); + vEEduAplctVO.setTrgt(vEEduAplctVO.getClphone()); + vEEduAplctSndHstryService.insert(vEEduAplctVO); + }else { + } + + } + + private void sendMailModule(VEEduAplctVO vEEduAplctVO) { + VeSendMail sendMail = new VeSendMail(); + if("".equals(vEEduAplctVO.getSndFlag())) { + vEEduAplctVO.setSndFlag("test"); + } + if("".equals(vEEduAplctVO.getEmail())) { + vEEduAplctVO.setEmail("tolag3@gmail.com"); + } + // 테스트 + // 테스트 + // 테스트 + vEEduAplctVO.setEmail("hehihoho3@gmail.com"); + + try { + + // String message = "정상적으로 발송되었습니다."; + String result = sendMail.VeSendMail(vEEduAplctVO.getSndFlag() // 기반강화 50 , 기소유예 60 + , vEEduAplctVO.getEmail() + , vEEduAplctVO + ); + + if("success".equals(result)) { + //메일 발송 로그 + vEEduAplctVO.setSndHstryOrd(sndGnrService.getNextStringId()); + + vEEduAplctVO.setSndId(""); + vEEduAplctVO.setTrgt(vEEduAplctVO.getEmail()); + vEEduAplctSndHstryService.insert(vEEduAplctVO); + }else { + // message = "발송 실패하였습니다."; + } + + } catch (Exception e) { + e.printStackTrace(); + // TODO: handle exception + } + } + + + //////////////////////////////////////////////// + //개인 정보 삭제 + //////////////////////////////////////////////// + private void deletePrivacy(String p_type) throws Exception { + //개인 정보 삭제 - ve_edu_aplct + System.out.println("==== deletePrivacy ===="+p_type); + VEEduAplctVO paramVO = new VEEduAplctVO(); + paramVO.setLctrDivCd(p_type); + vEEduAplctService.privacyUpdate(paramVO); + + } } \ No newline at end of file diff --git a/src/main/java/kcc/ve/aplct/sspnIdtmt/web/SspnIdtmtController.java b/src/main/java/kcc/ve/aplct/sspnIdtmt/web/SspnIdtmtController.java index b03c5dd1..b7e511eb 100644 --- a/src/main/java/kcc/ve/aplct/sspnIdtmt/web/SspnIdtmtController.java +++ b/src/main/java/kcc/ve/aplct/sspnIdtmt/web/SspnIdtmtController.java @@ -482,6 +482,10 @@ public class SspnIdtmtController { // frst_regist_pnttm vEEduAplctVO.setUserId(loginVO.getUniqId()); vEEduAplctVO.setPrcsOrd(vEPrcsDetailVO.getPrcsAplctPrdOrd()); + vEEduAplctVO.setTrgtNm(vEPrcsDetailVO.getTrgtNm()); + vEEduAplctVO.setdBirth(vEPrcsDetailVO.getdBirth()); + vEEduAplctVO.setPhone(vEPrcsDetailVO.getPhone()); + vEEduAplctVO.setEmail(vEPrcsDetailVO.getEmail()); String result = ""; try { @@ -514,6 +518,27 @@ public class SspnIdtmtController { } + + + + @RequestMapping("/web/ve/aplct/sspnIdtmt/eduAplctPop.do") + public String eduAplctPop( + @ModelAttribute("vEPrcsDetailVO") VEPrcsDetailVO vEPrcsDetailVO + , ModelMap model + , HttpServletRequest request ) throws Exception { + //로그인 처리==================================== + LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); //권한에 따른 로그인 정보 가져오기 + SsoLoginVO ssoLoginVO = checkLoginUtil.getSSOLoginVO(request); //SSO 로그인 정보 가져오기 + + if (loginVO == null || ssoLoginVO == null) { + //이전 url 처리(beforeSiteUrl)_이준호_220228추가 + return checkLoginUtil.getUserLoginPage(model, request); //로그인 정보가 없으면 로그인 페이지로 이동한다. + } + + return "/web/ve/aplct/sspnIdtmt/popup/eduAplctPop"; + } + + /** * 기반강화연수과정 신청기간 등록 */ diff --git a/src/main/java/kcc/ve/instr/tngrVisitEdu/prcsInfo/service/VEPrcsDetailVO.java b/src/main/java/kcc/ve/instr/tngrVisitEdu/prcsInfo/service/VEPrcsDetailVO.java index db6018aa..b3268882 100644 --- a/src/main/java/kcc/ve/instr/tngrVisitEdu/prcsInfo/service/VEPrcsDetailVO.java +++ b/src/main/java/kcc/ve/instr/tngrVisitEdu/prcsInfo/service/VEPrcsDetailVO.java @@ -45,6 +45,8 @@ public class VEPrcsDetailVO extends ComDefaultVO implements Serializable { private String instrNm; // + private String phone; // + //ve_edu_aplct private String eduAplctOrd; //교육신청순번 private List eduAplctOrdList; //교육신청순번 @@ -984,6 +986,12 @@ public class VEPrcsDetailVO extends ComDefaultVO implements Serializable { public void setCmmNotifyOrd(String cmmNotifyOrd) { this.cmmNotifyOrd = cmmNotifyOrd; } + public String getPhone() { + return phone; + } + public void setPhone(String phone) { + this.phone = phone; + } } diff --git a/src/main/java/kcc/ve/oprtn/cndtnSspnIdtmt/web/CndtnPrcsInfoMngController.java b/src/main/java/kcc/ve/oprtn/cndtnSspnIdtmt/web/CndtnPrcsInfoMngController.java index 7f1c9082..f7d2380c 100644 --- a/src/main/java/kcc/ve/oprtn/cndtnSspnIdtmt/web/CndtnPrcsInfoMngController.java +++ b/src/main/java/kcc/ve/oprtn/cndtnSspnIdtmt/web/CndtnPrcsInfoMngController.java @@ -3,12 +3,14 @@ package kcc.ve.oprtn.cndtnSspnIdtmt.web; import java.util.ArrayList; import java.util.Comparator; import java.util.List; +import java.util.Locale; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.apache.commons.lang3.StringUtils; +import org.apache.poi.xssf.streaming.SXSSFWorkbook; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; @@ -24,8 +26,10 @@ import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; import kcc.com.cmm.ComDefaultCodeVO; import kcc.com.cmm.ComDefaultVO; import kcc.com.cmm.LoginVO; +import kcc.com.cmm.service.EgovCmmUseService; import kcc.com.cmm.service.EgovFileMngService; import kcc.com.cmm.service.impl.CmmUseDAO; +import kcc.com.cmm.spring.data.util.ExcelUtil; import kcc.com.cmm.util.StringUtil; import kcc.com.utl.user.service.CheckLoginUtil; import kcc.let.uat.uia.service.SsoLoginVO; @@ -43,6 +47,7 @@ import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsDetailVO; import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsOnlnCntntService; import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsService; import kcc.ve.oprtn.cndtnSspnIdtmt.trgtMng.service.CndtnTrgtMngService; +import kcc.ve.oprtn.fndtnEnhanceTrn.prcsAplctPrdMng.service.ExcelVO; /** * 기반강화연수(관리자) @@ -135,7 +140,10 @@ public class CndtnPrcsInfoMngController { //알림 서비스 @Resource(name = "NotifyManageService") private NotifyManageService notifyManageService; - + + /** cmmUseService */ + @Resource(name = "EgovCmmUseService") + private EgovCmmUseService egovCmmUseService; /** * 기반강화연수 과정 관리 목록 화면 */ @@ -697,6 +705,92 @@ public class CndtnPrcsInfoMngController { } + /** + * 성인찾아가는 저작권 교육 목록 Excel + * @param model + * @return + * @throws Exception + */ + @SuppressWarnings("rawtypes") + @RequestMapping(value = "/kccadr/oprtn/cndtnSspnIdtmt/eduAplctExcelDownLoad.do") + public ModelAndView eduAplctExcelDownLoad(@ModelAttribute("vEPrcsDetailVO") VEPrcsDetailVO vEPrcsDetailVO, ModelMap model) throws Exception { + + // 요청, 반려건 + try { + + VEEduAplctVO paramVO = new VEEduAplctVO(); + paramVO.setPrcsOrd(vEPrcsDetailVO.getPrcsAplctPrdOrd()); + paramVO.setSbmtYn("Y"); + + // 검색 - 날짜 + paramVO.setSearchSmbtStartDt(vEPrcsDetailVO.getSearchSmbtStartDt()); + paramVO.setSearchSmbtEndDt(vEPrcsDetailVO.getSearchSmbtEndDt()); + // 검색 - 검색어 + paramVO.setSearchStatus(vEPrcsDetailVO.getSearchStatus()); + + + + List list = vEEduMIXService.selectCndtnList(paramVO); + list = egovCryptoUtil.decryptVeEduAplctList(list); + + List excelVOList = new ArrayList<>(); + + // util에서 vo의 모든 변수를 순회하기 때문에 느림 + // 필요한 변수들만 vo로 선언 + list.forEach( vo -> { + ExcelVO excelVO = new ExcelVO(); + + excelVO.setUserNm(vo.getUserNm()); + excelVO.setEmail(vo.getEmail()); + excelVO.setPhone(vo.getPhone()); + excelVO.setSbmtPnttm(vo.getSbmtPnttm()); + + ComDefaultCodeVO codeParam = new ComDefaultCodeVO(); + codeParam.setCodeId("VE0003"); + codeParam.setCode(vo.getAprvlCd()); + excelVO.setAprvlCd(egovCmmUseService.selectCmmCodeDetailCodeValue(codeParam)); + + + excelVOList.add(excelVO); + }); + + + + + List excelData = new ArrayList<>(); + excelData.addAll(excelVOList); + // 세팅값 + String title = "조건부 기소유예 - 교육신청 목록"; + int[] width = { + 4000, 4000, 4000, 4000, 4000 + }; // 너비 + + String[] header = { + "신청자", "이메일", "핸드폰", "신청일", "상태" + }; + + String[] order = { + "UserNm", "Email", "Phone", "SbmtPnttm", "AprvlCd" + }; + + // 호출 + SXSSFWorkbook workbook = ExcelUtil.makeSimpleFruitExcelWorkbook(excelData , header, order, width, title); + model.addAttribute("locale", Locale.KOREA); + model.addAttribute("workbook", workbook); + model.addAttribute("workbookName", title); + + + } catch (Exception e) { + e.printStackTrace(); + // TODO: handle exception + } + ModelAndView modelAndView = new ModelAndView(); + modelAndView.setViewName("excelDownloadView"); + modelAndView.addObject(model); + + return modelAndView; + } + /** * ve_prcs_aplct_prd 테이블에 데이터 하나만 변경하는 기능 */ diff --git a/src/main/java/kcc/ve/oprtn/fndtnEnhanceTrn/prcsAplctPrdMng/web/FndthPrcsAplctPrdMngController.java b/src/main/java/kcc/ve/oprtn/fndtnEnhanceTrn/prcsAplctPrdMng/web/FndthPrcsAplctPrdMngController.java index 87c7c7bf..69009cbb 100644 --- a/src/main/java/kcc/ve/oprtn/fndtnEnhanceTrn/prcsAplctPrdMng/web/FndthPrcsAplctPrdMngController.java +++ b/src/main/java/kcc/ve/oprtn/fndtnEnhanceTrn/prcsAplctPrdMng/web/FndthPrcsAplctPrdMngController.java @@ -665,16 +665,6 @@ public class FndthPrcsAplctPrdMngController { @RequestMapping(value = "/kccadr/oprtn/fndthEnhanceTrn/eduAplctExcelDownLoad.do") public ModelAndView eduAplctExcelDownLoad(@ModelAttribute("vEPrcsDetailVO") VEPrcsDetailVO vEPrcsDetailVO, ModelMap model) throws Exception { - //년도 -// if(StringUtils.isBlank(vEEduAplctVO.getSearchYear())){ -// vEEduAplctVO.setSearchYear(String.valueOf(LocalDate.now().getYear())); -// } -// -// //월 -// if(StringUtils.isBlank(vEEduAplctVO.getSearchMonth())){ -// vEEduAplctVO.setSearchMonth(String.valueOf(LocalDate.now().getMonthValue())); -// } - // 요청, 반려건 try { 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 273e314f..38a7d906 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 @@ -320,7 +320,9 @@ D_BIRTH, FLD, LCTR_YN, - PRVS_QS + PRVS_QS, + PHONE, + EMAIL ) VALUES( #eduAplctOrd#, @@ -342,7 +344,9 @@ #dBirth#, #fld#, #lctrYn#, - #prvsQs# + #prvsQs#, + #phone#, + #email# ) WHEN MATCHED THEN UPDATE @@ -386,6 +390,12 @@ ,PRVS_QS = #prvsQs# + + ,PHONE = #phone# + + + ,EMAIL = #email# + diff --git a/src/main/resources/egovframework/sqlmap/ve/edu/VEEdu_MIX_SQL_Tibero.xml b/src/main/resources/egovframework/sqlmap/ve/edu/VEEdu_MIX_SQL_Tibero.xml index d812a0da..163d34f6 100644 --- a/src/main/resources/egovframework/sqlmap/ve/edu/VEEdu_MIX_SQL_Tibero.xml +++ b/src/main/resources/egovframework/sqlmap/ve/edu/VEEdu_MIX_SQL_Tibero.xml @@ -192,7 +192,6 @@ vadi.CNCL_ATCH_FILE_ID AS cnclAtchFileId, vadi.CNCL_CN AS cnclCn, le.MBER_NM AS userNm, - tr.CLPHONE, , CASE WHEN EXISTS (/* 설문조사 */ @@ -214,8 +213,6 @@ /* AND vpap.PRCS_APLCT_PRD_ORD = vadi.PRCS_APLCT_PRD_ORD */ JOIN LETTNGNRLMBER le ON a.USER_ID = le.ESNTL_ID - LEFT JOIN VEA_SSPN_IDMT_TRGT tr ON - a.USER_ID = tr.USER_ID WHERE 1=1 diff --git a/src/main/webapp/WEB-INF/jsp/oprtn/cndtnSspnIdtmt/cndtnEduPrcsAplctPrdMngDetail.jsp b/src/main/webapp/WEB-INF/jsp/oprtn/cndtnSspnIdtmt/cndtnEduPrcsAplctPrdMngDetail.jsp index 63c023a8..c967efd7 100644 --- a/src/main/webapp/WEB-INF/jsp/oprtn/cndtnSspnIdtmt/cndtnEduPrcsAplctPrdMngDetail.jsp +++ b/src/main/webapp/WEB-INF/jsp/oprtn/cndtnSspnIdtmt/cndtnEduPrcsAplctPrdMngDetail.jsp @@ -254,6 +254,13 @@ openPopupAndSubmitForm('cnclPopupForm', 'cnclPopupForm', 700, 380); } + + // 엑셀다운로드 + function excelDownLoad() { + var listForm = document.listForm ; + listForm.action = ""; + listForm.submit(); + } @@ -274,6 +281,7 @@ +
@@ -488,6 +496,8 @@
+ + @@ -498,6 +508,8 @@ + + @@ -522,6 +534,12 @@ + + @@ -563,6 +581,7 @@
+
diff --git a/src/main/webapp/WEB-INF/jsp/web/ve/aplct/sspnIdtmt/eduAplctList.jsp b/src/main/webapp/WEB-INF/jsp/web/ve/aplct/sspnIdtmt/eduAplctList.jsp index a4df23e9..a51eee23 100644 --- a/src/main/webapp/WEB-INF/jsp/web/ve/aplct/sspnIdtmt/eduAplctList.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/ve/aplct/sspnIdtmt/eduAplctList.jsp @@ -198,7 +198,7 @@ $(document).ready(function(){ // 대상자 이름, 생년월일, 대상자TB ID - function fncEduReg(trgtNm, dBirth, sspnIdtmtTrgtOrd){ + /* function fncEduReg(trgtNm, dBirth, sspnIdtmtTrgtOrd){ var form = document.regForm; form.trgtNm.value = trgtNm; form.dBirth.value = dBirth; @@ -230,7 +230,27 @@ $(document).ready(function(){ } }); } + } */ + + function fn_eduRegPopup(trgtNm, dBirth, sspnIdtmtTrgtOrd){ + var data ={ + "prcsAplctPrdOrd": $('#regForm input[name="prcsAplctPrdOrd"]').val() + , "trgtNm" : trgtNm + , "dBirth" : dBirth + , "sspnIdtmtTrgtOrd" :sspnIdtmtTrgtOrd + } + + commonPopLayeropen( + "${pageContext.request.contextPath}/web/ve/aplct/sspnIdtmt/eduAplctPop.do" +// "${pageContext.request.contextPath}/web/ve/aplct/fndtnEnhanceTrn/eduAplctPop.do" + , 800 + , 800 + , data + , "N" + , "eduRegPopup" + ); } + function fn_dayDiff(item){ @@ -358,13 +378,14 @@ $(document).ready(function(){ if(returnData.next == "Y") { //sspnIdtmtTrgtOrd = returnData.id; - fncEduReg(trgtNm, dBirth, returnData.id); +// fncEduReg(trgtNm, dBirth, returnData.id); + fn_eduRegPopup(trgtNm, dBirth, returnData.id); } }else{ alert(returnData.msg); } // fn_target_confirm_clean(); - location.reload(); +// location.reload(); }, error:function(request , status, error){ alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error); diff --git a/src/main/webapp/WEB-INF/jsp/web/ve/aplct/sspnIdtmt/popup/eduAplctPop.jsp b/src/main/webapp/WEB-INF/jsp/web/ve/aplct/sspnIdtmt/popup/eduAplctPop.jsp new file mode 100644 index 00000000..f37ab4cd --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/web/ve/aplct/sspnIdtmt/popup/eduAplctPop.jsp @@ -0,0 +1,269 @@ +<%@ 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="ve" uri="/WEB-INF/tlds/kcc_tld.tld"%> +<%@ taglib prefix="un" uri="http://jakarta.apache.org/taglibs/unstandard-1.0" %> +<%@ taglib prefix="kc" uri="/WEB-INF/tlds/kcc_tld.tld"%> + +교육신청 목록 > 기소유예 찾아가는 저작권 교육 > 한국저작권위원회 저작권 교육 시스템 + + + + + + + + + + + + + + + +
+
신청자이메일핸드폰 신청일 확정여부 교육상태 + + + +
+ + + + + + + + + + + + + + + + <%-- + + + + + + + + + + + + + + + --%> + + + + + + +
신청인정보를 입력하는 표
+

핸드폰

+
+ + +

이메일

+
+ +
+

소속기업

+
+ +
+

분야

+
+ + + + +
+

저작권 교육 수강 여부

+
+ +
+

교육관련 사전질의

+
+ +
+
+
개인정보 처리 동의서
+
+ 한국저작권위원회에서는 귀하의 개인정보를 중요시하며, 개인정보보호법 제15조, 제17조, 제22조, 제23조 및 제24조에 따라 아래와 같이 개인정보 처리에 관하여 동의를 얻고자 합니다.
+										
+ <개인정보 수집 및 이용에 대한 동의 >
+	ο 개인정보의 수집 이용 목적 : 이수증 발급, 이수자 관리
+	ο 수집하는 개인정보 항목 : 성명, 생년월일, 휴대전화, 이메일
+	ο 개인정보의 보유 및 이용기간 : 사업 종료시까지
+	ο 동의를 거부할 권리가 있다는 사실 및 동의 거부에 따른 불이익이 있는 경우에는 그 불이익의 내용 : 귀하의 개인정보 제공 및 동의를 거부할 권리가 있으며, 위 항목 동의 거부시 수강신청 및 이수증 발급이 어려워질 수 있음
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ + +
+
+
+
+ + + + + +
\ No newline at end of file