diff --git a/src/main/java/kcc/let/my/web/MyPageController_back_251028.java b/src/main/java/kcc/let/my/web/MyPageController_back_251028.java new file mode 100644 index 00000000..cfd20cd8 --- /dev/null +++ b/src/main/java/kcc/let/my/web/MyPageController_back_251028.java @@ -0,0 +1,667 @@ +package kcc.let.my.web; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.mvc.support.RedirectAttributes; + +import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; +import kcc.com.cmm.LoginVO; +import kcc.com.utl.user.service.CheckLoginUtil; +import kcc.let.cop.bbs.service.BoardMasterVO; +import kcc.let.cop.bbs.service.BoardVO; +import kcc.let.uat.uia.service.SsoLoginVO; +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.fndtnEnhanceTrn.service.FndtnEnhanceTrnService; +import kcc.ve.cmm.VeConstants; +import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctVO; +import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduChasiVO; +import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduMIXService; +import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsAplctPrdService; +import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsDetailVO; +import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsService; + +/** + * 게시물 관리를 위한 컨트롤러 클래스 + * + * @author 공통 서비스 개발팀 이삼섭 + * @since 2009.03.19 + * @version 1.0 + * @see + * + *
+ * << 개정이력(Modification Information) >>
+ *
+ *   수정일      수정자          수정내용
+ *  -------    --------    ---------------------------
+ *  2009.03.19  이삼섭          최초 생성
+ *  2009.06.29  한성곤	       2단계 기능 추가 (댓글관리, 만족도조사)
+ *  2011.08.31  JJY            경량환경 템플릿 커스터마이징버전 생성
+ *
+ *      
+ */ +//@Controller +public class MyPageController_back_251028 { + + // 로그인 체크 util + @Resource(name = "checkLoginUtil") + private CheckLoginUtil checkLoginUtil; + + // 교육과정신청 + @Resource(name = "vEEduMIXService") + private VEEduMIXService vEEduMIXService; + + //암복호화 유틸 + @Resource(name = "egovCryptoUtil") + EgovCryptoUtil egovCryptoUtil; + + //과정차시 관리 + @Resource(name = "vEPrcsAplctPrdService") + private VEPrcsAplctPrdService vEPrcsAplctPrdService; + + //과정 관리 + @Resource(name = "vEPrcsService") + private VEPrcsService vEPrcsService; + + //온라인콘텐츠과정 관리 + @Resource(name = "fndtnEnhanceTrnService") + private FndtnEnhanceTrnService fndtnEnhanceTrnService; + + @Resource(name = "NotifyManageService") + private NotifyManageService notifyManageService; + + private static final Logger LOGGER = LoggerFactory.getLogger(MyPageController_back_251028.class); + + @RequestMapping(value = { "/web/my/myPageDashBoard.do" }) + public String selectFaqListWeb(HttpServletRequest request, @ModelAttribute("searchVO") BoardMasterVO boardMasterVO, + ModelMap model, BoardVO boardVO, RedirectAttributes redirectAttributes) throws Exception { + + LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); // 권한에 따른 로그인 정보 가져오기 + SsoLoginVO ssoLoginVO = checkLoginUtil.getSSOLoginVO(request); // SSO 로그인 정보 가져오기 + + if (loginVO == null || ssoLoginVO == null) { + return checkLoginUtil.getUserLoginPage(model, request); // 로그인 정보가 없으면 로그인 페이지로 이동한다. + } + + /* + * 청소년 진행목록 + */ + { + /*진행/종료 건수에서 신청/완료 건수로 변경 > 진행/종료는 차시 기준. 신청은 신청 기준이라 조회쿼리 변경*/ + /*VEEduAplctVO vEEduAplctVO = new VEEduAplctVO(); + // 청소년 + + // 사용자 교육신청 차시 리스트 + VEEduChasiVO vEEduChasiVO = new VEEduChasiVO(); + vEEduChasiVO.setEduAplctOrd(vEEduAplctVO.getEduAplctOrd()); + vEEduChasiVO.setLctrDivCd(VeConstants.LCTR_DIV_CD_10); + vEEduChasiVO.setAprvlCd(VeConstants.STATUS_CD_EDU_SELCT); + vEEduChasiVO.setUserId(loginVO.getUniqId()); + vEEduChasiVO.setRecordCountPerPage(1000000); + vEEduChasiVO.setFirstIndex(0); + // List vEEduChasiVOList = + // vEEduMIXService.selectChasiList(vEEduChasiVO); + + vEEduChasiVO.setPageIndex(vEEduAplctVO.getPageIndex()); + vEEduChasiVO.setPageUnit(vEEduAplctVO.getPageUnit()); + vEEduChasiVO.setPageSize(vEEduAplctVO.getPageSize()); + + List tngrList = vEEduMIXService.selectChasiListMypage(vEEduChasiVO); + + + Map tngrMap = tngrList.stream() + .collect(Collectors.partitioningBy(vo -> "30".equals(vo.getAsgnmAprvlCd()), Collectors.counting())) + //.collect(Collectors.partitioningBy(vo -> "60".equals(vo.getAprvlCd()), Collectors.counting())) + .entrySet().stream() + .collect(Collectors.toMap( + entry -> entry.getKey() ? "tngrEnd" : "tngrIng", + entry -> entry.getValue().toString() + ) + ); + + System.out.println(tngrMap); + System.out.println(tngrMap); + + + model.addAttribute("tngrMap", tngrMap); + model.addAttribute("tngrList", tngrList);*/ + + //신청목록 + VEEduAplctVO vEEduAplctVO = new VEEduAplctVO(); + vEEduAplctVO.setUserId(loginVO.getUniqId()); + vEEduAplctVO.setLctrDivCd(VeConstants.LCTR_DIV_CD_10); + vEEduAplctVO.setRecordCountPerPage(10); + vEEduAplctVO.setFirstIndex(0); + List vEEduAplctVOList = vEEduMIXService.selectPagingApplyList(vEEduAplctVO); + int tngrAplctCnt = 0; + if(vEEduAplctVOList != null && !vEEduAplctVOList.isEmpty()) { + tngrAplctCnt = vEEduAplctVOList.get(0).getTotCnt(); + } + model.addAttribute("tngrAplctCnt", tngrAplctCnt); + + //완료목록 + VEEduChasiVO vEEduChasiVO = new VEEduChasiVO(); + vEEduChasiVO.setLctrDivCd(VeConstants.LCTR_DIV_CD_10); + vEEduChasiVO.setAprvlCd(VeConstants.STATUS_CD_EDU_SELCT); + vEEduChasiVO.setUserId(loginVO.getUniqId()); + vEEduChasiVO.setSearchStartDt(vEEduAplctVO.getSearchStartDt()); + vEEduChasiVO.setSearchEndDt(vEEduAplctVO.getSearchEndDt()); + vEEduChasiVO.setRecordCountPerPage(10); + vEEduChasiVO.setFirstIndex(0); + List vEEduChasiVOList = vEEduMIXService.selectChasiList(vEEduChasiVO); + int tngrEndCnt = 0; + if(vEEduChasiVOList != null && !vEEduChasiVOList.isEmpty()) { + tngrEndCnt = vEEduChasiVOList.get(0).getTotCnt(); + } + model.addAttribute("tngrEndCnt", tngrEndCnt); + model.addAttribute("tngrList", vEEduChasiVOList); + } + + /* + * 성인 진행목록 + */ + { + /*진행/종료 건수에서 신청/완료 건수로 변경 > 진행/종료는 차시 기준. 신청은 신청 기준이라 조회쿼리 변경*/ + /*VEEduAplctVO vEEduAplctVO = new VEEduAplctVO(); + // 청소년 + + // 사용자 교육신청 차시 리스트 + VEEduChasiVO vEEduChasiVO = new VEEduChasiVO(); + vEEduChasiVO.setEduAplctOrd(vEEduAplctVO.getEduAplctOrd()); + vEEduChasiVO.setLctrDivCd(VeConstants.LCTR_DIV_CD_20); + vEEduChasiVO.setAprvlCd(VeConstants.STATUS_CD_EDU_SELCT); + vEEduChasiVO.setUserId(loginVO.getUniqId()); + vEEduChasiVO.setRecordCountPerPage(1000000); + vEEduChasiVO.setFirstIndex(0); + // List vEEduChasiVOList = + // vEEduMIXService.selectChasiList(vEEduChasiVO); + + vEEduChasiVO.setPageIndex(vEEduAplctVO.getPageIndex()); + vEEduChasiVO.setPageUnit(vEEduAplctVO.getPageUnit()); + vEEduChasiVO.setPageSize(vEEduAplctVO.getPageSize()); + + List adultList = vEEduMIXService.selectChasiListMypage(vEEduChasiVO); + + + Map adultMap = adultList.stream() + .collect(Collectors.partitioningBy(vo -> "30".equals(vo.getAsgnmAprvlCd()), Collectors.counting())) + .entrySet().stream() + .collect(Collectors.toMap( + entry -> entry.getKey() ? "adultEnd" : "adultIng", + entry -> entry.getValue().toString() + ) + ); + + model.addAttribute("adultMap", adultMap); + model.addAttribute("adultList", adultList);*/ + //신청목록 + VEEduAplctVO vEEduAplctVO = new VEEduAplctVO(); + vEEduAplctVO.setUserId(loginVO.getUniqId()); + vEEduAplctVO.setLctrDivCd(VeConstants.LCTR_DIV_CD_20); + vEEduAplctVO.setRecordCountPerPage(10); + vEEduAplctVO.setFirstIndex(0); + List vEEduAplctVOList = vEEduMIXService.selectPagingList(vEEduAplctVO); + int adultAplctCnt = 0; + if(vEEduAplctVOList != null && !vEEduAplctVOList.isEmpty()) { + adultAplctCnt = vEEduAplctVOList.get(0).getTotCnt(); + } + model.addAttribute("adultAplctCnt", adultAplctCnt); + + //완료목록 + VEEduChasiVO vEEduChasiVO = new VEEduChasiVO(); + vEEduChasiVO.setLctrDivCd(VeConstants.LCTR_DIV_CD_20); + vEEduChasiVO.setAprvlCd(VeConstants.STATUS_CD_EDU_SELCT); + vEEduChasiVO.setUserId(loginVO.getUniqId()); + vEEduChasiVO.setRecordCountPerPage(10); + vEEduChasiVO.setFirstIndex(0); + List vEEduChasiVOList = vEEduMIXService.selectChasiList(vEEduChasiVO); + int adultEndCnt = 0; + if(vEEduChasiVOList != null && !vEEduChasiVOList.isEmpty()) { + adultEndCnt = vEEduChasiVOList.get(0).getTotCnt(); + } + model.addAttribute("adultEndCnt", adultEndCnt); + model.addAttribute("adultList", vEEduChasiVOList); + } + /* + * 체험교실 + * */ + { + VEEduAplctVO vEEduAplctVO = new VEEduAplctVO(); + // 저작권 + vEEduAplctVO.setUserId(loginVO.getUniqId()); + vEEduAplctVO.setRecordCountPerPage(1000000); + vEEduAplctVO.setFirstIndex(0); + vEEduAplctVO.setLctrDivCd(VeConstants.LCTR_DIV_CD_30); + + List vEEduAplctVOList = vEEduMIXService.selectExprnPagingList(vEEduAplctVO); + vEEduAplctVOList = egovCryptoUtil.decryptVEEduAplctVOList(vEEduAplctVOList); + + System.out.println("vEEduAplctVOList.size() :: "+vEEduAplctVOList.size()); +// vEEduAplctVOList에서 10, 11, 12, 13 값 제거 + List filteredList = vEEduAplctVOList.stream() + /* + .filter(item -> !item.getAprvlCd().equals("10") + && !item.getAprvlCd().equals("11") + && !item.getAprvlCd().equals("12") + && !item.getAprvlCd().equals("13")) + */ + .filter(item -> item.getAprvlCd().equals("80") + || item.getAprvlCd().equals("20") + ) + .collect(Collectors.toList()); +// -- 종료 80 +// -- 진행중 20~70 + + Map exprnMap = filteredList.stream() + .collect(Collectors.partitioningBy(vo -> "80".equals(vo.getAprvlCd()), Collectors.counting())) + .entrySet().stream() + .collect(Collectors.toMap( + entry -> entry.getKey() ? "exprnEnd" : "exprnIng", + entry -> entry.getValue().toString() + ) + ); + + model.addAttribute("exprnMap", exprnMap); + model.addAttribute("exprnList", filteredList); + } + + /* + * 실무역량강화 + * */ + { + + + VEPrcsDetailVO vEPrcsDetailVO = new VEPrcsDetailVO(); + + vEPrcsDetailVO.setUserId(loginVO.getUniqId()); + //기반강화 조회 + vEPrcsDetailVO.setLctrDivCd(VeConstants.LCTR_DIV_CD_50); //강의구분코드 VE0011 10-청소년강의, 20-성인강의, 30-체험, 50-기반강화, 60-조건부 + vEPrcsDetailVO.setRecordCountPerPage(1000000); + vEPrcsDetailVO.setFirstIndex(0); + + + List vEPrcsDetailVOList = vEPrcsAplctPrdService.findByAprvlList(vEPrcsDetailVO); + // 요청 + long cont = vEPrcsDetailVOList.stream().filter(t-> "10".equals(t.getAprvlCd())).count(); + // 미이수 + long aplctStateCd10 = vEPrcsDetailVOList.stream().filter(t-> "10".equals(t.getAplctStateCd())).count(); + // 이수완료 + long aplctStateCd20 = vEPrcsDetailVOList.stream().filter(t-> "20".equals(t.getAplctStateCd())).count(); + + Map fndtnMap = new HashMap<>(); + fndtnMap.put("fndtnEnd", String.valueOf(aplctStateCd20)); + fndtnMap.put("fndtnIng", String.valueOf(aplctStateCd10+cont)); + + model.addAttribute("fndtnMap", fndtnMap); + model.addAttribute("fndtnList", vEPrcsDetailVOList); + + + //신청중, 수강중, 종료된 수량 + Map countMap = vEPrcsAplctPrdService.findAllDashboardCnt(vEPrcsDetailVO); + model.addAttribute("countMap", countMap); + + } + + //내 문의 목록 + { + + VEPrcsDetailVO vEPrcsDetailVO = new VEPrcsDetailVO(); + vEPrcsDetailVO.setRecordCountPerPage(3); + vEPrcsDetailVO.setFirstIndex(0); + vEPrcsDetailVO.setQnaRegist(loginVO.getUniqId()); + List qnaList = vEPrcsService.selectQnaPagingList(vEPrcsDetailVO); + model.addAttribute("qnaList", qnaList); + } + +// return "/web/cop/bbs/FaqListAjax"; + return "web/my/myPageDashBoard"; + } + + @RequestMapping(value = { "/web/my/myQnaMngList.do" }) + public String myQnaMngList( + HttpServletRequest request + , @ModelAttribute("vEPrcsDetailVO") VEPrcsDetailVO vEPrcsDetailVO + , ModelMap model + ) throws Exception { + + LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); // 권한에 따른 로그인 정보 가져오기 + //1.pageing step1 + PaginationInfo paginationInfo = this.setPagingStep1(vEPrcsDetailVO); + //2. pageing step2 + vEPrcsDetailVO = this.setPagingStep2(vEPrcsDetailVO, paginationInfo); + + vEPrcsDetailVO.setQnaRegist(loginVO.getUniqId()); + + + if(StringUtils.isNotEmpty(vEPrcsDetailVO.getSearchStatus())) { + String status = ""; + if("Y".equals(vEPrcsDetailVO.getSearchStatus())) + status = "IS NOT NULL"; + if("N".equals(vEPrcsDetailVO.getSearchStatus())) + status = "IS NULL"; + + vEPrcsDetailVO.setSearchQuery(" AND qn.QNA_ANSWER_CN "+status); + } + + List vEPrcsDetailVOList = vEPrcsService.selectQnaPagingList(vEPrcsDetailVO); + + //3.pageing step3 + paginationInfo = this.setPagingStep3(vEPrcsDetailVOList, paginationInfo); + + model.addAttribute("paginationInfo", paginationInfo); + + // 사용자 이름 디코딩 +// vEPrcsDetailVOList.stream().forEach(t->t.setMberNm(egovCryptoUtil.decrypt(t.getMberNm()))); + + //대상 리스트, 페이징 정보 전달 + model.addAttribute("list", vEPrcsDetailVOList); + + return "web/my/myQnaMngList"; + } + + @RequestMapping(value = { "/web/my/myNotifyMngList.do" }) + public String myNotifyMngList( + HttpServletRequest request + , @ModelAttribute("notifyManageVO") NotifyManageVO notifyManageVO + , ModelMap model + ) throws Exception { + +// try { + + LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); //권한에 따른 로그인 정보 가져오기 + SsoLoginVO ssoLoginVO = checkLoginUtil.getSSOLoginVO(request); //SSO 로그인 정보 가져오기 + + if (loginVO == null || ssoLoginVO == null) { + //이전 url 처리(beforeSiteUrl)_이준호_220228추가 + return checkLoginUtil.getUserLoginPage(model, request); //로그인 정보가 없으면 로그인 페이지로 이동한다. +// return checkLoginUtil.getUserLoginPage(model); //로그인 정보가 없으면 로그인 페이지로 이동한다. + } + + notifyManageService.updateM7DaysUseYnN(); + + + //1.pageing step1 + PaginationInfo paginationInfo = this.setNotiPagingStep1(notifyManageVO); + //2. pageing step2 + notifyManageVO = this.setNotiPagingStep2(notifyManageVO, paginationInfo); +// + + + notifyManageVO.setToUserId(loginVO.getUniqId()); + + + /*if(StringUtils.isNotEmpty(notifyManageVO.getSearchStatus())) { + String status = ""; + if("Y".equals(notifyManageVO.getSearchStatus())) + status = "IS NOT NULL"; + if("N".equals(notifyManageVO.getSearchStatus())) + status = "IS NULL"; + + notifyManageVO.setSearchQuery(" AND qn.QNA_ANSWER_CN "+status); + } */ + + List notifyManageVOList = notifyManageService.selectPagingList(notifyManageVO); + + //3.pageing step3 + paginationInfo = this.setNotiPagingStep3(notifyManageVOList, paginationInfo); + + model.addAttribute("paginationInfo", paginationInfo); + + // 사용자 이름 디코딩 +// vEPrcsDetailVOList.stream().forEach(t->t.setMberNm(egovCryptoUtil.decrypt(t.getMberNm()))); + + //대상 리스트, 페이징 정보 전달 + model.addAttribute("list", notifyManageVOList); +// } catch (Exception e) { +// e.printStackTrace(); +// // TODO: handle exception +// } +// return "web/my/myQnaMngList"; + return "web/my/myNotifyMngList"; + } + + @RequestMapping(value = { "/web/my/myNotifyMngDetail.do"}) + public String myNotifyMngDetail( + @ModelAttribute("notifyManageVO") NotifyManageVO notifyManageVO + , 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, request); //로그인 정보가 없으면 로그인 페이지로 이동한다. + } + //로그인 처리==================================== + + //과정 조회 + NotifyManageVO notifyManageInfo = notifyManageService.findById(notifyManageVO); + + model.addAttribute("info", notifyManageInfo); + + + try { + if ("30".equals(notifyManageInfo.getLctrDivCd())){ //체험교실은 다른게 바로가기를 만든다. + //eduAplctOrd:eduAplct_00000015581 + List notifyParamList = new ArrayList(); + NotifyManageVO tInfo = new NotifyManageVO(); + tInfo.setSiteNm("eduAplctOrd"); + tInfo.setParams(notifyManageInfo.getEduAplctOrd()); + + notifyParamList.add(tInfo); + + model.addAttribute("notifyParamList", notifyParamList); + + }else{ + //세부과정 목록 조회 + String[] a_params = notifyManageInfo.getParams().split(","); + + List notifyParamList = new ArrayList(); + + for (int i=0;i p_vEPrcsDetailVOList + + , PaginationInfo p_paginationInfo + )throws Exception{ + // pageing step3 + int totCnt = 0; + if(p_vEPrcsDetailVOList.size() > 0) totCnt = p_vEPrcsDetailVOList.get(0).getTotCnt(); + p_paginationInfo.setTotalRecordCount(totCnt); + + return p_paginationInfo; + } + + + + private PaginationInfo setNotiPagingStep1(NotifyManageVO notifyManageVO) { + // pageing step1 + PaginationInfo paginationInfo = new PaginationInfo(); + paginationInfo.setCurrentPageNo(notifyManageVO.getPageIndex()); + paginationInfo.setRecordCountPerPage(notifyManageVO.getPageUnit()); + paginationInfo.setPageSize(notifyManageVO.getPageSize()); + + return paginationInfo; + } + + private NotifyManageVO setNotiPagingStep2(NotifyManageVO notifyManageVO, PaginationInfo paginationInfo) { + // pageing step2 + notifyManageVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); + notifyManageVO.setLastIndex(paginationInfo.getLastRecordIndex()); + notifyManageVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); + + if("".equals(notifyManageVO.getSearchSortCnd())){ //최초조회시 최신것 조회List + notifyManageVO.setSearchSortCnd("prcs_ord"); + notifyManageVO.setSearchSortOrd("desc"); + } + + return notifyManageVO; + } + + private PaginationInfo setNotiPagingStep3(List vEPrcsDetailVOList, PaginationInfo paginationInfo) { + // pageing step3 + int totCnt = 0; + if(vEPrcsDetailVOList.size() > 0) totCnt = vEPrcsDetailVOList.get(0).getTotCnt(); + paginationInfo.setTotalRecordCount(totCnt); + + return paginationInfo; + } + + +} diff --git a/src/main/java/kcc/ve/oprtn/cmdTrgt/web/CmdInstrMngController.java b/src/main/java/kcc/ve/oprtn/cmdTrgt/web/CmdInstrMngController.java new file mode 100644 index 00000000..67cb8993 --- /dev/null +++ b/src/main/java/kcc/ve/oprtn/cmdTrgt/web/CmdInstrMngController.java @@ -0,0 +1,1571 @@ +package kcc.ve.oprtn.cmdTrgt.web; + +import java.util.ArrayList; +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.poi.xssf.streaming.SXSSFWorkbook; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.servlet.ModelAndView; + +import egovframework.rte.fdl.idgnr.EgovIdGnrService; +import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; +import kcc.com.cmm.ComDefaultCodeVO; +import kcc.com.cmm.service.EgovFileMngService; +import kcc.com.cmm.service.EgovFileMngUtil; +import kcc.com.cmm.service.impl.CmmUseDAO; +import kcc.com.cmm.spring.data.util.ExcelUtil; +import kcc.com.utl.user.service.CheckLoginUtil; +import kcc.let.utl.fcc.service.EgovCryptoUtil; +import kcc.ve.cmm.VeInstrFeeMng; +import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEInstrFeeAcmdtVO; +import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEInstrFeeService; +import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctService; +import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctVO; +import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduChasiService; +import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduMIXService; +import kcc.ve.instr.tngrVisitEdu.instrInfo.service.VEInstrDetailActvtHstryService; +import kcc.ve.instr.tngrVisitEdu.instrInfo.service.VEInstrDetailActvtHstryVO; +import kcc.ve.instr.tngrVisitEdu.instrInfo.service.VEInstrDetailVO; +import kcc.ve.instr.tngrVisitEdu.instrInfo.service.VEInstrMixService; +import kcc.ve.instr.tngrVisitEdu.lctrInfo.service.VELctrDetailVO; +import kcc.ve.instr.tngrVisitEdu.lctrInfo.service.VELctrMIXService; +import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEAPrcsAplctPrdInstrAsgnmService; +import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEAPrcsAplctPrdInstrAsgnmVO; +import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsAplctPrdService; +import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsCmpltDetailService; +import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsDetailVO; +import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsMIXService; +import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsOnlnCntntService; +import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsService; + +/** + * 기반강화연수(관리자) 강사관리 + * 기반강화연수에 관한 controller 클래스를 정의한다. + * @author 조용준 + * @since 2023.07.12 + * @version 1.0 + * @see + * + *
+ * << 개정이력(Modification Information) >>
+ *
+ *   수정일      수정자           수정내용
+ *  -------    --------    ---------------------------
+ *   2021.12.16  조용준          최초 생성
+ *
+ * 
+ */ + +@Controller +//@RequestMapping("/kccadr/oprtn/fndthEnhanceTrn") +public class CmdInstrMngController { + + private static final Logger LOGGER = LoggerFactory.getLogger(CmdInstrMngController.class); + + private final String LCTR_DIV_CD = "70"; + + //로그인 체크 util + @Resource(name = "checkLoginUtil") + private CheckLoginUtil checkLoginUtil; + + //과정 관리 + @Resource(name = "vEPrcsService") + private VEPrcsService vEPrcsService; + + //과정 관리 + @Resource(name = "vEEduMIXService") + private VEEduMIXService vEEduMIXService; + + //온라인콘텐츠과정 관리 + @Resource(name = "vEPrcsOnlnCntntService") + private VEPrcsOnlnCntntService vEPrcsOnlnCntntService; + + //과정차시 관리 + @Resource(name = "vEPrcsAplctPrdService") + private VEPrcsAplctPrdService vEPrcsAplctPrdService; + + //과정차시 관리 + @Resource(name = "vEPrcsMIXService") + private VEPrcsMIXService vEPrcsMIXService; + + //과정차시 관리 + @Resource(name = "vEAPrcsAplctPrdInstrAsgnmService") + private VEAPrcsAplctPrdInstrAsgnmService vEAPrcsAplctPrdInstrAsgnmService; + + //교육과정순번 + @Resource(name="prcsGnrService") + private EgovIdGnrService prcsGnrService; + + //과정신청기간순번 + @Resource(name="prcsAplctPrdGnrService") + private EgovIdGnrService prcsAplctPrdGnrService; + + //과정온라인콘텐츠순번 + @Resource(name="prcsOnlnGnrService") + private EgovIdGnrService prcsOnlnGnrService; + + //교육신청 + @Resource(name = "vEEduAplctService") + private VEEduAplctService vEEduAplctService; + + //차시 + @Resource(name = "vEEduChasiService") + private VEEduChasiService vVEEduChasiService; + + //첨부파일 경로, realPath 설정 + @Resource(name="EgovFileMngUtil") + private EgovFileMngUtil fileUtil; + + //암복호화 유틸 + @Resource(name = "egovCryptoUtil") + EgovCryptoUtil egovCryptoUtil; + + //교육과정신청 + @Resource(name = "vEPrcsCmpltDetailService") + private VEPrcsCmpltDetailService vEPrcsCmpltDetailService; + + @Resource(name = "EgovFileMngService") + private EgovFileMngService fileService; + + //과정 + @Resource(name="cmmUseDAO") + private CmmUseDAO cmmUseDAO; + + //과정신청기간순번 + @Resource(name="vePrcsAplctPrdEtcGnrService") + private EgovIdGnrService vePrcsAplctPrdEtcGnrService; + + // 강사료 + @Resource(name = "vEInstrFeeService") + private VEInstrFeeService vEInstrFeeService; + + //rkdtk 관리 + @Resource(name = "vEInstrMixService") + private VEInstrMixService vEInstrMixService; + + //강의설정 MIX + @Resource(name = "vELctrMIXService") + private VELctrMIXService vELctrMIXService; + + // 첨부파일 정보 + @Resource(name="vEInstrDetailActvtHstryService") + private VEInstrDetailActvtHstryService vEInstrDetailActvtHstryService; + + /* + + // 교육신청 서비스단 + @Resource(name = "AdjReqMgrService") + private AdjReqMgrService adjReqMgrService; + + // eGov 공통코드 + @Resource(name = "EgovCmmUseService") + private EgovCmmUseService cmmUseService; + + @Resource(name = "EgovFileMngService") + private EgovFileMngService fileService; + + // global 프로퍼티 + @Resource(name="globalSettings") + protected Properties propertiesService; + + //첨부파일 경로, realPath 설정 + @Resource(name="EgovFileMngUtil") + private EgovFileMngUtil fileUtil; + + // 첨부파일 정보 + @Resource(name="EgovFileMngService") + private EgovFileMngService fileMngService; + + //암복호화 유틸 + @Resource(name = "egovCryptoUtil") + EgovCryptoUtil egovCryptoUtil; + + + @Resource(name="KccadrMgrUdtService") + private KccadrMgrUdtService kccadrMgrUdtService; + + // 교육신청 서비스단 + @Resource(name = "checkAdrProcessUtil") + private CheckAdrProcessUtil checkAdrProcessUtil; + */ + /** + * 기소유예 교육확정관리목록 + */ + @RequestMapping("/kccadr/oprtn/cmdTrgt/cndtnInstrMngList.do") + public String cndtnInstrMngList( @ModelAttribute("vEPrcsDetailVO") VEPrcsDetailVO vEPrcsDetailVO + , HttpSession session, ModelMap model ) throws Exception { + + + + //로그인 처리==================================== + //로그인 정보 가져오기 + + String s_oprtnLoginCheckNInfo = checkLoginUtil.oprtnCheckNInfo(model); + if (!"".equals(s_oprtnLoginCheckNInfo)) return s_oprtnLoginCheckNInfo; + + //로그인 처리==================================== + + //1.pageing step1 + PaginationInfo paginationInfo = this.setPagingStep1(vEPrcsDetailVO); + + //임시로 페이징 처리를 안하기 위해서 RecordCountPerPage 수를 10000 으로 셋팅함 + //paginationInfo.setRecordCountPerPage(10000); + + //2. pageing step2 + vEPrcsDetailVO = this.setPagingStep2(vEPrcsDetailVO, paginationInfo); + + //기반강화 조회 + vEPrcsDetailVO.setLctrDivCd(LCTR_DIV_CD); //강의구분코드 VE0011 10-청소년강의, 20-성인강의, 30-체험, 50-기반강화, 60-조건부 + + //교육확정 목록 조회 + vEPrcsDetailVO.setDdlnCd("20"); + + //정렬 + System.out.println(vEPrcsDetailVO.getSearchSortCnd()); + System.out.println(vEPrcsDetailVO.getSearchSortOrd()); + if(!"".equals(vEPrcsDetailVO.getSearchSortCnd())){ //최초조회시 최신것 조회List + vEPrcsDetailVO.setOrderByQuery(vEPrcsDetailVO.getSearchSortCnd() + " " +vEPrcsDetailVO.getSearchSortOrd()); + } + + + //강사명 검색시 암호화 + if (!"".equals(vEPrcsDetailVO.getSrchKwd3_1())) { + vEPrcsDetailVO.setSrchKwd3_1(egovCryptoUtil.encrypt(vEPrcsDetailVO.getSrchKwd3_1())); + } + + List vEPrcsDetailVOList = vEPrcsMIXService.selectPagingList4FndthInstr(vEPrcsDetailVO); + + //강사명 검색시 복호화 + if (!"".equals(vEPrcsDetailVO.getSrchKwd3_1())) { + vEPrcsDetailVO.setSrchKwd3_1(egovCryptoUtil.decrypt(vEPrcsDetailVO.getSrchKwd3_1())); + } + + + //3.pageing step3 + paginationInfo = this.setPagingStep3(vEPrcsDetailVOList, paginationInfo); + + + model.addAttribute("paginationInfo", paginationInfo); + + // 지정된 강사가 있는지 확인 + vEPrcsDetailVOList.stream().forEach(t->{ + + List vEAPrcsAplctPrdInstrAsgnmList = vEAPrcsAplctPrdInstrAsgnmService.findByPrcsAplctPrdOrd(t.getPrcsAplctPrdOrd()); + if(vEAPrcsAplctPrdInstrAsgnmList.size() > 0) { + t.setInstrCnt(Integer.toString(vEAPrcsAplctPrdInstrAsgnmList.size())); + } + + }); + + //대상 리스트, 페이징 정보 전달 + vEPrcsDetailVOList = egovCryptoUtil.decryptvEPrcsDetailList(vEPrcsDetailVOList); + model.addAttribute("list", vEPrcsDetailVOList); + + + + + return "oprtn/cmdTrgt/cndtnInstrMngList"; + } + + /** + * 강사료 확정 처리 목록 화면 + */ + //@RequestMapping("eduInstrFeeMngList.do") + @RequestMapping("/kccadr/oprtn/cmdTrgt/eduInstrFeeMngList.do") + public String eduInstrFeeMngList( + //@ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO + @ModelAttribute("vEPrcsDetailVO") VEPrcsDetailVO vEPrcsDetailVO + , ModelMap model + ) throws Exception { + + //로그인 처리==================================== + //로그인 정보 가져오기 + + //String s_oprtnLoginCheckNInfo = checkLoginUtil.oprtnCheckNInfo(model); + //if (!"".equals(s_oprtnLoginCheckNInfo)) return s_oprtnLoginCheckNInfo; + + //로그인 처리==================================== + + try { + //로그인 처리==================================== + //로그인 정보 가져오기 + + String s_oprtnLoginCheckNInfo = checkLoginUtil.oprtnCheckNInfo(model); + if (!"".equals(s_oprtnLoginCheckNInfo)) return s_oprtnLoginCheckNInfo; + + //로그인 처리==================================== + + //1.pageing step1 + PaginationInfo paginationInfo = this.setPagingStep1(vEPrcsDetailVO); + + //임시로 페이징 처리를 안하기 위해서 RecordCountPerPage 수를 10000 으로 셋팅함 + //paginationInfo.setRecordCountPerPage(10000); + + //2. pageing step2 + vEPrcsDetailVO = this.setPagingStep2(vEPrcsDetailVO, paginationInfo); + + //기반강화 조회 + vEPrcsDetailVO.setLctrDivCd(LCTR_DIV_CD); //강의구분코드 VE0011 10-청소년강의, 20-성인강의, 30-체험, 50-기반강화, 60-조건부 + + //교육확정 목록 조회 + vEPrcsDetailVO.setDdlnCd("20"); + + //정렬 + System.out.println(vEPrcsDetailVO.getSearchSortCnd()); + System.out.println(vEPrcsDetailVO.getSearchSortOrd()); + if(!"".equals(vEPrcsDetailVO.getSearchSortCnd())){ //최초조회시 최신것 조회List + vEPrcsDetailVO.setOrderByQuery(vEPrcsDetailVO.getSearchSortCnd() + " " +vEPrcsDetailVO.getSearchSortOrd()); + } + + + //강사명 검색시 암호화 + if (!"".equals(vEPrcsDetailVO.getSrchKwd3_1())) { + vEPrcsDetailVO.setSrchKwd3_1(egovCryptoUtil.encrypt(vEPrcsDetailVO.getSrchKwd3_1())); + } + + List vEPrcsDetailVOList = vEPrcsMIXService.selectPagingList4FndthInstr(vEPrcsDetailVO); + + //강사명 검색시 복호화 + if (!"".equals(vEPrcsDetailVO.getSrchKwd3_1())) { + vEPrcsDetailVO.setSrchKwd3_1(egovCryptoUtil.decrypt(vEPrcsDetailVO.getSrchKwd3_1())); + } + + + //3.pageing step3 + paginationInfo = this.setPagingStep3(vEPrcsDetailVOList, paginationInfo); + + + model.addAttribute("paginationInfo", paginationInfo); + + // 지정된 강사가 있는지 확인 + vEPrcsDetailVOList.stream().forEach(t->{ + + List vEAPrcsAplctPrdInstrAsgnmList = vEAPrcsAplctPrdInstrAsgnmService.findByPrcsAplctPrdOrd(t.getPrcsAplctPrdOrd()); + if(vEAPrcsAplctPrdInstrAsgnmList.size() > 0) { + t.setInstrCnt(Integer.toString(vEAPrcsAplctPrdInstrAsgnmList.size())); + } + + }); + + + // 강사료 계산 + //vEEduAplctVO = egovCryptoUtil.encryptVEEduAplctVOInfo(vEEduAplctVO); + //List vEEduAplctVOList = vEEduMIXService.selectTngrFeePagingList(vEEduAplctVO); + VEEduAplctVO vo = new VEEduAplctVO(); + for(int i=0; i < vEPrcsDetailVOList.size(); i++) { + //vo = egovCryptoUtil.decryptVEEduAplctVOInfo(vEEduAplctVOList.get(i)); + //System.out.println(" @@@@@@@@@@@@@ "+vo.getChrgNm()); + //vEEduAplctVOList.get(i).setChrgNm(vo.getChrgNm()); + + // 강사료 계산 + VeInstrFeeMng veInstrFeeMng = new VeInstrFeeMng(); + VEInstrFeeAcmdtVO vEInstrFeeAcmdtVO = veInstrFeeMng.VeInstrFeeMng4Fndth( + vEInstrFeeService + , vEPrcsDetailVOList.get(i).getPrcsAplctPrdOrd() + , vEPrcsDetailVOList.get(i).getUserId() + ); + vEPrcsDetailVOList.get(i).setInstrFeeSum(Integer.toString(vEInstrFeeAcmdtVO.getInstrFeeSum())); + + System.out.println("vEPrcsDetailVOList.get(i).getInstrPhone()"); + System.out.println(vEPrcsDetailVOList.get(i).getInstrPhone()); + System.out.println(vEPrcsDetailVOList.get(i).getInstrPhone()); + + } + + + //대상 리스트, 페이징 정보 전달 + vEPrcsDetailVOList = egovCryptoUtil.decryptvEPrcsDetailList(vEPrcsDetailVOList); + model.addAttribute("list", vEPrcsDetailVOList); + + System.out.println("vEPrcsDetailVOList.toString()"); + System.out.println(vEPrcsDetailVOList.toString()); + }catch(Exception ex) { + ex.printStackTrace(); + } + + return "oprtn/cmdTrgt/eduInstrFeeMngList"; + } + + /** + * 강사료 확정 처리 목록 Excel + * @param model + * @return + * @throws Exception + */ + @SuppressWarnings("rawtypes") + @RequestMapping(value = "/kccadr/oprtn/cmdTrgt/eduInstrFeeExcelDownLoad.do") + public ModelAndView eduInstrFeeExcelDownLoad( + //@ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO + @ModelAttribute("vEPrcsDetailVO") VEPrcsDetailVO vEPrcsDetailVO + , ModelMap model) throws Exception { + + + //로그인 처리==================================== + //로그인 정보 가져오기 + + //String s_oprtnLoginCheckNInfo = checkLoginUtil.oprtnCheckNInfo(model); + //if (!"".equals(s_oprtnLoginCheckNInfo)) return s_oprtnLoginCheckNInfo; + + //로그인 처리==================================== + + //1.pageing step1 + PaginationInfo paginationInfo = this.setPagingStep1(vEPrcsDetailVO); + + //임시로 페이징 처리를 안하기 위해서 RecordCountPerPage 수를 10000 으로 셋팅함 + //paginationInfo.setRecordCountPerPage(10000); + + //2. pageing step2 + vEPrcsDetailVO = this.setPagingStep2(vEPrcsDetailVO, paginationInfo); + + //기반강화 조회 + vEPrcsDetailVO.setLctrDivCd(LCTR_DIV_CD); //강의구분코드 VE0011 10-청소년강의, 20-성인강의, 30-체험, 50-기반강화, 60-조건부 + + //교육확정 목록 조회 + vEPrcsDetailVO.setDdlnCd("20"); + + //정렬 + System.out.println(vEPrcsDetailVO.getSearchSortCnd()); + System.out.println(vEPrcsDetailVO.getSearchSortOrd()); + if(!"".equals(vEPrcsDetailVO.getSearchSortCnd())){ //최초조회시 최신것 조회List + vEPrcsDetailVO.setOrderByQuery(vEPrcsDetailVO.getSearchSortCnd() + " " +vEPrcsDetailVO.getSearchSortOrd()); + } + + + //강사명 검색시 암호화 + if (!"".equals(vEPrcsDetailVO.getSrchKwd3_1())) { + vEPrcsDetailVO.setSrchKwd3_1(egovCryptoUtil.encrypt(vEPrcsDetailVO.getSrchKwd3_1())); + } + + List vEPrcsDetailVOList = vEPrcsMIXService.selectPagingList4FndthInstr(vEPrcsDetailVO); + + //강사명 검색시 복호화 + if (!"".equals(vEPrcsDetailVO.getSrchKwd3_1())) { + vEPrcsDetailVO.setSrchKwd3_1(egovCryptoUtil.decrypt(vEPrcsDetailVO.getSrchKwd3_1())); + } + + + //3.pageing step3 + paginationInfo = this.setPagingStep3(vEPrcsDetailVOList, paginationInfo); + + + model.addAttribute("paginationInfo", paginationInfo); + + vEPrcsDetailVOList = egovCryptoUtil.decryptvEPrcsDetailList(vEPrcsDetailVOList); + + + VeInstrFeeMng veInstrFeeMng = new VeInstrFeeMng(); + vEPrcsDetailVOList.forEach( vo -> { + ComDefaultCodeVO codeParam = new ComDefaultCodeVO(); + + try { + + // 강사료 계산 + VEInstrFeeAcmdtVO vEInstrFeeAcmdtVO = veInstrFeeMng.VeInstrFeeMng4Fndth4Excel(vEInstrFeeService, vo.getPrcsAplctPrdOrd(), vo.getUserId()); + + vo.setInstrFeeSum(String.format("%,d", vEInstrFeeAcmdtVO.getInstrFeeSum())); + + } + catch(Exception ex) { + System.out.println(ex.toString()); + + } + }); + + List excelData = new ArrayList<>(); + excelData.addAll(vEPrcsDetailVOList); + // 세팅값 + String title = "강사료 지급내역"; + + // 너비 + int[] width = { + 4000, 4000 + , 4000, 4000, 4000 + , 4000 + }; + + // 헤더 + String[] header = { + "교육일자", "과정명" + , "강사이름", "강사료", "교통비" + , "강사료 합계" + }; + + // 컬럼명 + String[] order = { + "EduHopeDt", "PrcsNm" + , "InstrNm", "InstrFee", "TrafficFee" + , "InstrFeeSum" + }; + + // 호출 + SXSSFWorkbook workbook = ExcelUtil.makeSimpleFruitExcelWorkbook(excelData , header, order, width, title); + model.addAttribute("locale", Locale.KOREA); + model.addAttribute("workbook", workbook); + model.addAttribute("workbookName", title); + + ModelAndView modelAndView = new ModelAndView(); + modelAndView.setViewName("excelDownloadView"); + modelAndView.addObject(model); + + return modelAndView; + } + + /** + * 교육실적통계 화면 + */ + @RequestMapping("/kccadr/oprtn/cmdTrgt/newEduPrfrmMngList.do") + public String newEduPrfrmMngList( + @ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO + , @ModelAttribute("vELctrDetailVO") VELctrDetailVO vELctrDetailVO + , @ModelAttribute("vEInstrDetailVODetail") VEInstrDetailVO vEInstrDetailVODetail + + , HttpSession session + , ModelMap model + ) throws Exception { + + //LoginVO user = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; + + + //설정 년 리스트(과거~올해+1) + List selectStngYrList = vELctrMIXService.selectStngYrList(vELctrDetailVO); + model.addAttribute("selectStngYrList", selectStngYrList); + + //차시별 정보 + VEPrcsDetailVO vEPrcsDetailVO = new VEPrcsDetailVO(); + vEPrcsDetailVO.setLctrDivCd(LCTR_DIV_CD); + List vEPrcsDetailVOList = vEPrcsAplctPrdService.selectPagingList4Fndth4Stts(vEPrcsDetailVO); + model.addAttribute("vEPrcsDetailVOList", vEPrcsDetailVOList); + + + //vEInstrDetailVODetail.setLctrDivCd("10"); //강의구분코드 VE0011 - 10-청소년, 20-성인, 30-체험교실, 50-실무영역, 60-기소유예 + + + //통계- ①검찰청별 교육 의뢰 현황(그래프 포함) + { + //vEInstrDetailVODetail.setInstrNm(vEInstrDetailVODetail.getSearchKeyword()); + vEInstrDetailVODetail = egovCryptoUtil.encryptVEInstrDetailVO(vEInstrDetailVODetail); + List selectAsgnmInfoT2List_no1 = vEInstrMixService.selectEduPrfrmInfo_csi_cmdTrgt_no1(vEInstrDetailVODetail); + + //복호화 + //selectAsgnmInfoT2List_no1 = egovCryptoUtil.decryptVELctrDetailVOList(selectAsgnmInfoT2List_no1); + + model.addAttribute("list_no1",selectAsgnmInfoT2List_no1); + } + + + //통계- ②월별 교육의뢰현황(그래프 포함) + { + //vEInstrDetailVODetail.setNo3("10"); /* 10-횟수, 20-인원 */ + //vEInstrDetailVODetail.setInstrNm(vEInstrDetailVODetail.getSearchKeyword()); + vEInstrDetailVODetail = egovCryptoUtil.encryptVEInstrDetailVO(vEInstrDetailVODetail); + List selectAsgnmInfoT2List_no2 = vEInstrMixService.selectEduPrfrmInfo_csi_cmdTrgt_no2(vEInstrDetailVODetail); + + //복호화 + //selectAsgnmInfoT2List_no2 = egovCryptoUtil.decryptVELctrDetailVOList(selectAsgnmInfoT2List_no2); + + model.addAttribute("list_no2",selectAsgnmInfoT2List_no2); + } + + + //통계- ③대상별 교육의뢰현황(그래프 포함) + { + //vEInstrDetailVODetail.setNo3("20"); /* 10-횟수, 20-인원 */ + //vEInstrDetailVODetail.setInstrNm(vEInstrDetailVODetail.getSearchKeyword()); + vEInstrDetailVODetail = egovCryptoUtil.encryptVEInstrDetailVO(vEInstrDetailVODetail); + List selectAsgnmInfoT2List_no3 = vEInstrMixService.selectEduPrfrmInfo_csi_cmdTrgt_no3(vEInstrDetailVODetail); + + //복호화 + //selectAsgnmInfoT2List_no3 = egovCryptoUtil.decryptVELctrDetailVOList(selectAsgnmInfoT2List_no3); + + model.addAttribute("list_no3",selectAsgnmInfoT2List_no3); + } + + + //통계- ④검찰청별 교육 수료 현황(그래프 포함) + { + vEInstrDetailVODetail = egovCryptoUtil.encryptVEInstrDetailVO(vEInstrDetailVODetail); + vEInstrDetailVODetail.setSearchEduStateCd("20"); //이수만 보기 + List selectAsgnmInfoT4List_no4 = vEInstrMixService.selectEduPrfrmInfo_csi_cmdTrgt_no4(vEInstrDetailVODetail); + + model.addAttribute("list_no4",selectAsgnmInfoT4List_no4); + } + + // ⑤월별 교육이수현황(그래프 포함) - 대상이 없어서 제공안됨 + { + vEInstrDetailVODetail = egovCryptoUtil.encryptVEInstrDetailVO(vEInstrDetailVODetail); + vEInstrDetailVODetail.setSearchEduStateCd("20"); //이수만 보기 + List selectAsgnmInfoT5List = vEInstrMixService.selectEduPrfrmInfo_csi_cmdTrgt_no5(vEInstrDetailVODetail); + model.addAttribute("list_no5",selectAsgnmInfoT5List); + } + // ⑥대상별 교육이수현황(그래프 포함) - 대상이 없어서 제공안됨 + { + vEInstrDetailVODetail = egovCryptoUtil.encryptVEInstrDetailVO(vEInstrDetailVODetail); + vEInstrDetailVODetail.setSearchEduStateCd("20"); //이수만 보기 + List selectAsgnmInfoT6List = vEInstrMixService.selectEduPrfrmInfo_csi_cmdTrgt_no6(vEInstrDetailVODetail); + model.addAttribute("list_no6",selectAsgnmInfoT6List); + } + // ⑦월별 교육차시별 차시명, 이수, 미이수, 연기인원 통계 + { + vEInstrDetailVODetail = egovCryptoUtil.encryptVEInstrDetailVO(vEInstrDetailVODetail); + //vEInstrDetailVODetail.setSearchEduStateCd("20"); //이수만 보기 + List selectAsgnmInfoT7List = vEInstrMixService.selectEduPrfrmInfo_csi_cmdTrgt_no7(vEInstrDetailVODetail); + model.addAttribute("list_no7",selectAsgnmInfoT7List); + } + //통계- ⑧인구감소지역별 교육횟수 교육인원, 교육기관, 교육일자(그래프 포함)) - 대상이 없어서 제공안됨 + /* + { + vEInstrDetailVODetail = egovCryptoUtil.encryptVEInstrDetailVO(vEInstrDetailVODetail); + List selectAsgnmInfoT2List_no8 = vEInstrMixService.selectEduPrfrmInfo_tngr_no8(vEInstrDetailVODetail); + + //복호화 + selectAsgnmInfoT2List_no8 = egovCryptoUtil.decryptVELctrDetailVOList(selectAsgnmInfoT2List_no8); + + model.addAttribute("list_no8",selectAsgnmInfoT2List_no8); + } + */ + + + //통계- ⑨도서벽지별 지역교육횟수, 교육인원, 교육기관, 교육일자(그래프 포함)) - 대상이 없어서 제공안됨 + /* + { + vEInstrDetailVODetail = egovCryptoUtil.encryptVEInstrDetailVO(vEInstrDetailVODetail); + List selectAsgnmInfoT2List_no9 = vEInstrMixService.selectEduPrfrmInfo_tngr_no9(vEInstrDetailVODetail); + + //복호화 + selectAsgnmInfoT2List_no9 = egovCryptoUtil.decryptVELctrDetailVOList(selectAsgnmInfoT2List_no9); + + model.addAttribute("list_no9",selectAsgnmInfoT2List_no9); + } + */ + return "oprtn/cmdTrgt/newEduPrfrmMngList"; + + + } + + /** + * @methodName : instrActvtHstrySignMngList + * @author : 이호영 + * @date : 2023.12.28 + * @description : 직인대장관리(이수증) - 기반 기소 + * @param vEInstrDetailActvtHstryVO + * @param model + * @param request + * @return + * @throws Exception + */ + @RequestMapping("/kccadr/oprtn/cmdTrgt/instrActvtHstrySignAndCmpltCrtfcMngList.do") + public String instrActvtHstrySignAndCmpltCrtfcMngList( + @ModelAttribute("vEInstrActvtHstryVO") VEInstrDetailActvtHstryVO vEInstrDetailActvtHstryVO + , ModelMap model + , HttpServletRequest request + ) throws Exception { + + //로그인 처리==================================== + //로그인 정보 가져오기 + //LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); //권한에 따른 로그인 정보 가져오기 + //SsoLoginVO ssoLoginVO = checkLoginUtil.getSSOLoginVO(request); //SSO 로그인 정보 가져오기 + +// if (loginVO == null || ssoLoginVO == null) { +// return checkLoginUtil.getUserLoginPage(model); //로그인 정보가 없으면 로그인 페이지로 이동한다. +// } + //로그인 처리==================================== + + //1.pageing step1 + PaginationInfo paginationInfo = this.setPagingStep1_VEInstrDetailActvtHstryVO(vEInstrDetailActvtHstryVO); + //2. pageing step2 + vEInstrDetailActvtHstryVO = this.setPagingStep2_VEInstrDetailActvtHstryVO(vEInstrDetailActvtHstryVO, paginationInfo); + vEInstrDetailActvtHstryVO.setSearchKeyword(egovCryptoUtil.encrypt(vEInstrDetailActvtHstryVO.getSearchKeyword())); +// List vEInstrDetailActvtHstryVOList = vEInstrDetailActvtHstryService.selectSignPagingList(vEInstrDetailActvtHstryVO); + List vEInstrDetailActvtHstryVOList = vEInstrDetailActvtHstryService.selectSignAndCmpltCrtfcPagingList(vEInstrDetailActvtHstryVO); + + vEInstrDetailActvtHstryVOList.stream().forEach(t-> t.setMberNm(egovCryptoUtil.decrypt(t.getMberNm()))); + + //3.pageing step3 + paginationInfo = this.setPagingStep3_VEInstrDetailActvtHstryVO(vEInstrDetailActvtHstryVOList, paginationInfo); + model.addAttribute("paginationInfo", paginationInfo); + + // 검색어 복호화 + vEInstrDetailActvtHstryVO.setSearchKeyword(egovCryptoUtil.decrypt(vEInstrDetailActvtHstryVO.getSearchKeyword())); + //대상 리스트, 페이징 정보 전달 + model.addAttribute("list", vEInstrDetailActvtHstryVOList); + + + +// return "oprtn/cmm/instrActvtHstrySignMngList"; + return "oprtn/cmdTrgt/instrActvtHstrySignAndCmpltCrtfcMngList"; + } + + /** + * 교육실적통계 화면-개별 + */ + @RequestMapping("/kccadr/oprtn/cmdTrgt/newEduPrfrmEAMngList.do") + public String newEduPrfrmEAMngList( + @ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO + , @ModelAttribute("vELctrDetailVO") VELctrDetailVO vELctrDetailVO + , @ModelAttribute("vEInstrDetailVODetail") VEInstrDetailVO vEInstrDetailVODetail + + , HttpSession session + , ModelMap model + ) throws Exception { + + //LoginVO user = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; + + + //설정 년 리스트(과거~올해+1) + List selectStngYrList = vELctrMIXService.selectStngYrList(vELctrDetailVO); + model.addAttribute("selectStngYrList", selectStngYrList); + + //차시별 정보 + VEPrcsDetailVO vEPrcsDetailVO = new VEPrcsDetailVO(); + List vEPrcsDetailVOList = vEPrcsAplctPrdService.selectPagingList4Fndth4Stts(vEPrcsDetailVO); + model.addAttribute("vEPrcsDetailVOList", vEPrcsDetailVOList); + + + //vEInstrDetailVODetail.setLctrDivCd("10"); //강의구분코드 VE0011 - 10-청소년, 20-성인, 30-체험교실, 50-실무영역, 60-기소유예 + + + //통계- ①검찰청별 교육 의뢰 현황(그래프 포함) + { + //vEInstrDetailVODetail.setInstrNm(vEInstrDetailVODetail.getSearchKeyword()); + vEInstrDetailVODetail = egovCryptoUtil.encryptVEInstrDetailVO(vEInstrDetailVODetail); + List selectAsgnmInfoT2List_no1 = vEInstrMixService.selectEduPrfrmInfo_csi_no1(vEInstrDetailVODetail); + + //복호화 + //selectAsgnmInfoT2List_no1 = egovCryptoUtil.decryptVELctrDetailVOList(selectAsgnmInfoT2List_no1); + + model.addAttribute("list_no1",selectAsgnmInfoT2List_no1); + } + + + //통계- ②월별 교육의뢰현황(그래프 포함) + { + //vEInstrDetailVODetail.setNo3("10"); /* 10-횟수, 20-인원 */ + //vEInstrDetailVODetail.setInstrNm(vEInstrDetailVODetail.getSearchKeyword()); + vEInstrDetailVODetail = egovCryptoUtil.encryptVEInstrDetailVO(vEInstrDetailVODetail); + List selectAsgnmInfoT2List_no2 = vEInstrMixService.selectEduPrfrmInfo_csi_no2(vEInstrDetailVODetail); + + //복호화 + //selectAsgnmInfoT2List_no2 = egovCryptoUtil.decryptVELctrDetailVOList(selectAsgnmInfoT2List_no2); + + model.addAttribute("list_no2",selectAsgnmInfoT2List_no2); + } + + + //통계- ③월별 지역별 교육인원(그래프 포함) + { + //vEInstrDetailVODetail.setNo3("20"); /* 10-횟수, 20-인원 */ + //vEInstrDetailVODetail.setInstrNm(vEInstrDetailVODetail.getSearchKeyword()); + vEInstrDetailVODetail = egovCryptoUtil.encryptVEInstrDetailVO(vEInstrDetailVODetail); + List selectAsgnmInfoT2List_no3 = vEInstrMixService.selectEduPrfrmInfo_csi_no3(vEInstrDetailVODetail); + + //복호화 + //selectAsgnmInfoT2List_no3 = egovCryptoUtil.decryptVELctrDetailVOList(selectAsgnmInfoT2List_no3); + + model.addAttribute("list_no3",selectAsgnmInfoT2List_no3); + } + + + //통계- ④월별 강사종류별,강사별 교육횟수(그래프 포함) + { + vEInstrDetailVODetail = egovCryptoUtil.encryptVEInstrDetailVO(vEInstrDetailVODetail); + List selectAsgnmInfoT2List_no4 = vEInstrMixService.selectEduPrfrmInfo_tngr_no4(vEInstrDetailVODetail); + + //복호화 + selectAsgnmInfoT2List_no4 = egovCryptoUtil.decryptVELctrDetailVOList(selectAsgnmInfoT2List_no4); + + model.addAttribute("list_no4",selectAsgnmInfoT2List_no4); + } + + // ⑤월별 교육대상별 교육횟수(그래프 포함) - 대상이 없어서 제공안됨 + // ⑥월별 교육대상별 교육횟수(그래프 포함) - 대상이 없어서 제공안됨 + // ⑦월별 교육대상별 교육인원(그래프 포함) - 대상이 없어서 제공안됨 + { + //vEInstrDetailVODetail.setInstrNm(vEInstrDetailVODetail.getSearchKeyword()); + vEInstrDetailVODetail = egovCryptoUtil.encryptVEInstrDetailVO(vEInstrDetailVODetail); + List selectAsgnmInfoT2List_no5_no_6_no7 = vEInstrMixService.selectEduPrfrmInfo_adult_no5_no6_no7(vEInstrDetailVODetail); + + //복호화 + selectAsgnmInfoT2List_no5_no_6_no7 = egovCryptoUtil.decryptVELctrDetailVOList(selectAsgnmInfoT2List_no5_no_6_no7); + + model.addAttribute("list_no5_no6_no7",selectAsgnmInfoT2List_no5_no_6_no7); + } + //통계- ⑧인구감소지역별 교육횟수 교육인원, 교육기관, 교육일자(그래프 포함)) - 대상이 없어서 제공안됨 + /* + { + vEInstrDetailVODetail = egovCryptoUtil.encryptVEInstrDetailVO(vEInstrDetailVODetail); + List selectAsgnmInfoT2List_no8 = vEInstrMixService.selectEduPrfrmInfo_tngr_no8(vEInstrDetailVODetail); + + //복호화 + selectAsgnmInfoT2List_no8 = egovCryptoUtil.decryptVELctrDetailVOList(selectAsgnmInfoT2List_no8); + + model.addAttribute("list_no8",selectAsgnmInfoT2List_no8); + } + */ + + + //통계- ⑨도서벽지별 지역교육횟수, 교육인원, 교육기관, 교육일자(그래프 포함)) - 대상이 없어서 제공안됨 + /* + { + vEInstrDetailVODetail = egovCryptoUtil.encryptVEInstrDetailVO(vEInstrDetailVODetail); + List selectAsgnmInfoT2List_no9 = vEInstrMixService.selectEduPrfrmInfo_tngr_no9(vEInstrDetailVODetail); + + //복호화 + selectAsgnmInfoT2List_no9 = egovCryptoUtil.decryptVELctrDetailVOList(selectAsgnmInfoT2List_no9); + + model.addAttribute("list_no9",selectAsgnmInfoT2List_no9); + } + */ + return "oprtn/cmdTrgt/newEduPrfrmEAMngList"; + + + } + + /** + * 교육실적통계 Excel - 조건부기소유예 - ①검찰청별 교육 의뢰 현황(그래프 포함) + * @param model + * @return + * @throws Exception + */ + @SuppressWarnings("rawtypes") + @RequestMapping(value = "/kccadr/oprtn/cmdTrgt/eduPrfrmMngExcelDownLoad_csi_no1.do") + public ModelAndView eduPrfrmMngExcelDownLoad_csi_no1( + @ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO + , @ModelAttribute("vEInstrDetailVODetail") VEInstrDetailVO vEInstrDetailVODetail + , ModelMap model + ) throws Exception { + + ModelAndView modelAndView = new ModelAndView(); + modelAndView.setViewName("excelDownloadView"); + + try { + + //통계- ①월별 횟수/교육인원(그래프 포함) + //vEInstrDetailVODetail.setInstrNm(vEInstrDetailVODetail.getSearchKeyword()); + vEInstrDetailVODetail = egovCryptoUtil.encryptVEInstrDetailVO(vEInstrDetailVODetail); + List selectAsgnmInfoT2List = vEInstrMixService.selectEduPrfrmInfo_csi_no1(vEInstrDetailVODetail); + + //복호화 + //selectAsgnmInfoT2List = egovCryptoUtil.decryptVELctrDetailVOList(selectAsgnmInfoT2List); + + System.out.println("out-list-2"); + + + List excelData = new ArrayList<>(); + excelData.addAll(selectAsgnmInfoT2List); + + + // 세팅값 + String title = "교육실적통계-검찰청별 교육 의뢰 현황"; + int[] width = { + + 4000, 4000 + + }; // 너비 + + //33개 항목 + String[] header = { + + "구분" + , "의뢰(명)" + + }; + + String[] order = { + + "CodeNm" + , "Cnt" + + }; + + excelDown( + excelData, + title, + width, + header, + order, + model + ); + + }catch(Exception ep) { + ep.getStackTrace(); + } + + + modelAndView.addObject(model); + + return modelAndView; + } + + /** + * 교육실적통계 Excel - 조건부기소유예 - 2검찰청별 교육 의뢰 현황(그래프 포함) + * @param model + * @return + * @throws Exception + */ + @SuppressWarnings("rawtypes") + @RequestMapping(value = "/kccadr/oprtn/cmdTrgt/eduPrfrmMngExcelDownLoad_csi_no2.do") + public ModelAndView eduPrfrmMngExcelDownLoad_csi_no2( + @ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO + , @ModelAttribute("vEInstrDetailVODetail") VEInstrDetailVO vEInstrDetailVODetail + , ModelMap model + ) throws Exception { + + ModelAndView modelAndView = new ModelAndView(); + modelAndView.setViewName("excelDownloadView"); + + try { + + //통계- ①월별 횟수/교육인원(그래프 포함) + //vEInstrDetailVODetail.setInstrNm(vEInstrDetailVODetail.getSearchKeyword()); + vEInstrDetailVODetail = egovCryptoUtil.encryptVEInstrDetailVO(vEInstrDetailVODetail); + List selectAsgnmInfoT2List = vEInstrMixService.selectEduPrfrmInfo_csi_no2(vEInstrDetailVODetail); + + //복호화 + //selectAsgnmInfoT2List = egovCryptoUtil.decryptVELctrDetailVOList(selectAsgnmInfoT2List); + + System.out.println("out-list-2"); + + + selectAsgnmInfoT2List.get(12).setCodeNm("합계"); + + List excelData = new ArrayList<>(); + excelData.addAll(selectAsgnmInfoT2List); + + + // 세팅값 + String title = "교육실적통계-월별 교육 의뢰 현황"; + int[] width = { + + 4000, 4000 + + }; // 너비 + + //33개 항목 + String[] header = { + + "월" + , "의뢰(명)" + + }; + + String[] order = { + + "CodeNm" + , "Cnt" + + }; + + excelDown( + excelData, + title, + width, + header, + order, + model + ); + + }catch(Exception ep) { + ep.getStackTrace(); + } + + + modelAndView.addObject(model); + + return modelAndView; + } + + /** + * 교육실적통계 Excel - 조건부기소유예 - 3대상별 교육 의뢰 현황(그래프 포함) + * @param model + * @return + * @throws Exception + */ + @SuppressWarnings("rawtypes") + @RequestMapping(value = "/kccadr/oprtn/cmdTrgt/eduPrfrmMngExcelDownLoad_csi_no3.do") + public ModelAndView eduPrfrmMngExcelDownLoad_csi_no3( + @ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO + , @ModelAttribute("vEInstrDetailVODetail") VEInstrDetailVO vEInstrDetailVODetail + , ModelMap model + ) throws Exception { + + ModelAndView modelAndView = new ModelAndView(); + modelAndView.setViewName("excelDownloadView"); + + try { + + //통계- ①월별 횟수/교육인원(그래프 포함) + //vEInstrDetailVODetail.setInstrNm(vEInstrDetailVODetail.getSearchKeyword()); + vEInstrDetailVODetail = egovCryptoUtil.encryptVEInstrDetailVO(vEInstrDetailVODetail); + List selectAsgnmInfoT3List = vEInstrMixService.selectEduPrfrmInfo_csi_no3(vEInstrDetailVODetail); + + //복호화 + //selectAsgnmInfoT2List = egovCryptoUtil.decryptVELctrDetailVOList(selectAsgnmInfoT2List); + + System.out.println("out-list-2"); + + + selectAsgnmInfoT3List.get(2).setCodeNm("합계"); + + List excelData = new ArrayList<>(); + excelData.addAll(selectAsgnmInfoT3List); + + + // 세팅값 + String title = "교육실적통계-대상별 교육 의뢰 현황"; + int[] width = { + + 4000, 4000 + + }; // 너비 + + //33개 항목 + String[] header = { + + "대상" + , "의뢰(명)" + + }; + + String[] order = { + + "CodeNm" + , "Cnt" + + }; + + excelDown( + excelData, + title, + width, + header, + order, + model + ); + + }catch(Exception ep) { + ep.getStackTrace(); + } + + + modelAndView.addObject(model); + + return modelAndView; + } + + /** + * 교육실적통계 Excel - 조건부기소유예 - 4검찰청별 교육 이수 현황(그래프 포함) + * @param model + * @return + * @throws Exception + */ + @SuppressWarnings("rawtypes") + @RequestMapping(value = "/kccadr/oprtn/cmdTrgt/eduPrfrmMngExcelDownLoad_csi_no4.do") + public ModelAndView eduPrfrmMngExcelDownLoad_csi_no4( + @ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO + , @ModelAttribute("vEInstrDetailVODetail") VEInstrDetailVO vEInstrDetailVODetail + , ModelMap model + ) throws Exception { + + ModelAndView modelAndView = new ModelAndView(); + modelAndView.setViewName("excelDownloadView"); + + try { + + //통계- ①월별 횟수/교육인원(그래프 포함) + //vEInstrDetailVODetail.setInstrNm(vEInstrDetailVODetail.getSearchKeyword()); + vEInstrDetailVODetail = egovCryptoUtil.encryptVEInstrDetailVO(vEInstrDetailVODetail); + vEInstrDetailVODetail.setSearchEduStateCd("20"); //이수만 보기 + List selectAsgnmInfoT2List = vEInstrMixService.selectEduPrfrmInfo_csi_no4(vEInstrDetailVODetail); + + //복호화 + //selectAsgnmInfoT2List = egovCryptoUtil.decryptVELctrDetailVOList(selectAsgnmInfoT2List); + + System.out.println("out-list-2"); + + + List excelData = new ArrayList<>(); + excelData.addAll(selectAsgnmInfoT2List); + + + // 세팅값 + String title = "교육실적통계-검찰청별 교육 이수 현황"; + int[] width = { + + 4000, 4000 + + }; // 너비 + + //33개 항목 + String[] header = { + + "구분" + , "이수(명)" + + }; + + String[] order = { + + "CodeNm" + , "Cnt" + + }; + + excelDown( + excelData, + title, + width, + header, + order, + model + ); + + }catch(Exception ep) { + ep.getStackTrace(); + } + + + modelAndView.addObject(model); + + return modelAndView; + } + + /** + * 교육실적통계 Excel - 조건부기소유예 - 5검찰청별 교육 이수 현황(그래프 포함) + * @param model + * @return + * @throws Exception + */ + @SuppressWarnings("rawtypes") + @RequestMapping(value = "/kccadr/oprtn/cmdTrgt/eduPrfrmMngExcelDownLoad_csi_no5.do") + public ModelAndView eduPrfrmMngExcelDownLoad_csi_no5( + @ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO + , @ModelAttribute("vEInstrDetailVODetail") VEInstrDetailVO vEInstrDetailVODetail + , ModelMap model + ) throws Exception { + + ModelAndView modelAndView = new ModelAndView(); + modelAndView.setViewName("excelDownloadView"); + + try { + + //통계- ①월별 횟수/교육인원(그래프 포함) + //vEInstrDetailVODetail.setInstrNm(vEInstrDetailVODetail.getSearchKeyword()); + vEInstrDetailVODetail = egovCryptoUtil.encryptVEInstrDetailVO(vEInstrDetailVODetail); + vEInstrDetailVODetail.setSearchEduStateCd("20"); //이수만 보기 + List selectAsgnmInfoT2List = vEInstrMixService.selectEduPrfrmInfo_csi_no5(vEInstrDetailVODetail); + + //복호화 + //selectAsgnmInfoT2List = egovCryptoUtil.decryptVELctrDetailVOList(selectAsgnmInfoT2List); + + System.out.println("out-list-2"); + + + selectAsgnmInfoT2List.get(12).setCodeNm("합계"); + + List excelData = new ArrayList<>(); + excelData.addAll(selectAsgnmInfoT2List); + + + // 세팅값 + String title = "교육실적통계-월별 교육 이수 현황"; + int[] width = { + + 4000, 4000, 4000 + + }; // 너비 + + //33개 항목 + String[] header = { + + "월" + , "이수(명)" + , "횟수" + + }; + + String[] order = { + + "CodeNm" + , "Cnt" + , "Cnt2" + + }; + + excelDown( + excelData, + title, + width, + header, + order, + model + ); + + }catch(Exception ep) { + ep.getStackTrace(); + } + + + modelAndView.addObject(model); + + return modelAndView; + } + + /** + * 교육실적통계 Excel - 조건부기소유예 - 5검찰청별 교육 이수 현황(그래프 포함) + * @param model + * @return + * @throws Exception + */ + @SuppressWarnings("rawtypes") + @RequestMapping(value = "/kccadr/oprtn/cmdTrgt/eduPrfrmMngExcelDownLoad_csi_no7.do") + public ModelAndView eduPrfrmMngExcelDownLoad_csi_no7( + @ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO + , @ModelAttribute("vEInstrDetailVODetail") VEInstrDetailVO vEInstrDetailVODetail + , ModelMap model + ) throws Exception { + + ModelAndView modelAndView = new ModelAndView(); + modelAndView.setViewName("excelDownloadView"); + + try { + + //통계- ①월별 횟수/교육인원(그래프 포함) + //vEInstrDetailVODetail.setInstrNm(vEInstrDetailVODetail.getSearchKeyword()); + vEInstrDetailVODetail = egovCryptoUtil.encryptVEInstrDetailVO(vEInstrDetailVODetail); + //vEInstrDetailVODetail.setSearchEduStateCd("20"); //이수만 보기 + List selectAsgnmInfoT7List = vEInstrMixService.selectEduPrfrmInfo_csi_no7(vEInstrDetailVODetail); + + //복호화 + //selectAsgnmInfoT2List = egovCryptoUtil.decryptVELctrDetailVOList(selectAsgnmInfoT2List); + + System.out.println("out-list-2"); + + + //selectAsgnmInfoT2List.get(12).setCodeNm("합계"); + + List excelData = new ArrayList<>(); + excelData.addAll(selectAsgnmInfoT7List); + + + // 세팅값 + String title = "교육실적통계-월별 교육 이수, 미이수, 연기 현황"; + int[] width = { + + 4000, 4000, 4000, 4000, 4000 + + }; // 너비 + + //33개 항목 + String[] header = { + + "월" + , "차시" + , "이수인원" + , "미이수 인원" + , "연기인원" + + }; + + String[] order = { + + "CodeNm4" + , "CodeNm3" + , "EduCd20" + , "EduCd40" + , "EduCd50" + + }; + + excelDown( + excelData, + title, + width, + header, + order, + model + ); + + }catch(Exception ep) { + ep.getStackTrace(); + } + + + modelAndView.addObject(model); + + return modelAndView; + } + + /** + * 교육실적통계 Excel - 조건부기소유예 - 3대상별 교육 이수 현황(그래프 포함) + * @param model + * @return + * @throws Exception + */ + @SuppressWarnings("rawtypes") + @RequestMapping(value = "/kccadr/oprtn/cmdTrgt/eduPrfrmMngExcelDownLoad_csi_no6.do") + public ModelAndView eduPrfrmMngExcelDownLoad_csi_no6( + @ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO + , @ModelAttribute("vEInstrDetailVODetail") VEInstrDetailVO vEInstrDetailVODetail + , ModelMap model + ) throws Exception { + + ModelAndView modelAndView = new ModelAndView(); + modelAndView.setViewName("excelDownloadView"); + + try { + + //통계- ①월별 횟수/교육인원(그래프 포함) + //vEInstrDetailVODetail.setInstrNm(vEInstrDetailVODetail.getSearchKeyword()); + vEInstrDetailVODetail = egovCryptoUtil.encryptVEInstrDetailVO(vEInstrDetailVODetail); + vEInstrDetailVODetail.setSearchEduStateCd("20"); //이수만 보기 + List selectAsgnmInfoT3List = vEInstrMixService.selectEduPrfrmInfo_csi_no6(vEInstrDetailVODetail); + + //복호화 + //selectAsgnmInfoT2List = egovCryptoUtil.decryptVELctrDetailVOList(selectAsgnmInfoT2List); + + System.out.println("out-list-2"); + + + selectAsgnmInfoT3List.get(2).setCodeNm("합계"); + + List excelData = new ArrayList<>(); + excelData.addAll(selectAsgnmInfoT3List); + + + // 세팅값 + String title = "교육실적통계-대상별 교육 이수 현황"; + int[] width = { + + 4000, 4000 + + }; // 너비 + + //33개 항목 + String[] header = { + + "대상" + , "이수(명)" + + }; + + String[] order = { + + "CodeNm" + , "Cnt" + + }; + + excelDown( + excelData, + title, + width, + header, + order, + model + ); + + }catch(Exception ep) { + ep.getStackTrace(); + } + + + modelAndView.addObject(model); + + return modelAndView; + } + + ////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // + // + // private function + // + // + + //페이징을 위한 처리 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.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 setPagingStep3( + List p_vEPrcsDetailVOList + + , PaginationInfo p_paginationInfo + )throws Exception{ + // pageing step3 + int totCnt = 0; + if(p_vEPrcsDetailVOList.size() > 0) totCnt = p_vEPrcsDetailVOList.get(0).getTotCnt(); + p_paginationInfo.setTotalRecordCount(totCnt); + + return p_paginationInfo; + } + + //페이징을 위한 처리 step1 - 페이징 기본 정보 설정 + private PaginationInfo setPagingStep1_VEInstrDetailActvtHstryVO( + VEInstrDetailActvtHstryVO p_vEEduAplctVO + )throws Exception{ + // pageing step1 + PaginationInfo paginationInfo = new PaginationInfo(); + paginationInfo.setCurrentPageNo(p_vEEduAplctVO.getPageIndex()); + paginationInfo.setRecordCountPerPage(p_vEEduAplctVO.getPageUnit()); + paginationInfo.setPageSize(p_vEEduAplctVO.getPageSize()); + + return paginationInfo; + } + + + //페이징을 위한 처리 step2 - 게시물 리스트 수량 설정 및 검색 조건 초기화 + private VEInstrDetailActvtHstryVO setPagingStep2_VEInstrDetailActvtHstryVO( + VEInstrDetailActvtHstryVO p_vEEduAplctVO + , PaginationInfo p_paginationInfo + )throws Exception{ + // pageing step2 + p_vEEduAplctVO.setFirstIndex(p_paginationInfo.getFirstRecordIndex()); + p_vEEduAplctVO.setLastIndex(p_paginationInfo.getLastRecordIndex()); + p_vEEduAplctVO.setRecordCountPerPage(p_paginationInfo.getRecordCountPerPage()); + + if("".equals(p_vEEduAplctVO.getSearchSortCnd())){ //최초조회시 최신것 조회List + p_vEEduAplctVO.setSearchSortCnd("prcs_ord"); + p_vEEduAplctVO.setSearchSortOrd("desc"); + } + + return p_vEEduAplctVO; + } + + + //페이징을 위한 처리 step3 - 전체 게시물 수량 설정하기 + private PaginationInfo setPagingStep3_VEInstrDetailActvtHstryVO( + List p_vEEduAplctVOList + + , PaginationInfo p_paginationInfo + )throws Exception{ + // pageing step3 + int totCnt = 0; + if(p_vEEduAplctVOList.size() > 0) totCnt = p_vEEduAplctVOList.get(0).getTotCnt(); + p_paginationInfo.setTotalRecordCount(totCnt); + + return p_paginationInfo; + } + + + //페이징을 위한 처리 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; + } + + //페이징을 위한 처리 step1 - 페이징 기본 정보 설정 + private PaginationInfo setPagingStep1_vEEduAplctVO( + VEEduAplctVO p_vEEduAplctVO + )throws Exception{ + // pageing step1 + PaginationInfo paginationInfo = new PaginationInfo(); + paginationInfo.setCurrentPageNo(p_vEEduAplctVO.getPageIndex()); + paginationInfo.setRecordCountPerPage(p_vEEduAplctVO.getPageUnit()); + paginationInfo.setPageSize(p_vEEduAplctVO.getPageSize()); + + return paginationInfo; + } + + + //페이징을 위한 처리 step2 - 게시물 리스트 수량 설정 및 검색 조건 초기화 + private VEEduAplctVO setPagingStep2_vEEduAplctVO( + VEEduAplctVO p_vEEduAplctVO + , PaginationInfo p_paginationInfo + )throws Exception{ + // pageing step2 + p_vEEduAplctVO.setFirstIndex(p_paginationInfo.getFirstRecordIndex()); + p_vEEduAplctVO.setLastIndex(p_paginationInfo.getLastRecordIndex()); + p_vEEduAplctVO.setRecordCountPerPage(p_paginationInfo.getRecordCountPerPage()); + + if("".equals(p_vEEduAplctVO.getSearchSortCnd())){ //최초조회시 최신것 조회List + p_vEEduAplctVO.setSearchSortCnd("prcs_ord"); + p_vEEduAplctVO.setSearchSortOrd("desc"); + } + + return p_vEEduAplctVO; + } + + + //페이징을 위한 처리 step3 - 전체 게시물 수량 설정하기 + private PaginationInfo setPagingStep3_vEEduAplctVO( + List p_vEEduAplctVOList + + , PaginationInfo p_paginationInfo + )throws Exception{ + // pageing step3 + int totCnt = 0; + if(p_vEEduAplctVOList.size() > 0) totCnt = p_vEEduAplctVOList.get(0).getTotCnt(); + p_paginationInfo.setTotalRecordCount(totCnt); + + return p_paginationInfo; + } + + @SuppressWarnings("unused") + private void excelDown( + List list, + String title, + int[] width, + String[] header, + String[] order, + ModelMap model + ){ + // 호출 + SXSSFWorkbook workbook; + try { + workbook = ExcelUtil.makeSimpleFruitExcelWorkbook(list, header, order, width, title); + model.addAttribute("locale", Locale.KOREA); + model.addAttribute("workbook", workbook); + model.addAttribute("workbookName", title); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } +} diff --git a/src/main/resources/egovframework/sqlmap/ve/instr/VESttst_MIX_SQL_Postgresql.xml b/src/main/resources/egovframework/sqlmap/ve/instr/VESttst_MIX_SQL_Postgresql.xml new file mode 100644 index 00000000..5527896b --- /dev/null +++ b/src/main/resources/egovframework/sqlmap/ve/instr/VESttst_MIX_SQL_Postgresql.xml @@ -0,0 +1,3173 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/oprtn/cmdTrgt/newEduPrfrmMngList.jsp b/src/main/webapp/WEB-INF/jsp/oprtn/cmdTrgt/newEduPrfrmMngList.jsp new file mode 100644 index 00000000..fc4da997 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/oprtn/cmdTrgt/newEduPrfrmMngList.jsp @@ -0,0 +1,1304 @@ + +<%@ 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="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="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" %> + +<% + /** + * @Class Name : newEduPrfrmMngList.jsp + * @Description : 교육신청관리 > 교육실적통계 (new 2024-01-10) + * @Modification Information + * @ + * @ 수정일 수정자 수정내용 + * @ ------- -------- --------------------------- + * @ 2021.12.14 조용준 최초 생성 + * @author 조용준 + * @since 2021.12.14 + * @version 1.0 + * @see + * + */ +%> + + + + + + +교육확정관리 + + + + + " /> + " /> + + + +
+
+ +
+

