2023-12-12 18:26 개별 사용자 설문 페이지 수정
This commit is contained in:
parent
1d14862168
commit
2f2c2fcd34
@ -152,6 +152,9 @@ public interface EgovQustnrRespondInfoService {
|
||||
|
||||
void insertSrvyInfo(QustnrRespondInfoVO qustnrRespondInfoVO) throws Exception;
|
||||
|
||||
//개별 응답 저장
|
||||
void insertSrvyEAInfo(QustnrRespondInfoVO qustnrRespondInfoVO) throws Exception;
|
||||
|
||||
void updateSrvyInfo(QustnrRespondInfoVO qustnrRespondInfoVO) throws Exception;
|
||||
|
||||
// 차수별 설문 조회
|
||||
|
||||
@ -121,6 +121,10 @@ public class QustnrRespondInfoVO implements Serializable {
|
||||
|
||||
private String qustnrQesitmId = "";
|
||||
|
||||
private String qustnrNm = ""; //등록자명
|
||||
private String qustnrBirth = ""; //등록자생년월일
|
||||
|
||||
|
||||
|
||||
// 20231124 이호영
|
||||
// 강화 기반은 라디오 버튼이라 변수 추가함
|
||||
@ -541,4 +545,28 @@ public class QustnrRespondInfoVO implements Serializable {
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getQustnrNm() {
|
||||
return qustnrNm;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setQustnrNm(String qustnrNm) {
|
||||
this.qustnrNm = qustnrNm;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getQustnrBirth() {
|
||||
return qustnrBirth;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setQustnrBirth(String qustnrBirth) {
|
||||
this.qustnrBirth = qustnrBirth;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -220,6 +220,13 @@ public class EgovQustnrRespondInfoServiceImpl extends EgovAbstractServiceImpl im
|
||||
dao.insertSrvyInfo(qustnrRespondInfoVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertSrvyEAInfo(QustnrRespondInfoVO qustnrRespondInfoVO) throws Exception {
|
||||
String sMakeId = idgenService.getNextStringId();
|
||||
qustnrRespondInfoVO.setQustnrRsltId(sMakeId);
|
||||
dao.insertSrvyEAInfo(qustnrRespondInfoVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSrvyInfo(QustnrRespondInfoVO qustnrRespondInfoVO) throws Exception {
|
||||
dao.updateSrvyInfo(qustnrRespondInfoVO);
|
||||
|
||||
@ -184,6 +184,10 @@ public class QustnrRespondInfoDao extends EgovAbstractDAO {
|
||||
insert("QustnrRespondInfo.insertSrvyInfo", qustnrRespondInfoVO);
|
||||
}
|
||||
|
||||
public void insertSrvyEAInfo(QustnrRespondInfoVO qustnrRespondInfoVO) throws Exception{
|
||||
insert("QustnrRespondInfo.insertSrvyEAInfo", qustnrRespondInfoVO);
|
||||
}
|
||||
|
||||
public void updateSrvyInfo(QustnrRespondInfoVO qustnrRespondInfoVO) throws Exception{
|
||||
update("QustnrRespondInfo.updateSrvyInfo", qustnrRespondInfoVO);
|
||||
}
|
||||
|
||||
@ -723,12 +723,8 @@ public class EduEndTngrController {
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.setViewName("jsonView");
|
||||
try {
|
||||
|
||||
System.out.println("qustnrRespondInfoVO");
|
||||
System.out.println(qustnrRespondInfoVO);
|
||||
System.out.println(qustnrRespondInfoVO);
|
||||
|
||||
//String
|
||||
//
|
||||
/* 로그인 체크는 하지 않는다.
|
||||
|
||||
LoginVO loginVO = checkLoginUtil.getAuthLoginVO();
|
||||
if (loginVO == null) {
|
||||
@ -736,35 +732,115 @@ public class EduEndTngrController {
|
||||
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.setQestnrTmplatId(qustnrRespondInfoVO.getQustnrTmplatId());
|
||||
//step1.응답결과가 저장되어 있는지 확인 한다.
|
||||
//없는 경우만 개별 설문 저장이 가능하다.
|
||||
|
||||
egovQustnrRespondManageService.insertQustnrRespondManage(qustnrRespondManageVO);
|
||||
// 설문 문항 결과 등록
|
||||
for(int i=0; i < qustnrRespondInfoVO.getResultList().size(); i++) {
|
||||
System.out.println("qustnrRespondInfoVO.getResultList().get(i).getQustnrQesitmId()");
|
||||
System.out.println(qustnrRespondInfoVO.getResultList().get(i).getQustnrQesitmId());
|
||||
qustnrRespondInfoVO.getResultList().get(i).setQustnrTmplatId(qustnrRespondInfoVO.getQustnrTmplatId());
|
||||
qustnrRespondInfoVO.getResultList().get(i).setQustnrQesitmId(qustnrRespondInfoVO.getQustnrQesitmId());
|
||||
//차시 정보
|
||||
|
||||
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.insertSrvyInfo(qustnrRespondInfoVO.getResultList().get(i));
|
||||
try {
|
||||
|
||||
|
||||
|
||||
//사용자 교육신청 차시 리스트
|
||||
VEEduChasiVO vEEduChasiVO = new VEEduChasiVO();
|
||||
vEEduChasiVO.setEduAplctOrd(qustnrRespondInfoVO.getEduAplctOrd());
|
||||
vEEduChasiVO.setEduChasiOrd(qustnrRespondInfoVO.getEduChasiOrd());
|
||||
vEEduChasiVO.setInstrDiv(VeConstants.LCTR_DIV_CD_10);
|
||||
vEEduChasiVO.setPageIndex(0);
|
||||
|
||||
vEEduChasiVO.setSiteId("10"); //설문정보를 위해서 설문지의 대상값을 넣는다. VE0011 10-청소년, 20-성인,30-체험, 40-외부, 50-기반, 60-기소
|
||||
|
||||
//List<VEEduChasiVO> vEEduChasiVOList = vEEduMIXService.selectChasiList(vEEduChasiVO);
|
||||
List<VEEduChasiVO> vEEduChasiVOList = vEEduMIXService.selectChasiList202312(vEEduChasiVO);
|
||||
|
||||
if (vEEduChasiVOList.size()<=0) {
|
||||
//해당 설문 차시가 없으면 오류 발생 후 정지
|
||||
modelAndView.addObject("result", "fail1");
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
vEEduChasiVO = vEEduChasiVOList.get(0);
|
||||
|
||||
if (vEEduChasiVO.getQustnrRespondId10()!=null) {
|
||||
//해당 설문 결과값이 있으면 오류 발생 후 정지
|
||||
modelAndView.addObject("result", "fail2");
|
||||
return modelAndView;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
vEEduChasiVO.setInstrDiv(VeConstants.LCTR_DIV_CD_10); //10-청소년 강사, 20-성인강사 VE0001
|
||||
|
||||
VEEduChasiVO ChasiInfo = vEEduMIXService.selectChasiInfo(vEEduChasiVO);
|
||||
ChasiInfo.setInstrNm(egovCryptoUtil.decrypt(ChasiInfo.getInstrNm()));
|
||||
|
||||
ChasiInfo.setStrtTm(ChasiInfo.getStrtTm().substring(0,2)+":"+ChasiInfo.getStrtTm().substring(2,4));
|
||||
ChasiInfo.setEndTm(ChasiInfo.getEndTm().substring(0,2)+":"+ChasiInfo.getEndTm().substring(2,4));
|
||||
|
||||
model.addAttribute("chasiInfo", ChasiInfo);
|
||||
*/
|
||||
|
||||
}catch(Exception ex) {
|
||||
System.out.println("Exception vEEduAplctOnlnService.updateBulk");
|
||||
ex.printStackTrace();
|
||||
System.out.println("Exception vEEduAplctOnlnService.updateBulk1");
|
||||
}
|
||||
|
||||
//step2.응답결과값을 저장한다.
|
||||
try {
|
||||
int i_chasiSrvyListSize = Integer.parseInt(request.getParameter("chasiSrvyListSize"));
|
||||
|
||||
String[] a_qustnrQesitmId = request.getParameterValues("qustnrQesitmId");
|
||||
|
||||
System.out.println("a_qustnrQesitmId.length");
|
||||
System.out.println(a_qustnrQesitmId.length);
|
||||
System.out.println(a_qustnrQesitmId.length);
|
||||
|
||||
for (int i=0;i<i_chasiSrvyListSize;i++) {
|
||||
String s_answer = request.getParameter("answer_"+Integer.toString(i+1));
|
||||
|
||||
System.out.println("a_qustnrQesitmId[i]");
|
||||
System.out.println(a_qustnrQesitmId[i]);
|
||||
|
||||
qustnrRespondInfoVO.setVerySatisfied("0");
|
||||
qustnrRespondInfoVO.setSatisfied("0");
|
||||
qustnrRespondInfoVO.setNeither("0");
|
||||
qustnrRespondInfoVO.setDissatisfied("0");
|
||||
qustnrRespondInfoVO.setVeryDissatisfied("0");
|
||||
|
||||
if ("verySatisfied".equals(s_answer)) {
|
||||
qustnrRespondInfoVO.setVerySatisfied("1");
|
||||
|
||||
}else if ("satisfied".equals(s_answer)) {
|
||||
qustnrRespondInfoVO.setSatisfied("1");
|
||||
|
||||
}else if ("neither".equals(s_answer)) {
|
||||
qustnrRespondInfoVO.setNeither("1");
|
||||
|
||||
}else if ("dissatisfied".equals(s_answer)) {
|
||||
qustnrRespondInfoVO.setDissatisfied("1");
|
||||
|
||||
}else if ("veryDissatisfied".equals(s_answer)) {
|
||||
qustnrRespondInfoVO.setVeryDissatisfied("1");
|
||||
|
||||
}
|
||||
|
||||
qustnrRespondInfoVO.setQustnrQesitmId(a_qustnrQesitmId[i]);
|
||||
|
||||
egovQustnrRespondInfoService.insertSrvyEAInfo(qustnrRespondInfoVO);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}catch(Exception ex) {
|
||||
ex.printStackTrace();
|
||||
System.out.println("Exception vEEduAplctOnlnService.updateBulk2");
|
||||
}
|
||||
|
||||
}catch(Exception ex) {
|
||||
ex.printStackTrace();
|
||||
System.out.println("Exception vEEduAplctOnlnService.updateBulk3");
|
||||
}
|
||||
modelAndView.addObject("result", "success");
|
||||
return modelAndView;
|
||||
@ -1131,6 +1207,7 @@ public class EduEndTngrController {
|
||||
model.addAttribute("qestnrRespondent", chasiSrvyList.get(0).getQestnrRespondent());
|
||||
model.addAttribute("qestnrParticipant", chasiSrvyList.get(0).getQestnrParticipant());
|
||||
model.addAttribute("chasiSrvyList", chasiSrvyList);
|
||||
model.addAttribute("chasiSrvyListSize", chasiSrvyList.size());
|
||||
}catch(Exception ex) {
|
||||
System.out.println("Exception vEEduAplctOnlnService.updateBulk");
|
||||
}
|
||||
|
||||
@ -463,6 +463,57 @@
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="QustnrRespondInfo.insertSrvyEAInfo" parameterClass="QustnrRespondInfoVO">
|
||||
/* QustnrRespondInfo.insertSrvyEAInfo */
|
||||
INSERT INTO LETTNQESTNRRSLTEADetail
|
||||
(
|
||||
QUSTNR_TMPLAT_ID
|
||||
, QESTNR_ID
|
||||
, QUSTNR_QESITM_ID
|
||||
, QUSTNR_RSLT_ID
|
||||
, QUSTNR_IEM_ID
|
||||
, EDU_APLCT_ORD
|
||||
, EDU_CHASI_ORD
|
||||
, RESPOND_ID
|
||||
, VERY_SATISFIED
|
||||
, SATISFIED
|
||||
, NEITHER
|
||||
, DISSATISFIED
|
||||
, VERY_DISSATISFIED
|
||||
, ANSWER
|
||||
, FRST_REGIST_PNTTM
|
||||
, FRST_REGISTER_ID
|
||||
, LAST_UPDT_PNTTM
|
||||
, LAST_UPDUSR_ID
|
||||
|
||||
, QUSTNR_NM
|
||||
, QUSTNR_BIRTH
|
||||
|
||||
) VALUES (
|
||||
#qustnrTmplatId#
|
||||
, #qestnrId#
|
||||
, #qustnrQesitmId#
|
||||
, #qustnrRsltId#
|
||||
, #qustnrIemId#
|
||||
, #eduAplctOrd#
|
||||
, #eduChasiOrd#
|
||||
, #respondId#
|
||||
, #verySatisfied#
|
||||
, #satisfied#
|
||||
, #neither#
|
||||
, #dissatisfied#
|
||||
, #veryDissatisfied#
|
||||
, #answer#
|
||||
, SYSDATE
|
||||
, #frstRegisterId#
|
||||
, SYSDATE
|
||||
, #lastUpdusrId#
|
||||
|
||||
, #qustnrNm#
|
||||
, #qustnrBirth#
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="QustnrRespondInfo.insertSrvyInfo_bak" parameterClass="QustnrRespondInfoVO">
|
||||
/* QustnrRespondInfo.insertSrvyInfo_bak */
|
||||
INSERT INTO LETTNQESTNRRSLT
|
||||
@ -525,6 +576,29 @@
|
||||
AND qustnr_rslt_id = #qustnrRsltId#
|
||||
</update>
|
||||
|
||||
<update id="QustnrRespondInfo.updateSrvyEAInfo" parameterClass="QustnrRespondInfoVO">
|
||||
/* QustnrRespondInfo.updateSrvyEAInfo */
|
||||
UPDATE
|
||||
LETTNQESTNRRSLTEADetail
|
||||
SET
|
||||
very_satisfied = #verySatisfied#
|
||||
, satisfied = #satisfied#
|
||||
, neither = #neither#
|
||||
, dissatisfied = #dissatisfied#
|
||||
, very_dissatisfied = #veryDissatisfied#
|
||||
, last_updt_pnttm = SYSDATE
|
||||
, last_updusr_id = #lastUpdusrId#
|
||||
|
||||
, qustnr_nm = #qustnrNm#
|
||||
, qustnr_birth = #qustnrBirth#
|
||||
|
||||
WHERE 1=1
|
||||
AND QUSTNR_TMPLAT_ID = #qustnrTmplatId#
|
||||
AND qestnr_id = #qestnrId#
|
||||
AND qustnr_qesitm_id = #qestnrQesitmId#
|
||||
AND qustnr_rslt_id = #qustnrRsltId#
|
||||
</update>
|
||||
|
||||
<update id="QustnrRespondInfo.updateSrvyInfo_bak" parameterClass="QustnrRespondInfoVO">
|
||||
/* QustnrRespondInfo.updateSrvyInfo_bak */
|
||||
UPDATE
|
||||
@ -770,6 +844,17 @@
|
||||
AND edu_chasi_ord = #eduChasiOrd#
|
||||
</delete>
|
||||
|
||||
<delete id="QustnrRespondInfo.deleteChasiStatusFormlettnqestnrrsltEA" parameterClass="vEEduAplctVO">
|
||||
/* QustnrRespondInfo.deleteChasiStatusFormlettnqestnrrsltEA */
|
||||
DELETE FROM lettnqestnrrsltDetail
|
||||
WHERE 1=1
|
||||
AND edu_aplct_ord = #eduAplctOrd#
|
||||
AND edu_chasi_ord = #eduChasiOrd#
|
||||
<isNotEmpty property="qustnrRsltId">
|
||||
AND qustnr_rslt_id = #qustnrRsltId#
|
||||
</isNotEmpty>
|
||||
</delete>
|
||||
|
||||
<delete id="QustnrRespondInfo.deleteChasiStatusFormlettnqestnrrslt_bak" parameterClass="VEPrcsDetailVO">
|
||||
/* QustnrRespondInfo.deleteChasiStatusFormlettnqestnrrslt_bak */
|
||||
DELETE FROM lettnqestnrrslt
|
||||
|
||||
@ -4378,6 +4378,9 @@
|
||||
<isNotEmpty property="eduAplctOrd">
|
||||
AND A.EDU_APLCT_ORD = #eduAplctOrd#
|
||||
</isNotEmpty>
|
||||
<isNotEmpty property="eduChasiOrd">
|
||||
AND B.EDU_CHASI_ORD = #eduChasiOrd#
|
||||
</isNotEmpty>
|
||||
<isNotEmpty property="lctrDivCd">
|
||||
AND A.LCTR_DIV_CD = #lctrDivCd#
|
||||
</isNotEmpty>
|
||||
|
||||
@ -58,33 +58,6 @@
|
||||
});
|
||||
}
|
||||
|
||||
function replyCalculation(){
|
||||
var qestnrParticipant = $("#qestnrParticipant").val(); //참석자 수량
|
||||
var qestnrRespondent = $("#qestnrRespondent").val(); //응답자 수량
|
||||
|
||||
if(qestnrParticipant == "" || qestnrParticipant == null){
|
||||
alert("참석자 수량을 넣어주세요");
|
||||
$("#qestnrParticipant").focus();
|
||||
return
|
||||
}
|
||||
|
||||
if(qestnrRespondent == "" || qestnrRespondent == null){
|
||||
alert("응답자 수량을 넣어주세요");
|
||||
$("#qestnrParticipant").focus();
|
||||
return
|
||||
}
|
||||
|
||||
if(Number(qestnrParticipant) < Number(qestnrRespondent)){
|
||||
alert("응답자 수량이 참석자 수량보다 많습니다.");
|
||||
$("#qestnrParticipant").focus();
|
||||
return
|
||||
}
|
||||
|
||||
var responseRateTxt = (Number(qestnrRespondent) / Number(qestnrParticipant)*Number(100)).toFixed(1);
|
||||
$("#responseRate").text(responseRateTxt + "%");
|
||||
$("#noResponse").text(Number(qestnrParticipant) - Number(qestnrRespondent));
|
||||
}
|
||||
|
||||
function fncGoList(){
|
||||
var listForm = document.listForm ;
|
||||
listForm.action = "<c:url value='/web/ve/aplct/tngrVisitEdu/eduEnd/eduEndList.do'/>";
|
||||
@ -269,168 +242,32 @@
|
||||
});
|
||||
}
|
||||
|
||||
function srvySendSubmit(){
|
||||
|
||||
var qestmSize = parseInt($("#qestmInfoSize").val()); //평가문항 수량
|
||||
var qestnrParticipant = parseInt($("#qestnrParticipant").val()); //참석자 수량
|
||||
var qestnrRespondent = parseInt($("#qestnrRespondent").val()); //응답자 수량
|
||||
|
||||
if(qestnrParticipant == null || qestnrParticipant == ""){
|
||||
alert("참석자 수량을 넣어주세요");
|
||||
$("#qestnrParticipant").focus();
|
||||
return
|
||||
}
|
||||
|
||||
if(qestnrRespondent == null || qestnrRespondent == ""){
|
||||
alert("응답자 수량을 넣어주세요");
|
||||
$("#qestnrRespondent").focus();
|
||||
return
|
||||
}
|
||||
|
||||
if(qestnrParticipant < qestnrRespondent){
|
||||
alert("응답자 수량이 참석자 수보다 많습니다 확인해 주세요");
|
||||
$("#qestnrRespondent").focus();
|
||||
return
|
||||
}
|
||||
|
||||
for(var i=0; i < qestmSize; i++){
|
||||
var verySatisfied = $("#verySatisfied_"+i).val();
|
||||
var satisfied = $("#satisfied_"+i).val();
|
||||
var neither = $("#neither_"+i).val();
|
||||
var dissatisfied = $("#dissatisfied_"+i).val();
|
||||
var veryDissatisfied = $("#veryDissatisfied_"+i).val();
|
||||
|
||||
if(verySatisfied == null || verySatisfied == ""){
|
||||
alert((i+1)+"번 [매우만족] 만족도를 정확히 넣어주세요");
|
||||
$("#verySatisfied_"+i).focus();
|
||||
return
|
||||
}
|
||||
if(satisfied == null || satisfied == ""){
|
||||
alert((i+1)+"번 [만족] 만족도를 정확히 넣어주세요");
|
||||
$("#satisfied_"+i).focus();
|
||||
return
|
||||
}
|
||||
if(neither == null || neither == ""){
|
||||
alert((i+1)+"번 [보통] 만족도를 정확히 넣어주세요");
|
||||
$("#neither_"+i).focus();
|
||||
return
|
||||
}
|
||||
if(dissatisfied == null || dissatisfied == ""){
|
||||
alert((i+1)+"번 [불만족] 만족도를 정확히 넣어주세요");
|
||||
$("#dissatisfied_"+i).focus();
|
||||
return
|
||||
}
|
||||
if(veryDissatisfied == null || veryDissatisfied == ""){
|
||||
alert((i+1)+"번 [매우불만족] 만족도를 정확히 넣어주세요");
|
||||
$("#veryDissatisfied_"+i).focus();
|
||||
return
|
||||
}
|
||||
|
||||
var sum = Number(verySatisfied) + Number(satisfied) + Number(neither) + Number(dissatisfied) + Number(veryDissatisfied);
|
||||
|
||||
if(qestnrRespondent != sum ){
|
||||
alert((i+1)+"문항의 합계가 응답수량과 맞지 않습니다.");
|
||||
$("#verySatisfied_"+i).focus();
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if(confirm("설문결과를 등록 하시겠습니까?")){
|
||||
// var frm = document.srvyPopupForm;
|
||||
var data = new FormData(document.getElementById("srvyPopupForm"));
|
||||
|
||||
$.ajax({
|
||||
type:"POST"
|
||||
,url:"${pageContext.request.contextPath}/web/ve/aplct/tngrVisitEdu/eduEnd/insertSrvyInfoAjax.do"
|
||||
,data: data
|
||||
,dataType:'json'
|
||||
,async: false
|
||||
,processData: false
|
||||
,contentType: false
|
||||
,cache: false
|
||||
,success:function(returnData){
|
||||
if(returnData.result == 'success'){
|
||||
alert("설문결과가 등록 되었습니다.");
|
||||
window.location.reload();
|
||||
}else if(returnData.result == 'fail'){
|
||||
alert(returnData.msg);
|
||||
location.href="/web/user/login/ssoLogin.do?test=test";
|
||||
}
|
||||
}
|
||||
,error:function(request , status, error){
|
||||
alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//개별 저장
|
||||
function popupSrvySendSubmit(){
|
||||
|
||||
//var qestmSize = parseInt($("#qestmInfoSize").val()); //평가문항 수량
|
||||
//var qestnrParticipant = parseInt($("#qestnrParticipant").val()); //참석자 수량
|
||||
//var qestnrRespondent = parseInt($("#qestnrRespondent").val()); //응답자 수량
|
||||
//var qestnrRespondent = parseInt($("#qustnrBirth").val()); //응답자 수량
|
||||
|
||||
var qestnrParticipant = $("#qestnrParticipant").val(); //참석자 수량
|
||||
var qestnrRespondent = $("#qestnrRespondent").val(); //응답자 수량
|
||||
var qustnrNm = $("#qustnrNm").val(); //설문자명
|
||||
var qustnrBirth = $("#qustnrBirth").val(); //설문자생년월일
|
||||
|
||||
if(qestnrParticipant == null || qestnrParticipant == ""){
|
||||
if(qustnrNm == null || qustnrNm == ""){
|
||||
alert("설문자 명을 넣어주세요");
|
||||
$("#qestnrParticipant").focus();
|
||||
$("#qustnrNm").focus();
|
||||
return
|
||||
}
|
||||
|
||||
if(qestnrRespondent == null || qestnrRespondent == ""){
|
||||
if(qustnrBirth == null || qustnrBirth == ""){
|
||||
alert("설문자 생년월일을 넣어주세요");
|
||||
$("#qestnrRespondent").focus();
|
||||
$("#qustnrBirth").focus();
|
||||
return
|
||||
}
|
||||
|
||||
for(var i=0; i < qestmSize; i++){
|
||||
var verySatisfied = $("#verySatisfied_"+i).val();
|
||||
var satisfied = $("#satisfied_"+i).val();
|
||||
var neither = $("#neither_"+i).val();
|
||||
var dissatisfied = $("#dissatisfied_"+i).val();
|
||||
var veryDissatisfied = $("#veryDissatisfied_"+i).val();
|
||||
|
||||
if(verySatisfied == null || verySatisfied == ""){
|
||||
alert((i+1)+"번 [매우만족] 만족도를 정확히 넣어주세요");
|
||||
$("#verySatisfied_"+i).focus();
|
||||
return
|
||||
}
|
||||
if(satisfied == null || satisfied == ""){
|
||||
alert((i+1)+"번 [만족] 만족도를 정확히 넣어주세요");
|
||||
$("#satisfied_"+i).focus();
|
||||
return
|
||||
}
|
||||
if(neither == null || neither == ""){
|
||||
alert((i+1)+"번 [보통] 만족도를 정확히 넣어주세요");
|
||||
$("#neither_"+i).focus();
|
||||
return
|
||||
}
|
||||
if(dissatisfied == null || dissatisfied == ""){
|
||||
alert((i+1)+"번 [불만족] 만족도를 정확히 넣어주세요");
|
||||
$("#dissatisfied_"+i).focus();
|
||||
return
|
||||
}
|
||||
if(veryDissatisfied == null || veryDissatisfied == ""){
|
||||
alert((i+1)+"번 [매우불만족] 만족도를 정확히 넣어주세요");
|
||||
$("#veryDissatisfied_"+i).focus();
|
||||
return
|
||||
}
|
||||
|
||||
var sum = Number(verySatisfied) + Number(satisfied) + Number(neither) + Number(dissatisfied) + Number(veryDissatisfied);
|
||||
|
||||
if(qestnrRespondent != sum ){
|
||||
alert((i+1)+"문항의 합계가 응답수량과 맞지 않습니다.");
|
||||
$("#verySatisfied_"+i).focus();
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if(confirm("설문결과를 등록 하시겠습니까?")){
|
||||
// var frm = document.newSrvyPopupForm;
|
||||
var data = new FormData(document.getElementById("newSrvyPopupForm"));
|
||||
var data = new FormData(document.getElementById("listForm"));
|
||||
|
||||
$.ajax({
|
||||
type:"POST"
|
||||
@ -444,10 +281,15 @@
|
||||
,success:function(returnData){
|
||||
if(returnData.result == 'success'){
|
||||
alert("설문결과가 등록 되었습니다.");
|
||||
window.location.reload();
|
||||
}else if(returnData.result == 'fail'){
|
||||
alert(returnData.msg);
|
||||
location.href="/web/user/login/ssoLogin.do?test=test";
|
||||
location.href="${pageContext.request.contextPath}/";
|
||||
//window.location.reload();
|
||||
}else if(returnData.result == 'fail2'){
|
||||
alert("이미 신청자가 설문결과를 등록 하였습니다.");
|
||||
location.href="${pageContext.request.contextPath}/";
|
||||
//location.href="${pageContext.request.contextPath}/web/user/login/ssoLogin.do?test=test";
|
||||
}else {
|
||||
alert("등록중 오류가 발생하였습니다.");
|
||||
location.href="${pageContext.request.contextPath}/";
|
||||
}
|
||||
}
|
||||
,error:function(request , status, error){
|
||||
@ -463,6 +305,10 @@
|
||||
<input type="hidden" name="qestnrId" id="qestnrId" value="<c:out value='${vEEduChasiVO.qestnrId}'/>"/>
|
||||
<input type="hidden" name="qustnrRespondId" id="qustnrRespondId" value="<c:out value='${vEEduChasiVO.qustnrRespondId}'/>"/>
|
||||
|
||||
<input type="hidden" name="chasiSrvyListSize" id="chasiSrvyListSize" value="<c:out value='${chasiSrvyListSize}'/>"/>
|
||||
|
||||
|
||||
|
||||
<input type="hidden" name="siteIdCd" id="siteIdCd" value="<c:out value='${vEEduChasiVO.siteIdCd}'/>"/>
|
||||
<input type="hidden" name="eduAplctOrd" id="eduAplctOrd" value="<c:out value='${vEEduChasiVO.eduAplctOrd}'/>"/>
|
||||
<input type="hidden" name="eduChasiOrd" id="eduChasiOrd" value="<c:out value='${vEEduChasiVO.eduChasiOrd}'/>"/>
|
||||
@ -525,7 +371,7 @@
|
||||
</td>
|
||||
<td id="popupSrvyStatus">
|
||||
<c:choose>
|
||||
<c:when test="${qestnrParticipant eq '' or qestnrParticipant eq null}">
|
||||
<c:when test="${qustnrNm eq '' or qustnrNm eq null}">
|
||||
설문진행중
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
@ -555,22 +401,22 @@
|
||||
<p>설문자 명</p>
|
||||
</th>
|
||||
<td>
|
||||
<label for="qestnrParticipant" class="label">설문자명 입력</label>
|
||||
<input type="text" numberOnly class="popupInput" style="width: 50%;"
|
||||
id="qestnrParticipant" name="qestnrParticipant" value="<c:out value="${qestnrParticipant}" />">
|
||||
<label for="qustnrNm" class="label">설문자명 입력</label>
|
||||
<input type="text" class="popupInput" style="width: 50%;"
|
||||
id="qustnrNm" name="qustnrNm" value="<c:out value="${qustnrNm}" />">
|
||||
</td>
|
||||
<th scope="row">
|
||||
<p>설문자 생년월일</p>
|
||||
</th>
|
||||
<td>
|
||||
<label for="qestnrRespondent" class="label">설문자명생년월일 입력</label>
|
||||
<label for="qustnrBirth" class="label">설문자명생년월일 입력</label>
|
||||
<!--
|
||||
<input type="text" numberOnly class="popupInput" style="width: 50%;"
|
||||
id="qestnrRespondent" name="qestnrRespondent" value="<c:out value="${qestnrRespondent}" />" onblur="replyCalculation(); return false;">
|
||||
-->
|
||||
|
||||
<div class="calendar_wrap">
|
||||
<duet-date-picker identifier="date" class="startDate" name="eduHopeDt" onblur="_chkChasiDate(this); return false;"></duet-date-picker>
|
||||
<duet-date-picker identifier="date" class="startDate" name="qustnrBirth" id="qustnrBirth" onblur="_chkChasiDate(this); return false;"></duet-date-picker>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
@ -621,28 +467,33 @@
|
||||
</th>
|
||||
<td>
|
||||
<label for="verySatisfied_${status1.index}" class="label">매우만족</label>
|
||||
<input type="text" numberOnly class="popupInput" style="width: 70%;padding:0 5px;text-align:center;"
|
||||
title="매우만족" id="verySatisfied_${status1.index}" name="resultList[${status1.index}].verySatisfied" value="${QestmInfo.verySatisfied}" >
|
||||
|
||||
<input type="radio" class="popupInput" id="answer_${status1.count}" name="answer_${status1.count}" value="verySatisfied">
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<label for="satisfied_${status1.index}" class="label">만족</label>
|
||||
<input type="text" numberOnly class="popupInput" style="width: 70%;padding:0 5px;text-align:center;"
|
||||
title="만족" id="satisfied_${status1.index}" name="resultList[${status1.index}].satisfied" value="${QestmInfo.satisfied}" >
|
||||
|
||||
<input type="radio" class="popupInput" id="answer_${status1.count}" name="answer_${status1.count}" value="satisfied">
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<label for="neither_${status1.index}" class="label">보통</label>
|
||||
<input type="text" numberOnly class="popupInput" style="width: 70%;padding:0 5px;text-align:center;"
|
||||
title="보통" id="neither_${status1.index}" name="resultList[${status1.index}].neither" value="${QestmInfo.neither}" >
|
||||
|
||||
<input type="radio" class="popupInput" id="answer_${status1.count}" name="answer_${status1.count}" value="neither" checked>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<label for="dissatisfied_${status1.index}" class="label">불만족</label>
|
||||
<input type="text" numberOnly class="popupInput" style="width: 70%;padding:0 5px;text-align:center;"
|
||||
title="불만족" id="dissatisfied_${status1.index}" name="resultList[${status1.index}].dissatisfied" value="${QestmInfo.dissatisfied}" >
|
||||
|
||||
<input type="radio" class="popupInput" id="answer_${status1.count}" name="answer_${status1.count}" value="dissatisfied">
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<label for="veryDissatisfied_${status1.index}" class="label">매우불만족</label>
|
||||
<input type="text" numberOnly class="popupInput" style="width: 70%;padding:0 5px;text-align:center;"
|
||||
title="매우불만족" id="veryDissatisfied_${status1.index}" name="resultList[${status1.index}].veryDissatisfied" value="${QestmInfo.veryDissatisfied}" >
|
||||
|
||||
<input type="radio" class="popupInput" id="answer_${status1.count}" name="answer_${status1.count}" value="veryDissatisfied">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
@ -664,7 +515,7 @@
|
||||
|
||||
<button type="button" class="btnType05" id="popupSubmin" onclick="popupSrvySendSubmit();">제출</button>
|
||||
|
||||
<button type="button" class="btnType02 tooltip-close" data-focus="sub37_pop01_close" data-focus-next="sub37_pop01">취소</button>
|
||||
<!-- <button type="button" class="btnType02 tooltip-close" data-focus="sub37_pop01_close" data-focus-next="sub37_pop01">취소</button> -->
|
||||
</div>
|
||||
<div class="btn_right">
|
||||
</div>
|
||||
@ -675,7 +526,7 @@
|
||||
<!-- 응답이 있다. -->
|
||||
|
||||
<script>
|
||||
replyCalculation();
|
||||
// replyCalculation();
|
||||
</script>
|
||||
|
||||
<div class="pop_btn_wrap btn_layout01">
|
||||
@ -683,7 +534,7 @@
|
||||
</div>
|
||||
<div class="btn_center">
|
||||
제출마감
|
||||
<button type="button" class="btnType02 tooltip-close" data-focus="sub37_pop01_close" data-focus-next="sub37_pop01">닫기</button>
|
||||
<!-- <button type="button" class="btnType02 tooltip-close" data-focus="sub37_pop01_close" data-focus-next="sub37_pop01">닫기</button> -->
|
||||
</div>
|
||||
<div class="btn_right">
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user