문자 받는사람 체크
This commit is contained in:
parent
5378514a8e
commit
b06cc7e71e
@ -4119,7 +4119,7 @@
|
|||||||
ON MC.ORDER_ID = MMD.USERDATA
|
ON MC.ORDER_ID = MMD.USERDATA
|
||||||
AND MC.USER_ID = MMD.USER_ID
|
AND MC.USER_ID = MMD.USER_ID
|
||||||
WHERE 1=1
|
WHERE 1=1
|
||||||
AND MMD.SENT_DATE > date_add(now(), interval -7 day)
|
/* AND MMD.SENT_DATE > date_add(now(), interval -7 day)*/
|
||||||
AND MMD.CUR_STATE = '3'
|
AND MMD.CUR_STATE = '3'
|
||||||
AND MMD.REFUND_YN = 'N'
|
AND MMD.REFUND_YN = 'N'
|
||||||
AND MMD.RESERVE_C_YN = 'N'
|
AND MMD.RESERVE_C_YN = 'N'
|
||||||
|
|||||||
@ -1055,7 +1055,7 @@ $(document).ready(function (){
|
|||||||
|
|
||||||
|
|
||||||
// 총 30만건이 넘으면 false
|
// 총 30만건이 넘으면 false
|
||||||
if (!validateRowLimit(result.count)) {
|
if (!validateRowLimit(result.uniqueCount)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -291,7 +291,6 @@ $(document).ready(function(){
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var addrData = $tableExcel.getData().map((row, index) => ({
|
var addrData = $tableExcel.getData().map((row, index) => ({
|
||||||
name: row.addrNm,
|
name: row.addrNm,
|
||||||
phone: removeDash(row.addrPhoneNo),
|
phone: removeDash(row.addrPhoneNo),
|
||||||
@ -301,6 +300,8 @@ $(document).ready(function(){
|
|||||||
rep4: row.addrInfo4,
|
rep4: row.addrInfo4,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 기존 tableL의 데이터를 가져옵니다.
|
// 기존 tableL의 데이터를 가져옵니다.
|
||||||
var existingData = tableL.getData();
|
var existingData = tableL.getData();
|
||||||
// 기존 데이터와 새로운 데이터를 합칩니다.
|
// 기존 데이터와 새로운 데이터를 합칩니다.
|
||||||
@ -319,8 +320,10 @@ $(document).ready(function(){
|
|||||||
*/
|
*/
|
||||||
const result = removeDuplicatesAndCount(combinedData, 'phone');
|
const result = removeDuplicatesAndCount(combinedData, 'phone');
|
||||||
|
|
||||||
|
console.table('result : ', result);
|
||||||
|
|
||||||
// 총 30만건이 넘으면 false
|
// 총 30만건이 넘으면 false
|
||||||
if (!validateRowLimit(result.count)) {
|
if (!validateRowLimit(result.uniqueCount)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -336,22 +339,6 @@ $(document).ready(function(){
|
|||||||
|
|
||||||
var totRows = tableL.getRows().length;
|
var totRows = tableL.getRows().length;
|
||||||
updateTotCnt(totRows); //전체 데이터 갯수 구하기
|
updateTotCnt(totRows); //전체 데이터 갯수 구하기
|
||||||
console.log('totRows : ', totRows);
|
|
||||||
var smsTxtArea = $('#smsTxtArea').val();
|
|
||||||
if(smsTxtArea.indexOf("[*이름*]") > -1
|
|
||||||
|| smsTxtArea.indexOf("[*1*]") > -1
|
|
||||||
|| smsTxtArea.indexOf("[*2*]") > -1
|
|
||||||
|| smsTxtArea.indexOf("[*3*]") > -1
|
|
||||||
|| smsTxtArea.indexOf("[*4*]") > -1){
|
|
||||||
|
|
||||||
// fnReplCell();
|
|
||||||
|
|
||||||
}else{
|
|
||||||
|
|
||||||
//결제 금액 구하기
|
|
||||||
// totalPriceSum(totRows);
|
|
||||||
|
|
||||||
}
|
|
||||||
totalPriceSum(totRows);
|
totalPriceSum(totRows);
|
||||||
|
|
||||||
setAddrMassClose();
|
setAddrMassClose();
|
||||||
|
|||||||
@ -986,15 +986,22 @@ function getTabulatorLAddrGrpCnt(){
|
|||||||
* };
|
* };
|
||||||
*/
|
*/
|
||||||
function removeDuplicatesAndCount(array, key) {
|
function removeDuplicatesAndCount(array, key) {
|
||||||
// 중복을 제거한 배열 생성
|
// 중복 체크를 위한 Map 사용
|
||||||
const uniqueArray = array.filter((item, index, self) =>
|
const seen = new Map();
|
||||||
index === self.findIndex((t) => t[key] === item[key])
|
const uniqueArray = [];
|
||||||
);
|
const duplicateArray = [];
|
||||||
|
|
||||||
// 중복된 데이터만 추출
|
array.forEach(item => {
|
||||||
const duplicateArray = array.filter((item, index, self) =>
|
const value = item[key];
|
||||||
index !== self.findIndex((t) => t[key] === item[key])
|
if (seen.has(value)) {
|
||||||
);
|
// 중복된 데이터는 중복 배열에 추가
|
||||||
|
duplicateArray.push(item);
|
||||||
|
} else {
|
||||||
|
// 처음 본 데이터는 고유 배열에 추가하고 Map에 기록
|
||||||
|
uniqueArray.push(item);
|
||||||
|
seen.set(value, true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// 결과 반환
|
// 결과 반환
|
||||||
return {
|
return {
|
||||||
@ -1022,6 +1029,8 @@ function validateRowLimit(totalRows, limit = 300000) {
|
|||||||
// 숫자 변환
|
// 숫자 변환
|
||||||
const totalRowsNum = Number(totalRows);
|
const totalRowsNum = Number(totalRows);
|
||||||
const limitNum = Number(limit);
|
const limitNum = Number(limit);
|
||||||
|
console.log('totalRowsNum : ', totalRowsNum);
|
||||||
|
console.log('limitNum : ', limitNum);
|
||||||
|
|
||||||
// 변환 후 값 확인
|
// 변환 후 값 확인
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
function isValidPhoneNumber(phone) {
|
function isValidPhoneNumber(phone) {
|
||||||
// 숫자만 추출
|
// 숫자만 추출
|
||||||
const numberOnly = phone.replace(/\D/g, '');
|
const numberOnly = phone.replace(/\D/g, '');
|
||||||
console.log('numberOnly : ' ,numberOnly);
|
// console.log('numberOnly : ' ,numberOnly);
|
||||||
|
|
||||||
// 유효한 형식 체크
|
// 유효한 형식 체크
|
||||||
return (
|
return (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user