교육실적통계

+
    +
  • +
  • +

    조건부기소유예관리

    +
  • +
  • 교육실적통계
  • +
+
+ + +
+ +
+
+
+

구분

+
+
+ + + + +<%-- --%> +<%-- --%> +<%-- --%> +<%-- --%> +<%-- --%> +<%-- --%> +<%-- --%> +<%-- --%> + + + + +
+
+
+ + + + + +
+ +

+ ①특허청 교육 의뢰 현황 +

+
+ + + +
+
+ + + + + + + + + + + +
+
+
+ +
+ + + +
+ + +<%-- --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + +
구분의뢰(명)
+
+ + + + +
+ +

+ ②월별 교육 의뢰 현황 +

+
+ + + +
+
+ + + + + + + + + + + +
+
+
+ +
+ + + +
+ + +<%-- --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
구분 + + 합계 + ${list.codeNm}월 + + +
의뢰(명)
+
+ + + +
+ +

+ ③대상별 교육 의뢰 현황 +

+
+ + + +
+
+ + + + + + + + + + + +
+
+
+ +
+ + + +
+ + +<%-- --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
구분 + + 합계 + ${list.codeNm} + + +
의뢰(명)
+
+ + + + +
+ +

+ ④특허청별 교육 이수 현황 +

+
+ + + +
+
+ + + + + + + + + + + +
+
+
+ +
+ + + +
+ + +<%-- --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + +
구분이수(명)
+
+ + + + +
+ +

