diff --git a/src/main/java/kcc/ve/instr/adultVisitEdu/asgnmInfo/web/VEAdultAsgnmController.java b/src/main/java/kcc/ve/instr/adultVisitEdu/asgnmInfo/web/VEAdultAsgnmController.java index 9cd6b91e..de49013b 100644 --- a/src/main/java/kcc/ve/instr/adultVisitEdu/asgnmInfo/web/VEAdultAsgnmController.java +++ b/src/main/java/kcc/ve/instr/adultVisitEdu/asgnmInfo/web/VEAdultAsgnmController.java @@ -16,13 +16,16 @@ import org.springframework.web.multipart.MultipartHttpServletRequest; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.support.RedirectAttributes; +import egovframework.rte.fdl.idgnr.EgovIdGnrService; import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; +import kcc.com.cmm.ComDefaultVO; import kcc.com.cmm.EgovMessageSource; import kcc.com.cmm.LoginVO; import kcc.com.cmm.service.EgovFileMngService; import kcc.com.cmm.service.EgovFileMngUtil; import kcc.com.cmm.service.FileVO; import kcc.com.cmm.util.IpUtil; +import kcc.com.cmm.util.StringUtil; import kcc.com.utl.user.service.CheckLoginUtil; import kcc.let.uat.uia.service.SsoLoginVO; import kcc.let.utl.fcc.service.EgovCryptoUtil; @@ -36,6 +39,7 @@ import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEInstrFeeAcmdtVO; import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEInstrFeeService; import kcc.ve.instr.tngrVisitEdu.instrInfo.service.VEInstrDetailService; import kcc.ve.instr.tngrVisitEdu.instrInfo.service.VEInstrDetailVO; +import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsAplctPrdService; import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsDetailVO; import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsService; import kcc.ve.oprtn.asgnmnoti.service.VEAsgnmNotiService; @@ -93,12 +97,20 @@ public class VEAdultAsgnmController { //NOTI 서비스 @Resource(name="vEAsgnmNotiService") private VEAsgnmNotiService vEAsgnmNotiService; - + + //과정차시 관리 + @Resource(name = "vEPrcsAplctPrdService") + private VEPrcsAplctPrdService vEPrcsAplctPrdService; + + //강의교환 + @Resource(name="veaLctrExchnOrdGnrService") + private EgovIdGnrService veaLctrExchnOrdGnrService; + + //성인강사 강의 요청 목록 @RequestMapping("/web/ve/instr/adultVisitEdu/asgnmInfo/instrAsgnmRqstList.do") public String instrAsgnmRqstList( @ModelAttribute("vEInstrAsgnmVO") VEInstrAsgnmVO vEInstrAsgnmVO - , ModelMap model , RedirectAttributes redirectAttributes , HttpSession session @@ -140,8 +152,7 @@ public class VEAdultAsgnmController { } List vEInstrAsgnmVOList = vEAsgnmMIXService.selectAsgnmRqstPagingList(vEInstrAsgnmVO); - - + //6.pageing step3 paginationInfo = this.setPagingStep3(vEInstrAsgnmVOList, paginationInfo); model.addAttribute("paginationInfo", paginationInfo); @@ -154,10 +165,152 @@ public class VEAdultAsgnmController { //대상 리스트, 페이징 정보 전달 model.addAttribute("vEInstrAsgnmVOList", vEInstrAsgnmVOList); + + return "/web/ve/instr/adultVisitEdu/asgnmInfo/instrAsgnmRqstList"; } + + @RequestMapping("/web/ve/instr/adultVisitEdu/asgnmInfo/popup/instrAsgnmListPopup.do") + public String instrAsgnmListPopup( + @ModelAttribute("vEPrcsDetailVO") VEPrcsDetailVO vEPrcsDetailVO + , ModelMap model + , RedirectAttributes redirectAttributes + , HttpSession session + , HttpServletRequest request + ) throws Exception { + System.out.println("vEPrcsDetailVO.getPrcsAplctPrdOrd() :"+ vEPrcsDetailVO.getEduAplctOrd()); + System.out.println("vEPrcsDetailVO.getPrcsAplctPrdOrd() :"+ vEPrcsDetailVO.getEduChasiOrd()); + + LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); //권한에 따른 로그인 정보 가져오기 + SsoLoginVO ssoLoginVO = checkLoginUtil.getSSOLoginVO(request); //SSO 로그인 정보 가져오기 + + //로그인 처리==================================== + + + //1.pageing step1 + PaginationInfo paginationInfo = this.setPagingStep1(vEPrcsDetailVO); + + + //2. pageing step2 + vEPrcsDetailVO = this.setPagingStep2(vEPrcsDetailVO, paginationInfo); + + //3. SelectPagingListQuery set 할 조건 설정 + String selectCondition = new String(); + //3.1 제출 완료 후 사용중인 데이터 조회 + selectCondition += "AND a.sbmt_yn='Y' AND a.use_yn = 'Y'"; + //3.2 강사 테이블 성인강사여부 Y인것만 조회 + selectCondition += "AND (b.adult_instr_yn ='Y' OR a.qlfct_end_yn = 'Y') "; + //3.3 이름 검색 시 + if(StringUtil.isNotEmpty(vEPrcsDetailVO.getSearchKeyword())){ + //selectCondition += "AND a.instr_nm LIKE CONCAT ('%', '" +vEInstrDetailVO.getSearchKeyword() + "', '%')"; + //이름 암호화 - comDefaultVO 검색단어 공통 암호화 + ComDefaultVO comDefaultVO = new ComDefaultVO(); + comDefaultVO.setSearchKeyword(vEPrcsDetailVO.getSearchKeyword()); + comDefaultVO = egovCryptoUtil.encryptComDefaultVO(comDefaultVO); + vEPrcsDetailVO.setSearchKeyword(comDefaultVO.getSearchKeyword()); + selectCondition += "AND a.instr_nm LIKE '%'|| '" +vEPrcsDetailVO.getSearchKeyword() + "'|| '%'"; + comDefaultVO = egovCryptoUtil.decryptComDefaultVO(comDefaultVO); + vEPrcsDetailVO.setSearchKeyword(comDefaultVO.getSearchKeyword()); + } + //3.4 요청일 시작일 검색 시 +// if(StringUtil.isNotEmpty(vEPrcsDetailVO.getSearchStartDt())){ +// selectCondition += "AND TO_CHAR(a.sbmt_pnttm, 'YYYYMMDD') >= REPLACE('"+vEPrcsDetailVO.getSearchStartDt()+"', '.', '')"; +// } + //3.5 요청일 종료일 검색 시 +// if(StringUtil.isNotEmpty(vEPrcsDetailVO.getSearchEndDt())){ +// selectCondition += "AND TO_CHAR(a.sbmt_pnttm, 'YYYYMMDD') <= REPLACE('"+vEPrcsDetailVO.getSearchEndDt()+"', '.', '')"; +// } + vEPrcsDetailVO.setInstrDiv("20"); + vEPrcsDetailVO.setSelectPagingListQuery(selectCondition); + + vEPrcsDetailVO.setLoginId(loginVO.getUniqId());; + + List vEInstrDetailVOList = vEPrcsAplctPrdService.selectinstrAsgnmPopupPagingList(vEPrcsDetailVO); + + try { + + vEInstrDetailVOList = egovCryptoUtil.decryptVEInstrDetailVOList(vEInstrDetailVOList); + } catch (Exception e) { + e.printStackTrace(); + // TODO: handle exception + } + + //4.pageing step3 + paginationInfo = this.setInstrPagingStep3(vEInstrDetailVOList, paginationInfo); + System.out.println(" ==== vEPrcsDetailVO.getPrcsAplctPrdOrd() :"+ vEPrcsDetailVO.getPrcsAplctPrdOrd()); + model.addAttribute("vEPrcsDetailVO", vEPrcsDetailVO); + model.addAttribute("paginationInfo", paginationInfo); + + //대상 리스트, 페이징 정보 전달 + model.addAttribute("list", vEInstrDetailVOList); + + + return "/web/ve/instr/adultVisitEdu/asgnmInfo/popup/instrAsgnmListPopup"; + +// return "/web/ve/instr/adultVisitEdu/asgnmInfo/instrAsgnmRqstList"; + } + + @RequestMapping("/web/ve/instr/adultVisitEdu/asgnmInfo/popup/instrAsgnmListExchnPopup.do") + public String instrAsgnmListExchnPopup( + @ModelAttribute("vEInstrAsgnmVO") VEInstrAsgnmVO vEInstrAsgnmVO + , ModelMap model + , RedirectAttributes redirectAttributes + , HttpSession session + , HttpServletRequest request + ) throws Exception { + + LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); //권한에 따른 로그인 정보 가져오기 + SsoLoginVO ssoLoginVO = checkLoginUtil.getSSOLoginVO(request); //SSO 로그인 정보 가져오기 + + if (loginVO == null || ssoLoginVO == null) { + return checkLoginUtil.getUserLoginPage(model); //로그인 정보가 없으면 로그인 페이지로 이동한다. + } + model.addAttribute("ssoLoginVO", ssoLoginVO); + model.addAttribute("loginVO", loginVO); + //로그인 처리==================================== + + + //3.pageing step1 + PaginationInfo paginationInfo = this.setPagingStep1(vEInstrAsgnmVO); + + + //4. pageing step2 + vEInstrAsgnmVO = this.setPagingStep2(vEInstrAsgnmVO, paginationInfo); + + vEInstrAsgnmVO.setUserId(loginVO.getUniqId()); + vEInstrAsgnmVO.setInstrDiv("20"); + vEInstrAsgnmVO.setHstryCd("10"); + + try { + System.out.println("session.getAttribute(menuNo).toString()"); + System.out.println(session.getAttribute("menuNo").toString()); + vEInstrAsgnmVO.setMenuNo(session.getAttribute("menuNo").toString()); + }catch(Exception ex) { + ex.printStackTrace(); + vEInstrAsgnmVO.setMenuNo("9991100"); + } + vEInstrAsgnmVO.setSearchAsgnmAprvlCd("20"); + List vEInstrAsgnmVOList = vEAsgnmMIXService.selectAsgnmRqstPagingList(vEInstrAsgnmVO); + + //6.pageing step3 + paginationInfo = this.setPagingStep3(vEInstrAsgnmVOList, paginationInfo); + model.addAttribute("paginationInfo", paginationInfo); + + + //fee 계산하기 + //feeSum4Dp +// vEInstrAsgnmVOList = VisitEduTransUtil.transData4feeSum(vEInstrAsgnmVOList); + + + //대상 리스트, 페이징 정보 전달 + model.addAttribute("vEInstrAsgnmVOList", vEInstrAsgnmVOList); + + + return "/web/ve/instr/adultVisitEdu/asgnmInfo/popup/instrAsgnmListExchnPopup"; + } + //성인강사 강의 추가신청 목록 @RequestMapping("/web/ve/instr/adultVisitEdu/asgnmInfo/instrAsgnmAddRqstList.do") @@ -524,6 +677,8 @@ public class VEAdultAsgnmController { return modelAndView; } + + /** * 숙박신청 등록 처리 */ @@ -683,4 +838,55 @@ public class VEAdultAsgnmController { return p_paginationInfo; } + + + + + + //페이징을 위한 처리 step1 - 페이징 기본 정보 설정 + private PaginationInfo setPagingStep1( + VEPrcsDetailVO p_vEPrcsDetailVO + )throws Exception{ + // pageing step1 + PaginationInfo paginationInfo = new PaginationInfo(); + paginationInfo.setCurrentPageNo(p_vEPrcsDetailVO.getPageIndex()); +// paginationInfo.setRecordCountPerPage(p_vEPrcsDetailVO.getPageUnit()); + paginationInfo.setRecordCountPerPage(5); + paginationInfo.setPageSize(p_vEPrcsDetailVO.getPageSize()); + + return paginationInfo; + } + + + //페이징을 위한 처리 step2 - 게시물 리스트 수량 설정 및 검색 조건 초기화 + private VEPrcsDetailVO setPagingStep2( + VEPrcsDetailVO p_vEPrcsDetailVO + , PaginationInfo p_paginationInfo + )throws Exception{ + // pageing step2 + p_vEPrcsDetailVO.setFirstIndex(p_paginationInfo.getFirstRecordIndex()); + p_vEPrcsDetailVO.setLastIndex(p_paginationInfo.getLastRecordIndex()); + p_vEPrcsDetailVO.setRecordCountPerPage(p_paginationInfo.getRecordCountPerPage()); + + if("".equals(p_vEPrcsDetailVO.getSearchSortCnd())){ //최초조회시 최신것 조회List + p_vEPrcsDetailVO.setSearchSortCnd("prcs_ord"); + p_vEPrcsDetailVO.setSearchSortOrd("desc"); + } + + return p_vEPrcsDetailVO; + } + + + //페이징을 위한 처리 step3 - 전체 게시물 수량 설정하기 + private PaginationInfo setInstrPagingStep3( + List p_vEInstrDetailVOList + , PaginationInfo p_paginationInfo + )throws Exception{ + // pageing step3 + int totCnt = 0; + if(p_vEInstrDetailVOList.size() > 0) totCnt = p_vEInstrDetailVOList.get(0).getTotCnt(); + p_paginationInfo.setTotalRecordCount(totCnt); + + return p_paginationInfo; + } } diff --git a/src/main/java/kcc/ve/instr/tngrVisitEdu/asgnmInfo/service/VEAsgnmMIXService.java b/src/main/java/kcc/ve/instr/tngrVisitEdu/asgnmInfo/service/VEAsgnmMIXService.java index 667051aa..433b0f00 100644 --- a/src/main/java/kcc/ve/instr/tngrVisitEdu/asgnmInfo/service/VEAsgnmMIXService.java +++ b/src/main/java/kcc/ve/instr/tngrVisitEdu/asgnmInfo/service/VEAsgnmMIXService.java @@ -123,4 +123,10 @@ public interface VEAsgnmMIXService { List selectFndtnVisitAsgnmPagingList(VEPrcsDetailVO vEPrcsDetailVO); + VEInstrAsgnmVO findByEduAplctOrdAndEduChasiOrdFromVeaLctrExchnInfo(VEInstrAsgnmVO vEInstrAsgnmVO); + + void insertFromVeaLctrExchnInfo(VEInstrAsgnmVO vEInstrAsgnmVO); + + List findAllFromVeaLctrExchnInfo(VEInstrAsgnmVO vEInstrVO); + } diff --git a/src/main/java/kcc/ve/instr/tngrVisitEdu/asgnmInfo/service/VEInstrAsgnmVO.java b/src/main/java/kcc/ve/instr/tngrVisitEdu/asgnmInfo/service/VEInstrAsgnmVO.java index e588931d..49a07a07 100644 --- a/src/main/java/kcc/ve/instr/tngrVisitEdu/asgnmInfo/service/VEInstrAsgnmVO.java +++ b/src/main/java/kcc/ve/instr/tngrVisitEdu/asgnmInfo/service/VEInstrAsgnmVO.java @@ -164,6 +164,13 @@ public class VEInstrAsgnmVO extends ComDefaultVO implements Serializable { private String selectRsdneQuery; // 지역쿼리 + private String exchnOrd; + private String exchnCd; + private String toUserId; + private String toEduAplctOrd; + private String toEduChasiOrd; + + public String getMemoCn() { return memoCn; @@ -807,5 +814,35 @@ public class VEInstrAsgnmVO extends ComDefaultVO implements Serializable { public void setSelectRsdneQuery(String selectRsdneQuery) { this.selectRsdneQuery = selectRsdneQuery; } + public String getExchnOrd() { + return exchnOrd; + } + public void setExchnOrd(String exchnOrd) { + this.exchnOrd = exchnOrd; + } + public String getExchnCd() { + return exchnCd; + } + public void setExchnCd(String exchnCd) { + this.exchnCd = exchnCd; + } + public String getToUserId() { + return toUserId; + } + public void setToUserId(String toUserId) { + this.toUserId = toUserId; + } + public String getToEduAplctOrd() { + return toEduAplctOrd; + } + public void setToEduAplctOrd(String toEduAplctOrd) { + this.toEduAplctOrd = toEduAplctOrd; + } + public String getToEduChasiOrd() { + return toEduChasiOrd; + } + public void setToEduChasiOrd(String toEduChasiOrd) { + this.toEduChasiOrd = toEduChasiOrd; + } } diff --git a/src/main/java/kcc/ve/instr/tngrVisitEdu/asgnmInfo/service/impl/VEAsgnmMIXDAO.java b/src/main/java/kcc/ve/instr/tngrVisitEdu/asgnmInfo/service/impl/VEAsgnmMIXDAO.java index e55637f8..db8e4c1a 100644 --- a/src/main/java/kcc/ve/instr/tngrVisitEdu/asgnmInfo/service/impl/VEAsgnmMIXDAO.java +++ b/src/main/java/kcc/ve/instr/tngrVisitEdu/asgnmInfo/service/impl/VEAsgnmMIXDAO.java @@ -219,5 +219,17 @@ public class VEAsgnmMIXDAO extends EgovAbstractDAO { public List selectFndtnVisitAsgnmPagingList(VEPrcsDetailVO paramVO) { return (List) list("VEAsgnmMIXDAO.selectFndtnVisitAsgnmPagingList", paramVO); } + + public VEInstrAsgnmVO findByEduAplctOrdAndEduChasiOrdFromVeaLctrExchnInfo(VEInstrAsgnmVO paramVO) { + return (VEInstrAsgnmVO) select("VEAsgnmMIXDAO.findByEduAplctOrdAndEduChasiOrdFromVeaLctrExchnInfo", paramVO); + } + + public void insertFromVeaLctrExchnInfo(VEInstrAsgnmVO vEInstrAsgnmVO) { + insert("VEAsgnmMIXDAO.insertFromVeaLctrExchnInfo", vEInstrAsgnmVO); + } + + public List findAllFromVeaLctrExchnInfo(VEInstrAsgnmVO vEInstrVO) { + return (List) list("VEAsgnmMIXDAO.findAllFromVeaLctrExchnInfo", vEInstrVO); + } } diff --git a/src/main/java/kcc/ve/instr/tngrVisitEdu/asgnmInfo/service/impl/VEAsgnmMIXServiceImpl.java b/src/main/java/kcc/ve/instr/tngrVisitEdu/asgnmInfo/service/impl/VEAsgnmMIXServiceImpl.java index 49a0f8e7..31c191d7 100644 --- a/src/main/java/kcc/ve/instr/tngrVisitEdu/asgnmInfo/service/impl/VEAsgnmMIXServiceImpl.java +++ b/src/main/java/kcc/ve/instr/tngrVisitEdu/asgnmInfo/service/impl/VEAsgnmMIXServiceImpl.java @@ -200,5 +200,20 @@ public class VEAsgnmMIXServiceImpl implements VEAsgnmMIXService { public List selectFndtnVisitAsgnmPagingList(VEPrcsDetailVO paramVO) { return vEAsgnmMIXDAO.selectFndtnVisitAsgnmPagingList(paramVO); } + + @Override + public VEInstrAsgnmVO findByEduAplctOrdAndEduChasiOrdFromVeaLctrExchnInfo(VEInstrAsgnmVO vEInstrAsgnmVO) { + return vEAsgnmMIXDAO.findByEduAplctOrdAndEduChasiOrdFromVeaLctrExchnInfo(vEInstrAsgnmVO); + } + + @Override + public void insertFromVeaLctrExchnInfo(VEInstrAsgnmVO vEInstrAsgnmVO) { + vEAsgnmMIXDAO.insertFromVeaLctrExchnInfo(vEInstrAsgnmVO); + } + + @Override + public List findAllFromVeaLctrExchnInfo(VEInstrAsgnmVO vEInstrVO) { + return vEAsgnmMIXDAO.findAllFromVeaLctrExchnInfo(vEInstrVO); + } } diff --git a/src/main/java/kcc/ve/instr/tngrVisitEdu/asgnmInfo/web/VEAsgnmController.java b/src/main/java/kcc/ve/instr/tngrVisitEdu/asgnmInfo/web/VEAsgnmController.java index 65aa0117..3c2bed90 100644 --- a/src/main/java/kcc/ve/instr/tngrVisitEdu/asgnmInfo/web/VEAsgnmController.java +++ b/src/main/java/kcc/ve/instr/tngrVisitEdu/asgnmInfo/web/VEAsgnmController.java @@ -1,5 +1,6 @@ package kcc.ve.instr.tngrVisitEdu.asgnmInfo.web; +import java.util.ArrayList; import java.util.List; import javax.annotation.Resource; @@ -15,10 +16,13 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.support.RedirectAttributes; +import egovframework.rte.fdl.idgnr.EgovIdGnrService; import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; +import kcc.com.cmm.ComDefaultVO; import kcc.com.cmm.EgovMessageSource; import kcc.com.cmm.LoginVO; import kcc.com.cmm.util.IpUtil; +import kcc.com.cmm.util.StringUtil; import kcc.com.utl.user.service.CheckLoginUtil; import kcc.let.uat.uia.service.SsoLoginVO; import kcc.let.uss.notify.service.NotifyManageService; @@ -37,6 +41,7 @@ import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduChasiVO; import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduMIXService; import kcc.ve.instr.tngrVisitEdu.instrInfo.service.VEInstrDetailService; import kcc.ve.instr.tngrVisitEdu.instrInfo.service.VEInstrDetailVO; +import kcc.ve.instr.tngrVisitEdu.instrInfo.service.VEInstrMixService; import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsDetailVO; import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsService; import kcc.ve.oprtn.asgnmnoti.service.VEAsgnmNotiService; @@ -95,7 +100,14 @@ public class VEAsgnmController { @Resource(name = "NotifyManageService") private NotifyManageService notifyManageService; + + //강사MIX 정보 + @Resource(name="vEInstrMixService") + private VEInstrMixService vEInstrMixService; + //강의교환 + @Resource(name="veaLctrExchnOrdGnrService") + private EgovIdGnrService veaLctrExchnOrdGnrService; //청소년강사 강의 요청 목록 @RequestMapping("/web/ve/instr/tngrVisitEdu/asgnmInfo/instrAsgnmRqstList.do") @@ -150,15 +162,245 @@ public class VEAsgnmController { paginationInfo = this.setPagingStep3(vEInstrAsgnmVOList, paginationInfo); model.addAttribute("paginationInfo", paginationInfo); + // 교환상태 확인 + vEInstrAsgnmVOList.stream().forEach(t-> { + + if("20".equals(t.getAsgnmAprvlCd())) { + VEInstrAsgnmVO veaLctrExchnInfo = vEAsgnmMIXService.findByEduAplctOrdAndEduChasiOrdFromVeaLctrExchnInfo(t); + if(veaLctrExchnInfo != null) { + t.setExchnOrd(veaLctrExchnInfo.getExchnOrd()); + t.setExchnCd(veaLctrExchnInfo.getExchnCd()); + } + } + }); //대상 리스트, 페이징 정보 전달 model.addAttribute("vEInstrAsgnmVOList", vEInstrAsgnmVOList); + + + + // 교환강의신청목록 영역 + // 교환강의신청목록 영역 + // 교환강의신청목록 영역 + + VEInstrAsgnmVO vEInstrVO = new VEInstrAsgnmVO(); + vEInstrVO.setToUserId(loginVO.getUniqId()); + + //3.pageing step1 +// PaginationInfo paginationTwoInfo = this.setPagingStep1(vEInstrAsgnmVO); + + + //4. pageing step2 +// vEInstrAsgnmVO = this.setPagingStep2(vEInstrAsgnmVO, paginationTwoInfo); + + List veaLctrExchnInfo = vEAsgnmMIXService.findAllFromVeaLctrExchnInfo(vEInstrVO); + veaLctrExchnInfo.stream().forEach(t-> { + t.setInstrNm(egovCryptoUtil.decrypt(t.getInstrNm())); + }); + + model.addAttribute("veaLctrExchnInfo", veaLctrExchnInfo); + + //6.pageing step3 +// paginationTwoInfo = this.setPagingStep3(vEInstrAsgnmVOList, paginationTwoInfo); +// model.addAttribute("paginationTwoInfo", paginationTwoInfo); + + + return "/web/ve/instr/tngrVisitEdu/asgnmInfo/instrAsgnmRqstList"; } - //청소년강사 강의 추가신청 목록 + + + @RequestMapping("/web/ve/instr/tngrVisitEdu/asgnmInfo/popup/instrAsgnmListExchnPopup.do") + public String instrAsgnmListExchnPopup( + @ModelAttribute("vEInstrAsgnmVO") VEInstrAsgnmVO vEInstrAsgnmVO + , ModelMap model + , RedirectAttributes redirectAttributes + , HttpSession session + , HttpServletRequest request + ) throws Exception { + + //로그인 처리==================================== + //로그인 정보 가져오기 + + LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); //권한에 따른 로그인 정보 가져오기 + SsoLoginVO ssoLoginVO = checkLoginUtil.getSSOLoginVO(request); //SSO 로그인 정보 가져오기 + + if (loginVO == null || ssoLoginVO == null) { + return checkLoginUtil.getUserLoginPage(model); //로그인 정보가 없으면 로그인 페이지로 이동한다. + } + model.addAttribute("ssoLoginVO", ssoLoginVO); + model.addAttribute("loginVO", loginVO); + //로그인 처리==================================== + + + //3.pageing step1 + PaginationInfo paginationInfo = this.setPagingStep1(vEInstrAsgnmVO); + + + //4. pageing step2 + vEInstrAsgnmVO = this.setPagingStep2(vEInstrAsgnmVO, paginationInfo); + + vEInstrAsgnmVO.setUserId(loginVO.getUniqId()); + vEInstrAsgnmVO.setInstrDiv("10"); + vEInstrAsgnmVO.setHstryCd("10"); + + try { + System.out.println("session.getAttribute(menuNo).toString()"); + System.out.println(session.getAttribute("menuNo").toString()); + vEInstrAsgnmVO.setMenuNo(session.getAttribute("menuNo").toString()); + }catch(Exception ex) { + ex.printStackTrace(); + vEInstrAsgnmVO.setMenuNo("999231100"); + + } + + vEInstrAsgnmVO.setSearchAsgnmAprvlCd("20"); + + List vEInstrAsgnmVOList = vEAsgnmMIXService.selectAsgnmRqstPagingList(vEInstrAsgnmVO); + + + + //6.pageing step3 + paginationInfo = this.setPagingStep3(vEInstrAsgnmVOList, paginationInfo); + model.addAttribute("paginationInfo", paginationInfo); + + + //fee 계산하기 + //feeSum4Dp +// vEInstrAsgnmVOList = VisitEduTransUtil.transData4feeSum(vEInstrAsgnmVOList); + + + //대상 리스트, 페이징 정보 전달 + model.addAttribute("vEInstrAsgnmVOList", vEInstrAsgnmVOList); + + + return "/web/ve/instr/tngrVisitEdu/asgnmInfo/popup/instrAsgnmListExchnPopup"; + } + + + + + @RequestMapping("/web/ve/instr/tngrVisitEdu/asgnmInfo/popup/instrAsgnmListPopup.do") + public String instrAsgnmListPopup( + @ModelAttribute("vEInstrDetailVO") VEInstrDetailVO vEInstrDetailVO + + , ModelMap model + , RedirectAttributes redirectAttributes + , HttpSession session + , HttpServletRequest request + ) throws Exception { + + //1.pageing step1 + PaginationInfo paginationInfo = this.setPagingInstrStep1(vEInstrDetailVO); + + + //2. pageing step2 + vEInstrDetailVO = this.setPagingInstrStep2(vEInstrDetailVO, paginationInfo); + + //3. SelectPagingListQuery set 할 조건 설정 + String selectCondition = new String(); + //3.1 제출 완료 후 사용중인 데이터 조회 + selectCondition += "AND a0.sbmt_yn='Y' AND a0.use_yn = 'Y'"; + //3.2 강사 테이블 성인강사여부 Y인것만 조회 + //selectCondition += "AND (b0.tngr_instr_yn ='Y' OR a0.qlfct_end_yn = 'Y') "; + + + List vEInstrDetailVOList = new ArrayList(); + + //3.3 이름 검색 시 + if(StringUtil.isNotEmpty(vEInstrDetailVO.getSearchKeyword())){ + //이름 암호화 - comDefaultVO 검색단어 공통 암호화 + ComDefaultVO comDefaultVO = new ComDefaultVO(); + comDefaultVO.setSearchKeyword(vEInstrDetailVO.getSearchKeyword()); + comDefaultVO = egovCryptoUtil.encryptComDefaultVO(comDefaultVO); + vEInstrDetailVO.setSearchKeyword(comDefaultVO.getSearchKeyword()); + //selectCondition += "AND a.instr_nm LIKE CONCAT ('%', '" +vEInstrDetailVO.getSearchKeyword() + "', '%')"; + selectCondition += "AND a0.instr_nm LIKE '%'||'" +vEInstrDetailVO.getSearchKeyword() + "'||'%'"; + comDefaultVO = egovCryptoUtil.decryptComDefaultVO(comDefaultVO); + vEInstrDetailVO.setSearchKeyword(comDefaultVO.getSearchKeyword()); + + //정보변경 요청사항 있는 강사부터 조회 + vEInstrDetailVO.setOrderByQuery(" rqstCnt DESC "); + + vEInstrDetailVO.setInstrDiv("10"); + vEInstrDetailVO.setSelectPagingListQuery(selectCondition); + + vEInstrDetailVOList = vEInstrMixService.selectPagingDetailList(vEInstrDetailVO); + + vEInstrDetailVOList = egovCryptoUtil.decryptVEInstrDetailVOList(vEInstrDetailVOList); + } + //3.4 요청일 시작일 검색 시 + /*if(StringUtil.isNotEmpty(vEInstrDetailVO.getSearchStartDt())){ + selectCondition += "AND TO_CHAR(a.sbmt_pnttm, 'YYYYMMDD') >= REPLACE('"+vEInstrDetailVO.getSearchStartDt()+"', '.', '')"; + } + //3.5 요청일 종료일 검색 시 + if(StringUtil.isNotEmpty(vEInstrDetailVO.getSearchEndDt())){ + selectCondition += "AND TO_CHAR(a.sbmt_pnttm, 'YYYYMMDD') <= REPLACE('"+vEInstrDetailVO.getSearchEndDt()+"', '.', '')"; + }*/ + + + //4.pageing step3 + paginationInfo = this.setPagingInstrStep3(vEInstrDetailVOList, paginationInfo); + model.addAttribute("paginationInfo", paginationInfo); + + //대상 리스트, 페이징 정보 전달 + model.addAttribute("list", vEInstrDetailVOList); + + return "/web/ve/instr/tngrVisitEdu/asgnmInfo/popup/instrAsgnmListPopup"; + +// return "/web/ve/instr/tngrVisitEdu/asgnmInfo/instrAsgnmAddRqstList"; + } + + /** + * 교환 신청 Insert + * 교환 신청 Insert + * 교환 신청 Insert + * 교환 신청 Insert + */ + @RequestMapping("/web/ve/instr/tngrVisitEdu/asgnmInfo/insertVeaLctrExchnAjax.do") + public ModelAndView insertVeaLctrExchnAjax( + @ModelAttribute("vEInstrAsgnmVO") VEInstrAsgnmVO vEInstrAsgnmVO + , ModelMap model + , HttpServletRequest request + ) throws Exception { + + ModelAndView modelAndView = new ModelAndView(); + modelAndView.setViewName("jsonView"); + + Boolean isSuccess = true; + String msg = ""; + + //로그인 처리==================================== + //로그인 정보 가져오기 + String s_oprtnLoginCheckNInfo = checkLoginUtil.oprtnCheckNInfo(model); + if (!"".equals(s_oprtnLoginCheckNInfo)) { + modelAndView.addObject("result", "loginFail"); + return modelAndView; + } + //로그인 처리==================================== + + try { + LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); //권한에 따른 로그인 정보 가져오기 + vEInstrAsgnmVO.setFrstRegisterId(loginVO.getUniqId()); + vEInstrAsgnmVO.setUserId(loginVO.getUniqId()); + vEInstrAsgnmVO.setExchnOrd(veaLctrExchnOrdGnrService.getNextStringId()); // 고유ID + vEAsgnmMIXService.insertFromVeaLctrExchnInfo(vEInstrAsgnmVO); + } catch (Exception ex) { + ex.printStackTrace(); + isSuccess = false; + msg = ex.getMessage(); + } + + modelAndView.addObject("isSuccess", isSuccess); + modelAndView.addObject("msg", msg); + + return modelAndView; + } + + @RequestMapping("/web/ve/instr/tngrVisitEdu/asgnmInfo/instrAsgnmAddRqstList.do") public String instrAsgnmAddRqstList( @ModelAttribute("vEInstrAsgnmVO") VEInstrAsgnmVO vEInstrAsgnmVO @@ -850,4 +1092,55 @@ public class VEAsgnmController { return p_paginationInfo; } + + + /// 강사 페이징을 위한 paging + + + + //청소년강사 강의 추가신청 목록 + private PaginationInfo setPagingInstrStep3( + List p_vEInstrDetailVOList + , PaginationInfo p_paginationInfo + )throws Exception{ + // pageing step3 + int totCnt = 0; + if(p_vEInstrDetailVOList.size() > 0) totCnt = p_vEInstrDetailVOList.get(0).getTotCnt(); + p_paginationInfo.setTotalRecordCount(totCnt); + + return p_paginationInfo; + } + + private VEInstrDetailVO setPagingInstrStep2( + VEInstrDetailVO p_vEInstrDetailVO + , PaginationInfo p_paginationInfo + )throws Exception{ + // pageing step2 + p_vEInstrDetailVO.setFirstIndex(p_paginationInfo.getFirstRecordIndex()); + p_vEInstrDetailVO.setLastIndex(p_paginationInfo.getLastRecordIndex()); + p_vEInstrDetailVO.setRecordCountPerPage(p_paginationInfo.getRecordCountPerPage()); + + if("".equals(p_vEInstrDetailVO.getSearchSortCnd())){ //최초조회시 최신것 조회List + p_vEInstrDetailVO.setSearchSortCnd("sbmt_pnttm"); + p_vEInstrDetailVO.setSearchSortOrd("desc"); + } + + return p_vEInstrDetailVO; + } + + private PaginationInfo setPagingInstrStep1( + VEInstrDetailVO p_vEInstrDetailVO + )throws Exception{ + // pageing step1 + PaginationInfo paginationInfo = new PaginationInfo(); + paginationInfo.setCurrentPageNo(p_vEInstrDetailVO.getPageIndex()); + paginationInfo.setRecordCountPerPage(p_vEInstrDetailVO.getPageUnit()); + paginationInfo.setPageSize(p_vEInstrDetailVO.getPageSize()); + + return paginationInfo; + } + + + + } 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 ece5ee21..8692cc21 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 @@ -208,6 +208,8 @@ public class VEPrcsDetailVO extends ComDefaultVO implements Serializable { private String qestnrId20Cnt; private String qestnrId30Cnt; + private String loginId; + public String getEduPrcsOrd() { return eduPrcsOrd; @@ -1013,6 +1015,12 @@ public class VEPrcsDetailVO extends ComDefaultVO implements Serializable { public void setQestnrId30Cnt(String qestnrId30Cnt) { this.qestnrId30Cnt = qestnrId30Cnt; } + public String getLoginId() { + return loginId; + } + public void setLoginId(String loginId) { + this.loginId = loginId; + } } diff --git a/src/main/resources/egovframework/spring/com/context-idgen.xml b/src/main/resources/egovframework/spring/com/context-idgen.xml index d854b8ba..e6a5c64e 100644 --- a/src/main/resources/egovframework/spring/com/context-idgen.xml +++ b/src/main/resources/egovframework/spring/com/context-idgen.xml @@ -3061,7 +3061,6 @@ - @@ -3075,5 +3074,20 @@ + + + + + + + + + + + + + + + diff --git a/src/main/resources/egovframework/sqlmap/ve/asgnm/VEAsgnm_MIX_SQL_Tibero.xml b/src/main/resources/egovframework/sqlmap/ve/asgnm/VEAsgnm_MIX_SQL_Tibero.xml index dce722ef..b6320a31 100644 --- a/src/main/resources/egovframework/sqlmap/ve/asgnm/VEAsgnm_MIX_SQL_Tibero.xml +++ b/src/main/resources/egovframework/sqlmap/ve/asgnm/VEAsgnm_MIX_SQL_Tibero.xml @@ -4969,7 +4969,84 @@ - + + + + + + + + + + INSERT INTO VEA_LCTR_EXCHN ( + EXCHN_ORD + , EDU_APLCT_ORD + , EDU_CHASI_ORD + , USER_ID + , EXCHN_CD + , TO_USER_ID + , FRST_REGIST_PNTTM + , FRST_REGISTER_ID + )VALUES( + #exchnOrd#, + #eduAplctOrd#, + #eduChasiOrd#, + #userId#, + '10', + #toUserId#, + SYSDATE, + #userId# + ) + + + + + + + + + + + + + + + + + +
+
+
+
+ + +
+
+
+
+ + + + --%> + + diff --git a/src/main/webapp/WEB-INF/jsp/web/ve/instr/tngrVisitEdu/asgnmInfo/instrAsgnmRqstList.jsp b/src/main/webapp/WEB-INF/jsp/web/ve/instr/tngrVisitEdu/asgnmInfo/instrAsgnmRqstList.jsp index c22e69c2..b8a7e31b 100644 --- a/src/main/webapp/WEB-INF/jsp/web/ve/instr/tngrVisitEdu/asgnmInfo/instrAsgnmRqstList.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/ve/instr/tngrVisitEdu/asgnmInfo/instrAsgnmRqstList.jsp @@ -65,6 +65,42 @@ , "scholPop" ); } + + + + function fn_eduRegPopup(eduAplctOrd, eduChasiOrd){ + var data ={ + "eduAplctOrd": eduAplctOrd, + "eduChasiOrd": eduChasiOrd + } + + commonPopLayeropen( + "${pageContext.request.contextPath}/web/ve/instr/tngrVisitEdu/asgnmInfo/popup/instrAsgnmListPopup.do" + , 800 + , 800 + , data + , "N" + , "instrAsgnmListPopup" + ); + } + + + + + function fn_eduExchnPopup(exchnOrd){ + var data ={ + "exchnOrd": exchnOrd + } + + commonPopLayeropen( + "${pageContext.request.contextPath}/web/ve/instr/tngrVisitEdu/asgnmInfo/popup/instrAsgnmListExchnPopup.do" + , 800 + , 800 + , data + , "N" + , "instrAsgnmListPopup" + ); + } @@ -121,6 +157,7 @@ + @@ -132,6 +169,7 @@ 기관(학교)명 교육대상 신청상태 + 교환상태 @@ -219,6 +257,39 @@ + + + + + + + + + + + + + + + + + + + + + + - + + + +<%-- --%> + @@ -318,3 +389,82 @@ + + + +
+
+

