30만건 이상 false;
This commit is contained in:
parent
16ca2b6723
commit
43fd87bf01
@ -46,7 +46,9 @@ public class FaxAddrServiceImpl extends EgovAbstractServiceImpl implements FaxAd
|
||||
private EgovIdGnrService idgenAddrTransHistId;
|
||||
|
||||
|
||||
private static final String FAX_REGEX = "^(02|0[3-6][1-4]|030|050|060|070|080|1\\d{2})$";
|
||||
private static final String FAX_REGEX = "^(02\\d|03[1-3]|04[1-4]|05[1-5]|06[1-4]|030|050|060|070|080|1\\d{2})$";
|
||||
|
||||
|
||||
private static final Pattern FAX_PATTERN = Pattern.compile(FAX_REGEX);
|
||||
|
||||
private static final Charset EUC_KR = Charset.forName("EUC-KR");
|
||||
@ -403,7 +405,7 @@ public class FaxAddrServiceImpl extends EgovAbstractServiceImpl implements FaxAd
|
||||
if(sumFaxAddrCnt > MAX_FAX_ADDR_CNT) {
|
||||
return new StatusResponse(
|
||||
HttpStatus.BAD_REQUEST
|
||||
, "주소록은 총 1000만개까지만 등록이 가능합니다."
|
||||
, "주소록은 총 100만개까지만 등록이 가능합니다."
|
||||
, LocalDateTime.now()
|
||||
);
|
||||
}
|
||||
|
||||
@ -1014,10 +1014,16 @@ $(document).ready(function (){
|
||||
|
||||
const textarea = $('#callTo');
|
||||
const numbers = textarea.val().split('\n')
|
||||
.map(num => num.trim())
|
||||
.filter(num => num !== "");
|
||||
.map(num => num.trim())
|
||||
.filter(num => num !== "");
|
||||
|
||||
|
||||
var numLen = numbers.length;
|
||||
|
||||
if (!validateRowLimit(tableL.getDataCount(), numLen)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
console.log('입력된 번호들 : ', numbers);
|
||||
|
||||
// 현재 테이블에 있는 데이터 가져오기
|
||||
const existingRows = tableL.getData();
|
||||
@ -1031,19 +1037,12 @@ $(document).ready(function (){
|
||||
// const formattedNumber = formatPhoneNumber(number); // 번호 표준화
|
||||
|
||||
const formattedNumber = formatPhoneNumber(number); // 번호 표준화
|
||||
console.log('formattedNumber : ', formattedNumber);
|
||||
// console.log('number : ', number)
|
||||
// console.log('formattedNumber : ', formattedNumber)
|
||||
const cleanedNumber = formattedNumber.replace(/[^0-9]/g, ''); // 숫자만 남김
|
||||
console.log('cleanedNumber : ', cleanedNumber);
|
||||
console.log('cleanedNumber : ', cleanedNumber);
|
||||
if (!existingNumbers.has(cleanedNumber)) { // 중복 번호 체크
|
||||
if (isValidPhoneNumber(formattedNumber)) { // 유효성 검사
|
||||
// tableL.addRow({ phone: formattedNumber }); // 표준화된 번호로 추가
|
||||
tableL.addRow({ phone: cleanedNumber }); // 하이픈 제거된 번호로 추가
|
||||
existingNumbers.add(cleanedNumber); // 추가된 번호를 기존 목록에 추가
|
||||
} else {
|
||||
// alert(`유효하지 않은 번호 형식: ${number}`);
|
||||
invalidNumbers.push(number); // 유효하지 않은 번호를 배열에 추가
|
||||
}
|
||||
} else {
|
||||
@ -1225,7 +1224,10 @@ $(document).ready(function (){
|
||||
addPhoneList.push({phone: removeDash(chkPhone.trim())});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if (!validateRowLimit(tableL.getDataCount(), addPhoneList.length)) {
|
||||
return false;
|
||||
}
|
||||
if(addPhoneList.length > 0){
|
||||
//연락처 추가해 주기
|
||||
addPhoneInfo(addPhoneList);
|
||||
@ -1249,7 +1251,10 @@ $(document).ready(function (){
|
||||
addPhoneList.push({phone: removeDash(chkPhone.trim())});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if (!validateRowLimit(tableL.getDataCount(), addPhoneList.length)) {
|
||||
return false;
|
||||
}
|
||||
if(addPhoneList.length > 0){
|
||||
//연락처 추가해 주기
|
||||
addPhoneInfo(addPhoneList);
|
||||
@ -1287,6 +1292,11 @@ $(document).ready(function (){
|
||||
addPhoneList.push({phone: removeDash(chkPhone.trim())});
|
||||
}
|
||||
});
|
||||
|
||||
if (!validateRowLimit(tableL.getDataCount(), addPhoneList.length)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if(addPhoneList.length > 0){
|
||||
//연락처 추가해 주기
|
||||
@ -1301,6 +1311,7 @@ $(document).ready(function (){
|
||||
|
||||
//자주보내는 번호 팝업 전체추가 버튼 처리
|
||||
$(document).on('click', '#bookMarkAddPhoneAll', function (){
|
||||
|
||||
var addPhoneList = []; //신규로 추가할 전화번호 저장변수
|
||||
$("input:checkbox[name='bookAddrChk']").each(function(index){
|
||||
var chkPhone = $(this).val();
|
||||
@ -1312,6 +1323,12 @@ $(document).ready(function (){
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
if (!validateRowLimit(tableL.getDataCount(), addPhoneList.length)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(addPhoneList.length > 0){
|
||||
//연락처 추가해 주기
|
||||
addPhoneInfo(addPhoneList);
|
||||
@ -2919,6 +2936,12 @@ function addrToList_advc(type){
|
||||
|
||||
}else{ // 선택한 Row 데이터 저장해주기
|
||||
|
||||
|
||||
if (!validateRowLimit(tableL.getDataCount(), tableAddr.getDataCount())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// 기존 tableL의 데이터를 가져옵니다.
|
||||
var existingData = tableL.getData();
|
||||
var addrData;
|
||||
@ -3395,6 +3418,16 @@ function getMjMsgSentListAll(pageNo) {
|
||||
});
|
||||
}
|
||||
|
||||
function validateRowLimit(currentRows, newRows, limit = 300000) {
|
||||
const totalRows = currentRows + newRows;
|
||||
if (totalRows > limit) {
|
||||
alert('안정적인 서비스 운영을 위해서 최대 '+limit+'건 이내로 분할 발송해 주시기 바랍니다.');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<div class="loading_layer">
|
||||
|
||||
@ -195,6 +195,7 @@ function getMjMsgListByResend() {
|
||||
dataType:'json',
|
||||
async: false,
|
||||
success: function (data) {
|
||||
console.log('data : ', data);
|
||||
if(data.isSuccess == true){
|
||||
var listCnt = data.resultList.length;
|
||||
|
||||
@ -206,15 +207,20 @@ function getMjMsgListByResend() {
|
||||
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); //전체 데이터 갯수 구하기
|
||||
console.log('tableData : ', tableData);
|
||||
if(tableData.length > 0){
|
||||
|
||||
//결제 금액 구하기
|
||||
totalPriceSum(totRows);
|
||||
// 데이터 추가
|
||||
setTimeout(() => {
|
||||
tableL.addData(dupliPhoneData(tableData));
|
||||
totRows = tableL.getRows().length;
|
||||
console.log('totRows : ', totRows);
|
||||
updateTotCnt(totRows); //전체 데이터 갯수 구하기
|
||||
|
||||
//결제 금액 구하기
|
||||
totalPriceSum(totRows);
|
||||
}, 0); // 초기화 직후에 실행
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
@ -293,6 +293,12 @@ $(document).ready(function(){
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
// 총 30만건이 넘으면 false
|
||||
if (!validateRowLimit($tableExcel.getDataCount(), tableL.getDataCount())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
var addrData = $tableExcel.getData().map((row, index) => ({
|
||||
name: row.addrNm,
|
||||
|
||||
@ -575,6 +575,7 @@ var dupliPhoneDataRealList = [];
|
||||
|
||||
//중복 전화번호 체크하기
|
||||
function dupliPhoneData(data){
|
||||
// console.log('dupliPhoneData : ', data);
|
||||
|
||||
var chk = true; //중복값 유무
|
||||
var uniqData = []; // 중복값 삭제 후 데이터 저장
|
||||
|
||||
Loading…
Reference in New Issue
Block a user