From a021a3670e549830f9f89859adc3a369dd6fd735 Mon Sep 17 00:00:00 2001 From: "hehihoho3@gmail.com" Date: Wed, 5 Feb 2025 10:41:30 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B0=9C=EC=86=A1=EA=B2=B0=EA=B3=BC=20?= =?UTF-8?q?=EC=83=81=EC=84=B8=ED=99=94=EB=A9=B4=20=EC=A7=84=ED=96=89?= =?UTF-8?q?=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../msgsent/service/MjonMsgDetailSentVO.java | 1 + .../sqlmap/let/msg/MjonMsgSent_SQL_mysql.xml | 1 + .../jsp/web/msgsent/MsgSentAllListAjax.jsp | 2 - .../jsp/web/msgsent/MsgSentDetailView.jsp | 175 ++++++++++++++++-- 4 files changed, 162 insertions(+), 17 deletions(-) diff --git a/src/main/java/itn/let/mjo/msgsent/service/MjonMsgDetailSentVO.java b/src/main/java/itn/let/mjo/msgsent/service/MjonMsgDetailSentVO.java index 93d49f51..3bad5431 100644 --- a/src/main/java/itn/let/mjo/msgsent/service/MjonMsgDetailSentVO.java +++ b/src/main/java/itn/let/mjo/msgsent/service/MjonMsgDetailSentVO.java @@ -20,6 +20,7 @@ public class MjonMsgDetailSentVO extends UserDefaultVO{ private String msgGroupCnt; private String reserveYn; private String reserveCYn; + private String canceldate; private String callFrom; private String userId; private String smsTxt; diff --git a/src/main/resources/egovframework/sqlmap/let/msg/MjonMsgSent_SQL_mysql.xml b/src/main/resources/egovframework/sqlmap/let/msg/MjonMsgSent_SQL_mysql.xml index 204ff38f..55276a44 100644 --- a/src/main/resources/egovframework/sqlmap/let/msg/MjonMsgSent_SQL_mysql.xml +++ b/src/main/resources/egovframework/sqlmap/let/msg/MjonMsgSent_SQL_mysql.xml @@ -355,6 +355,7 @@ , MGD.MSG_GROUP_CNT as msgGroupCnt , MGD.RESERVE_YN as reserveYn , MGD.RESERVE_C_YN as reserveCYn + , DATE_FORMAT(MGD.CANCELDATE, '%Y-%m-%d %H:%i') as canceldate , MGD.CALL_FROM as callFrom , MGD.USER_ID as userId , MGD.SMS_TXT as smsTxt diff --git a/src/main/webapp/WEB-INF/jsp/web/msgsent/MsgSentAllListAjax.jsp b/src/main/webapp/WEB-INF/jsp/web/msgsent/MsgSentAllListAjax.jsp index 95824e6a..68fff760 100644 --- a/src/main/webapp/WEB-INF/jsp/web/msgsent/MsgSentAllListAjax.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/msgsent/MsgSentAllListAjax.jsp @@ -344,6 +344,4 @@ function fnReservCancel(msgGroupId){
- -
diff --git a/src/main/webapp/WEB-INF/jsp/web/msgsent/MsgSentDetailView.jsp b/src/main/webapp/WEB-INF/jsp/web/msgsent/MsgSentDetailView.jsp index 512cae4d..1e98deb2 100644 --- a/src/main/webapp/WEB-INF/jsp/web/msgsent/MsgSentDetailView.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/msgsent/MsgSentDetailView.jsp @@ -222,20 +222,136 @@ function fn_downloadFilteredExcel() { data: filteredData // 필터링된 데이터만 다운로드 }); } + +/** + * @ 예약 취소 + */ +function fnReservCancel(msgGroupId){ + + var form = document.resCancelForm; + var loginVO = '${LoginVO}'; + + form.msgGroupId.value = msgGroupId; + + if(loginVO == "" || loginVO == null){ + + alert("로그인 후 이용이 가능합니다."); + return false; + + } + console.log('msgGroupId : ', msgGroupId); + var data = new FormData(form); + url = "/web/mjon/reservmsg/deleteReservMsgCancelDataAjax.do"; + + if(confirm("정말 예약을 취소하시겠습니까?")){ + + $.ajax({ + type: "POST", + url: url, + data: data, + dataType:'json', + async: true, + processData: false, + contentType: false, + cache: false, + success: function (returnData, status) { + if(status == 'success'){ // status 확인 필요한가. 석세스 안뜨면 에러 가지 않나 + if("fail"==returnData.result){ + alert(returnData.message); + return false; + } + + alert("예약 발송이 정상적으로 취소 되었습니다."); + + location.reload(true); + + } else if(status== 'fail'){ + alert(returnData.message); + } + }, + error: function (e) { + alert("예약 취소에 실패하였습니다."); console.log("ERROR : ", e); + }, + beforeSend : function(xmlHttpRequest) { + //로딩창 show + $('.loading_layer').addClass('active'); + }, + complete : function(xhr, textStatus) { + //로딩창 hide + $('.loading_layer').removeClass('active'); + } + }); + + } + +} + +/** + * @문자 재전송 + */ +function fnMjMsgReSendAll(msgGroupId + , replaceCnt, electionCnt, advertisementCnt + ) { + + + + var form = document.reSendAllForm; + form.msgResendAllFlag.value = "Y"; + form.msgResendAllGroupId.value = msgGroupId; + + if (replaceCnt > 0) { + if (confirm("특정문구 일괄변환 문자(치환문자)의 경우 문자내용은 재전송할 수 없고 받는 사람 목록만 불러올 수 있습니다.\n받는사람 목록을 불러올까요?")) { + // 광고문자 + form.msgResendAllReplaceYn.value = "Y"; + if (electionCnt > 0) { + form.action="/web/mjon/msgcampain/selectMsgDataView.do"; + } + else { + if (advertisementCnt > 0) { + // 광고문자 + form.msgResendAllAdvertiseYn.value = "Y"; + form.action="/web/mjon/msgdata/excel/selectMsgExcelDataView.do"; + } + else + { + form.action="/web/mjon/msgdata/selectMsgDataView.do"; + } + } + form.submit(); + } + } + else { + var title = ""; + if (electionCnt > 0) { + title = "선거문자발송"; + } + else { + title = "문자발송"; + } + + if (confirm(title + " 화면으로 이동합니다.\n문자내용, 받는 사람 목록 확인후 발송해주세요.")) { + if (electionCnt > 0) { + form.action="/web/mjon/msgcampain/selectMsgDataView.do"; + } + else { + if (advertisementCnt > 0) { + // 광고문자 + form.msgResendAllAdvertiseYn.value = "Y"; + form.action="/web/mjon/msgdata/excel/selectMsgExcelDataView.do"; + } + else + { + form.action="/web/mjon/msgdata/selectMsgDataView.do"; + } + } + form.submit(); + } + } +} +
-
- " /> - - - - - - - - -
@@ -255,7 +371,7 @@ function fn_downloadFilteredExcel() {

발송정보

-

+

@@ -270,10 +386,12 @@ function fn_downloadFilteredExcel() {
${result.regDate }
+
제목
${result.subject }
+
형태
@@ -311,11 +429,12 @@ function fn_downloadFilteredExcel() { - -
+ + 예약취소() + @@ -526,5 +645,31 @@ function fn_downloadFilteredExcel() {
- + + + +
+ " /> + + + + + + + + +
+ + +
+ +
+ + +
+ + + + +