교환강의요청목록

+
+ + +
+
+
+ + +<%-- --%> + + + + + + + + + + + + + + + + +<%-- --%> + +<%-- + + + + + + + + + + +
요청자요청시간요청상태
', '');" style="cursor:pointer;"> --%> + +<%-- --%> +<%-- --%> +<%-- --%> +<%-- --%> +<%-- --%> +<%-- --%> + + +

+ + + + + + + + + + + + + + +
+
+ +<%-- --%> + +
+ diff --git a/src/main/webapp/WEB-INF/jsp/web/ve/instr/tngrVisitEdu/asgnmInfo/popup/instrAsgnmListExchnPopup.jsp b/src/main/webapp/WEB-INF/jsp/web/ve/instr/tngrVisitEdu/asgnmInfo/popup/instrAsgnmListExchnPopup.jsp new file mode 100644 index 00000000..feab136c --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/web/ve/instr/tngrVisitEdu/asgnmInfo/popup/instrAsgnmListExchnPopup.jsp @@ -0,0 +1,231 @@ +<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> +<%@ taglib prefix="kc" uri="/WEB-INF/tlds/kcc_tld.tld"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> +<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator"%> +<%@ taglib prefix="un" uri="http://jakarta.apache.org/taglibs/unstandard-1.0" %> +<%@ taglib prefix="ve" uri="/WEB-INF/tlds/kcc_tld.tld"%> + + + + +
+ + + " /> + " /> +
+ + + + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/web/ve/instr/tngrVisitEdu/asgnmInfo/popup/instrAsgnmListPopup.jsp b/src/main/webapp/WEB-INF/jsp/web/ve/instr/tngrVisitEdu/asgnmInfo/popup/instrAsgnmListPopup.jsp new file mode 100644 index 00000000..90402475 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/web/ve/instr/tngrVisitEdu/asgnmInfo/popup/instrAsgnmListPopup.jsp @@ -0,0 +1,154 @@ +<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> +<%@ taglib prefix="kc" uri="/WEB-INF/tlds/kcc_tld.tld"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> +<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator"%> +<%@ taglib prefix="un" uri="http://jakarta.apache.org/taglibs/unstandard-1.0" %> + + + + +
+ + + " /> + " /> +
+ + + + + + + +