--- src/main/java/itn/let/mjo/msg/service/RefundDTO.java
+++ src/main/java/itn/let/mjo/msg/service/RefundDTO.java
... | ... | @@ -8,12 +8,14 @@ |
| 8 | 8 |
public class RefundDTO {
|
| 9 | 9 |
private String userId; |
| 10 | 10 |
private String msgGroupId; |
| 11 |
- private int userData; |
|
| 11 |
+ private String userData; |
|
| 12 |
+ private int msgSeq; |
|
| 12 | 13 |
private String eachPrice ; // 전송문자 개별가격 |
| 13 | 14 |
|
| 14 |
- public RefundDTO(String userId, String msgGroupId, int userData, String eachPrice) {
|
|
| 15 |
+ public RefundDTO(String userId, String msgGroupId, int msgSeq, String userData, String eachPrice) {
|
|
| 15 | 16 |
this.userId = userId; |
| 16 | 17 |
this.msgGroupId = msgGroupId; |
| 18 |
+ this.msgSeq = msgSeq; |
|
| 17 | 19 |
this.userData = userData; |
| 18 | 20 |
this.eachPrice = eachPrice; |
| 19 | 21 |
} |
--- src/main/java/itn/let/mjo/test/web/TestController.java
+++ src/main/java/itn/let/mjo/test/web/TestController.java
... | ... | @@ -3455,7 +3455,7 @@ |
| 3455 | 3455 |
try {
|
| 3456 | 3456 |
// 필요한 필드만 DTO로 매핑 |
| 3457 | 3457 |
List<RefundDTO> dtoList = msgFailList.stream() |
| 3458 |
- .map(msg -> new RefundDTO(msg.getUserId(), msg.getMsgGroupId(), Integer.parseInt(msg.getUserData()), msg.getEachPrice())) |
|
| 3458 |
+ .map(msg -> new RefundDTO(msg.getUserId(), msg.getMsgGroupId(), Integer.parseInt(msg.getUserData()), msg.getUserData(), msg.getEachPrice())) |
|
| 3459 | 3459 |
.collect(Collectors.toList()); |
| 3460 | 3460 |
// JSON 변환 |
| 3461 | 3461 |
ObjectMapper objectMapper = new ObjectMapper(); |
--- src/main/java/itn/let/schdlr/service/impl/SchdlrManageServiceImpl.java
+++ src/main/java/itn/let/schdlr/service/impl/SchdlrManageServiceImpl.java
... | ... | @@ -504,24 +504,33 @@ |
| 504 | 504 |
*/ |
| 505 | 505 |
@Override |
| 506 | 506 |
public void payBack_advc(String p_type) throws Exception {
|
| 507 |
+ |
|
| 507 | 508 |
List<MjonMsgVO> msgFailList = new ArrayList<>(); |
| 508 |
- |
|
| 509 | 509 |
msgFailList = getMsgFailList(p_type); |
| 510 | 510 |
|
| 511 | 511 |
// 리스트가 비어있는 경우 종료 |
| 512 |
- if (msgFailList == null || msgFailList.isEmpty()) {
|
|
| 512 |
+ if (msgFailList == null || msgFailList.isEmpty() || msgFailList.size() < 1) {
|
|
| 513 | 513 |
System.out.println("No payBack messages empty.");
|
| 514 | 514 |
} |
| 515 | 515 |
|
| 516 | 516 |
try {
|
| 517 | 517 |
// 필요한 필드만 DTO로 매핑 |
| 518 |
- List<RefundDTO> dtoList = msgFailList.stream().map(msg -> new RefundDTO(msg.getUserId(), |
|
| 519 |
- msg.getMsgGroupId(), Integer.parseInt(msg.getUserData()), msg.getEachPrice())) |
|
| 520 |
- .collect(Collectors.toList()); |
|
| 518 |
+ List<RefundDTO> dtoList = msgFailList.stream() |
|
| 519 |
+ .map(msg -> |
|
| 520 |
+ new RefundDTO( |
|
| 521 |
+ msg.getUserId() |
|
| 522 |
+ , msg.getMsgGroupId() |
|
| 523 |
+ , Integer.parseInt(msg.getUserData()) |
|
| 524 |
+ , msg.getUserData() |
|
| 525 |
+ , msg.getEachPrice()) |
|
| 526 |
+ ) |
|
| 527 |
+ .collect(Collectors.toList()); |
|
| 528 |
+ |
|
| 521 | 529 |
// JSON 변환 |
| 522 | 530 |
ObjectMapper objectMapper = new ObjectMapper(); |
| 523 | 531 |
String msgFailListJson = objectMapper.writeValueAsString(dtoList); |
| 524 | 532 |
|
| 533 |
+ System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
|
| 525 | 534 |
mjonMsgDataDAO.updateMsgSentFailPayBackBatch(msgFailListJson); |
| 526 | 535 |
|
| 527 | 536 |
} catch (Exception ex) {
|
--- src/main/resources/egovframework/sqlmap/let/fax/addr/Fax_AddrGroup_SQL_Mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/fax/addr/Fax_AddrGroup_SQL_Mysql.xml
... | ... | @@ -154,6 +154,8 @@ |
| 154 | 154 |
ADDR_GRP_NM = #addrGrpNm# |
| 155 | 155 |
AND |
| 156 | 156 |
MBER_ID = #mberId# |
| 157 |
+ AND |
|
| 158 |
+ DELETE_YN = 'N' |
|
| 157 | 159 |
</select> |
| 158 | 160 |
|
| 159 | 161 |
<!-- 주소록 그룹 다음 순서번호 확인 --> |
--- src/main/resources/egovframework/sqlmap/let/mjo/addr/AddrGroup_SQL_Mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/mjo/addr/AddrGroup_SQL_Mysql.xml
... | ... | @@ -190,6 +190,8 @@ |
| 190 | 190 |
ADDR_GRP_NM = #addrGrpNm# |
| 191 | 191 |
AND |
| 192 | 192 |
MBER_ID = #mberId# |
| 193 |
+ AND |
|
| 194 |
+ DELETE_YN = 'N' |
|
| 193 | 195 |
</select> |
| 194 | 196 |
|
| 195 | 197 |
<!-- 주소록 그룹 다음 순서번호 확인 --> |
--- src/main/resources/egovframework/sqlmap/let/mjo/addr/Addr_SQL_Mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/mjo/addr/Addr_SQL_Mysql.xml
... | ... | @@ -565,10 +565,14 @@ |
| 565 | 565 |
COUNT(A.ADDR_ID) AS totCnt |
| 566 | 566 |
FROM |
| 567 | 567 |
MJ_ADDR A |
| 568 |
+ left join mj_addr_grp mag |
|
| 569 |
+ on A.ADDR_GRP_ID = mag.ADDR_GRP_ID |
|
| 568 | 570 |
WHERE |
| 569 | 571 |
A.MBER_ID = #mberId# |
| 570 |
- AND (A.RECV_STATUS = 'Y' OR A.RECV_STATUS = 'S' OR A.RECV_STATUS IS NULL) |
|
| 571 |
- AND A.DELETE_YN = 'N' |
|
| 572 |
+ AND (A.RECV_STATUS = 'Y' |
|
| 573 |
+ or A.RECV_STATUS = 'S' |
|
| 574 |
+ or A.RECV_STATUS is null) |
|
| 575 |
+ AND mag.DELETE_YN = 'N' |
|
| 572 | 576 |
</select> |
| 573 | 577 |
|
| 574 | 578 |
<!-- 주소록 상세 조회 --> |
--- src/main/resources/egovframework/sqlmap/let/msg/MjonMsgData_SQL_mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/msg/MjonMsgData_SQL_mysql.xml
... | ... | @@ -4150,7 +4150,9 @@ |
| 4150 | 4150 |
THEN 'W' |
| 4151 | 4151 |
ELSE 'F' |
| 4152 | 4152 |
END) IN ('F')
|
| 4153 |
- ORDER BY MMD.USER_ID |
|
| 4153 |
+ ORDER BY |
|
| 4154 |
+ MMD.REQ_DATE asc |
|
| 4155 |
+ , MMD.USER_ID |
|
| 4154 | 4156 |
LIMIT 10000 |
| 4155 | 4157 |
|
| 4156 | 4158 |
</select> |
... | ... | @@ -4326,7 +4328,9 @@ |
| 4326 | 4328 |
THEN 'W' |
| 4327 | 4329 |
ELSE 'F' |
| 4328 | 4330 |
END) IN ('F')
|
| 4329 |
- ORDER BY MMD.USER_ID |
|
| 4331 |
+ ORDER BY |
|
| 4332 |
+ MMD.REQ_DATE asc |
|
| 4333 |
+ , MMD.USER_ID |
|
| 4330 | 4334 |
LIMIT 10000 |
| 4331 | 4335 |
|
| 4332 | 4336 |
|
--- src/main/webapp/WEB-INF/jsp/web/addr/AddrList.jsp
+++ src/main/webapp/WEB-INF/jsp/web/addr/AddrList.jsp
... | ... | @@ -47,10 +47,6 @@ |
| 47 | 47 |
} |
| 48 | 48 |
|
| 49 | 49 |
|
| 50 |
-function addrGroupLoadAjax(){
|
|
| 51 |
- $("#addrRegistSelect").load("/web/addr/selectAddrGroupAjax.do", function(response, status, xhr){});
|
|
| 52 |
- $("#funcAddrGroupSelect").load("/web/addr/selectAddrGroupAjax.do", function(response, status, xhr){});
|
|
| 53 |
-} |
|
| 54 | 50 |
|
| 55 | 51 |
function addrLoadAjax(){
|
| 56 | 52 |
$("#adr1_right").load("/web/mjon/addr/selectAddrAjax.do", function(response, status, xhr){tableAllChk();});
|
... | ... | @@ -96,6 +92,70 @@ |
| 96 | 92 |
|
| 97 | 93 |
} |
| 98 | 94 |
|
| 95 |
+function insertAddrAjax() {
|
|
| 96 |
+ var selectVal = $("#addrRegistSelect option:selected").val();
|
|
| 97 |
+ //alert(selectVal); |
|
| 98 |
+ |
|
| 99 |
+ var form = document.addrInsertForm; |
|
| 100 |
+ /* |
|
| 101 |
+ //필수값 아니어서 뺐음 |
|
| 102 |
+ if(form.addrNm.value == "") {
|
|
| 103 |
+ alert("주소록 이름을 입력하세요");
|
|
| 104 |
+ return; |
|
| 105 |
+ } |
|
| 106 |
+ */ |
|
| 107 |
+ if(form.addrPhoneNo.value == "") {
|
|
| 108 |
+ alert("주소록 번호를 입력하세요");
|
|
| 109 |
+ return; |
|
| 110 |
+ } |
|
| 111 |
+ //if(!confirm("주소록을 추가하시겠습니까?")) {
|
|
| 112 |
+ // return; |
|
| 113 |
+ //} |
|
| 114 |
+ |
|
| 115 |
+ if(!checkHpNum(form.addrPhoneNo.value)){//휴대폰 유효성 검사
|
|
| 116 |
+ if(!checkNorPhoneNum(form.addrPhoneNo.value)){//일반전화 유효성 검사
|
|
| 117 |
+ |
|
| 118 |
+ alert("잘못된 휴대폰번호 또는 일반전화 번호 입니다.");
|
|
| 119 |
+ return false; |
|
| 120 |
+ |
|
| 121 |
+ } |
|
| 122 |
+ |
|
| 123 |
+ } |
|
| 124 |
+ |
|
| 125 |
+ var data = new FormData(form); |
|
| 126 |
+ |
|
| 127 |
+ $.ajax({
|
|
| 128 |
+ cache : false, |
|
| 129 |
+ url : "<c:url value='/web/mjon/addr/insertAddrAjax.do' />", |
|
| 130 |
+ type : 'POST', |
|
| 131 |
+ data : data, |
|
| 132 |
+ dataType:'json', |
|
| 133 |
+ processData: false, |
|
| 134 |
+ contentType: false, |
|
| 135 |
+ success : function(returnData, status){
|
|
| 136 |
+ if(status == "success") {
|
|
| 137 |
+ if("fail"==returnData.result){
|
|
| 138 |
+ alert(returnData.message); |
|
| 139 |
+ return; |
|
| 140 |
+ } else if("dupl"==returnData.result){
|
|
| 141 |
+ alert("해당 그룹에 중복된 번호가 있습니다.");
|
|
| 142 |
+ return; |
|
| 143 |
+ } |
|
| 144 |
+ //alert("저장 되었습니다.");
|
|
| 145 |
+ |
|
| 146 |
+ listAddrGrp(); |
|
| 147 |
+ addrGroupLoadAjax(); |
|
| 148 |
+ addrLoadAjax(); |
|
| 149 |
+ |
|
| 150 |
+ // 주소록그룹 콤보박스 유지 |
|
| 151 |
+ setTimeout(setSelectSetting, 500, selectVal); |
|
| 152 |
+ |
|
| 153 |
+ }else{ alert("ERROR!");return;}
|
|
| 154 |
+ }, |
|
| 155 |
+ error: function (e) { alert("저장에 실패하였습니다."); console.log("ERROR : ", e); }
|
|
| 156 |
+ }); |
|
| 157 |
+ |
|
| 158 |
+} |
|
| 99 | 159 |
|
| 100 | 160 |
// 주소록그룹 콤보박스 유지 |
| 101 | 161 |
function setSelectSetting(selectVal) {
|
... | ... | @@ -126,6 +186,11 @@ |
| 126 | 186 |
if(type == "block") location.href="/web/mjon/addrBlock/selectBlockList.do"; |
| 127 | 187 |
if(type == "addrMob") location.href="/web/mjon/addr/addrMobGuide.do"; |
| 128 | 188 |
if(type == "addrApply") location.href="/web/mjon/addragency/selectAddrAgencyList.do"; |
| 189 |
+} |
|
| 190 |
+ |
|
| 191 |
+function addrGroupLoadAjax(){
|
|
| 192 |
+ $("#addrRegistSelect").load("/web/addr/selectAddrGroupAjax.do", function(response, status, xhr){});
|
|
| 193 |
+ $("#funcAddrGroupSelect").load("/web/addr/selectAddrGroupAjax.do", function(response, status, xhr){});
|
|
| 129 | 194 |
} |
| 130 | 195 |
|
| 131 | 196 |
|
... | ... | @@ -210,6 +275,8 @@ |
| 210 | 275 |
|
| 211 | 276 |
// 대량등록 닫기 |
| 212 | 277 |
function setAddrMassClose() {
|
| 278 |
+ $('#btnAddrMassClose').click();
|
|
| 279 |
+ |
|
| 213 | 280 |
var $objTabul = fn_utils_getTabulator(); |
| 214 | 281 |
$objTabul.clearData(); |
| 215 | 282 |
|
... | ... | @@ -322,6 +389,9 @@ |
| 322 | 389 |
if (!isAddrPhoneNoSelected) {
|
| 323 | 390 |
// isPhoneSelected = true; |
| 324 | 391 |
alert('휴대폰이 선택되지 않았습니다.');
|
| 392 |
+// $('.field-selector[data-group="tableExcel"]').focus().click();
|
|
| 393 |
+ |
|
| 394 |
+ |
|
| 325 | 395 |
return false; |
| 326 | 396 |
|
| 327 | 397 |
} |
... | ... | @@ -736,13 +806,8 @@ |
| 736 | 806 |
<!-- send top --> |
| 737 | 807 |
<div class="send_top"> |
| 738 | 808 |
<!-- tab button --> |
| 739 |
- <ul class="tabType4"> |
|
| 740 |
- <li class="tab active"><button type="button" onclick="TabType5(this,'1'); moveTab('addr');">주소록관리</button></li>
|
|
| 741 |
- <li class="tab"><button type="button" onclick="TabType5(this,'2'); moveTab('fax');">팩스 주소록관리</button></li>
|
|
| 742 |
- <li class="tab"><button type="button" onclick="TabType5(this,'3'); moveTab('block');">수신거부</button></li>
|
|
| 743 |
- <li class="tab"><button type="button" onclick="TabType5(this,'4'); moveTab('addrMob');">폰주소록 등록</button></li>
|
|
| 744 |
- <li class="tab"><button type="button" onclick="TabType5(this,'5'); moveTab('addrApply');">주소록 입력 대행(무료)</button></li>
|
|
| 745 |
- </ul><!--// tab button --> |
|
| 809 |
+ <%@include file="/WEB-INF/jsp/web/addr/include/topMenu.jsp" %> |
|
| 810 |
+ <!--// tab button --> |
|
| 746 | 811 |
<!-- 주소록 관리 - 주소록 관리 --> |
| 747 | 812 |
<div class="adr_cont current" id="tab5_1"> |
| 748 | 813 |
<div class="heading"> |
--- src/main/webapp/WEB-INF/jsp/web/addr/AddrList_advcBack_20240723.jsp
+++ src/main/webapp/WEB-INF/jsp/web/addr/AddrList_advcBack_20240723.jsp
... | ... | @@ -175,14 +175,6 @@ |
| 175 | 175 |
addrGroupLoadAjax(); |
| 176 | 176 |
} |
| 177 | 177 |
|
| 178 |
-function moveTab(type){
|
|
| 179 |
- if(type == "addr") location.href="/web/mjon/addr/selectAddrList.do"; |
|
| 180 |
- if(type == "fax") location.href="/web/mjon/fax/addr/selectFaxAddrList.do"; |
|
| 181 |
- if(type == "block") location.href="/web/mjon/addrBlock/selectBlockList.do"; |
|
| 182 |
- if(type == "addrMob") location.href="/web/mjon/addr/addrMobGuide.do"; |
|
| 183 |
- if(type == "addrApply") location.href="/web/mjon/addragency/selectAddrAgencyList.do"; |
|
| 184 |
-} |
|
| 185 |
- |
|
| 186 | 178 |
|
| 187 | 179 |
|
| 188 | 180 |
//############################################################################################# |
--- src/main/webapp/WEB-INF/jsp/web/addr/AddrMobGuide.jsp
+++ src/main/webapp/WEB-INF/jsp/web/addr/AddrMobGuide.jsp
... | ... | @@ -15,13 +15,8 @@ |
| 15 | 15 |
<!-- send top --> |
| 16 | 16 |
<div class="send_top"> |
| 17 | 17 |
<!-- tab button --> |
| 18 |
- <ul class="tabType4"> |
|
| 19 |
- <li class="tab"><button type="button" onclick="TabType5(this,'1'); moveTab('addr');">주소록관리</button></li>
|
|
| 20 |
- <li class="tab"><button type="button" onclick="TabType5(this,'2'); moveTab('fax');">팩스 주소록관리</button></li>
|
|
| 21 |
- <li class="tab"><button type="button" onclick="TabType5(this,'3'); moveTab('block');">수신거부</button></li>
|
|
| 22 |
- <li class="tab active"><button type="button" onclick="TabType5(this,'4'); moveTab('addrMob');">폰주소록 등록</button></li>
|
|
| 23 |
- <li class="tab"><button type="button" onclick="TabType5(this,'5'); moveTab('addrApply');">주소록 입력 대행(무료)</button></li>
|
|
| 24 |
- </ul><!--// tab button --> |
|
| 18 |
+ <%@include file="/WEB-INF/jsp/web/addr/include/topMenu.jsp" %> |
|
| 19 |
+ <!--// tab button --> |
|
| 25 | 20 |
<!-- 주소록 관리 - 폰주소록 등록 --> |
| 26 | 21 |
<div class="adr_cont current" id="tab5_3"> |
| 27 | 22 |
<div class="heading"> |
--- src/main/webapp/WEB-INF/jsp/web/addr/include/addrListforClipboard.jsp
+++ src/main/webapp/WEB-INF/jsp/web/addr/include/addrListforClipboard.jsp
... | ... | @@ -17,11 +17,6 @@ |
| 17 | 17 |
|
| 18 | 18 |
|
| 19 | 19 |
|
| 20 |
-function addrGroupLoadAjax(){
|
|
| 21 |
- $("#addrRegistSelect").load("/web/addr/selectAddrGroupAjax.do", function(response, status, xhr){});
|
|
| 22 |
- $("#funcAddrGroupSelect").load("/web/addr/selectAddrGroupAjax.do", function(response, status, xhr){});
|
|
| 23 |
-} |
|
| 24 |
- |
|
| 25 | 20 |
// 주소록그룹 콤보박스 유지 |
| 26 | 21 |
function setSelectSetting(selectVal) {
|
| 27 | 22 |
$("#addrRegistSelect").val(selectVal).prop("selected", true);
|
--- src/main/webapp/WEB-INF/jsp/web/addr/include/addrListforExcel.jsp
+++ src/main/webapp/WEB-INF/jsp/web/addr/include/addrListforExcel.jsp
... | ... | @@ -16,11 +16,6 @@ |
| 16 | 16 |
}); |
| 17 | 17 |
|
| 18 | 18 |
|
| 19 |
-function addrGroupLoadAjax(){
|
|
| 20 |
- $("#addrRegistSelect").load("/web/addr/selectAddrGroupAjax.do", function(response, status, xhr){});
|
|
| 21 |
- $("#funcAddrGroupSelect").load("/web/addr/selectAddrGroupAjax.do", function(response, status, xhr){});
|
|
| 22 |
-} |
|
| 23 |
- |
|
| 24 | 19 |
|
| 25 | 20 |
|
| 26 | 21 |
// 주소록그룹 콤보박스 유지 |
+++ src/main/webapp/WEB-INF/jsp/web/addr/include/topMenu.jsp
... | ... | @@ -0,0 +1,50 @@ |
| 1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | |
| 2 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | |
| 3 | +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> | |
| 4 | +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> | |
| 5 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> | |
| 6 | + | |
| 7 | +<script type="text/javascript" src="<c:url value='/publish/js/content.js'/>"></script> | |
| 8 | + | |
| 9 | +<script type="text/javascript"> | |
| 10 | + | |
| 11 | +$(document).ready(function(){ // 현재 URL 확인 | |
| 12 | + // 현재 URL 확인 | |
| 13 | + const currentPath = window.location.pathname; | |
| 14 | + | |
| 15 | + // URL과 ID 매핑 | |
| 16 | + const tabMapping = { | |
| 17 | + "/web/mjon/addr/selectAddrList.do": "addr", | |
| 18 | + "/web/mjon/fax/addr/selectFaxAddrList.do": "fax", | |
| 19 | + "/web/mjon/addrBlock/selectBlockList.do": "block", | |
| 20 | + "/web/mjon/addr/addrMobGuide.do": "addrMob", | |
| 21 | + "/web/mjon/addragency/selectAddrAgencyList.do": "addrApply" | |
| 22 | + }; | |
| 23 | + | |
| 24 | + // 현재 URL에 해당하는 ID 찾기 | |
| 25 | + const activeId = tabMapping[currentPath]; | |
| 26 | + | |
| 27 | + // activeId에 해당하는 li에 active 클래스 추가 | |
| 28 | + if (activeId) { | |
| 29 | + $('#'+activeId).parent().addClass('active'); | |
| 30 | + } | |
| 31 | +}); | |
| 32 | + | |
| 33 | + | |
| 34 | +function moveTab(type){ | |
| 35 | + if(type == "addr") location.href="/web/mjon/addr/selectAddrList.do"; | |
| 36 | + if(type == "fax") location.href="/web/mjon/fax/addr/selectFaxAddrList.do"; | |
| 37 | + if(type == "block") location.href="/web/mjon/addrBlock/selectBlockList.do"; | |
| 38 | + if(type == "addrMob") location.href="/web/mjon/addr/addrMobGuide.do"; | |
| 39 | + if(type == "addrApply") location.href="/web/mjon/addragency/selectAddrAgencyList.do"; | |
| 40 | +} | |
| 41 | + | |
| 42 | +</script> | |
| 43 | + | |
| 44 | + <ul class="tabType4"> | |
| 45 | + <li class="tab"><button type="button" id="addr" onclick="TabType5(this,'1'); moveTab('addr');">문자 주소록관리</button></li> | |
| 46 | + <li class="tab"><button type="button" id="fax" onclick="TabType5(this,'2'); moveTab('fax');">팩스 주소록관리</button></li> | |
| 47 | + <li class="tab"><button type="button" id="block" onclick="TabType5(this,'3'); moveTab('block');">수신거부</button></li> | |
| 48 | + <li class="tab"><button type="button" id="addrMob" onclick="TabType5(this,'4'); moveTab('addrMob');">폰주소록 등록</button></li> | |
| 49 | + <li class="tab"><button type="button" id="addrApply" onclick="TabType5(this,'5'); moveTab('addrApply');">주소록 입력 대행(무료)</button></li> | |
| 50 | + </ul> |
--- src/main/webapp/WEB-INF/jsp/web/addrBlock/AddrBlockList.jsp
+++ src/main/webapp/WEB-INF/jsp/web/addrBlock/AddrBlockList.jsp
... | ... | @@ -1360,13 +1360,8 @@ |
| 1360 | 1360 |
<!-- send top --> |
| 1361 | 1361 |
<div class="send_top"> |
| 1362 | 1362 |
<!-- tab button --> |
| 1363 |
- <ul class="tabType4"> |
|
| 1364 |
- <li class="tab"><button type="button" onclick="TabType5(this,'1'); moveTab('addr');">주소록관리</button></li>
|
|
| 1365 |
- <li class="tab"><button type="button" onclick="TabType5(this,'2'); moveTab('fax');">팩스 주소록관리</button></li>
|
|
| 1366 |
- <li class="tab active"><button type="button" onclick="TabType5(this,'3'); moveTab('block');">수신거부</button></li>
|
|
| 1367 |
- <li class="tab"><button type="button" onclick="TabType5(this,'4'); moveTab('addrMob');">폰주소록 등록</button></li>
|
|
| 1368 |
- <li class="tab"><button type="button" onclick="TabType5(this,'5'); moveTab('addrApply');">주소록 입력 대행(무료)</button></li>
|
|
| 1369 |
- </ul><!--// tab button --> |
|
| 1363 |
+ <%@include file="/WEB-INF/jsp/web/addr/include/topMenu.jsp" %> |
|
| 1364 |
+ <!--// tab button --> |
|
| 1370 | 1365 |
<!-- 주소록 관리 - 주소록 관리 --> |
| 1371 | 1366 |
<div class="adr_cont current" id="tab5_1"> |
| 1372 | 1367 |
|
--- src/main/webapp/WEB-INF/jsp/web/addragency/AddrAgencyList.jsp
+++ src/main/webapp/WEB-INF/jsp/web/addragency/AddrAgencyList.jsp
... | ... | @@ -18,7 +18,7 @@ |
| 18 | 18 |
|
| 19 | 19 |
<script type="text/javascript"> |
| 20 | 20 |
$(document).ready(function(){
|
| 21 |
- $('ul.tabType4 li').eq(4).addClass('active');
|
|
| 21 |
+// $('ul.tabType4 li').eq(4).addClass('active');
|
|
| 22 | 22 |
|
| 23 | 23 |
listLoad(); //Load list |
| 24 | 24 |
}); |
... | ... | @@ -145,7 +145,9 @@ |
| 145 | 145 |
<div class="send_top"> |
| 146 | 146 |
|
| 147 | 147 |
<!-- tabtype --> |
| 148 |
- <%@include file="/WEB-INF/jsp/web/addragency/include/addrTabType.jsp"%> |
|
| 148 |
+ <!-- tab button --> |
|
| 149 |
+ <%@include file="/WEB-INF/jsp/web/addr/include/topMenu.jsp" %> |
|
| 150 |
+ <!--// tab button --> |
|
| 149 | 151 |
|
| 150 | 152 |
<!-- 주소록 관리 - 주소록 입력 대행(무료) --> |
| 151 | 153 |
<div class="adr_cont current" id="tab5_4"> |
--- src/main/webapp/WEB-INF/jsp/web/fax/addr/FaxAddrList.jsp
+++ src/main/webapp/WEB-INF/jsp/web/fax/addr/FaxAddrList.jsp
... | ... | @@ -867,13 +867,7 @@ |
| 867 | 867 |
<!-- send top --> |
| 868 | 868 |
<div class="send_top"> |
| 869 | 869 |
<!-- tab button --> |
| 870 |
- <ul class="tabType4"> |
|
| 871 |
- <li class="tab"><button type="button" onclick="TabType5(this,'1'); moveTab('addr');">주소록관리</button></li>
|
|
| 872 |
- <li class="tab active"><button type="button" onclick="TabType5(this,'2'); moveTab('fax');">팩스 주소록관리</button></li>
|
|
| 873 |
- <li class="tab"><button type="button" onclick="TabType5(this,'3'); moveTab('block');">수신거부</button></li>
|
|
| 874 |
- <li class="tab"><button type="button" onclick="TabType5(this,'4'); moveTab('addrMob');">폰주소록 등록</button></li>
|
|
| 875 |
- <li class="tab"><button type="button" onclick="TabType5(this,'5'); moveTab('addrApply');">주소록 입력 대행(무료)</button></li>
|
|
| 876 |
- </ul> |
|
| 870 |
+ <%@include file="/WEB-INF/jsp/web/addr/include/topMenu.jsp" %> |
|
| 877 | 871 |
<!--// tab button --> |
| 878 | 872 |
<!-- 주소록 관리 - 주소록 관리 --> |
| 879 | 873 |
<div class="adr_cont current" id="tab5_1"> |
--- src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataSMLView.jsp
+++ src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataSMLView.jsp
... | ... | @@ -47,20 +47,20 @@ |
| 47 | 47 |
// {formatter:"rownum", align:"center", title:"No", hozAlign:"center", headerHozAlign:"center", field:"No", width:30},
|
| 48 | 48 |
{formatter:"rownum", align:"center" ,title:"No", hozAlign:"center", headerHozAlign:"center", width:40},
|
| 49 | 49 |
{title:"이름", field:"name", editor:false, validator:["maxLength:12"], cellEdited:function(cell){
|
| 50 |
- fnReplCell(); |
|
| 50 |
+ fnReplCell_advc(); |
|
| 51 | 51 |
}}, |
| 52 | 52 |
{title:"휴대폰", field:"phone", width:100, editor:false, validator:["required","minLength:10", "maxLength:12"]},
|
| 53 | 53 |
{title:"[*1*]", field:"rep1", minWidth:60, editor:false, validator:["maxLength:40"], cellEdited:function(cell){
|
| 54 |
- fnReplCell(); |
|
| 54 |
+ fnReplCell_advc(); |
|
| 55 | 55 |
}}, |
| 56 | 56 |
{title:"[*2*]", field:"rep2", minWidth:60, editor:false, validator:["maxLength:40"], cellEdited:function(cell){
|
| 57 |
- fnReplCell(); |
|
| 57 |
+ fnReplCell_advc(); |
|
| 58 | 58 |
}}, |
| 59 | 59 |
{title:"[*3*]", field:"rep3", minWidth:60, editor:false, validator:["maxLength:40"], cellEdited:function(cell){
|
| 60 |
- fnReplCell(); |
|
| 60 |
+ fnReplCell_advc(); |
|
| 61 | 61 |
}}, |
| 62 | 62 |
{title:"[*4*]", field:"rep4", minWidth:60, editor:false, validator:["maxLength:40"], cellEdited:function(cell){
|
| 63 |
- fnReplCell(); |
|
| 63 |
+ fnReplCell_advc(); |
|
| 64 | 64 |
}}, |
| 65 | 65 |
|
| 66 | 66 |
], |
... | ... | @@ -324,7 +324,7 @@ |
| 324 | 324 |
|| smsTxtArea.indexOf("[*3*]") > -1
|
| 325 | 325 |
|| smsTxtArea.indexOf("[*4*]") > -1){
|
| 326 | 326 |
|
| 327 |
- fnReplCell(); |
|
| 327 |
+ fnReplCell_advc(); |
|
| 328 | 328 |
|
| 329 | 329 |
}else{
|
| 330 | 330 |
|
... | ... | @@ -603,7 +603,7 @@ |
| 603 | 603 |
|| contents.indexOf("[*3*]") > -1
|
| 604 | 604 |
|| contents.indexOf("[*4*]") > -1){
|
| 605 | 605 |
|
| 606 |
- fnReplCell(); |
|
| 606 |
+ fnReplCell_advc(); |
|
| 607 | 607 |
|
| 608 | 608 |
}else{
|
| 609 | 609 |
|
... | ... | @@ -757,36 +757,17 @@ |
| 757 | 757 |
|
| 758 | 758 |
|
| 759 | 759 |
|
| 760 |
- |
|
| 760 |
+ let debounceTimer; |
|
| 761 | 761 |
//문자 내용 입력시 바이트수 계산하기 |
| 762 | 762 |
$('#smsTxtArea').keyup(function(e){
|
| 763 | 763 |
// console.log("11$('.preview_auto').test() :: ",$('.realtime').html())
|
| 764 | 764 |
// console.log("11$('.preview_auto').test() :: ",$('.realtime').text())
|
| 765 | 765 |
|
| 766 | 766 |
var contents = $(this).val(); |
| 767 |
- var adrYn = $("input[name=send_adYn]:checked").val();
|
|
| 768 |
- |
|
| 769 |
- /* if(adrYn == 'N'){
|
|
| 770 |
- |
|
| 771 |
- if((contents.indexOf("(광고)") > -1 && (contents.indexOf("무료거부") > -1 || contents.indexOf("무료 거부") > -1))
|
|
| 772 |
- || contents.indexOf("(광고)") > -1){
|
|
| 773 |
- |
|
| 774 |
- alert("광고 내용이 인식되어 광고 문자로 전환됩니다.");
|
|
| 775 |
- $('#smsTxtArea').val(""); //입력 내용 지워주기
|
|
| 776 |
- $('#send_adYnY').prop('checked', true);
|
|
| 777 |
- //광고 상하단 내용 넣어주기 |
|
| 778 |
- advMsgInsert(); |
|
| 779 |
- |
|
| 780 |
- } |
|
| 781 |
- |
|
| 782 |
- fnByteString(contents); |
|
| 783 |
- |
|
| 784 |
- }else{
|
|
| 785 |
- |
|
| 786 |
- |
|
| 787 |
- } */ |
|
| 788 |
- |
|
| 789 |
- fnByteString(contents); |
|
| 767 |
+ clearTimeout(debounceTimer); // 기존 타이머를 초기화 |
|
| 768 |
+ debounceTimer = setTimeout(() => {
|
|
| 769 |
+ fnByteString(contents); // 일정 시간 후에만 문자 내용 처리 실행 |
|
| 770 |
+ }, 300); // 300ms 지연 |
|
| 790 | 771 |
});//문자 바이트수 계산하기 끝 |
| 791 | 772 |
|
| 792 | 773 |
|
... | ... | @@ -837,7 +818,7 @@ |
| 837 | 818 |
|
| 838 | 819 |
//받는사람 목록에 복사/붙여넣기 기능 처리 |
| 839 | 820 |
$('.callList_box').on('paste', function (e) {
|
| 840 |
- console.log(' :: callList_box :: ');
|
|
| 821 |
+ console.log(' :: callList _box :: ');
|
|
| 841 | 822 |
|
| 842 | 823 |
var element = e.originalEvent.clipboardData.getData('text'); // 클립보드에 복사한 데이터 가져오기
|
| 843 | 824 |
|
... | ... | @@ -1002,7 +983,7 @@ |
| 1002 | 983 |
|| smsTxtArea.indexOf("[*3*]") > -1
|
| 1003 | 984 |
|| smsTxtArea.indexOf("[*4*]") > -1){
|
| 1004 | 985 |
|
| 1005 |
- fnReplCell(); |
|
| 986 |
+ fnReplCell_advc(); |
|
| 1006 | 987 |
}else{
|
| 1007 | 988 |
//결제 금액 구하기 |
| 1008 | 989 |
totalPriceSum(totRows); |
... | ... | @@ -1012,8 +993,12 @@ |
| 1012 | 993 |
alert("올바르지 않은 휴대폰 번호가 "+ tableErrorData.length +" 건 있습니다.");
|
| 1013 | 994 |
} |
| 1014 | 995 |
|
| 996 |
+ |
|
| 997 |
+ // 미리보기 버튼 활성화 |
|
| 998 |
+ updateButtons(0); |
|
| 999 |
+ |
|
| 1015 | 1000 |
} |
| 1016 |
- |
|
| 1001 |
+ |
|
| 1017 | 1002 |
}); |
| 1018 | 1003 |
|
| 1019 | 1004 |
//받는사람 번호 버튼 클릭시 Tabulator에 데이터 넣어주기 |
... | ... | @@ -1114,7 +1099,7 @@ |
| 1114 | 1099 |
|| smsTxtArea.indexOf("[*3*]") > -1
|
| 1115 | 1100 |
|| smsTxtArea.indexOf("[*4*]") > -1){
|
| 1116 | 1101 |
|
| 1117 |
- fnReplCell(); |
|
| 1102 |
+ fnReplCell_advc(); |
|
| 1118 | 1103 |
}else{
|
| 1119 | 1104 |
//결제 금액 구하기 |
| 1120 | 1105 |
totalPriceSum(totRows); |
... | ... | @@ -1538,7 +1523,7 @@ |
| 1538 | 1523 |
|| contents.indexOf("[*3*]") > -1
|
| 1539 | 1524 |
|| contents.indexOf("[*4*]") > -1){
|
| 1540 | 1525 |
|
| 1541 |
- fnReplCell(); |
|
| 1526 |
+ fnReplCell_advc(); |
|
| 1542 | 1527 |
|
| 1543 | 1528 |
}else{
|
| 1544 | 1529 |
|
... | ... | @@ -1626,7 +1611,7 @@ |
| 1626 | 1611 |
|| contents.indexOf("[*3*]") > -1
|
| 1627 | 1612 |
|| contents.indexOf("[*4*]") > -1){
|
| 1628 | 1613 |
|
| 1629 |
- fnReplCell(); |
|
| 1614 |
+ fnReplCell_advc(); |
|
| 1630 | 1615 |
|
| 1631 | 1616 |
}else{
|
| 1632 | 1617 |
|
... | ... | @@ -2947,12 +2932,19 @@ |
| 2947 | 2932 |
|
| 2948 | 2933 |
//주소록 불러오기에서 수신자 리스트 추가해 주기 |
| 2949 | 2934 |
function addrToList_advc(type){
|
| 2935 |
+ console.log('tableAddr.getDataCount() : ', tableAddr.getDataCount());
|
|
| 2950 | 2936 |
// 선택된 데이터 또는 전체 데이터 변수 초기화 |
| 2951 | 2937 |
let selectedData = type === 'select' ? tableAddr.getSelectedRows() : tableAddr.getData(); |
| 2952 | 2938 |
|
| 2953 | 2939 |
// 데이터가 비어있으면 경고 후 종료 |
| 2954 | 2940 |
if (!selectedData || selectedData.length < 1) {
|
| 2955 |
- alert("주소록을 선택해 주세요.");
|
|
| 2941 |
+ |
|
| 2942 |
+ if(tableAddr.getDataCount() < 1){
|
|
| 2943 |
+ alert("주소록을 선택해 주세요.");
|
|
| 2944 |
+ }else{
|
|
| 2945 |
+ alert("전화번호를 선택해 주세요.");
|
|
| 2946 |
+ } |
|
| 2947 |
+ |
|
| 2956 | 2948 |
return false; |
| 2957 | 2949 |
} |
| 2958 | 2950 |
|
--- src/main/webapp/WEB-INF/jsp/web/msgdata/include/msgDataIncludeExcel.jsp
+++ src/main/webapp/WEB-INF/jsp/web/msgdata/include/msgDataIncludeExcel.jsp
... | ... | @@ -343,6 +343,7 @@ |
| 343 | 343 |
setAddrMassClose(); |
| 344 | 344 |
$('.field-selector').each(function() { $(this).val(''); });
|
| 345 | 345 |
$('#closeBtn').click();
|
| 346 |
+ fnReplCell_advc(); |
|
| 346 | 347 |
}); |
| 347 | 348 |
|
| 348 | 349 |
|
--- src/main/webapp/js/txtSpecialReplace.js
+++ src/main/webapp/js/txtSpecialReplace.js
... | ... | @@ -1,58 +1,35 @@ |
| 1 | 1 |
|
| 2 | 2 |
function fnReplCell_advc(){
|
| 3 |
- console.log(':: fnReplCell_advc :: ');
|
|
| 3 |
+ console.log(':: fnReplCell_advc ::'); // 함수 실행 로그
|
|
| 4 | 4 |
|
| 5 |
- var smsTxtArea = $('#smsTxtArea').val();
|
|
| 6 |
- console.log('smsTxtArea : ', smsTxtArea);
|
|
| 7 |
- var orgSmsTxt = smsTxtArea; // 광고문자 뺀 문자내용 |
|
| 5 |
+ let smsTxtArea = $('#smsTxtArea').val(); // 문자 내용을 가져옴
|
|
| 6 |
+ const adTxt = $('.ad_txt').text(); // 광고 문구
|
|
| 7 |
+ const denyTxt = $('.deny_txt').text(); // 수신 거부 문구
|
|
| 8 |
+ const recTableData = tableL.getRows(); // 받는사람 리스트 |
|
| 8 | 9 |
|
| 9 |
- var recTableData = tableL.getRows(); // 받는사람 리스트의 전체 목록을 저장 |
|
| 10 |
- |
|
| 11 |
- var smsTxt = smsTxtArea; |
|
| 12 |
- |
|
| 13 |
- var data = recTableData[0].getData(); |
|
| 14 |
- |
|
| 15 |
- if(typeof data.name != 'undefined' |
|
| 16 |
- && data.name != null |
|
| 17 |
- && data.name != ""){
|
|
| 18 |
- |
|
| 19 |
- var name = data.name; |
|
| 20 |
- smsTxt = stringReplaceAll(smsTxt, "[*이름*]", name); |
|
| 21 |
- |
|
| 22 |
- |
|
| 23 |
- } |
|
| 24 |
- if(typeof data.rep1 != 'undefined' && data.rep1 != null && data.rep1 != ""){
|
|
| 25 |
- |
|
| 26 |
- var rep1 = data.rep1; |
|
| 27 |
- smsTxt = stringReplaceAll(smsTxt, "[*1*]", rep1); |
|
| 28 |
- |
|
| 10 |
+ // 광고 문구와 수신 거부 문구를 문자 내용에 추가 |
|
| 11 |
+ if (adTxt && denyTxt) {
|
|
| 12 |
+ smsTxtArea = `${adTxt}\n${smsTxtArea}\n${denyTxt}`;
|
|
| 29 | 13 |
} |
| 30 | 14 |
|
| 31 |
- if(typeof data.rep2 != 'undefined' && data.rep2 != null && data.rep2 != ""){
|
|
| 32 |
- |
|
| 33 |
- var rep2 = data.rep2; |
|
| 34 |
- smsTxt = stringReplaceAll(smsTxt, "[*2*]", rep2); |
|
| 35 |
- |
|
| 15 |
+ // 문자 내용에 치환 문자열이 포함되어 있는지 확인 |
|
| 16 |
+ if (!SmsTextProcessor.hasPlaceholders(smsTxtArea)) return; |
|
| 17 |
+ |
|
| 18 |
+ $('#txtReplYn').val("Y"); // 치환 여부 상태값 설정
|
|
| 19 |
+ |
|
| 20 |
+ // 받는사람 데이터가 없는 경우 종료 |
|
| 21 |
+ if (!recTableData.length) return; |
|
| 22 |
+ |
|
| 23 |
+ try {
|
|
| 24 |
+ // 문자 내용을 처리하고 단문/장문 카운트를 얻음 |
|
| 25 |
+ const msgCount = SmsTextProcessor.processSmsText(smsTxtArea, recTableData); |
|
| 26 |
+ |
|
| 27 |
+ // 총 가격 계산 및 업데이트 |
|
| 28 |
+ replTotalPriceSum(msgCount.short, msgCount.long, recTableData.length); |
|
| 29 |
+ $('#txtReplYn').val("Y"); // 일괄변환문자 포함 여부 설정
|
|
| 30 |
+ } catch (error) {
|
|
| 31 |
+ console.error(error.message); // 오류 메시지 로그 |
|
| 36 | 32 |
} |
| 37 |
- |
|
| 38 |
- if(typeof data.rep3 != 'undefined' && data.rep3 != null && data.rep3 != ""){
|
|
| 39 |
- |
|
| 40 |
- var rep3 = data.rep3; |
|
| 41 |
- smsTxt = stringReplaceAll(smsTxt, "[*3*]", rep3); |
|
| 42 |
- |
|
| 43 |
- } |
|
| 44 |
- |
|
| 45 |
- if(typeof data.rep4 != 'undefined' && data.rep4 != null && data.rep4 != ""){
|
|
| 46 |
- |
|
| 47 |
- var rep4 = data.rep4; |
|
| 48 |
- smsTxt = stringReplaceAll(smsTxt, "[*4*]", rep4); |
|
| 49 |
- |
|
| 50 |
- } |
|
| 51 |
- |
|
| 52 |
- console.log('smsTxt : ', smsTxt);
|
|
| 53 |
- $('.realtime').text(smsTxt);
|
|
| 54 |
- |
|
| 55 |
- |
|
| 56 | 33 |
} |
| 57 | 34 |
|
| 58 | 35 |
//특정문구 일괄변환 문자길이 체크 하기 |
... | ... | @@ -320,6 +297,97 @@ |
| 320 | 297 |
|
| 321 | 298 |
} |
| 322 | 299 |
|
| 300 |
+ |
|
| 301 |
+ |
|
| 302 |
+// 문자 처리 객체 |
|
| 303 |
+const SmsTextProcessor = {
|
|
| 304 |
+ // 치환 문자열 배열 |
|
| 305 |
+ placeholders: ["[*이름*]", "[*1*]", "[*2*]", "[*3*]", "[*4*]"], |
|
| 306 |
+ |
|
| 307 |
+ // 치환 문자열이 포함되어 있는지 확인 |
|
| 308 |
+ hasPlaceholders(smsTxt) {
|
|
| 309 |
+ // smsTxt에서 placeholders 중 하나라도 포함되면 true 반환 |
|
| 310 |
+ return this.placeholders.some(ph => smsTxt.includes(ph)); |
|
| 311 |
+ }, |
|
| 312 |
+ |
|
| 313 |
+ // 문자 내용을 치환하는 함수 |
|
| 314 |
+ replacePlaceholders(text, data) {
|
|
| 315 |
+ // 치환 문자열 키와 값을 매핑하여 처리 |
|
| 316 |
+ return this.placeholders.reduce((result, ph, index) => {
|
|
| 317 |
+ // 치환 키 설정 (예: [*1*], [*2*]) |
|
| 318 |
+ const key = index === 0 ? "name" : `rep${index}`;
|
|
| 319 |
+ // 데이터 값이 없으면 치환 문자열 그대로 유지 |
|
| 320 |
+ const value = data[key] !== undefined && data[key] !== null ? data[key] : ph; |
|
| 321 |
+ |
|
| 322 |
+ // console.log(`Replacing ${ph} with ${value}:`); // 디버깅 로그
|
|
| 323 |
+ // 현재 치환 문자열만 교체 |
|
| 324 |
+ // return result.replace(new RegExp(`\\${ph}(?!\\[)`, "g"), value);
|
|
| 325 |
+ return stringReplaceAll(result, ph, value) |
|
| 326 |
+ }, text); |
|
| 327 |
+ } |
|
| 328 |
+, |
|
| 329 |
+ |
|
| 330 |
+ // 문자 길이를 계산하고 메시지 유형(단문/장문) 카운트 |
|
| 331 |
+ processMessageLength(smsTxt, msgCount) {
|
|
| 332 |
+ // 문자 길이(byte) 계산 |
|
| 333 |
+ const msgLen = conByteLeng(smsTxt); |
|
| 334 |
+ //console.log('msgLen : ', msgLen);
|
|
| 335 |
+ //console.log('smsTxt : ', smsTxt);
|
|
| 336 |
+ |
|
| 337 |
+ // 2000byte 초과시 오류 발생 |
|
| 338 |
+ if (msgLen > 2000) {
|
|
| 339 |
+ alert("문자 내용은 2000byte를 넘을 수 없습니다.");
|
|
| 340 |
+ throw new Error("문자 내용 초과");
|
|
| 341 |
+ } |
|
| 342 |
+ |
|
| 343 |
+ // 길이에 따라 장문/단문 카운트 증가 |
|
| 344 |
+ if (msgLen > 90) {
|
|
| 345 |
+ msgCount.long++; |
|
| 346 |
+ } else {
|
|
| 347 |
+ msgCount.short++; |
|
| 348 |
+ } |
|
| 349 |
+ |
|
| 350 |
+ return msgCount; // 업데이트된 카운트 반환 |
|
| 351 |
+ }, |
|
| 352 |
+ |
|
| 353 |
+ // 문자 내용 처리 함수 |
|
| 354 |
+ processSmsText(smsTxtArea, rowData) {
|
|
| 355 |
+ const msgCount = { short: 0, long: 0 }; // 단문/장문 초기화
|
|
| 356 |
+ |
|
| 357 |
+ |
|
| 358 |
+ // 수신자 데이터가 없는 경우 원본 문자 유지 |
|
| 359 |
+ if (!rowData || rowData.length === 0) {
|
|
| 360 |
+ $('.realtime').text(smsTxtArea);
|
|
| 361 |
+ return msgCount; |
|
| 362 |
+ } |
|
| 363 |
+ |
|
| 364 |
+ // 받는사람 데이터 순회 |
|
| 365 |
+ rowData.forEach((row, index) => {
|
|
| 366 |
+ // 문자 내용을 개별 데이터로 치환 |
|
| 367 |
+ let smsTxt = this.replacePlaceholders(smsTxtArea, row.getData()); |
|
| 368 |
+ // 문자 길이를 계산하고 카운트를 업데이트 |
|
| 369 |
+ this.processMessageLength(smsTxt, msgCount); |
|
| 370 |
+ |
|
| 371 |
+ // 첫 번째 수신자의 변환 결과를 미리보기로 설정 |
|
| 372 |
+ if (index === 0) {
|
|
| 373 |
+ // console.log('smsTxt : ',smsTxt);
|
|
| 374 |
+ $('.realtime').text(smsTxt); // 화면에 표시
|
|
| 375 |
+ } |
|
| 376 |
+ }); |
|
| 377 |
+ |
|
| 378 |
+ return msgCount; // 최종 카운트 반환 |
|
| 379 |
+ } |
|
| 380 |
+}; |
|
| 381 |
+ |
|
| 382 |
+ |
|
| 383 |
+ |
|
| 384 |
+ |
|
| 385 |
+ |
|
| 386 |
+ |
|
| 387 |
+ |
|
| 388 |
+ |
|
| 389 |
+ |
|
| 390 |
+ |
|
| 323 | 391 |
//특정문구 일괄변환 문자길이 체크 하기 |
| 324 | 392 |
function fnReplCellExcel(){
|
| 325 | 393 |
console.log('fnReplCellExcel');
|
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?