From e063f9d5985a58618d5fb7b5104df99e1424f041 Mon Sep 17 00:00:00 2001 From: myname Date: Fri, 2 Feb 2024 17:56:02 +0900 Subject: [PATCH] =?UTF-8?q?2024-02-02=2017:54=20=EC=95=8C=EB=A6=BC=20?= =?UTF-8?q?=EA=B8=B0=EB=8A=A5=20=EC=84=B1=EC=9D=B8=20=EC=95=8C=EB=A6=BC=20?= =?UTF-8?q?=EA=B8=B0=EB=8A=A5=20=EC=9D=BC=EB=B6=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kcc/let/main/web/EgovMainController.java | 24 +- .../java/kcc/let/my/web/MyPageController.java | 25 +- .../notify/service/NotifyManageService.java | 3 + .../uss/notify/service/NotifyManageVO.java | 46 +++ .../notify/service/impl/NotifyManageDAO.java | 4 + .../service/impl/NotifyManageServiceImpl.java | 287 +++++++++++++++++- .../impl/EduAplctAdultServiceImpl.java | 28 +- .../eduAplct/web/EduAplctAdultController.java | 1 - src/main/java/kcc/ve/cmm/VeConstants.java | 53 ++++ .../comweb/CommonManageWebController.java | 37 ++- .../pblc/sndMng/web/SndMngController.java | 43 ++- .../ccm/notify/VEANotify_Mng_SQL_Tibero.xml | 14 + .../sym/ccm/notify/VEANotify_SQL_Tibero.xml | 5 +- .../WEB-INF/jsp/main/EgovMainDetail.jsp | 34 ++- .../oprtn/adultVisitEdu/eduAplctMngDetail.jsp | 41 ++- .../adultVisitEdu/eduAsgnmCnfrmMngDetail.jsp | 40 +++ .../WEB-INF/jsp/web/my/myNotifyMngDetail.jsp | 36 ++- 17 files changed, 690 insertions(+), 31 deletions(-) diff --git a/src/main/java/kcc/let/main/web/EgovMainController.java b/src/main/java/kcc/let/main/web/EgovMainController.java index 5cba48a9..160b431c 100644 --- a/src/main/java/kcc/let/main/web/EgovMainController.java +++ b/src/main/java/kcc/let/main/web/EgovMainController.java @@ -51,7 +51,6 @@ import kcc.com.utl.user.service.CheckLoginUtil; import kcc.kccadr.adjPgrMgr.cmm.service.PgrCmmService; import kcc.let.cop.bbs.service.BoardVO; import kcc.let.cop.bbs.service.EgovBBSManageService; -import kcc.let.sts.com.StatsVO; import kcc.let.sts.cst.service.EgovConectStatsService; import kcc.let.sym.log.clg.service.EgovLoginLogService; import kcc.let.sym.log.clg.service.LoginLog; @@ -66,7 +65,6 @@ import kcc.let.uss.notify.service.NotifyManageService; import kcc.let.uss.notify.service.NotifyManageVO; import kcc.let.uss.olp.qmc.service.EgovQustnrManageService; import kcc.let.uss.umt.service.EgovUserManageService; -import kcc.let.uss.umt.service.UserDefaultVO; /** * 템플릿 메인 페이지 컨트롤러 클래스(Sample 소스) @@ -171,6 +169,28 @@ public class EgovMainController { // model.addAttribute("info", result); + + try { + //세부과정 목록 조회 + String[] a_params = result.getParams().split(","); + + List notifyParamList = new ArrayList(); + + for (int i=0;i notifyParamList = new ArrayList(); + + for (int i=0;i) list("VEANotifyMngDAO.selectMngPagingList", notifyManageVO); } + public List selectInstrList(NotifyManageVO notifyManageVO) { + return (List) list("VEANotifyMngDAO.selectInstrList", notifyManageVO); + } + public void mngInsert(NotifyManageVO notifyManageVO) { insert("VEANotifyMngDAO.mngInsert", notifyManageVO); } diff --git a/src/main/java/kcc/let/uss/notify/service/impl/NotifyManageServiceImpl.java b/src/main/java/kcc/let/uss/notify/service/impl/NotifyManageServiceImpl.java index 56893fcc..9aadfc08 100644 --- a/src/main/java/kcc/let/uss/notify/service/impl/NotifyManageServiceImpl.java +++ b/src/main/java/kcc/let/uss/notify/service/impl/NotifyManageServiceImpl.java @@ -4,7 +4,6 @@ import java.util.List; import javax.annotation.Resource; -import org.apache.ibatis.javassist.compiler.ast.Symbol; import org.springframework.stereotype.Service; import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl; @@ -66,6 +65,9 @@ public class NotifyManageServiceImpl extends EgovAbstractServiceImpl implements @Override public NotifyManageVO findById(NotifyManageVO notifyManageVO) { + //체크 + notifyManageDAO.updateNotifyChkWhereCmmNotifyOrd(notifyManageVO.getCmmNotifyOrd()); + return notifyManageDAO.findById(notifyManageVO); } @@ -158,14 +160,44 @@ public class NotifyManageServiceImpl extends EgovAbstractServiceImpl implements @Override public void insertNotifyAprvlCdForUser(LoginVO loginVO, String eduAplctOrd, String lctrDivCd, String aprvlCd) throws FdlException { - + /* + * + * 현재 페이지 생성 + * CMM_NOTIFY_ORD VARCHAR(20), - pk 값 idgen 생성 + * NOTIFY_CHK VARCHAR(6), - Y/N - 확인여부 + * TO_USER_ID VARCHAR(20), - noti 대상자 정보 + NOTIFY_PATH VARCHAR(200), - 관련화면 URL + USE_YN VARCHAR(2) - 사용여부 Y/N + NOTIFY_CN VARCHAR(2000), - noti 내용 + + 전달받을 내용 + NOTIFY_CN VARCHAR(2000), - noti 내용 + LCTR_DIV_CD VARCHAR(6), - 강의구분(VE0011) 10-청소년, 20-성인, 30-체험교실, 50-실무, 60-기소유예 + + PARAMS VARCHAR(1000) - 파라미터들 ex)edu_aplct_ord:edu_001,edu_chasi_ord:edu_cha_001 + EDU_APLCT_ORD VARCHAR(20), - 신청순번 + EDU_CHASI_ORD VARCHAR(20), - 차시순번 + + FRST_REGISTER_ID VARCHAR(20), - 최조등록자 + LAST_UPDUSR_ID VARCHAR(20), - 최종수정자 + + + DB에서 생성 + FRST_REGIST_PNTTM TIMESTAMP(6), - 최조등록일 + LAST_UPDT_PNTTM TIMESTAMP(6), - 최종수정일 + CMPLT_YN VARCHAR(2), - 미사용(?) + + */ // 상태 변경된 교육의 USERID 가져오기 NotifyManageVO notifyManageVO = new NotifyManageVO(); - // 교육 담당자 조회 - 노티 받을 대상 - notifyManageVO.setToUserId(notifyManageDAO.findByUserIdFromVE_EDU_APLCT(eduAplctOrd)); + // pk notifyManageVO.setCmmNotifyOrd(veaCmmNotifyOrdGnrService.getNextStringId()); + // 교육 담당자 조회 - 노티 받을 대상 + notifyManageVO.setToUserId(notifyManageDAO.findByUserIdFromVE_EDU_APLCT(eduAplctOrd)); + + notifyManageVO.setLctrDivCd(lctrDivCd); // 청소년 , 성인 , 기소 , 기반 공통코드로 test 추출 @@ -406,4 +438,251 @@ public class NotifyManageServiceImpl extends EgovAbstractServiceImpl implements notifyManageDAO.updateChkedUseYnN(notifyManageVO); } + + // 관리자가 사용자 신청 값을 수정하면 알림 등록 + //통합 버전 + @Override + public void insertNotifyNew( + NotifyManageVO p_notifyManageVO + , String p_noti_status + // 알림상태값 10-교육신청, 11-교육상태변경, 12-교육문자발송, 13-교육메일발송 + // 20-교육배치, 21-수락요청, 22-교육수락, 23-교육거절, 24-변경요청, + // 100-교육확정, 101-교육문자발송, 102-교육메일발송 + // 30-강의계획서, 31-강의계획서제출 + // 40-강사참석확인서, 41-강사참석확인서 제출 + // 50-결과보고서 , 51-결과보고서 제출 + // 60-강의만족도 61-강의만족도제출요청 , 62-강의만족도제출 + // 70-강사활동확인서, 71-강사활동확인서 신청, 72-강사활동확인서 승인 + // 80-정보수정, 81-정보수정요청, 82-정보수정승인 + // 90-교육문의, 91-교육문의건, 92교육문의 답변 + ) throws FdlException { + + /* + * + 전달받을 내용 + NOTIFY_CN VARCHAR(2000), - noti 내용 + LCTR_DIV_CD VARCHAR(6), - 강의구분(VE0011) 10-청소년, 20-성인, 30-체험교실, 50-실무, 60-기소유예 + PARAMS VARCHAR(1000) - 파라미터들 ex)edu_aplct_ord:edu_001,edu_chasi_ord:edu_cha_001 + EDU_APLCT_ORD VARCHAR(20), - 신청순번 + EDU_CHASI_ORD VARCHAR(20), - 차시순번 + FRST_REGISTER_ID VARCHAR(20), - 최조등록자 + LAST_UPDUSR_ID VARCHAR(20), - 최종수정자 + + + 현재 페이지 생성 + CMM_NOTIFY_ORD VARCHAR(20), - pk 값 idgen 생성 + NOTIFY_CHK VARCHAR(6), - Y/N - 확인여부 + USE_YN VARCHAR(2) - 사용여부 Y/N + NOTIFY_PATH VARCHAR(200), - 관련화면 URL + NOTIFY_CN VARCHAR(2000), - noti 내용 + + TO_USER_ID VARCHAR(20), - noti 대상자 정보 + + + DB에서 생성 + FRST_REGIST_PNTTM TIMESTAMP(6), - 최조등록일 + LAST_UPDT_PNTTM TIMESTAMP(6), - 최종수정일 + CMPLT_YN VARCHAR(2), - 미사용(?) + + */ + // 상태 변경된 교육의 USERID 가져오기 + //NotifyManageVO notifyManageVO = new NotifyManageVO(); + + //현재 페이지 생성 + // pk + p_notifyManageVO.setCmmNotifyOrd(veaCmmNotifyOrdGnrService.getNextStringId()); + + p_notifyManageVO.setNotifyChk("N"); //Y/N - 확인여부 + p_notifyManageVO.setUseYn("Y"); //Y/N - 사용여부(삭제와 같음) + + String s_lctrDivCd = p_notifyManageVO.getLctrDivCd(); + p_notifyManageVO.setNotifyPath( + this._makeNotifyPath(s_lctrDivCd, p_noti_status) + ); //- 관련화면 URL + + p_notifyManageVO.setNotifyCn( + this._makeNotifyCn(s_lctrDivCd, p_noti_status) + ); //- noti 내용 + + + //notifyManageVO.setEduAplctOrd(eduAplctOrd); + //notifyManageVO.setFrstRegisterId(loginVO.getUniqId()); + + // 교육 담당자 조회 - 노티 받을 대상 + //notifyManageVO.setToUserId(notifyManageDAO.findByUserIdFromVE_EDU_APLCT(eduAplctOrd)); + //notifyManageDAO.insertNotifyInfo(p_notifyManageVO); + this._findToUserIdNInsertNoti(p_notifyManageVO, s_lctrDivCd, p_noti_status); + } + + //알림 링크 정보 만들기 + private String _makeNotifyPath( + String p_lctrDivCd + , String p_noti_status + // 알림상태값 10-교육신청, 11-교육상태변경, 12-교육문자발송, 13-교육메일발송 + // 20-교육배치, 21-수락요청, 22-교육수락, 23-교육거절, 24-변경요청, + // 100-교육확정, 101-교육문자발송, 102-교육메일발송 + // + // 30-강의계획서, 31-강의계획서제출 + // 40-강사참석확인서, 41-강사참석확인서 제출 + // 50-결과보고서 , 51-결과보고서 제출 + // 60-강의만족도 61-강의만족도제출요청 , 62-강의만족도제출 + // 70-강사활동확인서, 71-강사활동확인서 신청, 72-강사활동확인서 승인 + // 80-정보수정, 81-정보수정요청, 82-정보수정승인 + // 90-교육문의, 91-교육문의건, 92교육문의 답변 + ) throws FdlException{ + + String notifyPath = ""; + + if( "10".equals(p_lctrDivCd) ) { //청소년 + notifyPath = "/web/ve/aplct/tngrVisitEdu/eduAplct/eduAplctDetail.do"; + } + else if( "20".equals(p_lctrDivCd) ) { //성인 + if ("10".equals(p_noti_status)) { + notifyPath = "/kccadr/oprtn/adultVisitEdu/eduAplctMngDetail.do"; //운영자 - 교육신청관리 - 상세 + }else if ( + "11".equals(p_noti_status) + /* + ||"12".equals(p_noti_status) 문자 & 메일은 이동 대상 페이지 없음 + ||"13".equals(p_noti_status) + */ + ) { + notifyPath = "/web/ve/aplct/adultVisitEdu/eduAplct/eduAplctDetail.do"; //사용자 - 교육신청목록 - 상세 + } + + + } + else if( "30".equals(p_lctrDivCd) ) { //체험 + notifyPath = "/web/ve/aplct/cpyrgExprnClsrm/exprnClsrmInfo/exprnClsrmAplctDetail.do"; + } + else if( "50".equals(p_lctrDivCd) ) { //실무 + notifyPath = "/web/ve/aplct/cpyrgExprnClsrm/exprnClsrmInfo/exprnClsrmAplctDetail.do"; + } + else if( "60".equals(p_lctrDivCd) ) { //기소유예 + notifyPath = "/web/ve/aplct/cpyrgExprnClsrm/exprnClsrmInfo/exprnClsrmAplctDetail.do"; + } + + return notifyPath; + } + + //알림 대상자 찾기 및 알림 Insert + private void _findToUserIdNInsertNoti( + NotifyManageVO p_notifyManageVO + , String p_lctrDivCd + , String p_noti_status + )throws FdlException{ + + //담당자 처리 + // 교육 담당자 조회 - 노티 받을 대상 + List notifyManageListVO = null; //관리자 조회용 배열 + + + if( "10".equals(p_lctrDivCd) ) { //청소년 + if ("10".equals(p_noti_status)) { + + + }else if ("11".equals(p_noti_status)) { + + } + + + }else if( "20".equals(p_lctrDivCd) ) { //성인 + if ("10".equals(p_noti_status)) { //10-교육신청 + //담당 관리자에게 모두 알림 + p_notifyManageVO.setFirstIndex(0); + p_notifyManageVO.setRecordCountPerPage(1000); + // 담당자 조회 + notifyManageListVO = notifyManageDAO.selectMngPagingList(p_notifyManageVO); + + }else if ( + "11".equals(p_noti_status) + ||"12".equals(p_noti_status) + ||"13".equals(p_noti_status) + ) { //11-교육상태변경, 12-교육문자발송, 13-교육메일발송 + //해당 신청자에게 알림 + p_notifyManageVO.setToUserId(notifyManageDAO.findByUserIdFromVE_EDU_APLCT(p_notifyManageVO.getEduAplctOrd())); + + }else if ( + "21".equals(p_noti_status) //수락요청 + ||"100".equals(p_noti_status) //교육확정 + ) { + // 강사 ID 가져오기 + notifyManageListVO = notifyManageDAO.selectInstrList(p_notifyManageVO); + + } + } + + //담당자 처리 및 알림 DB 등록 + { + //관리자 배열에 값이 있으면 해당 대상자들에게 알림 등록 + if (notifyManageListVO==null) { + //신청자에게 알림을 등록한다. + p_notifyManageVO.setToUserId(notifyManageDAO.findByUserIdFromVE_EDU_APLCT(p_notifyManageVO.getEduAplctOrd())); + notifyManageDAO.insertNotifyInfo(p_notifyManageVO); + + }else { + //관리자/또는 강사 대상이 있는 경우는 해당 대상자들에게 알림을 등록한다. + for(NotifyManageVO vo : notifyManageListVO) { + p_notifyManageVO.setToUserId(vo.getMngUserId()); + notifyManageDAO.insertNotifyInfo(p_notifyManageVO); + + p_notifyManageVO.setCmmNotifyOrd(veaCmmNotifyOrdGnrService.getNextStringId()); + } + } + } + + //notifyManageDAO.insertNotifyInfo(p_notifyManageVO); + } + + //알림 내용 만들기 + private String _makeNotifyCn( + String p_lctrDivCd + , String p_noti_status + // 알림상태값 10-교육신청, 11-교육상태변경, 12-교육문자발송, 13-교육메일발송 + // 20-교육배치, 21-수락요청, 22-교육수락, 23-교육거절, 24-변경요청, + // 100-교육확정, 101-교육문자발송, 102-교육메일발송 + // 30-강의계획서, 31-강의계획서제출 + // 40-강사참석확인서, 41-강사참석확인서 제출 + // 50-결과보고서 , 51-결과보고서 제출 + // 60-강의만족도 61-강의만족도제출요청 , 62-강의만족도제출 + // 70-강사활동확인서, 71-강사활동확인서 신청, 72-강사활동확인서 승인 + // 80-정보수정, 81-정보수정요청, 82-정보수정승인 + // 90-교육문의, 91-교육문의건, 92교육문의 답변 + ) throws FdlException{ + + String notifyCn = ""; + + // 청소년 , 성인 , 기소 , 기반 공통코드로 test 추출 + //String lctrDivNm = this.getCodeNm(p_lctrDivCd, "VE0011"); + + if( "10".equals(p_lctrDivCd) ) { //청소년 + if ("10".equals(p_noti_status)) { + notifyCn = "신규 교육신청 건이 있습니다."; + + }else if ("11".equals(p_noti_status)) { + notifyCn = "교육 상태가 변경 되었습니다."; + } + } + else if( "20".equals(p_lctrDivCd) ) { //성인 + if ("10".equals(p_noti_status)) { + notifyCn = "신규 교육신청 건이 있습니다."; + }else if ("11".equals(p_noti_status)) { + notifyCn = "교육 상태가 변경 되었습니다."; + }else if ("12".equals(p_noti_status)) { + notifyCn = "교육 문자 발송되었습니다."; + }else if ("13".equals(p_noti_status)) { + notifyCn = "교육 메일 발송되었습니다."; + } + } + else if( "30".equals(p_lctrDivCd) ) { //체험 + notifyCn = "/web/ve/aplct/cpyrgExprnClsrm/exprnClsrmInfo/exprnClsrmAplctDetail.do"; + } + else if( "50".equals(p_lctrDivCd) ) { //실무 + notifyCn = "/web/ve/aplct/cpyrgExprnClsrm/exprnClsrmInfo/exprnClsrmAplctDetail.do"; + } + else if( "60".equals(p_lctrDivCd) ) { //기소유예 + notifyCn = "/web/ve/aplct/cpyrgExprnClsrm/exprnClsrmInfo/exprnClsrmAplctDetail.do"; + } + + return notifyCn; + } } diff --git a/src/main/java/kcc/ve/aplct/adultVisitEdu/eduAplct/service/impl/EduAplctAdultServiceImpl.java b/src/main/java/kcc/ve/aplct/adultVisitEdu/eduAplct/service/impl/EduAplctAdultServiceImpl.java index 33a22a6c..77e1cb82 100644 --- a/src/main/java/kcc/ve/aplct/adultVisitEdu/eduAplct/service/impl/EduAplctAdultServiceImpl.java +++ b/src/main/java/kcc/ve/aplct/adultVisitEdu/eduAplct/service/impl/EduAplctAdultServiceImpl.java @@ -17,6 +17,7 @@ import kcc.com.cmm.service.FileVO; import kcc.com.utl.user.service.CheckFileUtil; import kcc.com.utl.user.service.CheckLoginUtil; import kcc.let.uss.notify.service.NotifyManageService; +import kcc.let.uss.notify.service.NotifyManageVO; import kcc.let.utl.fcc.service.EgovCryptoUtil; import kcc.ve.aplct.adultVisitEdu.eduAplct.service.EduAplctAdultService; import kcc.ve.cmm.VeConstants; @@ -167,8 +168,33 @@ public class EduAplctAdultServiceImpl implements EduAplctAdultService { eduChasiOrdList.add(eduChasiOrd); } + // 성인 교육 신청 성공시 노티 insert - notifyManageService.insertNotifyEduForAdmin(loginVO, eduAplctOrd, eduChasiOrdList, vEEduAplctVO.getLctrDivCd()); + //notifyManageService.insertNotifyEduForAdmin(loginVO, eduAplctOrd, eduChasiOrdList, vEEduAplctVO.getLctrDivCd()); + + try{ + //LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); //권한에 따른 로그인 정보 가져오기 + + //new - 2024.02.02 + NotifyManageVO notifyManageVO = new NotifyManageVO(); + notifyManageVO.setLctrDivCd(vEEduAplctVO.getLctrDivCd()); //VE0008 10-청소년, 20-성인,30-체험,50-실무,60-기수 + notifyManageVO.setFrstRegisterId(loginVO.getUniqId()); //등록자 정보 + + //페이지 이동에 필요한 파라미터 설정 + notifyManageVO.setParams( + "eduAplctOrd:"+vEEduAplctVO.getEduAplctOrd() + //+",eduChasiOrd:"+vEEduAplctVO.getEduChasiOrd() + ); //ex)edu_aplct_ord:edu_001,edu_chasi_ord:edu_cha_001 + + //알림 대상자 선정에 필요한 파라미터 설정 + notifyManageVO.setEduAplctOrd(vEEduAplctVO.getEduAplctOrd()); + + //new 알림-2024.02.02 + notifyManageService.insertNotifyNew(notifyManageVO, VeConstants.NOTI_STATUS_10); //교육신청 - 상태변경 + + }catch(Exception ex){ + ex.printStackTrace(); + } return true; diff --git a/src/main/java/kcc/ve/aplct/adultVisitEdu/eduAplct/web/EduAplctAdultController.java b/src/main/java/kcc/ve/aplct/adultVisitEdu/eduAplct/web/EduAplctAdultController.java index 6b628647..5668a10a 100644 --- a/src/main/java/kcc/ve/aplct/adultVisitEdu/eduAplct/web/EduAplctAdultController.java +++ b/src/main/java/kcc/ve/aplct/adultVisitEdu/eduAplct/web/EduAplctAdultController.java @@ -246,7 +246,6 @@ public class EduAplctAdultController { modelAndView.addObject("result", "fail"); return modelAndView; } - modelAndView.addObject("VO", vEEduAplctVO); modelAndView.addObject("result", "success"); diff --git a/src/main/java/kcc/ve/cmm/VeConstants.java b/src/main/java/kcc/ve/cmm/VeConstants.java index df60acf0..412093fe 100644 --- a/src/main/java/kcc/ve/cmm/VeConstants.java +++ b/src/main/java/kcc/ve/cmm/VeConstants.java @@ -127,4 +127,57 @@ public class VeConstants { public static final String EXPRN_APRVL_CD_80 = "80"; // 운영종료 + /* + , String p_noti_status //알림상태값 10-교육신청, 11-교육상태변경, 12-교육문자발송, 13-교육메일발송 + // 20-교육배치, 21-수락요청, 22-교육수락, 23-교육거절, 24-변경요청, + * 100-교육확정, 101-교육문자발송, 102-교육메일발송 + // 30-강의계획서, 31-강의계획서제출 + // 40-강사참석확인서, 41-강사참석확인서 제출 + // 50-결과보고서 , 51-결과보고서 제출 + // 60-강의만족도 61-강의만족도제출요청 , 62-강의만족도제출 + // 70-강사활동확인서, 71-강사활동확인서 신청, 72-강사활동확인서 승인 + // 80-정보수정, 81-정보수정요청, 82-정보수정승인 + // 90-교육문의, 91-교육문의건, 92교육문의 답변 + * + */ + public static final String NOTI_STATUS_10 = "10"; // 교육신청 + public static final String NOTI_STATUS_11 = "11"; // 교육상태변경 + public static final String NOTI_STATUS_12 = "12"; // 교육문자발송 + public static final String NOTI_STATUS_13 = "13"; // 교육메일발송 + + public static final String NOTI_STATUS_20 = "20"; // 교육배치 + public static final String NOTI_STATUS_21 = "21"; // 수락요청 + public static final String NOTI_STATUS_22 = "22"; // 교육수락 + public static final String NOTI_STATUS_23 = "23"; // 교육거절 + public static final String NOTI_STATUS_24 = "24"; // 변경요청 + + public static final String NOTI_STATUS_100 = "100"; // 교육확정 + public static final String NOTI_STATUS_101 = "101"; // 교육문자발송 + public static final String NOTI_STATUS_102 = "102"; // 교육메일발송 + + public static final String NOTI_STATUS_30 = "30"; // 강의계획서 + public static final String NOTI_STATUS_31 = "31"; // 강의계획서제출 + + public static final String NOTI_STATUS_40 = "40"; // 강사참석확인서 + public static final String NOTI_STATUS_41 = "41"; // 강사참석확인서제출 + + public static final String NOTI_STATUS_50 = "50"; // 결과보고서 + public static final String NOTI_STATUS_51 = "51"; // 결과보고서제출 + + public static final String NOTI_STATUS_60 = "60"; // 강의만족도 + public static final String NOTI_STATUS_61 = "61"; // 강의만족도제출요청 + public static final String NOTI_STATUS_62 = "62"; // 강의만족도제출 + + public static final String NOTI_STATUS_70 = "70"; // 강사활동확인서 + public static final String NOTI_STATUS_71 = "71"; // 강사활동확인서 신청 + public static final String NOTI_STATUS_72 = "72"; // 강사활동확인서 승인 + + public static final String NOTI_STATUS_80 = "80"; // 정보수정 + public static final String NOTI_STATUS_81 = "81"; // 정보수정 요청 + public static final String NOTI_STATUS_82 = "82"; // 정보수정 승인 + + public static final String NOTI_STATUS_90 = "90"; // 교육문의 + public static final String NOTI_STATUS_91 = "91"; // 교육문의건 + public static final String NOTI_STATUS_92 = "92"; // 교육문의답변 + } diff --git a/src/main/java/kcc/ve/oprtn/comweb/CommonManageWebController.java b/src/main/java/kcc/ve/oprtn/comweb/CommonManageWebController.java index a993409c..074afb64 100644 --- a/src/main/java/kcc/ve/oprtn/comweb/CommonManageWebController.java +++ b/src/main/java/kcc/ve/oprtn/comweb/CommonManageWebController.java @@ -24,6 +24,7 @@ import kcc.ve.adv.tngr.stngInfo.service.VEAStngVO; import kcc.ve.aplct.cpyrgExprnClsrm.exprnClsrmAplct.service.ScholInfoMIXService; import kcc.ve.aplct.cpyrgExprnClsrm.exprnClsrmAplct.service.ScholInfoService; import kcc.ve.aplct.cpyrgExprnClsrm.exprnClsrmAplct.service.ScholInfoVO; +import kcc.ve.cmm.VeConstants; import kcc.ve.cmm.VeSendMail; import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctService; import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctSndHstryService; @@ -70,6 +71,7 @@ public class CommonManageWebController { private VEAStngService vEAStngService; + //알림 @Resource(name = "NotifyManageService") private NotifyManageService notifyManageService; @@ -167,7 +169,9 @@ public class CommonManageWebController { vEEduAplctSndHstryService.insert(vEEduAplctVO); } } - + + System.out.println("=========알림 insert"); + System.out.println(vEEduAplctVO.getLctrDivCd()); // 알림 insert if( "10".equals(vEEduAplctVO.getLctrDivCd()) @@ -175,7 +179,36 @@ public class CommonManageWebController { || "30".equals(vEEduAplctVO.getLctrDivCd()) ) { - notifyManageService.insertNotifyAprvlCdForUser(loginVO, vEEduAplctVO.getEduAplctOrd(), vEEduAplctVO.getLctrDivCd(), vEEduAplctVO.getAprvlCd()); + //old + //notifyManageService.insertNotifyAprvlCdForUser(loginVO, vEEduAplctVO.getEduAplctOrd(), vEEduAplctVO.getLctrDivCd(), vEEduAplctVO.getAprvlCd()); + + try { + //new - 2024.02.02 + NotifyManageVO notifyManageVO = new NotifyManageVO(); + notifyManageVO.setLctrDivCd(vEEduAplctVO.getLctrDivCd()); //VE0008 10-청소년, 20-성인,30-체험,50-실무,60-기수 + notifyManageVO.setFrstRegisterId(loginVO.getUniqId()); //등록자 정보 + + if( "10".equals(vEEduAplctVO.getLctrDivCd()) //청소년 + ||"20".equals(vEEduAplctVO.getLctrDivCd()) //성인 + ){ + + //페이지 이동에 필요한 파라미터 설정 + notifyManageVO.setParams( + "eduAplctOrd:"+vEEduAplctVO.getEduAplctOrd() + //+",eduChasiOrd:"+vEEduAplctVO.getEduChasiOrd() + ); //ex)edu_aplct_ord:edu_001,edu_chasi_ord:edu_cha_001 + + //알림 대상자 선정에 필요한 파라미터 설정 + notifyManageVO.setEduAplctOrd(vEEduAplctVO.getEduAplctOrd()); + } + + //new 알림-2024.02.02 + notifyManageService.insertNotifyNew(notifyManageVO, VeConstants.NOTI_STATUS_11); //교육신청 - 상태변경 + + }catch(Exception ex) { + ex.printStackTrace(); + } + } modelAndView.addObject("rsCnt", rs); diff --git a/src/main/java/kcc/ve/oprtn/pblc/sndMng/web/SndMngController.java b/src/main/java/kcc/ve/oprtn/pblc/sndMng/web/SndMngController.java index c5eb90eb..46ba691b 100644 --- a/src/main/java/kcc/ve/oprtn/pblc/sndMng/web/SndMngController.java +++ b/src/main/java/kcc/ve/oprtn/pblc/sndMng/web/SndMngController.java @@ -30,7 +30,10 @@ import kcc.kccadr.kccadrCom.service.KccadrMgrUdtService; import kcc.let.sym.ccm.cde.service.EgovCcmCmmnDetailCodeManageService; import kcc.let.uss.ion.cnt.service.CntManageVO; import kcc.let.uss.ion.cnt.service.EgovCntManageService; +import kcc.let.uss.notify.service.NotifyManageService; +import kcc.let.uss.notify.service.NotifyManageVO; import kcc.let.utl.fcc.service.EgovCryptoUtil; +import kcc.ve.cmm.VeConstants; import kcc.ve.cmm.VeSendMail; import kcc.ve.cmm.VeSendSMS; import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEAsgnmMIXService; @@ -184,6 +187,10 @@ public class SndMngController { @Resource(name = "egovCntManageService") private EgovCntManageService egovCntManageService; + //알림 + @Resource(name = "NotifyManageService") + private NotifyManageService notifyManageService; + /** * 오라클 연동 테스트 */ @@ -586,7 +593,41 @@ public class SndMngController { modelAndView.addObject("result", result); modelAndView.addObject("message", message); return modelAndView; - } + } + + //알림 등록 from web 페이지 + @RequestMapping(value="notifyRegAjax.do") + public ModelAndView notifyRegAjax( + VEEduAplctVO vEEduAplctVO + ) throws Exception { + + ModelAndView modelAndView = new ModelAndView(); + modelAndView.setViewName("jsonView"); + + //권한에 따른 로그인 정보 가져오기 + LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); + + //new - 2024.02.02 + NotifyManageVO notifyManageVO = new NotifyManageVO(); + notifyManageVO.setLctrDivCd(vEEduAplctVO.getLctrDivCd()); //VE0008 10-청소년, 20-성인,30-체험,50-실무,60-기수 + notifyManageVO.setFrstRegisterId(loginVO.getUniqId()); //등록자 정보 + + //알림 대상자 선정에 필요한 파라미터 설정 + notifyManageVO.setEduAplctOrd(vEEduAplctVO.getEduAplctOrd()); + + //new 알림-2024.02.02 + if ("10".equals(vEEduAplctVO.getSndCd())) { + notifyManageService.insertNotifyNew(notifyManageVO, VeConstants.NOTI_STATUS_12); //교육신청 - sms 발송 + }else if ("20".equals(vEEduAplctVO.getSndCd())) { + notifyManageService.insertNotifyNew(notifyManageVO, VeConstants.NOTI_STATUS_13); //교육신청 - email 발송 + } + + + String result = "success"; + modelAndView.addObject("result", result); + + return modelAndView; + } ////////////////////////////////////////////////////////////////////////////////////////////////////////////// // diff --git a/src/main/resources/egovframework/sqlmap/let/sym/ccm/notify/VEANotify_Mng_SQL_Tibero.xml b/src/main/resources/egovframework/sqlmap/let/sym/ccm/notify/VEANotify_Mng_SQL_Tibero.xml index bc4427e5..1bfc4db6 100644 --- a/src/main/resources/egovframework/sqlmap/let/sym/ccm/notify/VEANotify_Mng_SQL_Tibero.xml +++ b/src/main/resources/egovframework/sqlmap/let/sym/ccm/notify/VEANotify_Mng_SQL_Tibero.xml @@ -55,6 +55,20 @@ OFFSET #firstIndex# ROWS FETCH NEXT #recordCountPerPage# ROWS ONLY; + + + + +
@@ -97,13 +113,15 @@ ${info.notifyCn } - - 바로가기 - - - - - + + + 바로가기 + + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/oprtn/adultVisitEdu/eduAplctMngDetail.jsp b/src/main/webapp/WEB-INF/jsp/oprtn/adultVisitEdu/eduAplctMngDetail.jsp index c47b8d27..4f9a4e0b 100644 --- a/src/main/webapp/WEB-INF/jsp/oprtn/adultVisitEdu/eduAplctMngDetail.jsp +++ b/src/main/webapp/WEB-INF/jsp/oprtn/adultVisitEdu/eduAplctMngDetail.jsp @@ -251,6 +251,10 @@ success:function(returnData){ if(returnData.result == "success"){ + fncNotiReg( + "${pageContext.request.contextPath}/kccadr/oprtn/pblc/notifyRegAjax.do" + , p_cd + ); alert(returnData.message); }else{ alert(returnData.message); @@ -263,7 +267,42 @@ } - + + //알림 등록용 함수-문자,메일 중 요청한 곳에만 추가한다. + function fncNotiReg(p_url, p_cd){ + + $.ajax({ + type: "POST", + // enctype: 'multipart/form-data', + url:p_url, + //data: data, + data:{ + "eduAplctOrd" : $("#eduAplctOrd").val(), + "sndCd": p_cd, + "lctrDivCd" : '20', + }, + dataType:'json', + /* + async: false, + processData: false, + contentType: false, + cache: false, + */ + + success:function(returnData){ + if(returnData.result == "success"){ + //alert(returnData.message); + }else{ + //alert(returnData.message); + } + }, + error:function(request , status, error){ + //alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error); + } + }); + + + } //성공 발송 function fncCfnContent(p_url, p_sndCd, p_sndFlag){ diff --git a/src/main/webapp/WEB-INF/jsp/oprtn/adultVisitEdu/eduAsgnmCnfrmMngDetail.jsp b/src/main/webapp/WEB-INF/jsp/oprtn/adultVisitEdu/eduAsgnmCnfrmMngDetail.jsp index 4a014ae6..4704b944 100644 --- a/src/main/webapp/WEB-INF/jsp/oprtn/adultVisitEdu/eduAsgnmCnfrmMngDetail.jsp +++ b/src/main/webapp/WEB-INF/jsp/oprtn/adultVisitEdu/eduAsgnmCnfrmMngDetail.jsp @@ -184,6 +184,10 @@ success:function(returnData){ if(returnData.result == "success"){ + fncNotiReg( + "${pageContext.request.contextPath}/kccadr/oprtn/pblc/notifyRegAjax.do" + , p_cd + ); alert(returnData.message); }else{ alert(returnData.message); @@ -196,6 +200,42 @@ } + + //알림 등록용 함수-문자,메일 중 요청한 곳에만 추가한다. + function fncNotiReg(p_url, p_cd){ + + $.ajax({ + type: "POST", + // enctype: 'multipart/form-data', + url:p_url, + //data: data, + data:{ + "eduAplctOrd" : $("#eduAplctOrd").val(), + "sndCd": p_cd, + "lctrDivCd" : '20', + }, + dataType:'json', + /* + async: false, + processData: false, + contentType: false, + cache: false, + */ + + success:function(returnData){ + if(returnData.result == "success"){ + //alert(returnData.message); + }else{ + //alert(returnData.message); + } + }, + error:function(request , status, error){ + //alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error); + } + }); + + + } function reloadLinkPage(){ $("#btnDstnc").show(); diff --git a/src/main/webapp/WEB-INF/jsp/web/my/myNotifyMngDetail.jsp b/src/main/webapp/WEB-INF/jsp/web/my/myNotifyMngDetail.jsp index c3bbc432..2bf9624a 100644 --- a/src/main/webapp/WEB-INF/jsp/web/my/myNotifyMngDetail.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/my/myNotifyMngDetail.jsp @@ -36,7 +36,13 @@ function fn_goDetail(url, lctrDivCd){ - + + form = document.moveForm ; + form.action = url; + console.log(url); + form.submit(); + + /* var form = ''; if(lctrDivCd == '50' || lctrDivCd == '60') { @@ -53,10 +59,17 @@ form.action = url; console.log(url); form.submit(); + */ } + + + + +
+
@@ -107,14 +120,19 @@ ${info.notifyCn } - - 바로가기 - -
- -
- - + + + + 바로가기 + +
+ +
+ + + +
+