From f22a5850e1daab8419b214dd7992823c83c26b19 Mon Sep 17 00:00:00 2001 From: "hehihoho3@gmail.com" Date: Wed, 16 Apr 2025 15:23:55 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B9=9C=EA=B5=AC=ED=86=A1=20=EB=B0=9C?= =?UTF-8?q?=EC=86=A1=20=EC=97=91=EC=85=80=20=EB=B6=88=EB=9F=AC=EC=98=A4?= =?UTF-8?q?=EA=B8=B0=20=EB=8C=80=EB=9F=89=EC=9C=BC=EB=A1=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/itn/com/cmm/MjonFTSendVO.java | 129 +++ .../java/itn/let/kakao/kakaoComm/KakaoVO.java | 16 + .../impl/KakaoFriendsTalkServiceImpl.java | 10 +- .../web/KakaoFriendsTalkSendController.java | 2 +- .../ft/KakaoFriendsTalkMsgDataView.jsp | 67 +- .../msgdata/include/ftDataIncludeExcel.jsp | 957 ++++++++++++++++++ .../msgdata/include/msgDataIncludeExcel.jsp | 13 - src/main/webapp/js/kakao/ft/ftPriceClclt.js | 14 +- src/main/webapp/js/kakao/ft/ftTabulator.js | 12 +- 9 files changed, 1182 insertions(+), 38 deletions(-) create mode 100644 src/main/java/itn/com/cmm/MjonFTSendVO.java create mode 100644 src/main/webapp/WEB-INF/jsp/web/kakao/msgdata/include/ftDataIncludeExcel.jsp diff --git a/src/main/java/itn/com/cmm/MjonFTSendVO.java b/src/main/java/itn/com/cmm/MjonFTSendVO.java new file mode 100644 index 00000000..59aac5ba --- /dev/null +++ b/src/main/java/itn/com/cmm/MjonFTSendVO.java @@ -0,0 +1,129 @@ +package itn.com.cmm; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; + +@Getter +@Setter +@ToString +public class MjonFTSendVO{ + + + /** + * @description : 수신자번호 + */ + private String phone; + + /** + * @description : [*이름*] - 치환문자 + */ + private String name; + + /** + * @description : [*1*] - 치환문자 + */ + private String rep1; + + /** + * @description : [*2*] - 치환문자 + */ + private String rep2; + + /** + * @description : [*3*] - 치환문자 + */ + private String rep3; + + /** + * @description : [*4*] - 치환문자 + */ + private String rep4; + + /** + * @description : 문자ID + */ + private String msgId; + + /** + * @description : 전송그룹ID (대량문자의 경우 하나의 그룹으로 세팅) + */ + private String msgGroupId; + + /** + * @description : 문자온 일반회원ID + */ + private String userId; + + /** + * @description : 발신번호 (하이픈 등의 문자를 제외한 12byte이하의 숫자로 입력한다.) + */ + private String callFrom; + /** + * @description : 수신번호 (하이픈 등의 문자를 제외한 12byte이하의 숫자로 입력한다.) + */ + private String callTo; + /** + * @description : 예약 발송일시 + */ + private String reqDate; + /** + * @description :전송사(04:다우, 05:JJ, 07:IVT, 01:아이하트 , 02:현대퓨처넷, 03:아이엠오) + */ + private String agentCode; + + /** + * @description : MMS용 메시지제목 + */ + private String subject; + + /** + * @description : SMS용 메시지본문 + */ + private String smsTxt; + + /** + * @description : 메세지타입(4: SMS 전송, 5: URL 전송, 6: MMS전송, 7: BARCODE전송, 8: 카카오 알림톡 전송) + */ + private String msgType; + + /** + * @description : 첨부파일 갯수 + */ + private String fileCnt; + + /** + * @description : 파일이름1 + */ + private String filePath1; + + /** + * @description : 파일이름2 + */ + private String filePath2; + + /** + * @description : 파일이름3 + */ + private String filePath3; + + + + /** + * @description : event 여부 / group tb에 넣는 용도 / 기본값 N + */ + private String eventYn="N"; + + + + /** + * @description : 개별단가 + */ + private String eachPrice; + + + + + + +} diff --git a/src/main/java/itn/let/kakao/kakaoComm/KakaoVO.java b/src/main/java/itn/let/kakao/kakaoComm/KakaoVO.java index 527f146f..277cbf01 100644 --- a/src/main/java/itn/let/kakao/kakaoComm/KakaoVO.java +++ b/src/main/java/itn/let/kakao/kakaoComm/KakaoVO.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import itn.com.cmm.MjonFTSendVO; import itn.let.mjo.msg.service.MjonMsgVO; import lombok.Getter; import lombok.Setter; @@ -262,6 +263,8 @@ public class KakaoVO extends MjonMsgVO{ private List> varListMap; + private List mjonFTSendVOList = new ArrayList<>(); + @Override public String toString() { String varListMapString = "["; @@ -286,6 +289,18 @@ public class KakaoVO extends MjonMsgVO{ } varListMapString += "]"; + + StringBuilder mjonFTListSb = new StringBuilder("["); + if (mjonFTSendVOList != null && !mjonFTSendVOList.isEmpty()) { + String prefix = ""; + for (MjonFTSendVO vo : mjonFTSendVOList) { + mjonFTListSb.append(prefix).append(vo == null ? "null" : vo.toString()); + prefix = ", "; + } + } + mjonFTListSb.append("]"); + + return "KakaoSendAdvcVO[" + "\n senderKey=[" + senderKey + "]" + "\n , subMsgTxtReplYn=[" + subMsgTxtReplYn + "]" + @@ -312,6 +327,7 @@ public class KakaoVO extends MjonMsgVO{ "\n , varListMap=[" + varListMapString + "]" + "\n , befCash=[" + getBefCash() + "]" + "\n , befPoint=[" + getBefPoint() + "]" + + "\n , mjonFTSendVOList=" + mjonFTListSb.toString() + "\n ]"; } diff --git a/src/main/java/itn/let/kakao/user/kakaoFt/service/impl/KakaoFriendsTalkServiceImpl.java b/src/main/java/itn/let/kakao/user/kakaoFt/service/impl/KakaoFriendsTalkServiceImpl.java index 93bee0d0..91113dfd 100644 --- a/src/main/java/itn/let/kakao/user/kakaoFt/service/impl/KakaoFriendsTalkServiceImpl.java +++ b/src/main/java/itn/let/kakao/user/kakaoFt/service/impl/KakaoFriendsTalkServiceImpl.java @@ -11,8 +11,10 @@ import egovframework.rte.fdl.idgnr.EgovIdGnrService; import itn.let.kakao.kakaoComm.KakaoVO; import itn.let.kakao.user.kakaoFt.service.KakaoFriendsTalkService; import itn.let.mail.service.StatusResponse; +import lombok.extern.slf4j.Slf4j; -@Service("kakaoFriendsTalkTemplateService") +@Slf4j +@Service("KakaoFriendsTalkService") public class KakaoFriendsTalkServiceImpl extends EgovAbstractServiceImpl implements KakaoFriendsTalkService{ @Resource(name = "egovFriendstalkTemplateIdService") @@ -25,7 +27,13 @@ public class KakaoFriendsTalkServiceImpl extends EgovAbstractServiceImpl implem public StatusResponse insertKakaoFtSandAjax_advc(KakaoVO kakaoVO, HttpServletRequest request) { StatusResponse statusResponse = new StatusResponse(); + log.info(" + kakaoVO.toString() :: [{}]", kakaoVO.toString()); + + + + + // KakaoSendAdvcVO 발송 VO diff --git a/src/main/java/itn/let/kakao/user/kakaoFt/web/KakaoFriendsTalkSendController.java b/src/main/java/itn/let/kakao/user/kakaoFt/web/KakaoFriendsTalkSendController.java index 9e094be8..982e49f4 100644 --- a/src/main/java/itn/let/kakao/user/kakaoFt/web/KakaoFriendsTalkSendController.java +++ b/src/main/java/itn/let/kakao/user/kakaoFt/web/KakaoFriendsTalkSendController.java @@ -72,7 +72,7 @@ public class KakaoFriendsTalkSendController { @Resource(name = "kakaoFriendsTalkTemplateService") private KakaoFriendsTalkTemplateService kakaoFtTemplateService; - @Resource(name = "kakaoFriendsTalkService") + @Resource(name = "KakaoFriendsTalkService") private KakaoFriendsTalkService kakaoFriendsTalkService; /** userManageService */ diff --git a/src/main/webapp/WEB-INF/jsp/web/kakao/msgdata/ft/KakaoFriendsTalkMsgDataView.jsp b/src/main/webapp/WEB-INF/jsp/web/kakao/msgdata/ft/KakaoFriendsTalkMsgDataView.jsp index 4c51d097..21af948c 100644 --- a/src/main/webapp/WEB-INF/jsp/web/kakao/msgdata/ft/KakaoFriendsTalkMsgDataView.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/kakao/msgdata/ft/KakaoFriendsTalkMsgDataView.jsp @@ -14,6 +14,8 @@ + + @@ -2214,7 +2246,7 @@ function msgResultLink(){
- +
@@ -2539,22 +2571,25 @@ function msgResultLink(){ -
+
- -->
diff --git a/src/main/webapp/WEB-INF/jsp/web/kakao/msgdata/include/ftDataIncludeExcel.jsp b/src/main/webapp/WEB-INF/jsp/web/kakao/msgdata/include/ftDataIncludeExcel.jsp new file mode 100644 index 00000000..2a1ea27e --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/web/kakao/msgdata/include/ftDataIncludeExcel.jsp @@ -0,0 +1,957 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> + + + + + + +
+ +
+ + + +
+ +
+ + + +
+ + + + + + + + + +
+
+

- 주소록은 한 번에 최대 30만건까지 등록(EXCEL파일, 최대용량 20MB) 가능합니다.

+

- 엑셀 파일에 비밀번호 설정, 제한된 보기, 수식 등이 설정되어 있는 경우 업로드가 불가합니다.

+

- 구분선(|), 역슬래시(\, ₩), 큰따옴표("), 이모지(이모티콘) 등 발송불가 특수문자는 저장되지 않습니다.

+

- 이름 200byte, [*1*]~[*4*] 200byte, 메모 250byte까지 입력 가능합니다.

+

- 주소록 등록이 어려우신 경우에는 주소록 입력대행 메뉴를 이용하실 수 있습니다.

+
+
+ +
+
+ + +
+ + + + + + + + + + + + +
엑셀입력 표
+
+
+

파일 붙여넣기마우스로 엑셀파일을 여기에 끌어다 놓으세요

+
+ + +
+
+
+ + +
+

+ 총 0건 + / 중복 0건 + / 오류 0건 + +

+ + + + +

+ +
+ + + +
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ +
+ +
+
+
+
+ + +
+ +
+
+ + + + + + + + + + + + + +
\ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/web/msgdata/include/msgDataIncludeExcel.jsp b/src/main/webapp/WEB-INF/jsp/web/msgdata/include/msgDataIncludeExcel.jsp index 7561e7df..8ea20ea4 100644 --- a/src/main/webapp/WEB-INF/jsp/web/msgdata/include/msgDataIncludeExcel.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/msgdata/include/msgDataIncludeExcel.jsp @@ -943,19 +943,6 @@ $(document).on('click', '#errorExcelBtn', function() { - diff --git a/src/main/webapp/js/kakao/ft/ftPriceClclt.js b/src/main/webapp/js/kakao/ft/ftPriceClclt.js index 6a55e149..69bfb496 100644 --- a/src/main/webapp/js/kakao/ft/ftPriceClclt.js +++ b/src/main/webapp/js/kakao/ft/ftPriceClclt.js @@ -93,6 +93,9 @@ function totalFtPriceSum(totRows){ var KAKAO_FT_PRICE = ''; var SHORT_PRICE = ''; var LONG_PRICE = ''; +KAKAO_FT_PRICE = $('#kakaoFtPrice').val(); +SHORT_PRICE = $('#shortPrice').val(); +LONG_PRICE = $('#longPrice').val(); /*$(document).ready(function(){ @@ -153,14 +156,16 @@ var LONG_PRICE = ''; /** * @description 금액 계산 function */ -function fn_priceClclt(){ +function fn_priceClclt(phoneSu = 0){ // 미리보기 텍스트 var templateHtml = $('#smsTxtArea').val(); // var templateHtml = $('.template_text').html(); // 수신 번호 개수 - var phoneSu = $('.phoneArea').length; + if(phoneSu == 0){ + phoneSu = $('.phoneArea').length; + } // 대체문자 있는지 확인 var isSendFailChecked = $("#send_fail_check").is(":checked"); // 치환문자 여부 확인 @@ -183,6 +188,7 @@ function fn_priceClclt(){ * 카카오 금액 * 수신자 수 계산 */ function fn_sendFailUnChecked(phoneSu){ + console.log('phoneSu; ', phoneSu); // 카카오 금액 * 수신자 수 // fn_writePriceText() 첫 파라미터가 null이면 카카오 전송으로 인식 @@ -279,9 +285,9 @@ function fn_writePriceText(msgTypeText, phoneSu){ msgTypeText = msgTypeText.trim(); if(msgTypeText == '단문') price = SHORT_PRICE * phoneSu; else if(msgTypeText == '장문') price = LONG_PRICE * phoneSu; - else price = KAKAO_AT_PRICE * phoneSu; // 카카오 + else price = KAKAO_FT_PRICE * phoneSu; // 카카오 - $('#totalPriceTxt').text((price).toFixed(1)); + $('#totalPriceTxt').text(numberWithCommas((price).toFixed(1))); } diff --git a/src/main/webapp/js/kakao/ft/ftTabulator.js b/src/main/webapp/js/kakao/ft/ftTabulator.js index 537eef95..6fd5279f 100644 --- a/src/main/webapp/js/kakao/ft/ftTabulator.js +++ b/src/main/webapp/js/kakao/ft/ftTabulator.js @@ -29,10 +29,16 @@ $(document).ready(function (){ //clipboardPasteAction:"insert", // insert, update, replace placeholder:"복사(Ctrl+C)한 내용을 여기에 붙여넣기(Ctrl+V) 해주세요.", //fit columns to width of table (optional) resizableColumns:false, + columnDefaults:{ // 공통설정 + hozAlign: "center", + headerHozAlign: "center", + editor: "input", + editor: false + }, columns:[ //Define Table Columns - {formatter:"rowSelection", titleFormatter:"rowSelection",clipboard:false, hozAlign:"center", headerSort:false, cellClick:function(e, cell){ - cell.getRow().toggleSelect(); - }}, + {formatter:"rowSelection", headerHozAlign:"center", titleFormatter:"rowSelection",clipboard:false, hozAlign:"center", width:5, headerSort:false, cellClick:function(e, cell){ + cell.getRow().toggleSelect(); + }}, {title:"이름", hozAlign:"center", field:"name", editor:"input", validator:["maxLength:12"], cellEdited:function(cell){ //cell - cell component fnReplCell();