diff --git a/src/main/java/kcc/let/uss/olp/qri/service/EgovQustnrRespondInfoService.java b/src/main/java/kcc/let/uss/olp/qri/service/EgovQustnrRespondInfoService.java index 53c9b352..4685ec86 100644 --- a/src/main/java/kcc/let/uss/olp/qri/service/EgovQustnrRespondInfoService.java +++ b/src/main/java/kcc/let/uss/olp/qri/service/EgovQustnrRespondInfoService.java @@ -4,6 +4,8 @@ import java.util.List; import java.util.Map; import kcc.com.cmm.ComDefaultVO; +import kcc.let.uss.olp.qrm.service.QustnrRespondManageVO; +import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctVO; /** * 설문조사 Service Class 구현 * @author 공통서비스 장동한 @@ -156,4 +158,8 @@ public interface EgovQustnrRespondInfoService { public List selectChasiSrvyExcelList(QustnrRespondInfoVO qustnrRespondInfoVO) throws Exception; + + void updateQustnrRespondManage(QustnrRespondManageVO qustnrRespondManageVO); + + void deleteChasiStatus(VEEduAplctVO vEEduAplctVO); } diff --git a/src/main/java/kcc/let/uss/olp/qri/service/impl/EgovQustnrRespondInfoServiceImpl.java b/src/main/java/kcc/let/uss/olp/qri/service/impl/EgovQustnrRespondInfoServiceImpl.java index 930691d5..c68daa86 100644 --- a/src/main/java/kcc/let/uss/olp/qri/service/impl/EgovQustnrRespondInfoServiceImpl.java +++ b/src/main/java/kcc/let/uss/olp/qri/service/impl/EgovQustnrRespondInfoServiceImpl.java @@ -8,6 +8,8 @@ import egovframework.rte.fdl.idgnr.EgovIdGnrService; import kcc.com.cmm.ComDefaultVO; import kcc.let.uss.olp.qri.service.EgovQustnrRespondInfoService; import kcc.let.uss.olp.qri.service.QustnrRespondInfoVO; +import kcc.let.uss.olp.qrm.service.QustnrRespondManageVO; +import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctVO; import javax.annotation.Resource; @@ -222,6 +224,11 @@ public class EgovQustnrRespondInfoServiceImpl extends EgovAbstractServiceImpl im dao.updateSrvyInfo(qustnrRespondInfoVO); } + @Override + public void updateQustnrRespondManage(QustnrRespondManageVO qustnrRespondManageVO) { + dao.updateQustnrRespondManage(qustnrRespondManageVO); + } + @Override public List selectChasiSrvyList(QustnrRespondInfoVO qustnrRespondInfoVO) throws Exception { return dao.selectChasiSrvyList(qustnrRespondInfoVO); @@ -234,5 +241,9 @@ public class EgovQustnrRespondInfoServiceImpl extends EgovAbstractServiceImpl im public List selectChasiSrvyExcelList(QustnrRespondInfoVO qustnrRespondInfoVO) throws Exception { return dao.selectChasiSrvyExcelList(qustnrRespondInfoVO); } + @Override + public void deleteChasiStatus(VEEduAplctVO vEEduAplctVO) { + dao.deleteChasiStatus(vEEduAplctVO); + } } diff --git a/src/main/java/kcc/let/uss/olp/qri/service/impl/QustnrRespondInfoDao.java b/src/main/java/kcc/let/uss/olp/qri/service/impl/QustnrRespondInfoDao.java index d0e97a19..9460e1fb 100644 --- a/src/main/java/kcc/let/uss/olp/qri/service/impl/QustnrRespondInfoDao.java +++ b/src/main/java/kcc/let/uss/olp/qri/service/impl/QustnrRespondInfoDao.java @@ -6,6 +6,8 @@ import java.util.Map; import egovframework.rte.psl.dataaccess.EgovAbstractDAO; import kcc.com.cmm.ComDefaultVO; import kcc.let.uss.olp.qri.service.QustnrRespondInfoVO; +import kcc.let.uss.olp.qrm.service.QustnrRespondManageVO; +import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctVO; import org.springframework.stereotype.Repository; /** @@ -199,4 +201,13 @@ public class QustnrRespondInfoDao extends EgovAbstractDAO { public List selectChasiSrvyExcelList(QustnrRespondInfoVO qustnrRespondInfoVO) throws Exception { return (List) list("QustnrRespondInfo.selectChasiSrvyExcelList", qustnrRespondInfoVO); } + + public void updateQustnrRespondManage(QustnrRespondManageVO qustnrRespondManageVO) { + update("QustnrRespondInfo.updateQustnrRespondManage", qustnrRespondManageVO); + } + + public void deleteChasiStatus(VEEduAplctVO vEEduAplctVO) { + delete("QustnrRespondInfo.deleteChasiStatusFormLettnqustnrrespondinfo", vEEduAplctVO); + delete("QustnrRespondInfo.deleteChasiStatusFormlettnqestnrrslt", vEEduAplctVO); + } } diff --git a/src/main/java/kcc/ve/aplct/tngrVisitEdu/eduEnd/web/EduEndTngrController.java b/src/main/java/kcc/ve/aplct/tngrVisitEdu/eduEnd/web/EduEndTngrController.java index e2eaea06..51c3c28a 100644 --- a/src/main/java/kcc/ve/aplct/tngrVisitEdu/eduEnd/web/EduEndTngrController.java +++ b/src/main/java/kcc/ve/aplct/tngrVisitEdu/eduEnd/web/EduEndTngrController.java @@ -571,6 +571,7 @@ public class EduEndTngrController { return modelAndView; } + /** * 교육설문조사 등록 로직 */ diff --git a/src/main/java/kcc/ve/oprtn/tngrVisitEdu/eduRsltMng/web/EduRsltMngTngrController.java b/src/main/java/kcc/ve/oprtn/tngrVisitEdu/eduRsltMng/web/EduRsltMngTngrController.java index 1c33f4df..1e573d45 100644 --- a/src/main/java/kcc/ve/oprtn/tngrVisitEdu/eduRsltMng/web/EduRsltMngTngrController.java +++ b/src/main/java/kcc/ve/oprtn/tngrVisitEdu/eduRsltMng/web/EduRsltMngTngrController.java @@ -50,6 +50,7 @@ import kcc.kccadr.adjreqmgr.service.AdjReqMgrVO; import kcc.kccadr.cmm.CmmUtil; import kcc.let.uss.olp.qri.service.EgovQustnrRespondInfoService; import kcc.let.uss.olp.qri.service.QustnrRespondInfoVO; +import kcc.let.uss.olp.qrm.service.QustnrRespondManageVO; import kcc.let.utl.fcc.service.EgovCryptoUtil; import kcc.ve.cmm.VeConstants; import kcc.ve.cmm.VeInstrFeeMng; @@ -408,6 +409,32 @@ public class EduRsltMngTngrController { } + /** + * 교육결과 삭제 + */ + @RequestMapping("deleteChasiStatus.do") + public ModelAndView deleteChasiStatus( + @ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO + , ModelMap model + , HttpSession session + , HttpServletRequest request + ) throws Exception { + ModelAndView modelAndView = new ModelAndView(); + modelAndView.setViewName("jsonView"); + try { + egovQustnrRespondInfoService.deleteChasiStatus(vEEduAplctVO); + + + modelAndView.addObject("result", "success"); + }catch(Exception ex) { + System.out.println("Exception vEEduAplctOnlnService.updateBulk"); + modelAndView.addObject("result", "fail"); + } + return modelAndView; + + } + + /** * 교육결과관리 상세 화면 */ @@ -440,10 +467,70 @@ public class EduRsltMngTngrController { model.addAttribute("chasiSrvyList",chasiSrvyList); } System.out.println("=============================================chasiSrvyList============================================="); + + + return "oprtn/tngrVisitEdu/popup/chasiStatusPopup"; } + + /** + * 교육설문 수정 + */ + @RequestMapping(value="/updateSrvyInfoAjax.do") + public ModelAndView updateSrvyInfoAjax( HttpServletRequest request + , ModelMap model + , VEEduAplctVO veEduAplctVO + , QustnrRespondInfoVO qustnrRespondInfoVO) throws Exception { + ModelAndView modelAndView = new ModelAndView(); + modelAndView.setViewName("jsonView"); + try { + + LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); + if (loginVO == null) { + modelAndView.addObject("result", "fail"); + modelAndView.addObject("msg", "로그인 해주세요."); + return modelAndView; + } + + // 설문 참석자, 응답자, 결과 저장 + QustnrRespondManageVO qustnrRespondManageVO = new QustnrRespondManageVO(); + qustnrRespondManageVO.setEduAplctOrd(veEduAplctVO.getEduAplctOrd()); + qustnrRespondManageVO.setEduChasiOrd(veEduAplctVO.getEduChasiOrd()); + qustnrRespondManageVO.setQestnrId(qustnrRespondInfoVO.getQestnrId()); + qustnrRespondManageVO.setQestnrParticipant(qustnrRespondInfoVO.getQestnrParticipant()); + qustnrRespondManageVO.setQestnrRespondent(qustnrRespondInfoVO.getQestnrRespondent()); + qustnrRespondManageVO.setFrstRegisterId(loginVO.getId()); + qustnrRespondManageVO.setLastUpdusrId(loginVO.getId()); + qustnrRespondManageVO.setQestnrRespondId(qustnrRespondInfoVO.getQestnrRespondId()); + + + +// eduAplctOrd "eduAplct_00000001371" (id=816) +// eduChasiOrd "eduChasi_00000001584" (id=821) +// qestnrRespondId "QRPD_000000000000630" (id=906) + + System.out.println("qustnrRespondManageVO.getQestnrRespondId() :: "+ qustnrRespondManageVO.getQestnrRespondId()); + + egovQustnrRespondInfoService.updateQustnrRespondManage(qustnrRespondManageVO); + // 설문 문항 결과 등록 + for(int i=0; i < qustnrRespondInfoVO.getResultList().size(); i++) { + qustnrRespondInfoVO.getResultList().get(i).setRespondId(loginVO.getId()); + qustnrRespondInfoVO.getResultList().get(i).setFrstRegisterId(loginVO.getId()); + qustnrRespondInfoVO.getResultList().get(i).setLastUpdusrId(loginVO.getId()); + qustnrRespondInfoVO.getResultList().get(i).setEduAplctOrd(veEduAplctVO.getEduAplctOrd()); + qustnrRespondInfoVO.getResultList().get(i).setEduChasiOrd(veEduAplctVO.getEduChasiOrd()); + egovQustnrRespondInfoService.updateSrvyInfo(qustnrRespondInfoVO.getResultList().get(i)); + } + }catch(Exception ex) { + System.out.println("Exception vEEduAplctOnlnService.updateBulk"); + } + modelAndView.addObject("result", "success"); + return modelAndView; + } + + /** * 교육결과관리 상세 화면 */ diff --git a/src/main/resources/egovframework/sqlmap/let/uss/olp/qri/EgovQustnrRespondInfo_SQL_Mysql.xml b/src/main/resources/egovframework/sqlmap/let/uss/olp/qri/EgovQustnrRespondInfo_SQL_Mysql.xml index c5d46988..a800f8d2 100644 --- a/src/main/resources/egovframework/sqlmap/let/uss/olp/qri/EgovQustnrRespondInfo_SQL_Mysql.xml +++ b/src/main/resources/egovframework/sqlmap/let/uss/olp/qri/EgovQustnrRespondInfo_SQL_Mysql.xml @@ -6,7 +6,10 @@ + + + @@ -519,4 +536,18 @@ WHERE 1=1 AND B.EDU_APLCT_ORD = #eduAplctOrd# AND B.EDU_CHASI_ORD = #eduChasiOrd# + + + DELETE FROM lettnqustnrrespondinfo + WHERE 1=1 + AND edu_aplct_ord = #eduAplctOrd# + AND edu_chasi_ord = #eduChasiOrd# + + + + DELETE FROM lettnqestnrrslt + WHERE 1=1 + AND edu_aplct_ord = #eduAplctOrd# + AND edu_chasi_ord = #eduChasiOrd# + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/oprtn/tngrVisitEdu/eduRsltMngDetail.jsp b/src/main/webapp/WEB-INF/jsp/oprtn/tngrVisitEdu/eduRsltMngDetail.jsp index e87910de..39a9d1b9 100644 --- a/src/main/webapp/WEB-INF/jsp/oprtn/tngrVisitEdu/eduRsltMngDetail.jsp +++ b/src/main/webapp/WEB-INF/jsp/oprtn/tngrVisitEdu/eduRsltMngDetail.jsp @@ -43,7 +43,10 @@ function fncGoEdit(){ function replyCalculation(){ var qestnrParticipant = $("#qestnrParticipant").val(); //참석자 수량 var qestnrRespondent = $("#qestnrRespondent").val(); //응답자 수량 - $("#responseRate").text(Number(qestnrRespondent) / Number(qestnrParticipant)*Number(100) +"%"); + + var responseRateTxt = (Number(qestnrRespondent) / Number(qestnrParticipant)*Number(100)).toFixed(1); + + $("#responseRate").text(responseRateTxt +"%"); $("#noResponse").text(Number(qestnrParticipant) - Number(qestnrRespondent)); } function fileDownload(atchFileId, fileSn, newFileNm){ @@ -224,25 +227,43 @@ function replyCalculation(){ + function fn_delete(){ + + if (!confirm("삭제 하시겠습니까?")) { + return false; + } + + var form = new FormData(document.getElementById("chasiStatusPopForm")); + + $.ajax({ + type:"POST", + url:"", + data:form, + dataType:'json', + async: false, + processData: false, + contentType: false, + cache: false, + success:function(returnData){ + if(returnData.result == "success"){ + alert("정상적으로 삭제 되었습니다."); + location.reload(); + } + }, + error:function(request , status, error){ + alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error); + } + }); + } - - // 강사 변경 + // 만족도 평가 수정 팝업 function fn_chasiStatusPop() { var form = document.chasiStatusPopForm; -// form.eduAplctOrd.value = aplctOrd; -// form.eduChasiOrd.value = chasiOrd; -// form.strtTm.value = strtTm; -// form.endTm.value = endTm; -// form.asgnmAprvlCd.value = code; - - //추가 강사 변경 -// form.action = ""; -console.log("form :: ", form); form.action = ""; - window.open("#", "_chasiStatusPop", "scrollbars = no, top=100px, left=100px, height=750px, width=1200px"); + window.open("#", "_chasiStatusPop", "scrollbars = no, top=100px, left=100px, height=750px, width=830px"); form.target = "_chasiStatusPop"; form.submit(); } @@ -671,11 +692,14 @@ console.log("form :: ", form); +
+
+

비공개 메모

diff --git a/src/main/webapp/WEB-INF/jsp/oprtn/tngrVisitEdu/popup/chasiStatusPopup.jsp b/src/main/webapp/WEB-INF/jsp/oprtn/tngrVisitEdu/popup/chasiStatusPopup.jsp index 2b949912..f07f2568 100644 --- a/src/main/webapp/WEB-INF/jsp/oprtn/tngrVisitEdu/popup/chasiStatusPopup.jsp +++ b/src/main/webapp/WEB-INF/jsp/oprtn/tngrVisitEdu/popup/chasiStatusPopup.jsp @@ -33,8 +33,170 @@ 강사배치 팝업 @@ -45,19 +207,15 @@ - - - -
- - - - + + + +