+ ⑤월별 교육 이수 현황 +

+
+ + + +
+
+ + + + + + + + + + + +
+
+
+ +
+ + + +
+ + +<%-- --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
구분 + + 합계 + ${list.codeNm}월 + + +
이수(명)
횟수
+
+ + + + +
+ +

+ ⑥대상별 교육 이수 현황 +

+
+ + + +
+
+ + + + + + + + + + + +
+
+
+ +
+ + + +
+ + +<%-- --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
구분 + + 합계 + ${list.codeNm} + + +
이수(명)
+
+ + + + + + + + + + +
+
+
+
+
+ + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/oprtn/prevent/instrActvtHstrySignAndCmpltCrtfcMngList.jsp b/src/main/webapp/WEB-INF/jsp/oprtn/prevent/instrActvtHstrySignAndCmpltCrtfcMngList.jsp new file mode 100644 index 00000000..8642c40f --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/oprtn/prevent/instrActvtHstrySignAndCmpltCrtfcMngList.jsp @@ -0,0 +1,249 @@ + +<%@ 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="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="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ taglib prefix="ve" uri="/WEB-INF/tlds/kcc_tld.tld"%> + +<% + /** + * @Class Name : instrActvtHstrySignMngList.jsp + * @Description : 운영관리 > 직인대장관리 + * @Modification Information + * @ + * @ 수정일 수정자 수정내용 + * @ ------- -------- --------------------------- + * @ 2022.12.7 안주영 최초 생성 + * @author 안주영 + * @since 2022.2.7 + * @version 1.0 + * @see + * + */ +%> + + + + + + 직인대장관리(이수증) + + +
+ +
+
+ + " /> + " /> + +
+
+ + +
+

직인대장관리(이수증) 목록

+
    +
  • +
  • +

    운영관리

    +
  • +
  • 직인대장관리(이수증)
  • +
+
+ + +
+ +
+ +
+
+

발급일자

+
+
+
+ +
+ ~ +
+ +
+ +
+
+
+
+

성명

+
+
+ + + +
+
+
+ + + +
+

총 건수 :

+
+ +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + +<%-- --%> + + + + + + + + + + + + + + + +
번호항목문서번호과정명교육일시성명발급일자
+ + + + + 실무역량- + 기소유예- + + + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
+
+
+
+
+
+
+
+ + +
+ + +