선거문자 임시 대량발송 프로세스 화면 개발

- 임시화면 1차 개발 완료 커밋
This commit is contained in:
rosewiper 2024-01-31 11:09:39 +09:00
parent cec7965389
commit 859649f13c
12 changed files with 7422 additions and 13 deletions

View File

@ -1733,11 +1733,13 @@ public class MjonMsgCampainDataController {
* @return
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/msgcampain/selectAddrGroupListAjax.do"})
@RequestMapping(value= {"/web/mjon/msgcampain/selectAddrGroupListAjax.do" , "/web/mjon/msgcampain/huge/selectAddrGroupListAjax.do"
})
public String selectAddrGroupListAjax(
@ModelAttribute("searchVO") AddrGroupVO addrGroupVO,
AddrVO addrVO,
ModelMap model,
HttpServletRequest request,
RedirectAttributes redirectAttributes) throws Exception {
//로그인 권한정보 불러오기
@ -1783,7 +1785,14 @@ public class MjonMsgCampainDataController {
model.addAttribute("addrGroupList", addrGroupList);
return "web/msgcampain/addr/MsgAddrGroupListAjax";
String jspUrl = "web/msgcampain/addr/MsgAddrGroupListAjax";
if("/web/mjon/msgcampain/huge/selectAddrGroupListAjax.do".equals(request.getRequestURI())) {
jspUrl = "web/msgcampain/addr/huge/MsgHGAddrGroupListAjax";
}
return jspUrl;
}

View File

@ -0,0 +1,540 @@
package itn.let.mjo.msgcampain.web;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import egovframework.rte.psl.dataaccess.util.EgovMap;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import itn.com.cmm.ComDefaultCodeVO;
import itn.com.cmm.EgovMessageSource;
import itn.com.cmm.LoginVO;
import itn.com.cmm.service.EgovCmmUseService;
import itn.com.cmm.service.EgovFileMngService;
import itn.com.cmm.service.EgovFileMngUtil;
import itn.com.cmm.util.MJUtil;
import itn.com.utl.fcc.service.EgovStringUtil;
import itn.let.lett.service.HashConfVO;
import itn.let.lett.service.LetterService;
import itn.let.lett.service.LetterVO;
import itn.let.mjo.addr.service.AddrGroupService;
import itn.let.mjo.addr.service.AddrService;
import itn.let.mjo.addr.service.AddrVO;
import itn.let.mjo.event.service.MjonEventService;
import itn.let.mjo.event.service.MjonEventVO;
import itn.let.mjo.msg.service.MjonMsgService;
import itn.let.mjo.msgcampain.service.MjonCandidateService;
import itn.let.mjo.msgcampain.service.MjonCandidateVO;
import itn.let.mjo.msgdata.service.MjonMsgDataService;
import itn.let.mjo.msgdata.service.MjonMsgDataVO;
import itn.let.mjo.pay.service.MjonPayService;
import itn.let.mjo.spammsg.service.MjonSpamMsgService;
import itn.let.mjo.symbol.service.MjonSymbolService;
import itn.let.mjo.symbol.service.MjonSymbolVO;
import itn.let.sym.ccm.cde.service.CateCode;
import itn.let.sym.ccm.cde.service.EgovCcmCmmnDetailCodeManageService;
import itn.let.sym.grd.service.MberGrdService;
import itn.let.sym.site.service.EgovSiteManagerService;
import itn.let.sym.site.service.JoinSettingVO;
import itn.let.uss.umt.service.EgovMberManageService;
import itn.let.uss.umt.service.EgovUserManageService;
import itn.let.uss.umt.service.MberManageVO;
import itn.let.utl.fcc.service.EgovCryptoUtil;
@Controller
public class MjonMsgCampainHGDataController {
@Resource(name = "mjonMsgService")
private MjonMsgService mjonMsgService;
@Resource(name = "mjonPayService")
private MjonPayService mjonPayService;
@Resource(name = "MjonMsgDataService")
private MjonMsgDataService mjonMsgDataService;
@Resource(name = "LetterService")
private LetterService letterService;
@Resource(name = "mjonSymbolService")
private MjonSymbolService mjonSymbolService;
/** mberManageService */
@Resource(name = "mberManageService")
private EgovMberManageService mberManageService;
@Resource (name = "AddrService")
private AddrService addrService;
@Resource (name = "AddrGroupService")
private AddrGroupService addrGroupService;
@Resource(name = "mjonCandidateService")
private MjonCandidateService mjonCandidateService;
@Resource(name = "EgovCmmUseService")
private EgovCmmUseService cmmUseService;
/** EgovMessageSource */
@Resource(name="egovMessageSource")
EgovMessageSource egovMessageSource;
@Resource(name="EgovFileMngUtil")
private EgovFileMngUtil fileUtil;
@Resource(name="EgovFileMngService")
private EgovFileMngService fileMngService;
/* 암복호화 */
@Resource(name = "egovCryptoUtil")
EgovCryptoUtil egovCryptoUtil;
@Resource(name = "egovMjonMsgGroupIdGnrService")
private EgovIdGnrService idgenMjonMsgGroupId;
@Resource(name = "egovMjonCashIdGnrService")
private EgovIdGnrService idgenMjonCashId;
@Resource(name = "CmmnDetailCodeManageService")
private EgovCcmCmmnDetailCodeManageService cmmnDetailCodeManageService;
/** 첨부파일 저장경로 */
@Value("#{globalSettings['Globals.file.saveDir']}")
private String fileSaveDir;
/** userManageService */
@Resource(name = "userManageService")
private EgovUserManageService userManageService;
@Resource(name = "MjonEventService")
private MjonEventService mjonEventService;
@Resource(name = "mjonSpamMsgService")
private MjonSpamMsgService mjonSpamMsgService;
/** 사이트 설정 */
@Resource(name = "egovSiteManagerService")
EgovSiteManagerService egovSiteManagerService;
/** 등급제 관리 서비스 */
@Resource(name = "mberGrdService")
MberGrdService mberGrdService;
/**
* 선거 문자 대량 발송 화면
* @param searchVO
* @param model
* @return "/web/mjon/msgcampain/huge/selectMsgHGDataView.do"
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/msgcampain/huge/selectMsgHGDataView.do"})
public String selectMsgHGDataView(@ModelAttribute("searchVO") MjonMsgDataVO searchVO
, CateCode cateCode
, HttpServletRequest request
, ModelMap model) throws Exception{
String categoryType = cateCode.getCateType();
if(categoryType == null) {
categoryType = "N";
}
// 문자 카테고리 리스트 불러오기
List<CateCode> cateConfList = letterService.selectCateConfWithList(categoryType);
model.addAttribute("cateCodeList", cateConfList);
// 문자 해쉬태그 리스트 불러오기
String msgType = "M";
List<HashConfVO> hashTagList = letterService.selectHashTagWithList(msgType);
model.addAttribute("hashTagList", hashTagList);
// 문자 리스트 불러오기
LetterVO letterVO = new LetterVO();
if(letterVO.getPageUnit() != 10) {
letterVO.setPageUnit(letterVO.getPageUnit());
}
//로그인 권한정보 불러오기
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
model.addAttribute("loginVO", loginVO);
for(int i=0 ; i < cateConfList.size(); i++) {
if("선거".equals(cateConfList.get(i).getCateNm())) {
letterVO.setCategoryCode(cateConfList.get(i).getCateCode());
}
}
//주소록에서 선택시 넘어오는 파라미터
if("Y".equals(searchVO.getMoveAddrFlag())) {
model.addAttribute("addrVO", searchVO);
}
//주소록에서 선택시 넘어오는 파라미터
if("Y".equals(searchVO.getMoveAddrAllFlag())) {
AddrVO addrVO = new AddrVO();
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId != "") {
addrVO.setMberId(userId);
}
addrVO.setRecordCountPerPage(100000);
addrVO.setFirstIndex(0);
addrVO.setSearchAddrGrpId(request.getParameter("searchAddrGrpId"));
addrVO.setSearchCondition(request.getParameter("searchCondition"));
addrVO.setSearchKeyword(request.getParameter("searchKeyword"));
addrVO.setStartKeyword(request.getParameter("startKeyword"));
List<AddrVO> addrList = addrService.selectAddrList(addrVO);
List<String> addrIdList = new ArrayList<String>();
for(AddrVO item : addrList) {
addrIdList.add(item.getAddrId());
}
searchVO.setAddrIdList(addrIdList);
searchVO.setMoveAddrFlag("Y");
model.addAttribute("addrVO", searchVO);
}
/** pageing */
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(letterVO.getPageIndex());
paginationInfo.setRecordCountPerPage(letterVO.getPageUnit());
paginationInfo.setPageSize(letterVO.getPageSize());
letterVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
letterVO.setLastIndex(paginationInfo.getLastRecordIndex());
letterVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
List<?> resultPhoList = mjonMsgDataService.selectPhotoLetterList(letterVO);
model.addAttribute("resultPhoList", resultPhoList);
paginationInfo.setTotalRecordCount( resultPhoList.size()> 0 ? ((Long)((EgovMap)resultPhoList.get(0)).get("totCnt")).intValue() : 0);
model.addAttribute("paginationInfo", paginationInfo);
//발송결과 문자 재전송에서 넘어오는 경우 파마리터 전달
List<String> temp = searchVO.getMsgSeqList();
if(temp != null) {
model.addAttribute("reSendMsgVO", searchVO);
}
model.addAttribute("letterVO", letterVO);
// 문자 재전송 New
model.addAttribute("msgResendAllFlag", searchVO.getMsgResendAllFlag());
model.addAttribute("msgResendAllGroupId", searchVO.getMsgResendAllGroupId());
model.addAttribute("msgResendAllAdvertiseYn", searchVO.getMsgResendAllAdvertiseYn());
model.addAttribute("msgResendAllReplaceYn", searchVO.getMsgResendAllReplaceYn());
return "web/msgcampain/huge/MsgHGDataView";
}
/**
* 선거 문자 대량 발송 단문/장문/그림문자 전송 화면
* @param searchVO
* @param model
* @return "/web/mjon/msgcampain/huge/selectMsgHGDataSMLViewAjax.do"
* @throws Exception
*/
@RequestMapping(value= {"/web/mjon/msgcampain/huge/selectMsgHGDataSMLViewAjax.do"})
public String selectMsgHGDataSMLView(@ModelAttribute("searchVO") MjonMsgDataVO searchVO, CateCode cateCode, ModelMap model) throws Exception{
//로그인 권한정보 불러오기
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
String author = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getAuthority());
String categoryType = cateCode.getCateType();
if(categoryType == null) {
categoryType = "N";
}
//문자 전송 개인 단가 불러오기
//0.이벤트 진행중이 회원 정보 불러오기.
//이벤트 회원 정보 테이블에서 대상자의 정보를 불러온다.
MjonEventVO mjonEventVO = new MjonEventVO();
mjonEventVO.setMberId(userId);
MjonEventVO eventMberInfo = mjonEventService.selectEventMsgMberDefaultInfo(mjonEventVO);
long eventDiffDate = 0;
float eventRemainCash = 0;
boolean compareEndDate = false;
if(eventMberInfo != null) {
String eventEndDate = eventMberInfo.getEventEndDate();
/**
* MJUtil.getCompareDate()
* 현재 날짜와 파라미터 전달 날짜를 비교
* 전달날짜를 지난경우 False를 리턴함.
* 현재날짜 이전 혹은 같은 날짜면 True를 리턴함.
*
* */
if(eventEndDate != null) {
compareEndDate = MJUtil.getCompareDate(eventEndDate);
eventRemainCash = (float) eventMberInfo.getEventRemainCash();
//이벤트 종료 일자가 지난 경우, 이벤트 상태가 종료아 아니면 종료 처리 시킴
//이벤트 남은 캐시가 단문 발송금액 7.5원 보다 낮으면 이벤트 종료 시킴
if(!compareEndDate || eventRemainCash < 7.5) {
if(!eventMberInfo.getEventStatus().equals("E")) {
//이벤트 상태값을 종료로 변경한다.
mjonEventVO.setEventInfoId(eventMberInfo.getEventInfoId());
mjonEventVO.setEventStatus("E");
mjonEventVO.setEventMemo("이벤트 발송 최소 금액(7.5) 부족 혹은 이벤트 종료일 초과되어 이벤트 종료 시킴");
mjonEventVO.setEventRemainCash(eventRemainCash);
mjonEventService.updateEventEndStatus(mjonEventVO);
eventMberInfo.setEventStatus("E");
}
}else {//이벤트 진행중이면 남은 날짜 계산해서 전달.
/**
* MJUtil.getDiffDateDay()
* 현재 날짜와 파라미터 날짜 사이의 날짜 수를 계산해줌.
*
* */
eventDiffDate = MJUtil.getDiffDateDay(eventEndDate);
}
}
}
//남은 날짜값을 절대값으로 변경(음수로 나오기 때문)
model.addAttribute("eventDiffDate", Math.abs(eventDiffDate));
model.addAttribute("compareEndDate", compareEndDate);
model.addAttribute("eventRemainCash", eventRemainCash);
model.addAttribute("eventMberInfo", eventMberInfo);
//1.시스템 기본 단가 정보 불러오기
JoinSettingVO sysJoinSetVO = mjonMsgDataService.selectJoinSettingInfo();
// 등급제 단가 추출 => 시스템 단가에 적용
sysJoinSetVO = mberGrdService.selectMberGrdDefaultInfo(sysJoinSetVO, userId);
//2.사용자 개인 단가 정보 불러오기
MberManageVO mberManageVO = new MberManageVO();
if(!userId.equals("") && !author.equals("ROLE_ADMIN")) {
mberManageVO = mjonMsgDataService.selectMberManageInfo(userId);
searchVO.setUserId(userId);
}
model.addAttribute("exceptSpamYn", mberManageVO.getExceptSpamYn());
//3.사용자 개인단가 정보가 0이 아니면 개인단가 사용, 없으면 시스템 기본 단가 사용
Float shortPrice = mberManageVO.getShortPrice();
Float longPrice = mberManageVO.getLongPrice();
Float picturePrice = mberManageVO.getPicturePrice();
Float picture2Price = mberManageVO.getPicture2Price();
Float picture3Price = mberManageVO.getPicture3Price();
BigDecimal userMoney = new BigDecimal(mberManageVO.getUserMoney()).setScale(2, RoundingMode.HALF_EVEN);
//일반 단가정보 저장 변수 셋팅 - 이벤트 캐시 부족시 일반단가로 계산하기 위해서임.20230328, 우영두추가
Float norShortPrice = mberManageVO.getShortPrice();
Float norLongPrice = mberManageVO.getLongPrice();
Float norPicturePrice = mberManageVO.getPicturePrice();
Float norPicture2Price = mberManageVO.getPicture2Price();
Float norPicture3Price = mberManageVO.getPicture3Price();
//기존 소수점 2째자리에서 반올림하였으나, 정책 변경으로 소수점 버림 처리함 20220623
/*int shortPrice = (int) mberManageVO.getShortPrice();
int longPrice = (int) mberManageVO.getLongPrice();
int picturePrice = (int) mberManageVO.getPicturePrice();
int picture2Price = (int) mberManageVO.getPicture2Price();
int picture3Price = (int) mberManageVO.getPicture3Price();
int userMoney = (int) mberManageVO.getUserMoney();*/
String userPoint = mberManageVO.getUserPoint();
//이벤트 진행 회원의 발송 단가 처리해주기
if(eventMberInfo != null && eventMberInfo.getEventStatus().equals("Y") && compareEndDate) {
shortPrice = Float.parseFloat(eventMberInfo.getEventShortPrice());
longPrice = Float.parseFloat(eventMberInfo.getEventLongPrice());
picturePrice = Float.parseFloat(eventMberInfo.getEventPicturePrice());
picture2Price = Float.parseFloat(eventMberInfo.getEventPicture2Price());
picture3Price = Float.parseFloat(eventMberInfo.getEventPicture3Price());
//이벤트 캐시 부족시 일반단가로 계산하기 위해서임.20230328, 우영두추가
if(shortPrice < 1 || longPrice < 1 || picturePrice < 1) {//이벤트 단가 적용시 일반단가도 필요하여 셋팅 해줌.
norShortPrice = (float) sysJoinSetVO.getShortPrice();
norLongPrice = (float) sysJoinSetVO.getLongPrice();
norPicturePrice = (float) sysJoinSetVO.getPicturePrice();
norPicture2Price = (float) sysJoinSetVO.getPicture2Price();
norPicture3Price = (float) sysJoinSetVO.getPicture3Price();
}
}else if(shortPrice < 1 || longPrice < 1 || picturePrice < 1) {
shortPrice = (float) sysJoinSetVO.getShortPrice();
longPrice = (float) sysJoinSetVO.getLongPrice();
picturePrice = (float) sysJoinSetVO.getPicturePrice();
picture2Price = (float) sysJoinSetVO.getPicture2Price();
picture3Price = (float) sysJoinSetVO.getPicture3Price();
}
model.addAttribute("shortPrice", shortPrice);
model.addAttribute("longPrice", longPrice);
model.addAttribute("picturePrice", picturePrice);
model.addAttribute("picture2Price", picture2Price);
model.addAttribute("picture3Price", picture3Price);
model.addAttribute("userMoney", userMoney);
model.addAttribute("userPoint", userPoint);
//이벤트 캐시 부족시 일반단가로 계산하기 위해서임.20230328, 우영두추가
if(norShortPrice < 1 || norLongPrice < 1 || norPicturePrice < 1) {//협의 단가가 없는 경우 일반단가에 시스템 단가로 셋팅해줌
norShortPrice = (float) sysJoinSetVO.getShortPrice();
norLongPrice = (float) sysJoinSetVO.getLongPrice();
norPicturePrice = (float) sysJoinSetVO.getPicturePrice();
norPicture2Price = (float) sysJoinSetVO.getPicture2Price();
norPicture3Price = (float) sysJoinSetVO.getPicture3Price();
}
model.addAttribute("norShortPrice", norShortPrice);
model.addAttribute("norLongPrice", norLongPrice);
model.addAttribute("norPicturePrice", norPicturePrice);
model.addAttribute("norPicture2Price", norPicture2Price);
model.addAttribute("norPicture3Price", norPicture3Price);
//선거 후보자 정보 불러오기
MjonCandidateVO mjonCandidateVO = new MjonCandidateVO();
if(userId != ""){
mjonCandidateVO = mjonCandidateService.selectCandidateDataInfo(userId);
//String cryptText = egovCryptoUtil.encrypt(plainText);
if(mjonCandidateVO != null) {
// 주민번호 복호화 하기
String regidentNo1 = egovCryptoUtil.decrypt(mjonCandidateVO.getRegidentNo1());
String regidentNo2 = egovCryptoUtil.decrypt(mjonCandidateVO.getRegidentNo2());
mjonCandidateVO.setRegidentNo1(regidentNo1);
mjonCandidateVO.setRegidentNo2(regidentNo2);
}
}
model.addAttribute("mjonCandidateVO", mjonCandidateVO);
// 이메일 코드조회
ComDefaultCodeVO voComCode = new ComDefaultCodeVO();
voComCode.setCodeId("ITN031");
model.addAttribute("emailCode", cmmUseService.selectCmmCodeDetail(voComCode));
if(!userId.equals("")) {//로그인 했을때만 발신번호 리스트 불러오기
//아이디 발신번호 리스트 불러오기.
List<String> resultSendPhonList = mjonMsgDataService.selectSendPhonNumList(userId);
List<String> resultPhonList = new ArrayList<String>();
MJUtil mjUtil = new MJUtil();
for(String phone : resultSendPhonList) {
resultPhonList.add(mjUtil.addDash(phone));
}
model.addAttribute("resultPhonList", resultPhonList);
}
// 문자 카테고리 리스트 불러오기
List<CateCode> cateConfList = letterService.selectCateConfWithList(categoryType);
model.addAttribute("cateCodeList", cateConfList);
//그림 문자 리스트 불러오기
LetterVO letterVO = new LetterVO();
if(letterVO.getPageUnit() != 10) {
letterVO.setPageUnit(letterVO.getPageUnit());
}
MjonSymbolVO symbolVO = new MjonSymbolVO();
// 특수문자 리스트 불러오기
List<MjonSymbolVO> symbolList = mjonSymbolService.selectMjonSymbolList(symbolVO);
model.addAttribute("symbolList", symbolList);
//최근 전송 내역
Calendar cal = Calendar.getInstance();
Date now = new Date();
SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd");
cal.setTime(now);
cal.add(Calendar.DATE, -3);
String chkDate = format.format(cal.getTime());
searchVO.setMyMsgStDt(chkDate); //검색 시작일 저장 - 현재날짜로 부터 3일 이전 날짜로 시작
List<?> resultLatestMsgList = mjonMsgDataService.selectLatestMsgList(searchVO);
model.addAttribute("resultLatestMsgList", resultLatestMsgList);
//자주보내는 번호
List<?> resultBookMarkMsgList = mjonMsgDataService.selectBookMarkMsgList(searchVO);
model.addAttribute("resultBookMarkMsgList", resultBookMarkMsgList);
/** pageing */
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(letterVO.getPageIndex());
paginationInfo.setRecordCountPerPage(letterVO.getPageUnit());
paginationInfo.setPageSize(letterVO.getPageSize());
letterVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
letterVO.setLastIndex(paginationInfo.getLastRecordIndex());
letterVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
List<?> resultPhoList = mjonMsgDataService.selectPhotoLetterList(letterVO);
model.addAttribute("resultPhoList", resultPhoList);
paginationInfo.setTotalRecordCount( resultPhoList.size()> 0 ? ((Long)((EgovMap)resultPhoList.get(0)).get("totCnt")).intValue() : 0);
model.addAttribute("paginationInfo", paginationInfo);
model.addAttribute("mberManageVO", mberManageVO);
return "web/msgcampain/huge/MsgHGDataSMLView";
}
}

