발송결과 리스트 화면 완료

This commit is contained in:
hehihoho3@gmail.com 2025-01-23 14:57:40 +09:00
parent 5cfae19c82
commit da00ed6b8a
15 changed files with 824 additions and 1488 deletions

View File

@ -1,15 +1,15 @@
package itn.let.mjo.msgsent.service;
import java.io.Serializable;
import java.util.List;
import itn.let.cmm.vo.FileInfoVO;
import itn.let.uss.umt.service.UserDefaultVO;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class MjonMsgDetailSentVO implements Serializable{
public class MjonMsgDetailSentVO extends UserDefaultVO{
private static final long serialVersionUID = 1L;
@ -32,6 +32,7 @@ public class MjonMsgDetailSentVO implements Serializable{
private String callTo;
private String statusTxt;
private String addrNm;
// FileInfo 리스트 필드 추가

View File

@ -28,5 +28,6 @@ public class MjonMsgSWFDTO implements Serializable {
private int resultSValue; // 성공건수
private int resultFValue; // 실패건수
private int resultWValue; // 대기건수
private String divideYN; // 분할여부
}

View File

@ -1,8 +1,11 @@
package itn.let.mjo.msgsent.service;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import itn.let.fax.addr.service.FaxAddrGroupVO;
import itn.let.mjo.addr.service.AddrGroupVO;
@ -64,5 +67,7 @@ public interface MjonMsgSentService {
public List<MjonMsgDetailSentVO> findByMsgDetailListAjax(MjonMsgDetailSentVO mjonMsgDetailSentVO);
public void msgSentExcelDownLoad(MjonMsgSentVO mjonMsgSentVO, HttpServletResponse response) throws IOException, Exception;
}

View File

@ -94,4 +94,12 @@ public class MjonMsgSentVO extends UserDefaultVO{
private String resultWValue;
private String resultWFValue;
private String divideYN; // 분할여부
private String statusCd; // 진행상태 코드
// 결과 리스트 select
// TIMESTAMPDIFF(minute, DATE_FORMAT(B.REQ_DATE, '%Y-%m-%d %T'), DATE_FORMAT(NOW(), '%Y-%m-%d %T')) as diffMin
private int diffMin;
}

View File

@ -1,17 +1,37 @@
package itn.let.mjo.msgsent.service.impl;
import java.io.OutputStream;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.BorderStyle;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.FillPatternType;
import org.apache.poi.ss.usermodel.Font;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.IndexedColors;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.VerticalAlignment;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.apache.poi.xssf.usermodel.XSSFFont;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.stereotype.Service;
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
@ -96,41 +116,63 @@ public class MjonMsgSentServiceImpl extends EgovAbstractServiceImpl implements
return resultList;
}
//발송 관리 전체 발송 리스트 불러오기
/**
* advc
* 이호영 20250121
* 발송 관리 전체 발송 리스트 불러오기
*/
public Map<String, Object> selectAllMsgSentList_advc(MjonMsgSentVO mjonMsgSentVO) throws Exception{
Map<String, Object> resultMap = new HashMap<String, Object>();
System.out.println("mjonMsgSentVO.getSearchConditionSite() :: "+ mjonMsgSentVO.getSearchConditionSite());
// 목록
List<MjonMsgSentVO> resultList = mjonMsgSentDAO.selectAllMsgSentList_advc(mjonMsgSentVO);
// MsgGroupId만 추출하여 리스트 생성
// List<String> msgGroupIdList = resultList.stream()
// .map(MjonMsgSentVO::getMsgGroupId) // MsgGroupId 추출
// .collect(Collectors.toList()); // 리스트로 수집
// groupID에 대한 결과건수(대기, 성공 실패) 분할건수를 가져옴
// TODO : 분할여부는 예약일 때만 가져오게 해야되는지 검토 필요
resultList.stream().forEach(t->{
MjonMsgSWFDTO mjonMsgSWFDTO = mjonMsgSentDAO.findBySWF(t.getMsgGroupId());
t.setResultSValue(String.valueOf(mjonMsgSWFDTO.getResultSValue()));
t.setResultFValue(String.valueOf(mjonMsgSWFDTO.getResultFValue()));
t.setResultWValue(String.valueOf(mjonMsgSWFDTO.getResultWValue()));
BigDecimal eachPrice = new BigDecimal(t.getEachPrice());
BigDecimal resultSValue = new BigDecimal(mjonMsgSWFDTO.getResultSValue());
BigDecimal totalPrice = eachPrice.multiply(resultSValue);
// 소수점 자리로 설정 (반올림)
BigDecimal roundedTotalPrice = totalPrice.setScale(1, RoundingMode.HALF_UP);
t.setTotPrice(roundedTotalPrice.toPlainString()); // 결과를 String으로 설정
});
resultList = makeDetailFunction(resultList);
// 공통코드 ITN057에 대한 코드화 진행
/*
* CODE_ID CODE CODE_NM CODE_DC
* ITN057 01 진행중 진행중
* ITN057 02 완료 완료출해야함
* ITN057 03 예약대기 예약대기(발송전) 버튼으로 노출해야함
* ITN057 04 - 예약취소 ( - 으로 노출 )
* */
resultList.stream().forEach(t->{
String code;
log.info(" + t.getDiffMin() :: [{}]", t.getDiffMin());
log.info(" + t.getDiffMin() :: [{}]", t.getDiffMin() > -5);
if ("Y".equals(t.getReserveCYn())) {
code = "04"; // 예약취소 코드
} else if (
"Y".equals(t.getReserveYn())
&& "N".equals(t.getReserveCYn())
&& t.getMsgGroupCnt().equals(t.getResultWValue())
&& t.getDiffMin() < -5 // 예약 시간이 5분 이상인 것들만
) {
code = "03"; // 예약대기 코드 ( 예약취소 버튼 노출 )
} else if (t.getMsgGroupCnt().equals(t.getResultSValue()) || t.getMsgGroupCnt().equals(t.getResultFValue())) {
code = "02"; // 완료 코드
} else {
code = "01"; // 진행중 코드
}
t.setStatusCd(code);
});
// 카운트
int totalCnt = mjonMsgSentDAO.countAllMsgSentList(mjonMsgSentVO);
// int totalCnt = 0;
resultMap.put("resultList", resultList);
resultMap.put("totalCnt", totalCnt);
@ -139,6 +181,7 @@ public class MjonMsgSentServiceImpl extends EgovAbstractServiceImpl implements
}
public Map<String, Object> selectAllMsgSentDetailView(MjonMsgDetailSentVO mjonMsgDetailSentVO) throws Exception{
Map<String, Object> resultMap = new HashMap<String, Object>();
@ -152,7 +195,7 @@ public class MjonMsgSentServiceImpl extends EgovAbstractServiceImpl implements
.replaceAll("\\s*무료거부 0808800858", ""));
}
if(Integer.parseInt(result.getFileCnt()) > 0)
if(StringUtils.isNotEmpty(result.getFileCnt()) && Integer.parseInt(result.getFileCnt()) > 0)
{
List<FileInfoVO> fileInfos = getFileInfo(result);
@ -370,4 +413,286 @@ public class MjonMsgSentServiceImpl extends EgovAbstractServiceImpl implements
return list;
}
public void msgSentExcelDownLoad(MjonMsgSentVO mjonMsgSentVO, HttpServletResponse response) throws Exception{
mjonMsgSentVO.setRecordCountPerPage(100000);
mjonMsgSentVO.setFirstIndex(0);
if(StringUtils.isEmpty(mjonMsgSentVO.getSearchSortOrd())) {
mjonMsgSentVO.setSearchSortOrd("desc");
mjonMsgSentVO.setSearchSortCnd("B.REQ_DATE");
}
//예약 관리 리스트 불러오기
List<MjonMsgSentVO> resultAllSentList = mjonMsgSentDAO.selectAllMsgSentList_advc(mjonMsgSentVO);
long startTime = System.nanoTime(); // 시작 시간 측정
resultAllSentList = makeDetailFunction(resultAllSentList);
long endTime = System.nanoTime(); // 끝난 시간 측정
double executionTimeInSeconds = (endTime - startTime) / 1_000_000_000.0;
System.out.println("Execution time: " + executionTimeInSeconds + " seconds");
SXSSFWorkbook workbook = null; // SXSSFWorkbook 변수 선언
try{
// Workbook 생성
workbook = new SXSSFWorkbook();
Sheet sheet = workbook.createSheet("발송 내역");
// 너비 설정
sheet.setColumnWidth(0, 3000); // 번호
sheet.setColumnWidth(1, 4000); // 발송일시
sheet.setColumnWidth(2, 5000); // 구분
sheet.setColumnWidth(3, 3000); // 형태
sheet.setColumnWidth(4, 10000); // 내용
sheet.setColumnWidth(5, 4000); // 발송건수
sheet.setColumnWidth(6, 3000); // 대기
sheet.setColumnWidth(7, 3000); // 성공
sheet.setColumnWidth(8, 3000); // 실패
sheet.setColumnWidth(9, 4000); // 금액
sheet.setColumnWidth(10, 5000); // 진행상황
// 헤더 스타일 설정
CellStyle headerStyle = workbook.createCellStyle();
headerStyle.setAlignment(HorizontalAlignment.CENTER);
headerStyle.setVerticalAlignment(VerticalAlignment.CENTER);
headerStyle.setBorderTop(BorderStyle.THIN);
headerStyle.setBorderBottom(BorderStyle.THIN);
headerStyle.setBorderLeft(BorderStyle.THIN);
headerStyle.setBorderRight(BorderStyle.THIN);
headerStyle.setTopBorderColor(IndexedColors.GREY_25_PERCENT.getIndex());
headerStyle.setBottomBorderColor(IndexedColors.GREY_25_PERCENT.getIndex());
headerStyle.setLeftBorderColor(IndexedColors.GREY_25_PERCENT.getIndex());
headerStyle.setRightBorderColor(IndexedColors.GREY_25_PERCENT.getIndex());
Font font = workbook.createFont();
font.setBold(true); // 글씨체 굵게
font.setFontHeightInPoints((short) 12); // 글씨 크기
headerStyle.setFont(font);
// 데이터 스타일 설정 (가운데 정렬)
CellStyle centerStyle = workbook.createCellStyle();
centerStyle.setAlignment(HorizontalAlignment.CENTER);
centerStyle.setVerticalAlignment(VerticalAlignment.CENTER);
centerStyle.setBorderTop(BorderStyle.THIN);
centerStyle.setBorderBottom(BorderStyle.THIN);
centerStyle.setBorderLeft(BorderStyle.THIN);
centerStyle.setBorderRight(BorderStyle.THIN);
centerStyle.setTopBorderColor(IndexedColors.GREY_25_PERCENT.getIndex());
centerStyle.setBottomBorderColor(IndexedColors.GREY_25_PERCENT.getIndex());
centerStyle.setLeftBorderColor(IndexedColors.GREY_25_PERCENT.getIndex());
centerStyle.setRightBorderColor(IndexedColors.GREY_25_PERCENT.getIndex());
// 번째 헤더 작성 (상단 병합)
Row headerRow = sheet.createRow(0);
// 번호 추가
Cell cell = headerRow.createCell(0);
cell.setCellValue("번호");
cell.setCellStyle(headerStyle);
sheet.addMergedRegion(new CellRangeAddress(0, 1, 0, 0)); // 번호 병합
// 구분 추가
cell = headerRow.createCell(1);
cell.setCellValue("발송일시");
cell.setCellStyle(headerStyle);
sheet.addMergedRegion(new CellRangeAddress(0, 1, 1, 1)); // 구분 병합
cell = headerRow.createCell(2);
cell.setCellValue("구분");
cell.setCellStyle(headerStyle);
sheet.addMergedRegion(new CellRangeAddress(0, 1, 2, 2)); // 발송일시 병합
cell = headerRow.createCell(3);
cell.setCellValue("형태");
cell.setCellStyle(headerStyle);
sheet.addMergedRegion(new CellRangeAddress(0, 1, 3, 3)); // 형태 병합
cell = headerRow.createCell(4);
cell.setCellValue("내용");
cell.setCellStyle(headerStyle);
sheet.addMergedRegion(new CellRangeAddress(0, 1, 4, 4)); // 내용 병합
cell = headerRow.createCell(5);
cell.setCellValue("발송건수");
cell.setCellStyle(headerStyle);
sheet.addMergedRegion(new CellRangeAddress(0, 1, 5, 5)); // 발송건수 병합
cell = headerRow.createCell(6);
cell.setCellValue("결과");
cell.setCellStyle(headerStyle);
sheet.addMergedRegion(new CellRangeAddress(0, 0, 6, 8)); // 결과 병합
cell = headerRow.createCell(9);
cell.setCellValue("금액(원)");
cell.setCellStyle(headerStyle);
sheet.addMergedRegion(new CellRangeAddress(0, 1, 9, 9)); // 금액() 병합
cell = headerRow.createCell(10);
cell.setCellValue("진행상황");
cell.setCellStyle(headerStyle);
sheet.addMergedRegion(new CellRangeAddress(0, 1, 10, 10)); // 진행상황 병합
// 번째 헤더 작성 (결과 하위 )
Row subHeaderRow = sheet.createRow(1);
String[] subHeaders = {"대기", "성공", "실패"};
for (int i = 0; i < subHeaders.length; i++) {
cell = subHeaderRow.createCell(6 + i); // 결과 시작점(6번 )부터 순차적으로 설정
cell.setCellValue(subHeaders[i]);
cell.setCellStyle(headerStyle);
}
// 샘플 데이터 추가
// Object[][] data = {
// {1, "2025-01-23 12:00", "web", "SMS", "테스트 메시지입니다.", 139, 1, 0, 12, "-", "진행중"}
// };
// Object[][] 변환
Object[][] data = new Object[resultAllSentList.size()][11]; // 11은 필드
for (int i = 0; i < resultAllSentList.size(); i++) {
MjonMsgSentVO vo = resultAllSentList.get(i);
data[i][0] = i;
data[i][1] = vo.getReqdate();
data[i][2] = "H".equals(vo.getSendKind()) ? "WEB" : "API";
String msgType="단문";
if ("6".equals(vo.getMsgType())) {
msgType = "0".equals(vo.getFileCnt()) ? "장문" : "그림";
}
data[i][3] = msgType;
String reserveTxt = "";
if("Y".equals(vo.getReserveYn())) {reserveTxt="[예약]";}
if("Y".equals(vo.getDivideYN())) {reserveTxt+="[분할]";}
data[i][4] = reserveTxt + (StringUtils.isEmpty(vo.getSmsTxt()) ? "-" : vo.getSmsTxt());
data[i][5] = vo.getMsgGroupCnt();
data[i][6] = vo.getResultWValue();
data[i][7] = vo.getResultSValue();
data[i][8] = vo.getResultFValue();
data[i][9] = vo.getTotPrice();
String statusTxt="진행중";
if ("Y".equals(vo.getReserveCYn())) {
statusTxt = "예약취소"; // 예약취소 코드
// } else if ("Y".equals(vo.getReserveYn()) && vo.getMsgGroupCnt().equals(vo.getResultWValue())) {
// statusTxt = "예약대기"; // 예약대기 코드 ( 예약취소 버튼 노출 )
} else if (vo.getMsgGroupCnt().equals(vo.getResultSValue()) || vo.getMsgGroupCnt().equals(vo.getResultFValue())) {
statusTxt = "완료"; // 완료 코드
}
data[i][10] = statusTxt;
}
int rowNum = 2; // 데이터 시작
for (Object[] rowData : data) {
Row row = sheet.createRow(rowNum++);
for (int col = 0; col < rowData.length; col++) {
cell = row.createCell(col);
// "내용" 열만 제외하고 가운데 정렬
if (col == 4) { // 내용
cell.setCellValue((String) rowData[col]);
} else if (rowData[col] instanceof String) {
cell.setCellValue((String) rowData[col]);
cell.setCellStyle(centerStyle);
} else if (rowData[col] instanceof Integer) {
cell.setCellValue((Integer) rowData[col]);
cell.setCellStyle(centerStyle);
}
}
}
// 파일 다운로드 응답 설정
String fileName ="발송관리_엑셀_리스트"; // 저장 파일명
SimpleDateFormat mSimpleDateFormat = new SimpleDateFormat ( "yyyyMMdd_HHmmss", Locale.KOREA );
Date currentTime = new Date ();
String mTime = mSimpleDateFormat.format ( currentTime );
fileName = fileName+"("+mTime+")";
response.setHeader("Set-Cookie", "fileDownload=true; path=/");
response.setHeader("Content-Disposition", String.format("attachment; filename=\""+new String((fileName).getBytes("KSC5601"),"8859_1")+".xlsx"));
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
// 파일 출력
workbook.write(response.getOutputStream());
workbook.close();
} catch (Exception e) {
// 에러 처리 로직
response.setHeader("Set-Cookie", "fileDownload=false; path=/");
response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
response.setHeader("Content-Type", "text/html; charset=utf-8");
try (OutputStream out = response.getOutputStream()) {
byte[] data = "fail..".getBytes();
out.write(data, 0, data.length);
} catch (Exception ignore) {
ignore.printStackTrace();
}
} finally {
if (workbook != null) {
try {
workbook.dispose(); // SXSSFWorkbook 임시 파일 제거
workbook.close();
} catch (Exception ignore) {
ignore.printStackTrace();
}
}
}
}
private List<MjonMsgSentVO> makeDetailFunction(List<MjonMsgSentVO> resultList) {
resultList.stream().forEach(t->{
MjonMsgSWFDTO mjonMsgSWFDTO = mjonMsgSentDAO.findBySWF(t.getMsgGroupId());
t.setResultSValue(String.valueOf(mjonMsgSWFDTO.getResultSValue())); // 성공건수
t.setResultFValue(String.valueOf(mjonMsgSWFDTO.getResultFValue())); // 실패건수
t.setResultWValue(String.valueOf(mjonMsgSWFDTO.getResultWValue())); // 대기건수
t.setDivideYN(mjonMsgSWFDTO.getDivideYN());
// TotPrice : 성공건수에 대한 금액 곱하기
BigDecimal eachPrice = new BigDecimal(t.getEachPrice());
BigDecimal resultSValue = new BigDecimal(mjonMsgSWFDTO.getResultSValue());
BigDecimal totalPrice = eachPrice.multiply(resultSValue);
// 소수점 자리로 설정 (반올림)// totalPrice 값을 소수점 자리까지 반올림하여 roundedTotalPrice에 저장
// RoundingMode.HALF_UP: 반올림 방식으로, 소수점 기준 5 이상이면 올림, 그렇지 않으면 내림
BigDecimal roundedTotalPrice = totalPrice.setScale(1, RoundingMode.HALF_UP);
// roundedTotalPrice가 0인지 확인
// BigDecimal.compareTo(BigDecimal.ZERO) 값을 비교하는 메서드
// 결과:
// - 반환 값이 0이면 값이 같음
// - 반환 값이 음수이면 roundedTotalPrice가 0보다 작음
// - 반환 값이 양수이면 roundedTotalPrice가 0보다
if (roundedTotalPrice.compareTo(BigDecimal.ZERO) == 0) {
// roundedTotalPrice 값이 0이면, "-" 문자열을 totPrice에 설정
t.setTotPrice("-");
} else {
// roundedTotalPrice 값이 0이 아닌 경우
// 반올림된 BigDecimal 값을 toPlainString() 사용하여 문자열로 변환 totPrice에 설정
// toPlainString(): 지수 표기법 없이 일반적인 문자열 형태로 반환
t.setTotPrice(roundedTotalPrice.toPlainString());
}
});
return resultList;
}
}

