2023-12-15 17:28 운영자가 사용자의 설문을 대리 등록

This commit is contained in:
myname 2023-12-15 17:28:56 +09:00
parent 48da1ae315
commit 959e729057
7 changed files with 198 additions and 113 deletions

View File

@ -2,15 +2,15 @@ package kcc.let.uss.olp.qrm.service.impl;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import kcc.com.cmm.ComDefaultVO;
import kcc.let.uss.olp.qrm.service.EgovQustnrRespondManageService;
import kcc.let.uss.olp.qrm.service.QustnrRespondManageVO;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
/**
* 설문응답자관리 ServiceImpl Class 구현
* @author 공통서비스 장동한

View File

@ -253,6 +253,58 @@ public class EduRsltMngAdultController {
}
/**
* 교육결과관리 상세 화면
*/
@RequestMapping("popup/chasiStatusPopup.do")
public String chasiStatusPopup(
@ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO
, ModelMap model
, HttpSession session
, HttpServletRequest request
) throws Exception {
//설문 정보(설문지정보, 문항정보)
try {
//qustnrCommonUtil._qustnrQesItm(model, p_siteId, p_siteIdCd, p_qestnrTmplatId, p_vEALettnQestnrMIXService, p_egovQustnrRespondInfoService)
model = qustnrCommonUtil._qustnrQesItm(
model
, VeConstants.LCTR_DIV_CD_20 //청소년 -10, 성인-20, ...VE0012
, "10" //10-기본설문, 20-신청자설문, 30-강사설문 VEA012
, "QTMPLA_0000000000001"
, vEALettnQestnrMIXService
, egovQustnrRespondInfoService
);
}catch(Exception ex) {
ex.printStackTrace();
}
System.out.println("================================= Comtnqustnrqesitm =================================");
//답변정보
try{
model = qustnrCommonUtil._chasiSrvyList(
model
, VeConstants.LCTR_DIV_CD_20 //청소년 -10, 성인-20, ...VE0012
, "10" //10-기본설문, 20-신청자설문, 30-강사설문 VEA012
, vEEduAplctVO.getEduAplctOrd()
, vEEduAplctVO.getEduChasiOrd()
, vEALettnQestnrMIXService
);
}catch(Exception ex) {
ex.printStackTrace();
}
System.out.println("=============================================chasiSrvyList=============================================");
return "oprtn/tngrVisitEdu/popup/chasiStatusPopup";
}
/**
* 교육결과관리 상세 화면
*/

View File