View File

@ -1040,11 +1040,10 @@ function setSenderList() {
gMemoList[i] = memo.replace(/,/g,"§");
}
//브라우저 대기 메세지 안나오게 하기위한 처리
var reStartArray = [10000, 20000, 30000, 40000, 50000, 60000, 70000, 80000, 90000, 100000, 110000, 120000, 130000, 140000, 150000, 160000, 170000, 180000, 190000, 200000];
if (reStartArray.includes(i, 0)) {
console.log("########## i : " + i);
gArrRestartIndex = i+1;
if (selectedData.length > gArrRestartIndex) {
@ -1052,13 +1051,12 @@ function setSenderList() {
break;
}
}
console.log(i);
}
if (gPhoneList.length == selectedData.length) {
console.log(new Date());
console.log("gPhoneList.length : " + gPhoneList.length);
console.log("selectedData.length : " + selectedData.length);
//console.log(new Date());
//console.log("gPhoneList.length : " + gPhoneList.length);
//console.log("selectedData.length : " + selectedData.length);
SetAddrMassSave_Step2();
}
@ -1114,6 +1112,8 @@ function SetAddrMassSave_Step2(){
// 데이터 비우기
SetClear();
var selectMassVal = $("#addrGrpIdInfo option:selected").val();
// 주소록그룹 콤보박스 유지
setTimeout(setSelectMassSetting, 500, selectMassVal);
}