View File

@ -108,115 +108,10 @@ private static final Logger logger = LoggerFactory.getLogger(MjonMsgSentControll
return "redirect:/web/user/login/login.do";
}
mjonMsgSentVO.setUserId(userId);
/*
//전체 발송 건수 통계 불러오기
mjonMsgSentVO.setMsgType("");
List<MjonMsgSentVO> totalMsgCnt = mjonMsgSentService.selectDetailMsgSentCnt(mjonMsgSentVO);
model.addAttribute("totalMsgCnt", totalMsgCnt);
//단문 성공건, 실패건 불러오기
mjonMsgSentVO.setMsgType("4");
List<MjonMsgSentVO> smsMsgCnt = mjonMsgSentService.selectDetailMsgSentCnt(mjonMsgSentVO);
model.addAttribute("smsMsgCnt", smsMsgCnt);
//장문 성공건, 실패건 불러오기
mjonMsgSentVO.setMsgType("6");
mjonMsgSentVO.setFileCnt("0");
List<MjonMsgSentVO> lmsMsgCnt = mjonMsgSentService.selectDetailMsgSentCnt(mjonMsgSentVO);
model.addAttribute("lmsMsgCnt", lmsMsgCnt);
//그림문자 성공건, 실패건 불러오기
mjonMsgSentVO.setMsgType("6");
mjonMsgSentVO.setFileCnt("1");
List<MjonMsgSentVO> mmsMsgCnt = mjonMsgSentService.selectDetailMsgSentCnt(mjonMsgSentVO);
model.addAttribute("mmsMsgCnt", mmsMsgCnt);
*/
/*
//전체 발송 건수 통계 불러오기
mjonMsgSentVO.setMsgType("");
List<MjonMsgSentVO> totalMsgCnt = mjonMsgSentService.selectDetailMsgSentCntMix(mjonMsgSentVO);
System.out.println("start");
// H:홈페이지, A:API sms, lms, mms 나누는 영역
List<MjonMsgSentVO> H_totalMsgCnt = totalMsgCnt.stream().filter(t -> "H".equals(t.getSendKind())).collect(Collectors.toList());
List<MjonMsgSentVO> H_smsMsgCnt = new ArrayList<MjonMsgSentVO>();
List<MjonMsgSentVO> H_lmsMsgCnt = new ArrayList<MjonMsgSentVO>();
List<MjonMsgSentVO> H_mmsMsgCnt = new ArrayList<MjonMsgSentVO>();
System.out.println("start");
List<MjonMsgSentVO> A_totalMsgCnt = totalMsgCnt.stream().filter(t -> "A".equals(t.getSendKind())).collect(Collectors.toList());
List<MjonMsgSentVO> A_smsMsgCnt = new ArrayList<MjonMsgSentVO>();
List<MjonMsgSentVO> A_lmsMsgCnt = new ArrayList<MjonMsgSentVO>();
List<MjonMsgSentVO> A_mmsMsgCnt = new ArrayList<MjonMsgSentVO>();
System.out.println(" ::H_totalMsgCnt :: "+ H_totalMsgCnt.size());
System.out.println(" ::A_totalMsgCnt :: "+ A_totalMsgCnt.size());
H_totalMsgCnt.forEach(t->{
if (Integer.parseInt(t.getFilePath1())>0) {
H_smsMsgCnt.add(t);
} else if (Integer.parseInt(t.getFilePath2())>0) {
H_lmsMsgCnt.add(t);
} else if (Integer.parseInt(t.getFilePath3())>0) {
H_mmsMsgCnt.add(t);
}
});
A_totalMsgCnt.forEach(t->{
if (Integer.parseInt(t.getFilePath1())>0) {
A_smsMsgCnt.add(t);
} else if (Integer.parseInt(t.getFilePath2())>0) {
A_lmsMsgCnt.add(t);
} else if (Integer.parseInt(t.getFilePath3())>0) {
A_mmsMsgCnt.add(t);
}
});
//* 홈페이지에서 보낸 데이터 LIST
//* SEND_KIND = "H"
// 전체 영역
model.addAttribute("H_allSentCntVO", this.getResultCntProc(H_totalMsgCnt));
// 전체 단문(SMS)
model.addAttribute("H_smsSentCntVO", this.getResultCntProc(H_smsMsgCnt));
// 전체 장문(LMS)
model.addAttribute("H_lmsSentCntVO", this.getResultCntProc(H_lmsMsgCnt));
// 전체 장문(LMS)
model.addAttribute("H_mmsSentCntVO", this.getResultCntProc(H_mmsMsgCnt));
// * 홈페이지에서 보낸 데이터 LIST
//* SEND_KIND = "A"
// 전체 영역
model.addAttribute("A_allSentCntVO", this.getResultCntProc(A_totalMsgCnt));
// 전체 단문(SMS)
model.addAttribute("A_smsSentCntVO", this.getResultCntProc(A_smsMsgCnt));
// 전체 장문(LMS)
model.addAttribute("A_lmsSentCntVO", this.getResultCntProc(A_lmsMsgCnt));
// 전체 장문(LMS)
model.addAttribute("A_mmsSentCntVO", this.getResultCntProc(A_mmsMsgCnt));
*/
/*<isEqual prepend="AND" property="searchCondition" compareValue="2">
a.mber_nm LIKE CONCAT('%',#searchKeyword#,'%')
</isEqual>
*/
ApiKeyVO apiKeyVO = new ApiKeyVO();
apiKeyVO.setMberId(userId);
model.addAttribute("appMgmt", apiKeyMngService.selectMberApiKeyChk(apiKeyVO) > 0 ? true : false);
// mjonMsgSentVO.setUserId(userId);
// ApiKeyVO apiKeyVO = new ApiKeyVO();
// apiKeyVO.setMberId(userId);
// model.addAttribute("appMgmt", apiKeyMngService.selectMberApiKeyChk(apiKeyVO) > 0 ? true : false);
@ -240,18 +135,24 @@ private static final Logger logger = LoggerFactory.getLogger(MjonMsgSentControll
}
String startDate = mjonMsgSentVO.getStartDate();
String endDate = mjonMsgSentVO.getEndDate();
// log.info(" + mjonMsgSentVO.getSearchStartDate() :: [{}]", mjonMsgSentVO.getSearchStartDate());
// log.info(" + mjonMsgSentVO.getSearchStartDate() :: [{}]", mjonMsgSentVO.getSearchStartDate());
// log.info(" + mjonMsgSentVO.getSearchStartDate() :: [{}]", mjonMsgSentVO.getSearchStartDate());
// log.info(" + mjonMsgSentVO.getSearchStartDate() :: [{}]", mjonMsgSentVO.getSearchStartDate());
// log.info(" + mjonMsgSentVO.getSearchStartDate() :: [{}]", mjonMsgSentVO.getSearchStartDate());
String startDate = mjonMsgSentVO.getSearchStartDate();
String endDate = mjonMsgSentVO.getSearchEndDate();
if(StringUtils.isEmpty(startDate)
&& StringUtils.isEmpty(endDate))
{
mjonMsgSentVO.setStartDate(DateUtils.getDateMonthsAgo(3));
mjonMsgSentVO.setEndDate(DateUtils.getCurrentDate());
mjonMsgSentVO.setSearchStartDate(DateUtils.getDateMonthsAgo(3));
mjonMsgSentVO.setSearchEndDate(DateUtils.getCurrentDate());
}
log.info("pageIndex :: [{}]", mjonMsgSentVO.getPageIndex());
model.addAttribute("searchKeyword", mjonMsgSentVO.getSearchKeyword());
model.addAttribute("mjonMsgSentVO", mjonMsgSentVO);
model.addAttribute("siteId", mjonMsgSentVO.getSiteId());
@ -300,7 +201,6 @@ private static final Logger logger = LoggerFactory.getLogger(MjonMsgSentControll
HttpServletRequest request,
ModelMap model) throws Exception{
System.out.println("MsgSentView_HA_allSentAjax");
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
@ -308,28 +208,24 @@ private static final Logger logger = LoggerFactory.getLogger(MjonMsgSentControll
mjonMsgSentVO.setUserId(userId);
log.info("+ mjonMsgSentVO.getSearchStartDate() :: [{}]", mjonMsgSentVO.getSearchStartDate());
log.info("+ mjonMsgSentVO.getSearchEndDate() :: [{}]", mjonMsgSentVO.getSearchEndDate());
//전체 발송 건수 통계 불러오기
mjonMsgSentVO.setMsgType("");
log.info(" :: mjonMsgSentService.selectDetailMsgSentCntMix :: ");
long startTime = System.nanoTime(); // 시작 시간 측정
List<MjonMsgSentVO> totalMsgCnt = mjonMsgSentService.selectDetailMsgSentCntMix(mjonMsgSentVO);
long endTime = System.nanoTime(); // 종료 시간 측정
double executionTimeInSeconds = (endTime - startTime) / 1_000_000_000.0;
System.out.println("Execution time: " + executionTimeInSeconds + " seconds");
System.out.println("start");
// H:홈페이지, A:API sms, lms, mms 나누는 영역
List<MjonMsgSentVO> H_totalMsgCnt = totalMsgCnt.stream().filter(t -> "H".equals(t.getSendKind())).collect(Collectors.toList());
List<MjonMsgSentVO> H_smsMsgCnt = new ArrayList<MjonMsgSentVO>();
List<MjonMsgSentVO> H_lmsMsgCnt = new ArrayList<MjonMsgSentVO>();
List<MjonMsgSentVO> H_mmsMsgCnt = new ArrayList<MjonMsgSentVO>();
System.out.println("start");
List<MjonMsgSentVO> A_totalMsgCnt = totalMsgCnt.stream().filter(t -> "A".equals(t.getSendKind())).collect(Collectors.toList());
List<MjonMsgSentVO> A_smsMsgCnt = new ArrayList<MjonMsgSentVO>();
List<MjonMsgSentVO> A_lmsMsgCnt = new ArrayList<MjonMsgSentVO>();
List<MjonMsgSentVO> A_mmsMsgCnt = new ArrayList<MjonMsgSentVO>();
H_totalMsgCnt.forEach(t->{
totalMsgCnt.forEach(t->{
if (Integer.parseInt(t.getFilePath1())>0) {
H_smsMsgCnt.add(t);
} else if (Integer.parseInt(t.getFilePath2())>0) {
@ -339,21 +235,11 @@ private static final Logger logger = LoggerFactory.getLogger(MjonMsgSentControll
}
});
A_totalMsgCnt.forEach(t->{
if (Integer.parseInt(t.getFilePath1())>0) {
A_smsMsgCnt.add(t);
} else if (Integer.parseInt(t.getFilePath2())>0) {
A_lmsMsgCnt.add(t);
} else if (Integer.parseInt(t.getFilePath3())>0) {
A_mmsMsgCnt.add(t);
}
});
//* 홈페이지에서 보낸 데이터 LIST
//* SEND_KIND = "H"
// 전체 영역
model.addAttribute("H_allSentCntVO", this.getResultCntProc(H_totalMsgCnt));
model.addAttribute("H_allSentCntVO", this.getResultCntProc(H_smsMsgCnt));
// 전체 단문(SMS)
model.addAttribute("H_smsSentCntVO", this.getResultCntProc(H_smsMsgCnt));
// 전체 장문(LMS)
@ -363,33 +249,6 @@ private static final Logger logger = LoggerFactory.getLogger(MjonMsgSentControll
// * 홈페이지에서 보낸 데이터 LIST
//* SEND_KIND = "A"
// 전체 영역
model.addAttribute("A_allSentCntVO", this.getResultCntProc(A_totalMsgCnt));
// 전체 단문(SMS)
model.addAttribute("A_smsSentCntVO", this.getResultCntProc(A_smsMsgCnt));
// 전체 장문(LMS)
model.addAttribute("A_lmsSentCntVO", this.getResultCntProc(A_lmsMsgCnt));
// 전체 장문(LMS)
model.addAttribute("A_mmsSentCntVO", this.getResultCntProc(A_mmsMsgCnt));
/*<isEqual prepend="AND" property="searchCondition" compareValue="2">
a.mber_nm LIKE CONCAT('%',#searchKeyword#,'%')
</isEqual>
*/
ApiKeyVO apiKeyVO = new ApiKeyVO();
apiKeyVO.setMberId(userId);
model.addAttribute("appMgmt", apiKeyMngService.selectMberApiKeyChk(apiKeyVO) > 0 ? true : false);
System.out.println("MsgSentView_HA_allSentAjax_end");
return "/web/msgsent/subcontent/MsgSentView_HA_allSentAjax";
}
@ -445,7 +304,8 @@ private static final Logger logger = LoggerFactory.getLogger(MjonMsgSentControll
String pageUrl = "";
try {
log.info(" ListView pageIndex :: [{}]", mjonMsgSentVO.getPageIndex());
//로그인 권한정보 불러오기
@ -460,17 +320,12 @@ private static final Logger logger = LoggerFactory.getLogger(MjonMsgSentControll
// }
//기본 내림차순 정렬
if(mjonMsgSentVO.getSearchSortOrd().equals("")) {
if(StringUtils.isEmpty(mjonMsgSentVO.getSearchSortOrd())) {
mjonMsgSentVO.setSearchSortOrd("desc");
mjonMsgSentVO.setSearchSortCnd("regdate");
mjonMsgSentVO.setSearchSortCnd("B.REQ_DATE");
}
if(mjonMsgSentVO.getListType().equals("")) {
mjonMsgSentVO.setListType("groupList");
}
//선택 정보 저장
//mjonResvMsgVO.setSearchMsgType(mjonResvMsgVO.getTabType());
@ -485,13 +340,13 @@ private static final Logger logger = LoggerFactory.getLogger(MjonMsgSentControll
mjonMsgSentVO.setLastIndex(paginationInfo.getLastRecordIndex());
mjonMsgSentVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
if(!DateUtils.dateChkAndValueChk(mjonMsgSentVO.getStartDate(),mjonMsgSentVO.getEndDate(), 3 )) {
mjonMsgSentVO.setStartDate(DateUtils.getDateMonthsAgo(3));
mjonMsgSentVO.setEndDate(DateUtils.getCurrentDate());
if(!DateUtils.dateChkAndValueChk(mjonMsgSentVO.getSearchStartDate(),mjonMsgSentVO.getSearchEndDate(), 3 )) {
mjonMsgSentVO.setSearchStartDate(DateUtils.getDateMonthsAgo(3));
mjonMsgSentVO.setSearchEndDate(DateUtils.getCurrentDate());
};
model.addAttribute("startDate", mjonMsgSentVO.getStartDate());
model.addAttribute("endDate", mjonMsgSentVO.getEndDate());
model.addAttribute("searchStartDate", mjonMsgSentVO.getSearchStartDate());
model.addAttribute("searchEndDate", mjonMsgSentVO.getSearchEndDate());
//전체 발송 리스트 불러오기
Map<String, Object> resultMap = mjonMsgSentService.selectAllMsgSentList_advc(mjonMsgSentVO);
@ -507,22 +362,7 @@ private static final Logger logger = LoggerFactory.getLogger(MjonMsgSentControll
model.addAttribute("mjonMsgSentVO", mjonMsgSentVO);
String stateType = mjonMsgSentVO.getStateType();
// String pageUrl = "web/msgsent/MsgSentAllListAjax";
/*
pageUrl = "web/msgsent/MsgSentAllListAjax";
if(stateType.equals("ready")) {
pageUrl = "web/msgsent/MsgSentReadyListAjax";
}else if(stateType.equals("complete")) {
pageUrl = "web/msgsent/MsgSentCompleteListAjax";
}else if(stateType.equals("fail")) {
pageUrl = "web/msgsent/MsgSentFailListAjax";
}*/
} catch (Exception e) {
e.printStackTrace();
// TODO: handle exception
@ -1264,320 +1104,9 @@ private static final Logger logger = LoggerFactory.getLogger(MjonMsgSentControll
}
String stateType = mjonMsgSentVO.getStateType();
String tabType = mjonMsgSentVO.getTabType();
// 메모리에 100개의 행을 유지합니다. 행의 수가 넘으면 디스크에 적습니다.
SXSSFWorkbook wb = new SXSSFWorkbook(100);
String fileName ="발송관리 엑셀 리스트"; // 저장 파일명
String sheetTitle = "문자 발송 내역" ; // 제목
Sheet sheet = wb.createSheet(sheetTitle);
Cell cell = null;
Row row = null;
CellStyle style = wb.createCellStyle();
style.setBorderBottom(CellStyle.BORDER_THIN); //테두리 두껍게
style.setBorderLeft(CellStyle.BORDER_THIN);
style.setBorderRight(CellStyle.BORDER_THIN);
style.setBorderTop(CellStyle.BORDER_THIN);
// 정렬
style.setAlignment(CellStyle.ALIGN_CENTER); //가운데 정렬
style.setVerticalAlignment(CellStyle.VERTICAL_CENTER); //높이 가운데 정렬
Font font = wb.createFont();
font.setBoldweight(Font.BOLDWEIGHT_BOLD); //글씨 bold
String type = "";
String fCnt = "";
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
try{
mjonMsgSentVO.setRecordCountPerPage(100000);
mjonMsgSentVO.setFirstIndex(0);
if("".equals(mjonMsgSentVO.getSearchSortCnd())){ //최초조회시 최신것 조회List
mjonMsgSentVO.setSearchSortCnd("regdate");
mjonMsgSentVO.setSearchSortOrd("desc");
}
//예약 관리 리스트 불러오기
List<MjonMsgSentVO> resultAllSentList = mjonMsgSentService.selectAllMsgSentList(mjonMsgSentVO);
{//화면 리스트
row = sheet.createRow(0);
sheet.setColumnWidth(1, 5000); // 발송일시 칼럼의 조절
sheet.setColumnWidth(3, 10000); // 내용 칼럼의 조절
sheet.setColumnWidth(4, 5000); // 받는사람 이름 칼럼의 조절
sheet.setColumnWidth(5, 5000); // 받는사람 연락처 칼럼의 조절
sheet.setColumnWidth(6, 5000); // 발신번호 칼럼의 조절
sheet.setColumnWidth(7, 5000); // 발송상태 칼럼의 조절
sheet.setColumnWidth(8, 5000); // 발송건수 칼럼의 조절
//셀병합 처리
sheet.addMergedRegion(new CellRangeAddress(0,1,0,0)); //번호 세로 셀병합
sheet.addMergedRegion(new CellRangeAddress(0,1,1,1)); //발송일시 세로 셀병합
sheet.addMergedRegion(new CellRangeAddress(0,1,2,2)); //형태 세로 셀병합
sheet.addMergedRegion(new CellRangeAddress(0,1,3,3)); //내용 세로 셀병합
sheet.addMergedRegion(new CellRangeAddress(0,1,4,4)); //받는사람 이름 셀병합
sheet.addMergedRegion(new CellRangeAddress(0,1,5,5)); //받는사람 연락처 셀병합
sheet.addMergedRegion(new CellRangeAddress(0,1,6,6)); //발신번호 세로 셀병합
sheet.addMergedRegion(new CellRangeAddress(0,1,7,7)); //발송상태 세로 셀병합
sheet.addMergedRegion(new CellRangeAddress(0,1,8,8)); //발송건수 세로 셀병합
cell = row.createCell(0);
cell.setCellValue("번호");
cell.setCellStyle(style);
cell = row.createCell(1);
cell.setCellValue("발송일시");
cell.setCellStyle(style);
cell = row.createCell(2);
cell.setCellValue("형태");
cell.setCellStyle(style);
cell = row.createCell(3);
cell.setCellValue("내용");
cell.setCellStyle(style);
cell = row.createCell(4);
cell.setCellValue("수신자");
cell.setCellStyle(style);
cell = row.createCell(5);
cell.setCellValue("수신번호");
cell.setCellStyle(style);
cell = row.createCell(6);
cell.setCellValue("발신번호");
cell.setCellStyle(style);
cell = row.createCell(7);
cell.setCellValue("발송상태");
cell.setCellStyle(style);
cell = row.createCell(8);
cell.setCellValue("발송건수");
cell.setCellStyle(style);
cell = row.createCell(9);
cell.setCellValue("발송결과");
sheet.addMergedRegion(new CellRangeAddress(0,0,9,10)); // 발송결과 건수 가로 셀병합
cell.setCellStyle(style);
cell = row.createCell(10);
cell.setCellStyle(style);
cell = row.createCell(11);
cell.setCellValue("금액");
sheet.addMergedRegion(new CellRangeAddress(0,0,11,12)); // 발송결과 건수 가로 셀병합
cell.setCellStyle(style);
cell = row.createCell(12);
cell.setCellValue("예약취소");
cell.setCellStyle(style);
row = sheet.createRow(1);
cell = row.createCell(0);
cell.setCellStyle(style);
cell = row.createCell(1);
cell.setCellStyle(style);
cell = row.createCell(2);
cell.setCellStyle(style);
cell = row.createCell(3);
cell.setCellStyle(style);
cell = row.createCell(4);
cell.setCellStyle(style);
cell = row.createCell(5);
cell.setCellStyle(style);
cell = row.createCell(6);
cell.setCellStyle(style);
cell = row.createCell(7);
cell.setCellStyle(style);
cell = row.createCell(8);
cell.setCellStyle(style);
cell = row.createCell(9);
cell.setCellValue("성공");
cell.setCellStyle(style);
cell = row.createCell(10);
cell.setCellValue("실패/대기");
cell.setCellStyle(style);
cell = row.createCell(11);
cell.setCellValue("과금");
cell.setCellStyle(style);
cell = row.createCell(12);
cell.setCellValue("비과금");
cell.setCellStyle(style);
}
for(int i=0; i < resultAllSentList.size(); i++) {
String msgType = "단문";
if(resultAllSentList.get(i).getMsgType().equals("6") && resultAllSentList.get(i).getFileCnt().equals("0")) {
msgType = "장문";
}else if(resultAllSentList.get(i).getMsgType().equals("6") && !resultAllSentList.get(i).getFileCnt().equals("0")) {
msgType = "그림";
}
int excelLen = 0;
row = sheet.createRow(i+2);
excelLen = 12;
for(int j=0 ; j <= excelLen ; j++) {
cell = row.createCell(j);
cell.setCellStyle(style);
if(j==0) cell.setCellValue(i+1); //번호
if(j==1) cell.setCellValue(sdf.format((resultAllSentList.get(i)).getReqdate())); //발송일자
if(j==2) {
type = resultAllSentList.get(i).getMsgType();
fCnt = resultAllSentList.get(i).getFileCnt();
if(type.equals("4")) {
cell.setCellValue("단문"); //형태
}else {
if(fCnt.equals("0")) {
cell.setCellValue("장문"); //형태
}else {
cell.setCellValue("그림"); //형태
}
}
}
if(j==3) cell.setCellValue((resultAllSentList.get(i)).getSmsTxt()); //내용
if(j==4) cell.setCellValue((resultAllSentList.get(i)).getAddrNm());
if(j==5) cell.setCellValue((resultAllSentList.get(i)).getCallToComma());
if(j==6) cell.setCellValue((resultAllSentList.get(i)).getCallFromComma()); //발신번호
if(j==7) { //발송상태 처리해주기
String resvCYn = resultAllSentList.get(i).getReserveCYn();
String curState = resultAllSentList.get(i).getCurState();
if(resvCYn.equals("Y")) {
cell.setCellValue("예약 취소"); //발송상태
}else {
if(curState.equals("0")) {
cell.setCellValue("발송 대기"); //발송상태
}else if(curState.equals("1")) {
cell.setCellValue("발송중"); //발송상태
}else if(curState.equals("2")) {
cell.setCellValue("결과 대기"); //발송상태
}else if(curState.equals("3")) {
cell.setCellValue("발송 완료"); //발송상태
}
}
}
if(j==8) cell.setCellValue((resultAllSentList.get(i)).getMsgGroupCnt()); //발송건수
//발송결과 성공, 실패 처리
int resSucCnt = 0;
int resFailCnt = 0;
double resSucPrice = 0;
double resFailPirce = 0;
double eachPrice = Float.parseFloat(resultAllSentList.get(i).getEachPrice());
int resultSValue = 0;
int resultWFValue = 0;
if(resultAllSentList.get(i).getResultSValue() != null) {
resultSValue = Integer.parseInt(resultAllSentList.get(i).getResultSValue());
}else {
resultSValue = 1;
}
if(resultAllSentList.get(i).getResultWFValue() != null) {
resultWFValue = Integer.parseInt(resultAllSentList.get(i).getResultWFValue());
}else {
resultWFValue = 1;
}
if("S".equals(resultAllSentList.get(i).getMsgResult())) {
resSucCnt = resultSValue;
} else {
resFailCnt = resultWFValue;
}
resSucPrice = eachPrice * resSucCnt;
resFailPirce = eachPrice * resFailCnt;
if(j==9) cell.setCellValue(resSucCnt); //발송결과 성공
if(j==10) cell.setCellValue(resFailCnt); //발송결과 실패
if(j==11) cell.setCellValue(resSucPrice); // 과금 금액
if(j==12) cell.setCellValue(resFailPirce); //비과금 금액
}
}
response.setHeader("Set-Cookie", "fileDownload=true; path=/");
SimpleDateFormat mSimpleDateFormat = new SimpleDateFormat ( "yyyyMMdd_HHmmss", Locale.KOREA );
Date currentTime = new Date ();
String mTime = mSimpleDateFormat.format ( currentTime );
fileName = fileName+"("+mTime+")";
response.setHeader("Content-Disposition", String.format("attachment; filename=\""+new String((fileName).getBytes("KSC5601"),"8859_1")+".xlsx"));
wb.write(response.getOutputStream());
}catch(Exception e) {
response.setHeader("Set-Cookie", "fileDownload=false; path=/");
response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
response.setHeader("Content-Type","text/html; charset=utf-8");
OutputStream out = null;
try {
out = response.getOutputStream();
byte[] data = new String("fail..").getBytes();
out.write(data, 0, data.length);
} catch(Exception ignore) {
ignore.printStackTrace();
} finally {
if(out != null) try { out.close(); } catch(Exception ignore) {}
}
}finally {
// 디스크 적었던 임시파일을 제거합니다.
wb.dispose();
try { wb.close(); } catch(Exception ignore) {}
}
mjonMsgSentService.msgSentExcelDownLoad(mjonMsgSentVO, response);
}

View File

@ -341,6 +341,7 @@ public class MjonReservMsgServiceImpl extends EgovAbstractServiceImpl implements
}
} catch (Exception e) {
e.printStackTrace();
System.out.println("++++++++++++++++++++++ 예약문자 취소 deleteReservMsgCancelDataAjax Service Imple Error !!! " + e);
}

View File

@ -610,37 +610,43 @@ public class MjonReservMsgController {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
try {
//로그인 권한정보 불러오기
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(!userId.equals("")) {
mjonResvMsgVO.setUserId(userId);
}else {
modelAndView.addObject("message", "로그인 후 이용이 가능합니다.");
modelAndView.addObject("result", "fail");
return modelAndView;
}
// 디비에 문자 내용을 저장해 준다.
int resultSts = mjonReservMsgService.deleteReservMsgCancelDataAjax(mjonResvMsgVO);
if(resultSts > 0) {
//로그인 권한정보 불러오기
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(!userId.equals("")) {
mjonResvMsgVO.setUserId(userId);
}else {
modelAndView.addObject("message", "로그인 후 이용이 가능합니다.");
modelAndView.addObject("result", "fail");
return modelAndView;
}
// 디비에 문자 내용을 저장해 준다.
int resultSts = mjonReservMsgService.deleteReservMsgCancelDataAjax(mjonResvMsgVO);
modelAndView.addObject("message", "예약 발송이 정상적으로 취소 되었습니다.");
modelAndView.addObject("result", "success");
}else {
modelAndView.addObject("message", "예약 발송 취소 처리가 실패 되었습니다. 잠시 후 다시 시도해 주세요.");
modelAndView.addObject("result", "fail");
if(resultSts > 0) {
modelAndView.addObject("message", "예약 발송이 정상적으로 취소 되었습니다.");
modelAndView.addObject("result", "success");
}else {
modelAndView.addObject("message", "예약 발송 취소 처리가 실패 되었습니다. 잠시 후 다시 시도해 주세요.");
modelAndView.addObject("result", "fail");
}
} catch (Exception e) {
e.printStackTrace();
// TODO: handle exception
}
return modelAndView;

View File

@ -4,6 +4,9 @@ import java.io.Serializable;
import org.apache.commons.lang3.builder.ToStringBuilder;
import lombok.Getter;
import lombok.Setter;
/**
* 사용자정보 VO클래스로서일반회원, 기업회원, 업무사용자의 비지니스로직 처리시 기타조건성 항을 구성한다.
* @author 공통서비스 개발팀 조재영
@ -21,6 +24,8 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
*
* </pre>
*/
@Getter
@Setter
public class UserDefaultVO implements Serializable {
/**
@ -34,9 +39,19 @@ public class UserDefaultVO implements Serializable {
/** 검색조건-성별 (0, M, F)*/
private String searchSexdstn = "0";
/** 검색조건 */
/**
* 검색조건
* 20250122 이호영
* 개선은 검색조건을 아래 세개만 사용하려고
* */
private String searchCondition ;
private String searchCondition01 ;
private String searchCondition02 ;
/** 검색조건 - 기존 */
// private String searchCondition ;
private String searchCondition_01 ;
private String searchConditionSite ;
@ -173,45 +188,6 @@ public class UserDefaultVO implements Serializable {
private String searchDeleteType;
public String getSearchDeleteType() {
return searchDeleteType;
}
public void setSearchDeleteType(String searchDeleteType) {
this.searchDeleteType = searchDeleteType;
}
public String getSearchHotlineAgentCode() {
return searchHotlineAgentCode;
}
public void setSearchHotlineAgentCode(String searchHotlineAgentCode) {
this.searchHotlineAgentCode = searchHotlineAgentCode;
}
public String getSearchExceptSpamYn() {
return searchExceptSpamYn;
}
public void setSearchExceptSpamYn(String searchExceptSpamYn) {
this.searchExceptSpamYn = searchExceptSpamYn;
}
public String getSearchSmishingYn() {
return searchSmishingYn;
}
public void setSearchSmishingYn(String searchSmishingYn) {
this.searchSmishingYn = searchSmishingYn;
}
public String getSearchDeptPrePayment() {
return searchDeptPrePayment;
}
public void setSearchDeptPrePayment(String searchDeptPrePayment) {
this.searchDeptPrePayment = searchDeptPrePayment;
}
private String searchAdminSmsNoticeYn;
@ -224,570 +200,5 @@ public class UserDefaultVO implements Serializable {
private String searchThrDptCategoryCode; //3뎁스(하위카테고리) 검색
public String getEditMode() {
return editMode;
}
public void setEditMode(String editMode) {
this.editMode = editMode;
}
public String getSearchSmsSalePrice() {
return searchSmsSalePrice;
}
public void setSearchSmsSalePrice(String searchSmsSalePrice) {
this.searchSmsSalePrice = searchSmsSalePrice;
}
public String getSearchAdminSmsNoticeYn() {
return searchAdminSmsNoticeYn;
}
public void setSearchAdminSmsNoticeYn(String searchAdminSmsNoticeYn) {
this.searchAdminSmsNoticeYn = searchAdminSmsNoticeYn;
}
public String getSearchDept() {
return searchDept;
}
public void setSearchDept(String searchDept) {
this.searchDept = searchDept;
}
public String getAuthorCode() {
return authorCode;
}
public void setAuthorCode(String authorCode) {
this.authorCode = authorCode;
}
public String getSearchCategoryCode() {
return searchCategoryCode;
}
public void setSearchCategoryCode(String searchCategoryCode) {
this.searchCategoryCode = searchCategoryCode;
}
public String getSearchKeywordFrom() {
return searchKeywordFrom;
}
public void setSearchKeywordFrom(String searchKeywordFrom) {
this.searchKeywordFrom = searchKeywordFrom;
}
public String getSearchKeywordTo() {
return searchKeywordTo;
}
public void setSearchKeywordTo(String searchKeywordTo) {
this.searchKeywordTo = searchKeywordTo;
}
public String getFrstRegistPnttm() {
return frstRegistPnttm;
}
public void setFrstRegistPnttm(String frstRegistPnttm) {
this.frstRegistPnttm = frstRegistPnttm;
}
public String getFrstRegisterId() {
return frstRegisterId;
}
public void setFrstRegisterId(String frstRegisterId) {
this.frstRegisterId = frstRegisterId;
}
public String getLastUpdtPnttm() {
return lastUpdtPnttm;
}
public void setLastUpdtPnttm(String lastUpdtPnttm) {
this.lastUpdtPnttm = lastUpdtPnttm;
}
public String getLastUpdusrId() {
return lastUpdusrId;
}
public void setLastUpdusrId(String lastUpdusrId) {
this.lastUpdusrId = lastUpdusrId;
}
public int getTotCnt() {
return totCnt;
}
public void setTotCnt(int totCnt) {
this.totCnt = totCnt;
}
public String getUserTotailCount() {
return userTotailCount;
}
public void setUserTotailCount(String userTotailCount) {
this.userTotailCount = userTotailCount;
}
public String getUserNewCount() {
return userNewCount;
}
public void setUserNewCount(String userNewCount) {
this.userNewCount = userNewCount;
}
public String getUserDeleteCount() {
return userDeleteCount;
}
public void setUserDeleteCount(String userDeleteCount) {
this.userDeleteCount = userDeleteCount;
}
public String getUserNewBlock() {
return userNewBlock;
}
public void setUserNewBlock(String userNewBlock) {
this.userNewBlock = userNewBlock;
}
public String getSnsSiteId() {
return snsSiteId;
}
public void setSnsSiteId(String snsSiteId) {
this.snsSiteId = snsSiteId;
}
public String getSnsSiteName() {
return snsSiteName;
}
public void setSnsSiteName(String snsSiteName) {
this.snsSiteName = snsSiteName;
}
public String getSnsSite() {
return snsSite;
}
public void setSnsSite(String snsSite) {
this.snsSite = snsSite;
}
public String getSnsId() {
return snsId;
}
public void setSnsId(String snsId) {
this.snsId = snsId;
}
public String getSnsEmail() {
return snsEmail;
}
public void setSnsEmail(String snsEmail) {
this.snsEmail = snsEmail;
}
public static long getSerialversionuid() {
return serialVersionUID;
}
/**
* sbscrbSttus attribute 값을 리턴한다.
* @return String
*/
public String getSbscrbSttus() {
return sbscrbSttus;
}
/**
* sbscrbSttus attribute 값을 설정한다.
* @param sbscrbSttus String
*/
public void setSbscrbSttus(String sbscrbSttus) {
this.sbscrbSttus = sbscrbSttus;
}
/**
* searchCondition attribute 값을 리턴한다.
* @return String
*/
public String getSearchCondition() {
return searchCondition;
}
/**
* searchCondition attribute 값을 설정한다.
* @param searchCondition String
*/
public void setSearchCondition(String searchCondition) {
this.searchCondition = searchCondition;
}
/**
* searchKeyword attribute 값을 리턴한다.
* @return String
*/
public String getSearchKeyword() {
return searchKeyword;
}
/**
* searchKeyword attribute 값을 설정한다.
* @param searchKeyword String
*/
public void setSearchKeyword(String searchKeyword) {
this.searchKeyword = searchKeyword;
}
/**
* searchUseYn attribute 값을 리턴한다.
* @return String
*/
public String getSearchUseYn() {
return searchUseYn;
}
/**
* searchUseYn attribute 값을 설정한다.
* @param searchUseYn String
*/
public void setSearchUseYn(String searchUseYn) {
this.searchUseYn = searchUseYn;
}
/**
* pageIndex attribute 값을 리턴한다.
* @return int
*/
public int getPageIndex() {
return pageIndex;
}
/**
* pageIndex attribute 값을 설정한다.
* @param pageIndex int
*/
public void setPageIndex(int pageIndex) {
this.pageIndex = pageIndex;
}
/**
* pageUnit attribute 값을 리턴한다.
* @return int
*/
public int getPageUnit() {
return pageUnit;
}
/**
* pageUnit attribute 값을 설정한다.
* @param pageUnit int
*/
public void setPageUnit(int pageUnit) {
this.pageUnit = pageUnit;
}
/**
* pageSize attribute 값을 리턴한다.
* @return int
*/
public int getPageSize() {
return pageSize;
}
/**
* pageSize attribute 값을 설정한다.
* @param pageSize int
*/
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
/**
* firstIndex attribute 값을 리턴한다.
* @return int
*/
public int getFirstIndex() {
return firstIndex;
}
/**
* firstIndex attribute 값을 설정한다.
* @param firstIndex int
*/
public void setFirstIndex(int firstIndex) {
this.firstIndex = firstIndex;
}
/**
* lastIndex attribute 값을 리턴한다.
* @return int
*/
public int getLastIndex() {
return lastIndex;
}
/**
* lastIndex attribute 값을 설정한다.
* @param lastIndex int
*/
public void setLastIndex(int lastIndex) {
this.lastIndex = lastIndex;
}
/**
* recordCountPerPage attribute 값을 리턴한다.
* @return int
*/
public int getRecordCountPerPage() {
return recordCountPerPage;
}
/**
* recordCountPerPage attribute 값을 설정한다.
* @param recordCountPerPage int
*/
public void setRecordCountPerPage(int recordCountPerPage) {
this.recordCountPerPage = recordCountPerPage;
}
/*성별조건 검색*/
public String getSearchSexdstn() {
return searchSexdstn;
}
public void setSearchSexdstn(String searchSexdstn) {
this.searchSexdstn = searchSexdstn;
}
/**
* toString 메소드를 대치한다.
*/
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
public String getSiteId() {
return siteId;
}
public void setSiteId(String siteId) {
this.siteId = siteId;
}
public String getSearchConditionSite() {
return searchConditionSite;
}
public void setSearchConditionSite(String searchConditionSite) {
this.searchConditionSite = searchConditionSite;
}
public String getAdminYn() {
return adminYn;
}
public void setAdminYn(String adminYn) {
this.adminYn = adminYn;
}
public String getGnrlUser() {
return gnrlUser;
}
public void setGnrlUser(String gnrlUser) {
this.gnrlUser = gnrlUser;
}
public String getEmplyrSttusCode() {
return emplyrSttusCode;
}
public void setEmplyrSttusCode(String emplyrSttusCode) {
this.emplyrSttusCode = emplyrSttusCode;
}
public String[] getEsntlIdNsttusCode() {
return esntlIdNsttusCode;
}
public void setEsntlIdNsttusCode(String[] esntlIdNsttusCode) {
this.esntlIdNsttusCode = esntlIdNsttusCode;
}
public String getEmplyrId() {
return emplyrId;
}
public void setEmplyrId(String emplyrId) {
this.emplyrId = emplyrId;
}
public String getSearchCondition_01() {
return searchCondition_01;
}
public void setSearchCondition_01(String searchCondition_01) {
this.searchCondition_01 = searchCondition_01;
}
public String getSearchSortCnd() {
return searchSortCnd;
}
public void setSearchSortCnd(String searchSortCnd) {
this.searchSortCnd = searchSortCnd;
}
public String getSearchSortOrd() {
return searchSortOrd;
}
public void setSearchSortOrd(String searchSortOrd) {
this.searchSortOrd = searchSortOrd;
}
public String getNiceFailUrl() {
return niceFailUrl;
}
public void setNiceFailUrl(String niceFailUrl) {
this.niceFailUrl = niceFailUrl;
}
public String getNiceSuccUrl() {
return niceSuccUrl;
}
public void setNiceSuccUrl(String niceSuccUrl) {
this.niceSuccUrl = niceSuccUrl;
}
public boolean isMobile() {
return isMobile;
}
public void setMobile(boolean isMobile) {
this.isMobile = isMobile;
}
public String getNiceMessage() {
return niceMessage;
}
public void setNiceMessage(String niceMessage) {
this.niceMessage = niceMessage;
}
public String getNiceNm() {
return niceNm;
}
public void setNiceNm(String niceNm) {
this.niceNm = niceNm;
}
public String getMblDn() {
return mblDn;
}
public void setMblDn(String mblDn) {
this.mblDn = mblDn;
}
public String getMberSttus() {
return mberSttus;
}
public void setMberSttus(String mberSttus) {
this.mberSttus = mberSttus;
}
public String getSearchStartDate() {
return searchStartDate;
}
public void setSearchStartDate(String searchStartDate) {
this.searchStartDate = searchStartDate;
}
public String getSearchEndDate() {
return searchEndDate;
}
public void setSearchEndDate(String searchEndDate) {
this.searchEndDate = searchEndDate;
}
public String getCandidateYn() {
return candidateYn;
}
public void setCandidateYn(String candidateYn) {
this.candidateYn = candidateYn;
}
public String getSearchBestCategory() {
return searchBestCategory;
}
public void setSearchBestCategory(String searchBestCategory) {
this.searchBestCategory = searchBestCategory;
}
public String getSearchDiv() {
return searchDiv;
}
public void setSearchDiv(String searchDiv) {
this.searchDiv = searchDiv;
}
public String getSearchTwoDptCategoryCode() {
return searchTwoDptCategoryCode;
}
public void setSearchTwoDptCategoryCode(String searchTwoDptCategoryCode) {
this.searchTwoDptCategoryCode = searchTwoDptCategoryCode;
}
public String getSearchThrDptCategoryCode() {
return searchThrDptCategoryCode;
}
public void setSearchThrDptCategoryCode(String searchThrDptCategoryCode) {
this.searchThrDptCategoryCode = searchThrDptCategoryCode;
}
public String getSearchStartDate2() {
return searchStartDate2;
}
public void setSearchStartDate2(String searchStartDate2) {
this.searchStartDate2 = searchStartDate2;
}
public String getSearchEndDate2() {
return searchEndDate2;
}
public void setSearchEndDate2(String searchEndDate2) {
this.searchEndDate2 = searchEndDate2;
}
}

View File

@ -48,8 +48,8 @@
,'01','00') AS tab2
, if (A.MSG_TYPE= '6' AND B.MSG_TYPE= '6' AND B.FILE_CNT > '0'
,'01','00') AS tab3
<include refid="MjonMsgSentDAO.selectJoinQuery"/>
AND A.USER_ID = #userId#
AND B.USER_ID = #userId#
<isNotEmpty property="ntceBgnde">
@ -62,10 +62,6 @@
<isEmpty property="msgType">
AND A.MSG_TYPE IN ('4','6')
</isEmpty>
AND B.RESERVE_C_YN = 'N'
<![CDATA[
AND B.REQ_DATE <= DATE_ADD(NOW(), INTERVAL 60 MINUTE)
]]>
<isNotEmpty property="fileCnt">
<isEqual property="fileCnt" compareValue="0">
AND B.FILE_CNT = '0'
@ -74,6 +70,16 @@
<![CDATA[ AND B.FILE_CNT > '0' ]]>
</isNotEqual>
</isNotEmpty>
<isNotEmpty property="searchStartDate">
<![CDATA[
AND DATE_FORMAT(B.REGDATE, '%Y-%m-%d') >= DATE_FORMAT(#searchStartDate#, '%Y-%m-%d')
]]>
</isNotEmpty>
<isNotEmpty property="searchEndDate">
<![CDATA[
AND DATE_FORMAT(B.REGDATE, '%Y-%m-%d') <= DATE_FORMAT(#searchEndDate#, '%Y-%m-%d')
]]>
</isNotEmpty>
) A0
GROUP BY
A0.MSG_GROUP_ID
@ -236,25 +242,6 @@
WHERE (B.DEL_FLAG = 'N' OR B.DEL_FLAG IS NULL)
AND A.DEL_FLAG = 'N'
AND B.USER_ID = #userId#
AND B.RESERVE_C_YN = 'N'
<![CDATA[
AND B.REQ_DATE <= DATE_ADD(NOW(), INTERVAL 60 MINUTE)
]]>
<isNotEmpty property="searchMsgType">
<isEqual property="searchMsgType" compareValue="S">
AND B.MSG_TYPE = '4'
</isEqual>
<isEqual property="searchMsgType" compareValue="L">
AND B.MSG_TYPE = '6'
AND B.FILE_CNT = '0'
</isEqual>
<isEqual property="searchMsgType" compareValue="M">
<![CDATA[
AND B.MSG_TYPE = '6'
AND B.FILE_CNT > '0'
]]>
</isEqual>
</isNotEmpty>
<isNotEmpty property="searchKeyword">
<isEqual property="searchCondition" compareValue="1" >
AND B.SUBJECT LIKE CONCAT('%', #searchKeyword#, '%')
@ -263,22 +250,37 @@
AND B.CALL_FROM LIKE CONCAT('%', #searchKeyword#, '%')
</isEqual>
<isEqual property="searchCondition" compareValue="3" >
AND CALL_TO LIKE CONCAT('%', #searchKeyword#, '%')
AND B.SMS_TXT LIKE CONCAT('%', #searchKeyword#, '%')
</isEqual>
</isNotEmpty>
<isNotEmpty property="searchCondition_01">
AND sendKind = #searchCondition_01#
<isNotEmpty property="searchCondition01">
AND B.RESERVE_YN = #searchCondition01#
</isNotEmpty>
<isNotEmpty property="searchCondition02">
<isEqual property="searchCondition02" compareValue="S">
AND B.MSG_TYPE = '4'
</isEqual>
<isEqual property="searchCondition02" compareValue="L">
AND B.MSG_TYPE = '6'
AND B.FILE_CNT = '0'
</isEqual>
<isEqual property="searchCondition02" compareValue="M">
<![CDATA[
AND B.MSG_TYPE = '6'
AND B.FILE_CNT > '0'
]]>
</isEqual>
</isNotEmpty>
<isNotEmpty property="searchStartDate">
<![CDATA[
AND DATE_FORMAT(REGDATE, '%Y-%m-%d') >= DATE_FORMAT(#searchStartDate#, '%Y-%m-%d')
]]>
</isNotEmpty>
<isNotEmpty property="searchEndDate">
<![CDATA[
AND DATE_FORMAT(REGDATE, '%Y-%m-%d') <= DATE_FORMAT(#searchEndDate#, '%Y-%m-%d')
]]>
</isNotEmpty>
<isNotEmpty property="startDate">
<![CDATA[
AND DATE_FORMAT(REGDATE, '%Y-%m-%d') >= DATE_FORMAT(#startDate#, '%Y-%m-%d')
]]>
</isNotEmpty>
<isNotEmpty property="endDate">
<![CDATA[
AND DATE_FORMAT(REGDATE, '%Y-%m-%d') <= DATE_FORMAT(#endDate#, '%Y-%m-%d')
]]>
</isNotEmpty>
</select>
@ -288,7 +290,11 @@
select
SUM(IF(aa.result = 'S', 1, 0)) AS resultSValue,
SUM(IF(aa.result = 'W', 1, 0)) AS resultWValue,
SUM(IF(aa.result = 'F', 1, 0)) AS resultFValue
SUM(IF(aa.result = 'F', 1, 0)) AS resultFValue,
CASE
WHEN COUNT(DISTINCT REQ_DATE) > 1 THEN 'Y'
ELSE 'N'
END AS divideYN
from
(
select
@ -331,6 +337,7 @@
and A.RSLT_DATE is null ) then 'W'
else 'F'
end as result /* common query */
, A.REQ_DATE
from
MJ_MSG_DATA A
where
@ -401,8 +408,8 @@
<!-- 전체 발송결과 조회 (전송사별)-->
<select id="MjonMsgSentDAO.selectAllMsgSentList_advc" parameterClass="mjonMsgSentVO" resultClass="mjonMsgSentVO">
SELECT
/* MjonMsgSentDAO.selectAllMsgSentList_advc */
SELECT
B.USER_ID as userId
, B.MSG_GROUP_ID as msgGroupId
, B.MSG_GROUP_CNT as msgGroupCnt
@ -429,52 +436,48 @@ SELECT
, B.MSG_KIND as msgKind
, B.DELAY_YN as delayYn
, B.DELAY_COMPLETE_YN as delayCompleteYn
, B.RESERVE_YN as reserveYn
, B.RESERVE_C_YN as reserveCYn
, TIMESTAMPDIFF(minute, DATE_FORMAT(B.REQ_DATE, '%Y-%m-%d %T'), DATE_FORMAT(NOW(), '%Y-%m-%d %T')) as diffMin
FROM MJ_MSG_DATA A
JOIN MJ_MSG_GROUP_DATA B ON A.MSG_GROUP_ID = B.MSG_GROUP_ID
WHERE (B.DEL_FLAG = 'N' OR B.DEL_FLAG IS NULL)
AND A.DEL_FLAG = 'N'
AND B.RESERVE_C_YN = 'N'
AND B.USER_ID = #userId#
<![CDATA[
AND B.REQ_DATE <= DATE_ADD(NOW(), INTERVAL 60 MINUTE)
]]>
<isNotEmpty property="searchMsgType">
<isEqual property="searchMsgType" compareValue="S">
AND B.MSG_TYPE = '4'
</isEqual>
<isEqual property="searchMsgType" compareValue="L">
AND B.MSG_TYPE = '6'
AND B.FILE_CNT = '0'
</isEqual>
<isEqual property="searchMsgType" compareValue="M">
<![CDATA[
AND B.MSG_TYPE = '6'
AND B.FILE_CNT > '0'
]]>
</isEqual>
</isNotEmpty>
<isNotEmpty property="searchKeyword">
<isEqual property="searchCondition" compareValue="1" >
AND B.SUBJECT LIKE CONCAT('%', #searchKeyword#, '%')
</isEqual>
<isEqual property="searchCondition" compareValue="2" >
AND B.CALL_FROM LIKE CONCAT('%', #searchKeyword#, '%')
</isEqual>
<isEqual property="searchCondition" compareValue="3" >
AND CALL_TO LIKE CONCAT('%', #searchKeyword#, '%')
</isEqual>
</isNotEmpty>
<isNotEmpty property="searchCondition_01">
AND sendKind = #searchCondition_01#
</isNotEmpty>
<isNotEmpty property="startDate">
<isNotEmpty property="searchKeyword">
<isEqual property="searchCondition" compareValue="2" >
AND B.CALL_FROM LIKE CONCAT('%', #searchKeyword#, '%')
</isEqual>
<isEqual property="searchCondition" compareValue="3" >
AND B.SMS_TXT LIKE CONCAT('%', #searchKeyword#, '%')
</isEqual>
</isNotEmpty>
<isNotEmpty property="searchCondition01">
AND B.RESERVE_YN = #searchCondition01#
</isNotEmpty>
<isNotEmpty property="searchCondition02">
<isEqual property="searchCondition02" compareValue="S">
AND B.MSG_TYPE = '4'
</isEqual>
<isEqual property="searchCondition02" compareValue="L">
AND B.MSG_TYPE = '6'
AND B.FILE_CNT = '0'
</isEqual>
<isEqual property="searchCondition02" compareValue="M">
<![CDATA[
AND B.MSG_TYPE = '6'
AND B.FILE_CNT > '0'
]]>
</isEqual>
</isNotEmpty>
<isNotEmpty property="searchStartDate">
<![CDATA[
AND DATE_FORMAT(REGDATE, '%Y-%m-%d') >= DATE_FORMAT(#startDate#, '%Y-%m-%d')
AND DATE_FORMAT(B.REGDATE, '%Y-%m-%d') >= DATE_FORMAT(#searchStartDate#, '%Y-%m-%d')
]]>
</isNotEmpty>
<isNotEmpty property="endDate">
<isNotEmpty property="searchEndDate">
<![CDATA[
AND DATE_FORMAT(REGDATE, '%Y-%m-%d') <= DATE_FORMAT(#endDate#, '%Y-%m-%d')
AND DATE_FORMAT(B.REGDATE, '%Y-%m-%d') <= DATE_FORMAT(#searchEndDate#, '%Y-%m-%d')
]]>
</isNotEmpty>
GROUP BY B.MSG_GROUP_ID

View File

@ -553,6 +553,9 @@ function fn_save_menuInfo(menuNo) {
<div id="kopost_organization" class="orgCont"></div>
</div>
<div class="tbWrap">
<div class="btnWrap">
<input type="button" class="btnType1 bg_456ded main1_save_btn" value="저 장" onClick="fn_save_menuInfo(); return false;">
</div>
<span class="tbTit" id="menuTopNm" >코드를 선택하세요</span>
<table class="tbType2">
<colgroup>

View File

@ -3,19 +3,22 @@
<%@ 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" %>
<%@ taglib prefix="ec" uri="/WEB-INF/tld/ecnet_tld.tld"%>
<%@ page import="itn.com.cmm.LoginVO" %>
<script src="/publish/js/content.js"></script>
<script src="/publish/js/popupLayer.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var startDate = '${startDate}';
var endDate = '${endDate}';
// var searchStartDate = '${searchStartDate}';
// console.log('searchStartDate : ', searchStartDate);
// var searchEndDate = '${searchEndDate}';
// console.log('searchEndDate : ', searchEndDate);
// DatePicker 값 수정
var startDatePicker = $('#startDate').pickadate('picker');
startDatePicker.set('select', startDate, { format: 'yyyy/mm/dd' });
startDatePicker = $('#endDate').pickadate('picker');
startDatePicker.set('select', endDate, { format: 'yyyy/mm/dd' });
// // DatePicker 값 수정
// var startDatePicker = $('#searchStartDate').pickadate('picker');
// startDatePicker.set('select', searchStartDate, { format: 'yyyy/mm/dd' });
// startDatePicker = $('#searchEndDate').pickadate('picker');
// startDatePicker.set('select', searchEndDate, { format: 'yyyy/mm/dd' });
/* 목록 정렬 항목 아이콘 표시 */
@ -63,14 +66,82 @@ $(document).ready(function(){
function fn_sentDetailView(msgGroupId) {
// msgGroupId 값을 form에 설정
$("#detailForm #msgGroupId").val(msgGroupId);
$("#searchForm #msgGroupId").val(msgGroupId);
// form을 해당 URL로 제출
$("#detailForm").attr("action", "/web/mjon/msgsent/msgSentDetailView.do");
$("#detailForm").submit();
$("#searchForm").attr("action", "/web/mjon/msgsent/msgSentDetailView.do");
$("#searchForm").submit();
}
// function fnReservCancel(msgGroupId, agentCode, msgType){
function fnReservCancel(msgGroupId){
var form = document.resCancelForm;
var loginVO = '${LoginVO}';
form.msgGroupId.value = msgGroupId;
// form.agentCode.value = agentCode;
// form.msgType.value = msgType;
if(loginVO == "" || loginVO == null){
alert("로그인 후 이용이 가능합니다.");
return false;
}
console.log('msgGroupId : ', msgGroupId);
var data = new FormData(form);
url = "/web/mjon/reservmsg/deleteReservMsgCancelDataAjax.do";
if(confirm("정말 예약을 취소하시겠습니까?")){
$.ajax({
type: "POST",
url: url,
data: data,
dataType:'json',
async: true,
processData: false,
contentType: false,
cache: false,
success: function (returnData, status) {
if(status == 'success'){ // status 확인 필요한가. 석세스 안뜨면 에러 가지 않나
if("fail"==returnData.result){
alert(returnData.message);
return false;
}
// var smsCnt = returnData.resultSts;
alert("예약 발송이 정상적으로 취소 되었습니다.");
//예약 관리 리스트 다시 불러오기
linkPage(1);
//현황도 갱신 필요하여 새로고침으로 변경
// location.reload(true);
} else if(status== 'fail'){
alert(returnData.message);
}
},
error: function (e) {
alert("예약 취소에 실패하였습니다."); console.log("ERROR : ", e);
},
beforeSend : function(xmlHttpRequest) {
//로딩창 show
$('.loading_layer').addClass('active');
},
complete : function(xhr, textStatus) {
//로딩창 hide
$('.loading_layer').removeClass('active');
}
});
}
}
</script>
@ -118,22 +189,7 @@ function fn_sentDetailView(msgGroupId) {
<input type="button" class="sort sortBtn" id="sort_orderByCode">
</div>
</th>
<!-- <th>발송방식
<div class="sort_wrap">
<input type="button" class="sort sortBtn" id="sort_sendKind">
</div>
</th> -->
<th rowspan="2">내용</th>
<!-- <th>받는사람
<div class="sort_wrap">
<input type="button" class="sort sortBtn" id="sort_callTo">
</div>
</th> -->
<!-- <th>발신번호
<div class="sort_wrap">
<input type="button" class="sort sortBtn" id="sort_callFrom">
</div>
</th> -->
<th rowspan="2">
발송건수
<div class="sort_wrap">
@ -154,51 +210,51 @@ function fn_sentDetailView(msgGroupId) {
<tbody>
<c:choose>
<c:when test="${not empty resultAllSentList}">
<c:forEach var="resultAllSentList" items="${resultAllSentList}" varStatus="status">
<c:forEach var="result" items="${resultAllSentList}" varStatus="status">
<tr>
<td>
<label for="msgSentDel${status.count}" class="label">선택</label>
<c:choose>
<c:when test="${resultAllSentList.curState == '0'}">
<input type="checkbox" id="msgSentDel${status.count}" name="msgSentDel" value="${resultAllSentList.msgGroupId}" disabled>
<c:when test="${result.curState == '0'}">
<input type="checkbox" id="msgSentDel${status.count}" name="msgSentDel" value="${result.msgGroupId}" disabled>
</c:when>
<c:when test="${mjonMsgSentVO.listType == 'groupList'}">
<input type="checkbox" id="msgSentDel${status.count}" name="msgSentDel" value="${resultAllSentList.msgGroupId}">
<input type="checkbox" id="msgSentDel${status.count}" name="msgSentDel" value="${result.msgGroupId}">
</c:when>
</c:choose>
</td>
<td>
<c:choose>
<c:when test="${resultAllSentList.delayYn eq 'Y' && resultAllSentList.delayCompleteYn eq 'N'}">
<c:when test="${result.delayYn eq 'Y' && result.delayCompleteYn eq 'N'}">
<c:choose>
<c:when test="${resultAllSentList.curState eq '0'}">
<c:when test="${result.curState eq '0'}">
<%--
20240906 추가
발송 대기 상태일 때만 원래 발송시간을 보여주고, 발송이 완료되면 발송 처리 완료 시간(reqDate)을 보여준다.
30분 딜레이 된 건으로 관리자 승인/취소 처리가 완료 되지 않은 건에 대해서 -30분 처리하여 원래 사용자가 보내려던 시간을 표시해줌
--%>
<p><fmt:formatDate pattern = "yyyy-MM-dd HH:mm" value = "${resultAllSentList.delayOrgTime}" /></p>
<p><fmt:formatDate pattern = "yyyy-MM-dd HH:mm" value = "${result.delayOrgTime}" /></p>
</c:when>
<c:otherwise>
<p><fmt:formatDate pattern = "yyyy-MM-dd HH:mm" value = "${resultAllSentList.reqdate}" /></p>
<p><fmt:formatDate pattern = "yyyy-MM-dd HH:mm" value = "${result.reqdate}" /></p>
</c:otherwise>
</c:choose>
</c:when>
<c:otherwise>
<p><fmt:formatDate pattern = "yyyy-MM-dd HH:mm" value = "${resultAllSentList.reqdate}" /></p>
<p><fmt:formatDate pattern = "yyyy-MM-dd HH:mm" value = "${result.reqdate}" /></p>
</c:otherwise>
</c:choose>
</td>
<td>
<p>
<c:choose>
<c:when test="${resultAllSentList.msgType eq '6' && resultAllSentList.fileCnt eq 0 }">
<c:when test="${result.msgType eq '6' && result.fileCnt eq 0 }">
장문
</c:when>
<c:when test="${resultAllSentList.msgType eq '6' && resultAllSentList.fileCnt ne 0 }">
<c:when test="${result.msgType eq '6' && result.fileCnt ne 0 }">
그림
</c:when>
<c:otherwise>
@ -208,34 +264,45 @@ function fn_sentDetailView(msgGroupId) {
</p>
</td>
<td class="result_cont">
<%-- <a href="#none" data-tooltip="rev_popup01" onClick="javascript:fnRevDetailPop('${resultAllSentList.msgGroupId}','${resultAllSentList.msgId}','${resultAllSentList.fileCnt}'); return false;"> --%>
<%-- <button class="btnType btnType20" data-tooltip="rev_popup01" onClick="javascript:fnRevDetailPop('${resultAllSentList.msgGroupId}','${resultAllSentList.msgId}','${resultAllSentList.fileCnt}'); return false;">상세보기</button> --%>
<div class="icon_wrap">
<span class="re">예약</span>
<span class="di">분할</span>
<a href="#none"onclick="fn_sentDetailView('${resultAllSentList.msgGroupId}')">
<c:out value="${resultAllSentList.smsTxt}" />
<c:if test="${result.reserveYn eq 'Y'}">
<span class="re">예약</span>
<!-- 예약일때만 분할이 있음 -->
<c:if test="${result.divideYN eq 'Y'}">
<span class="di">분할</span>
</c:if>
</c:if>
<a href="#none"onclick="fn_sentDetailView('${result.msgGroupId}')">
<c:out value="${result.smsTxt}" />
</a>
</div>
</td>
<td>
<p><c:out value="${resultAllSentList.msgGroupCnt}"/> </p>
<p><c:out value="${result.msgGroupCnt}"/> </p>
</td>
<td>
<p><c:out value="${resultAllSentList.resultWValue}"/> </p>
<p><c:out value="${result.resultWValue}"/> </p>
</td>
<td>
<p class="c_002c9a"><c:out value="${resultAllSentList.resultSValue}"/> </p>
<p class="c_002c9a"><c:out value="${result.resultSValue}"/> </p>
</td>
<td>
<p class="c_e40000"><c:out value="${resultAllSentList.resultFValue}"/> </p>
<p class="c_e40000"><c:out value="${result.resultFValue}"/> </p>
</td>
<td>
<c:out value="${resultAllSentList.totPrice}"/>
<c:out value="${result.totPrice}"/>
</td>
<td>
<p><button class="btnType btnType20">예약취소</button></p>
<c:choose>
<c:when test="${result.statusCd ne '03' }">
<ec:code codeId="ITN057" code="${result.statusCd }" />
</c:when>
<c:otherwise>
<p><button class="btnType btnType20" onClick="javascript:fnReservCancel('${result.msgGroupId}'); return false;">예약취소</button></p>
</c:otherwise>
</c:choose>
<!-- -->
</td>
@ -244,7 +311,7 @@ function fn_sentDetailView(msgGroupId) {
</c:when>
<c:otherwise>
<tr>
<td colspan="11">발송 내역이 없습니다.</td>
<td colspan="10">발송 내역이 없습니다.</td>
</tr>
</c:otherwise>
</c:choose>
@ -254,14 +321,14 @@ function fn_sentDetailView(msgGroupId) {
<div class="table_btn clearfix">
<div class="table_btn_left">
<!-- 2022.07.04 발송결과 화면에 리스트 선택삭제 기능 제거(카운팅 및 금액 합산 오류 관련) -->
<!-- <button type="button" class="btnType btnType15" onClick="javascript:fnDelete(); return false;"><i class="remove_img"></i>선택삭제</button> -->
<button type="button" data-tooltip="rev_popup02" class="btnType btnType15"><i class="add_img"></i>그룹등록</button>
<button type="button" class="btnType btnType15" onClick="javascript:fnDeleteAddrNo('${mjonMsgSentVO.listType}'); return false;"><i class="remove_img"></i>주소록에서 번호 삭제</button>
<button type="button" class="btnType btnType15" onClick="javascript:fnAddBlockNo('${mjonMsgSentVO.listType}'); return false;"></i>수신거부번호 등록</button>
<button type="button" class="btnType btnType15" onClick="javascript:fnDelete(); return false;"><i class="remove_img"></i>선택삭제</button>
<!-- <button type="button" data-tooltip="rev_popup02" class="btnType btnType15"><i class="add_img"></i>그룹등록</button> -->
<%-- <button type="button" class="btnType btnType15" onClick="javascript:fnDeleteAddrNo('${mjonMsgSentVO.listType}'); return false;"><i class="remove_img"></i>주소록에서 번호 삭제</button> --%>
<%-- <button type="button" class="btnType btnType15" onClick="javascript:fnAddBlockNo('${mjonMsgSentVO.listType}'); return false;"></i>수신거부번호 등록</button> --%>
</div>
<div class="table_btn_right">
<button type="button" class="excel_btn btnType" onClick="javascript:fnExcelDownLoad('all','${mjonMsgSentVO.tabType}'); return false;"><i class="downroad"></i>엑셀 다운로드</button>
<button type="button" class="print_btn btnType" onClick="javascript:fnShowPrintPopup('all','${mjonMsgSentVO.tabType}'); return false;"><i class="print_img"></i>발송결과 출력하기</button>
<button type="button" class="excel_btn btnType" onClick="javascript:fnExcelDownLoad(); return false;"><i class="downroad"></i>엑셀 다운로드</button>
<%-- <button type="button" class="print_btn btnType" onClick="javascript:fnShowPrintPopup('all','${mjonMsgSentVO.tabType}'); return false;"><i class="print_img"></i>발송결과 출력하기</button> --%>
</div>
</div>
<c:if test="${!empty resultAllSentList}">
@ -273,3 +340,10 @@ function fn_sentDetailView(msgGroupId) {
<form name="detailForm" id="detailForm" method="post">
<input type="hidden" name="msgGroupId" id="msgGroupId" value=""/>
</form>
<form id="resCancelForm" name="resCancelForm" method="post">
<input type="hidden" id="msgGroupId" name="msgGroupId" value=""/>
<!-- <input type="hidden" id="agentCode" name="agentCode" value=""/> -->
<!-- <input type="hidden" id="msgType" name="msgType" value=""/> -->
</form>

View File

@ -16,7 +16,7 @@ $(document).ready(function(){
$tbDtailList = new Tabulator("#detailPopup", {
height: "255px",
width: "20%",
layout: "fitColumns",
layout: "fitDataStretch", // 데이터가 너비에 맞게 늘어나도록 설정
autoColumns: false,
headerHozAlign: "center",
validationMode: "highlight",
@ -24,6 +24,13 @@ $(document).ready(function(){
clipboardCopySelector: "table",
clipboardPasteAction: "insert", // insert, update, replace
columns: [
{
title: "이름",
field: "addrNm",
hozAlign: "center",
headerHozAlign: "center",
width: 140
},
{
title: "휴대폰",
field: "phone",
@ -43,12 +50,17 @@ $(document).ready(function(){
fn_getDetailList();
/*
$('#goPageBtn').click(function(){
$("#goList").submit();
});
*/
});
@ -90,6 +102,7 @@ function fn_setData(data){
data.forEach((row, index) => {
resultData.push({
// addrNm: row.addrNm, // 폰번호
phone: row.callTo, // 폰번호
result: row.statusTxt // 결과 메시지 추가
});
@ -106,6 +119,17 @@ function fn_setData(data){
</script>
<div class="inner">
<form id="goList" name="goList" method="post" action="/web/mjon/msgsent/selectMsgSentView.do">
<input type="hidden" name="pageIndex" value="<c:out value="${searchVO.pageIndex}" />" />
<input type="hidden" name="searchSortCnd" value="<c:out value='${searchVO.searchSortCnd }' />" />
<input type="hidden" name="searchSortOrd" value="<c:out value='${searchVO.searchSortOrd }' />" />
<input type="hidden" name="searchCondition01" value="<c:out value='${searchVO.searchCondition01 }' />" />
<input type="hidden" name="searchCondition02" value="<c:out value='${searchVO.searchCondition02 }' />" />
<input type="hidden" name="searchStartDate" value="<c:out value='${searchVO.searchStartDate }' />" />
<input type="hidden" name="searchEndDate" value="<c:out value='${searchVO.searchEndDate }' />" />
<input type="hidden" name="searchCondition" value="<c:out value='${searchVO.searchCondition }' />" />
<input type="hidden" name="searchKeyword" value="<c:out value='${searchVO.searchKeyword }' />" />
</form>
<input id="msgGroupId" name="msgGroupId" type="hidden" value="${result.msgGroupId}"/>
<!-- send top -->
<div class="send_top">
@ -290,7 +314,7 @@ function fn_setData(data){
<!--// 발송결과 상세 및 미리보기-->
<!-- 목록-->
<div class="btn_list_type1">
<button class="btnType btnType17">목록</button>
<button class="btnType btnType17" id="goPageBtn">목록</button>
</div>
<!--// 목록-->

View File

@ -15,7 +15,12 @@ var thisfuledtlday = ""; //당원 마지막일
$(document).ready(function(){
//초기 전체 리스트 페이지 보여주기
linkPage(1);
linkPage($('#searchForm #pageIndex').val());
fn_activateTab($('#searchForm #searchCondition01').val())
fn_setActiveTab($('#searchForm #searchCondition02').val())
var date = new Date() ;
//이전달 첫날/마지막날 조회
@ -28,12 +33,14 @@ $(document).ready(function(){
lastfuledday = lastfulstday + "/"+ new Date(date.getFullYear(), date.getMonth(), 0).getDate()+"" ;
lastfulstday += "/01" ;
}
console.log('lastfulstday: ', lastfulstday);
//당월 첫날/마지막날 조회
thisfulstlday = date.getFullYear() + "/" ;
thisfulstlday += date.getMonth()+1 < 10 ? "0"+ (date.getMonth()+1) : date.getMonth()+1+"" ;
thisfuledtlday = thisfulstlday + "/"+ new Date(date.getFullYear(), date.getMonth()+1, 0).getDate()+"";
thisfulstlday += "/01" ;
console.log('thisfulstlday: ', thisfulstlday);
//3개월 이전 날짜 구해오기
@ -55,6 +62,19 @@ $(document).ready(function(){
$(document).on('click', '.sort', function (){
listSortOrd(this);
});
// 탭 :: 전체 , 즉시, 예약
$(document).on('click', '.sendKindBtn', function (){
// 클릭된 버튼의 data-info 값을 전달하여 함수 호출
fn_activateTab($(this).data('info'));
linkPage(1);
});
//목록 정렬 항목 클릭
function listSortOrd(obj){
@ -98,7 +118,18 @@ $(document).ready(function(){
});
//탭 활성화 처리 함수
function fn_activateTab(tabInfo) {
// 1. data-info 값을 가진 버튼 요소 찾기
var $button = $('.sendKindBtn[data-info="' + tabInfo + '"]');
// 2. 해당 버튼이 속한 탭 활성화 처리
$button.closest('ul').find('.tab').removeClass('active');
$button.closest('.tab').addClass('active');
// 3. hidden input 요소에 값 설정
$('#searchCondition01').val(tabInfo);
}
//캘린더에 날짜 입력해 주기
@ -107,13 +138,13 @@ function setCalVal(val,targetObj){
}
//검색 버튼 실행
//페이지 이동 실행
function linkPage(pageNo){
var form = document.searchForm;
var stateType = form.stateType.value;
form.pageIndex.value = pageNo;
console.log('form : ', form);
var sendData = $(document.searchForm).serializeArray();
$(".msgSentAllLoad").html('<div class="list_info"><table class="tType4"><tbody><tr><td colspan="12">LOADING...</td></tr></tbody></table></div>');
$(".msgSentAllLoad").load("/web/mjon/msgsent/selectMsgSentListViewAjax.do", sendData ,function(response, status, xhr){
@ -137,120 +168,73 @@ function fnDelete(){
}
});
if(msgId.length > 0){
console.log('msgId : ', msgId);
if(msgId.length < 1){
alert("삭제할 문자를 선택해 주세요.");
return false;
}
//22.04.25 구글 독스 alert 기준으로 이지우가 수정
/* if(confirm("선택한 발송문자를 삭제하시겠습니까? 삭제된 문자는 복구가 불가능 합니다.")) */
if(confirm("선택한 목록을 삭제하시겠습니까?")){
if(confirm("선택한 목록을 삭제하시겠습니까?\n삭제한 목록은 복구가 불가합니다.")){
document.searchForm.msgGroupIdList.value = msgId;
var sendData = $(document.searchForm).serializeArray();
$(".msgSentAllLoad").load("/web/mjon/msgsent/deleteMsgSentDataAjax.do", sendData ,function(response, status, xhr){
});
// var form = document.searchForm;
// form.action="/web/mjon/msgsent/selectMsgSentView.do";
// form.submit();
alert("삭제되었습니다.");
var form = document.searchForm;
form.action="/web/mjon/msgsent/selectMsgSentView.do";
form.submit();
}
}else{
alert("삭제할 문자를 선택해 주세요.");
return false;
}
}
//상세보기 버튼 실행
function fnRevDetailPop(msgGroupId, msgId, fileCnt){
document.resPopForm.msgGroupId.value = msgGroupId;
document.resPopForm.msgId.value = msgId;
var sendData = $(document.resPopForm).serializeArray();
var form = document.searchForm;
if (form.listType.value == "privateList") {
$("#msgSentDetailPopLoad").load("/web/mjon/msgsent/selectMsgSentDetailData2Ajax.do", sendData ,function(response, status, xhr){
});
}
else {
$("#msgSentDetailPopLoad").load("/web/mjon/msgsent/selectMsgSentDetailDataAjax.do", sendData ,function(response, status, xhr){
});
}
}
function fnListLoad(pageType, tabNum){
var form = document.searchForm;
var $tab = $(".table_tab_wrap li").eq(tabNum); //
$tab.addClass("active");
$tab.find("button").attr("title", "선택됨");
$tab.siblings("li.tab").removeClass("active");
$tab.siblings("li.btn_tab").removeClass("active");
$tab.siblings("li.tab").find("button").removeAttr("title");
if(pageType == 'all'){
form.stateType.value = "all";
$(".tab_depth1").show();
}else if(pageType == 'ready'){
form.stateType.value = "ready";
$(".tab_depth1").show();
}else if(pageType == 'complete'){
form.stateType.value = "complete";
$(".tab_depth1").show();
}else if(pageType == 'fail'){
form.listType.value = "privateList";
form.stateType.value = "fail";
$(".tab_depth1").hide();
}
/* if(pageType == 'fail'){//발송실패의 경우 모두 개인별 건수를 보여준다.
form.listType.value = 'privateList';
} */
linkPage(1);
}
// 전체/단문/장문/그림 탭 선택 처리
function fnTabLoad(tabType, tabNum){
function fnTabLoad(tabType){
//즉시, 예약 탭은 전체로 바꿔야함
fn_activateTab('');
var form = document.searchForm;
form.tabType.value = tabType;
//해당 탭의 전체 리스트 내역으로 불러오기
fnListLoad('all', '0');
var n=tabNum+1;
//탭 선택 CSS 처리
var $tab = $(".list_tab_wrap2 li:nth-child("+n+")");
var $tabPrev = $(".list_tab_wrap2 li:nth-child("+n+")").prev("li")
$tab.addClass("active");
$tab.find("button").attr("title", "선택됨");
$tab.siblings("li.tab").removeClass("active");
$tab.siblings("li.tab").find("button").removeAttr("title");
$tab.siblings("li:not(li:last-child)").find("button").css("border-right","1px solid #e5e5e5");
$tabPrev.find("button").css("border-right","0");
// 탭 선택 CSS 처리
fn_setActiveTab(tabType);
linkPage(1);
}
//fnTabLoad 함수에 대한 탭 선택 CSS 처리 함수
function fn_setActiveTab(tabType) {
var $tabs = $(".list_tab_wrap2 li"); // 전체 탭 리스트
$tabs.removeClass("active").find("button").removeAttr("title"); // 모든 탭 초기화
// tabType에 해당하는 탭 찾기
$tabs.each(function() {
var buttonText = $(this).find("button").text();
if ((tabType === '' && buttonText === "전체") ||
(tabType === 'S' && buttonText === "단문(SMS)") ||
(tabType === 'L' && buttonText === "장문(LMS)") ||
(tabType === 'M' && buttonText === "그림(MMS)")) {
$(this).addClass("active").find("button").attr("title", "선택됨");
}
});
$('#searchCondition02').val(tabType);
}
function fnSearch(pageNo){
/* if(!fn_G_cmndataValueChk("startDate", "endDate", 3)){
/* if(!fn_G_cmndataValueChk("searchStartDate", "searchEndDate", 3)){
return;
}; */
fn_activateTab('')
fn_setActiveTab('')
console.log('fnSearch')
var form = document.searchForm;
@ -274,27 +258,8 @@ function prevMonth(month) {
function fnExcelDownLoad(pageType, tabType){
var form = document.searchForm;
var loginVO = '${LoginVO}';
form.stateType.value = pageType;
form.tabType.value = tabType;
if(loginVO == "" || loginVO == null){
alert("로그인 후 이용이 가능합니다.");
return false;
}
// 기간검색 유효성 검사
if ($("#startDate").val() == "" || $("#endDate").val() == "") {
alert("기간 설정을 먼저해주세요. 최근 3개월까지만 다운로드 가능합니다.")
return false;
}
else {
if ($("#startDate").val() < prevMonth(3)) {
alert("최근 3개월까지만 다운로드 가능합니다.")
return false;
}
}
if(confirm("엑셀 다운로드를 하시겠습니까?")){
@ -305,21 +270,6 @@ function fnExcelDownLoad(pageType, tabType){
}
$(document).on('click', '.msgGgoupList', function(){
var form = document.searchForm;
form.listType.value = "groupList";
linkPage(1);
});
$(document).on('click', '.msgPrivateList', function(){
var form = document.searchForm;
form.listType.value = "privateList";
linkPage(1);
});
function fnDeleteAddrNo(listType){
@ -537,7 +487,7 @@ function fnMsgSFDetailList(msgGroupId, resultType){
}
/* 사용내역서 클릭 시 내역서 새창 팝업 오픈 */
/* 사용내역서 클릭 시 내역서 새창 팝업 오픈
function fnShowPrintPopup(tabType, type) {
//만들려는 팝업의 크기
var popup_wid = '840';
@ -553,7 +503,7 @@ function fnShowPrintPopup(tabType, type) {
$("#searchForm").attr({"action":"/web/mjon/msgsent/printMsgSentDataAjax.do", "method":"post"}).submit();
}
*/
function addrGroupDuplCnt() {
document.searchForm.addrGrpNm.value = $('#grpNm').val();
@ -744,9 +694,10 @@ function fnMjMsgReSendAll(msgGroupId, replaceCnt, electionCnt, advertisementCnt)
}
//발송결과 - 대기/성공/실패
function subContent(p_content_no){
function subContent(){
var sendData = $(document.listForm).serializeArray();
var sendData = $(document.searchForm).serializeArray();
console.log('sendData :: ', sendData);
var v_html_pre = '<table>'
+ '<caption>구분, 충전금액, 사용금액, 잔액 등 정보를 제공하는 표</caption>'
+ '<colgroup>'
@ -891,15 +842,19 @@ function subContent(p_content_no){
</div>
</div>--%>
<form id="searchForm" name="searchForm" method="post">
<input type="hidden" id="pageIndex" name="pageIndex" value="1"/>
<!-- <input type="hidden" id="pageIndex" name="pageIndex" value="1"/> -->
<input type="hidden" id="pageIndex" name="pageIndex" value="<c:out value="${searchVO.pageIndex}" />" />
<input type="hidden" id="msgGroupIdList" name="msgGroupIdList" value=""/>
<input type="hidden" id="msgGroupId" name="msgGroupId" value=""/>
<input type="hidden" name="searchSortCnd" value="<c:out value="${searchVO.searchSortCnd}" />" />
<input type="hidden" name="searchSortOrd" value="<c:out value="${searchVO.searchSortOrd}" />" />
<input type="hidden" id="tabType" name="tabType" value="all"/><!-- 탭 종류 -->
<input type="hidden" id="stateType" name="stateType" value="all"/><!-- 발송상태 종류 -->
<input type="hidden" id="listType" name="listType" value="groupList"/><!-- 리스트 종류 -->
<input type="hidden" id="addrGrpNm" name="addrGrpNm" value=""/><!-- 주소록 그룹 이름 -->
<input type="hidden" id="mberId" name="mberId" value="${LoginVO.id}"/><!-- 주소록 그룹 이름 -->
<input type="hidden" id="mberId" name="mberId" value="${LoginVO.id}"/>
<input type="hidden" id="searchCondition01" name="searchCondition01" value="${searchVO.searchCondition01}"/>
<input type="hidden" id="searchCondition02" name="searchCondition02" value="${searchVO.searchCondition02}"/>
<div class="rev_content" id="tab5_1">
@ -917,36 +872,20 @@ function subContent(p_content_no){
<div class="btn_left">
<span class="cal_label">기간선택</span>
<div class="calendar_wrap">
<input type="text" class="startDate inp calendar" title="검색 시작일" id="startDate" name="startDate" value="<c:out value='${mjonMsgSentVO.startDate}'/>" data-datecontrol="true">
<input type="text" class="searchStartDate inp calendar" title="검색 시작일" id="searchStartDate" name="searchStartDate" value="<c:out value='${mjonMsgSentVO.searchStartDate}'/>" data-datecontrol="true">
<span class="dateEtc">~</span>
<input type="text" class="endDate inp calendar" title="검색 종료일" id="endDate" name="endDate" value="<c:out value='${mjonMsgSentVO.endDate}'/>" data-datecontrol="true">
<input type="text" class="searchEndDate inp calendar" title="검색 종료일" id="searchEndDate" name="searchEndDate" value="<c:out value='${mjonMsgSentVO.searchEndDate}'/>" data-datecontrol="true">
</div>
<button type="button" onclick="setCalVal(lastfulstday,'startDate');setCalVal( lastfuledday,'endDate'); return false;" class="btnType btnType19">전월</button>
<button type="button" onclick="setCalVal(thisfulstlday,'startDate');setCalVal( thisfuledtlday,'endDate'); return false;" class="btnType btnType19">당월</button>
<button type="button" onclick="fn_G_getPrevMonth('startDate', 3);fn_G_getCurrDate('endDate'); return false;" class="btnType btnType19">3개월</button>
<button type="button" onclick="setCalVal(lastfulstday,'searchStartDate');setCalVal( lastfuledday,'searchEndDate'); return false;" class="btnType btnType19">전월</button>
<button type="button" onclick="setCalVal(thisfulstlday,'searchStartDate');setCalVal( thisfuledtlday,'searchEndDate'); return false;" class="btnType btnType19">당월</button>
<button type="button" onclick="fn_G_getPrevMonth('searchStartDate', 3);fn_G_getCurrDate('searchEndDate'); return false;" class="btnType btnType19">3개월</button>
<button type="button" class="btnType6" onClick="javascript:fnSearch(1); return false;">조회</button>
</div>
<div class="btn_right">
<%-- <label for="searchMsgType" class="label">문자형태 선택 == ${mjonMsgSentVO.searchMsgType}</label>
<select name="searchMsgType" id="searchMsgType" class="selType2">
<option value="">전체</option>
<option value="S" <c:if test="${mjonMsgSentVO.searchMsgType == 'S'}">selected</c:if> >단문</option>
<option value="L" <c:if test="${mjonMsgSentVO.searchMsgType == 'L'}">selected</c:if> >장문</option>
<option value="M" <c:if test="${mjonMsgSentVO.searchMsgType == 'M'}">selected</c:if> >그림</option>
</select> --%>
<c:if test="${appMgmt }">
<label for="searchCondition_01" class="label">발신방식 == ${mjonMsgSentVO.searchCondition}</label>
<select name="searchCondition_01" id="searchCondition_01" class="selType2 select_all_btn">
<option value="" <c:if test="${empty mjonMsgSentVO.searchCondition_01 }">selected</c:if> >발송방식 전체</option>
<option value="H" <c:if test="${mjonMsgSentVO.searchCondition_01 == 'H'}">selected</c:if> >WEB</option>
<option value="A" <c:if test="${mjonMsgSentVO.searchCondition_01 == 'A'}">selected</c:if> >API</option>
</select>
</c:if>
<label for="searchCondition" class="label">발신번호 선택 == ${mjonMsgSentVO.searchCondition}</label>
<label for="searchCondition" class="label">검색 조건: ${mjonMsgSentVO.searchCondition == '2' ? '발신번호' : '문자내용'}</label>
<select name="searchCondition" id="searchCondition" class="selType2 select_btn">
<option value="2" <c:if test="${mjonMsgSentVO.searchCondition == '2'}">selected</c:if> >발신번호</option>
<option value="3" <c:if test="${mjonMsgSentVO.searchCondition == '3'}">selected</c:if> >수신번호</option>
<option value="3" <c:if test="${mjonMsgSentVO.searchCondition == '3'}">selected</c:if> >문자내용</option>
</select>
<div class="search">
<label for="id" class="label"></label>
@ -962,10 +901,10 @@ function subContent(p_content_no){
<div class="list_tab_wrap2 type4">
<!-- tab button -->
<ul class="list_tab">
<li class="tab active"><button type="button" onclick="fnTabLoad('',0); return false;">전체</button></li>
<li class="tab"><button type="button" onclick="fnTabLoad('S',1); return false;">단문(SMS)</button></li>
<li class="tab"><button type="button" onclick="fnTabLoad('L',2); return false;">장문(LMS)</button></li>
<li class="tab"><button type="button" onclick="fnTabLoad('M',3); return false;">그림(MMS)</button></li>
<li class="tab active"><button type="button" onclick="fnTabLoad(''); return false;">전체</button></li>
<li class="tab"><button type="button" onclick="fnTabLoad('S'); return false;">단문(SMS)</button></li>
<li class="tab"><button type="button" onclick="fnTabLoad('L'); return false;">장문(LMS)</button></li>
<li class="tab"><button type="button" onclick="fnTabLoad('M'); return false;">그림(MMS)</button></li>
</ul><!--// tab button -->
</div>
<!-- 예약관리 > 전체 -->
@ -983,9 +922,15 @@ function subContent(p_content_no){
<!-- tab button -->
<ul>
<li class="tab active"><button type="button">전체</button></li>
<li class="tab"><button type="button">즉시</button></li>
<li class="tab"><button type="button">예약</button></li>
<li class="tab ${empty searchVO.searchCondition_01 ? 'active' : ''}">
<button type="button" class="sendKindBtn" data-info="">전체</button>
</li>
<li class="tab ${searchVO.searchCondition_01 == '0' ? 'active' : ''}">
<button type="button" class="sendKindBtn" data-info="N">즉시</button>
</li>
<li class="tab ${searchVO.searchCondition_01 == '1' ? 'active' : ''}">
<button type="button" class="sendKindBtn" data-info="Y">예약</button>
</li>
</ul>
<!--// tab button -->

View File

@ -25,14 +25,14 @@ $(document).ready(function(){
</script>
<div class="rev_admin_in">
<div class="rev_admin_in">
<div class="rev_admin_top clearfix">
<p>전체</p>
<c:set var="allTotal" value="${H_allSentCntVO.totCnt + A_allSentCntVO.totCnt }" />
<c:set var="allTotal" value="${H_smsSentCntVO.totCnt + H_lmsSentCntVO.totCnt + H_mmsSentCntVO.totCnt}" />
<p><span><fmt:formatNumber value="${allTotal }" pattern="#,###"/></span> 건</p>
</div>
<div class="rev_admin_btm admin_btm">
<P class="title_top">WEB<span class="title_num"><fmt:formatNumber value="${H_allSentCntVO.totCnt}" pattern="#,###"/><span>건</span></span></P>
<div class="rev_admin_btm">
<%-- <P class="title_top">WEB<span class="title_num"><fmt:formatNumber value="${H_allSentCntVO.totCnt}" pattern="#,###"/><span>건</span></span></P> --%>
<dl>
<dt>대기</dt>
<dd><span class="c_002c9a"><fmt:formatNumber value="${H_allSentCntVO.waitCnt}" pattern="#,###"/></span>건</dd>
@ -46,7 +46,7 @@ $(document).ready(function(){
<dd><span class="c_e40000"><fmt:formatNumber value="${H_allSentCntVO.failCnt}" pattern="#,###"/></span>건</dd>
</dl>
</div>
<c:if test="${appMgmt }">
<%-- <c:if test="${appMgmt }">
<div class="rev_admin_btm admin_btm admin_btm_api">
<P class="title_top">API<span class="title_num"><fmt:formatNumber value="${A_allSentCntVO.totCnt}" pattern="#,###"/><span>건</span></span></P>
<dl>
@ -62,16 +62,16 @@ $(document).ready(function(){
<dd><span class="c_e40000"><fmt:formatNumber value="${A_allSentCntVO.failCnt}" pattern="#,###"/></span>건</dd>
</dl>
</div>
</c:if>
</c:if> --%>
</div>
<div class="rev_admin_in">
<div class="rev_admin_top clearfix">
<p>단문(SMS)</p>
<c:set var="smsTotal" value="${H_smsSentCntVO.totCnt + A_smsSentCntVO.totCnt }" />
<c:set var="smsTotal" value="${H_smsSentCntVO.totCnt }" />
<p><span><fmt:formatNumber value="${smsTotal }" pattern="#,###"/></span> 건</p>
</div>
<div class="rev_admin_btm admin_btm">
<P class="title_top">WEB<span class="title_num"><fmt:formatNumber value="${H_smsSentCntVO.totCnt}" pattern="#,###"/><span>건</span></span></P>
<div class="rev_admin_btm">
<%-- <P class="title_top">WEB<span class="title_num"><fmt:formatNumber value="${H_smsSentCntVO.totCnt}" pattern="#,###"/><span>건</span></span></P> --%>
<dl>
<dt>대기</dt>
<dd><span class="c_002c9a"><fmt:formatNumber value="${H_smsSentCntVO.waitCnt}" pattern="#,###"/></span>건</dd>
@ -85,7 +85,7 @@ $(document).ready(function(){
<dd><span class="c_e40000"><fmt:formatNumber value="${H_smsSentCntVO.failCnt}" pattern="#,###"/></span>건</dd>
</dl>
</div>
<c:if test="${appMgmt }">
<%-- <c:if test="${appMgmt }">
<div class="rev_admin_btm admin_btm admin_btm_api">
<P class="title_top">API<span class="title_num"><fmt:formatNumber value="${A_smsSentCntVO.totCnt}" pattern="#,###"/><span>건</span></span></P>
<dl>
@ -101,16 +101,16 @@ $(document).ready(function(){
<dd><span class="c_e40000"><fmt:formatNumber value="${A_smsSentCntVO.failCnt}" pattern="#,###"/></span>건</dd>
</dl>
</div>
</c:if>
</c:if> --%>
</div>
<div class="rev_admin_in">
<div class="rev_admin_top clearfix">
<p>장문(LMS)</p>
<c:set var="lmsTotal" value="${H_lmsSentCntVO.totCnt + A_lmsSentCntVO.totCnt }" />
<c:set var="lmsTotal" value="${H_lmsSentCntVO.totCnt }" />
<p><span><fmt:formatNumber value="${lmsTotal }" pattern="#,###"/></span> 건</p>
</div>
<div class="rev_admin_btm admin_btm">
<P class="title_top">WEB<span class="title_num"><fmt:formatNumber value="${H_lmsSentCntVO.totCnt}" pattern="#,###"/><span>건</span></span></P>
<div class="rev_admin_btm">
<%-- <P class="title_top">WEB<span class="title_num"><fmt:formatNumber value="${H_lmsSentCntVO.totCnt}" pattern="#,###"/><span>건</span></span></P> --%>
<dl>
<dt>대기</dt>
<dd><span class="c_002c9a"><fmt:formatNumber value="${H_lmsSentCntVO.waitCnt}" pattern="#,###"/></span>건</dd>
@ -124,7 +124,7 @@ $(document).ready(function(){
<dd><span class="c_e40000"><fmt:formatNumber value="${H_lmsSentCntVO.failCnt}" pattern="#,###"/></span>건</dd>
</dl>
</div>
<c:if test="${appMgmt }">
<%-- <c:if test="${appMgmt }">
<div class="rev_admin_btm admin_btm admin_btm_api">
<P class="title_top">API<span class="title_num"><fmt:formatNumber value="${A_lmsSentCntVO.totCnt}" pattern="#,###"/><span>건</span></span></P>
<dl>
@ -140,16 +140,16 @@ $(document).ready(function(){
<dd><span class="c_e40000"><fmt:formatNumber value="${A_lmsSentCntVO.failCnt}" pattern="#,###"/></span>건</dd>
</dl>
</div>
</c:if>
</c:if> --%>
</div>
<div class="rev_admin_in">
<div class="rev_admin_top clearfix">
<p>그림(MMS)</p>
<c:set var="mmsTotal" value="${H_mmsSentCntVO.totCnt + A_mmsSentCntVO.totCnt }" />
<c:set var="mmsTotal" value="${H_mmsSentCntVO.totCnt }" />
<p><span><fmt:formatNumber value="${mmsTotal }" pattern="#,###"/></span> 건</p>
</div>
<div class="rev_admin_btm admin_btm">
<P class="title_top">WEB<span class="title_num"><fmt:formatNumber value="${H_mmsSentCntVO.totCnt}" pattern="#,###"/><span>건</span></span></P>
<div class="rev_admin_btm">
<%-- <P class="title_top">WEB<span class="title_num"><fmt:formatNumber value="${H_mmsSentCntVO.totCnt}" pattern="#,###"/><span>건</span></span></P> --%>
<dl>
<dt>대기</dt>
<dd><span class="c_002c9a"><fmt:formatNumber value="${H_mmsSentCntVO.waitCnt}" pattern="#,###"/></span>건</dd>
@ -163,7 +163,7 @@ $(document).ready(function(){
<dd><span class="c_e40000"><fmt:formatNumber value="${H_mmsSentCntVO.failCnt}" pattern="#,###"/></span>건</dd>
</dl>
</div>
<c:if test="${appMgmt }">
<%-- <c:if test="${appMgmt }">
<div class="rev_admin_btm admin_btm admin_btm_api">
<P class="title_top">API<span class="title_num"><fmt:formatNumber value="${A_mmsSentCntVO.totCnt}" pattern="#,###"/><span>건</span></span></P>
<dl>
@ -179,5 +179,5 @@ $(document).ready(function(){
<dd><span class="c_e40000"><fmt:formatNumber value="${A_mmsSentCntVO.failCnt}" pattern="#,###"/></span>건</dd>
</dl>
</div>
</c:if>
</c:if> --%>
</div>