@ -50,6 +50,7 @@ import kcc.com.utl.user.service.QustnrCommonUtil;
import kcc.kccadr.adjreqmgr.service.AdjReqMgrVO;
import kcc.let.uss.olp.qri.service.EgovQustnrRespondInfoService;
import kcc.let.uss.olp.qri.service.QustnrRespondInfoVO;
import kcc.let.uss.olp.qrm.service.EgovQustnrRespondManageService;
import kcc.let.uss.olp.qrm.service.QustnrRespondManageVO;
import kcc.let.utl.fcc.service.EgovCryptoUtil;
import kcc.ve.cmm.VeConstants;
@ -184,6 +185,10 @@ public class EduRsltMngTngrController {
@Resource(name = "qustnrCommonUtil")
private QustnrCommonUtil qustnrCommonUtil;
//설문응답자수 등록
@Resource(name = "egovQustnrRespondManageService")
private EgovQustnrRespondManageService egovQustnrRespondManageService;
/**
* 교육결과관리 목록 화면
*/
@ -420,7 +425,7 @@ public class EduRsltMngTngrController {
/**
* 교육결과 삭제
* 교육결과 삭제 - 청소년, 성인 공통( 차시당 공통 제출은 하나뿐이므로)
*/
@RequestMapping("deleteChasiStatus.do")
public ModelAndView deleteChasiStatus(
@ -469,63 +474,12 @@ public class EduRsltMngTngrController {
, egovQustnrRespondInfoService
);
/*
model = this._qustnrQesItm(
model
, VeConstants.LCTR_DIV_CD_10 //청소년 -10, 성인-20, ...VE0012
, "10" //10-기본설문, 20-신청자설문, 30-강사설문 VEA012
, "QTMPLA_0000000000001"
);
*/
}catch(Exception ex) {
ex.printStackTrace();
}
{
/*
VEAQestnrVO vEAQestnrVO = new VEAQestnrVO();
vEAQestnrVO.setSiteId(VeConstants.LCTR_DIV_CD_10); //청소년
vEAQestnrVO.setSiteIdCd("10"); //10-기본설문, 20-신청자설문, 30-강사설문
vEAQestnrVO = vEALettnQestnrMIXService.selectDetail_MIX_LQI_02(vEAQestnrVO);
*/
//문항정보
/*
Map <String, Object> commandMap =new HashMap<String, Object>();
commandMap.put("qestnrTmplatId", "QTMPLA_0000000000001");
commandMap.put("qestnrId",vEAQestnrVO.getQestnrId()); //문제 ID
model.addAttribute("Comtnqustnrqesitm", egovQustnrRespondInfoService.selectQustnrRespondInfoManageComtnqustnrqesitm(commandMap));
model.addAttribute("qestnrId", vEAQestnrVO.getQestnrId());
*/
}
// 설문조사 문항리스트 조회
/*
QustnrRespondInfoVO qustnrRespondInfoVO = new QustnrRespondInfoVO();
qustnrRespondInfoVO.setSiteId(VeConstants.LCTR_DIV_CD_10);
QustnrRespondInfoVO info = egovQustnrRespondInfoService.selectSiteIdQustnrTmplat(qustnrRespondInfoVO);
Map <String, Object> commandMap =new HashMap<String, Object>();
commandMap.put("qestnrTmplatId", "QTMPLA_0000000000001");
commandMap.put("qestnrId",info.getQestnrId()); //문제 ID
model.addAttribute("Comtnqustnrqesitm", egovQustnrRespondInfoService.selectQustnrRespondInfoManageComtnqustnrqesitm(commandMap));
*/
System.out.println("================================= Comtnqustnrqesitm =================================");
// 설문조사 결과 조회
/*
qustnrRespondInfoVO.setEduAplctOrd(vEEduAplctVO.getEduAplctOrd());
qustnrRespondInfoVO.setEduChasiOrd(vEEduAplctVO.getEduChasiOrd());
List<QustnrRespondInfoVO> chasiSrvyList = egovQustnrRespondInfoService.selectChasiSrvyList(qustnrRespondInfoVO);
if(chasiSrvyList.size() > 0) {
model.addAttribute("qestnrRespondent", chasiSrvyList.get(0).getQestnrRespondent());
model.addAttribute("qestnrParticipant", chasiSrvyList.get(0).getQestnrParticipant());
model.addAttribute("chasiSrvyList",chasiSrvyList);
}
*/
//답변정보
try{
@ -537,60 +491,19 @@ public class EduRsltMngTngrController {
, vEEduAplctVO.getEduChasiOrd()
, vEALettnQestnrMIXService
);
/*
model = this._chasiSrvyList(
model
, VeConstants.LCTR_DIV_CD_10 //청소년 -10, 성인-20, ...VE0012
, "10" //10-기본설문, 20-신청자설문, 30-강사설문 VEA012
, vEEduAplctVO.getEduAplctOrd()
, vEEduAplctVO.getEduChasiOrd()
);
*/
/*
VEAQestnrVO vEAQestnrVO = new VEAQestnrVO();
vEAQestnrVO.setSiteId(VeConstants.LCTR_DIV_CD_10); //청소년
vEAQestnrVO.setSiteIdCd("10"); //10-기본설문, 20-신청자설문, 30-강사설문
vEAQestnrVO.setEduAplctOrd(vEEduAplctVO.getEduAplctOrd());
vEAQestnrVO.setEduChasiOrd(vEEduAplctVO.getEduChasiOrd());
List<VEAQestnrVO> chasiSrvyList = vEALettnQestnrMIXService.selectDetail_MIX_LQI_03(vEAQestnrVO);
if(chasiSrvyList.size() > 0) {
model.addAttribute("qestnrRespondent", chasiSrvyList.get(0).getQestnrRespondent());
model.addAttribute("qestnrParticipant", chasiSrvyList.get(0).getQestnrParticipant());
model.addAttribute("chasiSrvyList",chasiSrvyList);
}
*/
/*
// 설문조사 결과 조회
QustnrRespondInfoVO qustnrRespondInfoVO = new QustnrRespondInfoVO();
qustnrRespondInfoVO.setSiteId(VeConstants.LCTR_DIV_CD_10);
qustnrRespondInfoVO.setEduAplctOrd(vEEduAplctVO.getEduAplctOrd());
qustnrRespondInfoVO.setEduChasiOrd(vEEduAplctVO.getEduChasiOrd());
vEAQestnrVO = vEALettnQestnrMIXService.selectDetail_MIX_LQI_02(vEAQestnrVO);
List<QustnrRespondInfoVO> chasiSrvyList = egovQustnrRespondInfoService.selectChasiSrvyList(qustnrRespondInfoVO);
if(chasiSrvyList.size() > 0) {
model.addAttribute("qestnrRespondent", chasiSrvyList.get(0).getQestnrRespondent());
model.addAttribute("qestnrParticipant", chasiSrvyList.get(0).getQestnrParticipant());
model.addAttribute("chasiSrvyList",chasiSrvyList);
}
*/
}catch(Exception ex) {
ex.printStackTrace();
}
System.out.println("=============================================chasiSrvyList=============================================");
return "oprtn/tngrVisitEdu/popup/chasiStatusPopup";
}
/**
* 교육설문 수정
* 교육설문 수정 - 청소년/성인 공통
*/
@RequestMapping(value="/updateSrvyInfoAjax.do")
public ModelAndView updateSrvyInfoAjax( HttpServletRequest request
@ -612,6 +525,7 @@ public class EduRsltMngTngrController {
QustnrRespondManageVO qustnrRespondManageVO = new QustnrRespondManageVO();
qustnrRespondManageVO.setEduAplctOrd(veEduAplctVO.getEduAplctOrd());
qustnrRespondManageVO.setEduChasiOrd(veEduAplctVO.getEduChasiOrd());
qustnrRespondManageVO.setQestnrTmplatId(qustnrRespondInfoVO.getQustnrTmplatId());
qustnrRespondManageVO.setQestnrId(qustnrRespondInfoVO.getQestnrId());
qustnrRespondManageVO.setQestnrParticipant(qustnrRespondInfoVO.getQestnrParticipant());
qustnrRespondManageVO.setQestnrRespondent(qustnrRespondInfoVO.getQestnrRespondent());
@ -627,8 +541,14 @@ public class EduRsltMngTngrController {
System.out.println("qustnrRespondManageVO.getQestnrRespondId() :: "+ qustnrRespondManageVO.getQestnrRespondId());
egovQustnrRespondInfoService.updateQustnrRespondManage(qustnrRespondManageVO);
// 설문 문항 결과 등록
if ("".equals(qustnrRespondInfoVO.getQestnrRespondId())) {
egovQustnrRespondManageService.insertQustnrRespondManage(qustnrRespondManageVO);
}else {
egovQustnrRespondInfoService.updateQustnrRespondManage(qustnrRespondManageVO);
}
// 설문 문항별 결과 등록
for(int i=0; i < qustnrRespondInfoVO.getResultList().size(); i++) {
qustnrRespondInfoVO.getResultList().get(i).setQustnrTmplatId(qustnrRespondInfoVO.getQustnrTmplatId());
qustnrRespondInfoVO.getResultList().get(i).setRespondId(loginVO.getId());
@ -636,7 +556,13 @@ public class EduRsltMngTngrController {
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));
if ("".equals(qustnrRespondInfoVO.getResultList().get(i).getQustnrRsltId())) {
egovQustnrRespondInfoService.insertSrvyInfo(qustnrRespondInfoVO.getResultList().get(i));
}else {
egovQustnrRespondInfoService.updateSrvyInfo(qustnrRespondInfoVO.getResultList().get(i));
}
}
}catch(Exception ex) {
System.out.println("Exception vEEduAplctOnlnService.updateBulk");

View File

@ -145,11 +145,11 @@
b.QUSTNR_QESITM_ID AS qestnrQesitmId
, c.QUSTNR_RSLT_ID AS qustnrRsltId
, c.VERY_SATISFIED AS verySatisfied
, c.SATISFIED AS satisfied
, c.NEITHER AS neither
, c.DISSATISFIED AS dissatisfied
, c.VERY_DISSATISFIED AS veryDissatisfied
, NVL(c.VERY_SATISFIED, cVERY_SATISFIED) AS verySatisfied
, NVL(c.SATISFIED, cSATISFIED) AS satisfied
, NVL(c.NEITHER, cNEITHER) AS neither
, NVL(c.DISSATISFIED, cDISSATISFIED) AS dissatisfied
, NVL(c.VERY_DISSATISFIED, cVERY_DISSATISFIED) AS veryDissatisfied
, c.ANSWER AS answer
, c.QUSTNR_IEM_ID AS qustnrIemId
@ -212,6 +212,42 @@
AND d.EDU_APLCT_ORD = d.EDU_APLCT_ORD
AND d.EDU_CHASI_ORD = d.EDU_CHASI_ORD
)
LEFT OUTER JOIN (
SELECT
c.QUSTNR_TMPLAT_ID
, c.QESTNR_ID
, c.QUSTNR_QESITM_ID
, c.EDU_APLCT_ORD
, c.EDU_CHASI_ORD
, sum(c.very_satisfied) AS cvery_satisfied
, sum(c.satisfied) AS csatisfied
, sum(c.neither) AS cneither
, sum(c.dissatisfied) AS cdissatisfied
, sum(c.very_dissatisfied) AS cvery_dissatisfied
FROM LETTNQESTNRRSLTEADetail c
GROUP BY
c.QUSTNR_TMPLAT_ID
, c.QESTNR_ID
, c.QUSTNR_QESITM_ID
, c.EDU_APLCT_ORD
, c.EDU_CHASI_ORD
)F
on(
b.QUSTNR_TMPLAT_ID =f.QUSTNR_TMPLAT_ID
AND b.QESTNR_ID =f.QESTNR_ID
AND b.QUSTNR_QESITM_ID =f.QUSTNR_QESITM_ID
AND f.EDU_APLCT_ORD = #eduAplctOrd#
AND f.EDU_CHASI_ORD = #eduChasiOrd#
)
WHERE a.site_id=#siteId#
AND a.SITE_ID_CD =#siteIdCd#
AND b.QUSTNR_TMPLAT_ID =a.QUSTNR_TMPLAT_ID

View File

@ -38,7 +38,7 @@
function replyCalculation(){
var qestnrParticipant = $("#qestnrParticipant").val(); //참석자 수량
var qestnrRespondent = $("#qestnrRespondent").val(); //응답자 수량
$("#responseRate").text(Number(qestnrRespondent) / Number(qestnrParticipant)*Number(100) +"%");
$("#responseRate").text(Math.round(Number(qestnrRespondent) / Number(qestnrParticipant)*Number(1000))/10 +"%");
$("#noResponse").text(Number(qestnrParticipant) - Number(qestnrRespondent));
}
function fncGoList(){
@ -89,6 +89,48 @@
listForm.submit();
}
// 만족도 평가 등록/수정 팝업(청소년, 성인 별도임)
function fn_chasiStatusPop() {
var form = document.chasiStatusPopForm;
form.action = "<c:url value='/kccadr/oprtn/adultVisitEdu/popup/chasiStatusPopup.do'/>";
window.open("#", "_chasiStatusPop", "scrollbars = no, top=100px, left=100px, height=750px, width=830px");
form.target = "_chasiStatusPop";
form.submit();
}
//제출한 설문 삭제
function fn_delete(){
if (!confirm("삭제 하시겠습니까?")) {
return false;
}
var form = new FormData(document.getElementById("chasiStatusPopForm"));
$.ajax({
type:"POST",
url:"<c:url value='/kccadr/oprtn/tngrVisitEdu/deleteChasiStatus.do'/>", //청소년, 성인 공통
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 deleteSrvyEA(
p_qustnrTmplatId
@ -140,6 +182,10 @@
</head>
<body>
<form:form id="chasiStatusPopForm" name="chasiStatusPopForm" action="">
<input type="hidden" name="eduAplctOrd" value="<c:out value="${vEEduAplctVO.eduAplctOrd}" />" />
<input type="hidden" name="eduChasiOrd" value="<c:out value="${vEEduAplctVO.eduChasiOrd}" />" />
</form:form>
<form:form id="listForm" name="listForm" method="post" onsubmit="return false;">
<input type="hidden" name="pageIndex" value="<c:out value='${vEEduAplctVO.pageIndex}' />"/>
<input type="hidden" name="searchSortCnd" value="<c:out value="${vEEduAplctVO.searchSortCnd}" />" />
@ -552,6 +598,7 @@
</div>
</c:if>
<!-- btn_wrap -->
<!--
<div class="btn_wrap btn_layout01">
<div class="btn_left">
<c:if test="${!empty chasiSrvyList}">
@ -567,7 +614,28 @@
<br/>
<br/>
-->
<c:choose>
<%-- <c:when test="${chasiSrvyList[0].neither ne '' and chasiSrvyList[0].neither ne null}"> --%>
<c:when test="${qestnrParticipant ne '' and qestnrParticipant ne null}">
<div class="btn_wrap">
<div class="btn_right">
<button type="button" class="btn_type06" onclick="fn_chasiStatusPop(); return false;">수정</button>
<button type="button" class="btn_type01" onclick="fn_delete(); return false;">삭제</button>
</div>
</div>
</c:when>
<c:otherwise>
<!-- 등록버튼 추가 필요 -->
<div class="btn_wrap">
<div class="btn_right">
<button type="button" class="btn_type06" onclick="fn_chasiStatusPop(); return false;">등록</button>
</div>
</div>
</c:otherwise>
</c:choose>
<!-- 문항리스트_상세 -->
<div class="tb_tit01">

View File

@ -256,7 +256,7 @@ function replyCalculation(){
});
}
// 만족도 평가 수정 팝업
// 만족도 평가 등록/수정 팝업(청소년, 성인 별도임)
function fn_chasiStatusPop() {
var form = document.chasiStatusPopForm;
@ -906,7 +906,8 @@ function replyCalculation(){
</div>
</c:if>
<c:choose>
<c:when test="${chasiSrvyList[0].neither ne '' and chasiSrvyList[0].neither ne null}">
<%-- <c:when test="${chasiSrvyList[0].neither ne '' and chasiSrvyList[0].neither ne null}"> --%>
<c:when test="${qestnrParticipant ne '' and qestnrParticipant ne null}">
<div class="btn_wrap">
<div class="btn_right">
<button type="button" class="btn_type06" onclick="fn_chasiStatusPop(); return false;">수정</button>

View File

@ -184,7 +184,7 @@
,success:function(returnData){
if(returnData.result == 'success'){
alert("설문결과가 수정 되었습니다.");
window.location.reload();
top.window.opener.location.reload();
}else if(returnData.result == 'fail'){
alert(returnData.msg);
location.href="/web/user/login/ssoLogin.do?test=test";
@ -213,6 +213,8 @@
<input type="hidden" name="qestnrRespondId" id="qestnrRespondId" value="<c:out value='${chasiSrvyList[0].qestnrRespondId }' />">
<input type="hidden" id="qestmInfoSize" value="${fn:length(Comtnqustnrqesitm)}">
<input type="hidden" name="qustnrTmplatId" id="qustnrTmplatId" value="${qustnrTmplatId}">
<input type="hidden" name="qestnrId" id="qestnrId" value="${qestnrId}">
<div class="tooltip-wrap">
<div class="popup_wrap popType05" tabindex="0" data-tooltip-con="sub37_pop01" data-focus="sub37_pop01" data-focus-prev="sub37_pop01_close" style="width: 800px; display: block; left: 666.5px; top: 75.1145px;">