문자재전송 개발중
This commit is contained in:
parent
785e892d9d
commit
474063728b
@ -279,6 +279,11 @@ public class MjonMsgCampainDataController {
|
|||||||
}
|
}
|
||||||
model.addAttribute("letterVO", letterVO);
|
model.addAttribute("letterVO", letterVO);
|
||||||
|
|
||||||
|
// 문자 재전송 New
|
||||||
|
model.addAttribute("msgResendAllFlag", searchVO.getMsgResendAllFlag());
|
||||||
|
model.addAttribute("msgResendAllGroupId", searchVO.getMsgResendAllGroupId());
|
||||||
|
model.addAttribute("msgResendAllAdvertiseYn", searchVO.getMsgResendAllAdvertiseYn());
|
||||||
|
|
||||||
return "web/msgcampain/MsgDataView";
|
return "web/msgcampain/MsgDataView";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -157,5 +157,12 @@ public interface MjonMsgDataService {
|
|||||||
|
|
||||||
public List<MjonMsgVO> selectPayUserWithKakaoList(MjonMsgVO mjonMsgVO) throws Exception;
|
public List<MjonMsgVO> selectPayUserWithKakaoList(MjonMsgVO mjonMsgVO) throws Exception;
|
||||||
|
|
||||||
public List<MjonMsgVO> selectPayUserWithKakaoSumList(MjonMsgVO mjonMsgVO) throws Exception;
|
public List<MjonMsgVO> selectPayUserWithKakaoSumList(MjonMsgVO mjonMsgVO) throws Exception;
|
||||||
|
|
||||||
|
// 문자 그룹정보 => 재전송용
|
||||||
|
public MjonMsgDataVO selectMjMsgGroupInfoByResend(MjonMsgDataVO mjonMsgDataVO) throws Exception;
|
||||||
|
|
||||||
|
// 문자 상세정보 => 재전송용
|
||||||
|
public List<MjonMsgDataVO> selectMjMsgListByResend(MjonMsgDataVO mjonMsgDataVO) throws Exception;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -60,6 +60,71 @@ public class MjonMsgDataVO extends UserDefaultVO{
|
|||||||
|
|
||||||
private String userIp; //사용자 아이피 정보
|
private String userIp; //사용자 아이피 정보
|
||||||
private String refundYn; //문자전송 실패시 환불처리 완료 여부
|
private String refundYn; //문자전송 실패시 환불처리 완료 여부
|
||||||
|
|
||||||
|
private String msgGroupId;
|
||||||
|
private String filePath1; //그림이미지1 경로
|
||||||
|
private String filePath2; //그림이미지2 경로
|
||||||
|
private String filePath3; //그림이미지3 경로
|
||||||
|
private String callFrom;
|
||||||
|
private String callTo;
|
||||||
|
private String msgResendAllFlag;
|
||||||
|
private String msgResendAllGroupId;
|
||||||
|
private String msgResendAllAdvertiseYn;
|
||||||
|
|
||||||
|
public String getMsgGroupId() {
|
||||||
|
return msgGroupId;
|
||||||
|
}
|
||||||
|
public void setMsgGroupId(String msgGroupId) {
|
||||||
|
this.msgGroupId = msgGroupId;
|
||||||
|
}
|
||||||
|
public String getFilePath1() {
|
||||||
|
return filePath1;
|
||||||
|
}
|
||||||
|
public void setFilePath1(String filePath1) {
|
||||||
|
this.filePath1 = filePath1;
|
||||||
|
}
|
||||||
|
public String getFilePath2() {
|
||||||
|
return filePath2;
|
||||||
|
}
|
||||||
|
public void setFilePath2(String filePath2) {
|
||||||
|
this.filePath2 = filePath2;
|
||||||
|
}
|
||||||
|
public String getFilePath3() {
|
||||||
|
return filePath3;
|
||||||
|
}
|
||||||
|
public void setFilePath3(String filePath3) {
|
||||||
|
this.filePath3 = filePath3;
|
||||||
|
}
|
||||||
|
public String getCallFrom() {
|
||||||
|
return callFrom;
|
||||||
|
}
|
||||||
|
public void setCallFrom(String callFrom) {
|
||||||
|
this.callFrom = callFrom;
|
||||||
|
}
|
||||||
|
public String getCallTo() {
|
||||||
|
return callTo;
|
||||||
|
}
|
||||||
|
public void setCallTo(String callTo) {
|
||||||
|
this.callTo = callTo;
|
||||||
|
}
|
||||||
|
public String getMsgResendAllFlag() {
|
||||||
|
return msgResendAllFlag;
|
||||||
|
}
|
||||||
|
public void setMsgResendAllFlag(String msgResendAllFlag) {
|
||||||
|
this.msgResendAllFlag = msgResendAllFlag;
|
||||||
|
}
|
||||||
|
public String getMsgResendAllGroupId() {
|
||||||
|
return msgResendAllGroupId;
|
||||||
|
}
|
||||||
|
public void setMsgResendAllGroupId(String msgResendAllGroupId) {
|
||||||
|
this.msgResendAllGroupId = msgResendAllGroupId;
|
||||||
|
}
|
||||||
|
public String getMsgResendAllAdvertiseYn() {
|
||||||
|
return msgResendAllAdvertiseYn;
|
||||||
|
}
|
||||||
|
public void setMsgResendAllAdvertiseYn(String msgResendAllAdvertiseYn) {
|
||||||
|
this.msgResendAllAdvertiseYn = msgResendAllAdvertiseYn;
|
||||||
|
}
|
||||||
|
|
||||||
public String getCodeId() {
|
public String getCodeId() {
|
||||||
return codeId;
|
return codeId;
|
||||||
|
|||||||
@ -329,4 +329,16 @@ public class MjonMsgDataDAO extends EgovAbstractDAO {
|
|||||||
public List<MjonMsgVO> selectPayUserWithKakaoSumList(MjonMsgVO mjonMsgVO) throws Exception{
|
public List<MjonMsgVO> selectPayUserWithKakaoSumList(MjonMsgVO mjonMsgVO) throws Exception{
|
||||||
return (List<MjonMsgVO>) list("mjonMsgDAO.selectPayUserWithKakaoSumList",mjonMsgVO);
|
return (List<MjonMsgVO>) list("mjonMsgDAO.selectPayUserWithKakaoSumList",mjonMsgVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 문자 그룹정보 => 재전송용
|
||||||
|
public MjonMsgDataVO selectMjMsgGroupInfoByResend(MjonMsgDataVO mjonMsgDataVO) throws Exception{
|
||||||
|
return (MjonMsgDataVO) select("MjonMsgDataDAO.selectMjMsgGroupInfoByResend", mjonMsgDataVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 문자 상세정보 => 재전송용
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public List<MjonMsgDataVO> selectMjMsgListByResend(MjonMsgDataVO mjonMsgDataVO) throws Exception{
|
||||||
|
return (List<MjonMsgDataVO>) list("MjonMsgDataDAO.selectMjMsgListByResend", mjonMsgDataVO);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2279,5 +2279,16 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
|
|||||||
@Override
|
@Override
|
||||||
public List<MjonMsgVO> selectPayUserWithKakaoSumList(MjonMsgVO mjonMsgVO) throws Exception {
|
public List<MjonMsgVO> selectPayUserWithKakaoSumList(MjonMsgVO mjonMsgVO) throws Exception {
|
||||||
return mjonMsgDataDAO.selectPayUserWithKakaoSumList(mjonMsgVO);
|
return mjonMsgDataDAO.selectPayUserWithKakaoSumList(mjonMsgVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 문자 그룹정보 => 재전송용
|
||||||
|
public MjonMsgDataVO selectMjMsgGroupInfoByResend(MjonMsgDataVO mjonMsgDataVO) throws Exception{
|
||||||
|
return mjonMsgDataDAO.selectMjMsgGroupInfoByResend(mjonMsgDataVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 문자 상세정보 => 재전송용
|
||||||
|
public List<MjonMsgDataVO> selectMjMsgListByResend(MjonMsgDataVO mjonMsgDataVO) throws Exception{
|
||||||
|
return mjonMsgDataDAO.selectMjMsgListByResend(mjonMsgDataVO);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -398,6 +398,11 @@ public class MjonMsgDataController {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 문자 재전송 New
|
||||||
|
model.addAttribute("msgResendAllFlag", searchVO.getMsgResendAllFlag());
|
||||||
|
model.addAttribute("msgResendAllGroupId", searchVO.getMsgResendAllGroupId());
|
||||||
|
model.addAttribute("msgResendAllAdvertiseYn", searchVO.getMsgResendAllAdvertiseYn());
|
||||||
|
|
||||||
}catch(Exception ex) {
|
}catch(Exception ex) {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
|
|
||||||
@ -5865,4 +5870,81 @@ public class MjonMsgDataController {
|
|||||||
return rtnValue;
|
return rtnValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value= {"/web/mjon/msgdata/selectMjMsgGroupInfoByResendAjax.do"})
|
||||||
|
public ModelAndView selectMjMsgGroupInfoByResendAjax(
|
||||||
|
MjonMsgDataVO mjonMsgDataVO,
|
||||||
|
HttpServletRequest request,
|
||||||
|
ModelMap model) throws Exception {
|
||||||
|
|
||||||
|
ModelAndView modelAndView = new ModelAndView();
|
||||||
|
modelAndView.setViewName("jsonView");
|
||||||
|
|
||||||
|
boolean isSuccess = true;
|
||||||
|
String msg = "";
|
||||||
|
|
||||||
|
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
|
||||||
|
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
||||||
|
|
||||||
|
try {
|
||||||
|
if(userId.equals("")) {
|
||||||
|
isSuccess = false;
|
||||||
|
msg = "로그인이 필요합니다.";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
mjonMsgDataVO.setUserId(userId);
|
||||||
|
mjonMsgDataVO.setMsgGroupId(mjonMsgDataVO.getMsgResendAllGroupId());
|
||||||
|
mjonMsgDataVO = mjonMsgDataService.selectMjMsgGroupInfoByResend(mjonMsgDataVO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch(Exception e) {
|
||||||
|
isSuccess = false;
|
||||||
|
msg = e.getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
modelAndView.addObject("isSuccess", isSuccess);
|
||||||
|
modelAndView.addObject("msg", msg);
|
||||||
|
modelAndView.addObject("result", mjonMsgDataVO);
|
||||||
|
|
||||||
|
return modelAndView;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value= {"/web/mjon/msgdata/selectMjMsgListByResendAjax.do"})
|
||||||
|
public ModelAndView selectMjMsgListByResendAjax(
|
||||||
|
MjonMsgDataVO mjonMsgDataVO,
|
||||||
|
HttpServletRequest request,
|
||||||
|
ModelMap model) throws Exception {
|
||||||
|
|
||||||
|
ModelAndView modelAndView = new ModelAndView();
|
||||||
|
modelAndView.setViewName("jsonView");
|
||||||
|
|
||||||
|
boolean isSuccess = true;
|
||||||
|
String msg = "";
|
||||||
|
List<MjonMsgDataVO> resultList = null;
|
||||||
|
|
||||||
|
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
|
||||||
|
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
||||||
|
|
||||||
|
try {
|
||||||
|
if(userId.equals("")) {
|
||||||
|
isSuccess = false;
|
||||||
|
msg = "로그인이 필요합니다.";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
mjonMsgDataVO.setUserId(userId);
|
||||||
|
mjonMsgDataVO.setMsgGroupId(mjonMsgDataVO.getMsgResendAllGroupId());
|
||||||
|
resultList = mjonMsgDataService.selectMjMsgListByResend(mjonMsgDataVO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch(Exception e) {
|
||||||
|
isSuccess = false;
|
||||||
|
msg = e.getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
modelAndView.addObject("isSuccess", isSuccess);
|
||||||
|
modelAndView.addObject("msg", msg);
|
||||||
|
modelAndView.addObject("resultList", resultList);
|
||||||
|
|
||||||
|
return modelAndView;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7248,5 +7248,55 @@
|
|||||||
)FN1
|
)FN1
|
||||||
ORDER BY msgGroupId DESC
|
ORDER BY msgGroupId DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 문자 그룹정보 => 재전송용 -->
|
||||||
|
<select id="MjonMsgDataDAO.selectMjMsgGroupInfoByResend" parameterClass="mjonMsgDataVO" resultClass="mjonMsgDataVO">
|
||||||
|
SELECT
|
||||||
|
CALL_FROM AS callFrom
|
||||||
|
, SUBJECT AS subject
|
||||||
|
, SMS_TXT AS smsTxt
|
||||||
|
, (
|
||||||
|
SELECT
|
||||||
|
IFNULL(FILE_PATH1, '')
|
||||||
|
FROM MJ_MSG_DATA
|
||||||
|
WHERE
|
||||||
|
USER_ID = #userId#
|
||||||
|
AND MSG_GROUP_ID = #msgGroupId#
|
||||||
|
LIMIT 1
|
||||||
|
) filePath1
|
||||||
|
, (
|
||||||
|
SELECT
|
||||||
|
IFNULL(FILE_PATH2, '')
|
||||||
|
FROM MJ_MSG_DATA
|
||||||
|
WHERE
|
||||||
|
USER_ID = #userId#
|
||||||
|
AND MSG_GROUP_ID = #msgGroupId#
|
||||||
|
LIMIT 1
|
||||||
|
) filePath2
|
||||||
|
, (
|
||||||
|
SELECT
|
||||||
|
IFNULL(FILE_PATH3, '')
|
||||||
|
FROM MJ_MSG_DATA
|
||||||
|
WHERE
|
||||||
|
USER_ID = #userId#
|
||||||
|
AND MSG_GROUP_ID = #msgGroupId#
|
||||||
|
LIMIT 1
|
||||||
|
) filePath3
|
||||||
|
FROM MJ_MSG_GROUP_DATA
|
||||||
|
WHERE
|
||||||
|
USER_ID = #userId#
|
||||||
|
AND MSG_GROUP_ID = #msgGroupId#
|
||||||
|
LIMIT 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="MjonMsgDataDAO.selectMjMsgListByResend" parameterClass="mjonMsgDataVO" resultClass="mjonMsgDataVO">
|
||||||
|
SELECT
|
||||||
|
CALL_TO AS callTo
|
||||||
|
FROM MJ_MSG_DATA
|
||||||
|
WHERE
|
||||||
|
USER_ID = #userId#
|
||||||
|
AND MSG_GROUP_ID = #msgGroupId#
|
||||||
|
</select>
|
||||||
|
|
||||||
</sqlMap>
|
</sqlMap>
|
||||||
|
|
||||||
|
|||||||
@ -20,6 +20,10 @@ var tableAddr = null; //주소록 불러오기 팝업 Tabulator 변수
|
|||||||
var loginVO = '${loginVO}';
|
var loginVO = '${loginVO}';
|
||||||
|
|
||||||
var popCustomScrT=0; // 맞춤제작 요청 JSPark => 2023.02.21 추가
|
var popCustomScrT=0; // 맞춤제작 요청 JSPark => 2023.02.21 추가
|
||||||
|
var msgResendAllFlag = "${msgResendAllFlag}";
|
||||||
|
var msgResendAllGroupId = "${msgResendAllGroupId}";
|
||||||
|
var msgResendAllAdvertiseYn = "${msgResendAllAdvertiseYn}";
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
//문자 발송 화면 폼 불러오기
|
//문자 발송 화면 폼 불러오기
|
||||||
listMsgDataView();
|
listMsgDataView();
|
||||||
@ -50,8 +54,102 @@ $(document).ready(function(){
|
|||||||
// 맞춤제작 요청 JSPark => 2023.02.21 추가
|
// 맞춤제작 요청 JSPark => 2023.02.21 추가
|
||||||
//맞춤제작 등록 Popup
|
//맞춤제작 등록 Popup
|
||||||
//customPopup();
|
//customPopup();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//문자 그룹정보 => 재전송용
|
||||||
|
function getMjMsgGroupInfoByResend() {
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "/web/mjon/msgdata/selectMjMsgGroupInfoByResendAjax.do",
|
||||||
|
data: {"msgResendAllGroupId" : msgResendAllGroupId},
|
||||||
|
dataType:'json',
|
||||||
|
async: false,
|
||||||
|
success: function (data) {
|
||||||
|
if(data.isSuccess == true){
|
||||||
|
//data.result.callFrom;
|
||||||
|
//data.result.subject;
|
||||||
|
//data.result.smsTxt;
|
||||||
|
//data.result.filePath1;
|
||||||
|
//data.result.filePath2;
|
||||||
|
//data.result.filePath3;
|
||||||
|
|
||||||
|
// 발신번호
|
||||||
|
var reCallFrom = $.trim(removeDash($("#callFromList option:selected").val()));
|
||||||
|
if ($.trim(removeDash(data.result.callFrom)) != reCallFrom) {
|
||||||
|
alert("선택된 발신번호가 이전에 발송한 발신번호가 아닙니다.\n발신번호를 확인해주세요.")
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
// 제목
|
||||||
|
if (data.result.subject != null && data.result.subject != "") {
|
||||||
|
$('.msg_title').addClass('active');
|
||||||
|
$("input:radio[name='title_status']:radio[value='Y']").prop('checked', true); // 선택하기
|
||||||
|
$('.textbox').show();
|
||||||
|
$("#mmsSubject").val(data.result.subject);
|
||||||
|
}
|
||||||
|
|
||||||
|
var reSmsTxt = data.result.smsTxt.replaceAll("<br/>", "\n"); //줄발꿈문자 변환하기
|
||||||
|
// 문자내용
|
||||||
|
if(reSmsTxt != null){
|
||||||
|
$("#smsTxtArea").val(reSmsTxt);
|
||||||
|
fnByteString(reSmsTxt);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
} else {
|
||||||
|
alert("Message : " + msg);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (e) {
|
||||||
|
//alert("저장에 실패하였습니다.");
|
||||||
|
//console.log("ERROR : ", e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 문자 상세정보 => 재전송용
|
||||||
|
function getMjMsgListByResend() {
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "/web/mjon/msgdata/selectMjMsgListByResendAjax.do",
|
||||||
|
data: {"msgResendAllGroupId" : msgResendAllGroupId},
|
||||||
|
dataType:'json',
|
||||||
|
async: true,
|
||||||
|
success: function (data) {
|
||||||
|
if(data.isSuccess == true){
|
||||||
|
var listCnt = data.resultList.length;
|
||||||
|
|
||||||
|
//수신자 처리 변수
|
||||||
|
var callToList = []; //수신자 처리 리스트
|
||||||
|
var tableData = []; //수신자 tabulator 처리 변수
|
||||||
|
|
||||||
|
for(var i = 0; i < listCnt; i++){ // 수신자 리스트 Tabulator에 입력해 주기
|
||||||
|
callToList[i] = data.resultList[i].callTo;
|
||||||
|
tableData.push({phone: removeDash(callToList[i])});
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tableData.length > 0){
|
||||||
|
tableL.addData(dupliPhoneData(tableData)); // 받는사람 목록에 주소 정보 입력하기
|
||||||
|
|
||||||
|
totRows = tableL.getRows().length;
|
||||||
|
updateTotCnt(totRows); //전체 데이터 갯수 구하기
|
||||||
|
|
||||||
|
//결제 금액 구하기
|
||||||
|
totalPriceSum(totRows);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
//alert("Message : " + msg);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (e) {
|
||||||
|
//alert("저장에 실패하였습니다.");
|
||||||
|
//console.log("ERROR : ", e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function listMsgDataView(){
|
function listMsgDataView(){
|
||||||
|
|
||||||
var sendData = $(document.searchForm).serializeArray() ;
|
var sendData = $(document.searchForm).serializeArray() ;
|
||||||
@ -77,6 +175,15 @@ function listMsgDataView(){
|
|||||||
fnAddrSet(moveAddrFlag, addrIdList);
|
fnAddrSet(moveAddrFlag, addrIdList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 문자 재전송 New
|
||||||
|
if (msgResendAllFlag == "Y") {
|
||||||
|
// 문자 그룹정보 => 재전송용
|
||||||
|
getMjMsgGroupInfoByResend();
|
||||||
|
|
||||||
|
// 문자 상세정보 => 재전송용
|
||||||
|
getMjMsgListByResend();
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -20,6 +20,10 @@ var tableAddr = null; //주소록 불러오기 팝업 Tabulator 변수
|
|||||||
var loginVO = '${loginVO}';
|
var loginVO = '${loginVO}';
|
||||||
|
|
||||||
var popCustomScrT=0; // 맞춤제작 요청 JSPark => 2023.02.21 추가
|
var popCustomScrT=0; // 맞춤제작 요청 JSPark => 2023.02.21 추가
|
||||||
|
var msgResendAllFlag = "${msgResendAllFlag}";
|
||||||
|
var msgResendAllGroupId = "${msgResendAllGroupId}";
|
||||||
|
var msgResendAllAdvertiseYn = "${msgResendAllAdvertiseYn}";
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
var tsMoreSampleYn = "${moreSampleYn}";
|
var tsMoreSampleYn = "${moreSampleYn}";
|
||||||
var tsMainImgFlag = "${mainImgVO.mainImgFlag}";
|
var tsMainImgFlag = "${mainImgVO.mainImgFlag}";
|
||||||
@ -79,6 +83,99 @@ $(document).ready(function(){
|
|||||||
//customPopup();
|
//customPopup();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 문자 그룹정보 => 재전송용
|
||||||
|
function getMjMsgGroupInfoByResend() {
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "/web/mjon/msgdata/selectMjMsgGroupInfoByResendAjax.do",
|
||||||
|
data: {"msgResendAllGroupId" : msgResendAllGroupId},
|
||||||
|
dataType:'json',
|
||||||
|
async: false,
|
||||||
|
success: function (data) {
|
||||||
|
if(data.isSuccess == true){
|
||||||
|
//data.result.callFrom;
|
||||||
|
//data.result.subject;
|
||||||
|
//data.result.smsTxt;
|
||||||
|
//data.result.filePath1;
|
||||||
|
//data.result.filePath2;
|
||||||
|
//data.result.filePath3;
|
||||||
|
|
||||||
|
// 발신번호
|
||||||
|
var reCallFrom = $.trim(removeDash($("#callFromList option:selected").val()));
|
||||||
|
if ($.trim(removeDash(data.result.callFrom)) != reCallFrom) {
|
||||||
|
alert("선택된 발신번호가 이전에 발송한 발신번호가 아닙니다.\n발신번호를 확인해주세요.")
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
// 제목
|
||||||
|
if (data.result.subject != null && data.result.subject != "") {
|
||||||
|
$('.msg_title').addClass('active');
|
||||||
|
$("input:radio[name='title_status']:radio[value='Y']").prop('checked', true); // 선택하기
|
||||||
|
$('.textbox').show();
|
||||||
|
$("#mmsSubject").val(data.result.subject);
|
||||||
|
}
|
||||||
|
|
||||||
|
var reSmsTxt = data.result.smsTxt.replaceAll("<br/>", "\n"); //줄발꿈문자 변환하기
|
||||||
|
// 문자내용
|
||||||
|
if(reSmsTxt != null){
|
||||||
|
$("#smsTxtArea").val(reSmsTxt);
|
||||||
|
fnByteString(reSmsTxt);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
} else {
|
||||||
|
alert("Message : " + msg);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (e) {
|
||||||
|
//alert("저장에 실패하였습니다.");
|
||||||
|
//console.log("ERROR : ", e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 문자 상세정보 => 재전송용
|
||||||
|
function getMjMsgListByResend() {
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "/web/mjon/msgdata/selectMjMsgListByResendAjax.do",
|
||||||
|
data: {"msgResendAllGroupId" : msgResendAllGroupId},
|
||||||
|
dataType:'json',
|
||||||
|
async: false,
|
||||||
|
success: function (data) {
|
||||||
|
if(data.isSuccess == true){
|
||||||
|
var listCnt = data.resultList.length;
|
||||||
|
|
||||||
|
//수신자 처리 변수
|
||||||
|
var callToList = []; //수신자 처리 리스트
|
||||||
|
var tableData = []; //수신자 tabulator 처리 변수
|
||||||
|
|
||||||
|
for(var i = 0; i < listCnt; i++){ // 수신자 리스트 Tabulator에 입력해 주기
|
||||||
|
callToList[i] = data.resultList[i].callTo;
|
||||||
|
tableData.push({phone: removeDash(callToList[i])});
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tableData.length > 0){
|
||||||
|
tableL.addData(dupliPhoneData(tableData)); // 받는사람 목록에 주소 정보 입력하기
|
||||||
|
|
||||||
|
totRows = tableL.getRows().length;
|
||||||
|
updateTotCnt(totRows); //전체 데이터 갯수 구하기
|
||||||
|
|
||||||
|
//결제 금액 구하기
|
||||||
|
totalPriceSum(totRows);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
//alert("Message : " + msg);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (e) {
|
||||||
|
//alert("저장에 실패하였습니다.");
|
||||||
|
//console.log("ERROR : ", e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function listMsgDataView(){
|
function listMsgDataView(){
|
||||||
|
|
||||||
@ -268,6 +365,14 @@ function listMsgDataView(){
|
|||||||
fnAddrSet(moveAddrFlag, addrIdList);
|
fnAddrSet(moveAddrFlag, addrIdList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 문자 재전송 New
|
||||||
|
if (msgResendAllFlag == "Y") {
|
||||||
|
// 문자 그룹정보 => 재전송용
|
||||||
|
getMjMsgGroupInfoByResend();
|
||||||
|
|
||||||
|
// 문자 상세정보 => 재전송용
|
||||||
|
getMjMsgListByResend();
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -136,9 +136,21 @@ $(document).ready(function(){
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<c:set var="replaceCnt" value="0" />
|
||||||
|
<c:set var="electionCnt" value="0" />
|
||||||
|
<c:set var="advertisementCnt" value="0" />
|
||||||
<c:choose>
|
<c:choose>
|
||||||
<c:when test="${not empty resultAllSentList}">
|
<c:when test="${not empty resultAllSentList}">
|
||||||
<c:forEach var="resultAllSentList" items="${resultAllSentList}" varStatus="status">
|
<c:forEach var="resultAllSentList" items="${resultAllSentList}" varStatus="status">
|
||||||
|
<c:if test="${fn:indexOf(resultAllSentList.smsTxt,'[*이름*]') != -1 || fn:indexOf(resultAllSentList.smsTxt,'[*1*]') != -1 || fn:indexOf(resultAllSentList.smsTxt,'[*2*]') != -1 || fn:indexOf(resultAllSentList.smsTxt,'[*3*]') != -1 || fn:indexOf(resultAllSentList.smsTxt,'[*4*]') != -1}">
|
||||||
|
<c:set var="replaceCnt" value="1" />
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${fn:indexOf(resultAllSentList.smsTxt,'(선거운동정보)') == 0}">
|
||||||
|
<c:set var="electionCnt" value="1" />
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${fn:indexOf(resultAllSentList.smsTxt,'(광고)') == 0}">
|
||||||
|
<c:set var="advertisementCnt" value="1" />
|
||||||
|
</c:if>
|
||||||
<tr>
|
<tr>
|
||||||
<td name="listTd">
|
<td name="listTd">
|
||||||
<label for="msgSentDel${status.count}" class="label">선택</label>
|
<label for="msgSentDel${status.count}" class="label">선택</label>
|
||||||
@ -194,6 +206,9 @@ $(document).ready(function(){
|
|||||||
</td>
|
</td>
|
||||||
<td name="listTd">
|
<td name="listTd">
|
||||||
<button class="btnType btnType20" data-tooltip="rev_popup01" onClick="javascript:fnRevDetailPop('${resultAllSentList.msgGroupId}','${resultAllSentList.msgId}','${resultAllSentList.fileCnt}'); return false;">상세보기</button>
|
<button class="btnType btnType20" data-tooltip="rev_popup01" onClick="javascript:fnRevDetailPop('${resultAllSentList.msgGroupId}','${resultAllSentList.msgId}','${resultAllSentList.fileCnt}'); return false;">상세보기</button>
|
||||||
|
<%--
|
||||||
|
<button class="btnType btnType20" onClick="javascript:fnMjMsgReSendAll('${resultAllSentList.msgGroupId}','${replaceCnt}','${electionCnt}','${advertisementCnt}'); return false;">재전송</button>
|
||||||
|
--%>
|
||||||
</td>
|
</td>
|
||||||
<td name="listTd">
|
<td name="listTd">
|
||||||
<c:choose>
|
<c:choose>
|
||||||
|
|||||||
@ -704,6 +704,40 @@ function infoPop(pageUrl){
|
|||||||
document.popForm.target = "infoPop";
|
document.popForm.target = "infoPop";
|
||||||
document.popForm.submit();
|
document.popForm.submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//문자 재전송
|
||||||
|
function fnMjMsgReSendAll(msgGroupId, replaceCnt, electionCnt, advertisementCnt) {
|
||||||
|
if (replaceCnt > 0) {
|
||||||
|
alert("치환문자는 재전송 불가합니다.");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var title = "";
|
||||||
|
if (electionCnt > 0) {
|
||||||
|
title = "선거문자발송";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
title = "문자발송";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (confirm(title + " 화면으로 이동합니다.\n문자내용, 받는사람 확인후 발송해주세요.")) {
|
||||||
|
var form = document.reSendAllForm;
|
||||||
|
form.msgResendAllFlag.value = "Y";
|
||||||
|
form.msgResendAllGroupId.value = msgGroupId;
|
||||||
|
if (electionCnt > 0) {
|
||||||
|
form.action="/web/mjon/msgcampain/selectMsgDataView.do";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (advertisementCnt > 0) {
|
||||||
|
// 광고문자
|
||||||
|
form.msgResendAllAdvertiseYn.value = "Y";
|
||||||
|
}
|
||||||
|
form.action="/web/mjon/msgdata/selectMsgDataView.do";
|
||||||
|
}
|
||||||
|
form.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<!-- 문자내용 팝업 data-tooltip: rev_popup01 -->
|
<!-- 문자내용 팝업 data-tooltip: rev_popup01 -->
|
||||||
<div class="tooltip-wrap">
|
<div class="tooltip-wrap">
|
||||||
@ -1046,4 +1080,8 @@ function infoPop(pageUrl){
|
|||||||
<form name="popForm" id="popForm" method="post">
|
<form name="popForm" id="popForm" method="post">
|
||||||
<input type="hidden" name="pageType" id="pageType" value=""/>
|
<input type="hidden" name="pageType" id="pageType" value=""/>
|
||||||
</form>
|
</form>
|
||||||
|
<form name="reSendAllForm" method="post">
|
||||||
|
<input type="hidden" name="msgResendAllFlag" value="N"/>
|
||||||
|
<input type="hidden" name="msgResendAllGroupId" value=""/>
|
||||||
|
<input type="hidden" name="msgResendAllAdvertiseYn" value="N"/>
|
||||||
|
</form>
|
||||||
Loading…
Reference in New Issue
Block a user