View File

@ -23,7 +23,7 @@ var excelAddr = []; //엑셀 불러오기에서 내용 저장하는 배열 변
function updateTotCnt(data){
var rowTotCnt = data;
$("#rowTotCnt").text(rowTotCnt);
$("#rowTotCnt").text(numberWithCommas(rowTotCnt));
}
@ -1737,7 +1737,6 @@ function fnByteString(contents){
}else{
conLeng = adTxtLeng + conLeng + denyTxtLeng +2; // 상단 광고 텍스트 , 하단 080 문자내용 길이 더해주기 , +2는 엔터 적용
console.log("++++++++++ conleng ::: "+conLeng);
$('#msgLeng').text(conLeng);
//문자 길이 변수에 저장해주기

View File

@ -0,0 +1,142 @@
<%@ 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"%>
<script type="text/javascript">
$(document).ready(function(){
// 주소록 그룹 카운트(전체)
getAddrGroupTotCnt();
//주소록 그룹 카운트(그룹미지정)
getAddrGroupNogrpCnt();
//주소록 그룹 카운트(자주보내는 번호)
getAddrGroupBookmarkCnt();
});
// 주소록 그룹 카운트(전체)
function getAddrGroupTotCnt() {
$.ajax({
type: "POST",
url: "/web/addr/selectAddrGroupTotCntAjax.do",
data: {},
dataType:'json',
async: true,
success: function (data) {
if (data.isSuccess) {
$("#addrTotCnt").html(numberWithCommas(data.addrTotCnt));
}
else {
//alert("Msg : " + data.msg);
}
},
error: function (e) {
//alert("ERROR : " + JSON.stringify(e));
}
});
}
//주소록 그룹 카운트(그룹미지정)
function getAddrGroupNogrpCnt() {
$.ajax({
type: "POST",
url: "/web/addr/selectAddrGroupNogrpCntAjax.do",
data: {},
dataType:'json',
async: true,
success: function (data) {
if (data.isSuccess) {
$("#nogrpCnt").html(data.nogrpCnt);
}
else {
//alert("Msg : " + data.msg);
}
},
error: function (e) {
//alert("ERROR : " + JSON.stringify(e));
}
});
}
//주소록 그룹 카운트(자주보내는 번호)
function getAddrGroupBookmarkCnt() {
$.ajax({
type: "POST",
url: "/web/addr/selectAddrGroupBookmarkCntAjax.do",
data: {},
dataType:'json',
async: true,
success: function (data) {
if (data.isSuccess) {
$("#bookmarkCnt").html(data.bookmarkCnt);
}
else {
//alert("Msg : " + data.msg);
}
},
error: function (e) {
//alert("ERROR : " + JSON.stringify(e));
}
});
}
//그룹 클릭했을 때 활성화 디자인 추가
$(".adr_cb_wrap2").click(function(){
$(this).addClass("active");
$(this).siblings(".adr_cb_wrap2").removeClass("active");
});
</script>
<div class="adr_pop_list">
<div class="adr_cb_wrap2">
<!-- <p onClick="javascript:fnSelectAddrList('all','',this); return false;"> -->
<p>
<img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">전체[<span id="addrTotCnt"></span>명]
</p>
</div>
<div class="adr_cb_wrap2">
<label for="group1" class="label"></label>
<input type="checkbox" id="group1">
<!-- <p onClick="javascript:fnSelectAddrList('none','',this); return false;"> -->
<p>
<img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">그룹미지정[<span id="nogrpCnt"></span>명]
</p>
</div>
<div class="adr_cb_wrap2">
<label for="group2" class="label"></label>
<input type="checkbox" id="group2">
<!-- <p onClick="javascript:fnSelectAddrList('book','',this); return false;"> -->
<p>
<img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">자주보내는 번호[<span id="bookmarkCnt"></span>명]
</p>
</div>
<c:choose>
<c:when test="${not empty addrGroupList}">
<c:forEach var="addrGroupList" items="${addrGroupList}" varStatus="status">
<div class="adr_cb_wrap2">
<label for="group${status.index+3}" class="label"></label>
<input type="checkbox" name="grpCheck" id="group${status.index+3}" value="${addrGroupList.addrGrpId}§${addrGroupList.addrGrpNm}§${addrGroupList.grpCount}">
<%-- <p onClick="javascript:fnSelectAddrList('grp','${addrGroupList.addrGrpId}',this); return false;"> --%>
<p>
<img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">
<c:out value="${addrGroupList.addrGrpNm}" />[<span><c:out value="${addrGroupList.grpCount}" /></span>명]
</p>
</div>
</c:forEach>
</c:when>
<c:otherwise>
<div class="adr_cb_wrap2">
<p>
검색 결과가 없습니다.
</p>
</div>
</c:otherwise>
</c:choose>
</div>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -33,7 +33,7 @@ var excelAddr = []; //엑셀 불러오기에서 내용 저장하는 배열 변
function updateTotCnt(data){
var rowTotCnt = data;
$("#rowTotCnt").text(rowTotCnt);
$("#rowTotCnt").text(numberWithCommas(rowTotCnt));
}

View File

@ -23,7 +23,7 @@ var excelAddr = []; //엑셀 불러오기에서 내용 저장하는 배열 변
function updateTotCnt(data){
var rowTotCnt = data;
$("#rowTotCnt").text(rowTotCnt);
$("#rowTotCnt").text(numberWithCommas(rowTotCnt));
}

View File

@ -166,7 +166,7 @@ function sendFileToServer(formData, obj , fileObj, _fileIdx)
function updateTotCnt(data){
var rowTotCnt = data;
$("#rowTotCnt").text(rowTotCnt);
$("#rowTotCnt").text(numberWithCommas(rowTotCnt));
}

File diff suppressed because one or more lines are too long

View File

@ -955,3 +955,20 @@ function fnChkCallToChange(){
totalPriceSum(callToCnt);
}
//Tabulator 주소록 그룹 목록일 경우 각 그룹 주소 갯수 합산해주기
function getTabulatorLAddrGrpCnt(){
var selectedData = tableL.getRows();
var totAddrCnt = 0;
for(var i=0; i < selectedData.length; i++){
//일괄변환 문자에 콤마(,)가 들어가있으면 배열로 넘길때 문제가 발생하여 특수문자(§)로 치환하여 넘겨주도록 한다.
var addrGrpCnt = tableL.getRows()[i].getData().addrGrpCnt;
totAddrCnt = Number(totAddrCnt) + Number(addrGrpCnt);
}
return totAddrCnt;
}