--- pom.xml
+++ pom.xml
... | ... | @@ -144,11 +144,12 @@ |
| 144 | 144 |
<version>1.1.2</version> |
| 145 | 145 |
</dependency> |
| 146 | 146 |
|
| 147 |
- <dependency> |
|
| 148 |
- <groupId>cglib</groupId> |
|
| 149 |
- <artifactId>cglib</artifactId> |
|
| 150 |
- <version>3.1</version> |
|
| 151 |
- </dependency> |
|
| 147 |
+ <!-- https://mvnrepository.com/artifact/cglib/cglib --> |
|
| 148 |
+ <dependency> |
|
| 149 |
+ <groupId>cglib</groupId> |
|
| 150 |
+ <artifactId>cglib</artifactId> |
|
| 151 |
+ <version>3.3.0</version> |
|
| 152 |
+ </dependency> |
|
| 152 | 153 |
|
| 153 | 154 |
<dependency> |
| 154 | 155 |
<groupId>org.antlr</groupId> |
--- src/main/java/itn/com/cmm/util/DateUtils.java
+++ src/main/java/itn/com/cmm/util/DateUtils.java
... | ... | @@ -3,6 +3,7 @@ |
| 3 | 3 |
import java.text.ParseException; |
| 4 | 4 |
import java.text.SimpleDateFormat; |
| 5 | 5 |
import java.time.LocalDate; |
| 6 |
+import java.time.LocalDateTime; |
|
| 6 | 7 |
import java.time.format.DateTimeFormatter; |
| 7 | 8 |
import java.time.temporal.ChronoUnit; |
| 8 | 9 |
import java.util.Date; |
... | ... | @@ -185,4 +186,20 @@ |
| 185 | 186 |
|
| 186 | 187 |
return isValid; |
| 187 | 188 |
} |
| 189 |
+ |
|
| 190 |
+ public static String setStrToDataFormatter(String str, String formatter) {
|
|
| 191 |
+ |
|
| 192 |
+ // 입력 문자열을 LocalDateTime으로 변환 |
|
| 193 |
+ DateTimeFormatter inputFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
| 194 |
+ LocalDateTime dateTime = LocalDateTime.parse(str, inputFormatter); |
|
| 195 |
+ |
|
| 196 |
+ // 원하는 출력 포맷 적용 |
|
| 197 |
+ DateTimeFormatter outputFormatter = DateTimeFormatter.ofPattern(formatter); |
|
| 198 |
+ String formattedDate = dateTime.format(outputFormatter); |
|
| 199 |
+ |
|
| 200 |
+ return formattedDate; |
|
| 201 |
+ } |
|
| 202 |
+ |
|
| 203 |
+ |
|
| 204 |
+ |
|
| 188 | 205 |
} |
--- src/main/java/itn/com/cmm/util/FileUtil.java
+++ src/main/java/itn/com/cmm/util/FileUtil.java
... | ... | @@ -25,45 +25,44 @@ |
| 25 | 25 |
*/ |
| 26 | 26 |
public final class FileUtil {
|
| 27 | 27 |
|
| 28 |
- /** |
|
| 29 |
- * @methodName : downLoad |
|
| 30 |
- * @author : 이호영 |
|
| 31 |
- * @date : 2023.04.06 |
|
| 32 |
- * @description : 파일 다운로드 |
|
| 33 |
- * @param response |
|
| 34 |
- * @param fileInfo |
|
| 35 |
- * @param fileName |
|
| 36 |
- * @throws Exception |
|
| 37 |
- */ |
|
| 38 |
- public static void downLoad(HttpServletResponse response, String fileInfo, String fileNameP) throws Exception {
|
|
| 39 |
- |
|
| 40 |
- |
|
| 41 |
- try {
|
|
| 42 |
- String path = fileInfo; // 경로에 접근할 때 역슬래시('\') 사용
|
|
| 43 |
- |
|
| 44 |
- File file = new File(path); |
|
| 45 |
- |
|
| 46 |
- String fileName = ""; |
|
| 47 |
- if(StringUtils.isNotEmpty(fileNameP)) |
|
| 48 |
- fileName = URLEncoder.encode(fileNameP,"UTF-8").replaceAll("\\+", "%20");
|
|
| 49 |
- else |
|
| 50 |
- fileName = file.getName(); |
|
| 51 |
- |
|
| 52 |
- response.setHeader("Content-Disposition", "attachment;filename=" + fileName); // 다운로드 되거나 로컬에 저장되는 용도로 쓰이는지를 알려주는 헤더
|
|
| 53 |
- |
|
| 54 |
- FileInputStream fileInputStream = new FileInputStream(path); // 파일 읽어오기 |
|
| 55 |
- OutputStream out = response.getOutputStream(); |
|
| 56 |
- |
|
| 57 |
- int read = 0; |
|
| 58 |
- byte[] buffer = new byte[1024]; |
|
| 59 |
- while ((read = fileInputStream.read(buffer)) != -1) { // 1024바이트씩 계속 읽으면서 outputStream에 저장, -1이 나오면 더이상 읽을 파일이 없음
|
|
| 60 |
- out.write(buffer, 0, read); |
|
| 61 |
- } |
|
| 62 |
- |
|
| 63 |
- } catch (Exception e) {
|
|
| 64 |
- throw new Exception("download error");
|
|
| 65 |
- } |
|
| 28 |
+ /** |
|
| 29 |
+ * @methodName : downLoad |
|
| 30 |
+ * @author : 이호영 |
|
| 31 |
+ * @date : 2023.04.06 |
|
| 32 |
+ * @description : 파일 다운로드 |
|
| 33 |
+ * @param response |
|
| 34 |
+ * @param fileInfo |
|
| 35 |
+ * @param fileName |
|
| 36 |
+ * @throws Exception |
|
| 37 |
+ */ |
|
| 38 |
+ public static void downLoad(HttpServletResponse response, String fileInfo, String fileNameP) throws Exception {
|
|
| 39 |
+ |
|
| 40 |
+ |
|
| 41 |
+ try {
|
|
| 42 |
+ String path = fileInfo; // 경로에 접근할 때 역슬래시('\') 사용
|
|
| 43 |
+ |
|
| 44 |
+ File file = new File(path); |
|
| 45 |
+ |
|
| 46 |
+ String fileName = ""; |
|
| 47 |
+ if(StringUtils.isNotEmpty(fileNameP)) |
|
| 48 |
+ fileName = URLEncoder.encode(fileNameP,"UTF-8").replaceAll("\\+", "%20");
|
|
| 49 |
+ else |
|
| 50 |
+ fileName = file.getName(); |
|
| 51 |
+ |
|
| 52 |
+ response.setHeader("Content-Disposition", "attachment;filename=" + fileName); // 다운로드 되거나 로컬에 저장되는 용도로 쓰이는지를 알려주는 헤더
|
|
| 53 |
+ |
|
| 54 |
+ FileInputStream fileInputStream = new FileInputStream(path); // 파일 읽어오기 |
|
| 55 |
+ OutputStream out = response.getOutputStream(); |
|
| 56 |
+ |
|
| 57 |
+ int read = 0; |
|
| 58 |
+ byte[] buffer = new byte[1024]; |
|
| 59 |
+ while ((read = fileInputStream.read(buffer)) != -1) { // 1024바이트씩 계속 읽으면서 outputStream에 저장, -1이 나오면 더이상 읽을 파일이 없음
|
|
| 60 |
+ out.write(buffer, 0, read); |
|
| 61 |
+ } |
|
| 62 |
+ } catch (Exception e) {
|
|
| 63 |
+ throw new Exception("download error");
|
|
| 64 |
+ } |
|
| 66 | 65 |
} |
| 67 |
- |
|
| 68 |
- |
|
| 66 |
+ |
|
| 67 |
+ |
|
| 69 | 68 |
} |
--- src/main/java/itn/com/cmm/util/MsgSendUtils.java
+++ src/main/java/itn/com/cmm/util/MsgSendUtils.java
... | ... | @@ -23,6 +23,7 @@ |
| 23 | 23 |
import itn.com.cmm.OptimalMsgResultDTO; |
| 24 | 24 |
import itn.let.mail.service.StatusResponse; |
| 25 | 25 |
import itn.let.mjo.event.service.MjonEventVO; |
| 26 |
+import itn.let.mjo.mjocommon.MjonCommon; |
|
| 26 | 27 |
import itn.let.mjo.msg.service.MjonMsgVO; |
| 27 | 28 |
import itn.let.mjo.msgagent.service.MjonMsgAgentStsVO; |
| 28 | 29 |
import itn.let.mjo.spammsg.web.ComGetSpamStringParser; |
... | ... | @@ -55,26 +56,6 @@ |
| 55 | 56 |
// 이벤트 최저 잔액 |
| 56 | 57 |
public static final double MIN_EVENT_REMAIN_CASH = 7.5; // 이벤트 최소 잔액 |
| 57 | 58 |
|
| 58 |
- /** |
|
| 59 |
- * @methodName : getSmsTxtBytes |
|
| 60 |
- * @author : 이호영 |
|
| 61 |
- * @date : 2024.09.23 |
|
| 62 |
- * @description : sms 텍스트 바이트 계산 후 return; |
|
| 63 |
- * @param smsTxt |
|
| 64 |
- * @return |
|
| 65 |
- * @throws UnsupportedEncodingException |
|
| 66 |
- */ |
|
| 67 |
- public static int getSmsTxtBytes(String smsTxt) throws UnsupportedEncodingException { //문자열 길이 체크 해주기
|
|
| 68 |
- int smsBytes = 0; |
|
| 69 |
- //문자 바이트 계산에 필요한 캐릭터 셋 : 한글 2Byte로 계산 |
|
| 70 |
- String charset = "euc-kr"; |
|
| 71 |
- if(StringUtils.isNotEmpty(smsTxt)) {
|
|
| 72 |
- String smsCont = smsTxt.replace("\r\n", "\n");
|
|
| 73 |
- smsBytes = smsCont.getBytes(charset).length; |
|
| 74 |
- } |
|
| 75 |
-// log.info(" + smsBytes :: [{}]", smsBytes);
|
|
| 76 |
- return smsBytes; |
|
| 77 |
- } |
|
| 78 | 59 |
|
| 79 | 60 |
/** |
| 80 | 61 |
* @methodName : getMsgType |
... | ... | @@ -96,7 +77,7 @@ |
| 96 | 77 |
// msgType = "4"; |
| 97 | 78 |
// } |
| 98 | 79 |
|
| 99 |
- int smsTxtByte = getSmsTxtBytes(p_smsTxt); |
|
| 80 |
+ int smsTxtByte = MjonCommon.getSmsTxtBytes(p_smsTxt); |
|
| 100 | 81 |
String msgType = SHORT_MSG_TYPE; |
| 101 | 82 |
|
| 102 | 83 |
// 1. 2000 Byte 초과는 에러 처리 |
... | ... | @@ -276,7 +257,6 @@ |
| 276 | 257 |
for (Map.Entry<String, Function<MjonMsgSendVO, String>> entry : placeholders.entrySet()) {
|
| 277 | 258 |
String placeholder = entry.getKey(); |
| 278 | 259 |
String value = entry.getValue().apply(sendVO); |
| 279 |
- System.out.println("");
|
|
| 280 | 260 |
// log.info(" + smsTxtTemp [{}]", smsTxtTemp);
|
| 281 | 261 |
// log.info(" + placeholder [{}]", placeholder);
|
| 282 | 262 |
// log.info(" + value [{}]", value);
|
... | ... | @@ -649,7 +629,7 @@ |
| 649 | 629 |
// 각 가격을 합산 |
| 650 | 630 |
totalPrice += Float.parseFloat(eachPrice); |
| 651 | 631 |
} |
| 652 |
- |
|
| 632 |
+ mjonMsgVO.setTotalPrice(totalPrice); |
|
| 653 | 633 |
|
| 654 | 634 |
} |
| 655 | 635 |
|
+++ src/main/java/itn/com/cmm/util/SlackMessageFormatUtil.java
... | ... | @@ -0,0 +1,145 @@ |
| 1 | +package itn.com.cmm.util; | |
| 2 | + | |
| 3 | +import org.apache.commons.lang3.StringUtils; | |
| 4 | + | |
| 5 | +import itn.let.kakao.kakaoComm.KakaoSendAdvcVO; | |
| 6 | +import itn.let.kakao.kakaoComm.KakaoVO; | |
| 7 | +import itn.let.mjo.msg.service.MjonMsgVO; | |
| 8 | + | |
| 9 | +public class SlackMessageFormatUtil { | |
| 10 | + | |
| 11 | + private static final String PREFIX_SMISHING = "[스미싱의심]"; | |
| 12 | + private static final String PREFIX_RESERVE = "[예약]"; | |
| 13 | + private static final String PREFIX_IMAGE = "그림문자 "; | |
| 14 | + | |
| 15 | + /** | |
| 16 | + * 일반 SMS 메시지 텍스트 포맷팅 | |
| 17 | + */ | |
| 18 | + public static String formatSmsText(MjonMsgVO mjonMsgVO) { | |
| 19 | + String smsTxt = mjonMsgVO.getSmsTxt(); | |
| 20 | + String reserveYn = safeGetString(mjonMsgVO.getReserveYn()); | |
| 21 | + String delayYn = safeGetString(mjonMsgVO.getDelayYn()); | |
| 22 | + String smishingYn = safeGetString(mjonMsgVO.getSmishingYn()); | |
| 23 | + | |
| 24 | + // 공통 텍스트 포맷팅 로직 적용 | |
| 25 | + smsTxt = formatMessagePrefix(smsTxt, reserveYn, | |
| 26 | + "Y".equals(smishingYn) || "Y".equals(delayYn)); | |
| 27 | + | |
| 28 | + // 그림 문자 처리 (SMS 전용 로직) | |
| 29 | + int fileCount = parseIntOrDefault(mjonMsgVO.getFileCnt(), 0); | |
| 30 | + if ("6".equals(mjonMsgVO.getMsgType()) && fileCount > 0 && StringUtils.isEmpty(smsTxt)) { | |
| 31 | + smsTxt = "그림문자 " + smsTxt; | |
| 32 | + } | |
| 33 | + | |
| 34 | + return smsTxt; | |
| 35 | + } | |
| 36 | + | |
| 37 | + /** | |
| 38 | + * 카카오톡 메시지 텍스트 포맷팅 | |
| 39 | + */ | |
| 40 | + public static String formatKakaoText(KakaoSendAdvcVO sendVO) { | |
| 41 | + String smsTxt = sendVO.getTemplateContent(); | |
| 42 | + String reserveYn = safeGetString(sendVO.getReserveYn()); | |
| 43 | + String atDelayYn = safeGetString(sendVO.getAtDelayYn()); | |
| 44 | + | |
| 45 | + // 공통 텍스트 포맷팅 로직 적용 | |
| 46 | + return formatMessagePrefix(smsTxt, reserveYn, "Y".equals(atDelayYn)); | |
| 47 | + } | |
| 48 | + | |
| 49 | + | |
| 50 | + public static String formatSandName(MjonMsgVO mjonMsgVO) { | |
| 51 | + String userId = mjonMsgVO.getUserId(); | |
| 52 | + String callFrom = mjonMsgVO.getCallFrom(); | |
| 53 | + String msgType = getMessageTypeLabel(mjonMsgVO.getMsgType(), mjonMsgVO.getFileCnt()); | |
| 54 | + return String.format("[%s][%s]%s", userId, callFrom, msgType); | |
| 55 | + } | |
| 56 | + | |
| 57 | + /** | |
| 58 | + * 메시지 접두사 포맷팅 공통 로직 (예약 및 스미싱 의심 접두사 처리) | |
| 59 | + * | |
| 60 | + * @param messageText 원본 메시지 텍스트 | |
| 61 | + * @param reserveYn 예약 여부 | |
| 62 | + * @param isSmishing 스미싱 의심 여부 | |
| 63 | + * @return 포맷팅된 메시지 텍스트 | |
| 64 | + */ | |
| 65 | + public static String formatMessagePrefix(String messageText, String reserveYn, boolean isSmishing) { | |
| 66 | + if ("Y".equals(reserveYn)) { | |
| 67 | + return isSmishing ? PREFIX_SMISHING + PREFIX_RESERVE + messageText : PREFIX_RESERVE + messageText; | |
| 68 | + } else if (isSmishing) { | |
| 69 | + return PREFIX_SMISHING + messageText; | |
| 70 | + } | |
| 71 | + return messageText; | |
| 72 | + } | |
| 73 | + | |
| 74 | + /** | |
| 75 | + * @카카오톡용 sandName 포맷팅 메서드 | |
| 76 | + */ | |
| 77 | + public static String formatKakaoSandName(KakaoSendAdvcVO sendVO) { | |
| 78 | + String userId = sendVO.getUserId(); | |
| 79 | + String callFrom = sendVO.getCallFrom(); | |
| 80 | + String msgType = getKakaoMessageTypeLabel(sendVO.getMsgType()); | |
| 81 | + return String.format("[%s][%s]%s", userId, callFrom, msgType); | |
| 82 | + } | |
| 83 | + | |
| 84 | + /** | |
| 85 | + * 메시지 타입 레이블 반환 (SMS 전용) | |
| 86 | + * | |
| 87 | + * @param msgType 메시지 타입 | |
| 88 | + * @param fileCnt 파일 개수 | |
| 89 | + * @return 메시지 타입 레이블 | |
| 90 | + */ | |
| 91 | + public static String getMessageTypeLabel(String msgType, String fileCnt) { | |
| 92 | + int fileCount = parseIntOrDefault(fileCnt, 0); | |
| 93 | + | |
| 94 | + switch (msgType) { | |
| 95 | + case "4": | |
| 96 | + return "[단문]"; | |
| 97 | + case "6": | |
| 98 | + return fileCount == 0 ? "[장문]" : "[그림]"; | |
| 99 | + default: | |
| 100 | + return ""; | |
| 101 | + } | |
| 102 | + } | |
| 103 | + | |
| 104 | + /** | |
| 105 | + * 카카오톡 메시지 타입 레이블 반환 | |
| 106 | + * | |
| 107 | + * @param msgType 메시지 타입 | |
| 108 | + * @return 메시지 타입 레이블 | |
| 109 | + */ | |
| 110 | + public static String getKakaoMessageTypeLabel(String msgType) { | |
| 111 | + switch (msgType) { | |
| 112 | + case "8": | |
| 113 | + return "[알림톡]"; | |
| 114 | + case "9": | |
| 115 | + return "[친구톡]"; | |
| 116 | + default: | |
| 117 | + return ""; | |
| 118 | + } | |
| 119 | + } | |
| 120 | + | |
| 121 | + /** | |
| 122 | + * 정수로 변환, 변환 실패 시 기본값 반환 | |
| 123 | + * | |
| 124 | + * @param value 변환할 문자열 | |
| 125 | + * @param defaultValue 기본값 | |
| 126 | + * @return 변환된 정수 또는 기본값 | |
| 127 | + */ | |
| 128 | + public static int parseIntOrDefault(String value, int defaultValue) { | |
| 129 | + try { | |
| 130 | + return Integer.parseInt(value); | |
| 131 | + } catch (NumberFormatException e) { | |
| 132 | + return defaultValue; | |
| 133 | + } | |
| 134 | + } | |
| 135 | + | |
| 136 | + /** | |
| 137 | + * 안전하게 문자열 가져오기 (null 체크) | |
| 138 | + * | |
| 139 | + * @param value 원본 문자열 | |
| 140 | + * @return 원본 문자열 또는 빈 문자열 | |
| 141 | + */ | |
| 142 | + public static String safeGetString(String value) { | |
| 143 | + return value == null ? "" : value; | |
| 144 | + } | |
| 145 | +} |
--- src/main/java/itn/com/uss/ion/bnr/pop/service/MainPopupLinkVO.java
+++ src/main/java/itn/com/uss/ion/bnr/pop/service/MainPopupLinkVO.java
... | ... | @@ -35,5 +35,6 @@ |
| 35 | 35 |
private String popId; // 메인존ID |
| 36 | 36 |
private String mlink; // 링크 |
| 37 | 37 |
private String coords; // 링크좌표 |
| 38 |
+ private String popLinkId; // 링크좌표 |
|
| 38 | 39 |
|
| 39 | 40 |
} |
--- src/main/java/itn/com/uss/ion/bnr/pop/service/MainPopupManageService.java
+++ src/main/java/itn/com/uss/ion/bnr/pop/service/MainPopupManageService.java
... | ... | @@ -1,13 +1,8 @@ |
| 1 | 1 |
package itn.com.uss.ion.bnr.pop.service; |
| 2 | 2 |
|
| 3 | 3 |
import java.util.List; |
| 4 |
-import java.util.Map; |
|
| 5 | 4 |
|
| 6 |
-import itn.com.uss.ion.pwm.service.MainzoneVO; |
|
| 7 |
-import itn.com.uss.ion.pwm.service.PopupManageVO; |
|
| 8 |
-import itn.com.uss.ion.pwm.service.PopupzoneVO; |
|
| 9 |
-import itn.com.uss.ion.pwm.service.SocialVO; |
|
| 10 |
-import itn.com.uss.ion.pwm.service.SortVO; |
|
| 5 |
+import itn.com.cmm.RestResponse; |
|
| 11 | 6 |
|
| 12 | 7 |
/** |
| 13 | 8 |
* 개요 |
... | ... | @@ -34,4 +29,6 @@ |
| 34 | 29 |
|
| 35 | 30 |
public void resetMainPopupSort(MainPopupVO mainPopupVO); |
| 36 | 31 |
|
| 32 |
+ public RestResponse deleteMainPopupLink(MainPopupLinkVO mainPopupLinkVO); |
|
| 33 |
+ |
|
| 37 | 34 |
}(No newline at end of file) |
--- src/main/java/itn/com/uss/ion/bnr/pop/service/impl/MainPopupManageDAO.java
+++ src/main/java/itn/com/uss/ion/bnr/pop/service/impl/MainPopupManageDAO.java
... | ... | @@ -4,6 +4,7 @@ |
| 4 | 4 |
import org.springframework.stereotype.Repository; |
| 5 | 5 |
|
| 6 | 6 |
import itn.com.cmm.service.impl.EgovComAbstractDAO; |
| 7 |
+import itn.com.uss.ion.bnr.pop.service.MainPopupLinkVO; |
|
| 7 | 8 |
import itn.com.uss.ion.bnr.pop.service.MainPopupVO; |
| 8 | 9 |
|
| 9 | 10 |
/** |
... | ... | @@ -46,8 +47,8 @@ |
| 46 | 47 |
} |
| 47 | 48 |
|
| 48 | 49 |
|
| 49 |
- public void deleteMainPopup(String mazId) {
|
|
| 50 |
- delete("mainPopup.deleteMainPopup", mazId);
|
|
| 50 |
+ public void deleteMainPopup(String popId) {
|
|
| 51 |
+ delete("mainPopup.deleteMainPopup", popId);
|
|
| 51 | 52 |
} |
| 52 | 53 |
|
| 53 | 54 |
|
... | ... | @@ -55,4 +56,7 @@ |
| 55 | 56 |
update("mainPopup.resetMainPopupSort", mainPopupVO);
|
| 56 | 57 |
} |
| 57 | 58 |
|
| 59 |
+ public void deleteMainPopupLinkInfo(MainPopupLinkVO mainPopupLinkVO) {
|
|
| 60 |
+ delete("mainPopup.deleteMainPopupLinkInfo", mainPopupLinkVO);
|
|
| 61 |
+ } |
|
| 58 | 62 |
}(No newline at end of file) |
--- src/main/java/itn/com/uss/ion/bnr/pop/service/impl/MainPopupManageServiceImpl.java
+++ src/main/java/itn/com/uss/ion/bnr/pop/service/impl/MainPopupManageServiceImpl.java
... | ... | @@ -4,12 +4,16 @@ |
| 4 | 4 |
|
| 5 | 5 |
import javax.annotation.Resource; |
| 6 | 6 |
|
| 7 |
+import org.springframework.http.HttpStatus; |
|
| 7 | 8 |
import org.springframework.stereotype.Service; |
| 8 | 9 |
|
| 9 | 10 |
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl; |
| 10 | 11 |
import egovframework.rte.fdl.idgnr.EgovIdGnrService; |
| 12 |
+import itn.com.cmm.RestResponse; |
|
| 13 |
+import itn.com.uss.ion.bnr.pop.service.MainPopupLinkVO; |
|
| 11 | 14 |
import itn.com.uss.ion.bnr.pop.service.MainPopupManageService; |
| 12 | 15 |
import itn.com.uss.ion.bnr.pop.service.MainPopupVO; |
| 16 |
+import itn.com.uss.ion.pwm.service.impl.PopupManageDAO; |
|
| 13 | 17 |
|
| 14 | 18 |
/** |
| 15 | 19 |
* 개요 |
... | ... | @@ -29,7 +33,9 @@ |
| 29 | 33 |
@Resource(name = "mainPopupManageDAO") |
| 30 | 34 |
public MainPopupManageDAO dao; |
| 31 | 35 |
|
| 32 |
- |
|
| 36 |
+ @Resource(name = "popupManageDAO") |
|
| 37 |
+ public PopupManageDAO popupDao; |
|
| 38 |
+ |
|
| 33 | 39 |
@Resource(name = "egovPopupManageIdGnrService") |
| 34 | 40 |
private EgovIdGnrService idgenService; |
| 35 | 41 |
|
... | ... | @@ -59,6 +65,7 @@ |
| 59 | 65 |
|
| 60 | 66 |
@Override |
| 61 | 67 |
public void deleteMainPopup(String id) {
|
| 68 |
+ popupDao.deleteMainPopupLinkInfo(id); |
|
| 62 | 69 |
dao.deleteMainPopup(id); |
| 63 | 70 |
} |
| 64 | 71 |
|
... | ... | @@ -68,5 +75,15 @@ |
| 68 | 75 |
|
| 69 | 76 |
} |
| 70 | 77 |
|
| 78 |
+ @Override |
|
| 79 |
+ public RestResponse deleteMainPopupLink(MainPopupLinkVO mainPopupLinkVO) {
|
|
| 80 |
+ dao.deleteMainPopupLinkInfo(mainPopupLinkVO); |
|
| 81 |
+ |
|
| 82 |
+ return RestResponse.builder() |
|
| 83 |
+ .status(HttpStatus.OK) // 200, Series.SUCCESSFUL, "OK" |
|
| 84 |
+ .msg("삭제 되었습니다.")
|
|
| 85 |
+ .build(); |
|
| 86 |
+ |
|
| 87 |
+ } |
|
| 71 | 88 |
|
| 72 | 89 |
}(No newline at end of file) |
--- src/main/java/itn/com/uss/ion/bnr/pop/web/MainPopupController.java
+++ src/main/java/itn/com/uss/ion/bnr/pop/web/MainPopupController.java
... | ... | @@ -12,11 +12,15 @@ |
| 12 | 12 |
import org.slf4j.Logger; |
| 13 | 13 |
import org.slf4j.LoggerFactory; |
| 14 | 14 |
import org.springframework.beans.factory.annotation.Autowired; |
| 15 |
+import org.springframework.http.HttpStatus; |
|
| 16 |
+import org.springframework.http.ResponseEntity; |
|
| 15 | 17 |
import org.springframework.stereotype.Controller; |
| 16 | 18 |
import org.springframework.ui.Model; |
| 17 | 19 |
import org.springframework.ui.ModelMap; |
| 20 |
+import org.springframework.web.bind.annotation.RequestBody; |
|
| 18 | 21 |
import org.springframework.web.bind.annotation.RequestMapping; |
| 19 | 22 |
import org.springframework.web.bind.annotation.RequestParam; |
| 23 |
+import org.springframework.web.bind.annotation.ResponseBody; |
|
| 20 | 24 |
import org.springframework.web.servlet.mvc.support.RedirectAttributes; |
| 21 | 25 |
import org.springmodules.validation.commons.DefaultBeanValidator; |
| 22 | 26 |
|
... | ... | @@ -27,15 +31,16 @@ |
| 27 | 31 |
import itn.com.cmm.ComDefaultCodeVO; |
| 28 | 32 |
import itn.com.cmm.EgovMessageSource; |
| 29 | 33 |
import itn.com.cmm.LoginVO; |
| 34 |
+import itn.com.cmm.RestResponse; |
|
| 30 | 35 |
import itn.com.cmm.service.EgovCmmUseService; |
| 31 | 36 |
import itn.com.cmm.service.EgovFileMngService; |
| 32 | 37 |
import itn.com.cmm.service.EgovFileMngUtil; |
| 33 | 38 |
import itn.com.cmm.service.FileVO; |
| 34 | 39 |
import itn.com.cmm.util.RedirectUrlMaker; |
| 40 |
+import itn.com.uss.ion.bnr.pop.service.MainPopupLinkVO; |
|
| 35 | 41 |
import itn.com.uss.ion.bnr.pop.service.MainPopupManageService; |
| 36 | 42 |
import itn.com.uss.ion.bnr.pop.service.MainPopupVO; |
| 37 | 43 |
import itn.com.uss.ion.bnr.sub.service.SubMainZoneManageService; |
| 38 |
-import itn.com.uss.ion.pwm.service.MainzoneVO; |
|
| 39 | 44 |
import itn.let.sym.site.service.EgovSiteManagerService; |
| 40 | 45 |
|
| 41 | 46 |
/** |
... | ... | @@ -243,11 +248,35 @@ |
| 243 | 248 |
RedirectUrlMaker redirectUrlMaker = new RedirectUrlMaker("/uss/ion/bnr/pop/mainPopupList.do");
|
| 244 | 249 |
return redirectUrlMaker.getRedirectUrl(); |
| 245 | 250 |
} |
| 246 |
- |
|
| 247 |
- |
|
| 248 |
- |
|
| 249 |
- |
|
| 250 |
- |
|
| 251 |
+ |
|
| 252 |
+ /** |
|
| 253 |
+ * @methodName : mainPopupLinkDeleteAjax |
|
| 254 |
+ * @author : 이호영 |
|
| 255 |
+ * @date : 2025.03.04 |
|
| 256 |
+ * @description : 메인팝업링크 데이터 삭제 |
|
| 257 |
+ * @param request |
|
| 258 |
+ * @param mainPopupLinkVO |
|
| 259 |
+ * @return |
|
| 260 |
+ * @throws Exception |
|
| 261 |
+ */ |
|
| 262 |
+ @ResponseBody |
|
| 263 |
+ @RequestMapping(value="/uss/ion/bnr/pop/mainPopupLinkDeleteAjax.do") |
|
| 264 |
+ public ResponseEntity<?> mainPopupLinkDeleteAjax( |
|
| 265 |
+ HttpServletRequest request |
|
| 266 |
+ ,@RequestBody MainPopupLinkVO mainPopupLinkVO) throws Exception {
|
|
| 267 |
+ |
|
| 268 |
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); |
|
| 269 |
+ |
|
| 270 |
+ if(!isAuthenticated) {
|
|
| 271 |
+ return ResponseEntity.ok( |
|
| 272 |
+ RestResponse.builder() |
|
| 273 |
+ .status(HttpStatus.UNAUTHORIZED) // 401 권한 인증 에러 |
|
| 274 |
+ .msg("로그인을 하셔야 이용 가능합니다.")
|
|
| 275 |
+ .build() |
|
| 276 |
+ ); |
|
| 277 |
+ } |
|
| 278 |
+ return ResponseEntity.ok(mainPopupManageService.deleteMainPopupLink(mainPopupLinkVO)); |
|
| 279 |
+ } |
|
| 251 | 280 |
|
| 252 | 281 |
|
| 253 | 282 |
|
+++ src/main/java/itn/let/cmm/vo/FileInfoVO.java
... | ... | @@ -0,0 +1,32 @@ |
| 1 | +package itn.let.cmm.vo; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import lombok.Getter; | |
| 6 | +import lombok.Setter; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * | |
| 10 | + * @author : 이호영 | |
| 11 | + * @fileName : FileInfoVO.java | |
| 12 | + * @date : 2025.01.17 | |
| 13 | + * @description : 파일 풀 경로에서 파일명만 가져와 ID 가져올때 사용하는 VO | |
| 14 | + * MjonMsgDetailSentVO 참고 | |
| 15 | + * =========================================================== | |
| 16 | + * DATE AUTHOR NOTE | |
| 17 | + * ----------------------------------------------------------- * | |
| 18 | + * 2025.01.17 이호영 최초 생성 | |
| 19 | + * | |
| 20 | + * | |
| 21 | + * | |
| 22 | + */ | |
| 23 | +@Getter | |
| 24 | +@Setter | |
| 25 | +public class FileInfoVO implements Serializable { | |
| 26 | + | |
| 27 | + private static final long serialVersionUID = 1L; | |
| 28 | + | |
| 29 | + private String atchFileId; // 첨부파일 ID | |
| 30 | + private String fileSn; // 파일 순번 | |
| 31 | + | |
| 32 | +} |
--- src/main/java/itn/let/kakao/admin/kakaoAt/service/MjonKakaoATVO.java
+++ src/main/java/itn/let/kakao/admin/kakaoAt/service/MjonKakaoATVO.java
... | ... | @@ -151,6 +151,8 @@ |
| 151 | 151 |
private String bizKakaoResendType; /* 대체 문자 길이 => MMS / LMS / SMS */ |
| 152 | 152 |
private String bizKakaoJsonFile; //카카오 친구톡 Json 파일 경로 |
| 153 | 153 |
|
| 154 |
+ private String yellowId; |
|
| 155 |
+ private String bizKakaoResendTypeCnt; |
|
| 154 | 156 |
|
| 155 | 157 |
public String getMsgDiv() {
|
| 156 | 158 |
return msgDiv; |
... | ... | @@ -1273,5 +1275,19 @@ |
| 1273 | 1275 |
public void setBizKakaoJsonFile(String bizKakaoJsonFile) {
|
| 1274 | 1276 |
this.bizKakaoJsonFile = bizKakaoJsonFile; |
| 1275 | 1277 |
} |
| 1278 |
+ public String getYellowId() {
|
|
| 1279 |
+ return yellowId; |
|
| 1280 |
+ } |
|
| 1281 |
+ public void setYellowId(String yellowId) {
|
|
| 1282 |
+ this.yellowId = yellowId; |
|
| 1283 |
+ } |
|
| 1284 |
+ public String getBizKakaoResendTypeCnt() {
|
|
| 1285 |
+ return bizKakaoResendTypeCnt; |
|
| 1286 |
+ } |
|
| 1287 |
+ public void setBizKakaoResendTypeCnt(String bizKakaoResendTypeCnt) {
|
|
| 1288 |
+ this.bizKakaoResendTypeCnt = bizKakaoResendTypeCnt; |
|
| 1289 |
+ } |
|
| 1290 |
+ |
|
| 1291 |
+ |
|
| 1276 | 1292 |
|
| 1277 | 1293 |
} |
--- src/main/java/itn/let/kakao/kakaoComm/KakaoButtonVO.java
+++ src/main/java/itn/let/kakao/kakaoComm/KakaoButtonVO.java
... | ... | @@ -1,5 +1,9 @@ |
| 1 | 1 |
package itn.let.kakao.kakaoComm; |
| 2 | 2 |
|
| 3 |
+import lombok.Getter; |
|
| 4 |
+import lombok.Setter; |
|
| 5 |
+import lombok.ToString; |
|
| 6 |
+ |
|
| 3 | 7 |
/** |
| 4 | 8 |
* @FileName : KakaoButtonVO.java |
| 5 | 9 |
* @Project : mjon |
... | ... | @@ -8,6 +12,9 @@ |
| 8 | 12 |
|
| 9 | 13 |
* @프로그램 설명 : button, quickReplies 변수 |
| 10 | 14 |
*/ |
| 15 |
+@ToString |
|
| 16 |
+@Getter |
|
| 17 |
+@Setter |
|
| 11 | 18 |
public class KakaoButtonVO {
|
| 12 | 19 |
|
| 13 | 20 |
private String name = ""; // 버튼명 - linkType “AC” 선택 시 버튼명은 “채널추가” 로 고정 |
... | ... | @@ -17,49 +24,5 @@ |
| 17 | 24 |
private String linkMo = ""; // 모바일 웹 링크 주소 (WL 사용시 필수) |
| 18 | 25 |
private String linkPc = ""; // PC 웹 링크 주소 (WL 사용시 선택) |
| 19 | 26 |
private String pluginId = ""; // 플러그인 ID (P1, P2, P3 사용시 필수) |
| 20 |
- |
|
| 21 |
- public String getName() {
|
|
| 22 |
- return name; |
|
| 23 |
- } |
|
| 24 |
- public void setName(String name) {
|
|
| 25 |
- this.name = name; |
|
| 26 |
- } |
|
| 27 |
- public String getLinkType() {
|
|
| 28 |
- return linkType; |
|
| 29 |
- } |
|
| 30 |
- public void setLinkType(String linkType) {
|
|
| 31 |
- this.linkType = linkType; |
|
| 32 |
- } |
|
| 33 |
- public String getLinkAnd() {
|
|
| 34 |
- return linkAnd; |
|
| 35 |
- } |
|
| 36 |
- public void setLinkAnd(String linkAnd) {
|
|
| 37 |
- this.linkAnd = linkAnd; |
|
| 38 |
- } |
|
| 39 |
- public String getLinkIos() {
|
|
| 40 |
- return linkIos; |
|
| 41 |
- } |
|
| 42 |
- public void setLinkIos(String linkIos) {
|
|
| 43 |
- this.linkIos = linkIos; |
|
| 44 |
- } |
|
| 45 |
- public String getLinkMo() {
|
|
| 46 |
- return linkMo; |
|
| 47 |
- } |
|
| 48 |
- public void setLinkMo(String linkMo) {
|
|
| 49 |
- this.linkMo = linkMo; |
|
| 50 |
- } |
|
| 51 |
- public String getLinkPc() {
|
|
| 52 |
- return linkPc; |
|
| 53 |
- } |
|
| 54 |
- public void setLinkPc(String linkPc) {
|
|
| 55 |
- this.linkPc = linkPc; |
|
| 56 |
- } |
|
| 57 |
- public String getPluginId() {
|
|
| 58 |
- return pluginId; |
|
| 59 |
- } |
|
| 60 |
- public void setPluginId(String pluginId) {
|
|
| 61 |
- this.pluginId = pluginId; |
|
| 62 |
- } |
|
| 63 |
- |
|
| 64 | 27 |
|
| 65 | 28 |
} |
--- src/main/java/itn/let/kakao/kakaoComm/KakaoCommentVO.java
+++ src/main/java/itn/let/kakao/kakaoComm/KakaoCommentVO.java
... | ... | @@ -3,6 +3,10 @@ |
| 3 | 3 |
import java.util.ArrayList; |
| 4 | 4 |
import java.util.List; |
| 5 | 5 |
|
| 6 |
+import lombok.Getter; |
|
| 7 |
+import lombok.Setter; |
|
| 8 |
+import lombok.ToString; |
|
| 9 |
+ |
|
| 6 | 10 |
/** |
| 7 | 11 |
* @FileName : KakaoCommentVO.java |
| 8 | 12 |
* @Project : mjon |
... | ... | @@ -11,6 +15,9 @@ |
| 11 | 15 |
|
| 12 | 16 |
* @프로그램 설명 : comment 변수 |
| 13 | 17 |
*/ |
| 18 |
+@ToString |
|
| 19 |
+@Getter |
|
| 20 |
+@Setter |
|
| 14 | 21 |
public class KakaoCommentVO {
|
| 15 | 22 |
|
| 16 | 23 |
private String content = ""; // 댓글 본분 |
... | ... | @@ -26,60 +33,4 @@ |
| 26 | 33 |
private String originalFileName = ""; |
| 27 | 34 |
|
| 28 | 35 |
private String filePath = ""; |
| 29 |
- |
|
| 30 |
- public String getContent() {
|
|
| 31 |
- return content; |
|
| 32 |
- } |
|
| 33 |
- |
|
| 34 |
- public void setContent(String content) {
|
|
| 35 |
- this.content = content; |
|
| 36 |
- } |
|
| 37 |
- |
|
| 38 |
- public String getCreatedAt() {
|
|
| 39 |
- return createdAt; |
|
| 40 |
- } |
|
| 41 |
- |
|
| 42 |
- public void setCreatedAt(String createdAt) {
|
|
| 43 |
- this.createdAt = createdAt; |
|
| 44 |
- } |
|
| 45 |
- |
|
| 46 |
- public String getStatus() {
|
|
| 47 |
- return status; |
|
| 48 |
- } |
|
| 49 |
- |
|
| 50 |
- public void setStatus(String status) {
|
|
| 51 |
- this.status = status; |
|
| 52 |
- } |
|
| 53 |
- |
|
| 54 |
- public String getUserName() {
|
|
| 55 |
- return userName; |
|
| 56 |
- } |
|
| 57 |
- |
|
| 58 |
- public void setUserName(String userName) {
|
|
| 59 |
- this.userName = userName; |
|
| 60 |
- } |
|
| 61 |
- |
|
| 62 |
- public String getOriginalFileName() {
|
|
| 63 |
- return originalFileName; |
|
| 64 |
- } |
|
| 65 |
- |
|
| 66 |
- public void setOriginalFileName(String originalFileName) {
|
|
| 67 |
- this.originalFileName = originalFileName; |
|
| 68 |
- } |
|
| 69 |
- |
|
| 70 |
- public String getFilePath() {
|
|
| 71 |
- return filePath; |
|
| 72 |
- } |
|
| 73 |
- |
|
| 74 |
- public void setFilePath(String filePath) {
|
|
| 75 |
- this.filePath = filePath; |
|
| 76 |
- } |
|
| 77 |
- |
|
| 78 |
- public List<KakaoCommentVO> getAttachFileList() {
|
|
| 79 |
- return attachFileList; |
|
| 80 |
- } |
|
| 81 |
- |
|
| 82 |
- public void setAttachFileList(List<KakaoCommentVO> attachFileList) {
|
|
| 83 |
- this.attachFileList = attachFileList; |
|
| 84 |
- } |
|
| 85 | 36 |
} |
--- src/main/java/itn/let/kakao/kakaoComm/KakaoReturnVO.java
+++ src/main/java/itn/let/kakao/kakaoComm/KakaoReturnVO.java
... | ... | @@ -4,6 +4,9 @@ |
| 4 | 4 |
import java.util.List; |
| 5 | 5 |
|
| 6 | 6 |
import itn.com.cmm.ComDefaultVO; |
| 7 |
+import lombok.Getter; |
|
| 8 |
+import lombok.Setter; |
|
| 9 |
+import lombok.ToString; |
|
| 7 | 10 |
|
| 8 | 11 |
/** |
| 9 | 12 |
* @FileName : KakaoReturnVO.java |
... | ... | @@ -13,6 +16,9 @@ |
| 13 | 16 |
|
| 14 | 17 |
* @프로그램 설명 : 카카오톡 리턴 변수 목록 |
| 15 | 18 |
*/ |
| 19 |
+@Getter |
|
| 20 |
+@Setter |
|
| 21 |
+@ToString |
|
| 16 | 22 |
public class KakaoReturnVO extends ComDefaultVO{
|
| 17 | 23 |
|
| 18 | 24 |
private static final long serialVersionUID = 1L; |
... | ... | @@ -130,415 +136,4 @@ |
| 130 | 136 |
|
| 131 | 137 |
private String businessType = ""; //카카오톡 채널 비즈니스 인증 타입 |
| 132 | 138 |
|
| 133 |
- public static long getSerialversionuid() {
|
|
| 134 |
- return serialVersionUID; |
|
| 135 |
- } |
|
| 136 |
- |
|
| 137 |
- public String getBizReturnMsg() {
|
|
| 138 |
- return bizReturnMsg; |
|
| 139 |
- } |
|
| 140 |
- |
|
| 141 |
- public void setBizReturnMsg(String bizReturnMsg) {
|
|
| 142 |
- this.bizReturnMsg = bizReturnMsg; |
|
| 143 |
- } |
|
| 144 |
- |
|
| 145 |
- public String getBizReturnCode() {
|
|
| 146 |
- return bizReturnCode; |
|
| 147 |
- } |
|
| 148 |
- |
|
| 149 |
- public void setBizReturnCode(String bizReturnCode) {
|
|
| 150 |
- this.bizReturnCode = bizReturnCode; |
|
| 151 |
- } |
|
| 152 |
- |
|
| 153 |
- public String getProfileId() {
|
|
| 154 |
- return profileId; |
|
| 155 |
- } |
|
| 156 |
- |
|
| 157 |
- public void setProfileId(String profileId) {
|
|
| 158 |
- this.profileId = profileId; |
|
| 159 |
- } |
|
| 160 |
- |
|
| 161 |
- public String getTotalCount() {
|
|
| 162 |
- return totalCount; |
|
| 163 |
- } |
|
| 164 |
- |
|
| 165 |
- public void setTotalCount(String totalCount) {
|
|
| 166 |
- this.totalCount = totalCount; |
|
| 167 |
- } |
|
| 168 |
- |
|
| 169 |
- public String getTotalPage() {
|
|
| 170 |
- return totalPage; |
|
| 171 |
- } |
|
| 172 |
- |
|
| 173 |
- public void setTotalPage(String totalPage) {
|
|
| 174 |
- this.totalPage = totalPage; |
|
| 175 |
- } |
|
| 176 |
- |
|
| 177 |
- public String getCurrentPage() {
|
|
| 178 |
- return currentPage; |
|
| 179 |
- } |
|
| 180 |
- |
|
| 181 |
- public void setCurrentPage(String currentPage) {
|
|
| 182 |
- this.currentPage = currentPage; |
|
| 183 |
- } |
|
| 184 |
- |
|
| 185 |
- public String getSenderKey() {
|
|
| 186 |
- return senderKey; |
|
| 187 |
- } |
|
| 188 |
- |
|
| 189 |
- public void setSenderKey(String senderKey) {
|
|
| 190 |
- this.senderKey = senderKey; |
|
| 191 |
- } |
|
| 192 |
- |
|
| 193 |
- public String getSenderKeyType() {
|
|
| 194 |
- return senderKeyType; |
|
| 195 |
- } |
|
| 196 |
- |
|
| 197 |
- public void setSenderKeyType(String senderKeyType) {
|
|
| 198 |
- this.senderKeyType = senderKeyType; |
|
| 199 |
- } |
|
| 200 |
- |
|
| 201 |
- public String getTemplateCode() {
|
|
| 202 |
- return templateCode; |
|
| 203 |
- } |
|
| 204 |
- |
|
| 205 |
- public void setTemplateCode(String templateCode) {
|
|
| 206 |
- this.templateCode = templateCode; |
|
| 207 |
- } |
|
| 208 |
- |
|
| 209 |
- public String getTemplateName() {
|
|
| 210 |
- return templateName; |
|
| 211 |
- } |
|
| 212 |
- |
|
| 213 |
- public void setTemplateName(String templateName) {
|
|
| 214 |
- this.templateName = templateName; |
|
| 215 |
- } |
|
| 216 |
- |
|
| 217 |
- public String getCategoryCode() {
|
|
| 218 |
- return categoryCode; |
|
| 219 |
- } |
|
| 220 |
- |
|
| 221 |
- public void setCategoryCode(String categoryCode) {
|
|
| 222 |
- this.categoryCode = categoryCode; |
|
| 223 |
- } |
|
| 224 |
- |
|
| 225 |
- public String getCreatedAt() {
|
|
| 226 |
- return createdAt; |
|
| 227 |
- } |
|
| 228 |
- |
|
| 229 |
- public void setCreatedAt(String createdAt) {
|
|
| 230 |
- this.createdAt = createdAt; |
|
| 231 |
- } |
|
| 232 |
- |
|
| 233 |
- public String getModifiedAt() {
|
|
| 234 |
- return modifiedAt; |
|
| 235 |
- } |
|
| 236 |
- |
|
| 237 |
- public void setModifiedAt(String modifiedAt) {
|
|
| 238 |
- this.modifiedAt = modifiedAt; |
|
| 239 |
- } |
|
| 240 |
- |
|
| 241 |
- public String getServiceStatus() {
|
|
| 242 |
- return serviceStatus; |
|
| 243 |
- } |
|
| 244 |
- |
|
| 245 |
- public void setServiceStatus(String serviceStatus) {
|
|
| 246 |
- this.serviceStatus = serviceStatus; |
|
| 247 |
- } |
|
| 248 |
- |
|
| 249 |
- public List<KakaoReturnVO> getTemplatList() {
|
|
| 250 |
- return templatList; |
|
| 251 |
- } |
|
| 252 |
- |
|
| 253 |
- public void setTemplatList(List<KakaoReturnVO> templatList) {
|
|
| 254 |
- this.templatList = templatList; |
|
| 255 |
- } |
|
| 256 |
- |
|
| 257 |
- public String getUuid() {
|
|
| 258 |
- return uuid; |
|
| 259 |
- } |
|
| 260 |
- |
|
| 261 |
- public void setUuid(String uuid) {
|
|
| 262 |
- this.uuid = uuid; |
|
| 263 |
- } |
|
| 264 |
- |
|
| 265 |
- public String getName() {
|
|
| 266 |
- return name; |
|
| 267 |
- } |
|
| 268 |
- |
|
| 269 |
- public void setName(String name) {
|
|
| 270 |
- this.name = name; |
|
| 271 |
- } |
|
| 272 |
- |
|
| 273 |
- public String getStatus() {
|
|
| 274 |
- return status; |
|
| 275 |
- } |
|
| 276 |
- |
|
| 277 |
- public void setStatus(String status) {
|
|
| 278 |
- this.status = status; |
|
| 279 |
- } |
|
| 280 |
- |
|
| 281 |
- public boolean isBlock() {
|
|
| 282 |
- return block; |
|
| 283 |
- } |
|
| 284 |
- |
|
| 285 |
- public void setBlock(boolean block) {
|
|
| 286 |
- this.block = block; |
|
| 287 |
- } |
|
| 288 |
- |
|
| 289 |
- public boolean isDormant() {
|
|
| 290 |
- return dormant; |
|
| 291 |
- } |
|
| 292 |
- |
|
| 293 |
- public void setDormant(boolean dormant) {
|
|
| 294 |
- this.dormant = dormant; |
|
| 295 |
- } |
|
| 296 |
- |
|
| 297 |
- public String getTitle() {
|
|
| 298 |
- return title; |
|
| 299 |
- } |
|
| 300 |
- |
|
| 301 |
- public void setTitle(String title) {
|
|
| 302 |
- this.title = title; |
|
| 303 |
- } |
|
| 304 |
- |
|
| 305 |
- public String getDescription() {
|
|
| 306 |
- return description; |
|
| 307 |
- } |
|
| 308 |
- |
|
| 309 |
- public void setDescription(String description) {
|
|
| 310 |
- this.description = description; |
|
| 311 |
- } |
|
| 312 |
- |
|
| 313 |
- public String getImageUrl() {
|
|
| 314 |
- return imageUrl; |
|
| 315 |
- } |
|
| 316 |
- |
|
| 317 |
- public void setImageUrl(String imageUrl) {
|
|
| 318 |
- this.imageUrl = imageUrl; |
|
| 319 |
- } |
|
| 320 |
- |
|
| 321 |
- public String getListTitle() {
|
|
| 322 |
- return listTitle; |
|
| 323 |
- } |
|
| 324 |
- |
|
| 325 |
- public void setListTitle(String listTitle) {
|
|
| 326 |
- this.listTitle = listTitle; |
|
| 327 |
- } |
|
| 328 |
- |
|
| 329 |
- public String getListDescription() {
|
|
| 330 |
- return listDescription; |
|
| 331 |
- } |
|
| 332 |
- |
|
| 333 |
- public void setListDescription(String listDescription) {
|
|
| 334 |
- this.listDescription = listDescription; |
|
| 335 |
- } |
|
| 336 |
- |
|
| 337 |
- public String getSumTitle() {
|
|
| 338 |
- return sumTitle; |
|
| 339 |
- } |
|
| 340 |
- |
|
| 341 |
- public void setSumTitle(String sumTitle) {
|
|
| 342 |
- this.sumTitle = sumTitle; |
|
| 343 |
- } |
|
| 344 |
- |
|
| 345 |
- public String getSumDescription() {
|
|
| 346 |
- return sumDescription; |
|
| 347 |
- } |
|
| 348 |
- |
|
| 349 |
- public void setSumDescription(String sumDescription) {
|
|
| 350 |
- this.sumDescription = sumDescription; |
|
| 351 |
- } |
|
| 352 |
- |
|
| 353 |
- public String getProfileStatus() {
|
|
| 354 |
- return profileStatus; |
|
| 355 |
- } |
|
| 356 |
- |
|
| 357 |
- public void setProfileStatus(String profileStatus) {
|
|
| 358 |
- this.profileStatus = profileStatus; |
|
| 359 |
- } |
|
| 360 |
- |
|
| 361 |
- public boolean isAlimtalk() {
|
|
| 362 |
- return alimtalk; |
|
| 363 |
- } |
|
| 364 |
- |
|
| 365 |
- public void setAlimtalk(boolean alimtalk) {
|
|
| 366 |
- this.alimtalk = alimtalk; |
|
| 367 |
- } |
|
| 368 |
- |
|
| 369 |
- public boolean isBizchat() {
|
|
| 370 |
- return bizchat; |
|
| 371 |
- } |
|
| 372 |
- |
|
| 373 |
- public void setBizchat(boolean bizchat) {
|
|
| 374 |
- this.bizchat = bizchat; |
|
| 375 |
- } |
|
| 376 |
- |
|
| 377 |
- public boolean isBrandtalk() {
|
|
| 378 |
- return brandtalk; |
|
| 379 |
- } |
|
| 380 |
- |
|
| 381 |
- public void setBrandtalk(boolean brandtalk) {
|
|
| 382 |
- this.brandtalk = brandtalk; |
|
| 383 |
- } |
|
| 384 |
- |
|
| 385 |
- public String getCommittalCompanyName() {
|
|
| 386 |
- return committalCompanyName; |
|
| 387 |
- } |
|
| 388 |
- |
|
| 389 |
- public void setCommittalCompanyName(String committalCompanyName) {
|
|
| 390 |
- this.committalCompanyName = committalCompanyName; |
|
| 391 |
- } |
|
| 392 |
- |
|
| 393 |
- public String getChannelKey() {
|
|
| 394 |
- return channelKey; |
|
| 395 |
- } |
|
| 396 |
- |
|
| 397 |
- public void setChannelKey(String channelKey) {
|
|
| 398 |
- this.channelKey = channelKey; |
|
| 399 |
- } |
|
| 400 |
- |
|
| 401 |
- public boolean isBusinessProfile() {
|
|
| 402 |
- return businessProfile; |
|
| 403 |
- } |
|
| 404 |
- |
|
| 405 |
- public void setBusinessProfile(boolean businessProfile) {
|
|
| 406 |
- this.businessProfile = businessProfile; |
|
| 407 |
- } |
|
| 408 |
- |
|
| 409 |
- public String getBusinessType() {
|
|
| 410 |
- return businessType; |
|
| 411 |
- } |
|
| 412 |
- |
|
| 413 |
- public void setBusinessType(String businessType) {
|
|
| 414 |
- this.businessType = businessType; |
|
| 415 |
- } |
|
| 416 |
- |
|
| 417 |
- public String getTemplateMessageType() {
|
|
| 418 |
- return templateMessageType; |
|
| 419 |
- } |
|
| 420 |
- |
|
| 421 |
- public void setTemplateMessageType(String templateMessageType) {
|
|
| 422 |
- this.templateMessageType = templateMessageType; |
|
| 423 |
- } |
|
| 424 |
- |
|
| 425 |
- public String getTemplateEmphasizeType() {
|
|
| 426 |
- return templateEmphasizeType; |
|
| 427 |
- } |
|
| 428 |
- |
|
| 429 |
- public void setTemplateEmphasizeType(String templateEmphasizeType) {
|
|
| 430 |
- this.templateEmphasizeType = templateEmphasizeType; |
|
| 431 |
- } |
|
| 432 |
- |
|
| 433 |
- public String getTemplateContent() {
|
|
| 434 |
- return templateContent; |
|
| 435 |
- } |
|
| 436 |
- |
|
| 437 |
- public void setTemplateContent(String templateContent) {
|
|
| 438 |
- this.templateContent = templateContent; |
|
| 439 |
- } |
|
| 440 |
- |
|
| 441 |
- public String getTemplateExtra() {
|
|
| 442 |
- return templateExtra; |
|
| 443 |
- } |
|
| 444 |
- |
|
| 445 |
- public void setTemplateExtra(String templateExtra) {
|
|
| 446 |
- this.templateExtra = templateExtra; |
|
| 447 |
- } |
|
| 448 |
- |
|
| 449 |
- public String getTemplateAd() {
|
|
| 450 |
- return templateAd; |
|
| 451 |
- } |
|
| 452 |
- |
|
| 453 |
- public void setTemplateAd(String templateAd) {
|
|
| 454 |
- this.templateAd = templateAd; |
|
| 455 |
- } |
|
| 456 |
- |
|
| 457 |
- public String getTemplateImageName() {
|
|
| 458 |
- return templateImageName; |
|
| 459 |
- } |
|
| 460 |
- |
|
| 461 |
- public void setTemplateImageName(String templateImageName) {
|
|
| 462 |
- this.templateImageName = templateImageName; |
|
| 463 |
- } |
|
| 464 |
- |
|
| 465 |
- public String getTemplateImageUrl() {
|
|
| 466 |
- return templateImageUrl; |
|
| 467 |
- } |
|
| 468 |
- |
|
| 469 |
- public void setTemplateImageUrl(String templateImageUrl) {
|
|
| 470 |
- this.templateImageUrl = templateImageUrl; |
|
| 471 |
- } |
|
| 472 |
- |
|
| 473 |
- public String getTemplateTitle() {
|
|
| 474 |
- return templateTitle; |
|
| 475 |
- } |
|
| 476 |
- |
|
| 477 |
- public void setTemplateTitle(String templateTitle) {
|
|
| 478 |
- this.templateTitle = templateTitle; |
|
| 479 |
- } |
|
| 480 |
- |
|
| 481 |
- public String getTemplateSubtitle() {
|
|
| 482 |
- return templateSubtitle; |
|
| 483 |
- } |
|
| 484 |
- |
|
| 485 |
- public void setTemplateSubtitle(String templateSubtitle) {
|
|
| 486 |
- this.templateSubtitle = templateSubtitle; |
|
| 487 |
- } |
|
| 488 |
- |
|
| 489 |
- public String getTemplateHeader() {
|
|
| 490 |
- return templateHeader; |
|
| 491 |
- } |
|
| 492 |
- |
|
| 493 |
- public void setTemplateHeader(String templateHeader) {
|
|
| 494 |
- this.templateHeader = templateHeader; |
|
| 495 |
- } |
|
| 496 |
- |
|
| 497 |
- public Boolean getSecurityFlag() {
|
|
| 498 |
- return securityFlag; |
|
| 499 |
- } |
|
| 500 |
- |
|
| 501 |
- public void setSecurityFlag(Boolean securityFlag) {
|
|
| 502 |
- this.securityFlag = securityFlag; |
|
| 503 |
- } |
|
| 504 |
- |
|
| 505 |
- public String getInspectionStatus() {
|
|
| 506 |
- return inspectionStatus; |
|
| 507 |
- } |
|
| 508 |
- |
|
| 509 |
- public void setInspectionStatus(String inspectionStatus) {
|
|
| 510 |
- this.inspectionStatus = inspectionStatus; |
|
| 511 |
- } |
|
| 512 |
- |
|
| 513 |
- public List<KakaoButtonVO> getButtonList() {
|
|
| 514 |
- return buttonList; |
|
| 515 |
- } |
|
| 516 |
- |
|
| 517 |
- public void setButtonList(List<KakaoButtonVO> buttonList) {
|
|
| 518 |
- this.buttonList = buttonList; |
|
| 519 |
- } |
|
| 520 |
- |
|
| 521 |
- public List<KakaoButtonVO> getQuickReplyList() {
|
|
| 522 |
- return quickReplyList; |
|
| 523 |
- } |
|
| 524 |
- |
|
| 525 |
- public void setQuickReplyList(List<KakaoButtonVO> quickReplyList) {
|
|
| 526 |
- this.quickReplyList = quickReplyList; |
|
| 527 |
- } |
|
| 528 |
- |
|
| 529 |
- public List<KakaoCommentVO> getCommentList() {
|
|
| 530 |
- return commentList; |
|
| 531 |
- } |
|
| 532 |
- |
|
| 533 |
- public void setCommentList(List<KakaoCommentVO> commentList) {
|
|
| 534 |
- this.commentList = commentList; |
|
| 535 |
- } |
|
| 536 |
- |
|
| 537 |
- public List<KakaoItemVO> getItemList() {
|
|
| 538 |
- return itemList; |
|
| 539 |
- } |
|
| 540 |
- |
|
| 541 |
- public void setItemList(List<KakaoItemVO> itemList) {
|
|
| 542 |
- this.itemList = itemList; |
|
| 543 |
- } |
|
| 544 | 139 |
} |
+++ src/main/java/itn/let/kakao/kakaoComm/KakaoSendAdvcVO.java
... | ... | @@ -0,0 +1,116 @@ |
| 1 | +package itn.let.kakao.kakaoComm; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | +import java.util.List; | |
| 5 | +import java.util.Map; | |
| 6 | + | |
| 7 | +import lombok.Getter; | |
| 8 | +import lombok.Setter; | |
| 9 | + | |
| 10 | +/** | |
| 11 | +* @FileName : KakaoSendVO.java | |
| 12 | +* @Project : mjon | |
| 13 | +* @Date : 2025. 3. 25. | |
| 14 | +* @작성자 : 이호영 | |
| 15 | + | |
| 16 | +* @프로그램 설명 : 문자온 발송부분만 ADVC | |
| 17 | +*/ | |
| 18 | +@Getter | |
| 19 | +@Setter | |
| 20 | +public class KakaoSendAdvcVO implements Serializable { | |
| 21 | + | |
| 22 | + | |
| 23 | + /** | |
| 24 | + * | |
| 25 | + */ | |
| 26 | + private static final long serialVersionUID = 343099046833205405L; | |
| 27 | + | |
| 28 | + // ===== | |
| 29 | + // Insert 데이터 | |
| 30 | + private String msgId; // 문자ID | |
| 31 | + private String msgGroupId; // 전송그룹ID | |
| 32 | + private String msgGroupCnt; // 전송그룹ID | |
| 33 | + private String userId; // 사용자ID | |
| 34 | + private String agentCode; // 전송사코드 | |
| 35 | + private String senderKey; // 발신프로필 키 | |
| 36 | + private String templateCode; // 템플릿 코드 | |
| 37 | + private String callTo; // 수신번호 | |
| 38 | + private String callFrom; // 발신번호 | |
| 39 | + private String msgType; // 메시지 타입 | |
| 40 | + private String templateContent; // 템플릿 내용 | |
| 41 | + private String templateTitle; // 템플릿 제목 | |
| 42 | + List<KakaoButtonVO> buttonList; // 템플릿 버튼 리스트 | |
| 43 | + private String subMsgSendYn; // 대체문자 전송 여부 | |
| 44 | + private String subMsgTxt; // 대체문자 내용 | |
| 45 | + private String subMsgType; // 대체문자 타입 | |
| 46 | + private String reqDate; // 예약일시 | |
| 47 | + | |
| 48 | + private String jsonStr; // jsonStr | |
| 49 | + | |
| 50 | + // ===== | |
| 51 | + // ===== | |
| 52 | + | |
| 53 | + private String eachPrice; // sms 단가 | |
| 54 | + private String smsPrice; // sms 단가 | |
| 55 | + private String mmsPrice; // mms 단가 | |
| 56 | + private String totPrice; // mms 단가 | |
| 57 | + private String befCash; // mms 단가 | |
| 58 | + private String befPoint; // mms 단가 | |
| 59 | + private String kakaoAtPrice; // 카카오 알림톡 단가 | |
| 60 | + private String bizJsonName; // 카카오 알림톡 단가 | |
| 61 | + private String reserveYn; // 카카오 알림톡 단가 | |
| 62 | + private String atDelayYn; // 카카오 알림톡 단가 | |
| 63 | + private String bizKakaoResendOrgnlTxt; // 카카오 알림톡 단가 | |
| 64 | + private String bizKakaoResendType; // 카카오 알림톡 단가 | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + @Override | |
| 72 | + public String toString() { | |
| 73 | + return "MsgSendVO[" + | |
| 74 | + "\n msgId=[" + msgId + "]" + | |
| 75 | + "\n , msgGroupId=[" + msgGroupId + "]" + | |
| 76 | + "\n , msgGroupCnt=[" + msgGroupCnt + "]" + | |
| 77 | + "\n , userId=[" + userId + "]" + | |
| 78 | + "\n , agentCode=[" + agentCode + "]" + | |
| 79 | + "\n , senderKey=[" + senderKey + "]" + | |
| 80 | + "\n , templateCode=[" + templateCode + "]" + | |
| 81 | + "\n , callTo=[" + callTo + "]" + | |
| 82 | + "\n , callFrom=[" + callFrom + "]" + | |
| 83 | + "\n , msgType=[" + msgType + "]" + | |
| 84 | + "\n , templateContent=[" + templateContent + "]" + | |
| 85 | + "\n , templateTitle=[" + templateTitle + "]" + | |
| 86 | + "\n , buttonList=[" + buttonList.toString() + "]" + | |
| 87 | + "\n , subMsgSendYn=[" + subMsgSendYn + "]" + | |
| 88 | + "\n , subMsgTxt=[" + subMsgTxt + "]" + | |
| 89 | + "\n , subMsgType=[" + subMsgType + "]" + | |
| 90 | + "\n , reqDate=[" + reqDate + "]" + | |
| 91 | + "\n , jsonStr=[" + jsonStr + "]" + | |
| 92 | + "\n , ==== MJ_MSG_DATA INSERT DATA END =======" + | |
| 93 | + "\n " + | |
| 94 | + "\n , eachPrice=[" + eachPrice + "]" + | |
| 95 | + "\n , smsPrice=[" + smsPrice + "]" + | |
| 96 | + "\n , mmsPrice=[" + mmsPrice + "]" + | |
| 97 | + "\n , totPrice=[" + totPrice + "]" + | |
| 98 | + "\n , befCash=[" + befCash + "]" + | |
| 99 | + "\n , befPoint=[" + befPoint + "]" + | |
| 100 | + "\n , kakaoAtPrice=[" + kakaoAtPrice + "]" + | |
| 101 | + "\n , bizJsonName=[" + bizJsonName + "]" + | |
| 102 | + "\n , reserveYn=[" + reserveYn + "]" + | |
| 103 | + "\n , atDelayYn=[" + atDelayYn + "]" + | |
| 104 | + "\n , bizKakaoResendOrgnlTxt=[" + bizKakaoResendOrgnlTxt + "]" + | |
| 105 | + "\n , bizKakaoResendType=[" + bizKakaoResendType + "]" + | |
| 106 | + "\n ]"; | |
| 107 | + } | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | +} |
--- src/main/java/itn/let/kakao/kakaoComm/KakaoSendUtil.java
+++ src/main/java/itn/let/kakao/kakaoComm/KakaoSendUtil.java
... | ... | @@ -1,21 +1,38 @@ |
| 1 | 1 |
package itn.let.kakao.kakaoComm; |
| 2 | 2 |
|
| 3 |
+import java.text.ParseException; |
|
| 4 |
+import java.text.SimpleDateFormat; |
|
| 3 | 5 |
import java.util.ArrayList; |
| 6 |
+import java.util.Calendar; |
|
| 7 |
+import java.util.Date; |
|
| 4 | 8 |
import java.util.List; |
| 9 |
+import java.util.Map; |
|
| 10 |
+import java.util.regex.Matcher; |
|
| 11 |
+import java.util.regex.Pattern; |
|
| 5 | 12 |
|
| 6 | 13 |
import javax.annotation.Resource; |
| 7 | 14 |
|
| 15 |
+import org.apache.commons.collections4.CollectionUtils; |
|
| 16 |
+import org.apache.commons.lang3.StringUtils; |
|
| 8 | 17 |
import org.springframework.beans.factory.annotation.Autowired; |
| 18 |
+import org.springframework.http.HttpStatus; |
|
| 9 | 19 |
import org.springframework.stereotype.Component; |
| 10 | 20 |
|
| 21 |
+import egovframework.rte.fdl.idgnr.EgovIdGnrService; |
|
| 11 | 22 |
import itn.com.cmm.util.StringUtil; |
| 12 | 23 |
import itn.let.kakao.kakaoComm.kakaoApi.KakaoApiJsonSave; |
| 24 |
+import itn.let.kakao.kakaoComm.kakaoApi.KakaoApiTemplate; |
|
| 25 |
+import itn.let.mail.service.StatusResponse; |
|
| 26 |
+import itn.let.mjo.mjocommon.MjonCommon; |
|
| 13 | 27 |
import itn.let.mjo.msg.service.MjonMsgVO; |
| 14 | 28 |
import itn.let.mjo.msgdata.service.MjonMsgDataService; |
| 15 | 29 |
import itn.let.mjo.spammsg.web.ComGetSpamStringParser; |
| 30 |
+import itn.let.module.base.PriceAndPoint; |
|
| 16 | 31 |
import itn.let.sym.site.service.JoinSettingVO; |
| 17 | 32 |
import itn.let.uss.umt.service.MberManageVO; |
| 33 |
+import lombok.extern.slf4j.Slf4j; |
|
| 18 | 34 |
|
| 35 |
+@Slf4j |
|
| 19 | 36 |
@Component |
| 20 | 37 |
public class KakaoSendUtil {
|
| 21 | 38 |
|
... | ... | @@ -24,6 +41,374 @@ |
| 24 | 41 |
|
| 25 | 42 |
@Resource(name = "MjonMsgDataService") |
| 26 | 43 |
private MjonMsgDataService mjonMsgDataService; |
| 44 |
+ |
|
| 45 |
+ @Autowired |
|
| 46 |
+ KakaoApiTemplate kakaoApiTemplate; |
|
| 47 |
+ |
|
| 48 |
+ @Autowired |
|
| 49 |
+ private PriceAndPoint priceAndPoint; |
|
| 50 |
+ |
|
| 51 |
+ @Autowired |
|
| 52 |
+ private MjonCommon mjonCommon; |
|
| 53 |
+ |
|
| 54 |
+ // 클래스 수준에서 정적 Pattern 정의 (성능 최적화) |
|
| 55 |
+ private static final Pattern REPLACEMENT_PATTERN = Pattern.compile("#\\{[^}]+\\}");
|
|
| 56 |
+ |
|
| 57 |
+ private static final SimpleDateFormat DATE_FORMATTER = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
|
|
| 58 |
+ |
|
| 59 |
+ // 단문 메세지 타입 |
|
| 60 |
+ public static final String SHORT_MSG_TYPE = "SMS"; |
|
| 61 |
+ // 장문 메세지 타입 |
|
| 62 |
+ public static final String LONG_MSG_TYPE = "MMS"; |
|
| 63 |
+ |
|
| 64 |
+ /** |
|
| 65 |
+ * @methodName : populateSendLists _advc |
|
| 66 |
+ * @author : 이호영 |
|
| 67 |
+ * @date : 2025. 3. 7. |
|
| 68 |
+ * @description : 기존 kakaoSendPrice 개선 |
|
| 69 |
+ * @return : KakaoVO |
|
| 70 |
+ * @param kakaoVO |
|
| 71 |
+ * @param statusResponse |
|
| 72 |
+ * @return |
|
| 73 |
+ * @throws Exception |
|
| 74 |
+ * |
|
| 75 |
+ */ |
|
| 76 |
+ public List<KakaoSendAdvcVO> populateSendLists(KakaoVO kakaoVO, boolean isNotified, StatusResponse statusResponse) throws Exception {
|
|
| 77 |
+ |
|
| 78 |
+ //사용자 현재 보유 금액 불러오기(문자 발송 금액 차감 이전 금액) |
|
| 79 |
+// String befCash = kakaoVO.getBefCash(); |
|
| 80 |
+ |
|
| 81 |
+ |
|
| 82 |
+ |
|
| 83 |
+ |
|
| 84 |
+ log.info(" +kakaoVO.getVarListMap().size() :: [{}]", kakaoVO.getVarListMap().size());
|
|
| 85 |
+ |
|
| 86 |
+ List<KakaoSendAdvcVO> kakaoSendAdvcListVO = new ArrayList<>(); |
|
| 87 |
+ Calendar calendar = setupBaseDate(kakaoVO, isNotified); |
|
| 88 |
+ |
|
| 89 |
+ |
|
| 90 |
+ |
|
| 91 |
+ KakaoReturnVO templateDetail = kakaoApiTemplate.selectKakaoApiTemplateDetail(kakaoVO); |
|
| 92 |
+ String templateContent = templateDetail.getTemplateContent(); // 알림톡 템플릿 |
|
| 93 |
+ kakaoVO.setTemplateContent(templateContent); |
|
| 94 |
+ String templateTitle = templateDetail.getTemplateTitle(); |
|
| 95 |
+ |
|
| 96 |
+ |
|
| 97 |
+// log.info(" + templateDetail :: [{}]", templateDetail);
|
|
| 98 |
+// templateDetail.getButtonList().forEach(t->log.info(" + ButtonList :: [{}]", t.toString()));
|
|
| 99 |
+ |
|
| 100 |
+ Boolean hasContentReplacement = this.replBooleanStrChecker(templateContent); |
|
| 101 |
+ Boolean hasTitleReplacement = this.replBooleanStrChecker(templateTitle); |
|
| 102 |
+ Boolean hasButtonReplacement = this.needsButtonReplacement(templateDetail.getButtonList()); |
|
| 103 |
+ |
|
| 104 |
+ /** @jsonStr 필요유무 */ |
|
| 105 |
+ boolean hasTitleOrButtons = StringUtils.isNotEmpty(templateTitle) |
|
| 106 |
+ || CollectionUtils.isNotEmpty(templateDetail.getButtonList()); |
|
| 107 |
+ |
|
| 108 |
+ /** @jsonStr 반복유무 */ |
|
| 109 |
+ boolean needsJsonReplacement = hasTitleReplacement || hasButtonReplacement; |
|
| 110 |
+ String sharedJsonStr = null; |
|
| 111 |
+ |
|
| 112 |
+ String subMsgTxt = kakaoVO.getSubMsgTxt(); // 실패 대체 문자 |
|
| 113 |
+ |
|
| 114 |
+ // 시스템 기본 단가 정보 불러오기 |
|
| 115 |
+ JoinSettingVO sysJoinSetVO = mjonMsgDataService.selectJoinSettingInfo(); |
|
| 116 |
+ // 사용자 개인 단가 정보 불러오기 |
|
| 117 |
+ MberManageVO mberManageVO = mjonMsgDataService.selectMberManageInfo(kakaoVO.getUserId()); |
|
| 118 |
+ |
|
| 119 |
+ |
|
| 120 |
+ |
|
| 121 |
+ |
|
| 122 |
+ /** @MSGID KEY값 */ |
|
| 123 |
+ List<String> idList = mjonCommon.getNextCustomMsgCId(kakaoVO.getVarListMap().size()); |
|
| 124 |
+// for (int i = 0; i < kakaoSendAdvcListVO.size(); i++) {
|
|
| 125 |
+// kakaoSendAdvcListVO.get(i).setMsgId(idList.get(i)); |
|
| 126 |
+// kakaoSendAdvcListVO.get(i).setBizJsonName(idList.get(i)); |
|
| 127 |
+// } |
|
| 128 |
+ |
|
| 129 |
+ |
|
| 130 |
+ |
|
| 131 |
+ // 분할 건수 카운터 |
|
| 132 |
+ int counter = 0; |
|
| 133 |
+/** @Map에 총 갯수가 수신자 갯수와 동일함 */ |
|
| 134 |
+ List<Map<String, String>> varList = kakaoVO.getVarListMap(); |
|
| 135 |
+ for (int i = 0; i < varList.size(); i++) {
|
|
| 136 |
+// for(Map<String, String> variables : kakaoVO.getVarListMap()) {
|
|
| 137 |
+ // 치환 데이터 |
|
| 138 |
+ Map<String, String> variables = varList.get(i); |
|
| 139 |
+ |
|
| 140 |
+/** @공통 기본값 */ |
|
| 141 |
+ KakaoSendAdvcVO sendVO = createSendVO(kakaoVO); |
|
| 142 |
+ String msgId = idList.get(i); |
|
| 143 |
+ sendVO.setMsgId(msgId); |
|
| 144 |
+ |
|
| 145 |
+ // step1 |
|
| 146 |
+ // Step 1-1: 값 치환 및 수신번호 셋팅 |
|
| 147 |
+ // Step 1-2: 수신자 정보 설정 (callToList는 항상 설정). |
|
| 148 |
+ if (variables.containsKey("callToList")) {
|
|
| 149 |
+ sendVO.setCallTo(variables.get("callToList"));
|
|
| 150 |
+ variables.remove("callToList"); // 사용 후 제거.
|
|
| 151 |
+ } |
|
| 152 |
+ |
|
| 153 |
+/** @Step1-3: 템플릿 치환데이터 설정 */ |
|
| 154 |
+ if (hasContentReplacement) {
|
|
| 155 |
+ templateContent = mjonCommon.ATReplaceTemplateVariables(templateContent, variables); |
|
| 156 |
+ if(hasTitleReplacement) {
|
|
| 157 |
+ templateTitle = mjonCommon.ATReplaceTemplateVariables(templateTitle, variables); |
|
| 158 |
+ } |
|
| 159 |
+ } |
|
| 160 |
+/** @버튼 치환 */ // 버튼 리스트가 있으면 치환 수행, 항상 sendVO에 설정 |
|
| 161 |
+ List<KakaoButtonVO> buttonList = templateDetail.getButtonList(); |
|
| 162 |
+ if(hasButtonReplacement) {
|
|
| 163 |
+ buttonList = replaceButtonLinks(buttonList, variables); |
|
| 164 |
+ } |
|
| 165 |
+ sendVO.setButtonList(buttonList); |
|
| 166 |
+ |
|
| 167 |
+ sendVO.setTemplateTitle(templateTitle); |
|
| 168 |
+ sendVO.setTemplateContent(templateContent); |
|
| 169 |
+ |
|
| 170 |
+ |
|
| 171 |
+ // Step 1-4: 실패 대체 문자 치환데이터 설정 |
|
| 172 |
+ if("Y".equals(kakaoVO.getSubMsgSendYn())) { // 대체문자가 있나?
|
|
| 173 |
+ if ("Y".equals(kakaoVO.getSubMsgTxtReplYn())) { // 치환데이터가 있나?
|
|
| 174 |
+ subMsgTxt = mjonCommon.ATReplaceTemplateVariables(subMsgTxt, variables); |
|
| 175 |
+ } |
|
| 176 |
+ sendVO.setSubMsgTxt(subMsgTxt);// 실패 |
|
| 177 |
+ } |
|
| 178 |
+ sendVO.setSubMsgSendYn(kakaoVO.getSubMsgSendYn()); |
|
| 179 |
+ |
|
| 180 |
+ |
|
| 181 |
+ /* |
|
| 182 |
+ log.info("kakaoSendAdvcVO Details: [callTo={}\n, templateContent=\n{}\n, subMsgTxt=\n{}]\n\n\n\n",
|
|
| 183 |
+ kakaoSendAdvcVO.getCallTo(), |
|
| 184 |
+ kakaoSendAdvcVO.getTemplateContent(), |
|
| 185 |
+ kakaoSendAdvcVO.getSubMsgTxt() |
|
| 186 |
+ ); |
|
| 187 |
+ */ |
|
| 188 |
+ |
|
| 189 |
+ // Step1 END |
|
| 190 |
+ |
|
| 191 |
+ |
|
| 192 |
+// step3 |
|
| 193 |
+// 바이트 수 체크 및 금액설정 |
|
| 194 |
+ |
|
| 195 |
+ |
|
| 196 |
+ Float kakaoAtPrice = mberManageVO.getKakaoAtPrice(); |
|
| 197 |
+ // 유효한 단가 계산 |
|
| 198 |
+ float shortPrice = getValidPrice(mberManageVO.getShortPrice(), sysJoinSetVO.getShortPrice()); |
|
| 199 |
+ float longPrice = getValidPrice(mberManageVO.getLongPrice(), sysJoinSetVO.getLongPrice()); |
|
| 200 |
+ |
|
| 201 |
+ |
|
| 202 |
+ String shortPStr = Float.toString(shortPrice); |
|
| 203 |
+ String mmsPStr = Float.toString(longPrice); |
|
| 204 |
+ |
|
| 205 |
+ // 공통 가격 설정 |
|
| 206 |
+ sendVO.setSmsPrice(shortPStr); |
|
| 207 |
+ sendVO.setMmsPrice(mmsPStr); |
|
| 208 |
+ |
|
| 209 |
+ |
|
| 210 |
+ if("Y".equals(kakaoVO.getSubMsgSendYn())) {
|
|
| 211 |
+ int smsTxtByte = mjonCommon.getSmsTxtBytes(sendVO.getSubMsgTxt()); |
|
| 212 |
+ String sendType = getMsgType(smsTxtByte); |
|
| 213 |
+ sendVO.setSubMsgType(sendType); |
|
| 214 |
+ |
|
| 215 |
+ if ("INVALID".equals(sendType)) {
|
|
| 216 |
+ statusResponseSet(statusResponse, HttpStatus.BAD_REQUEST, "전송 문자 길이를 초과하였습니다.");return kakaoSendAdvcListVO; |
|
| 217 |
+ } |
|
| 218 |
+ |
|
| 219 |
+ boolean isMms = "MMS".equals(sendType); |
|
| 220 |
+ sendVO.setEachPrice(isMms ? mmsPStr : shortPStr); |
|
| 221 |
+ |
|
| 222 |
+ |
|
| 223 |
+ } else {
|
|
| 224 |
+ kakaoAtPrice = getValidPrice(mberManageVO.getKakaoAtPrice(), sysJoinSetVO.getKakaoAtPrice()); |
|
| 225 |
+ sendVO.setEachPrice( Float.toString(kakaoAtPrice) ); |
|
| 226 |
+ } |
|
| 227 |
+ |
|
| 228 |
+ |
|
| 229 |
+ |
|
| 230 |
+ // step4 |
|
| 231 |
+ // 예약 시간 설정 및 분할 데이터 설정 |
|
| 232 |
+ if ("Y".equalsIgnoreCase(kakaoVO.getReserveYn())
|
|
| 233 |
+ && "Y".equalsIgnoreCase(kakaoVO.getDivideChk()) |
|
| 234 |
+ && counter == Integer.parseInt(kakaoVO.getDivideCnt())) |
|
| 235 |
+ {
|
|
| 236 |
+ counter = 0; |
|
| 237 |
+ calendar.add(Calendar.MINUTE, Integer.parseInt(kakaoVO.getDivideTime())); |
|
| 238 |
+ } |
|
| 239 |
+ counter++; |
|
| 240 |
+ // 즉시 발송인경우 현재 시간 |
|
| 241 |
+ // 예약인 경우 위에 설정한 시간 입력 |
|
| 242 |
+ sendVO.setReqDate(DATE_FORMATTER.format(calendar.getTime())); |
|
| 243 |
+ |
|
| 244 |
+ |
|
| 245 |
+ |
|
| 246 |
+/** @step5 전송 메세지 설정 json파일 만들기*/ |
|
| 247 |
+ // 타이틀과 버튼이 있고 |
|
| 248 |
+ if(hasTitleOrButtons) {
|
|
| 249 |
+ // 버튼과 타이틀에 치환데이터가 있으면 json String을 계속 생성 |
|
| 250 |
+ if(needsJsonReplacement) {
|
|
| 251 |
+ sharedJsonStr = kakaoApiJsonSave.kakaoApiJsonSave_advc(sendVO, templateDetail); |
|
| 252 |
+ sendVO.setBizJsonName(msgId); |
|
| 253 |
+ sendVO.setJsonStr(sharedJsonStr); |
|
| 254 |
+ } else if (StringUtils.isEmpty(sharedJsonStr)) {
|
|
| 255 |
+ // 치환 데이터가 없고 아직 생성되지 않았으면 한 번만 생성 |
|
| 256 |
+ sharedJsonStr = kakaoApiJsonSave.kakaoApiJsonSave_advc(sendVO, templateDetail); |
|
| 257 |
+ sendVO.setBizJsonName(idList.get(0)); |
|
| 258 |
+ sendVO.setJsonStr(sharedJsonStr); |
|
| 259 |
+ }else {
|
|
| 260 |
+ sendVO.setBizJsonName(idList.get(0)); |
|
| 261 |
+ } |
|
| 262 |
+ |
|
| 263 |
+ } |
|
| 264 |
+ kakaoSendAdvcListVO.add(sendVO); |
|
| 265 |
+ } |
|
| 266 |
+ |
|
| 267 |
+ |
|
| 268 |
+ return kakaoSendAdvcListVO; |
|
| 269 |
+ } |
|
| 270 |
+ |
|
| 271 |
+ private Calendar setupBaseDate(KakaoVO kakaoVO, boolean isNotified) throws ParseException {
|
|
| 272 |
+ // 예약 시간 기본값 설정 |
|
| 273 |
+ Date now = new Date(); |
|
| 274 |
+ // ReqDate가 비어 있으면 현재 시간으로 설정, 그렇지 않으면 ReqDate로 설정 |
|
| 275 |
+ // 화면에서 예약문자면 예약시간을 regDate로 설정한다. |
|
| 276 |
+ Date baseDate; |
|
| 277 |
+ if (StringUtils.isEmpty(kakaoVO.getReqDate())) {
|
|
| 278 |
+ kakaoVO.setReqDate(DATE_FORMATTER.format(now)); // ReqDate에 현재 시간 설정 |
|
| 279 |
+ baseDate = now; |
|
| 280 |
+ } else {
|
|
| 281 |
+ baseDate = DATE_FORMATTER.parse(kakaoVO.getReqDate()); // ReqDate를 baseDate로 설정 |
|
| 282 |
+ } |
|
| 283 |
+ |
|
| 284 |
+ // 시간 성정 |
|
| 285 |
+ Calendar calendar = Calendar.getInstance(); |
|
| 286 |
+ calendar.setTime(baseDate); // calendar에 baseDate 설정 |
|
| 287 |
+ |
|
| 288 |
+ // 지연 여부 처리 |
|
| 289 |
+ // 알림톡 스미싱의심 + 공휴일알림 조건이 맞으면 30분 delay |
|
| 290 |
+ if ( "Y".equalsIgnoreCase(kakaoVO.getAtSmishingYn()) |
|
| 291 |
+ && isNotified) {
|
|
| 292 |
+ calendar.add(Calendar.MINUTE, 30); // 모든 시간을 30분 뒤로 미룸 |
|
| 293 |
+ } |
|
| 294 |
+ return calendar; |
|
| 295 |
+ } |
|
| 296 |
+ |
|
| 297 |
+ /** |
|
| 298 |
+ * @methodName : createSendVO |
|
| 299 |
+ * @author : 이호영 |
|
| 300 |
+ * @date : 2025. 3. 19. |
|
| 301 |
+ * @description : populateSendLists 반복에 필요한 공통생성 부분 |
|
| 302 |
+ * @return : KakaoSendAdvcVO |
|
| 303 |
+ * @param kakaoVO |
|
| 304 |
+ * @return |
|
| 305 |
+ * |
|
| 306 |
+ */ |
|
| 307 |
+ private KakaoSendAdvcVO createSendVO(KakaoVO kakaoVO) {
|
|
| 308 |
+ KakaoSendAdvcVO sendVO = new KakaoSendAdvcVO(); |
|
| 309 |
+ sendVO.setMsgType("8");
|
|
| 310 |
+ sendVO.setSenderKey(kakaoVO.getSenderKey()); |
|
| 311 |
+ sendVO.setTemplateCode(kakaoVO.getTemplateCode()); |
|
| 312 |
+ sendVO.setUserId(kakaoVO.getUserId()); |
|
| 313 |
+ sendVO.setCallFrom(kakaoVO.getCallFrom()); |
|
| 314 |
+ sendVO.setAgentCode("04");
|
|
| 315 |
+ return sendVO; |
|
| 316 |
+ } |
|
| 317 |
+ |
|
| 318 |
+ private List<KakaoButtonVO> replaceButtonLinks(List<KakaoButtonVO> buttonList, |
|
| 319 |
+ Map<String, String> variables) {
|
|
| 320 |
+ |
|
| 321 |
+ if (buttonList != null) {
|
|
| 322 |
+ for (KakaoButtonVO button : buttonList) {
|
|
| 323 |
+ // 각 링크 필드에 대해 치환 수행 |
|
| 324 |
+ if (button.getLinkAnd() != null) {
|
|
| 325 |
+ button.setLinkAnd(mjonCommon.ATReplaceTemplateVariables(button.getLinkAnd(), variables)); |
|
| 326 |
+ } |
|
| 327 |
+ if (button.getLinkIos() != null) {
|
|
| 328 |
+ button.setLinkIos(mjonCommon.ATReplaceTemplateVariables(button.getLinkIos(), variables)); |
|
| 329 |
+ } |
|
| 330 |
+ if (button.getLinkMo() != null) {
|
|
| 331 |
+ button.setLinkMo(mjonCommon.ATReplaceTemplateVariables(button.getLinkMo(), variables)); |
|
| 332 |
+ } |
|
| 333 |
+ if (button.getLinkPc() != null) {
|
|
| 334 |
+ button.setLinkPc(mjonCommon.ATReplaceTemplateVariables(button.getLinkPc(), variables)); |
|
| 335 |
+ } |
|
| 336 |
+ } |
|
| 337 |
+ // 치환된 버튼 리스트를 sendVO에 반영 |
|
| 338 |
+// sendVO.setButtonList(buttonList); // KakaoSendAdvcVO에 setButtonList가 있다고 가정 |
|
| 339 |
+ } |
|
| 340 |
+ |
|
| 341 |
+ return buttonList; |
|
| 342 |
+ } |
|
| 343 |
+ |
|
| 344 |
+ /** |
|
| 345 |
+ * 버튼 리스트에 치환 패턴(#{...})이 있는지 확인합니다.
|
|
| 346 |
+ * @param buttonList 버튼 리스트 (null 가능) |
|
| 347 |
+ * @return 치환 패턴이 있으면 true, 없으면 false |
|
| 348 |
+ */ |
|
| 349 |
+ private boolean needsButtonReplacement(List<KakaoButtonVO> buttonList) {
|
|
| 350 |
+ if (buttonList == null) {
|
|
| 351 |
+ return false; |
|
| 352 |
+ } |
|
| 353 |
+ return buttonList.stream().anyMatch(button -> |
|
| 354 |
+ replBooleanStrChecker(button.getLinkAnd()) || |
|
| 355 |
+ replBooleanStrChecker(button.getLinkIos()) || |
|
| 356 |
+ replBooleanStrChecker(button.getLinkMo()) || |
|
| 357 |
+ replBooleanStrChecker(button.getLinkPc()) |
|
| 358 |
+ ); |
|
| 359 |
+ } |
|
| 360 |
+ |
|
| 361 |
+ /** |
|
| 362 |
+ * 입력 문자열에 치환 패턴(#{...})이 있는지 확인합니다.
|
|
| 363 |
+ * @param input 확인할 문자열 (null 가능) |
|
| 364 |
+ * @return 치환 패턴이 있으면 true, 없으면 false |
|
| 365 |
+ */ |
|
| 366 |
+ private boolean replBooleanStrChecker(String input) {
|
|
| 367 |
+ // #{...} 패턴을 확인하는 정규 표현식
|
|
| 368 |
+ if (input == null) {
|
|
| 369 |
+ return false; |
|
| 370 |
+ } |
|
| 371 |
+ Matcher matcher = REPLACEMENT_PATTERN.matcher(input); |
|
| 372 |
+ return matcher.find(); |
|
| 373 |
+ } |
|
| 374 |
+ |
|
| 375 |
+ |
|
| 376 |
+ public Float getValidPrice(Float personalPrice, Float defaultPrice) {
|
|
| 377 |
+ return (personalPrice != null && personalPrice > 0) ? personalPrice : defaultPrice; |
|
| 378 |
+ } |
|
| 379 |
+ |
|
| 380 |
+ |
|
| 381 |
+ /** |
|
| 382 |
+ * @methodName : getMsgType |
|
| 383 |
+ * @author : 이호영 |
|
| 384 |
+ * @date : 2025. 3. 12. |
|
| 385 |
+ * @description : 메세지 타입 구하기 |
|
| 386 |
+ * @return : String |
|
| 387 |
+ * @param smsTxtByte |
|
| 388 |
+ * @return |
|
| 389 |
+ * |
|
| 390 |
+ */ |
|
| 391 |
+ private String getMsgType(int smsTxtByte) {
|
|
| 392 |
+ // TODO Auto-generated method stub |
|
| 393 |
+ |
|
| 394 |
+ String msgType = SHORT_MSG_TYPE; |
|
| 395 |
+ |
|
| 396 |
+ // 1. 2000 Byte 초과는 에러 처리 |
|
| 397 |
+ if (smsTxtByte > 2000) {
|
|
| 398 |
+ return "INVALID"; |
|
| 399 |
+ } |
|
| 400 |
+ |
|
| 401 |
+ // 2. 문자 길이에 따라 메시지 타입 설정 (90 Byte 초과는 장문) |
|
| 402 |
+ if (smsTxtByte > 90) {
|
|
| 403 |
+ msgType = LONG_MSG_TYPE; |
|
| 404 |
+ } |
|
| 405 |
+ |
|
| 406 |
+ return msgType; |
|
| 407 |
+ } |
|
| 408 |
+ |
|
| 409 |
+ |
|
| 410 |
+ |
|
| 411 |
+ |
|
| 27 | 412 |
|
| 28 | 413 |
|
| 29 | 414 |
/** |
... | ... | @@ -34,13 +419,11 @@ |
| 34 | 419 |
*/ |
| 35 | 420 |
public KakaoVO kakaoSendPrice(KakaoVO kakaoVO) throws Exception {
|
| 36 | 421 |
|
| 37 |
- //사용자 현재 보유 금액 불러오기(문자 발송 금액 차감 이전 금액) |
|
| 38 |
- String befCash = kakaoVO.getBefCash(); |
|
| 422 |
+ System.out.println(" :: kakaoSendPrice :: ");
|
|
| 39 | 423 |
|
| 40 |
- //VO에서 현재 보유금액이 없으면 디비에서 조회해서 불러옴 |
|
| 41 |
- if("".equals(befCash) || befCash == null) {
|
|
| 42 |
- |
|
| 43 |
- } |
|
| 424 |
+ //사용자 현재 보유 금액 불러오기(문자 발송 금액 차감 이전 금액) |
|
| 425 |
+// String befCash = kakaoVO.getBefCash(); |
|
| 426 |
+ |
|
| 44 | 427 |
MjonMsgVO mjonMsgVO = new MjonMsgVO(); |
| 45 | 428 |
mjonMsgVO.setUserId(kakaoVO.getUserId()); |
| 46 | 429 |
String userMoney = mjonMsgDataService.selectBeforeCashData(mjonMsgVO); |
... | ... | @@ -55,6 +438,7 @@ |
| 55 | 438 |
|
| 56 | 439 |
/** 대체문자 여부 체크(있으면 대체문자 가격으로 없으면 카카오톡 가격으로) */ |
| 57 | 440 |
//대체문자 발송 여부 확인 |
| 441 |
+ System.out.println(" :: kakaoVO.getSubMsgSendYn() :: "+ kakaoVO.getSubMsgSendYn());
|
|
| 58 | 442 |
if(kakaoVO.getSubMsgSendYn().equals("Y")) {
|
| 59 | 443 |
|
| 60 | 444 |
|
... | ... | @@ -401,6 +785,107 @@ |
| 401 | 785 |
varValInfo = kakaoVO.getVarValList().get(count); |
| 402 | 786 |
} |
| 403 | 787 |
String jsonFileName = kakaoApiJsonSave.kakaoApiJsonSave(kakaoVO, varValInfo); |
| 788 |
+ setSendMsgVO.setBizJsonName(jsonFileName); //json 파일명 |
|
| 789 |
+ } |
|
| 790 |
+ |
|
| 791 |
+ kakaoSendList.add(setSendMsgVO); |
|
| 792 |
+ } |
|
| 793 |
+ kakaoVO.setKakaoSendList(kakaoSendList); |
|
| 794 |
+ |
|
| 795 |
+ } catch (Exception e) {
|
|
| 796 |
+ System.out.println(e.toString()); |
|
| 797 |
+ e.printStackTrace(); |
|
| 798 |
+ } |
|
| 799 |
+ |
|
| 800 |
+ return kakaoVO; |
|
| 801 |
+ } |
|
| 802 |
+ |
|
| 803 |
+ /** |
|
| 804 |
+ * @methodName : kakaoSendMsg_advc |
|
| 805 |
+ * @author : 이호영 |
|
| 806 |
+ * @date : 2025. 3. 13. |
|
| 807 |
+ * @description : kakaoSendMsg 개선 |
|
| 808 |
+ * @return : KakaoVO |
|
| 809 |
+ * @param kakaoVO |
|
| 810 |
+ * @return |
|
| 811 |
+ * @throws Exception |
|
| 812 |
+ * |
|
| 813 |
+ */ |
|
| 814 |
+ public KakaoVO kakaoSendMsg_advc(KakaoVO kakaoVO) throws Exception {
|
|
| 815 |
+ List<KakaoVO> kakaoSendList = new ArrayList<KakaoVO>(); |
|
| 816 |
+ //전체 받는사람 수량만큼 반복 확인 |
|
| 817 |
+ int callToCnt = kakaoVO.getCallToList().length; |
|
| 818 |
+ try {
|
|
| 819 |
+ for(int count =0; count < callToCnt; count++) {
|
|
| 820 |
+ |
|
| 821 |
+ KakaoVO setSendMsgVO = new KakaoVO(); |
|
| 822 |
+ |
|
| 823 |
+ setSendMsgVO.setDestPhone(kakaoVO.getCallToList()[count]); // 수신 번호 |
|
| 824 |
+ // 카카오 전송내용 설정 |
|
| 825 |
+ // 변환문자 포함(Y), 미포함(N) |
|
| 826 |
+ if(kakaoVO.getTxtReplYn().equals("Y")) {
|
|
| 827 |
+ |
|
| 828 |
+ String templateContent = kakaoSubMagTxtRepl(kakaoVO.getTemplateContent(), kakaoVO, count); |
|
| 829 |
+ setSendMsgVO.setTemplateContent(templateContent); |
|
| 830 |
+ |
|
| 831 |
+ if(kakaoVO.getTemplateEmphasizeType().equals("TEXT")) {
|
|
| 832 |
+ |
|
| 833 |
+ String title = kakaoSubMagTxtRepl(kakaoVO.getTemplateTitle(), kakaoVO, count); |
|
| 834 |
+ String subTitle = kakaoVO.getTemplateSubtitle(); |
|
| 835 |
+// title = title +"§§"+ subTitle; |
|
| 836 |
+ setSendMsgVO.setTemplateEmphasizeType(kakaoVO.getTemplateEmphasizeType()); |
|
| 837 |
+ setSendMsgVO.setTemplateTitle(title); |
|
| 838 |
+ } |
|
| 839 |
+ |
|
| 840 |
+ }else {
|
|
| 841 |
+ |
|
| 842 |
+ if(kakaoVO.getTemplateEmphasizeType().equals("TEXT")) {
|
|
| 843 |
+ |
|
| 844 |
+ String title = kakaoSubMagTxtRepl(kakaoVO.getTemplateTitle(), kakaoVO, count); |
|
| 845 |
+ String subTitle = kakaoVO.getTemplateSubtitle(); |
|
| 846 |
+// title = title +"§§"+ subTitle; |
|
| 847 |
+ setSendMsgVO.setTemplateEmphasizeType(kakaoVO.getTemplateEmphasizeType()); |
|
| 848 |
+ setSendMsgVO.setTemplateTitle(title); |
|
| 849 |
+ } |
|
| 850 |
+ |
|
| 851 |
+ // 템플릿 내용 설정 |
|
| 852 |
+ setSendMsgVO.setTemplateContent(kakaoVO.getTemplateContent()); |
|
| 853 |
+ } |
|
| 854 |
+ |
|
| 855 |
+ //대체문자 포함(Y), 미포함(N) |
|
| 856 |
+ if(kakaoVO.getSubMsgSendYn().equals("Y")) {
|
|
| 857 |
+ |
|
| 858 |
+ String charset = "euc-kr"; //문자 바이트 계산에 필요한 캐릭터 셋 : 한글 2Byte로 계산 |
|
| 859 |
+ |
|
| 860 |
+ String tempSubMagTxt = kakaoVO.getSubMsgTxt().replace("\r\n", "\n");
|
|
| 861 |
+ kakaoVO.setKakaoSubMagOrgnlTxt(tempSubMagTxt); |
|
| 862 |
+ if(kakaoVO.getSubMsgTxtReplYn().equals("Y")) {
|
|
| 863 |
+ tempSubMagTxt = kakaoSubMagTxtRepl(tempSubMagTxt, kakaoVO, count); |
|
| 864 |
+ } |
|
| 865 |
+ System.out.println("@@ 대체문자내용 : " + tempSubMagTxt);
|
|
| 866 |
+ setSendMsgVO.setSubMsgTxt(tempSubMagTxt); |
|
| 867 |
+ |
|
| 868 |
+ int FrBytes = tempSubMagTxt.getBytes(charset).length; |
|
| 869 |
+ System.out.println("@@ 대체문자길이 : " + FrBytes);
|
|
| 870 |
+ //메세지 길이가 90Byte가 초과시 MMS |
|
| 871 |
+ if(FrBytes > 90) {
|
|
| 872 |
+ setSendMsgVO.setSubMsgType("MMS");
|
|
| 873 |
+ }else {// 아니면 SMS
|
|
| 874 |
+ setSendMsgVO.setSubMsgType("SMS");
|
|
| 875 |
+ } |
|
| 876 |
+ |
|
| 877 |
+ System.out.println("@@ 대체문자타입 : " + setSendMsgVO.getSubMsgType());
|
|
| 878 |
+ } |
|
| 879 |
+ |
|
| 880 |
+ if(kakaoVO.getBizJsonYn().equals("Y")) {
|
|
| 881 |
+ kakaoVO.setDestPhone(kakaoVO.getCallToList()[count]); // 수신 번호 |
|
| 882 |
+ |
|
| 883 |
+ String[] varValInfo = null; |
|
| 884 |
+ if( kakaoVO.getVarValList().size() != 0) {
|
|
| 885 |
+ varValInfo = kakaoVO.getVarValList().get(count); |
|
| 886 |
+ } |
|
| 887 |
+ String jsonFileName = kakaoApiJsonSave.kakaoApiJsonSave(kakaoVO, varValInfo); |
|
| 888 |
+// String jsonFileName = kakaoApiJsonSave.kakaoApiJsonSave_advc(kakaoVO, varValInfo); |
|
| 404 | 889 |
// String jsonFileName = kakaoApiJsonSave.kakaoApiJsonSave(kakaoVO, kakaoVO.getVarValList().get(count)); |
| 405 | 890 |
setSendMsgVO.setBizJsonName(jsonFileName); //json 파일명 |
| 406 | 891 |
} |
... | ... | @@ -509,6 +994,7 @@ |
| 509 | 994 |
|
| 510 | 995 |
|
| 511 | 996 |
public String kakaoSubMagTxtRepl(String tempSubMagTxt, KakaoVO kakaoVO, int count) {
|
| 997 |
+ System.out.println("tempSubMagTxt : "+ tempSubMagTxt);
|
|
| 512 | 998 |
|
| 513 | 999 |
// String tempSubMagTxt = kakaoVO.getSubMsgTxt().replace("\r\n", "\n");
|
| 514 | 1000 |
// String tempSubMagTxt = msgTxt; |
... | ... | @@ -550,6 +1036,7 @@ |
| 550 | 1036 |
} |
| 551 | 1037 |
return tempSubMagTxt; |
| 552 | 1038 |
} |
| 1039 |
+ |
|
| 553 | 1040 |
|
| 554 | 1041 |
public String kakaoFTSubMagTxtRepl(String tempSubMagTxt, KakaoVO kakaoVO, int count) throws Exception{
|
| 555 | 1042 |
|
... | ... | @@ -704,5 +1191,10 @@ |
| 704 | 1191 |
//} |
| 705 | 1192 |
return ""; |
| 706 | 1193 |
} |
| 707 |
- |
|
| 1194 |
+ |
|
| 1195 |
+ public static void statusResponseSet (StatusResponse statusResponse, HttpStatus httpStatus, String msg ) {
|
|
| 1196 |
+ statusResponse.setStatus(httpStatus); |
|
| 1197 |
+ statusResponse.setMessage(msg); |
|
| 1198 |
+ |
|
| 1199 |
+ } |
|
| 708 | 1200 |
} |
--- src/main/java/itn/let/kakao/kakaoComm/KakaoVO.java
+++ src/main/java/itn/let/kakao/kakaoComm/KakaoVO.java
... | ... | @@ -2,8 +2,11 @@ |
| 2 | 2 |
|
| 3 | 3 |
import java.util.ArrayList; |
| 4 | 4 |
import java.util.List; |
| 5 |
+import java.util.Map; |
|
| 5 | 6 |
|
| 6 | 7 |
import itn.let.mjo.msg.service.MjonMsgVO; |
| 8 |
+import lombok.Getter; |
|
| 9 |
+import lombok.Setter; |
|
| 7 | 10 |
|
| 8 | 11 |
/** |
| 9 | 12 |
* @FileName : KakaoVO.java |
... | ... | @@ -13,6 +16,8 @@ |
| 13 | 16 |
|
| 14 | 17 |
* @프로그램 설명 : 카카오톡 요청 변수 목록 (문자온VO를 상속 받음) |
| 15 | 18 |
*/ |
| 19 |
+@Getter |
|
| 20 |
+@Setter |
|
| 16 | 21 |
public class KakaoVO extends MjonMsgVO{
|
| 17 | 22 |
|
| 18 | 23 |
private static final long serialVersionUID = 536382850588307019L; |
... | ... | @@ -246,996 +251,69 @@ |
| 246 | 251 |
private String successCntDay; |
| 247 | 252 |
private String successCntMonth; |
| 248 | 253 |
private String successCntYear; |
| 249 |
- |
|
| 250 |
- public String getSuccessDay() {
|
|
| 251 |
- return successDay; |
|
| 252 |
- } |
|
| 253 |
- |
|
| 254 |
- public void setSuccessDay(String successDay) {
|
|
| 255 |
- this.successDay = successDay; |
|
| 256 |
- } |
|
| 257 |
- |
|
| 258 |
- public String getSuccessMonth() {
|
|
| 259 |
- return successMonth; |
|
| 260 |
- } |
|
| 261 |
- |
|
| 262 |
- public void setSuccessMonth(String successMonth) {
|
|
| 263 |
- this.successMonth = successMonth; |
|
| 264 |
- } |
|
| 265 |
- |
|
| 266 |
- public String getSuccessYear() {
|
|
| 267 |
- return successYear; |
|
| 268 |
- } |
|
| 269 |
- |
|
| 270 |
- public void setSuccessYear(String successYear) {
|
|
| 271 |
- this.successYear = successYear; |
|
| 272 |
- } |
|
| 273 | 254 |
|
| 274 |
- public String getSuccessCntDay() {
|
|
| 275 |
- return successCntDay; |
|
| 276 |
- } |
|
| 277 |
- |
|
| 278 |
- public void setSuccessCntDay(String successCntDay) {
|
|
| 279 |
- this.successCntDay = successCntDay; |
|
| 280 |
- } |
|
| 281 |
- |
|
| 282 |
- public String getSuccessCntMonth() {
|
|
| 283 |
- return successCntMonth; |
|
| 284 |
- } |
|
| 285 |
- |
|
| 286 |
- public void setSuccessCntMonth(String successCntMonth) {
|
|
| 287 |
- this.successCntMonth = successCntMonth; |
|
| 288 |
- } |
|
| 289 |
- |
|
| 290 |
- public String getSuccessCntYear() {
|
|
| 291 |
- return successCntYear; |
|
| 292 |
- } |
|
| 293 |
- |
|
| 294 |
- public void setSuccessCntYear(String successCntYear) {
|
|
| 295 |
- this.successCntYear = successCntYear; |
|
| 296 |
- } |
|
| 297 | 255 |
|
| 298 |
- public static long getSerialversionuid() {
|
|
| 299 |
- return serialVersionUID; |
|
| 300 |
- } |
|
| 301 |
- |
|
| 302 |
- public String getCategoryDepth() {
|
|
| 303 |
- return categoryDepth; |
|
| 304 |
- } |
|
| 305 |
- |
|
| 306 |
- public void setCategoryDepth(String categoryDepth) {
|
|
| 307 |
- this.categoryDepth = categoryDepth; |
|
| 308 |
- } |
|
| 309 |
- |
|
| 310 |
- public String getCategoryType() {
|
|
| 311 |
- return categoryType; |
|
| 312 |
- } |
|
| 313 |
- |
|
| 314 |
- public void setCategoryType(String categoryType) {
|
|
| 315 |
- this.categoryType = categoryType; |
|
| 316 |
- } |
|
| 317 |
- |
|
| 318 |
- public String getCategoryCode() {
|
|
| 319 |
- return categoryCode; |
|
| 320 |
- } |
|
| 321 |
- |
|
| 322 |
- public void setCategoryCode(String categoryCode) {
|
|
| 323 |
- this.categoryCode = categoryCode; |
|
| 324 |
- } |
|
| 325 |
- |
|
| 326 |
- public String getCategoryGroupName() {
|
|
| 327 |
- return categoryGroupName; |
|
| 328 |
- } |
|
| 329 |
- |
|
| 330 |
- public void setCategoryGroupName(String categoryGroupName) {
|
|
| 331 |
- this.categoryGroupName = categoryGroupName; |
|
| 332 |
- } |
|
| 333 |
- |
|
| 334 |
- public String getCategoryName() {
|
|
| 335 |
- return categoryName; |
|
| 336 |
- } |
|
| 337 |
- |
|
| 338 |
- public void setCategoryName(String categoryName) {
|
|
| 339 |
- this.categoryName = categoryName; |
|
| 340 |
- } |
|
| 341 |
- |
|
| 342 |
- public String getCategoryInclusion() {
|
|
| 343 |
- return categoryInclusion; |
|
| 344 |
- } |
|
| 345 |
- |
|
| 346 |
- public void setCategoryInclusion(String categoryInclusion) {
|
|
| 347 |
- this.categoryInclusion = categoryInclusion; |
|
| 348 |
- } |
|
| 349 |
- |
|
| 350 |
- public String getCategoryExclusion() {
|
|
| 351 |
- return categoryExclusion; |
|
| 352 |
- } |
|
| 353 |
- |
|
| 354 |
- public void setCategoryExclusion(String categoryExclusion) {
|
|
| 355 |
- this.categoryExclusion = categoryExclusion; |
|
| 356 |
- } |
|
| 357 |
- |
|
| 358 |
- public String getBizUrl() {
|
|
| 359 |
- return bizUrl; |
|
| 360 |
- } |
|
| 361 | 256 |
|
| 362 |
- public void setBizUrl(String bizUrl) {
|
|
| 363 |
- this.bizUrl = bizUrl; |
|
| 364 |
- } |
|
| 257 |
+ //재전송 영역 |
|
| 258 |
+ private String msgResendAllFlag; |
|
| 259 |
+ private String msgResendAllGroupId; |
|
| 260 |
+ private String msgResendAllTmpKey; |
|
| 261 |
+ private String msgResendAllYellowId; |
|
| 365 | 262 |
|
| 366 |
- public String getBizReturnMsg() {
|
|
| 367 |
- return bizReturnMsg; |
|
| 368 |
- } |
|
| 369 |
- |
|
| 370 |
- public void setBizReturnMsg(String bizReturnMsg) {
|
|
| 371 |
- this.bizReturnMsg = bizReturnMsg; |
|
| 372 |
- } |
|
| 263 |
+ private List<Map<String, String>> varListMap; |
|
| 373 | 264 |
|
| 374 |
- public String getBizReturnCode() {
|
|
| 375 |
- return bizReturnCode; |
|
| 376 |
- } |
|
| 377 |
- |
|
| 378 |
- public void setBizReturnCode(String bizReturnCode) {
|
|
| 379 |
- this.bizReturnCode = bizReturnCode; |
|
| 380 |
- } |
|
| 381 |
- |
|
| 382 |
- public String getPhoneNumber() {
|
|
| 383 |
- return phoneNumber; |
|
| 384 |
- } |
|
| 385 |
- |
|
| 386 |
- public void setPhoneNumber(String phoneNumber) {
|
|
| 387 |
- this.phoneNumber = phoneNumber; |
|
| 388 |
- } |
|
| 389 |
- |
|
| 390 |
- public String getYellowId() {
|
|
| 391 |
- return yellowId; |
|
| 392 |
- } |
|
| 393 |
- |
|
| 394 |
- public void setYellowId(String yellowId) {
|
|
| 395 |
- this.yellowId = yellowId; |
|
| 396 |
- } |
|
| 397 |
- |
|
| 398 |
- public String getBizJsonName() {
|
|
| 399 |
- return bizJsonName; |
|
| 400 |
- } |
|
| 401 |
- |
|
| 402 |
- public void setBizJsonName(String bizJsonName) {
|
|
| 403 |
- this.bizJsonName = bizJsonName; |
|
| 404 |
- } |
|
| 405 |
- |
|
| 406 |
- public String getToken() {
|
|
| 407 |
- return token; |
|
| 408 |
- } |
|
| 409 |
- |
|
| 410 |
- public void setToken(String token) {
|
|
| 411 |
- this.token = token; |
|
| 412 |
- } |
|
| 413 |
- |
|
| 414 |
- public String getSenderKey() {
|
|
| 415 |
- return senderKey; |
|
| 416 |
- } |
|
| 417 |
- |
|
| 418 |
- public void setSenderKey(String senderKey) {
|
|
| 419 |
- this.senderKey = senderKey; |
|
| 420 |
- } |
|
| 421 |
- |
|
| 422 |
- public String getProfileId() {
|
|
| 423 |
- return profileId; |
|
| 424 |
- } |
|
| 425 |
- |
|
| 426 |
- public void setProfileId(String profileId) {
|
|
| 427 |
- this.profileId = profileId; |
|
| 428 |
- } |
|
| 429 |
- |
|
| 430 |
- public String getUserId() {
|
|
| 431 |
- return userId; |
|
| 432 |
- } |
|
| 433 |
- |
|
| 434 |
- public void setUserId(String userId) {
|
|
| 435 |
- this.userId = userId; |
|
| 436 |
- } |
|
| 437 |
- |
|
| 438 |
- public String getImgTitle() {
|
|
| 439 |
- return imgTitle; |
|
| 440 |
- } |
|
| 441 |
- |
|
| 442 |
- public void setImgTitle(String imgTitle) {
|
|
| 443 |
- this.imgTitle = imgTitle; |
|
| 444 |
- } |
|
| 445 |
- |
|
| 446 |
- public String getImageType() {
|
|
| 447 |
- return imageType; |
|
| 448 |
- } |
|
| 449 |
- |
|
| 450 |
- public void setImageType(String imageType) {
|
|
| 451 |
- this.imageType = imageType; |
|
| 452 |
- } |
|
| 453 |
- |
|
| 454 |
- public String getImgLink() {
|
|
| 455 |
- return imgLink; |
|
| 456 |
- } |
|
| 457 |
- |
|
| 458 |
- public void setImgLink(String imgLink) {
|
|
| 459 |
- this.imgLink = imgLink; |
|
| 460 |
- } |
|
| 461 |
- |
|
| 462 |
- public String getTemplateName() {
|
|
| 463 |
- return templateName; |
|
| 464 |
- } |
|
| 465 |
- |
|
| 466 |
- public void setTemplateName(String templateName) {
|
|
| 467 |
- this.templateName = templateName; |
|
| 468 |
- } |
|
| 469 |
- |
|
| 470 |
- public String getTemplateMessageType() {
|
|
| 471 |
- return templateMessageType; |
|
| 472 |
- } |
|
| 473 |
- |
|
| 474 |
- public void setTemplateMessageType(String templateMessageType) {
|
|
| 475 |
- this.templateMessageType = templateMessageType; |
|
| 476 |
- } |
|
| 477 |
- |
|
| 478 |
- public String getTemplateEmphasizeType() {
|
|
| 479 |
- return templateEmphasizeType; |
|
| 480 |
- } |
|
| 481 |
- |
|
| 482 |
- public void setTemplateEmphasizeType(String templateEmphasizeType) {
|
|
| 483 |
- this.templateEmphasizeType = templateEmphasizeType; |
|
| 484 |
- } |
|
| 485 |
- |
|
| 486 |
- public String getTemplateContent() {
|
|
| 487 |
- return templateContent; |
|
| 488 |
- } |
|
| 489 |
- |
|
| 490 |
- public void setTemplateContent(String templateContent) {
|
|
| 491 |
- this.templateContent = templateContent; |
|
| 492 |
- } |
|
| 493 |
- |
|
| 494 |
- public String getTemplateExtra() {
|
|
| 495 |
- return templateExtra; |
|
| 496 |
- } |
|
| 497 |
- |
|
| 498 |
- public void setTemplateExtra(String templateExtra) {
|
|
| 499 |
- this.templateExtra = templateExtra; |
|
| 500 |
- } |
|
| 501 |
- |
|
| 502 |
- public String getTamplateAd() {
|
|
| 503 |
- return tamplateAd; |
|
| 504 |
- } |
|
| 505 |
- |
|
| 506 |
- public void setTamplateAd(String tamplateAd) {
|
|
| 507 |
- this.tamplateAd = tamplateAd; |
|
| 508 |
- } |
|
| 509 |
- |
|
| 510 |
- public String getTemplateImageName() {
|
|
| 511 |
- return templateImageName; |
|
| 512 |
- } |
|
| 513 |
- |
|
| 514 |
- public void setTemplateImageName(String templateImageName) {
|
|
| 515 |
- this.templateImageName = templateImageName; |
|
| 516 |
- } |
|
| 517 |
- |
|
| 518 |
- public String getTemplateImageUrl() {
|
|
| 519 |
- return templateImageUrl; |
|
| 520 |
- } |
|
| 521 |
- |
|
| 522 |
- public void setTemplateImageUrl(String templateImageUrl) {
|
|
| 523 |
- this.templateImageUrl = templateImageUrl; |
|
| 524 |
- } |
|
| 525 |
- |
|
| 526 |
- public String getTemplateTitle() {
|
|
| 527 |
- return templateTitle; |
|
| 528 |
- } |
|
| 529 |
- |
|
| 530 |
- public void setTemplateTitle(String templateTitle) {
|
|
| 531 |
- this.templateTitle = templateTitle; |
|
| 532 |
- } |
|
| 533 |
- |
|
| 534 |
- public String getTemplateSubtitle() {
|
|
| 535 |
- return templateSubtitle; |
|
| 536 |
- } |
|
| 537 |
- |
|
| 538 |
- public void setTemplateSubtitle(String templateSubtitle) {
|
|
| 539 |
- this.templateSubtitle = templateSubtitle; |
|
| 540 |
- } |
|
| 541 |
- |
|
| 542 |
- public String getTemplateHeader() {
|
|
| 543 |
- return templateHeader; |
|
| 544 |
- } |
|
| 545 |
- |
|
| 546 |
- public void setTemplateHeader(String templateHeader) {
|
|
| 547 |
- this.templateHeader = templateHeader; |
|
| 548 |
- } |
|
| 549 |
- |
|
| 550 |
- public Boolean getSecurityFlag() {
|
|
| 551 |
- return securityFlag; |
|
| 552 |
- } |
|
| 553 |
- |
|
| 554 |
- public void setSecurityFlag(Boolean securityFlag) {
|
|
| 555 |
- this.securityFlag = securityFlag; |
|
| 556 |
- } |
|
| 557 |
- |
|
| 558 |
- public List<KakaoButtonVO> getButtonVOList() {
|
|
| 559 |
- return buttonVOList; |
|
| 560 |
- } |
|
| 561 |
- |
|
| 562 |
- public void setButtonVOList(List<KakaoButtonVO> buttonVOList) {
|
|
| 563 |
- this.buttonVOList = buttonVOList; |
|
| 564 |
- } |
|
| 565 |
- |
|
| 566 |
- public String getButtonName() {
|
|
| 567 |
- return buttonName; |
|
| 568 |
- } |
|
| 569 |
- |
|
| 570 |
- public void setButtonName(String buttonName) {
|
|
| 571 |
- this.buttonName = buttonName; |
|
| 572 |
- } |
|
| 573 |
- |
|
| 574 |
- public String getButtonLinkType() {
|
|
| 575 |
- return buttonLinkType; |
|
| 576 |
- } |
|
| 577 |
- |
|
| 578 |
- public void setButtonLinkType(String buttonLinkType) {
|
|
| 579 |
- this.buttonLinkType = buttonLinkType; |
|
| 580 |
- } |
|
| 581 |
- |
|
| 582 |
- public String getButtonLinkAnd() {
|
|
| 583 |
- return buttonLinkAnd; |
|
| 584 |
- } |
|
| 585 |
- |
|
| 586 |
- public void setButtonLinkAnd(String buttonLinkAnd) {
|
|
| 587 |
- this.buttonLinkAnd = buttonLinkAnd; |
|
| 588 |
- } |
|
| 589 |
- |
|
| 590 |
- public String getButtonLinkIos() {
|
|
| 591 |
- return buttonLinkIos; |
|
| 592 |
- } |
|
| 593 |
- |
|
| 594 |
- public void setButtonLinkIos(String buttonLinkIos) {
|
|
| 595 |
- this.buttonLinkIos = buttonLinkIos; |
|
| 596 |
- } |
|
| 597 |
- |
|
| 598 |
- public String getButtonLinkMo() {
|
|
| 599 |
- return buttonLinkMo; |
|
| 600 |
- } |
|
| 601 |
- |
|
| 602 |
- public void setButtonLinkMo(String buttonLinkMo) {
|
|
| 603 |
- this.buttonLinkMo = buttonLinkMo; |
|
| 604 |
- } |
|
| 605 |
- |
|
| 606 |
- public String getButtonLinkPc() {
|
|
| 607 |
- return buttonLinkPc; |
|
| 608 |
- } |
|
| 609 |
- |
|
| 610 |
- public void setButtonLinkPc(String buttonLinkPc) {
|
|
| 611 |
- this.buttonLinkPc = buttonLinkPc; |
|
| 612 |
- } |
|
| 613 |
- |
|
| 614 |
- public String getButtonPluginId() {
|
|
| 615 |
- return buttonPluginId; |
|
| 616 |
- } |
|
| 617 |
- |
|
| 618 |
- public void setButtonPluginId(String buttonPluginId) {
|
|
| 619 |
- this.buttonPluginId = buttonPluginId; |
|
| 620 |
- } |
|
| 621 |
- |
|
| 622 |
- public String getQuickName() {
|
|
| 623 |
- return quickName; |
|
| 624 |
- } |
|
| 625 |
- |
|
| 626 |
- public void setQuickName(String quickName) {
|
|
| 627 |
- this.quickName = quickName; |
|
| 628 |
- } |
|
| 629 |
- |
|
| 630 |
- public String getQuickLinkType() {
|
|
| 631 |
- return quickLinkType; |
|
| 632 |
- } |
|
| 633 |
- |
|
| 634 |
- public void setQuickLinkType(String quickLinkType) {
|
|
| 635 |
- this.quickLinkType = quickLinkType; |
|
| 636 |
- } |
|
| 637 |
- |
|
| 638 |
- public String getQuickLinkAnd() {
|
|
| 639 |
- return quickLinkAnd; |
|
| 640 |
- } |
|
| 641 |
- |
|
| 642 |
- public void setQuickLinkAnd(String quickLinkAnd) {
|
|
| 643 |
- this.quickLinkAnd = quickLinkAnd; |
|
| 644 |
- } |
|
| 645 |
- |
|
| 646 |
- public String getQuickLinkIos() {
|
|
| 647 |
- return quickLinkIos; |
|
| 648 |
- } |
|
| 649 |
- |
|
| 650 |
- public void setQuickLinkIos(String quickLinkIos) {
|
|
| 651 |
- this.quickLinkIos = quickLinkIos; |
|
| 652 |
- } |
|
| 653 |
- |
|
| 654 |
- public String getQuickLinkMo() {
|
|
| 655 |
- return quickLinkMo; |
|
| 656 |
- } |
|
| 657 |
- |
|
| 658 |
- public void setQuickLinkMo(String quickLinkMo) {
|
|
| 659 |
- this.quickLinkMo = quickLinkMo; |
|
| 660 |
- } |
|
| 661 |
- |
|
| 662 |
- public String getQuickLinkPc() {
|
|
| 663 |
- return quickLinkPc; |
|
| 664 |
- } |
|
| 665 |
- |
|
| 666 |
- public void setQuickLinkPc(String quickLinkPc) {
|
|
| 667 |
- this.quickLinkPc = quickLinkPc; |
|
| 668 |
- } |
|
| 669 |
- |
|
| 670 |
- public String getSenderKeyType() {
|
|
| 671 |
- return senderKeyType; |
|
| 672 |
- } |
|
| 673 |
- |
|
| 674 |
- public void setSenderKeyType(String senderKeyType) {
|
|
| 675 |
- this.senderKeyType = senderKeyType; |
|
| 676 |
- } |
|
| 677 |
- |
|
| 678 |
- public String getDeleteYn() {
|
|
| 679 |
- return deleteYn; |
|
| 680 |
- } |
|
| 681 |
- |
|
| 682 |
- public void setDeleteYn(String deleteYn) {
|
|
| 683 |
- this.deleteYn = deleteYn; |
|
| 684 |
- } |
|
| 685 |
- |
|
| 686 |
- public String getTemplateCode() {
|
|
| 687 |
- return templateCode; |
|
| 688 |
- } |
|
| 689 |
- |
|
| 690 |
- public void setTemplateCode(String templateCode) {
|
|
| 691 |
- this.templateCode = templateCode; |
|
| 692 |
- } |
|
| 693 |
- |
|
| 694 |
- public String getNewTemplateCode() {
|
|
| 695 |
- return newTemplateCode; |
|
| 696 |
- } |
|
| 697 |
- |
|
| 698 |
- public void setNewTemplateCode(String newTemplateCode) {
|
|
| 699 |
- this.newTemplateCode = newTemplateCode; |
|
| 700 |
- } |
|
| 701 |
- |
|
| 702 |
- public String[] getArrTemplateCode() {
|
|
| 703 |
- return arrTemplateCode; |
|
| 704 |
- } |
|
| 705 |
- |
|
| 706 |
- public void setArrTemplateCode(String[] arrTemplateCode) {
|
|
| 707 |
- this.arrTemplateCode = arrTemplateCode; |
|
| 708 |
- } |
|
| 709 |
- |
|
| 710 |
- public String getTemplateStatus() {
|
|
| 711 |
- return templateStatus; |
|
| 712 |
- } |
|
| 713 |
- |
|
| 714 |
- public void setTemplateStatus(String templateStatus) {
|
|
| 715 |
- this.templateStatus = templateStatus; |
|
| 716 |
- } |
|
| 717 |
- |
|
| 718 |
- public String getKeyword() {
|
|
| 719 |
- return keyword; |
|
| 720 |
- } |
|
| 721 |
- |
|
| 722 |
- public void setKeyword(String keyword) {
|
|
| 723 |
- this.keyword = keyword; |
|
| 724 |
- } |
|
| 725 |
- |
|
| 726 |
- public String getSendPhone() {
|
|
| 727 |
- return sendPhone; |
|
| 728 |
- } |
|
| 729 |
- |
|
| 730 |
- public void setSendPhone(String sendPhone) {
|
|
| 731 |
- this.sendPhone = sendPhone; |
|
| 732 |
- } |
|
| 733 |
- |
|
| 734 |
- public String getDestPhone() {
|
|
| 735 |
- return destPhone; |
|
| 736 |
- } |
|
| 737 |
- |
|
| 738 |
- public void setDestPhone(String destPhone) {
|
|
| 739 |
- this.destPhone = destPhone; |
|
| 740 |
- } |
|
| 741 |
- |
|
| 742 |
- public String getSubMsgSendYn() {
|
|
| 743 |
- return subMsgSendYn; |
|
| 744 |
- } |
|
| 745 |
- |
|
| 746 |
- public void setSubMsgSendYn(String subMsgSendYn) {
|
|
| 747 |
- this.subMsgSendYn = subMsgSendYn; |
|
| 748 |
- } |
|
| 749 |
- |
|
| 750 |
- public String getCount() {
|
|
| 751 |
- return count; |
|
| 752 |
- } |
|
| 753 |
- |
|
| 754 |
- public void setCount(String count) {
|
|
| 755 |
- this.count = count; |
|
| 756 |
- } |
|
| 757 |
- |
|
| 758 |
- public String getPage() {
|
|
| 759 |
- return page; |
|
| 760 |
- } |
|
| 761 |
- |
|
| 762 |
- public void setPage(String page) {
|
|
| 763 |
- this.page = page; |
|
| 764 |
- } |
|
| 765 |
- |
|
| 766 |
- public String getBizUmid() {
|
|
| 767 |
- return bizUmid; |
|
| 768 |
- } |
|
| 769 |
- |
|
| 770 |
- public void setBizUmid(String bizUmid) {
|
|
| 771 |
- this.bizUmid = bizUmid; |
|
| 772 |
- } |
|
| 773 |
- |
|
| 774 |
- public List<String> getVarNmList() {
|
|
| 775 |
- return varNmList; |
|
| 776 |
- } |
|
| 777 |
- |
|
| 778 |
- public void setVarNmList(List<String> varNmList) {
|
|
| 779 |
- this.varNmList = varNmList; |
|
| 780 |
- } |
|
| 781 |
- |
|
| 782 |
- public List<String[]> getVarValList() {
|
|
| 783 |
- return varValList; |
|
| 784 |
- } |
|
| 785 |
- |
|
| 786 |
- public void setVarValList(List<String[]> varValList) {
|
|
| 787 |
- this.varValList = varValList; |
|
| 788 |
- } |
|
| 789 |
- |
|
| 790 |
- public String getFormListType() {
|
|
| 791 |
- return formListType; |
|
| 792 |
- } |
|
| 793 |
- |
|
| 794 |
- public void setFormListType(String formListType) {
|
|
| 795 |
- this.formListType = formListType; |
|
| 796 |
- } |
|
| 797 |
- |
|
| 798 |
- public String getSubMsgTxt() {
|
|
| 799 |
- return subMsgTxt; |
|
| 800 |
- } |
|
| 801 |
- |
|
| 802 |
- public void setSubMsgTxt(String subMsgTxt) {
|
|
| 803 |
- this.subMsgTxt = subMsgTxt; |
|
| 804 |
- } |
|
| 805 |
- |
|
| 806 |
- public String getBizJsonYn() {
|
|
| 807 |
- return bizJsonYn; |
|
| 808 |
- } |
|
| 809 |
- |
|
| 810 |
- public void setBizJsonYn(String bizJsonYn) {
|
|
| 811 |
- this.bizJsonYn = bizJsonYn; |
|
| 812 |
- } |
|
| 813 |
- |
|
| 814 |
- public String getSendType() {
|
|
| 815 |
- return sendType; |
|
| 816 |
- } |
|
| 817 |
- |
|
| 818 |
- public void setSendType(String sendType) {
|
|
| 819 |
- this.sendType = sendType; |
|
| 820 |
- } |
|
| 821 |
- |
|
| 822 |
- public String getAdFlag() {
|
|
| 823 |
- return adFlag; |
|
| 824 |
- } |
|
| 825 |
- |
|
| 826 |
- public void setAdFlag(String adFlag) {
|
|
| 827 |
- this.adFlag = adFlag; |
|
| 828 |
- } |
|
| 829 |
- |
|
| 830 |
- public List<KakaoVO> getKakaoSendList() {
|
|
| 831 |
- return kakaoSendList; |
|
| 832 |
- } |
|
| 833 |
- |
|
| 834 |
- public void setKakaoSendList(List<KakaoVO> kakaoSendList) {
|
|
| 835 |
- this.kakaoSendList = kakaoSendList; |
|
| 836 |
- } |
|
| 837 |
- |
|
| 838 |
- public String getSubMsgTxtReplYn() {
|
|
| 839 |
- return subMsgTxtReplYn; |
|
| 840 |
- } |
|
| 841 |
- |
|
| 842 |
- public void setSubMsgTxtReplYn(String subMsgTxtReplYn) {
|
|
| 843 |
- this.subMsgTxtReplYn = subMsgTxtReplYn; |
|
| 844 |
- } |
|
| 845 |
- |
|
| 846 |
- public String getSubMsgType() {
|
|
| 847 |
- return subMsgType; |
|
| 848 |
- } |
|
| 849 |
- |
|
| 850 |
- public void setSubMsgType(String subMsgType) {
|
|
| 851 |
- this.subMsgType = subMsgType; |
|
| 852 |
- } |
|
| 853 |
- public List<String[]> varValPaser(String[] varValList){
|
|
| 854 |
- |
|
| 855 |
- List<String[]> returnVarVal = new ArrayList<>(); |
|
| 856 |
- |
|
| 857 |
- for(String varVal : varValList) |
|
| 858 |
- {
|
|
| 859 |
- String[] strList = varVal.split("§");
|
|
| 860 |
- returnVarVal.add(strList); |
|
| 265 |
+ @Override |
|
| 266 |
+ public String toString() {
|
|
| 267 |
+ String varListMapString = "["; |
|
| 268 |
+ if (varListMap != null && !varListMap.isEmpty()) {
|
|
| 269 |
+ StringBuilder sb = new StringBuilder(); |
|
| 270 |
+ for (Map<String, String> map : varListMap) {
|
|
| 271 |
+ if (sb.length() > 0) |
|
| 272 |
+ sb.append(", ");
|
|
| 273 |
+ if (map == null) {
|
|
| 274 |
+ sb.append("null");
|
|
| 275 |
+ } else {
|
|
| 276 |
+ sb.append("{");
|
|
| 277 |
+ String prefix = ""; |
|
| 278 |
+ for (Map.Entry<String, String> entry : map.entrySet()) {
|
|
| 279 |
+ sb.append(prefix).append(entry.getKey()).append("=").append(entry.getValue());
|
|
| 280 |
+ prefix = ", "; |
|
| 281 |
+ } |
|
| 282 |
+ sb.append("}");
|
|
| 283 |
+ } |
|
| 284 |
+ } |
|
| 285 |
+ varListMapString += sb.toString(); |
|
| 861 | 286 |
} |
| 287 |
+ varListMapString += "]"; |
|
| 862 | 288 |
|
| 863 |
- return returnVarVal; |
|
| 289 |
+ return "KakaoSendAdvcVO[" + |
|
| 290 |
+ "\n senderKey=[" + senderKey + "]" + |
|
| 291 |
+ "\n , subMsgTxtReplYn=[" + subMsgTxtReplYn + "]" + |
|
| 292 |
+ "\n , subMsgSendYn=[" + subMsgSendYn + "]" + |
|
| 293 |
+ "\n , reserveYn=[" + getReserveYn() + "]" + |
|
| 294 |
+ "\n , divideCnt=[" + getDivideCnt() + "]" + |
|
| 295 |
+ "\n , bizJsonYn=[" + bizJsonYn + "]" + |
|
| 296 |
+ "\n , templateEmphasizeType=[" + templateEmphasizeType + "]" + |
|
| 297 |
+ "\n , templateSubtitle=[" + templateSubtitle + "]" + |
|
| 298 |
+ "\n , txtReplYn=[" + getTxtReplYn() + "]" + |
|
| 299 |
+ "\n , callFrom=[" + getCallFrom() + "]" + |
|
| 300 |
+ "\n , templateCode=[" + templateCode + "]" + |
|
| 301 |
+ "\n , divideTime=[" + getDivideTime() + "]" + |
|
| 302 |
+ "\n , reqDate=[" + getReqDate() + "]" + |
|
| 303 |
+ "\n , atSmishingYn=[" + getAtSmishingYn() + "]" + |
|
| 304 |
+ "\n , menuTopTab=[" + menuTopTab + "]" + |
|
| 305 |
+ "\n , templateContent=[" + templateContent + "]" + |
|
| 306 |
+ "\n , templateTitle=[" + templateTitle + "]" + |
|
| 307 |
+ "\n , subMsgTxt=[" + subMsgTxt + "]" + |
|
| 308 |
+ "\n , divideChk=[" + getDivideChk() + "]" + |
|
| 309 |
+ "\n , sendType=[" + sendType + "]" + |
|
| 310 |
+ "\n , msgType=[" + getMsgType() + "]" + |
|
| 311 |
+ "\n , userId=[" + userId + "]" + |
|
| 312 |
+ "\n , varListMap=[" + varListMapString + "]" + |
|
| 313 |
+ "\n , befCash=[" + getBefCash() + "]" + |
|
| 314 |
+ "\n , befPoint=[" + getBefPoint() + "]" + |
|
| 315 |
+ "\n ]"; |
|
| 864 | 316 |
} |
| 865 |
- |
|
| 866 |
- public String getMenuTopTab() {
|
|
| 867 |
- return menuTopTab; |
|
| 868 |
- } |
|
| 869 |
- |
|
| 870 |
- public void setMenuTopTab(String menuTopTab) {
|
|
| 871 |
- this.menuTopTab = menuTopTab; |
|
| 872 |
- } |
|
| 873 |
- |
|
| 874 |
- public String getMenuSubTab() {
|
|
| 875 |
- return menuSubTab; |
|
| 876 |
- } |
|
| 877 |
- |
|
| 878 |
- public void setMenuSubTab(String menuSubTab) {
|
|
| 879 |
- this.menuSubTab = menuSubTab; |
|
| 880 |
- } |
|
| 881 |
- |
|
| 882 |
- public String getSearchCondition2() {
|
|
| 883 |
- return searchCondition2; |
|
| 884 |
- } |
|
| 885 |
- |
|
| 886 |
- public void setSearchCondition2(String searchCondition2) {
|
|
| 887 |
- this.searchCondition2 = searchCondition2; |
|
| 888 |
- } |
|
| 889 |
- |
|
| 890 |
- public String getKakaoResendSuccCount() {
|
|
| 891 |
- return kakaoResendSuccCount; |
|
| 892 |
- } |
|
| 893 |
- |
|
| 894 |
- public void setKakaoResendSuccCount(String kakaoResendSuccCount) {
|
|
| 895 |
- this.kakaoResendSuccCount = kakaoResendSuccCount; |
|
| 896 |
- } |
|
| 897 |
- |
|
| 898 |
- public String getKakaoResendFailCount() {
|
|
| 899 |
- return kakaoResendFailCount; |
|
| 900 |
- } |
|
| 901 |
- |
|
| 902 |
- public void setKakaoResendFailCount(String kakaoResendFailCount) {
|
|
| 903 |
- this.kakaoResendFailCount = kakaoResendFailCount; |
|
| 904 |
- } |
|
| 905 |
- |
|
| 906 |
- public String getAtSuccessCount() {
|
|
| 907 |
- return atSuccessCount; |
|
| 908 |
- } |
|
| 909 |
- |
|
| 910 |
- public void setAtSuccessCount(String atSuccessCount) {
|
|
| 911 |
- this.atSuccessCount = atSuccessCount; |
|
| 912 |
- } |
|
| 913 |
- |
|
| 914 |
- public String getFtSuccessCount() {
|
|
| 915 |
- return ftSuccessCount; |
|
| 916 |
- } |
|
| 917 |
- |
|
| 918 |
- public void setFtSuccessCount(String ftSuccessCount) {
|
|
| 919 |
- this.ftSuccessCount = ftSuccessCount; |
|
| 920 |
- } |
|
| 921 |
- |
|
| 922 |
- public String getAtFailCount() {
|
|
| 923 |
- return atFailCount; |
|
| 924 |
- } |
|
| 925 |
- |
|
| 926 |
- public void setAtFailCount(String atFailCount) {
|
|
| 927 |
- this.atFailCount = atFailCount; |
|
| 928 |
- } |
|
| 929 |
- |
|
| 930 |
- public String getFtFailCount() {
|
|
| 931 |
- return ftFailCount; |
|
| 932 |
- } |
|
| 933 |
- |
|
| 934 |
- public void setFtFailCount(String ftFailCount) {
|
|
| 935 |
- this.ftFailCount = ftFailCount; |
|
| 936 |
- } |
|
| 937 |
- |
|
| 938 |
- public String getAtSuccPrice() {
|
|
| 939 |
- return atSuccPrice; |
|
| 940 |
- } |
|
| 941 |
- |
|
| 942 |
- public void setAtSuccPrice(String atSuccPrice) {
|
|
| 943 |
- this.atSuccPrice = atSuccPrice; |
|
| 944 |
- } |
|
| 945 |
- |
|
| 946 |
- public String getFtSuccPrice() {
|
|
| 947 |
- return ftSuccPrice; |
|
| 948 |
- } |
|
| 949 |
- |
|
| 950 |
- public void setFtSuccPrice(String ftSuccPrice) {
|
|
| 951 |
- this.ftSuccPrice = ftSuccPrice; |
|
| 952 |
- } |
|
| 953 |
- |
|
| 954 |
- public String getAtFailPrice() {
|
|
| 955 |
- return atFailPrice; |
|
| 956 |
- } |
|
| 957 |
- |
|
| 958 |
- public void setAtFailPrice(String atFailPrice) {
|
|
| 959 |
- this.atFailPrice = atFailPrice; |
|
| 960 |
- } |
|
| 961 |
- |
|
| 962 |
- public String getFtFailPrice() {
|
|
| 963 |
- return ftFailPrice; |
|
| 964 |
- } |
|
| 965 |
- |
|
| 966 |
- public void setFtFailPrice(String ftFailPrice) {
|
|
| 967 |
- this.ftFailPrice = ftFailPrice; |
|
| 968 |
- } |
|
| 969 |
- |
|
| 970 |
- public String getKakaoResendSuccPrice() {
|
|
| 971 |
- return kakaoResendSuccPrice; |
|
| 972 |
- } |
|
| 973 |
- |
|
| 974 |
- public void setKakaoResendSuccPrice(String kakaoResendSuccPrice) {
|
|
| 975 |
- this.kakaoResendSuccPrice = kakaoResendSuccPrice; |
|
| 976 |
- } |
|
| 977 |
- |
|
| 978 |
- public String getKakaoResendFailPrice() {
|
|
| 979 |
- return kakaoResendFailPrice; |
|
| 980 |
- } |
|
| 981 |
- |
|
| 982 |
- public void setKakaoResendFailPrice(String kakaoResendFailPrice) {
|
|
| 983 |
- this.kakaoResendFailPrice = kakaoResendFailPrice; |
|
| 984 |
- } |
|
| 985 |
- |
|
| 986 |
- public String getAtSuccCntSum() {
|
|
| 987 |
- return atSuccCntSum; |
|
| 988 |
- } |
|
| 989 |
- |
|
| 990 |
- public void setAtSuccCntSum(String atSuccCntSum) {
|
|
| 991 |
- this.atSuccCntSum = atSuccCntSum; |
|
| 992 |
- } |
|
| 993 |
- |
|
| 994 |
- public String getFtSuccCntSum() {
|
|
| 995 |
- return ftSuccCntSum; |
|
| 996 |
- } |
|
| 997 |
- |
|
| 998 |
- public void setFtSuccCntSum(String ftSuccCntSum) {
|
|
| 999 |
- this.ftSuccCntSum = ftSuccCntSum; |
|
| 1000 |
- } |
|
| 1001 |
- |
|
| 1002 |
- public String getAtFailCntSum() {
|
|
| 1003 |
- return atFailCntSum; |
|
| 1004 |
- } |
|
| 1005 |
- |
|
| 1006 |
- public void setAtFailCntSum(String atFailCntSum) {
|
|
| 1007 |
- this.atFailCntSum = atFailCntSum; |
|
| 1008 |
- } |
|
| 1009 |
- |
|
| 1010 |
- public String getFtFailCntSum() {
|
|
| 1011 |
- return ftFailCntSum; |
|
| 1012 |
- } |
|
| 1013 |
- |
|
| 1014 |
- public void setFtFailCntSum(String ftFailCntSum) {
|
|
| 1015 |
- this.ftFailCntSum = ftFailCntSum; |
|
| 1016 |
- } |
|
| 1017 |
- |
|
| 1018 |
- public String getKakaoResenSuccSum() {
|
|
| 1019 |
- return kakaoResenSuccSum; |
|
| 1020 |
- } |
|
| 1021 |
- |
|
| 1022 |
- public void setKakaoResenSuccSum(String kakaoResenSuccSum) {
|
|
| 1023 |
- this.kakaoResenSuccSum = kakaoResenSuccSum; |
|
| 1024 |
- } |
|
| 1025 |
- |
|
| 1026 |
- public String getKakaoResenFailSum() {
|
|
| 1027 |
- return kakaoResenFailSum; |
|
| 1028 |
- } |
|
| 1029 |
- |
|
| 1030 |
- public void setKakaoResenFailSum(String kakaoResenFailSum) {
|
|
| 1031 |
- this.kakaoResenFailSum = kakaoResenFailSum; |
|
| 1032 |
- } |
|
| 1033 |
- |
|
| 1034 |
- public String getAtSuccPriceSum() {
|
|
| 1035 |
- return atSuccPriceSum; |
|
| 1036 |
- } |
|
| 1037 |
- |
|
| 1038 |
- public void setAtSuccPriceSum(String atSuccPriceSum) {
|
|
| 1039 |
- this.atSuccPriceSum = atSuccPriceSum; |
|
| 1040 |
- } |
|
| 1041 |
- |
|
| 1042 |
- public String getFtSuccPriceSum() {
|
|
| 1043 |
- return ftSuccPriceSum; |
|
| 1044 |
- } |
|
| 1045 |
- |
|
| 1046 |
- public void setFtSuccPriceSum(String ftSuccPriceSum) {
|
|
| 1047 |
- this.ftSuccPriceSum = ftSuccPriceSum; |
|
| 1048 |
- } |
|
| 1049 |
- |
|
| 1050 |
- public String getAtFailPriceSum() {
|
|
| 1051 |
- return atFailPriceSum; |
|
| 1052 |
- } |
|
| 1053 |
- |
|
| 1054 |
- public void setAtFailPriceSum(String atFailPriceSum) {
|
|
| 1055 |
- this.atFailPriceSum = atFailPriceSum; |
|
| 1056 |
- } |
|
| 1057 |
- |
|
| 1058 |
- public String getFtFailPriceSum() {
|
|
| 1059 |
- return ftFailPriceSum; |
|
| 1060 |
- } |
|
| 1061 |
- |
|
| 1062 |
- public void setFtFailPriceSum(String ftFailPriceSum) {
|
|
| 1063 |
- this.ftFailPriceSum = ftFailPriceSum; |
|
| 1064 |
- } |
|
| 1065 |
- |
|
| 1066 |
- public String getKakaoResendSuccPriceSum() {
|
|
| 1067 |
- return kakaoResendSuccPriceSum; |
|
| 1068 |
- } |
|
| 1069 |
- |
|
| 1070 |
- public void setKakaoResendSuccPriceSum(String kakaoResendSuccPriceSum) {
|
|
| 1071 |
- this.kakaoResendSuccPriceSum = kakaoResendSuccPriceSum; |
|
| 1072 |
- } |
|
| 1073 |
- |
|
| 1074 |
- public String getKakaoResendFailPriceSum() {
|
|
| 1075 |
- return kakaoResendFailPriceSum; |
|
| 1076 |
- } |
|
| 1077 |
- |
|
| 1078 |
- public void setKakaoResendFailPriceSum(String kakaoResendFailPriceSum) {
|
|
| 1079 |
- this.kakaoResendFailPriceSum = kakaoResendFailPriceSum; |
|
| 1080 |
- } |
|
| 1081 |
- |
|
| 1082 |
- public String getFriendId() {
|
|
| 1083 |
- return friendId; |
|
| 1084 |
- } |
|
| 1085 |
- |
|
| 1086 |
- public void setFriendId(String friendId) {
|
|
| 1087 |
- this.friendId = friendId; |
|
| 1088 |
- } |
|
| 1089 |
- |
|
| 1090 |
- public String getImageTitle() {
|
|
| 1091 |
- return imageTitle; |
|
| 1092 |
- } |
|
| 1093 |
- |
|
| 1094 |
- public void setImageTitle(String imageTitle) {
|
|
| 1095 |
- this.imageTitle = imageTitle; |
|
| 1096 |
- } |
|
| 1097 |
- |
|
| 1098 |
- public String getImageLink() {
|
|
| 1099 |
- return imageLink; |
|
| 1100 |
- } |
|
| 1101 |
- |
|
| 1102 |
- public void setImageLink(String imageLink) {
|
|
| 1103 |
- this.imageLink = imageLink; |
|
| 1104 |
- } |
|
| 1105 |
- |
|
| 1106 |
- public String getJsonText() {
|
|
| 1107 |
- return jsonText; |
|
| 1108 |
- } |
|
| 1109 |
- |
|
| 1110 |
- public void setJsonText(String jsonText) {
|
|
| 1111 |
- this.jsonText = jsonText; |
|
| 1112 |
- } |
|
| 1113 |
- |
|
| 1114 |
- public String getImageFileName() {
|
|
| 1115 |
- return imageFileName; |
|
| 1116 |
- } |
|
| 1117 |
- |
|
| 1118 |
- public void setImageFileName(String imageFileName) {
|
|
| 1119 |
- this.imageFileName = imageFileName; |
|
| 1120 |
- } |
|
| 1121 |
- |
|
| 1122 |
- public String getSbscrbDe() {
|
|
| 1123 |
- return sbscrbDe; |
|
| 1124 |
- } |
|
| 1125 |
- |
|
| 1126 |
- public void setSbscrbDe(String sbscrbDe) {
|
|
| 1127 |
- this.sbscrbDe = sbscrbDe; |
|
| 1128 |
- } |
|
| 1129 |
- |
|
| 1130 |
- public String getMoblphonNo() {
|
|
| 1131 |
- return moblphonNo; |
|
| 1132 |
- } |
|
| 1133 |
- |
|
| 1134 |
- public void setMoblphonNo(String moblphonNo) {
|
|
| 1135 |
- this.moblphonNo = moblphonNo; |
|
| 1136 |
- } |
|
| 1137 |
- |
|
| 1138 |
- public String getDept() {
|
|
| 1139 |
- return dept; |
|
| 1140 |
- } |
|
| 1141 |
- |
|
| 1142 |
- public void setDept(String dept) {
|
|
| 1143 |
- this.dept = dept; |
|
| 1144 |
- } |
|
| 1145 |
- |
|
| 1146 |
- public String getAtchFileId() {
|
|
| 1147 |
- return atchFileId; |
|
| 1148 |
- } |
|
| 1149 |
- |
|
| 1150 |
- public void setAtchFileId(String atchFileId) {
|
|
| 1151 |
- this.atchFileId = atchFileId; |
|
| 1152 |
- } |
|
| 1153 |
- |
|
| 1154 |
- public String getWorkAtchFileId() {
|
|
| 1155 |
- return workAtchFileId; |
|
| 1156 |
- } |
|
| 1157 |
- |
|
| 1158 |
- public void setWorkAtchFileId(String workAtchFileId) {
|
|
| 1159 |
- this.workAtchFileId = workAtchFileId; |
|
| 1160 |
- } |
|
| 1161 |
- |
|
| 1162 |
- public String getFileSn() {
|
|
| 1163 |
- return fileSn; |
|
| 1164 |
- } |
|
| 1165 |
- |
|
| 1166 |
- public void setFileSn(String fileSn) {
|
|
| 1167 |
- this.fileSn = fileSn; |
|
| 1168 |
- } |
|
| 1169 |
- |
|
| 1170 |
- public String getFileCn() {
|
|
| 1171 |
- return fileCn; |
|
| 1172 |
- } |
|
| 1173 |
- |
|
| 1174 |
- public void setFileCn(String fileCn) {
|
|
| 1175 |
- this.fileCn = fileCn; |
|
| 1176 |
- } |
|
| 1177 |
- |
|
| 1178 |
- public String getFileStreCours() {
|
|
| 1179 |
- return fileStreCours; |
|
| 1180 |
- } |
|
| 1181 |
- |
|
| 1182 |
- public void setFileStreCours(String fileStreCours) {
|
|
| 1183 |
- this.fileStreCours = fileStreCours; |
|
| 1184 |
- } |
|
| 1185 |
- |
|
| 1186 |
- public String getOrignlFileNm() {
|
|
| 1187 |
- return orignlFileNm; |
|
| 1188 |
- } |
|
| 1189 |
- |
|
| 1190 |
- public void setOrignlFileNm(String orignlFileNm) {
|
|
| 1191 |
- this.orignlFileNm = orignlFileNm; |
|
| 1192 |
- } |
|
| 1193 |
- |
|
| 1194 |
- public String getStreFileNm() {
|
|
| 1195 |
- return streFileNm; |
|
| 1196 |
- } |
|
| 1197 |
- |
|
| 1198 |
- public void setStreFileNm(String streFileNm) {
|
|
| 1199 |
- this.streFileNm = streFileNm; |
|
| 1200 |
- } |
|
| 1201 |
- |
|
| 1202 |
- public String getFileExtsn() {
|
|
| 1203 |
- return fileExtsn; |
|
| 1204 |
- } |
|
| 1205 |
- |
|
| 1206 |
- public void setFileExtsn(String fileExtsn) {
|
|
| 1207 |
- this.fileExtsn = fileExtsn; |
|
| 1208 |
- } |
|
| 1209 |
- |
|
| 1210 |
- public String getFileSize() {
|
|
| 1211 |
- return fileSize; |
|
| 1212 |
- } |
|
| 1213 |
- |
|
| 1214 |
- public void setFileSize(String fileSize) {
|
|
| 1215 |
- this.fileSize = fileSize; |
|
| 1216 |
- } |
|
| 1217 |
- |
|
| 1218 |
- public int getStartCount() {
|
|
| 1219 |
- return startCount; |
|
| 1220 |
- } |
|
| 1221 |
- |
|
| 1222 |
- public void setStartCount(int startCount) {
|
|
| 1223 |
- this.startCount = startCount; |
|
| 1224 |
- } |
|
| 1225 |
- |
|
| 1226 |
- public int getEndCount() {
|
|
| 1227 |
- return endCount; |
|
| 1228 |
- } |
|
| 1229 |
- |
|
| 1230 |
- public void setEndCount(int endCount) {
|
|
| 1231 |
- this.endCount = endCount; |
|
| 1232 |
- } |
|
| 1233 |
- |
|
| 1234 |
- public String getPhmType() {
|
|
| 1235 |
- return phmType; |
|
| 1236 |
- } |
|
| 1237 |
- |
|
| 1238 |
- public void setPhmType(String phmType) {
|
|
| 1239 |
- this.phmType = phmType; |
|
| 1240 |
- } |
|
| 317 |
+ |
|
| 318 |
+ |
|
| 1241 | 319 |
} |
--- src/main/java/itn/let/kakao/kakaoComm/kakaoApi/KakaoApiJsonSave.java
+++ src/main/java/itn/let/kakao/kakaoComm/kakaoApi/KakaoApiJsonSave.java
... | ... | @@ -8,6 +8,7 @@ |
| 8 | 8 |
import java.text.SimpleDateFormat; |
| 9 | 9 |
import java.util.Date; |
| 10 | 10 |
import java.util.List; |
| 11 |
+import java.util.Map; |
|
| 11 | 12 |
|
| 12 | 13 |
import org.json.simple.JSONArray; |
| 13 | 14 |
import org.json.simple.JSONObject; |
... | ... | @@ -18,6 +19,7 @@ |
| 18 | 19 |
import itn.com.cmm.util.StringUtil; |
| 19 | 20 |
import itn.let.kakao.kakaoComm.KakaoButtonVO; |
| 20 | 21 |
import itn.let.kakao.kakaoComm.KakaoReturnVO; |
| 22 |
+import itn.let.kakao.kakaoComm.KakaoSendAdvcVO; |
|
| 21 | 23 |
import itn.let.kakao.kakaoComm.KakaoVO; |
| 22 | 24 |
|
| 23 | 25 |
@Component |
... | ... | @@ -32,7 +34,57 @@ |
| 32 | 34 |
|
| 33 | 35 |
static String json; |
| 34 | 36 |
|
| 35 |
- @SuppressWarnings("unchecked")
|
|
| 37 |
+ public String kakaoApiJsonSave_advc(KakaoSendAdvcVO sendVO, KakaoReturnVO templateDetail) {
|
|
| 38 |
+ |
|
| 39 |
+ // 버튼리스트 JSON 생성 |
|
| 40 |
+ JSONArray buttonList = new JSONArray(); |
|
| 41 |
+ for(KakaoButtonVO buttonInfoVO : sendVO.getButtonList()) {
|
|
| 42 |
+ JSONObject buttonInfo = new JSONObject(); |
|
| 43 |
+ |
|
| 44 |
+ buttonInfo.put("name", buttonInfoVO.getName());
|
|
| 45 |
+ buttonInfo.put("type", buttonInfoVO.getLinkType());
|
|
| 46 |
+ |
|
| 47 |
+ if(buttonInfoVO.getLinkType().equals("WL")) {
|
|
| 48 |
+ buttonInfo.put("url_mobile", buttonInfoVO.getLinkMo());
|
|
| 49 |
+ buttonInfo.put("url_pc", buttonInfoVO.getLinkPc());
|
|
| 50 |
+ }else if(buttonInfoVO.getLinkType().equals("AL")) {
|
|
| 51 |
+ buttonInfo.put("scheme_ios", buttonInfoVO.getLinkIos());
|
|
| 52 |
+ buttonInfo.put("scheme_android", buttonInfoVO.getLinkAnd());
|
|
| 53 |
+ }else if(buttonInfoVO.getLinkType().equals("BC")) {
|
|
| 54 |
+ // 상담톡 진행시 등록해야함 |
|
| 55 |
+ }else if(buttonInfoVO.getLinkType().equals("BT")) {
|
|
| 56 |
+ // 봇 전환 시 전달 |
|
| 57 |
+ } |
|
| 58 |
+ buttonList.add(buttonInfo); |
|
| 59 |
+ } |
|
| 60 |
+ |
|
| 61 |
+ // 강조유형 JSON 생성 |
|
| 62 |
+ JSONObject templateDetailInfo = new JSONObject(); |
|
| 63 |
+ String emphasizeType = templateDetail.getTemplateEmphasizeType(); |
|
| 64 |
+ |
|
| 65 |
+ |
|
| 66 |
+ if(emphasizeType.equals("TEXT")) {
|
|
| 67 |
+ templateDetailInfo.put("title", sendVO.getTemplateTitle());
|
|
| 68 |
+ }else if(emphasizeType.equals("IMAGE")) {
|
|
| 69 |
+ templateDetailInfo.put("msg_type", "ai");
|
|
| 70 |
+ } |
|
| 71 |
+ |
|
| 72 |
+ |
|
| 73 |
+ JSONObject jo = new JSONObject(); |
|
| 74 |
+ |
|
| 75 |
+ if(buttonList.size() != 0) {
|
|
| 76 |
+ jo.put("button", buttonList);
|
|
| 77 |
+ } |
|
| 78 |
+ if(templateDetailInfo.size() != 0) {
|
|
| 79 |
+ jo.put("extra", templateDetailInfo);
|
|
| 80 |
+ } |
|
| 81 |
+ |
|
| 82 |
+ // 입력 json 데이터를 파일로 변경 |
|
| 83 |
+ String jsonStr = jo.toString(); |
|
| 84 |
+ |
|
| 85 |
+ return jsonStr; |
|
| 86 |
+ } |
|
| 87 |
+ |
|
| 36 | 88 |
public String kakaoApiJsonSave(KakaoVO kakaoVO, String[] varValInfo) {
|
| 37 | 89 |
// json파일 저장 |
| 38 | 90 |
|
... | ... | @@ -109,12 +161,12 @@ |
| 109 | 161 |
for(int i=0; i < varNm.length; i++) {
|
| 110 | 162 |
for(int j=0; j < varValInfo.length; j++) {
|
| 111 | 163 |
if (templateTitle.indexOf(varNm[i]) > -1) {
|
| 112 |
- if(varValInfo[j] != null) {
|
|
| 113 |
- templateTitle = templateTitle.replaceAll(varNm[i] , StringUtil.getString(varValInfo[j])); |
|
| 114 |
- }else {
|
|
| 115 |
- templateTitle = templateTitle.replaceAll(varNm[i] , ""); |
|
| 116 |
- } |
|
| 117 |
- } |
|
| 164 |
+ if(varValInfo[j] != null) {
|
|
| 165 |
+ templateTitle = templateTitle.replaceAll(varNm[i] , StringUtil.getString(varValInfo[j])); |
|
| 166 |
+ }else {
|
|
| 167 |
+ templateTitle = templateTitle.replaceAll(varNm[i] , ""); |
|
| 168 |
+ } |
|
| 169 |
+ } |
|
| 118 | 170 |
} |
| 119 | 171 |
} |
| 120 | 172 |
|
... | ... | @@ -140,8 +192,8 @@ |
| 140 | 192 |
|
| 141 | 193 |
// 입력 json 데이터를 파일로 변경 |
| 142 | 194 |
String jsonStr = jo.toString(); |
| 143 |
- System.out.println("jsonFileName : "+jsonFileName);
|
|
| 144 |
- |
|
| 195 |
+// System.out.println("jsonFileName : "+jsonFileName);
|
|
| 196 |
+ |
|
| 145 | 197 |
File outPut = new File(jsonFileName); |
| 146 | 198 |
outPut.createNewFile(); |
| 147 | 199 |
|
--- src/main/java/itn/let/kakao/user/kakaoAt/service/KakaoAlimTalkService.java
+++ src/main/java/itn/let/kakao/user/kakaoAt/service/KakaoAlimTalkService.java
... | ... | @@ -2,7 +2,11 @@ |
| 2 | 2 |
|
| 3 | 3 |
import java.util.List; |
| 4 | 4 |
|
| 5 |
+import javax.servlet.http.HttpServletRequest; |
|
| 6 |
+ |
|
| 7 |
+import itn.let.kakao.kakaoComm.KakaoSendAdvcVO; |
|
| 5 | 8 |
import itn.let.kakao.kakaoComm.KakaoVO; |
| 9 |
+import itn.let.mail.service.StatusResponse; |
|
| 6 | 10 |
import itn.let.mjo.msgdata.service.MjonMsgReturnVO; |
| 7 | 11 |
|
| 8 | 12 |
public interface KakaoAlimTalkService {
|
... | ... | @@ -24,5 +28,7 @@ |
| 24 | 28 |
|
| 25 | 29 |
//카카오 친구톡 전송 실패 환불리스트 조회 |
| 26 | 30 |
public void selectKakaoFtSentRefundList() throws Exception; |
| 31 |
+ |
|
| 32 |
+ StatusResponse insertKakaoAtSandAjax_advc(KakaoVO kakaoVO, HttpServletRequest request) throws Exception; |
|
| 27 | 33 |
|
| 28 | 34 |
} |
--- src/main/java/itn/let/kakao/user/kakaoAt/service/impl/KakaoAlimTalkDAO.java
+++ src/main/java/itn/let/kakao/user/kakaoAt/service/impl/KakaoAlimTalkDAO.java
... | ... | @@ -6,6 +6,7 @@ |
| 6 | 6 |
import org.springframework.stereotype.Repository; |
| 7 | 7 |
|
| 8 | 8 |
import egovframework.rte.psl.dataaccess.EgovAbstractDAO; |
| 9 |
+import itn.let.kakao.kakaoComm.KakaoSendAdvcVO; |
|
| 9 | 10 |
import itn.let.kakao.kakaoComm.KakaoVO; |
| 10 | 11 |
|
| 11 | 12 |
@Repository("kakaoAlimTalkDAO")
|
... | ... | @@ -39,15 +40,6 @@ |
| 39 | 40 |
} catch (Exception e) {
|
| 40 | 41 |
System.out.println("++++++++++++++++++++ selectDeleteProfileInfo DAO Error !!! " + e);
|
| 41 | 42 |
} |
| 42 |
- |
|
| 43 |
- return result; |
|
| 44 |
- } |
|
| 45 |
- |
|
| 46 |
- public int insertKakaoAtDataInfo(List<KakaoVO> kakaoAtSandList) throws Exception{
|
|
| 47 |
- |
|
| 48 |
- int result = 0; |
|
| 49 |
- |
|
| 50 |
- result = update("kakaoAlimTalkDAO.insertKakaoAtDataInfo", kakaoAtSandList);
|
|
| 51 | 43 |
|
| 52 | 44 |
return result; |
| 53 | 45 |
} |
... | ... | @@ -94,4 +86,26 @@ |
| 94 | 86 |
public void updateKakaoFtNotSend(KakaoVO kakaoVO) {
|
| 95 | 87 |
select("kakaoAlimTalkDAO.updateKakaoFtNotSend", kakaoVO);
|
| 96 | 88 |
} |
| 89 |
+ |
|
| 90 |
+ public int insertKakaoAtDataInfo(List<KakaoVO> kakaoAtSandList) throws Exception{
|
|
| 91 |
+ |
|
| 92 |
+ int result = 0; |
|
| 93 |
+ |
|
| 94 |
+ result = update("kakaoAlimTalkDAO.insertKakaoAtDataInfo", kakaoAtSandList);
|
|
| 95 |
+ |
|
| 96 |
+ return result; |
|
| 97 |
+ } |
|
| 98 |
+ |
|
| 99 |
+ public int insertKakaoAtDataInfo_advc(List<KakaoSendAdvcVO> kakaoSendAdvcVOList) {
|
|
| 100 |
+ |
|
| 101 |
+ return update("kakaoAlimTalkDAO.insertKakaoAtDataInfo_advc", kakaoSendAdvcVOList);
|
|
| 102 |
+ } |
|
| 103 |
+ |
|
| 104 |
+ public void insertKakaoAtDataJsonInfo_advc(List<KakaoSendAdvcVO> kakaoSendAdvcVOList) {
|
|
| 105 |
+ insert("kakaoAlimTalkDAO.insertKakaoAtDataJsonInfo_advc", kakaoSendAdvcVOList);
|
|
| 106 |
+ } |
|
| 107 |
+ |
|
| 108 |
+ public void insertKakaoGroupDataTb_advc(KakaoSendAdvcVO sendVO) {
|
|
| 109 |
+ insert("kakaoAlimTalkDAO.insertKakaoGroupDataTb_advc", sendVO);
|
|
| 110 |
+ } |
|
| 97 | 111 |
} |
--- src/main/java/itn/let/kakao/user/kakaoAt/service/impl/KakaoAlimTalkServiceImpl.java
+++ src/main/java/itn/let/kakao/user/kakaoAt/service/impl/KakaoAlimTalkServiceImpl.java
... | ... | @@ -1,19 +1,40 @@ |
| 1 | 1 |
package itn.let.kakao.user.kakaoAt.service.impl; |
| 2 | 2 |
|
| 3 |
+import java.math.BigDecimal; |
|
| 4 |
+import java.math.RoundingMode; |
|
| 3 | 5 |
import java.text.SimpleDateFormat; |
| 6 |
+import java.time.Duration; |
|
| 7 |
+import java.time.Instant; |
|
| 4 | 8 |
import java.util.ArrayList; |
| 5 | 9 |
import java.util.Calendar; |
| 6 | 10 |
import java.util.Date; |
| 11 |
+import java.util.HashMap; |
|
| 7 | 12 |
import java.util.List; |
| 13 |
+import java.util.Map; |
|
| 14 |
+import java.util.Objects; |
|
| 15 |
+import java.util.Set; |
|
| 16 |
+import java.util.stream.Collectors; |
|
| 8 | 17 |
|
| 9 | 18 |
import javax.annotation.Resource; |
| 19 |
+import javax.servlet.http.HttpServletRequest; |
|
| 10 | 20 |
|
| 21 |
+import org.apache.commons.lang3.StringUtils; |
|
| 22 |
+import org.springframework.beans.factory.annotation.Autowired; |
|
| 23 |
+import org.springframework.http.HttpStatus; |
|
| 11 | 24 |
import org.springframework.stereotype.Service; |
| 12 | 25 |
|
| 13 | 26 |
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl; |
| 14 | 27 |
import egovframework.rte.fdl.idgnr.EgovIdGnrService; |
| 28 |
+import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper; |
|
| 29 |
+import itn.com.cmm.LoginVO; |
|
| 30 |
+import itn.com.cmm.MjonMsgSendVO; |
|
| 31 |
+import itn.com.utl.fcc.service.EgovStringUtil; |
|
| 32 |
+import itn.let.kakao.kakaoComm.KakaoSendAdvcVO; |
|
| 33 |
+import itn.let.kakao.kakaoComm.KakaoSendUtil; |
|
| 15 | 34 |
import itn.let.kakao.kakaoComm.KakaoVO; |
| 16 | 35 |
import itn.let.kakao.user.kakaoAt.service.KakaoAlimTalkService; |
| 36 |
+import itn.let.mail.service.StatusResponse; |
|
| 37 |
+import itn.let.mjo.mjocommon.MjonCommon; |
|
| 17 | 38 |
import itn.let.mjo.mjocommon.MjonHolidayApi; |
| 18 | 39 |
import itn.let.mjo.msg.service.MjonMsgVO; |
| 19 | 40 |
import itn.let.mjo.msg.service.impl.MjonMsgDAO; |
... | ... | @@ -24,9 +45,14 @@ |
| 24 | 45 |
import itn.let.mjo.msgholiday.service.impl.MsgHolidayDAO; |
| 25 | 46 |
import itn.let.mjo.pay.service.MjonPayService; |
| 26 | 47 |
import itn.let.mjo.pay.service.MjonPayVO; |
| 48 |
+import itn.let.module.base.PriceAndPoint; |
|
| 27 | 49 |
import itn.let.sym.site.service.JoinSettingVO; |
| 28 | 50 |
import itn.let.sym.site.service.impl.SiteManagerDAO; |
| 51 |
+import itn.let.uss.umt.service.EgovUserManageService; |
|
| 52 |
+import itn.let.uss.umt.service.UserManageVO; |
|
| 53 |
+import lombok.extern.slf4j.Slf4j; |
|
| 29 | 54 |
|
| 55 |
+@Slf4j |
|
| 30 | 56 |
@Service("kakaoAlimTalkService")
|
| 31 | 57 |
public class KakaoAlimTalkServiceImpl extends EgovAbstractServiceImpl implements KakaoAlimTalkService{
|
| 32 | 58 |
|
... | ... | @@ -47,12 +73,28 @@ |
| 47 | 73 |
|
| 48 | 74 |
@Resource(name = "egovMjonMsgIdGnrService") |
| 49 | 75 |
private EgovIdGnrService idgenMsgId; |
| 76 |
+ |
|
| 77 |
+ @Resource(name = "egovMjonMsgGroupIdGnrService") |
|
| 78 |
+ private EgovIdGnrService idgenMjonMsgGroupId; |
|
| 50 | 79 |
|
| 51 | 80 |
@Resource(name = "mjonPayService") |
| 52 | 81 |
private MjonPayService mjonPayService; |
| 53 | 82 |
|
| 54 | 83 |
@Resource(name = "egovMjonCashIdGnrService") |
| 55 | 84 |
private EgovIdGnrService idgenMjonCashId; |
| 85 |
+ |
|
| 86 |
+ /** userManageService */ |
|
| 87 |
+ @Resource(name = "userManageService") |
|
| 88 |
+ private EgovUserManageService userManageService; |
|
| 89 |
+ |
|
| 90 |
+ @Autowired |
|
| 91 |
+ KakaoSendUtil kakaoSendUtil; |
|
| 92 |
+ |
|
| 93 |
+ @Autowired |
|
| 94 |
+ private MjonCommon mjonCommon; |
|
| 95 |
+ |
|
| 96 |
+ @Autowired |
|
| 97 |
+ private PriceAndPoint priceAndPoint; |
|
| 56 | 98 |
|
| 57 | 99 |
//발신프로필 상태값 변경(삭제/복구 기능) |
| 58 | 100 |
@Override |
... | ... | @@ -816,4 +858,349 @@ |
| 816 | 858 |
} |
| 817 | 859 |
} |
| 818 | 860 |
} |
| 861 |
+ |
|
| 862 |
+ @Override |
|
| 863 |
+ public StatusResponse insertKakaoAtSandAjax_advc(KakaoVO kakaoVO, HttpServletRequest request) throws Exception {
|
|
| 864 |
+ |
|
| 865 |
+// log.info(" :: [{}]", kakaoVO.toString());
|
|
| 866 |
+ |
|
| 867 |
+ |
|
| 868 |
+ // 측정할 메소드 호출 전 시간 기록 |
|
| 869 |
+ Instant start = Instant.now(); |
|
| 870 |
+// KakaoSendAdvcVO |
|
| 871 |
+ |
|
| 872 |
+ Map<String, Object> returnMap = new HashMap<>(); |
|
| 873 |
+ |
|
| 874 |
+ LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated() |
|
| 875 |
+ ? (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser() |
|
| 876 |
+ : null; |
|
| 877 |
+ String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 878 |
+ |
|
| 879 |
+ if (userId.equals("")) {
|
|
| 880 |
+ return new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용이 가능합니다."); |
|
| 881 |
+ } |
|
| 882 |
+ |
|
| 883 |
+ kakaoVO.setUserId(userId); |
|
| 884 |
+ |
|
| 885 |
+ /** |
|
| 886 |
+ * 회원 정지된 상태이면 문자 발송이 안되도록 처리함 현재 로그인 세션도 만료 처리함 |
|
| 887 |
+ */ |
|
| 888 |
+ boolean mberSttus = userManageService.selectUserStatusInfo(userId); |
|
| 889 |
+ if (!mberSttus) {
|
|
| 890 |
+ request.getSession().invalidate(); |
|
| 891 |
+ // UNAUTHORIZED : 인증되지 않은 사용자가 접근하려고 할 때 |
|
| 892 |
+ return new StatusResponse(HttpStatus.UNAUTHORIZED, |
|
| 893 |
+ "현재 고객님께서는 문자온 서비스 이용이 정지된 상태로 알림톡을 발송하실 수 없습니다. 이용정지 해제를 원하시면 고객센터로 연락주시기 바랍니다."); |
|
| 894 |
+ } |
|
| 895 |
+ |
|
| 896 |
+ |
|
| 897 |
+ StatusResponse statusResponse = new StatusResponse(); |
|
| 898 |
+ |
|
| 899 |
+/** @isHolidayNotified |
|
| 900 |
+ * @false : 알림 X |
|
| 901 |
+ * @true : 알림 O */ |
|
| 902 |
+ boolean isNotified = mjonCommon.processUserAndCheckAT(kakaoVO); |
|
| 903 |
+ |
|
| 904 |
+ |
|
| 905 |
+ |
|
| 906 |
+/** @카카오톡 전송 list 셋팅 -------------------------------------------*/ |
|
| 907 |
+ List<KakaoSendAdvcVO> kakaoSendAdvcListVO = kakaoSendUtil.populateSendLists(kakaoVO, isNotified, statusResponse); |
|
| 908 |
+ if (statusResponse.getStatus() != null && !statusResponse.getStatus().equals(HttpStatus.OK)) {
|
|
| 909 |
+ log.error(" + populateSendLists 처리 중 오류 발생: {}", statusResponse.getMessage());
|
|
| 910 |
+ return statusResponse; |
|
| 911 |
+ } |
|
| 912 |
+ |
|
| 913 |
+ |
|
| 914 |
+ |
|
| 915 |
+/** @전송금액 확인 --------------------------------------------------*/ |
|
| 916 |
+ if (!isCashSufficient(userId, kakaoSendAdvcListVO)) {
|
|
| 917 |
+ log.error("Insufficient balance for message sending.");
|
|
| 918 |
+ return new StatusResponse(HttpStatus.BAD_REQUEST, "문자 발송에 필요한 보유 잔액이 부족 합니다."); |
|
| 919 |
+ } |
|
| 920 |
+ |
|
| 921 |
+ |
|
| 922 |
+ |
|
| 923 |
+/** @json파일이 있을 떄 biz_attachments insert */ |
|
| 924 |
+ this.insertKakaoAtDataJsonInfo_advc(kakaoSendAdvcListVO); |
|
| 925 |
+ |
|
| 926 |
+ |
|
| 927 |
+ Map<String, List<KakaoSendAdvcVO>> priceGroupedMessages = kakaoSendAdvcListVO.stream() |
|
| 928 |
+ .collect(Collectors.groupingBy(KakaoSendAdvcVO::getEachPrice)); |
|
| 929 |
+ // instTotalCnt : 화면에서 보여줄 총 발송건수 |
|
| 930 |
+ int instTotalCnt = 0; |
|
| 931 |
+ // 임시 |
|
| 932 |
+ List<String> nextMsgGroupIdA = new ArrayList<>(); |
|
| 933 |
+ // 대안: entrySet() 직접 사용 |
|
| 934 |
+ for (Map.Entry<String, List<KakaoSendAdvcVO>> entry : priceGroupedMessages.entrySet()) {
|
|
| 935 |
+ // entry 사용 |
|
| 936 |
+ |
|
| 937 |
+ List<KakaoSendAdvcVO> groupedMsgList = entry.getValue(); // 해당 가격의 메시지 리스트 |
|
| 938 |
+ |
|
| 939 |
+ String nextMsgGroupId = idgenMjonMsgGroupId.getNextStringId(); |
|
| 940 |
+ groupedMsgList.forEach(t -> t.setMsgGroupId(nextMsgGroupId)); |
|
| 941 |
+ |
|
| 942 |
+ |
|
| 943 |
+ // 발송 데이터 삽입 |
|
| 944 |
+ int instCnt = this.insertKakaoData_advc(groupedMsgList); |
|
| 945 |
+// int instCnt = 6; |
|
| 946 |
+ |
|
| 947 |
+ if(instCnt > 0) {
|
|
| 948 |
+ |
|
| 949 |
+ instTotalCnt += instCnt; |
|
| 950 |
+ |
|
| 951 |
+ KakaoSendAdvcVO sendVO = groupedMsgList.get(0); |
|
| 952 |
+ |
|
| 953 |
+/** @groupData 테이블 insert */ |
|
| 954 |
+ this.insertKakaoGroupDataTb_advc(instCnt, kakaoVO, sendVO); |
|
| 955 |
+ |
|
| 956 |
+ |
|
| 957 |
+/** @biz_kakao_price에 insert (대체문자 환불관련 테이블)*/ |
|
| 958 |
+ kakaoVO.setMsgGroupId(sendVO.getMsgGroupId()); |
|
| 959 |
+ kakaoVO.setKakaoAtPrice(Float.parseFloat(sendVO.getEachPrice())); |
|
| 960 |
+ kakaoVO.setSmsPrice(Float.parseFloat(sendVO.getSmsPrice())); |
|
| 961 |
+ kakaoVO.setMmsPrice(Float.parseFloat(sendVO.getMmsPrice())); |
|
| 962 |
+ |
|
| 963 |
+ kakaoAlimTalkDAO.insertKakaoSendPrice(kakaoVO); |
|
| 964 |
+ |
|
| 965 |
+ |
|
| 966 |
+ priceAndPoint.insertCashAndPoint(kakaoVO.getUserId() |
|
| 967 |
+ , -Float.parseFloat(sendVO.getTotPrice()) |
|
| 968 |
+ , "카카오 알림톡 총 "+groupedMsgList.size()+"건 중 " + instCnt + "건 발송" |
|
| 969 |
+ , nextMsgGroupId |
|
| 970 |
+ ); |
|
| 971 |
+ |
|
| 972 |
+ |
|
| 973 |
+/** @SLACK발송 */ |
|
| 974 |
+ /** @발송조건이되면 발송 */ |
|
| 975 |
+ if(isNotified) {
|
|
| 976 |
+ mjonCommon.getAdminKakaoAtSendSlack(sendVO); |
|
| 977 |
+ }else if("Y".equals(kakaoVO.getAtSmishingYn())){
|
|
| 978 |
+ /** @발송조건이 안되면 DB INSERT */ |
|
| 979 |
+ mjonMsgDAO.insertSpamPassMsgData(MjonMsgVO.builder() |
|
| 980 |
+ .msgGroupId(nextMsgGroupId) |
|
| 981 |
+ .userId(kakaoVO.getUserId()) |
|
| 982 |
+ .reqDate(kakaoVO.getReqDate()) |
|
| 983 |
+ .smsTxt(groupedMsgList.get(0).getTemplateContent()) |
|
| 984 |
+ .totalCallCnt(instCnt) |
|
| 985 |
+ .callFrom(kakaoVO.getCallFrom()) |
|
| 986 |
+ .msgType("8")
|
|
| 987 |
+ .reserveYn(kakaoVO.getReserveYn()) |
|
| 988 |
+ .build() |
|
| 989 |
+ ); |
|
| 990 |
+ } |
|
| 991 |
+ |
|
| 992 |
+ nextMsgGroupIdA.add(nextMsgGroupId); |
|
| 993 |
+ |
|
| 994 |
+ } |
|
| 995 |
+ |
|
| 996 |
+ } |
|
| 997 |
+ |
|
| 998 |
+ returnMap.put("resultSts", instTotalCnt);
|
|
| 999 |
+ returnMap.put("reserYn", kakaoVO.getReserveYn());
|
|
| 1000 |
+ returnMap.put("groupIds", nextMsgGroupIdA);
|
|
| 1001 |
+ |
|
| 1002 |
+ |
|
| 1003 |
+ // 측정할 메소드 호출 후 시간 기록 |
|
| 1004 |
+ Instant end = Instant.now(); |
|
| 1005 |
+ |
|
| 1006 |
+ log.info(" + start :: [{}]", start);
|
|
| 1007 |
+ // 실행 시간 계산 (나노초, 밀리초, 초) |
|
| 1008 |
+ long seconds = Duration.between(start, end).getSeconds(); |
|
| 1009 |
+ System.out.println("메소드 실행 시간 (초): " + seconds + " s");
|
|
| 1010 |
+ double minutes = seconds / 60.0; // 소수점 포함을 위해 60.0으로 나눔 |
|
| 1011 |
+ |
|
| 1012 |
+ returnMap.put("second", seconds+" s");
|
|
| 1013 |
+ returnMap.put("minutes", minutes+" min");
|
|
| 1014 |
+ |
|
| 1015 |
+ |
|
| 1016 |
+// System.out.println("메소드 실행 시간 (분): " + minutes + " min");
|
|
| 1017 |
+ |
|
| 1018 |
+ |
|
| 1019 |
+ |
|
| 1020 |
+ |
|
| 1021 |
+// priceAndPoint.getBefCash(userId); |
|
| 1022 |
+ |
|
| 1023 |
+ |
|
| 1024 |
+ |
|
| 1025 |
+ |
|
| 1026 |
+ statusResponse.setStatus(HttpStatus.OK); |
|
| 1027 |
+ statusResponse.setObject(returnMap); |
|
| 1028 |
+ |
|
| 1029 |
+ return statusResponse; |
|
| 1030 |
+ } |
|
| 1031 |
+ |
|
| 1032 |
+ |
|
| 1033 |
+ |
|
| 1034 |
+ |
|
| 1035 |
+ private void insertKakaoAtDataJsonInfo_advc(List<KakaoSendAdvcVO> kakaoSendAdvcListVO) {
|
|
| 1036 |
+ // TODO Auto-generated method stub |
|
| 1037 |
+ |
|
| 1038 |
+ // 측정할 메소드 호출 전 시간 기록 |
|
| 1039 |
+ List<KakaoSendAdvcVO> jsonInfoData = new ArrayList<>(kakaoSendAdvcListVO); |
|
| 1040 |
+ jsonInfoData.removeIf(t -> StringUtils.isBlank(t.getJsonStr())); |
|
| 1041 |
+ log.info(" + jsonInfoData Insert :: [{}]", jsonInfoData.size());
|
|
| 1042 |
+ if(jsonInfoData.size() > 0) {
|
|
| 1043 |
+ kakaoAlimTalkDAO.insertKakaoAtDataJsonInfo_advc(jsonInfoData); |
|
| 1044 |
+ } |
|
| 1045 |
+ |
|
| 1046 |
+ } |
|
| 1047 |
+ |
|
| 1048 |
+ private void insertKakaoGroupDataTb_advc(int instCnt, KakaoVO kakaoVO, KakaoSendAdvcVO sendVO) throws Exception {
|
|
| 1049 |
+ // TODO Auto-generated method stub |
|
| 1050 |
+ |
|
| 1051 |
+// log.info(" + insertKakaoGroupDataTb_advc kakaoVO :: \n[{}]", kakaoVO.toString());;
|
|
| 1052 |
+// log.info(" + insertKakaoGroupDataTb_advc kakaoSendAdvcVOList :: \n[{}]", sendVO.toString());
|
|
| 1053 |
+ |
|
| 1054 |
+ sendVO.setMsgGroupCnt(Integer.toString(instCnt)); |
|
| 1055 |
+ sendVO.setReserveYn(kakaoVO.getReserveYn()); |
|
| 1056 |
+ sendVO.setBefCash(priceAndPoint.getBefCash(sendVO.getUserId())); |
|
| 1057 |
+ sendVO.setBefPoint(priceAndPoint.getBefPoint(sendVO.getUserId())); |
|
| 1058 |
+ |
|
| 1059 |
+ Float eachPrice = Float.parseFloat(sendVO.getEachPrice()); |
|
| 1060 |
+ |
|
| 1061 |
+ Float totPrice = eachPrice * instCnt; |
|
| 1062 |
+ sendVO.setTotPrice(String.format("%.1f", totPrice));
|
|
| 1063 |
+ |
|
| 1064 |
+ sendVO.setAtDelayYn(kakaoVO.getAtSmishingYn()); |
|
| 1065 |
+ sendVO.setBizKakaoResendOrgnlTxt(kakaoVO.getSubMsgTxt()); |
|
| 1066 |
+ sendVO.setBizKakaoResendType(sendVO.getSubMsgType()); |
|
| 1067 |
+ |
|
| 1068 |
+ kakaoAlimTalkDAO.insertKakaoGroupDataTb_advc(sendVO); |
|
| 1069 |
+ |
|
| 1070 |
+ } |
|
| 1071 |
+ |
|
| 1072 |
+ /** |
|
| 1073 |
+ * @methodName : insertKakaoData_advc |
|
| 1074 |
+ * @author : 이호영 |
|
| 1075 |
+ * @date : 2025. 3. 20. |
|
| 1076 |
+ * @description : 카카오 batch 발송 => mj_msg_data |
|
| 1077 |
+ * @return : int |
|
| 1078 |
+ * @param kakaoSendAdvcVOList |
|
| 1079 |
+ * @param parentLoopCount |
|
| 1080 |
+ * @param isJsonNotEmpty |
|
| 1081 |
+ * @param isJsonNameAllSame |
|
| 1082 |
+ * @return |
|
| 1083 |
+ * |
|
| 1084 |
+ */ |
|
| 1085 |
+ private int insertKakaoData_advc(List<KakaoSendAdvcVO> kakaoSendAdvcVOList) {
|
|
| 1086 |
+ |
|
| 1087 |
+ |
|
| 1088 |
+ // 시작 시간 측정 |
|
| 1089 |
+ long totalStartTime = System.currentTimeMillis(); |
|
| 1090 |
+ |
|
| 1091 |
+ int totalSize = kakaoSendAdvcVOList.size(); // 총 데이터 개수 |
|
| 1092 |
+ // Batch 크기 설정 (고정값) |
|
| 1093 |
+// int batchSize = 10000; 465 |
|
| 1094 |
+ int batchSize = 50000; // 9분 18초 |
|
| 1095 |
+ |
|
| 1096 |
+ log.info("총 데이터 개수 :: [{}] ", totalSize);
|
|
| 1097 |
+ log.info("설정된 Batch 크기 :: [{}] ", batchSize);
|
|
| 1098 |
+ |
|
| 1099 |
+ // 총 insert 카운트 |
|
| 1100 |
+ int instCnt = 0; |
|
| 1101 |
+ int batchCount = 0; |
|
| 1102 |
+ |
|
| 1103 |
+ // 각 배치별 실행 시간 기록 |
|
| 1104 |
+ List<Double> batchExecutionTimes = new ArrayList<>(); |
|
| 1105 |
+ |
|
| 1106 |
+ |
|
| 1107 |
+ // 첫 번째 배치에서만 삽입했는지 추적하는 플래그 |
|
| 1108 |
+ for (int i = 0; i < totalSize; i += batchSize) {
|
|
| 1109 |
+ // Batch 시작 시간 측정 |
|
| 1110 |
+ long batchStartTime = System.currentTimeMillis(); |
|
| 1111 |
+ |
|
| 1112 |
+ // Batch 리스트 생성 |
|
| 1113 |
+ List<KakaoSendAdvcVO> batchList = kakaoSendAdvcVOList.subList(i, Math.min(i + batchSize, totalSize)); |
|
| 1114 |
+ System.out.println("Batch 시작 인덱스: " + i);
|
|
| 1115 |
+ |
|
| 1116 |
+ // mj_msg_data 테이블 insert |
|
| 1117 |
+ int insertedCount = kakaoAlimTalkDAO.insertKakaoAtDataInfo_advc(batchList); |
|
| 1118 |
+ |
|
| 1119 |
+ /** @kakaoSendUtil.populateSendLists |
|
| 1120 |
+ * 하단에서 |
|
| 1121 |
+ * getJsonStr 데이터 처리 후 활용 |
|
| 1122 |
+ * */ |
|
| 1123 |
+ instCnt += insertedCount; |
|
| 1124 |
+ |
|
| 1125 |
+ // Batch 종료 시간 측정 및 실행 시간 계산 |
|
| 1126 |
+ long batchEndTime = System.currentTimeMillis(); |
|
| 1127 |
+ double batchExecutionTimeInSeconds = (batchEndTime - batchStartTime) / 1000.0; |
|
| 1128 |
+ |
|
| 1129 |
+ // 실행 시간 기록 |
|
| 1130 |
+ batchExecutionTimes.add(batchExecutionTimeInSeconds); |
|
| 1131 |
+ batchCount++; |
|
| 1132 |
+ } |
|
| 1133 |
+ |
|
| 1134 |
+ // 종료 시간 측정 |
|
| 1135 |
+ long totalEndTime = System.currentTimeMillis(); |
|
| 1136 |
+ |
|
| 1137 |
+ // 총 실행 시간 계산 (밀리초 -> 초로 변환) |
|
| 1138 |
+ double totalExecutionTimeInSeconds = (totalEndTime - totalStartTime) / 1000.0; |
|
| 1139 |
+ |
|
| 1140 |
+ // 실행 시간 출력 |
|
| 1141 |
+ log.info("총 배치 실행 횟수 :: [{}] ", batchCount);
|
|
| 1142 |
+ log.info("batchSize :: [{}] ", batchSize);
|
|
| 1143 |
+ log.info("총 실행 시간 :: [{}] ", totalExecutionTimeInSeconds + "초");
|
|
| 1144 |
+ log.info("총 삽입 건수 :: [{}] ", instCnt);
|
|
| 1145 |
+ |
|
| 1146 |
+ // 각 배치별 실행 시간 출력 |
|
| 1147 |
+ for (int k = 0; k < batchExecutionTimes.size(); k++) {
|
|
| 1148 |
+ System.out.println("배치 " + (k + 1) + " 실행 시간 :: " + batchExecutionTimes.get(k) + "초");
|
|
| 1149 |
+ } |
|
| 1150 |
+ |
|
| 1151 |
+ return instCnt; |
|
| 1152 |
+ |
|
| 1153 |
+ } |
|
| 1154 |
+ |
|
| 1155 |
+ // 보유 금액이 충분한지 확인하는 메서드 |
|
| 1156 |
+ private boolean isCashSufficient(String userId, List<KakaoSendAdvcVO> kakaoSendAdvcListVO) throws Exception {
|
|
| 1157 |
+ |
|
| 1158 |
+ |
|
| 1159 |
+ String userMoney = priceAndPoint.getBefCash(userId); |
|
| 1160 |
+ // 쉼표 제거 |
|
| 1161 |
+ userMoney = userMoney.replace(",", "");
|
|
| 1162 |
+ |
|
| 1163 |
+ // 사용자 보유 금액 BigDecimal 변환 (HALF_EVEN 적용) |
|
| 1164 |
+ BigDecimal befCash = new BigDecimal(userMoney).setScale(2, RoundingMode.HALF_EVEN); |
|
| 1165 |
+ |
|
| 1166 |
+ // 총 메시지 금액 계산 (HALF_EVEN 적용) |
|
| 1167 |
+ BigDecimal totalEachPrice = kakaoSendAdvcListVO.stream() |
|
| 1168 |
+ .map(msg -> new BigDecimal(String.valueOf(msg.getEachPrice()))) // 변환 오류 방지 |
|
| 1169 |
+ .reduce(BigDecimal.ZERO, BigDecimal::add) |
|
| 1170 |
+ .setScale(2, RoundingMode.HALF_EVEN); // 일관성 유지 |
|
| 1171 |
+ |
|
| 1172 |
+ // 비교 수행 |
|
| 1173 |
+ return befCash.compareTo(totalEachPrice) >= 0; |
|
| 1174 |
+ } |
|
| 1175 |
+ |
|
| 1176 |
+ |
|
| 1177 |
+ |
|
| 1178 |
+ |
|
| 1179 |
+ |
|
| 1180 |
+ |
|
| 1181 |
+ |
|
| 1182 |
+ |
|
| 1183 |
+ |
|
| 1184 |
+ |
|
| 1185 |
+ |
|
| 1186 |
+ |
|
| 1187 |
+ |
|
| 1188 |
+ |
|
| 1189 |
+ |
|
| 1190 |
+ |
|
| 1191 |
+ |
|
| 1192 |
+ |
|
| 1193 |
+ |
|
| 1194 |
+ |
|
| 1195 |
+ |
|
| 1196 |
+ |
|
| 1197 |
+ |
|
| 1198 |
+ |
|
| 1199 |
+ |
|
| 1200 |
+ |
|
| 1201 |
+ |
|
| 1202 |
+ |
|
| 1203 |
+ |
|
| 1204 |
+ |
|
| 1205 |
+ |
|
| 819 | 1206 |
} |
--- src/main/java/itn/let/kakao/user/kakaoAt/web/KakaoAlimTalkSendController.java
+++ src/main/java/itn/let/kakao/user/kakaoAt/web/KakaoAlimTalkSendController.java
... | ... | @@ -35,9 +35,11 @@ |
| 35 | 35 |
import org.apache.poi.xssf.usermodel.XSSFSheet; |
| 36 | 36 |
import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
| 37 | 37 |
import org.springframework.beans.factory.annotation.Autowired; |
| 38 |
+import org.springframework.http.ResponseEntity; |
|
| 38 | 39 |
import org.springframework.stereotype.Controller; |
| 39 | 40 |
import org.springframework.ui.ModelMap; |
| 40 | 41 |
import org.springframework.web.bind.annotation.ModelAttribute; |
| 42 |
+import org.springframework.web.bind.annotation.RequestBody; |
|
| 41 | 43 |
import org.springframework.web.bind.annotation.RequestMapping; |
| 42 | 44 |
import org.springframework.web.bind.annotation.RequestMethod; |
| 43 | 45 |
import org.springframework.web.bind.annotation.RequestParam; |
... | ... | @@ -45,6 +47,8 @@ |
| 45 | 47 |
import org.springframework.web.multipart.MultipartFile; |
| 46 | 48 |
import org.springframework.web.multipart.MultipartHttpServletRequest; |
| 47 | 49 |
import org.springframework.web.servlet.ModelAndView; |
| 50 |
+ |
|
| 51 |
+import com.fasterxml.jackson.databind.ObjectMapper; |
|
| 48 | 52 |
|
| 49 | 53 |
import egovframework.rte.fdl.idgnr.EgovIdGnrService; |
| 50 | 54 |
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper; |
... | ... | @@ -57,6 +61,7 @@ |
| 57 | 61 |
import itn.com.cmm.util.StringUtil; |
| 58 | 62 |
import itn.com.utl.fcc.service.EgovStringUtil; |
| 59 | 63 |
import itn.let.kakao.kakaoComm.KakaoReturnVO; |
| 64 |
+import itn.let.kakao.kakaoComm.KakaoSendAdvcVO; |
|
| 60 | 65 |
import itn.let.kakao.kakaoComm.KakaoSendUtil; |
| 61 | 66 |
import itn.let.kakao.kakaoComm.KakaoVO; |
| 62 | 67 |
import itn.let.kakao.kakaoComm.kakaoApi.KakaoApiJsonSave; |
... | ... | @@ -65,6 +70,7 @@ |
| 65 | 70 |
import itn.let.kakao.kakaoComm.kakaoApi.KakaoApiTemplate; |
| 66 | 71 |
import itn.let.kakao.kakaoComm.kakaoApi.service.KakaoApiService; |
| 67 | 72 |
import itn.let.kakao.user.kakaoAt.service.KakaoAlimTalkService; |
| 73 |
+import itn.let.mail.service.StatusResponse; |
|
| 68 | 74 |
import itn.let.mjo.mjocommon.MjonCommon; |
| 69 | 75 |
import itn.let.mjo.mjocommon.MjonHolidayApi; |
| 70 | 76 |
import itn.let.mjo.msgdata.service.MjonMsgDataService; |
... | ... | @@ -216,7 +222,29 @@ |
| 216 | 222 |
model.addAttribute("sendPrice", kakaoSendUtil.selectSendPriceOfKakaoAtAndSmsAndMms(userId));
|
| 217 | 223 |
} |
| 218 | 224 |
|
| 225 |
+ if("Y".equals(kakaoVO.getMsgResendAllFlag())) {
|
|
| 226 |
+ List<MjonMsgDataVO> resendList = new ArrayList<MjonMsgDataVO>(); |
|
| 227 |
+ |
|
| 228 |
+ MjonMsgDataVO mjonMsgDataVO = new MjonMsgDataVO(); |
|
| 229 |
+ mjonMsgDataVO.setMsgGroupId(kakaoVO.getMsgResendAllGroupId()); |
|
| 230 |
+ mjonMsgDataVO.setUserId(userId); |
|
| 231 |
+ resendList = mjonMsgDataService.selectMjMsgListByResend(mjonMsgDataVO); |
|
| 232 |
+ |
|
| 233 |
+ ObjectMapper mapper = new ObjectMapper(); |
|
| 234 |
+ try {
|
|
| 235 |
+ String resendListJson = mapper.writeValueAsString(resendList); |
|
| 236 |
+ model.addAttribute("resendListJson", resendListJson);
|
|
| 237 |
+ } catch (Exception e) {
|
|
| 238 |
+ e.printStackTrace(); |
|
| 239 |
+ } |
|
| 240 |
+ |
|
| 241 |
+ } |
|
| 242 |
+ |
|
| 243 |
+ |
|
| 244 |
+ |
|
| 219 | 245 |
return "web/kakao/msgdata/at/KakaoAlimtalkMsgDataView"; |
| 246 |
+// return "web/kakao/msgdata/at/KakaoAlimtalkMsgDataView_advcbackup_20250310"; |
|
| 247 |
+ |
|
| 220 | 248 |
} |
| 221 | 249 |
|
| 222 | 250 |
|
... | ... | @@ -1057,6 +1085,16 @@ |
| 1057 | 1085 |
return modelAndView; |
| 1058 | 1086 |
} |
| 1059 | 1087 |
|
| 1088 |
+ @RequestMapping(value= {"/web/mjon/kakao/alimtalk/kakaoAlimTalkMsgSendAjax_advc.do"}, method = RequestMethod.POST)
|
|
| 1089 |
+ public ResponseEntity<StatusResponse> kakaoAlimTalkMsgSendAjax_advc( |
|
| 1090 |
+ @RequestBody KakaoVO kakaoVO, |
|
| 1091 |
+ HttpServletRequest request |
|
| 1092 |
+ ) throws Exception {
|
|
| 1093 |
+ |
|
| 1094 |
+ System.out.println(" + kakaoAlimTalkMsgSendAjax_advc + ");
|
|
| 1095 |
+ return ResponseEntity.ok().body(kakaoAlimTalkService.insertKakaoAtSandAjax_advc(kakaoVO, request)) ; |
|
| 1096 |
+ } |
|
| 1097 |
+ |
|
| 1060 | 1098 |
@RequestMapping(value= {"/web/mjon/kakao/alimtalk/kakaoAlimTalkMsgSendAjax.do"}, method = RequestMethod.POST)
|
| 1061 | 1099 |
// @ResponseBody |
| 1062 | 1100 |
public ModelAndView kakaoAlimTalkMsgSendAjax( |
... | ... | @@ -1064,6 +1102,10 @@ |
| 1064 | 1102 |
HttpServletRequest request, |
| 1065 | 1103 |
@ModelAttribute("kakaoVO") KakaoVO kakaoVO
|
| 1066 | 1104 |
) throws Exception {
|
| 1105 |
+ // 시작 시간 |
|
| 1106 |
+ long startTime = System.currentTimeMillis(); |
|
| 1107 |
+ |
|
| 1108 |
+ System.out.println(" :: kakaoAlimTalkMsgSendAjax :: ");
|
|
| 1067 | 1109 |
ModelAndView modelAndView = new ModelAndView(); |
| 1068 | 1110 |
modelAndView.setViewName("jsonView");
|
| 1069 | 1111 |
|
... | ... | @@ -1388,7 +1430,7 @@ |
| 1388 | 1430 |
|
| 1389 | 1431 |
if(!smishingAlarmPassSts) {//평일,주말, 공휴일 알림설정 시간에 포함되지 않는 경우 슬랙 알림 발송
|
| 1390 | 1432 |
|
| 1391 |
- mjonCommon.getAdminKakaoAtSandSlack(kakaoVO); |
|
| 1433 |
+// mjonCommon.getAdminKakaoAtSendSlack(kakaoVO); |
|
| 1392 | 1434 |
|
| 1393 | 1435 |
} |
| 1394 | 1436 |
|
... | ... | @@ -1400,7 +1442,94 @@ |
| 1400 | 1442 |
} catch (Exception e) {
|
| 1401 | 1443 |
throw new Exception("++++++++++++++++++++++ getAdminPhoneSendMsgData Error !!! " + e);
|
| 1402 | 1444 |
} |
| 1445 |
+ // 종료 시간 |
|
| 1446 |
+ long endTime = System.currentTimeMillis(); |
|
| 1447 |
+ |
|
| 1448 |
+// 실행 시간 계산 (초 단위) |
|
| 1449 |
+ double executionTimeSeconds = (endTime - startTime) / 1000.0; |
|
| 1450 |
+ |
|
| 1451 |
+ System.out.println("실행 시간: " + String.format("%.3f", executionTimeSeconds) + "초");
|
|
| 1452 |
+ |
|
| 1453 |
+ |
|
| 1454 |
+ String returnTxt = String.format("%.3f", executionTimeSeconds) + "초";
|
|
| 1455 |
+ modelAndView.addObject("seconds", returnTxt);
|
|
| 1403 | 1456 |
|
| 1404 | 1457 |
return modelAndView; |
| 1405 | 1458 |
} |
| 1459 |
+ |
|
| 1460 |
+ |
|
| 1461 |
+ @RequestMapping(value= {"/web/mjon/alimtalk/kakaoAlimtalkMsgDataView_test_set.do"})
|
|
| 1462 |
+ public String kakaoAlimtalkMsgDataView_test_set(ModelMap model |
|
| 1463 |
+ , @ModelAttribute("kakaoVO") KakaoVO kakaoVO) throws Exception {
|
|
| 1464 |
+ |
|
| 1465 |
+ LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; |
|
| 1466 |
+ String author = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getAuthority()); |
|
| 1467 |
+ String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 1468 |
+ |
|
| 1469 |
+ model.addAttribute("loginVO", loginVO);
|
|
| 1470 |
+/* if(userId == "") {
|
|
| 1471 |
+ return "redirect:/web/user/login/login.do"; |
|
| 1472 |
+ }*/ |
|
| 1473 |
+ |
|
| 1474 |
+ |
|
| 1475 |
+ //2.사용자 개인 단가 정보 불러오기 |
|
| 1476 |
+ if(!userId.equals("") && !author.equals("ROLE_ADMIN")) {
|
|
| 1477 |
+ |
|
| 1478 |
+ // 사용자 아이디를 이용한 발신프로필 조회 |
|
| 1479 |
+ kakaoVO.setUserId(userId); |
|
| 1480 |
+ List<KakaoVO> selectKakaoProfileList = kakaoApiService.selectKakaoProfileList(kakaoVO); |
|
| 1481 |
+ model.addAttribute("kakaoProfileList", selectKakaoProfileList);
|
|
| 1482 |
+ |
|
| 1483 |
+ //발신번호 불러오기 |
|
| 1484 |
+ //아이디 발신번호 리스트 불러오기. |
|
| 1485 |
+ List<String> resultSendPhonList = mjonMsgDataService.selectSendPhonNumList(userId); |
|
| 1486 |
+ List<String> resultPhonList = new ArrayList<String>(); |
|
| 1487 |
+ MJUtil mjUtil = new MJUtil(); |
|
| 1488 |
+ |
|
| 1489 |
+ for(String phone : resultSendPhonList) {
|
|
| 1490 |
+ |
|
| 1491 |
+ resultPhonList.add(mjUtil.addDash(phone)); |
|
| 1492 |
+ |
|
| 1493 |
+ } |
|
| 1494 |
+ model.addAttribute("resultPhonList", resultPhonList);
|
|
| 1495 |
+ |
|
| 1496 |
+ |
|
| 1497 |
+ MberManageVO mberManageVO = mjonMsgDataService.selectMberManageInfo(userId); |
|
| 1498 |
+ |
|
| 1499 |
+ model.addAttribute("atSmishingYn", mberManageVO.getAtSmishingYn());
|
|
| 1500 |
+ |
|
| 1501 |
+ //3.사용자 개인단가 정보가 0이 아니면 개인단가 사용, 없으면 시스템 기본 단가 사용 |
|
| 1502 |
+ Float shortPrice = mberManageVO.getShortPrice(); |
|
| 1503 |
+ Float longPrice = mberManageVO.getLongPrice(); |
|
| 1504 |
+ Float picturePrice = mberManageVO.getPicturePrice(); |
|
| 1505 |
+ Float picture2Price = mberManageVO.getPicture2Price(); |
|
| 1506 |
+ Float picture3Price = mberManageVO.getPicture3Price(); |
|
| 1507 |
+ BigDecimal userMoney = new BigDecimal(mberManageVO.getUserMoney()).setScale(2, RoundingMode.HALF_EVEN); |
|
| 1508 |
+ |
|
| 1509 |
+ model.addAttribute("userMoney", userMoney);
|
|
| 1510 |
+ |
|
| 1511 |
+ |
|
| 1512 |
+ ////////////////////////////////////////////////////////////////// |
|
| 1513 |
+ |
|
| 1514 |
+ //최근 전송 내역 |
|
| 1515 |
+ MjonMsgDataVO searchVO = new MjonMsgDataVO(); |
|
| 1516 |
+ Calendar cal = Calendar.getInstance(); |
|
| 1517 |
+ Date now = new Date(); |
|
| 1518 |
+ SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd");
|
|
| 1519 |
+ cal.setTime(now); |
|
| 1520 |
+ cal.add(Calendar.DATE, -3); |
|
| 1521 |
+ String chkDate = format.format(cal.getTime()); |
|
| 1522 |
+ searchVO.setUserId(userId); |
|
| 1523 |
+ searchVO.setMyMsgStDt(chkDate); //검색 시작일 저장 - 현재날짜로 부터 3일 이전 날짜로 시작 |
|
| 1524 |
+ model.addAttribute("resultLatestMsgList", mjonMsgDataService.selectLatestMsgList(searchVO));
|
|
| 1525 |
+ |
|
| 1526 |
+ //자주보내는 번호 |
|
| 1527 |
+ model.addAttribute("resultBookMarkMsgList", mjonMsgDataService.selectBookMarkMsgList(searchVO));
|
|
| 1528 |
+ |
|
| 1529 |
+ // 사용자 저으이 |
|
| 1530 |
+ model.addAttribute("sendPrice", kakaoSendUtil.selectSendPriceOfKakaoAtAndSmsAndMms(userId));
|
|
| 1531 |
+ } |
|
| 1532 |
+ |
|
| 1533 |
+ return "web/kakao/msgdata/at/KakaoAlimtalkMsgDataView_tmp"; |
|
| 1534 |
+ } |
|
| 1406 | 1535 |
} |
--- src/main/java/itn/let/kakao/user/kakaoFt/web/KakaoFriendsTalkSendController.java
+++ src/main/java/itn/let/kakao/user/kakaoFt/web/KakaoFriendsTalkSendController.java
... | ... | @@ -663,7 +663,7 @@ |
| 663 | 663 |
if(!smishingAlarmPassSts) {//평일,주말, 공휴일 알림설정 시간에 포함되지 않는 경우 슬랙 알림 발송
|
| 664 | 664 |
|
| 665 | 665 |
MjonCommon comm = new MjonCommon(); |
| 666 |
- comm.getAdminKakaoAtSandSlack(kakaoVO); |
|
| 666 |
+// comm.getAdminKakaoAtSendSlack(kakaoVO); |
|
| 667 | 667 |
|
| 668 | 668 |
} |
| 669 | 669 |
|
+++ src/main/java/itn/let/kakao/user/sent/service/KakaoSentDetailVO.java
... | ... | @@ -0,0 +1,51 @@ |
| 1 | +package itn.let.kakao.user.sent.service; | |
| 2 | + | |
| 3 | +import lombok.Getter; | |
| 4 | +import lombok.Setter; | |
| 5 | + | |
| 6 | +@Getter | |
| 7 | +@Setter | |
| 8 | +public class KakaoSentDetailVO extends KakaoSentVO{ | |
| 9 | + | |
| 10 | + private static final long serialVersionUID = 1L; | |
| 11 | + | |
| 12 | + private String msgGroupId; | |
| 13 | + private String reqDate; | |
| 14 | + private String regDate; | |
| 15 | + private String msgGroupCnt; | |
| 16 | + private String reserveYn; | |
| 17 | + private String reserveCYn; | |
| 18 | + private String canceldate; | |
| 19 | + private String callFrom; | |
| 20 | + private String userId; | |
| 21 | + private String smsTxt; | |
| 22 | + private String subject; | |
| 23 | + private String subjectChkYn; | |
| 24 | + private String msgType; | |
| 25 | + private String fileCnt; | |
| 26 | + private String msgKind; | |
| 27 | + private String eachPrice; | |
| 28 | + private String filePath1; | |
| 29 | + private String filePath2; | |
| 30 | + private String filePath3; | |
| 31 | + | |
| 32 | + private String callTo; | |
| 33 | + private String statusTxt; | |
| 34 | + private String addrNm; | |
| 35 | + | |
| 36 | + private String successPct; | |
| 37 | + private String failedPct; | |
| 38 | + private String waitingPct; | |
| 39 | + | |
| 40 | + private String statusCd; // 진행상태 코드 | |
| 41 | + private String divideYn; | |
| 42 | + private String divideText; | |
| 43 | + private String totPrice; | |
| 44 | + private String yellowId; | |
| 45 | + private String msgNoticetalkTmpKey; | |
| 46 | + | |
| 47 | + // FileInfo 리스트 필드 추가 | |
| 48 | +// private List<FileInfoVO> fileInfos; | |
| 49 | + | |
| 50 | + | |
| 51 | +} |
--- src/main/java/itn/let/kakao/user/sent/service/KakaoSentService.java
+++ src/main/java/itn/let/kakao/user/sent/service/KakaoSentService.java
... | ... | @@ -1,6 +1,7 @@ |
| 1 | 1 |
package itn.let.kakao.user.sent.service; |
| 2 | 2 |
|
| 3 | 3 |
import java.util.List; |
| 4 |
+import java.util.Map; |
|
| 4 | 5 |
|
| 5 | 6 |
import itn.let.kakao.admin.kakaoAt.service.MjonKakaoATVO; |
| 6 | 7 |
|
... | ... | @@ -31,5 +32,11 @@ |
| 31 | 32 |
//예약 결과 전체 발송 리스트 불러오기 |
| 32 | 33 |
public List<KakaoSentVO> selectReservKakaoSentList(KakaoSentVO kakaoSentVO) throws Exception; |
| 33 | 34 |
|
| 35 |
+ public Map<String, Object> selectKakaoSentCntAll_Advc(KakaoSentVO kakaoSentVO) throws Exception; |
|
| 36 |
+ |
|
| 37 |
+ public KakaoSentDetailVO selectKakaoSentDetailView(KakaoSentDetailVO kakaoSentDetailVO) throws Exception; |
|
| 38 |
+ |
|
| 39 |
+ //발송 관리 문자발송 내용 상세보기 팝업 |
|
| 40 |
+ public MjonKakaoATVO selectKakaoSentDetailViewPhoneAjax(MjonKakaoATVO kakaoSentVO) throws Exception; |
|
| 34 | 41 |
|
| 35 | 42 |
} |
--- src/main/java/itn/let/kakao/user/sent/service/KakaoSentVO.java
+++ src/main/java/itn/let/kakao/user/sent/service/KakaoSentVO.java
... | ... | @@ -4,7 +4,11 @@ |
| 4 | 4 |
import java.util.List; |
| 5 | 5 |
|
| 6 | 6 |
import itn.let.uss.umt.service.UserDefaultVO; |
| 7 |
+import lombok.Getter; |
|
| 8 |
+import lombok.Setter; |
|
| 7 | 9 |
|
| 10 |
+@Getter |
|
| 11 |
+@Setter |
|
| 8 | 12 |
public class KakaoSentVO extends UserDefaultVO{
|
| 9 | 13 |
|
| 10 | 14 |
private static final long serialVersionUID = 1L; |
... | ... | @@ -90,6 +94,7 @@ |
| 90 | 94 |
private int successCount; |
| 91 | 95 |
private int waitCount; |
| 92 | 96 |
private int failCount; |
| 97 |
+ private int allCount; |
|
| 93 | 98 |
|
| 94 | 99 |
private String bizUmid; |
| 95 | 100 |
private int kakaoResendSuccCount; |
... | ... | @@ -103,471 +108,11 @@ |
| 103 | 108 |
private String atDelayCompleteYn; //알림톡 30분 지연 승인/취소 처리 여부 |
| 104 | 109 |
private Date atDelayOrgTime; //알림톡 30분 지연에 대한 원래 시간 (-30분 처리된 시간) |
| 105 | 110 |
|
| 106 |
- public String getCallToComma() {
|
|
| 107 |
- return callToComma; |
|
| 108 |
- } |
|
| 109 |
- public void setCallToComma(String callToComma) {
|
|
| 110 |
- this.callToComma = callToComma; |
|
| 111 |
- } |
|
| 112 |
- public String getCallFromComma() {
|
|
| 113 |
- return callFromComma; |
|
| 114 |
- } |
|
| 115 |
- public void setCallFromComma(String callFromComma) {
|
|
| 116 |
- this.callFromComma = callFromComma; |
|
| 117 |
- } |
|
| 111 |
+ private String statusCd; |
|
| 118 | 112 |
|
| 119 |
- public String getAtchFiles() {
|
|
| 120 |
- return atchFiles; |
|
| 121 |
- } |
|
| 122 |
- public void setAtchFiles(String atchFiles) {
|
|
| 123 |
- this.atchFiles = atchFiles; |
|
| 124 |
- } |
|
| 113 |
+ private int successPrice; |
|
| 114 |
+ private int kakaoResendSuccPrice; |
|
| 125 | 115 |
|
| 126 |
- public String getMsgId() {
|
|
| 127 |
- return msgId; |
|
| 128 |
- } |
|
| 129 |
- public void setMsgId(String msgId) {
|
|
| 130 |
- this.msgId = msgId; |
|
| 131 |
- } |
|
| 132 |
- public int getSuccessCnt() {
|
|
| 133 |
- return successCnt; |
|
| 134 |
- } |
|
| 135 |
- public void setSuccessCnt(int successCnt) {
|
|
| 136 |
- this.successCnt = successCnt; |
|
| 137 |
- } |
|
| 138 |
- public String getMsgTypeName() {
|
|
| 139 |
- return msgTypeName; |
|
| 140 |
- } |
|
| 141 |
- public void setMsgTypeName(String msgTypeName) {
|
|
| 142 |
- this.msgTypeName = msgTypeName; |
|
| 143 |
- } |
|
| 144 |
- public int getOrderByCode() {
|
|
| 145 |
- return orderByCode; |
|
| 146 |
- } |
|
| 147 |
- public void setOrderByCode(int orderByCode) {
|
|
| 148 |
- this.orderByCode = orderByCode; |
|
| 149 |
- } |
|
| 150 |
- public String getAtchFileId() {
|
|
| 151 |
- return atchFileId; |
|
| 152 |
- } |
|
| 153 |
- public void setAtchFileId(String atchFileId) {
|
|
| 154 |
- this.atchFileId = atchFileId; |
|
| 155 |
- } |
|
| 156 |
- public String getFileSn() {
|
|
| 157 |
- return fileSn; |
|
| 158 |
- } |
|
| 159 |
- public void setFileSn(String fileSn) {
|
|
| 160 |
- this.fileSn = fileSn; |
|
| 161 |
- } |
|
| 162 |
- public String getUserId() {
|
|
| 163 |
- return userId; |
|
| 164 |
- } |
|
| 165 |
- public void setUserId(String userId) {
|
|
| 166 |
- this.userId = userId; |
|
| 167 |
- } |
|
| 168 |
- public String getAddrNm() {
|
|
| 169 |
- return addrNm; |
|
| 170 |
- } |
|
| 171 |
- public void setAddrNm(String addrNm) {
|
|
| 172 |
- this.addrNm = addrNm; |
|
| 173 |
- } |
|
| 174 |
- public String getMsgSeq() {
|
|
| 175 |
- return msgSeq; |
|
| 176 |
- } |
|
| 177 |
- public void setMsgSeq(String msgSeq) {
|
|
| 178 |
- this.msgSeq = msgSeq; |
|
| 179 |
- } |
|
| 180 |
- public String getMsgGroupId() {
|
|
| 181 |
- return msgGroupId; |
|
| 182 |
- } |
|
| 183 |
- public void setMsgGroupId(String msgGroupId) {
|
|
| 184 |
- this.msgGroupId = msgGroupId; |
|
| 185 |
- } |
|
| 186 |
- public List getMsgGroupIdList() {
|
|
| 187 |
- return msgGroupIdList; |
|
| 188 |
- } |
|
| 189 |
- public void setMsgGroupIdList(List msgGroupIdList) {
|
|
| 190 |
- this.msgGroupIdList = msgGroupIdList; |
|
| 191 |
- } |
|
| 192 |
- public String getSmsTxt() {
|
|
| 193 |
- return smsTxt; |
|
| 194 |
- } |
|
| 195 |
- public void setSmsTxt(String smsTxt) {
|
|
| 196 |
- this.smsTxt = smsTxt; |
|
| 197 |
- } |
|
| 198 |
- public String getSubject() {
|
|
| 199 |
- return subject; |
|
| 200 |
- } |
|
| 201 |
- public void setSubject(String subject) {
|
|
| 202 |
- this.subject = subject; |
|
| 203 |
- } |
|
| 204 |
- public Date getRegdate() {
|
|
| 205 |
- return regdate; |
|
| 206 |
- } |
|
| 207 |
- public void setRegdate(Date regdate) {
|
|
| 208 |
- this.regdate = regdate; |
|
| 209 |
- } |
|
| 210 |
- public Date getReqdate() {
|
|
| 211 |
- return reqdate; |
|
| 212 |
- } |
|
| 213 |
- public void setReqdate(Date reqdate) {
|
|
| 214 |
- this.reqdate = reqdate; |
|
| 215 |
- } |
|
| 216 |
- public String getCallFrom() {
|
|
| 217 |
- return callFrom; |
|
| 218 |
- } |
|
| 219 |
- public void setCallFrom(String callFrom) {
|
|
| 220 |
- this.callFrom = callFrom; |
|
| 221 |
- } |
|
| 222 |
- public String getCallTo() {
|
|
| 223 |
- return callTo; |
|
| 224 |
- } |
|
| 225 |
- public void setCallTo(String callTo) {
|
|
| 226 |
- this.callTo = callTo; |
|
| 227 |
- } |
|
| 228 |
- public List getCallToList() {
|
|
| 229 |
- return callToList; |
|
| 230 |
- } |
|
| 231 |
- public void setCallToList(List callToList) {
|
|
| 232 |
- this.callToList = callToList; |
|
| 233 |
- } |
|
| 234 |
- public String getTotPrice() {
|
|
| 235 |
- return totPrice; |
|
| 236 |
- } |
|
| 237 |
- public void setTotPrice(String totPrice) {
|
|
| 238 |
- this.totPrice = totPrice; |
|
| 239 |
- } |
|
| 240 |
- public String getEachPrice() {
|
|
| 241 |
- return eachPrice; |
|
| 242 |
- } |
|
| 243 |
- public void setEachPrice(String eachPrice) {
|
|
| 244 |
- this.eachPrice = eachPrice; |
|
| 245 |
- } |
|
| 246 |
- public String getDelFlag() {
|
|
| 247 |
- return delFlag; |
|
| 248 |
- } |
|
| 249 |
- public void setDelFlag(String delFlag) {
|
|
| 250 |
- this.delFlag = delFlag; |
|
| 251 |
- } |
|
| 252 |
- public String getTotMsgPrice() {
|
|
| 253 |
- return totMsgPrice; |
|
| 254 |
- } |
|
| 255 |
- public void setTotMsgPrice(String totMsgPrice) {
|
|
| 256 |
- this.totMsgPrice = totMsgPrice; |
|
| 257 |
- } |
|
| 258 |
- public String getRsltCode() {
|
|
| 259 |
- return rsltCode; |
|
| 260 |
- } |
|
| 261 |
- public void setRsltCode(String rsltCode) {
|
|
| 262 |
- this.rsltCode = rsltCode; |
|
| 263 |
- } |
|
| 264 |
- public String getRsltCode2() {
|
|
| 265 |
- return rsltCode2; |
|
| 266 |
- } |
|
| 267 |
- public void setRsltCode2(String rsltCode2) {
|
|
| 268 |
- this.rsltCode2 = rsltCode2; |
|
| 269 |
- } |
|
| 270 |
- public String getMsgType() {
|
|
| 271 |
- return msgType; |
|
| 272 |
- } |
|
| 273 |
- public void setMsgType(String msgType) {
|
|
| 274 |
- this.msgType = msgType; |
|
| 275 |
- } |
|
| 276 |
- public String getMsgGroupCnt() {
|
|
| 277 |
- return msgGroupCnt; |
|
| 278 |
- } |
|
| 279 |
- public void setMsgGroupCnt(String msgGroupCnt) {
|
|
| 280 |
- this.msgGroupCnt = msgGroupCnt; |
|
| 281 |
- } |
|
| 282 |
- public String getFileCnt() {
|
|
| 283 |
- return fileCnt; |
|
| 284 |
- } |
|
| 285 |
- public void setFileCnt(String fileCnt) {
|
|
| 286 |
- this.fileCnt = fileCnt; |
|
| 287 |
- } |
|
| 288 |
- public String getTotMsgCnt() {
|
|
| 289 |
- return totMsgCnt; |
|
| 290 |
- } |
|
| 291 |
- public void setTotMsgCnt(String totMsgCnt) {
|
|
| 292 |
- this.totMsgCnt = totMsgCnt; |
|
| 293 |
- } |
|
| 294 |
- public String getCurState() {
|
|
| 295 |
- return curState; |
|
| 296 |
- } |
|
| 297 |
- public void setCurState(String curState) {
|
|
| 298 |
- this.curState = curState; |
|
| 299 |
- } |
|
| 300 |
- public String getReserveYn() {
|
|
| 301 |
- return reserveYn; |
|
| 302 |
- } |
|
| 303 |
- public void setReserveYn(String reserveYn) {
|
|
| 304 |
- this.reserveYn = reserveYn; |
|
| 305 |
- } |
|
| 306 |
- public String getReserveCYn() {
|
|
| 307 |
- return reserveCYn; |
|
| 308 |
- } |
|
| 309 |
- public void setReserveCYn(String reserveCYn) {
|
|
| 310 |
- this.reserveCYn = reserveCYn; |
|
| 311 |
- } |
|
| 312 |
- public String getFilePath1() {
|
|
| 313 |
- return filePath1; |
|
| 314 |
- } |
|
| 315 |
- public void setFilePath1(String filePath1) {
|
|
| 316 |
- this.filePath1 = filePath1; |
|
| 317 |
- } |
|
| 318 |
- public String getFilePath2() {
|
|
| 319 |
- return filePath2; |
|
| 320 |
- } |
|
| 321 |
- public void setFilePath2(String filePath2) {
|
|
| 322 |
- this.filePath2 = filePath2; |
|
| 323 |
- } |
|
| 324 |
- public String getFilePath3() {
|
|
| 325 |
- return filePath3; |
|
| 326 |
- } |
|
| 327 |
- public void setFilePath3(String filePath3) {
|
|
| 328 |
- this.filePath3 = filePath3; |
|
| 329 |
- } |
|
| 330 |
- public Date getSentDate() {
|
|
| 331 |
- return sentDate; |
|
| 332 |
- } |
|
| 333 |
- public void setSentDate(Date sentDate) {
|
|
| 334 |
- this.sentDate = sentDate; |
|
| 335 |
- } |
|
| 336 |
- public String getAgentCode() {
|
|
| 337 |
- return agentCode; |
|
| 338 |
- } |
|
| 339 |
- public void setAgentCode(String agentCode) {
|
|
| 340 |
- this.agentCode = agentCode; |
|
| 341 |
- } |
|
| 342 |
- public String getUserData() {
|
|
| 343 |
- return userData; |
|
| 344 |
- } |
|
| 345 |
- public void setUserData(String userData) {
|
|
| 346 |
- this.userData = userData; |
|
| 347 |
- } |
|
| 348 |
- public List getUserDataList() {
|
|
| 349 |
- return userDataList; |
|
| 350 |
- } |
|
| 351 |
- public void setUserDataList(List userDataList) {
|
|
| 352 |
- this.userDataList = userDataList; |
|
| 353 |
- } |
|
| 354 |
- public Date getCancelDate() {
|
|
| 355 |
- return cancelDate; |
|
| 356 |
- } |
|
| 357 |
- public void setCancelDate(Date cancelDate) {
|
|
| 358 |
- this.cancelDate = cancelDate; |
|
| 359 |
- } |
|
| 360 |
- public String getStartDate() {
|
|
| 361 |
- return startDate; |
|
| 362 |
- } |
|
| 363 |
- public void setStartDate(String startDate) {
|
|
| 364 |
- this.startDate = startDate; |
|
| 365 |
- } |
|
| 366 |
- public String getEndDate() {
|
|
| 367 |
- return endDate; |
|
| 368 |
- } |
|
| 369 |
- public void setEndDate(String endDate) {
|
|
| 370 |
- this.endDate = endDate; |
|
| 371 |
- } |
|
| 372 |
- public String getSearchMsgType() {
|
|
| 373 |
- return searchMsgType; |
|
| 374 |
- } |
|
| 375 |
- public void setSearchMsgType(String searchMsgType) {
|
|
| 376 |
- this.searchMsgType = searchMsgType; |
|
| 377 |
- } |
|
| 378 |
- public String getTabType() {
|
|
| 379 |
- return tabType; |
|
| 380 |
- } |
|
| 381 |
- public void setTabType(String tabType) {
|
|
| 382 |
- this.tabType = tabType; |
|
| 383 |
- } |
|
| 384 |
- public String getStateType() {
|
|
| 385 |
- return stateType; |
|
| 386 |
- } |
|
| 387 |
- public void setStateType(String stateType) {
|
|
| 388 |
- this.stateType = stateType; |
|
| 389 |
- } |
|
| 390 |
- public String getListType() {
|
|
| 391 |
- return listType; |
|
| 392 |
- } |
|
| 393 |
- public void setListType(String listType) {
|
|
| 394 |
- this.listType = listType; |
|
| 395 |
- } |
|
| 396 |
- public String getResultType() {
|
|
| 397 |
- return resultType; |
|
| 398 |
- } |
|
| 399 |
- public void setResultType(String resultType) {
|
|
| 400 |
- this.resultType = resultType; |
|
| 401 |
- } |
|
| 402 |
- public String getMsgResultCnt() {
|
|
| 403 |
- return msgResultCnt; |
|
| 404 |
- } |
|
| 405 |
- public void setMsgResultCnt(String msgResultCnt) {
|
|
| 406 |
- this.msgResultCnt = msgResultCnt; |
|
| 407 |
- } |
|
| 408 |
- public String getMsgResultSts() {
|
|
| 409 |
- return msgResultSts; |
|
| 410 |
- } |
|
| 411 |
- public void setMsgResultSts(String msgResultSts) {
|
|
| 412 |
- this.msgResultSts = msgResultSts; |
|
| 413 |
- } |
|
| 414 |
- public String getAddrGrpNm() {
|
|
| 415 |
- return addrGrpNm; |
|
| 416 |
- } |
|
| 417 |
- public void setAddrGrpNm(String addrGrpNm) {
|
|
| 418 |
- this.addrGrpNm = addrGrpNm; |
|
| 419 |
- } |
|
| 420 |
- public int getOrderByrsltCode() {
|
|
| 421 |
- return orderByrsltCode; |
|
| 422 |
- } |
|
| 423 |
- public void setOrderByrsltCode(int orderByrsltCode) {
|
|
| 424 |
- this.orderByrsltCode = orderByrsltCode; |
|
| 425 |
- } |
|
| 426 |
- public String getMsgResult() {
|
|
| 427 |
- return msgResult; |
|
| 428 |
- } |
|
| 429 |
- public void setMsgResult(String msgResult) {
|
|
| 430 |
- this.msgResult = msgResult; |
|
| 431 |
- } |
|
| 432 |
- public String getNtceBgnde() {
|
|
| 433 |
- return ntceBgnde; |
|
| 434 |
- } |
|
| 435 |
- public void setNtceBgnde(String ntceBgnde) {
|
|
| 436 |
- this.ntceBgnde = ntceBgnde; |
|
| 437 |
- } |
|
| 438 |
- public String getNtceEndde() {
|
|
| 439 |
- return ntceEndde; |
|
| 440 |
- } |
|
| 441 |
- public void setNtceEndde(String ntceEndde) {
|
|
| 442 |
- this.ntceEndde = ntceEndde; |
|
| 443 |
- } |
|
| 444 |
- public String getMsgKind() {
|
|
| 445 |
- return msgKind; |
|
| 446 |
- } |
|
| 447 |
- public void setMsgKind(String msgKind) {
|
|
| 448 |
- this.msgKind = msgKind; |
|
| 449 |
- } |
|
| 450 |
- public String getDelayYn() {
|
|
| 451 |
- return delayYn; |
|
| 452 |
- } |
|
| 453 |
- public void setDelayYn(String delayYn) {
|
|
| 454 |
- this.delayYn = delayYn; |
|
| 455 |
- } |
|
| 456 |
- public String getDelayCompleteYn() {
|
|
| 457 |
- return delayCompleteYn; |
|
| 458 |
- } |
|
| 459 |
- public void setDelayCompleteYn(String delayCompleteYn) {
|
|
| 460 |
- this.delayCompleteYn = delayCompleteYn; |
|
| 461 |
- } |
|
| 462 |
- public String getBizKakaoResendYn() {
|
|
| 463 |
- return bizKakaoResendYn; |
|
| 464 |
- } |
|
| 465 |
- public void setBizKakaoResendYn(String bizKakaoResendYn) {
|
|
| 466 |
- this.bizKakaoResendYn = bizKakaoResendYn; |
|
| 467 |
- } |
|
| 468 |
- public String getBizKakaoResendType() {
|
|
| 469 |
- return bizKakaoResendType; |
|
| 470 |
- } |
|
| 471 |
- public void setBizKakaoResendType(String bizKakaoResendType) {
|
|
| 472 |
- this.bizKakaoResendType = bizKakaoResendType; |
|
| 473 |
- } |
|
| 474 |
- public String getBizKakaoResendData() {
|
|
| 475 |
- return bizKakaoResendData; |
|
| 476 |
- } |
|
| 477 |
- public void setBizKakaoResendData(String bizKakaoResendData) {
|
|
| 478 |
- this.bizKakaoResendData = bizKakaoResendData; |
|
| 479 |
- } |
|
| 480 |
- public String getCallStatus() {
|
|
| 481 |
- return callStatus; |
|
| 482 |
- } |
|
| 483 |
- public void setCallStatus(String callStatus) {
|
|
| 484 |
- this.callStatus = callStatus; |
|
| 485 |
- } |
|
| 486 |
- public String getBizKakaoAtPrice() {
|
|
| 487 |
- return bizKakaoAtPrice; |
|
| 488 |
- } |
|
| 489 |
- public void setBizKakaoAtPrice(String bizKakaoAtPrice) {
|
|
| 490 |
- this.bizKakaoAtPrice = bizKakaoAtPrice; |
|
| 491 |
- } |
|
| 492 |
- public String getBizKakaoFtPrice() {
|
|
| 493 |
- return bizKakaoFtPrice; |
|
| 494 |
- } |
|
| 495 |
- public void setBizKakaoFtPrice(String bizKakaoFtPrice) {
|
|
| 496 |
- this.bizKakaoFtPrice = bizKakaoFtPrice; |
|
| 497 |
- } |
|
| 498 |
- public String getBizSmsPrice() {
|
|
| 499 |
- return bizSmsPrice; |
|
| 500 |
- } |
|
| 501 |
- public void setBizSmsPrice(String bizSmsPrice) {
|
|
| 502 |
- this.bizSmsPrice = bizSmsPrice; |
|
| 503 |
- } |
|
| 504 |
- public String getDiffMin() {
|
|
| 505 |
- return diffMin; |
|
| 506 |
- } |
|
| 507 |
- public void setDiffMin(String diffMin) {
|
|
| 508 |
- this.diffMin = diffMin; |
|
| 509 |
- } |
|
| 510 |
- public String getBizMmsPrice() {
|
|
| 511 |
- return bizMmsPrice; |
|
| 512 |
- } |
|
| 513 |
- public void setBizMmsPrice(String bizMmsPrice) {
|
|
| 514 |
- this.bizMmsPrice = bizMmsPrice; |
|
| 515 |
- } |
|
| 516 |
- public int getSuccessCount() {
|
|
| 517 |
- return successCount; |
|
| 518 |
- } |
|
| 519 |
- public void setSuccessCount(int successCount) {
|
|
| 520 |
- this.successCount = successCount; |
|
| 521 |
- } |
|
| 522 |
- public String getBizUmid() {
|
|
| 523 |
- return bizUmid; |
|
| 524 |
- } |
|
| 525 |
- public void setBizUmid(String bizUmid) {
|
|
| 526 |
- this.bizUmid = bizUmid; |
|
| 527 |
- } |
|
| 528 |
- public int getKakaoResendSuccCount() {
|
|
| 529 |
- return kakaoResendSuccCount; |
|
| 530 |
- } |
|
| 531 |
- public void setKakaoResendSuccCount(int kakaoResendSuccCount) {
|
|
| 532 |
- this.kakaoResendSuccCount = kakaoResendSuccCount; |
|
| 533 |
- } |
|
| 534 |
- public int getKakaoResendFailCount() {
|
|
| 535 |
- return kakaoResendFailCount; |
|
| 536 |
- } |
|
| 537 |
- public void setKakaoResendFailCount(int kakaoResendFailCount) {
|
|
| 538 |
- this.kakaoResendFailCount = kakaoResendFailCount; |
|
| 539 |
- } |
|
| 540 |
- public int getWaitCount() {
|
|
| 541 |
- return waitCount; |
|
| 542 |
- } |
|
| 543 |
- public void setWaitCount(int waitCount) {
|
|
| 544 |
- this.waitCount = waitCount; |
|
| 545 |
- } |
|
| 546 |
- public int getFailCount() {
|
|
| 547 |
- return failCount; |
|
| 548 |
- } |
|
| 549 |
- public void setFailCount(int failCount) {
|
|
| 550 |
- this.failCount = failCount; |
|
| 551 |
- } |
|
| 552 |
- public String getAtDelayYn() {
|
|
| 553 |
- return atDelayYn; |
|
| 554 |
- } |
|
| 555 |
- public void setAtDelayYn(String atDelayYn) {
|
|
| 556 |
- this.atDelayYn = atDelayYn; |
|
| 557 |
- } |
|
| 558 |
- public String getAtDelayCompleteYn() {
|
|
| 559 |
- return atDelayCompleteYn; |
|
| 560 |
- } |
|
| 561 |
- public void setAtDelayCompleteYn(String atDelayCompleteYn) {
|
|
| 562 |
- this.atDelayCompleteYn = atDelayCompleteYn; |
|
| 563 |
- } |
|
| 564 |
- public Date getAtDelayOrgTime() {
|
|
| 565 |
- return atDelayOrgTime; |
|
| 566 |
- } |
|
| 567 |
- public void setAtDelayOrgTime(Date atDelayOrgTime) {
|
|
| 568 |
- this.atDelayOrgTime = atDelayOrgTime; |
|
| 569 |
- } |
|
| 570 |
- |
|
| 571 |
- |
|
| 116 |
+ private String divideYn; |
|
| 572 | 117 |
|
| 573 | 118 |
} |
--- src/main/java/itn/let/kakao/user/sent/service/impl/KakaoSentDAO.java
+++ src/main/java/itn/let/kakao/user/sent/service/impl/KakaoSentDAO.java
... | ... | @@ -7,6 +7,7 @@ |
| 7 | 7 |
|
| 8 | 8 |
import egovframework.rte.psl.dataaccess.EgovAbstractDAO; |
| 9 | 9 |
import itn.let.kakao.admin.kakaoAt.service.MjonKakaoATVO; |
| 10 |
+import itn.let.kakao.user.sent.service.KakaoSentDetailVO; |
|
| 10 | 11 |
import itn.let.kakao.user.sent.service.KakaoSentVO; |
| 11 | 12 |
|
| 12 | 13 |
@Repository("KakaoSentDAO")
|
... | ... | @@ -44,6 +45,10 @@ |
| 44 | 45 |
@SuppressWarnings("unchecked")
|
| 45 | 46 |
public List<KakaoSentVO> selectAllKakaoSentList(KakaoSentVO kakaoSentVO) throws Exception{
|
| 46 | 47 |
return (List<KakaoSentVO>) list("KakaoSentDAO.selectAllKakaoSentList",kakaoSentVO);
|
| 48 |
+ } |
|
| 49 |
+ @SuppressWarnings("unchecked")
|
|
| 50 |
+ public List<KakaoSentVO> selectAllKakaoSentList_advc(KakaoSentVO kakaoSentVO) throws Exception{
|
|
| 51 |
+ return (List<KakaoSentVO>) list("KakaoSentDAO.selectAllKakaoSentList_advc",kakaoSentVO);
|
|
| 47 | 52 |
} |
| 48 | 53 |
|
| 49 | 54 |
@SuppressWarnings("unchecked")
|
... | ... | @@ -90,4 +95,39 @@ |
| 90 | 95 |
return (List<KakaoSentVO>) list("KakaoSentDAO.selectReservKakaoSentList",kakaoSentVO);
|
| 91 | 96 |
} |
| 92 | 97 |
|
| 98 |
+ @SuppressWarnings("unchecked")
|
|
| 99 |
+ public List<KakaoSentVO> selectKakaoSentCntAll_advc(KakaoSentVO kakaoSentVO) throws Exception{
|
|
| 100 |
+ |
|
| 101 |
+ List<KakaoSentVO> result = new ArrayList<KakaoSentVO>(); |
|
| 102 |
+ |
|
| 103 |
+ try {
|
|
| 104 |
+ |
|
| 105 |
+ result = (List<KakaoSentVO>) list("KakaoSentDAO.selectKakaoSentCntAll_advc", kakaoSentVO);
|
|
| 106 |
+ |
|
| 107 |
+ } catch (Exception e) {
|
|
| 108 |
+ |
|
| 109 |
+ throw new Exception("++++++++++ ErrorService DAO :: " + e);
|
|
| 110 |
+ |
|
| 111 |
+ } |
|
| 112 |
+ |
|
| 113 |
+ return result; |
|
| 114 |
+ } |
|
| 115 |
+ |
|
| 116 |
+ public KakaoSentVO selectKakaoSentCntEachCnt_advc(KakaoSentVO kakaoSentVO) throws Exception{
|
|
| 117 |
+ return (KakaoSentVO) select("KakaoSentDAO.selectKakaoSentCntEachCnt_advc",kakaoSentVO);
|
|
| 118 |
+ } |
|
| 119 |
+ |
|
| 120 |
+ public KakaoSentDetailVO selectKakaoSentDetailView(KakaoSentDetailVO kakaoSentDetailVO) throws Exception{
|
|
| 121 |
+ return (KakaoSentDetailVO) select("KakaoSentDAO.selectKakaoSentDetailView", kakaoSentDetailVO);
|
|
| 122 |
+ } |
|
| 123 |
+ |
|
| 124 |
+ public List<String> findByReqDateWhereMsgGroupId(String msgGroupId) {
|
|
| 125 |
+ return (List<String>) list("KakaoSentDAO.findByReqDateWhereMsgGroupId", msgGroupId);
|
|
| 126 |
+ } |
|
| 127 |
+ |
|
| 128 |
+ //발송 관리 문자발송 내용 상세보기 팝업[그룹] |
|
| 129 |
+ public MjonKakaoATVO selectKakaoSentDetailViewPhoneAjax(MjonKakaoATVO KakaoSentVO) throws Exception{
|
|
| 130 |
+ return (MjonKakaoATVO) select("KakaoSentDAO.selectKakaoSentDetailViewPhoneAjax", KakaoSentVO);
|
|
| 131 |
+ } |
|
| 132 |
+ |
|
| 93 | 133 |
} |
--- src/main/java/itn/let/kakao/user/sent/service/impl/KakaoSentServiceImpl.java
+++ src/main/java/itn/let/kakao/user/sent/service/impl/KakaoSentServiceImpl.java
... | ... | @@ -1,7 +1,15 @@ |
| 1 | 1 |
package itn.let.kakao.user.sent.service.impl; |
| 2 | 2 |
|
| 3 |
+import java.math.BigDecimal; |
|
| 4 |
+import java.math.RoundingMode; |
|
| 5 |
+import java.time.LocalDateTime; |
|
| 6 |
+import java.time.format.DateTimeFormatter; |
|
| 3 | 7 |
import java.util.ArrayList; |
| 8 |
+import java.util.HashMap; |
|
| 9 |
+import java.util.LinkedHashMap; |
|
| 4 | 10 |
import java.util.List; |
| 11 |
+import java.util.Map; |
|
| 12 |
+import java.util.stream.Collectors; |
|
| 5 | 13 |
|
| 6 | 14 |
import javax.annotation.Resource; |
| 7 | 15 |
|
... | ... | @@ -10,6 +18,7 @@ |
| 10 | 18 |
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl; |
| 11 | 19 |
import egovframework.rte.fdl.idgnr.EgovIdGnrService; |
| 12 | 20 |
import itn.let.kakao.admin.kakaoAt.service.MjonKakaoATVO; |
| 21 |
+import itn.let.kakao.user.sent.service.KakaoSentDetailVO; |
|
| 13 | 22 |
import itn.let.kakao.user.sent.service.KakaoSentService; |
| 14 | 23 |
import itn.let.kakao.user.sent.service.KakaoSentVO; |
| 15 | 24 |
|
... | ... | @@ -29,7 +38,8 @@ |
| 29 | 38 |
|
| 30 | 39 |
try {
|
| 31 | 40 |
|
| 32 |
- result = kakaoSentDAO.selectKakaoSentCntAll(kakaoSentVO); |
|
| 41 |
+// result = kakaoSentDAO.selectKakaoSentCntAll(kakaoSentVO); |
|
| 42 |
+ result = kakaoSentDAO.selectKakaoSentCntAll_advc(kakaoSentVO); |
|
| 33 | 43 |
|
| 34 | 44 |
} catch (Exception e) {
|
| 35 | 45 |
throw new Exception("++++++++++ ErrorService Impl :: " + e);
|
... | ... | @@ -38,30 +48,83 @@ |
| 38 | 48 |
return result; |
| 39 | 49 |
} |
| 40 | 50 |
|
| 51 |
+ public Map<String, Object> selectKakaoSentCntAll_Advc(KakaoSentVO kakaoSentVO) throws Exception{
|
|
| 52 |
+ |
|
| 53 |
+ List<KakaoSentVO> result = new ArrayList<KakaoSentVO>(); |
|
| 54 |
+ Map<String, Object> returnMap = new HashMap<String, Object>(); |
|
| 55 |
+ |
|
| 56 |
+ try {
|
|
| 57 |
+ |
|
| 58 |
+// result = kakaoSentDAO.selectKakaoSentCntAll(kakaoSentVO); |
|
| 59 |
+ result = kakaoSentDAO.selectKakaoSentCntAll_advc(kakaoSentVO); |
|
| 60 |
+ |
|
| 61 |
+ |
|
| 62 |
+ KakaoSentVO allVO = new KakaoSentVO(); |
|
| 63 |
+ KakaoSentVO atVO = new KakaoSentVO(); |
|
| 64 |
+ KakaoSentVO ftVO = new KakaoSentVO(); |
|
| 65 |
+ |
|
| 66 |
+ result.stream() |
|
| 67 |
+ .forEach(t -> |
|
| 68 |
+ {
|
|
| 69 |
+ Integer rsultCnt = Integer.parseInt(t.getMsgResultCnt()); |
|
| 70 |
+ |
|
| 71 |
+ if(Integer.parseInt(t.getFilePath1()) > 0) {
|
|
| 72 |
+ if("S".equals(t.getMsgResultSts())) {
|
|
| 73 |
+ atVO.setSuccessCount(atVO.getSuccessCount()+rsultCnt); |
|
| 74 |
+ }else if("W".equals(t.getMsgResultSts())) {
|
|
| 75 |
+ atVO.setWaitCount(atVO.getWaitCount()+rsultCnt); |
|
| 76 |
+ }else {
|
|
| 77 |
+ atVO.setFailCount(atVO.getFailCount()+rsultCnt); |
|
| 78 |
+ } |
|
| 79 |
+ |
|
| 80 |
+ atVO.setAllCount(atVO.getAllCount()+rsultCnt); |
|
| 81 |
+ allVO.setAllCount(allVO.getAllCount()+rsultCnt); |
|
| 82 |
+ |
|
| 83 |
+ }else {
|
|
| 84 |
+ if("S".equals(t.getMsgResultSts())) {
|
|
| 85 |
+ ftVO.setSuccessCount(ftVO.getSuccessCount()+rsultCnt); |
|
| 86 |
+ }else if("W".equals(t.getMsgResultSts())) {
|
|
| 87 |
+ ftVO.setWaitCount(ftVO.getWaitCount()+rsultCnt); |
|
| 88 |
+ }else {
|
|
| 89 |
+ ftVO.setFailCount(ftVO.getFailCount()+rsultCnt); |
|
| 90 |
+ } |
|
| 91 |
+ |
|
| 92 |
+ ftVO.setAllCount(ftVO.getAllCount()+rsultCnt); |
|
| 93 |
+ allVO.setAllCount(allVO.getAllCount()+rsultCnt); |
|
| 94 |
+ |
|
| 95 |
+ } |
|
| 96 |
+ }); |
|
| 97 |
+ |
|
| 98 |
+ allVO.setSuccessCount(atVO.getSuccessCount()+ftVO.getSuccessCount()); |
|
| 99 |
+ allVO.setWaitCount(atVO.getWaitCount()+ftVO.getWaitCount()); |
|
| 100 |
+ allVO.setFailCount(atVO.getFailCount()+ftVO.getFailCount()); |
|
| 101 |
+ |
|
| 102 |
+ //전체 성공건, 실패건 불러오기 |
|
| 103 |
+ returnMap.put("allCnt", allVO);
|
|
| 104 |
+ |
|
| 105 |
+ //알림톡 성공건, 실패건 불러오기 |
|
| 106 |
+ returnMap.put("atCnt", atVO);
|
|
| 107 |
+ |
|
| 108 |
+ //친구톡 성공건, 실패건 불러오기 |
|
| 109 |
+ returnMap.put("ftCnt", ftVO);
|
|
| 110 |
+ |
|
| 111 |
+ |
|
| 112 |
+ } catch (Exception e) {
|
|
| 113 |
+ throw new Exception("++++++++++ ErrorService Impl :: " + e);
|
|
| 114 |
+ } |
|
| 115 |
+ |
|
| 116 |
+ return returnMap; |
|
| 117 |
+ } |
|
| 118 |
+ |
|
| 41 | 119 |
//발송 관리 전체 발송 리스트 불러오기 |
| 42 | 120 |
public List<KakaoSentVO> selectAllKakaoSentList(KakaoSentVO kakaoSentVO) throws Exception{
|
| 43 | 121 |
|
| 44 | 122 |
List<KakaoSentVO> resultList = new ArrayList<KakaoSentVO>(); |
| 45 | 123 |
|
| 46 |
- String listType = kakaoSentVO.getListType(); |
|
| 47 |
- String stateType = kakaoSentVO.getStateType(); |
|
| 124 |
+ resultList = kakaoSentDAO.selectAllKakaoSentList_advc(kakaoSentVO); |
|
| 48 | 125 |
|
| 49 |
- if(stateType.equals("fail")) {
|
|
| 50 |
- |
|
| 51 |
- listType = "privateList"; |
|
| 52 |
- |
|
| 53 |
- } |
|
| 54 |
- |
|
| 55 |
- System.out.println("listType : "+ listType);
|
|
| 56 |
- if(listType.equals("groupList")) {//전송건별 리스트 불러오기
|
|
| 57 |
- |
|
| 58 |
- resultList = kakaoSentDAO.selectAllKakaoSentList(kakaoSentVO); |
|
| 59 |
- |
|
| 60 |
- }else {//개인별 리스트 불러오기
|
|
| 61 |
- |
|
| 62 |
- resultList = kakaoSentDAO.selectAllPrivateKakaoSentList(kakaoSentVO); |
|
| 63 |
- |
|
| 64 |
- } |
|
| 126 |
+ //totPrice 계산 및 상태코드 set |
|
| 127 |
+ resultList = resultList.stream().map(t -> setPriceNCode(t)).collect(Collectors.toList()); |
|
| 65 | 128 |
|
| 66 | 129 |
return resultList; |
| 67 | 130 |
} |
... | ... | @@ -149,5 +212,229 @@ |
| 149 | 212 |
|
| 150 | 213 |
return kakaoSentDAO.selectReservKakaoSentList(kakaoSentVO); |
| 151 | 214 |
} |
| 215 |
+ |
|
| 216 |
+ @Override |
|
| 217 |
+ public KakaoSentDetailVO selectKakaoSentDetailView(KakaoSentDetailVO kakaoSentDetailVO) throws Exception{
|
|
| 218 |
+ |
|
| 219 |
+ KakaoSentDetailVO resultVO = kakaoSentDAO.selectKakaoSentDetailView(kakaoSentDetailVO); |
|
| 220 |
+ |
|
| 221 |
+ int total = Integer.parseInt(resultVO.getMsgGroupCnt()); // 전체 건수 |
|
| 222 |
+ int success = 0; // 성공 건수 |
|
| 223 |
+ int waiting = 0; // 대기 건수 |
|
| 224 |
+ int failed = 0; // 실패 건수 |
|
| 225 |
+ if("Y".equals(resultVO.getBizKakaoResendYn())) {
|
|
| 226 |
+ success = resultVO.getSuccessCount() + resultVO.getKakaoResendSuccCount(); |
|
| 227 |
+ failed = resultVO.getKakaoResendFailCount(); |
|
| 228 |
+ }else {
|
|
| 229 |
+ success = resultVO.getSuccessCount(); |
|
| 230 |
+ failed = resultVO.getFailCount(); |
|
| 231 |
+ } |
|
| 232 |
+ waiting = resultVO.getWaitCount(); // 대기 건수 |
|
| 233 |
+ |
|
| 234 |
+ String successPct = total > 0 ? String.format("%.1f%%", (success / (double) total) * 100) : "0.0%";
|
|
| 235 |
+ String waitingPct = total > 0 ? String.format("%.1f%%", (waiting / (double) total) * 100) : "0.0%";
|
|
| 236 |
+ String failedPct = total > 0 ? String.format("%.1f%%", (failed / (double) total) * 100) : "0.0%";
|
|
| 237 |
+ |
|
| 238 |
+ resultVO.setSuccessPct(successPct); |
|
| 239 |
+ resultVO.setFailedPct(waitingPct); |
|
| 240 |
+ resultVO.setWaitingPct(failedPct); |
|
| 241 |
+ |
|
| 242 |
+ resultVO.setTotPrice(this.priceProc(resultVO.getSuccessPrice(), resultVO.getKakaoResendSuccPrice())); |
|
| 243 |
+ |
|
| 244 |
+ resultVO = this.codeProc(resultVO); |
|
| 245 |
+ |
|
| 246 |
+ // 분할문자인 경우 |
|
| 247 |
+ if("Y".equals(resultVO.getDivideYn())) {
|
|
| 248 |
+ String divideText = calculateBatchInfo(resultVO); |
|
| 249 |
+ resultVO.setDivideText(divideText); |
|
| 250 |
+ } |
|
| 251 |
+ |
|
| 252 |
+ return resultVO; |
|
| 253 |
+ } |
|
| 254 |
+ |
|
| 255 |
+ //발송 관리 문자발송 내용 상세보기 팝업 => 문자내용(MJ_MSG_DATA) |
|
| 256 |
+ public MjonKakaoATVO selectKakaoSentDetailViewPhoneAjax(MjonKakaoATVO kakaoSentVO) throws Exception{
|
|
| 257 |
+ |
|
| 258 |
+ return kakaoSentDAO.selectKakaoSentDetailViewPhoneAjax(kakaoSentVO); |
|
| 259 |
+ } |
|
| 260 |
+ |
|
| 261 |
+ |
|
| 262 |
+ // 공통코드 ITN057에 대한 코드화 진행 |
|
| 263 |
+ /* |
|
| 264 |
+ * CODE_ID CODE CODE_NM CODE_DC |
|
| 265 |
+ * ITN057 01 진행중 진행중 |
|
| 266 |
+ * ITN057 02 완료 완료출해야함 |
|
| 267 |
+ * ITN057 03 예약대기 예약대기(발송전) 버튼으로 노출해야함 |
|
| 268 |
+ * ITN057 04 - 예약취소 ( - 으로 노출 ) |
|
| 269 |
+ * */ |
|
| 270 |
+ private KakaoSentVO setPriceNCode(KakaoSentVO result) {
|
|
| 271 |
+ |
|
| 272 |
+ //성공 건수 세팅 |
|
| 273 |
+ KakaoSentVO eachCnt = new KakaoSentVO(); |
|
| 274 |
+ eachCnt.setMsgGroupId(result.getMsgGroupId()); |
|
| 275 |
+ try {
|
|
| 276 |
+ eachCnt = kakaoSentDAO.selectKakaoSentCntEachCnt_advc(eachCnt); |
|
| 277 |
+ } catch (Exception e) {
|
|
| 278 |
+ System.out.println("setPriceNCode error!!");
|
|
| 279 |
+ } |
|
| 280 |
+ |
|
| 281 |
+ result.setSuccessCount(eachCnt.getSuccessCount()); |
|
| 282 |
+ result.setWaitCount(eachCnt.getWaitCount()); |
|
| 283 |
+ result.setFailCount(eachCnt.getFailCount()); |
|
| 284 |
+ result.setKakaoResendSuccCount(eachCnt.getKakaoResendSuccCount()); |
|
| 285 |
+ result.setKakaoResendFailCount(eachCnt.getKakaoResendFailCount()); |
|
| 286 |
+ |
|
| 287 |
+ |
|
| 288 |
+ //완료상태 시작 |
|
| 289 |
+ result = this.codeProc(result); |
|
| 290 |
+ |
|
| 291 |
+ //완료상태 끝 |
|
| 292 |
+ //======================================================= |
|
| 293 |
+ |
|
| 294 |
+ //총금액 시작 |
|
| 295 |
+ result.setTotPrice(this.priceProc(eachCnt.getSuccessPrice(), eachCnt.getKakaoResendSuccPrice())); |
|
| 296 |
+ |
|
| 297 |
+ |
|
| 298 |
+ return result; |
|
| 299 |
+ |
|
| 300 |
+ } |
|
| 301 |
+ |
|
| 302 |
+ private String priceProc(int successPrice, int kakaoResendSuccPrice) {
|
|
| 303 |
+ |
|
| 304 |
+ String totPrice = "-"; |
|
| 305 |
+ |
|
| 306 |
+ //총금액 시작 |
|
| 307 |
+ //======================================================= |
|
| 308 |
+ // TotPrice : 성공건수에 대한 금액 곱하기 |
|
| 309 |
+ BigDecimal atPrice = new BigDecimal(successPrice); |
|
| 310 |
+ BigDecimal kakaoResendPrice = new BigDecimal(kakaoResendSuccPrice); |
|
| 311 |
+ BigDecimal totalPrice = atPrice.add(kakaoResendPrice); |
|
| 312 |
+ // 소수점 한 자리로 설정 (반올림)// totalPrice 값을 소수점 한 자리까지 반올림하여 roundedTotalPrice에 저장 |
|
| 313 |
+ // RoundingMode.HALF_UP: 반올림 방식으로, 소수점 기준 5 이상이면 올림, 그렇지 않으면 내림 |
|
| 314 |
+ BigDecimal roundedTotalPrice = totalPrice.setScale(1, RoundingMode.HALF_UP); |
|
| 315 |
+ |
|
| 316 |
+ // roundedTotalPrice가 0인지 확인 |
|
| 317 |
+ // BigDecimal.compareTo(BigDecimal.ZERO)는 값을 비교하는 메서드 |
|
| 318 |
+ // 결과: |
|
| 319 |
+ // - 반환 값이 0이면 두 값이 같음 |
|
| 320 |
+ // - 반환 값이 음수이면 roundedTotalPrice가 0보다 작음 |
|
| 321 |
+ // - 반환 값이 양수이면 roundedTotalPrice가 0보다 큼 |
|
| 322 |
+ if (roundedTotalPrice.compareTo(BigDecimal.ZERO) == 0) {
|
|
| 323 |
+ // roundedTotalPrice 값이 0이면, "-" 문자열을 totPrice에 설정 |
|
| 324 |
+ totPrice = "-"; |
|
| 325 |
+ } else {
|
|
| 326 |
+ // roundedTotalPrice 값이 0이 아닌 경우 |
|
| 327 |
+ // 반올림된 BigDecimal 값을 toPlainString()을 사용하여 문자열로 변환 후 totPrice에 설정 |
|
| 328 |
+ // toPlainString(): 지수 표기법 없이 일반적인 문자열 형태로 반환 |
|
| 329 |
+ totPrice = roundedTotalPrice.toPlainString(); |
|
| 330 |
+ } |
|
| 331 |
+ //총금액 끝 |
|
| 332 |
+ //======================================================= |
|
| 333 |
+ |
|
| 334 |
+ |
|
| 335 |
+ return totPrice; |
|
| 336 |
+ } |
|
| 337 |
+ |
|
| 338 |
+ private KakaoSentVO codeProc(KakaoSentVO result) {
|
|
| 339 |
+ //======================================================= |
|
| 340 |
+ String returnCode; |
|
| 341 |
+ if ("Y".equals(result.getReserveCYn())) {
|
|
| 342 |
+ returnCode = "04"; // 예약취소 코드 |
|
| 343 |
+ } else if ( |
|
| 344 |
+ "Y".equals(result.getReserveYn()) |
|
| 345 |
+ && "N".equals(result.getReserveCYn()) |
|
| 346 |
+ && Integer.valueOf(result.getMsgGroupCnt()).equals(result.getWaitCount()) |
|
| 347 |
+ && Integer.valueOf(result.getDiffMin()) < -5 // 예약 시간이 5분 이상인 것들만 |
|
| 348 |
+ ) {
|
|
| 349 |
+ returnCode = "03"; // 예약대기 코드 ( 예약취소 버튼 노출 ) |
|
| 350 |
+ } else if ( |
|
| 351 |
+ //대체문자 발송 Y일때 |
|
| 352 |
+ ("Y".equals(result.getBizKakaoResendYn())
|
|
| 353 |
+ //알림톡 발송 총건수 == 알림톡 발송 성공건 + 알림톡 발송 실패건 |
|
| 354 |
+ && Integer.valueOf(result.getMsgGroupCnt()).equals(result.getSuccessCount() + result.getFailCount()) |
|
| 355 |
+ //알림톡 발송 실패건 == 대체문자 발송 성공건 + 대체문자 발송 실패건 |
|
| 356 |
+ && result.getFailCount() == (result.getKakaoResendSuccCount() + result.getKakaoResendFailCount()) |
|
| 357 |
+ ) |
|
| 358 |
+ || |
|
| 359 |
+ //대체문자 발송 N일때 |
|
| 360 |
+ ("N".equals(result.getBizKakaoResendYn())
|
|
| 361 |
+ //알림톡 발송 총건수 == 알림톡 발송 성공건 + 알림톡 발송 실패건 |
|
| 362 |
+ && Integer.valueOf(result.getMsgGroupCnt()).equals(result.getSuccessCount() + result.getFailCount())) |
|
| 363 |
+ ) {
|
|
| 364 |
+ returnCode = "02"; // 완료 코드 |
|
| 365 |
+ } else {
|
|
| 366 |
+ returnCode = "01"; // 진행중 코드 |
|
| 367 |
+ } |
|
| 368 |
+ |
|
| 369 |
+ result.setStatusCd(returnCode); |
|
| 370 |
+ |
|
| 371 |
+ return result; |
|
| 372 |
+ } |
|
| 373 |
+ private KakaoSentDetailVO codeProc(KakaoSentDetailVO result) {
|
|
| 374 |
+ //======================================================= |
|
| 375 |
+ String returnCode; |
|
| 376 |
+ if ("Y".equals(result.getReserveCYn())) {
|
|
| 377 |
+ returnCode = "04"; // 예약취소 코드 |
|
| 378 |
+ } else if ( |
|
| 379 |
+ "Y".equals(result.getReserveYn()) |
|
| 380 |
+ && "N".equals(result.getReserveCYn()) |
|
| 381 |
+ && Integer.valueOf(result.getMsgGroupCnt()).equals(result.getWaitCount()) |
|
| 382 |
+ && Integer.valueOf(result.getDiffMin()) < -5 // 예약 시간이 5분 이상인 것들만 |
|
| 383 |
+ ) {
|
|
| 384 |
+ returnCode = "03"; // 예약대기 코드 ( 예약취소 버튼 노출 ) |
|
| 385 |
+ } else if ( |
|
| 386 |
+ //대체문자 발송 Y일때 |
|
| 387 |
+ ("Y".equals(result.getBizKakaoResendYn())
|
|
| 388 |
+ //알림톡 발송 총건수 == 알림톡 발송 성공건 + 알림톡 발송 실패건 |
|
| 389 |
+ && Integer.valueOf(result.getMsgGroupCnt()).equals(result.getSuccessCount() + result.getFailCount()) |
|
| 390 |
+ //알림톡 발송 실패건 == 대체문자 발송 성공건 + 대체문자 발송 실패건 |
|
| 391 |
+ && result.getFailCount() == (result.getKakaoResendSuccCount() + result.getKakaoResendFailCount()) |
|
| 392 |
+ ) |
|
| 393 |
+ || |
|
| 394 |
+ //대체문자 발송 N일때 |
|
| 395 |
+ ("N".equals(result.getBizKakaoResendYn())
|
|
| 396 |
+ //알림톡 발송 총건수 == 알림톡 발송 성공건 + 알림톡 발송 실패건 |
|
| 397 |
+ && Integer.valueOf(result.getMsgGroupCnt()).equals(result.getSuccessCount() + result.getFailCount())) |
|
| 398 |
+ ) {
|
|
| 399 |
+ returnCode = "02"; // 완료 코드 |
|
| 400 |
+ } else {
|
|
| 401 |
+ returnCode = "01"; // 진행중 코드 |
|
| 402 |
+ } |
|
| 403 |
+ |
|
| 404 |
+ result.setStatusCd(returnCode); |
|
| 405 |
+ |
|
| 406 |
+ return result; |
|
| 407 |
+ } |
|
| 408 |
+ |
|
| 409 |
+ private String calculateBatchInfo(KakaoSentDetailVO resultVO) {
|
|
| 410 |
+ |
|
| 411 |
+ String msgGroupId = resultVO.getMsgGroupId(); |
|
| 412 |
+ |
|
| 413 |
+ |
|
| 414 |
+ List<String> requestTimes = kakaoSentDAO.findByReqDateWhereMsgGroupId(msgGroupId); |
|
| 415 |
+ |
|
| 416 |
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.S");
|
|
| 417 |
+ Map<LocalDateTime, Integer> timeCountMap = new LinkedHashMap<>(); |
|
| 418 |
+ |
|
| 419 |
+ // REQ_DATE 그룹화 (같은 시간대 몇 건인지) |
|
| 420 |
+ for (String timeStr : requestTimes) {
|
|
| 421 |
+ LocalDateTime time = LocalDateTime.parse(timeStr, formatter); |
|
| 422 |
+ timeCountMap.put(time, timeCountMap.getOrDefault(time, 0) + 1); |
|
| 423 |
+ } |
|
| 424 |
+ |
|
| 425 |
+ // 가장 첫 번째 시간 & 간격 계산 |
|
| 426 |
+ List<LocalDateTime> sortedKeys = new ArrayList<>(timeCountMap.keySet()); |
|
| 427 |
+ if (sortedKeys.size() < 2) {
|
|
| 428 |
+ return "데이터 부족 (분석 불가)"; |
|
| 429 |
+ } |
|
| 430 |
+ |
|
| 431 |
+ int batchSize = timeCountMap.get(sortedKeys.get(0)); // 한 번에 보낸 건수 |
|
| 432 |
+ int intervalMinutes = sortedKeys.get(1).getMinute() - sortedKeys.get(0).getMinute(); // 시간 간격 계산 |
|
| 433 |
+// int batchCount = sortedKeys.size(); // 총 몇 번 보냈는지 |
|
| 434 |
+ |
|
| 435 |
+// return String.format("%,d건씩 %d분 간격 (%d회 발송)", batchSize, intervalMinutes, batchCount);
|
|
| 436 |
+ return String.format("%,d건씩 %d분 간격", batchSize, intervalMinutes);
|
|
| 437 |
+ |
|
| 438 |
+ } |
|
| 152 | 439 |
|
| 153 | 440 |
} |
--- src/main/java/itn/let/kakao/user/sent/web/KakaoSentController.java
+++ src/main/java/itn/let/kakao/user/sent/web/KakaoSentController.java
... | ... | @@ -8,6 +8,7 @@ |
| 8 | 8 |
import java.util.Date; |
| 9 | 9 |
import java.util.List; |
| 10 | 10 |
import java.util.Locale; |
| 11 |
+import java.util.Map; |
|
| 11 | 12 |
|
| 12 | 13 |
import javax.annotation.Resource; |
| 13 | 14 |
import javax.servlet.http.HttpServletRequest; |
... | ... | @@ -26,6 +27,8 @@ |
| 26 | 27 |
import org.slf4j.Logger; |
| 27 | 28 |
import org.slf4j.LoggerFactory; |
| 28 | 29 |
import org.springframework.beans.factory.annotation.Autowired; |
| 30 |
+import org.springframework.http.HttpStatus; |
|
| 31 |
+import org.springframework.http.ResponseEntity; |
|
| 29 | 32 |
import org.springframework.stereotype.Controller; |
| 30 | 33 |
import org.springframework.ui.ModelMap; |
| 31 | 34 |
import org.springframework.web.bind.annotation.ModelAttribute; |
... | ... | @@ -43,6 +46,7 @@ |
| 43 | 46 |
import itn.let.kakao.kakaoComm.KakaoReturnVO; |
| 44 | 47 |
import itn.let.kakao.kakaoComm.KakaoVO; |
| 45 | 48 |
import itn.let.kakao.kakaoComm.kakaoApi.KakaoApiTemplate; |
| 49 |
+import itn.let.kakao.user.sent.service.KakaoSentDetailVO; |
|
| 46 | 50 |
import itn.let.kakao.user.sent.service.KakaoSentService; |
| 47 | 51 |
import itn.let.kakao.user.sent.service.KakaoSentVO; |
| 48 | 52 |
|
... | ... | @@ -82,26 +86,26 @@ |
| 82 | 86 |
//전체 발송 건수 통계 불러오기 |
| 83 | 87 |
kakaoSentVO.setMsgType("");
|
| 84 | 88 |
|
| 85 |
- List<KakaoSentVO> totalMsgCnt = kakaoSentService.selectKakaoSentCntAll(kakaoSentVO); |
|
| 86 |
- model.addAttribute("totalMsgCnt", totalMsgCnt);
|
|
| 87 |
- |
|
| 88 |
- List<KakaoSentVO> atCnt = new ArrayList<KakaoSentVO>(); |
|
| 89 |
- List<KakaoSentVO> ftCnt = new ArrayList<KakaoSentVO>(); |
|
| 90 |
- |
|
| 91 |
- |
|
| 92 |
- totalMsgCnt.forEach(t->{
|
|
| 93 |
- if (Integer.parseInt(t.getFilePath1())>0) {
|
|
| 94 |
- atCnt.add(t); |
|
| 95 |
- } else if (Integer.parseInt(t.getFilePath2())>0) {
|
|
| 96 |
- ftCnt.add(t); |
|
| 97 |
- } |
|
| 98 |
- }); |
|
| 99 |
- |
|
| 100 |
- //알림톡 성공건, 실패건 불러오기 |
|
| 101 |
- model.addAttribute("atCnt", atCnt);
|
|
| 102 |
- |
|
| 103 |
- //친구톡 성공건, 실패건 불러오기 |
|
| 104 |
- model.addAttribute("ftCnt", ftCnt);
|
|
| 89 |
+// List<KakaoSentVO> totalMsgCnt = kakaoSentService.selectKakaoSentCntAll(kakaoSentVO); |
|
| 90 |
+// model.addAttribute("totalMsgCnt", totalMsgCnt);
|
|
| 91 |
+// |
|
| 92 |
+// List<KakaoSentVO> atCnt = new ArrayList<KakaoSentVO>(); |
|
| 93 |
+// List<KakaoSentVO> ftCnt = new ArrayList<KakaoSentVO>(); |
|
| 94 |
+// |
|
| 95 |
+// |
|
| 96 |
+// totalMsgCnt.forEach(t->{
|
|
| 97 |
+// if (Integer.parseInt(t.getFilePath1())>0) {
|
|
| 98 |
+// atCnt.add(t); |
|
| 99 |
+// } else if (Integer.parseInt(t.getFilePath2())>0) {
|
|
| 100 |
+// ftCnt.add(t); |
|
| 101 |
+// } |
|
| 102 |
+// }); |
|
| 103 |
+// |
|
| 104 |
+// //알림톡 성공건, 실패건 불러오기 |
|
| 105 |
+// model.addAttribute("atCnt", atCnt);
|
|
| 106 |
+// |
|
| 107 |
+// //친구톡 성공건, 실패건 불러오기 |
|
| 108 |
+// model.addAttribute("ftCnt", ftCnt);
|
|
| 105 | 109 |
|
| 106 | 110 |
// 검색 리스트 불러오기 |
| 107 | 111 |
if(kakaoSentVO.getPageUnit() != 10) kakaoSentVO.setPageUnit(kakaoSentVO.getPageUnit()); |
... | ... | @@ -193,7 +197,7 @@ |
| 193 | 197 |
List<KakaoSentVO> resultAllSentList = kakaoSentService.selectAllKakaoSentList(kakaoSentVO); |
| 194 | 198 |
System.out.println("??");
|
| 195 | 199 |
model.addAttribute("resultAllSentList", resultAllSentList);
|
| 196 |
- model.addAttribute("resultAllSentCnt", resultAllSentList.size());
|
|
| 200 |
+// model.addAttribute("resultAllSentCnt", resultAllSentList.size());
|
|
| 197 | 201 |
|
| 198 | 202 |
model.addAttribute("searchKeyword", kakaoSentVO.getSearchKeyword());
|
| 199 | 203 |
paginationInfo.setTotalRecordCount( resultAllSentList.size()> 0 ? (Integer.parseInt((resultAllSentList.get(0)).getTotMsgCnt())) : 0); |
... | ... | @@ -498,7 +502,6 @@ |
| 498 | 502 |
* 발송관리 엑셀다운로드 기능 - 카카오톡 |
| 499 | 503 |
* @param searchVO |
| 500 | 504 |
* @param model |
| 501 |
- * @return "/web/mjon/msgsent/msgSentExcelDownLoadAjax.do" |
|
| 502 | 505 |
* @throws Exception |
| 503 | 506 |
*/ |
| 504 | 507 |
@RequestMapping(value= {"/web/mjon/msgsent/kakaoSentExcelDownLoadAjax.do"})
|
... | ... | @@ -985,5 +988,105 @@ |
| 985 | 988 |
|
| 986 | 989 |
} |
| 987 | 990 |
|
| 991 |
+ @RequestMapping(value= {"/web/kakao/sent/selectKakaoSentViewTotalSumAjax.do"})
|
|
| 992 |
+ public ResponseEntity<?> selectKakaoSentViewTotalSumAjax( |
|
| 993 |
+ KakaoSentVO kakaoSentVO |
|
| 994 |
+ ) throws Exception{
|
|
| 995 |
+ //로그인 권한정보 불러오기 |
|
| 996 |
+ LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; |
|
| 997 |
+ String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 998 |
+ if(loginVO == null) {
|
|
| 999 |
+// return "redirect:/web/user/login/login.do"; |
|
| 1000 |
+ } |
|
| 1001 |
+ |
|
| 1002 |
+ kakaoSentVO.setUserId(userId); |
|
| 1003 |
+ |
|
| 1004 |
+ Map<String, Object> returnMap = kakaoSentService.selectKakaoSentCntAll_Advc(kakaoSentVO); |
|
| 1005 |
+ |
|
| 1006 |
+ return new ResponseEntity<>(returnMap, HttpStatus.OK); |
|
| 1007 |
+ } |
|
| 988 | 1008 |
|
| 1009 |
+ /** |
|
| 1010 |
+ * 발송관리 상세화면 |
|
| 1011 |
+ * @param searchVO |
|
| 1012 |
+ * @param model |
|
| 1013 |
+ * @return "/web/kakao/sent/selectKakaoSentDetailView.do" |
|
| 1014 |
+ * @throws Exception |
|
| 1015 |
+ */ |
|
| 1016 |
+ @RequestMapping(value= {"/web/kakao/sent/selectKakaoSentDetailView.do"})
|
|
| 1017 |
+ public String selectKakaoSentDetailView(@ModelAttribute("searchVO") KakaoSentDetailVO kakaoSentDetailVO,
|
|
| 1018 |
+ RedirectAttributes redirectAttributes, ModelMap model) throws Exception{
|
|
| 1019 |
+ //로그인 권한정보 불러오기 |
|
| 1020 |
+ LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; |
|
| 1021 |
+ String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 1022 |
+ if(loginVO == null) {
|
|
| 1023 |
+ return "redirect:/web/user/login/login.do"; |
|
| 1024 |
+ } |
|
| 1025 |
+ |
|
| 1026 |
+ kakaoSentDetailVO.setUserId(userId); |
|
| 1027 |
+ |
|
| 1028 |
+ model.addAttribute("result", kakaoSentService.selectKakaoSentDetailView(kakaoSentDetailVO));
|
|
| 1029 |
+ |
|
| 1030 |
+ return "web/kakao/sent/KakaoSentDetailView"; |
|
| 1031 |
+ } |
|
| 1032 |
+ |
|
| 1033 |
+ |
|
| 1034 |
+ /** |
|
| 1035 |
+ * @methodName : selectMsgSentDetailDataAjax |
|
| 1036 |
+ * @author : 이호영 |
|
| 1037 |
+ * @date : 2023.03.06 |
|
| 1038 |
+ * @description : 알림톡 전송 - 내용 상세 팝업 [전송건별] |
|
| 1039 |
+ * @param mjonKakaoATVO |
|
| 1040 |
+ * @param model |
|
| 1041 |
+ * @return |
|
| 1042 |
+ * @throws Exception |
|
| 1043 |
+ */ |
|
| 1044 |
+ @RequestMapping(value= {"/web/kakao/sent/selectKakaoSentDetailViewPhoneAjax.do"})
|
|
| 1045 |
+ public String selectKakaoSentDetailViewPhoneAjax(@ModelAttribute("searchVO") MjonKakaoATVO mjonKakaoATVO, ModelMap model) throws Exception{
|
|
| 1046 |
+ |
|
| 1047 |
+ //로그인 권한정보 불러오기 |
|
| 1048 |
+ LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; |
|
| 1049 |
+ String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 1050 |
+ mjonKakaoATVO.setUserId(userId); |
|
| 1051 |
+ |
|
| 1052 |
+ |
|
| 1053 |
+ |
|
| 1054 |
+ //발송 관리 문자발송 내용 상세보기 팝업 => 문자내용(MJ_MSG_DATA) |
|
| 1055 |
+ MjonKakaoATVO mjonKakaoATResultVO = kakaoSentService.selectKakaoSentDetailDataAjax(mjonKakaoATVO); |
|
| 1056 |
+ // 대체문자 엔터키 치환 |
|
| 1057 |
+ mjonKakaoATResultVO.setSmsTxt(StringUtil2.replaceBR(mjonKakaoATResultVO.getSmsTxt())); |
|
| 1058 |
+ model.addAttribute("resultMsgDetail", mjonKakaoATResultVO);
|
|
| 1059 |
+ |
|
| 1060 |
+ String msgType = mjonKakaoATResultVO.getMsgType(); |
|
| 1061 |
+ |
|
| 1062 |
+ if(msgType.equals("8")) {//카카오 알림톡인 경우 상세정보 처리
|
|
| 1063 |
+ |
|
| 1064 |
+ // 템플릿 api 가져오기 |
|
| 1065 |
+ KakaoVO kakaoVO = new KakaoVO(); |
|
| 1066 |
+ kakaoVO.setSenderKey(mjonKakaoATResultVO.getMsgNoticetalkSenderKey()); |
|
| 1067 |
+ kakaoVO.setTemplateCode(mjonKakaoATResultVO.getMsgNoticetalkTmpKey()); |
|
| 1068 |
+ |
|
| 1069 |
+ KakaoReturnVO kakaoTemplateInfo =kakaoApiTemplate.selectKakaoApiTemplateDetail(kakaoVO); |
|
| 1070 |
+ |
|
| 1071 |
+ model.addAttribute("kakaoTemplateInfo", kakaoTemplateInfo);
|
|
| 1072 |
+ // //템플릿 api 가져오기 |
|
| 1073 |
+ |
|
| 1074 |
+ }else if(msgType.equals("9")) {//카카오 친구톡인 경우 상세정보 처리
|
|
| 1075 |
+ |
|
| 1076 |
+ //String smsTxt = mjonKakaoATResultVO.getSmsTxt(); |
|
| 1077 |
+ |
|
| 1078 |
+ KakaoReturnVO kakaoTemplateInfo = getKakaoFTSendTemplateInfo(mjonKakaoATResultVO); |
|
| 1079 |
+ //kakaoTemplateInfo.setTemplateContent(smsTxt); |
|
| 1080 |
+ |
|
| 1081 |
+ model.addAttribute("kakaoTemplateInfo", kakaoTemplateInfo);
|
|
| 1082 |
+ |
|
| 1083 |
+ }else {
|
|
| 1084 |
+ |
|
| 1085 |
+ model.addAttribute("kakaoTemplateInfo", "");
|
|
| 1086 |
+ |
|
| 1087 |
+ } |
|
| 1088 |
+ |
|
| 1089 |
+ model.addAttribute("msgType", msgType);
|
|
| 1090 |
+ return "web/kakao/sent/KakaoSentDetailPopAjax"; |
|
| 1091 |
+ } |
|
| 989 | 1092 |
} |
--- src/main/java/itn/let/mjo/addr/service/AddrService.java
+++ src/main/java/itn/let/mjo/addr/service/AddrService.java
... | ... | @@ -109,4 +109,8 @@ |
| 109 | 109 |
void deleteAddr_advc(AddrGroupVO addrGroupVO) throws Exception; |
| 110 | 110 |
|
| 111 | 111 |
int getAddrCount(AddrGroupVO addrGroupVO) throws Exception; |
| 112 |
+ |
|
| 113 |
+ StatusResponse insertByAddrGrpDataAndAddrDataAjax(AddrVO addrVO) throws Exception; |
|
| 114 |
+ |
|
| 115 |
+ StatusResponse deleteAddrNoDataAjax(AddrVO addrVO) throws Exception; |
|
| 112 | 116 |
} |
--- src/main/java/itn/let/mjo/addr/service/impl/AddrDAO.java
+++ src/main/java/itn/let/mjo/addr/service/impl/AddrDAO.java
... | ... | @@ -292,5 +292,9 @@ |
| 292 | 292 |
return (Integer)select("AddrDAO.getAddrCount", addrVO);
|
| 293 | 293 |
} |
| 294 | 294 |
|
| 295 |
+ public int deleteAddrPhoneNo(AddrVO addrVO) {
|
|
| 296 |
+ return update("AddrDAO.deleteAddrPhoneNo", addrVO);
|
|
| 297 |
+ } |
|
| 298 |
+ |
|
| 295 | 299 |
|
| 296 | 300 |
} |
--- src/main/java/itn/let/mjo/addr/service/impl/AddrServiceImpl.java
+++ src/main/java/itn/let/mjo/addr/service/impl/AddrServiceImpl.java
... | ... | @@ -34,6 +34,8 @@ |
| 34 | 34 |
import itn.let.mjo.addr.service.AddrService; |
| 35 | 35 |
import itn.let.mjo.addr.service.AddrTransHistVO; |
| 36 | 36 |
import itn.let.mjo.addr.service.AddrVO; |
| 37 |
+import itn.let.mjo.msgsent.service.MjonMsgSentVO; |
|
| 38 |
+import lombok.extern.slf4j.Slf4j; |
|
| 37 | 39 |
|
| 38 | 40 |
/** |
| 39 | 41 |
* 주소록 관리를 위한 서비스 구현 클래스 |
... | ... | @@ -49,6 +51,7 @@ |
| 49 | 51 |
* 2021.04.08 ITN 최초 생성 |
| 50 | 52 |
* </pre> |
| 51 | 53 |
*/ |
| 54 |
+@Slf4j |
|
| 52 | 55 |
@Service("AddrService")
|
| 53 | 56 |
public class AddrServiceImpl extends EgovAbstractServiceImpl implements AddrService {
|
| 54 | 57 |
|
... | ... | @@ -644,5 +647,81 @@ |
| 644 | 647 |
|
| 645 | 648 |
return aa; |
| 646 | 649 |
} |
| 650 |
+ |
|
| 651 |
+ @Override |
|
| 652 |
+ public StatusResponse insertByAddrGrpDataAndAddrDataAjax(AddrVO addrVO) throws Exception {
|
|
| 653 |
+ |
|
| 654 |
+ String userId = addrVO.getMberId(); |
|
| 655 |
+ |
|
| 656 |
+ log.info("addrVO.getAddrGrpId() :: [{}]", addrVO.getAddrGrpId());
|
|
| 657 |
+ |
|
| 658 |
+ // 새로운 그룹 생성 |
|
| 659 |
+ if ("NEW".equals(addrVO.getAddrGrpId())) {
|
|
| 660 |
+ |
|
| 661 |
+ |
|
| 662 |
+ AddrGroupVO addrGroupVO = new AddrGroupVO(); |
|
| 663 |
+ addrGroupVO.setMberId(userId); |
|
| 664 |
+ addrGroupVO.setAddrGrpNm(addrVO.getAddrGrpNm()); |
|
| 665 |
+ addrGroupVO.setFrstRegisterId(userId); |
|
| 666 |
+ |
|
| 667 |
+ int usedCnt = addrGroupDAO.selectDuplAddrGroupCnt(addrGroupVO); |
|
| 668 |
+ if(usedCnt > 0) {
|
|
| 669 |
+ return new StatusResponse(HttpStatus.BAD_REQUEST, "이미 등록되어있는 그룹이름입니다.", LocalDateTime.now()); |
|
| 670 |
+ } |
|
| 671 |
+ |
|
| 672 |
+ int nextOrderNumber = addrGroupDAO.selectMaxOrderNumber(addrGroupVO); |
|
| 673 |
+ addrGroupVO.setGrpOrder(nextOrderNumber); |
|
| 674 |
+ |
|
| 675 |
+ String addrGrpIdTemp = addrGroupDAO.insertAddrGroup(addrGroupVO); |
|
| 676 |
+ |
|
| 677 |
+ |
|
| 678 |
+ addrVO.setAddrGrpId(addrGrpIdTemp); |
|
| 679 |
+ |
|
| 680 |
+ } |
|
| 681 |
+ else if ("bookmark".equals(addrVO.getAddrGrpId()))
|
|
| 682 |
+ {// 자주 보내는 그룹
|
|
| 683 |
+ addrVO.setBookmark("Y");
|
|
| 684 |
+ addrVO.setAddrGrpId("0");
|
|
| 685 |
+ } |
|
| 686 |
+ else |
|
| 687 |
+ {
|
|
| 688 |
+ addrVO.setBookmark("N");
|
|
| 689 |
+ } |
|
| 690 |
+ |
|
| 691 |
+ String bookmark = addrVO.getBookmark(); |
|
| 692 |
+ String addrGrpId = addrVO.getAddrGrpId(); |
|
| 693 |
+ |
|
| 694 |
+ List<AddrVO> addrDataInfo = new ArrayList<AddrVO>(); |
|
| 695 |
+ |
|
| 696 |
+ for(String phone : addrVO.getAddrPhones()) {
|
|
| 697 |
+ AddrVO addrTempVO = new AddrVO(); |
|
| 698 |
+ addrTempVO.setAddrPhoneNo(phone); |
|
| 699 |
+ addrTempVO.setAddrGrpId(addrGrpId); |
|
| 700 |
+ addrTempVO.setBookmark(bookmark); |
|
| 701 |
+ addrTempVO.setFrstRegisterId(userId); |
|
| 702 |
+ addrTempVO.setMberId(userId); |
|
| 703 |
+ addrDataInfo.add(addrTempVO); |
|
| 704 |
+ } |
|
| 705 |
+ |
|
| 706 |
+ int resultCnt = addrDAO.insertAddrList(addrDataInfo); |
|
| 707 |
+ |
|
| 708 |
+ |
|
| 709 |
+ |
|
| 710 |
+ return new StatusResponse(HttpStatus.OK, "총" + resultCnt + "건의 주소록 등록이 완료되었습니다.", addrVO); |
|
| 711 |
+ |
|
| 712 |
+ } |
|
| 713 |
+ |
|
| 714 |
+ @Override |
|
| 715 |
+ public StatusResponse deleteAddrNoDataAjax(AddrVO addrVO) throws Exception {
|
|
| 716 |
+ |
|
| 717 |
+// AddrPhones |
|
| 718 |
+ //아이디 저장 |
|
| 719 |
+ |
|
| 720 |
+ //주소록 디비에서 연락처 정보를 delete 시킴 |
|
| 721 |
+ int resultCnt = addrDAO.deleteAddrPhoneNo(addrVO); |
|
| 722 |
+ |
|
| 723 |
+ |
|
| 724 |
+ return new StatusResponse(HttpStatus.OK, "총 " + resultCnt + "건의 주소록을 삭제하였습니다.", addrVO); |
|
| 725 |
+ } |
|
| 647 | 726 |
|
| 648 | 727 |
} |
--- src/main/java/itn/let/mjo/addr/web/AddrController.java
+++ src/main/java/itn/let/mjo/addr/web/AddrController.java
... | ... | @@ -4,6 +4,7 @@ |
| 4 | 4 |
import java.io.InputStreamReader; |
| 5 | 5 |
import java.io.OutputStream; |
| 6 | 6 |
import java.text.SimpleDateFormat; |
| 7 |
+import java.time.LocalDateTime; |
|
| 7 | 8 |
import java.util.ArrayList; |
| 8 | 9 |
import java.util.Calendar; |
| 9 | 10 |
import java.util.Date; |
... | ... | @@ -31,10 +32,13 @@ |
| 31 | 32 |
import org.apache.poi.xssf.usermodel.XSSFRow; |
| 32 | 33 |
import org.apache.poi.xssf.usermodel.XSSFSheet; |
| 33 | 34 |
import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
| 35 |
+import org.springframework.http.HttpStatus; |
|
| 36 |
+import org.springframework.http.ResponseEntity; |
|
| 34 | 37 |
import org.springframework.stereotype.Controller; |
| 35 | 38 |
import org.springframework.ui.Model; |
| 36 | 39 |
import org.springframework.ui.ModelMap; |
| 37 | 40 |
import org.springframework.web.bind.annotation.ModelAttribute; |
| 41 |
+import org.springframework.web.bind.annotation.RequestBody; |
|
| 38 | 42 |
import org.springframework.web.bind.annotation.RequestMapping; |
| 39 | 43 |
import org.springframework.web.bind.annotation.RequestParam; |
| 40 | 44 |
import org.springframework.web.bind.annotation.ResponseBody; |
... | ... | @@ -52,12 +56,14 @@ |
| 52 | 56 |
import itn.com.cmm.util.StringUtil; |
| 53 | 57 |
import itn.com.utl.fcc.service.EgovStringUtil; |
| 54 | 58 |
import itn.let.fax.addr.service.FaxAddrVO; |
| 59 |
+import itn.let.mail.service.StatusResponse; |
|
| 55 | 60 |
import itn.let.mjo.addr.service.AddrGroupService; |
| 56 | 61 |
import itn.let.mjo.addr.service.AddrGroupVO; |
| 57 | 62 |
import itn.let.mjo.addr.service.AddrService; |
| 58 | 63 |
import itn.let.mjo.addr.service.AddrTransHistVO; |
| 59 | 64 |
import itn.let.mjo.addr.service.AddrVO; |
| 60 | 65 |
import itn.let.mjo.msgdata.service.PhoneVO; |
| 66 |
+import lombok.extern.slf4j.Slf4j; |
|
| 61 | 67 |
|
| 62 | 68 |
/** |
| 63 | 69 |
* 주소록 관한 controller 클래스를 정의한다. |
... | ... | @@ -75,6 +81,7 @@ |
| 75 | 81 |
* |
| 76 | 82 |
* </pre> |
| 77 | 83 |
*/ |
| 84 |
+@Slf4j |
|
| 78 | 85 |
@Controller |
| 79 | 86 |
public class AddrController {
|
| 80 | 87 |
|
... | ... | @@ -2223,6 +2230,47 @@ |
| 2223 | 2230 |
return modelAndView; |
| 2224 | 2231 |
} |
| 2225 | 2232 |
|
| 2233 |
+ |
|
| 2234 |
+ @RequestMapping(value = {"/web/mjon/addr/insertByAddrGrpDataAndAddrDataAjax.do"})
|
|
| 2235 |
+ public ResponseEntity<StatusResponse> insertByAddrGrpDataAndAddrDataAjax(@RequestBody AddrVO addrVO) throws Exception {
|
|
| 2236 |
+ |
|
| 2237 |
+ ModelAndView modelAndView = new ModelAndView(); |
|
| 2238 |
+ modelAndView.setViewName("jsonView");
|
|
| 2239 |
+ |
|
| 2240 |
+ //로그인 권한정보 불러오기 |
|
| 2241 |
+ LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; |
|
| 2242 |
+ String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 2243 |
+ |
|
| 2244 |
+ if(userId == null) {
|
|
| 2245 |
+ if(StringUtils.isEmpty(userId)) return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now())); |
|
| 2246 |
+ } |
|
| 2247 |
+ |
|
| 2248 |
+ addrVO.setMberId(userId); |
|
| 2249 |
+ |
|
| 2250 |
+ |
|
| 2251 |
+ return ResponseEntity.ok().body(addrService.insertByAddrGrpDataAndAddrDataAjax(addrVO)); |
|
| 2252 |
+ } |
|
| 2253 |
+ |
|
| 2254 |
+ @RequestMapping(value = {"/web/mjon/addr/deleteAddrNoDataAjax.do"})
|
|
| 2255 |
+ public ResponseEntity<StatusResponse> deleteAddrNoDataAjax(@RequestBody AddrVO addrVO) throws Exception {
|
|
| 2256 |
+ |
|
| 2257 |
+ ModelAndView modelAndView = new ModelAndView(); |
|
| 2258 |
+ modelAndView.setViewName("jsonView");
|
|
| 2259 |
+ |
|
| 2260 |
+ //로그인 권한정보 불러오기 |
|
| 2261 |
+ LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; |
|
| 2262 |
+ String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 2263 |
+ |
|
| 2264 |
+ if(userId == null) {
|
|
| 2265 |
+ if(StringUtils.isEmpty(userId)) return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now())); |
|
| 2266 |
+ } |
|
| 2267 |
+ |
|
| 2268 |
+ addrVO.setMberId(userId); |
|
| 2269 |
+ |
|
| 2270 |
+ return ResponseEntity.ok().body(addrService.deleteAddrNoDataAjax(addrVO)); |
|
| 2271 |
+ } |
|
| 2272 |
+ |
|
| 2273 |
+ |
|
| 2226 | 2274 |
|
| 2227 | 2275 |
|
| 2228 | 2276 |
public boolean getNameRepLenChk(String type, String value) {
|
--- src/main/java/itn/let/mjo/mjocommon/MjonCommon.java
+++ src/main/java/itn/let/mjo/mjocommon/MjonCommon.java
... | ... | @@ -1,10 +1,12 @@ |
| 1 | 1 |
package itn.let.mjo.mjocommon; |
| 2 | 2 |
|
| 3 | 3 |
import java.io.IOException; |
| 4 |
+import java.io.UnsupportedEncodingException; |
|
| 4 | 5 |
import java.text.SimpleDateFormat; |
| 5 | 6 |
import java.util.Calendar; |
| 6 | 7 |
import java.util.Date; |
| 7 | 8 |
import java.util.List; |
| 9 |
+import java.util.Map; |
|
| 8 | 10 |
|
| 9 | 11 |
import javax.annotation.Resource; |
| 10 | 12 |
|
... | ... | @@ -14,13 +16,18 @@ |
| 14 | 16 |
import org.apache.commons.httpclient.methods.PostMethod; |
| 15 | 17 |
import org.json.simple.JSONObject; |
| 16 | 18 |
import org.springframework.beans.factory.annotation.Value; |
| 19 |
+import org.springframework.stereotype.Component; |
|
| 17 | 20 |
import org.springframework.stereotype.Service; |
| 18 | 21 |
|
| 19 | 22 |
import com.mysql.jdbc.StringUtils; |
| 20 | 23 |
|
| 24 |
+import egovframework.com.idgen.CustomIdGnrService; |
|
| 25 |
+import egovframework.rte.fdl.cmmn.exception.FdlException; |
|
| 21 | 26 |
import itn.com.cmm.MjonMsgSendVO; |
| 22 | 27 |
import itn.com.cmm.OptimalMsgResultDTO; |
| 23 | 28 |
import itn.com.cmm.util.MsgSendUtils; |
| 29 |
+import itn.com.cmm.util.SlackMessageFormatUtil; |
|
| 30 |
+import itn.let.kakao.kakaoComm.KakaoSendAdvcVO; |
|
| 24 | 31 |
import itn.let.kakao.kakaoComm.KakaoVO; |
| 25 | 32 |
import itn.let.mail.service.StatusResponse; |
| 26 | 33 |
import itn.let.mjo.event.service.MjonEventService; |
... | ... | @@ -60,11 +67,14 @@ |
| 60 | 67 |
/** xpedite 솔루션 ID*/ |
| 61 | 68 |
@Value("#{globalSettings['Globals.slack.channel.name']}")
|
| 62 | 69 |
private String SLACK_CHANNEL; |
| 63 |
- |
|
| 70 |
+ |
|
| 71 |
+ @Resource(name = "egovMjonMsgIdCGnrService") |
|
| 72 |
+ private CustomIdGnrService idgenMsgCId; |
|
| 73 |
+ |
|
| 64 | 74 |
|
| 65 | 75 |
|
| 66 | 76 |
/** |
| 67 |
- * @methodName : getAdminMsgSandSlack |
|
| 77 |
+ * @methodName : getAdminSandSlack |
|
| 68 | 78 |
* @author : 이호영 |
| 69 | 79 |
* @date : 2024.12.04 |
| 70 | 80 |
* @description : 기존 메소드 리펙토링 |
... | ... | @@ -120,8 +130,8 @@ |
| 120 | 130 |
|
| 121 | 131 |
try {
|
| 122 | 132 |
// 메시지 내용 설정 |
| 123 |
- String smsTxt = formatSmsText(mjonMsgVO); |
|
| 124 |
- String sandName = formatSandName(mjonMsgVO); |
|
| 133 |
+ String smsTxt = SlackMessageFormatUtil.formatSmsText(mjonMsgVO); |
|
| 134 |
+ String sandName = SlackMessageFormatUtil.formatSandName(mjonMsgVO); |
|
| 125 | 135 |
|
| 126 | 136 |
// Slack 메시지 생성 |
| 127 | 137 |
JSONObject json = new JSONObject(); |
... | ... | @@ -150,94 +160,49 @@ |
| 150 | 160 |
} |
| 151 | 161 |
} |
| 152 | 162 |
|
| 153 |
- /** |
|
| 154 |
- * @throws Exception |
|
| 155 |
- * @Method Name : getAdminSlackSand |
|
| 156 |
- * @작성일 : 2022. 12. 6. |
|
| 157 |
- * @작성자 : WYH |
|
| 158 |
- * @Method 설명 : slack 메시지 전송 |
|
| 159 |
- */ |
|
| 160 |
- /*public void getAdminMsgSandSlack(MjonMsgVO mjonMsgVO) {
|
|
| 161 |
- |
|
| 163 |
+ public void getAdminKakaoAtSendSlack(KakaoSendAdvcVO kakaoVO) {
|
|
| 162 | 164 |
HttpClient client = new HttpClient(); |
| 163 |
- PostMethod post = new PostMethod(url); |
|
| 164 |
- JSONObject json = new JSONObject(); |
|
| 165 |
+ PostMethod post = new PostMethod(SLACK_URL); |
|
| 166 |
+ |
|
| 165 | 167 |
try {
|
| 166 |
- |
|
| 167 |
- String reserveYn = mjonMsgVO.getReserveYn(); |
|
| 168 |
- String delayYn = mjonMsgVO.getDelayYn(); |
|
| 169 |
- String smsTxt = mjonMsgVO.getSmsTxt(); |
|
| 170 |
- String smishingYn = mjonMsgVO.getSmishingYn(); |
|
| 171 |
- String reservSmsTxt = ""; |
|
| 172 |
- String smisingSmsTxt = ""; |
|
| 173 |
- //예약문자를 발송하는 경우 문자 내용 앞에 "[예약]" 표시되도록 처리 |
|
| 168 |
+ // 메시지 내용 설정 |
|
| 169 |
+ String smsTxt = SlackMessageFormatUtil.formatKakaoText(kakaoVO); |
|
| 170 |
+ String sandName = SlackMessageFormatUtil.formatKakaoSandName(kakaoVO); |
|
| 174 | 171 |
|
| 175 |
- if(reserveYn.equals("Y")) {
|
|
| 176 |
- |
|
| 177 |
- if(smishingYn.equals("Y") || delayYn.equals("Y")) {
|
|
| 178 |
- reservSmsTxt = "[스미싱의심][예약]" + smsTxt; |
|
| 179 |
- }else {
|
|
| 180 |
- reservSmsTxt = "[예약]" + smsTxt; |
|
| 181 |
- } |
|
| 182 |
- |
|
| 183 |
- smsTxt = reservSmsTxt; |
|
| 184 |
- System.out.println("smishingYn : "+ smishingYn);
|
|
| 185 |
- System.out.println("delayYn : "+ delayYn);
|
|
| 186 |
- }else if(smishingYn.equals("Y") || delayYn.equals("Y")) {
|
|
| 187 |
- |
|
| 188 |
- smisingSmsTxt = "[스미싱의심]" + smsTxt; |
|
| 189 |
- smsTxt = smisingSmsTxt; |
|
| 190 |
- } |
|
| 191 |
- |
|
| 192 |
- String sandName = mjonMsgVO.getCallFrom(); |
|
| 193 |
- String userId = mjonMsgVO.getUserId(); |
|
| 194 |
- String msgType = ""; |
|
| 195 |
- int fileCount = Integer.parseInt(mjonMsgVO.getFileCnt());//그림 이미지 갯수 |
|
| 196 |
- if(mjonMsgVO.getMsgType().equals("4")) { //단문 금액
|
|
| 197 |
- msgType = "[단문]"; |
|
| 198 |
- }else if(mjonMsgVO.getMsgType().equals("6")){
|
|
| 199 |
- if(fileCount == 0) {
|
|
| 200 |
- msgType = "[장문]"; |
|
| 201 |
- }else {
|
|
| 202 |
- msgType = "[그림]"; |
|
| 203 |
- // 2022.12.21 JSP => 텍스트없는 그림문자만 발송시 슬랙알림 안됨 |
|
| 204 |
- if (StringUtils.isNullOrEmpty(smsTxt)) {
|
|
| 205 |
- smsTxt = "그림문자 " + smsTxt; |
|
| 206 |
- } |
|
| 207 |
- } |
|
| 208 |
- } |
|
| 209 |
-// sandName = "[" + userId + "]" + "[" + sandName + "]" + msgType; |
|
| 210 |
- sandName = "[개발테스트]"+"[" + userId + "]" + "[" + sandName + "]" + msgType; |
|
| 211 |
- |
|
| 212 |
- json.put("channel", "mjon메시지");
|
|
| 172 |
+ // Slack 메시지 생성 |
|
| 173 |
+ JSONObject json = new JSONObject(); |
|
| 174 |
+ json.put("channel", SLACK_CHANNEL);
|
|
| 213 | 175 |
json.put("text", smsTxt);
|
| 214 | 176 |
json.put("username", sandName);
|
| 215 | 177 |
|
| 216 |
- |
|
| 178 |
+ // Slack 요청 |
|
| 217 | 179 |
post.addParameter("payload", json.toString());
|
| 218 |
- // 처음에 utf-8로 content-type안넣어주니까 한글은 깨져서 content-type넣어줌 |
|
| 219 | 180 |
post.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
|
| 181 |
+ |
|
| 182 |
+ // Slack 응답 처리 |
|
| 220 | 183 |
int responseCode = client.executeMethod(post); |
| 221 |
- String response = post.getResponseBodyAsString(); |
|
| 222 |
- if (responseCode != HttpStatus.SC_OK) {
|
|
| 223 |
- System.out.println("Response: " + response);
|
|
| 184 |
+ if (responseCode != HttpStatus.SC_OK) {
|
|
| 185 |
+ log.warn("Slack 메시지 전송 실패. Response: {}", post.getResponseBodyAsString());
|
|
| 224 | 186 |
} |
| 225 | 187 |
} catch (IllegalArgumentException e) {
|
| 226 |
- System.out.println("IllegalArgumentException posting to Slack " + e);
|
|
| 227 |
- } |
|
| 228 |
- catch (IOException e) {
|
|
| 229 |
- System.out.println("IOException posting to Slack " + e);
|
|
| 230 |
- } |
|
| 231 |
- catch (Exception e) {
|
|
| 232 |
- System.out.println("Exception posting to Slack " + e);
|
|
| 233 |
- e.printStackTrace(); |
|
| 188 |
+ log.error("Slack 메시지 전송 중 IllegalArgumentException 발생", e);
|
|
| 189 |
+ } catch (IOException e) {
|
|
| 190 |
+ log.error("Slack 메시지 전송 중 IOException 발생", e);
|
|
| 191 |
+ } catch (Exception e) {
|
|
| 192 |
+ log.error("Slack 메시지 전송 중 Exception 발생", e);
|
|
| 234 | 193 |
} finally {
|
| 235 | 194 |
post.releaseConnection(); |
| 236 | 195 |
} |
| 237 |
- |
|
| 238 |
- }*/ |
|
| 196 |
+ } |
|
| 239 | 197 |
|
| 198 |
+ private String formatKakaoSandName(KakaoVO kakaoVO) {
|
|
| 199 |
+ // TODO Auto-generated method stub |
|
| 200 |
+ return null; |
|
| 201 |
+ } |
|
| 202 |
+ |
|
| 240 | 203 |
|
| 204 |
+ |
|
| 205 |
+ |
|
| 241 | 206 |
/** |
| 242 | 207 |
* @Method Name : sendSimpleSlackMsg |
| 243 | 208 |
* @작성일 : 2022. 12. 9 |
... | ... | @@ -384,7 +349,7 @@ |
| 384 | 349 |
|
| 385 | 350 |
return mjonMsgVO; |
| 386 | 351 |
} |
| 387 |
- |
|
| 352 |
+ /* |
|
| 388 | 353 |
@SuppressWarnings("unchecked")
|
| 389 | 354 |
public void getAdminKakaoAtSandSlack(KakaoVO kakaoVO) {
|
| 390 | 355 |
|
... | ... | @@ -448,7 +413,7 @@ |
| 448 | 413 |
} |
| 449 | 414 |
|
| 450 | 415 |
} |
| 451 |
- |
|
| 416 |
+ */ |
|
| 452 | 417 |
|
| 453 | 418 |
public String getCreateMsgUserIdgen(String subUserId, String lastId) throws Exception{
|
| 454 | 419 |
|
... | ... | @@ -485,27 +450,6 @@ |
| 485 | 450 |
|
| 486 | 451 |
|
| 487 | 452 |
|
| 488 |
-private String formatSmsText(MjonMsgVO mjonMsgVO) {
|
|
| 489 |
- String smsTxt = mjonMsgVO.getSmsTxt(); |
|
| 490 |
- String reserveYn = safeGetString(mjonMsgVO.getReserveYn()); |
|
| 491 |
- String delayYn = safeGetString(mjonMsgVO.getDelayYn()); |
|
| 492 |
- String smishingYn = safeGetString(mjonMsgVO.getSmishingYn()); |
|
| 493 |
- |
|
| 494 |
- // 예약 문자와 스미싱 의심 처리 |
|
| 495 |
- if ("Y".equals(reserveYn)) {
|
|
| 496 |
- smsTxt = ("Y".equals(smishingYn) || "Y".equals(delayYn)) ? "[스미싱의심][예약]" + smsTxt : "[예약]" + smsTxt;
|
|
| 497 |
- } else if ("Y".equals(smishingYn) || "Y".equals(delayYn)) {
|
|
| 498 |
- smsTxt = "[스미싱의심]" + smsTxt; |
|
| 499 |
- } |
|
| 500 |
- |
|
| 501 |
- // 그림 문자 처리 |
|
| 502 |
- int fileCount = parseIntOrDefault(mjonMsgVO.getFileCnt(), 0); |
|
| 503 |
- if ("6".equals(mjonMsgVO.getMsgType()) && fileCount > 0 && StringUtils.isNullOrEmpty(smsTxt)) {
|
|
| 504 |
- smsTxt = "그림문자 " + smsTxt; |
|
| 505 |
- } |
|
| 506 |
- |
|
| 507 |
- return smsTxt; |
|
| 508 |
-} |
|
| 509 | 453 |
|
| 510 | 454 |
private String formatSandName(MjonMsgVO mjonMsgVO) {
|
| 511 | 455 |
String userId = mjonMsgVO.getUserId(); |
... | ... | @@ -542,7 +486,18 @@ |
| 542 | 486 |
|
| 543 | 487 |
|
| 544 | 488 |
|
| 545 |
- // 전체 로직 처리 (한 번에 모든 필요한 정보 반환) |
|
| 489 |
+ /** |
|
| 490 |
+ * @methodName : processUserAndCheckSms |
|
| 491 |
+ * @author : 이호영 |
|
| 492 |
+ * @date : 2025. 3. 25. |
|
| 493 |
+ * @description : SMS 알림 전체 로직 처리 (한 번에 모든 필요한 정보 반환) |
|
| 494 |
+ * @return : boolean |
|
| 495 |
+ * @param mjonMsgVO |
|
| 496 |
+ * @param userId |
|
| 497 |
+ * @return |
|
| 498 |
+ * @throws Exception |
|
| 499 |
+ * |
|
| 500 |
+ */ |
|
| 546 | 501 |
public boolean processUserAndCheckSms(MjonMsgVO mjonMsgVO, String userId) throws Exception {
|
| 547 | 502 |
UserManageVO userManageVO = getUserManageInfo(userId); |
| 548 | 503 |
|
... | ... | @@ -556,9 +511,39 @@ |
| 556 | 511 |
mjonMsgVO.setSmishingYn(smishingYn); // MjonMsgVO에 스미싱 정보 설정 |
| 557 | 512 |
|
| 558 | 513 |
// 스미싱 알림 처리 |
| 559 |
- return handleSmishingAlert(mjonMsgVO); // 알림 처리 결과 반환 |
|
| 514 |
+ return handleSmishingAlert(); // 알림 처리 결과 반환 |
|
| 560 | 515 |
} |
| 561 | 516 |
|
| 517 |
+ return false; // 알림 처리되지 않음 |
|
| 518 |
+ } |
|
| 519 |
+ |
|
| 520 |
+ /** |
|
| 521 |
+ * @methodName : processUserAndCheckAT |
|
| 522 |
+ * @author : 이호영 |
|
| 523 |
+ * @date : 2025. 3. 25. |
|
| 524 |
+ * @description : SMS 알림 전체 로직 처리 (한 번에 모든 필요한 정보 반환) |
|
| 525 |
+ * @return : boolean |
|
| 526 |
+ * @param mjonMsgVO |
|
| 527 |
+ * @param userId |
|
| 528 |
+ * @return |
|
| 529 |
+ * @throws Exception |
|
| 530 |
+ * |
|
| 531 |
+ */ |
|
| 532 |
+ public boolean processUserAndCheckAT(KakaoVO kakaoVO) throws Exception {
|
|
| 533 |
+ UserManageVO userManageVO = getUserManageInfo(kakaoVO.getUserId()); |
|
| 534 |
+ |
|
| 535 |
+ // 기본값 처리된 사용자 정보와 문자 상태 |
|
| 536 |
+ String adminSmsNoticeYn = userManageVO.getAdminSmsNoticeYn(); |
|
| 537 |
+ String atSmishingYn = userManageVO.getAtSmishingYn(); |
|
| 538 |
+ |
|
| 539 |
+ // 조건 체크 |
|
| 540 |
+ if ("Y".equals(adminSmsNoticeYn) || "Y".equals(atSmishingYn)) {
|
|
| 541 |
+ kakaoVO.setAtSmishingYn("Y"); // MjonMsgVO에 스미싱 정보 설정
|
|
| 542 |
+ |
|
| 543 |
+ // 스미싱 알림 처리 |
|
| 544 |
+ return handleSmishingAlert(); // 알림 처리 결과 반환 |
|
| 545 |
+ } |
|
| 546 |
+ |
|
| 562 | 547 |
return false; // 알림 처리되지 않음 |
| 563 | 548 |
} |
| 564 | 549 |
|
... | ... | @@ -572,18 +557,28 @@ |
| 572 | 557 |
} |
| 573 | 558 |
|
| 574 | 559 |
// 스미싱 알림 처리 |
| 575 |
- public boolean handleSmishingAlert(MjonMsgVO mjonMsgVO) throws Exception {
|
|
| 560 |
+ public boolean handleSmishingAlert() throws Exception {
|
|
| 561 |
+ /** |
|
| 562 |
+ * MJ_MBER_SETTING => 기본 시스템 알림 여부 |
|
| 563 |
+ * 슬랙 Y |
|
| 564 |
+ * 야간스미싱알림 Y |
|
| 565 |
+ * 등등 |
|
| 566 |
+ * |
|
| 567 |
+ */ |
|
| 576 | 568 |
JoinSettingVO joinSettingVO = egovSiteManagerService.selectAdminNotiDetail(); |
| 577 | 569 |
|
| 570 |
+/** @시스템 설정에 야간스미싱 알림 || 슬랙알림이 N이면 false*/ |
|
| 578 | 571 |
if (joinSettingVO == null || !"Y".equals(joinSettingVO.getHoliSmishingNoti()) || |
| 579 | 572 |
!"Y".equals(joinSettingVO.getSlackNoti())) {
|
| 580 | 573 |
return false; // 알림 조건 미충족 |
| 581 | 574 |
} |
| 582 | 575 |
|
| 583 |
- // 알림 조건 충족 시 추가 작업 |
|
| 576 |
+/** @MJ_SPAMPASS_ALARM : 현재 활성화된 알림 SELECT */ |
|
| 584 | 577 |
List<MsgAlarmSetVO> alarmList = getAlarmSettings(); |
| 578 |
+/** @MJ_HOLIDAY 시스템에 등록된 공휴일 설정 */ |
|
| 585 | 579 |
List<MsgHolidayVO> holidayList = getHolidayList(); |
| 586 |
- boolean isNotificationAllowed = new MjonHolidayApi().getHolidaySmishingPassStatus(alarmList, holidayList); |
|
| 580 |
+/** @MJ_HOLIDAY 시스템에 등록된 공휴일 설정 */ |
|
| 581 |
+ boolean isNotificationAllowed = new MjonHolidayApi().getHolidaySmishingPassStatus_advc(alarmList, holidayList); |
|
| 587 | 582 |
|
| 588 | 583 |
return !isNotificationAllowed; // 알림 발송 조건 미충족 |
| 589 | 584 |
} |
... | ... | @@ -699,9 +694,55 @@ |
| 699 | 694 |
|
| 700 | 695 |
|
| 701 | 696 |
|
| 697 |
+ public List<String> getNextCustomMsgCId (int cnt) throws FdlException {
|
|
| 698 |
+ |
|
| 699 |
+ List<String> idList = idgenMsgCId.getNextStringId(cnt); |
|
| 700 |
+ return idList; |
|
| 701 |
+ |
|
| 702 |
+ } |
|
| 702 | 703 |
|
| 703 | 704 |
|
| 704 |
- |
|
| 705 |
+ /** |
|
| 706 |
+ * @methodName : getSmsTxtBytes |
|
| 707 |
+ * @author : 이호영 |
|
| 708 |
+ * @date : 2024.09.23 |
|
| 709 |
+ * @description : sms 텍스트 바이트 계산 후 return; |
|
| 710 |
+ * @param smsTxt |
|
| 711 |
+ * @return |
|
| 712 |
+ * @throws UnsupportedEncodingException |
|
| 713 |
+ */ |
|
| 714 |
+ public static int getSmsTxtBytes(String smsTxt) throws UnsupportedEncodingException { //문자열 길이 체크 해주기
|
|
| 715 |
+ int smsBytes = 0; |
|
| 716 |
+ //문자 바이트 계산에 필요한 캐릭터 셋 : 한글 2Byte로 계산 |
|
| 717 |
+ String charset = "euc-kr"; |
|
| 718 |
+ if(org.apache.commons.lang3.StringUtils.isNotEmpty(smsTxt)) {
|
|
| 719 |
+ String smsCont = smsTxt.replace("\r\n", "\n");
|
|
| 720 |
+ smsBytes = smsCont.getBytes(charset).length; |
|
| 721 |
+ } |
|
| 722 |
+// log.info(" + smsBytes :: [{}]", smsBytes);
|
|
| 723 |
+ return smsBytes; |
|
| 724 |
+ } |
|
| 725 |
+ |
|
| 726 |
+ |
|
| 727 |
+ /** |
|
| 728 |
+ * @methodName : replaceTemplateVariables |
|
| 729 |
+ * @author : 이호영 |
|
| 730 |
+ * @date : 2025. 3. 12. |
|
| 731 |
+ * @description : 헬퍼 메서드: 템플릿 변수 치환 |
|
| 732 |
+ * @return : String |
|
| 733 |
+ * @param content |
|
| 734 |
+ * @param variables |
|
| 735 |
+ * @return |
|
| 736 |
+ */ |
|
| 737 |
+ public static String ATReplaceTemplateVariables(String content, Map<String, String> variables) {
|
|
| 738 |
+ String result = content; |
|
| 739 |
+ for (Map.Entry<String, String> entry : variables.entrySet()) {
|
|
| 740 |
+ String placeholder = entry.getKey(); |
|
| 741 |
+ String value = entry.getValue(); |
|
| 742 |
+ result = result.replace(placeholder, value); |
|
| 743 |
+ } |
|
| 744 |
+ return result; |
|
| 745 |
+ } |
|
| 705 | 746 |
|
| 706 | 747 |
|
| 707 | 748 |
|
--- src/main/java/itn/let/mjo/mjocommon/MjonHolidayApi.java
+++ src/main/java/itn/let/mjo/mjocommon/MjonHolidayApi.java
... | ... | @@ -231,4 +231,71 @@ |
| 231 | 231 |
return smishingAlarmPassSts; |
| 232 | 232 |
} |
| 233 | 233 |
|
| 234 |
+ /** |
|
| 235 |
+ * @methodName : getHolidaySmishingPassStatus_advc |
|
| 236 |
+ * @author : 이호영 |
|
| 237 |
+ * @date : 2025. 3. 19. |
|
| 238 |
+ * @description : getHolidaySmishingPassStatus 개선 버전 |
|
| 239 |
+ * @return : boolean |
|
| 240 |
+ * @param resultAlarmList |
|
| 241 |
+ * @param resultHolidayList |
|
| 242 |
+ * @return |
|
| 243 |
+ * @throws Exception |
|
| 244 |
+ * |
|
| 245 |
+ */ |
|
| 246 |
+ public boolean getHolidaySmishingPassStatus_advc(List<MsgAlarmSetVO> alarmList, List<MsgHolidayVO> holidayList) throws Exception{
|
|
| 247 |
+ |
|
| 248 |
+ Date now = new Date(); // 현재 시스템 시간 |
|
| 249 |
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); // 날짜-시간 포맷 (예: 2025-03-18 14:30)
|
|
| 250 |
+ |
|
| 251 |
+ // 현재 날짜와 요일 계산 |
|
| 252 |
+ Calendar cal = Calendar.getInstance(); |
|
| 253 |
+ cal.setTime(now); |
|
| 254 |
+ int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK); // 1(일요일) ~ 7(토요일) |
|
| 255 |
+ // 오늘 날짜를 "yyyy-MM-dd" 형식으로 포맷팅 (mj_holiday.HOLIDAY_DATE와 비교용) |
|
| 256 |
+ String today = String.format("%d-%02d-%02d",
|
|
| 257 |
+ cal.get(Calendar.YEAR), |
|
| 258 |
+ cal.get(Calendar.MONTH) + 1, // Calendar.MONTH는 0부터 시작하므로 +1 |
|
| 259 |
+ cal.get(Calendar.DATE)); |
|
| 260 |
+ |
|
| 261 |
+ // 공휴일 여부 확인 |
|
| 262 |
+ // mj_holiday 테이블의 HOLIDAY_DATE와 오늘 날짜가 일치하는지 체크 |
|
| 263 |
+ // HOLIDAY_DATE는 'yyyy-MM-dd' 형식으로 저장됨 (예: '2025-01-01') |
|
| 264 |
+ boolean isHoliday = holidayList.stream() |
|
| 265 |
+ .anyMatch(holiday -> today.equals(holiday.getHolidayDate())); |
|
| 266 |
+ |
|
| 267 |
+ // 알람 설정 순회 |
|
| 268 |
+ // alarmList는 MsgAlarmSetVO 객체의 리스트로, 알람 타입과 시작/종료 시간을 포함 |
|
| 269 |
+ for (MsgAlarmSetVO alarm : alarmList) {
|
|
| 270 |
+ String alarmType = alarm.getAlarmType(); // 알람 유형: 'W'(평일), 'E'(주말), 'H'(공휴일) |
|
| 271 |
+ // 오늘 날짜에 알람 시작/종료 시간을 붙여 Date 객체로 변환 |
|
| 272 |
+ Date start = sdf.parse(today + " " + alarm.getAlarmStart()); // 예: "2025-03-18 09:00" |
|
| 273 |
+ Date end = sdf.parse(today + " " + alarm.getAlarmEnd()); // 예: "2025-03-18 18:00" |
|
| 274 |
+ |
|
| 275 |
+ // 현재 시간이 알람 시작~종료 시간 범위 내에 있는지 확인 |
|
| 276 |
+ boolean isWithinTime = now.after(start) && now.before(end); |
|
| 277 |
+ if (!isWithinTime) continue; // 시간 범위 밖이면 다음 알람으로 |
|
| 278 |
+ |
|
| 279 |
+ // 평일 체크 (월~금: dayOfWeek 2~6) |
|
| 280 |
+ // alarmType 'W'는 평일에만 적용 |
|
| 281 |
+ if (dayOfWeek > 1 && dayOfWeek < 7 && alarmType.equals("W")) {
|
|
| 282 |
+ return true; // 평일이고, 시간이 맞고, 타입이 'W'면 스미싱 알람 통과 |
|
| 283 |
+ } |
|
| 284 |
+ // 주말 체크 (일:1, 토:7) |
|
| 285 |
+ // alarmType 'E'는 주말에만 적용 |
|
| 286 |
+ else if ((dayOfWeek == 1 || dayOfWeek == 7) && alarmType.equals("E")) {
|
|
| 287 |
+ return true; // 주말이고, 시간이 맞고, 타입이 'E'면 스미싱 알람 통과 |
|
| 288 |
+ } |
|
| 289 |
+ // 공휴일 체크 |
|
| 290 |
+ // alarmType 'H'는 mj_holiday에 등록된 공휴일에 적용 |
|
| 291 |
+ // HOLIDAY_TYPE(1:법정, 2:임시, 3:기타)과 관계없이 날짜만 확인 |
|
| 292 |
+ else if (isHoliday && alarmType.equals("H")) {
|
|
| 293 |
+ return true; // 공휴일이고, 시간이 맞고, 타입이 'H'면 스미싱 알람 통과 |
|
| 294 |
+ } |
|
| 295 |
+ } |
|
| 296 |
+ |
|
| 297 |
+ // 모든 조건에 부합하지 않으면 false 반환 (스미싱 알람 비활성화) |
|
| 298 |
+ return false; |
|
| 299 |
+ } |
|
| 300 |
+ |
|
| 234 | 301 |
} |
--- src/main/java/itn/let/mjo/msg/service/MjonMsgVO.java
+++ src/main/java/itn/let/mjo/msg/service/MjonMsgVO.java
... | ... | @@ -7,12 +7,18 @@ |
| 7 | 7 |
|
| 8 | 8 |
import itn.com.cmm.ComDefaultVO; |
| 9 | 9 |
import itn.com.cmm.MjonMsgSendVO; |
| 10 |
+import lombok.AllArgsConstructor; |
|
| 11 |
+import lombok.Builder; |
|
| 10 | 12 |
import lombok.Getter; |
| 13 |
+import lombok.NoArgsConstructor; |
|
| 11 | 14 |
import lombok.Setter; |
| 12 | 15 |
|
| 13 | 16 |
@JsonIgnoreProperties(ignoreUnknown = true) |
| 14 | 17 |
@Getter |
| 15 | 18 |
@Setter |
| 19 |
+@Builder |
|
| 20 |
+@NoArgsConstructor |
|
| 21 |
+@AllArgsConstructor |
|
| 16 | 22 |
public class MjonMsgVO extends ComDefaultVO{
|
| 17 | 23 |
|
| 18 | 24 |
private static final long serialVersionUID = 1L; |
... | ... | @@ -34,6 +40,7 @@ |
| 34 | 40 |
private String[] callToList; // '수신번호리스트', |
| 35 | 41 |
private String callFrom; // '발신번호 (하이픈 등의 문자를 제외한 12byte이하의 숫자로 입력한다.)', |
| 36 | 42 |
private String subject; // 'MMS용 메시지제목', |
| 43 |
+ private String subjectChkYn; // 'MMS용 메시지제목', |
|
| 37 | 44 |
private String smsTxt; // 'SMS용 메시지본문', |
| 38 | 45 |
private String smsTxtArea;//문자 작성 화면 본문 내용 |
| 39 | 46 |
private String msgType; // '메시지의 (4: SMS 전송, 5: URL 전송, 6: MMS전송, 7: BARCODE전송, 8: 카카오 알림톡 전송)', |
--- src/main/java/itn/let/mjo/msgdata/service/MjonMsgDataVO.java
+++ src/main/java/itn/let/mjo/msgdata/service/MjonMsgDataVO.java
... | ... | @@ -28,6 +28,7 @@ |
| 28 | 28 |
private List msgIdList; |
| 29 | 29 |
private List msgSeqList; |
| 30 | 30 |
private String subject; |
| 31 |
+ private String subjectChkYn; |
|
| 31 | 32 |
private String mmsSubject; |
| 32 | 33 |
private String smsTxt; |
| 33 | 34 |
private String smsLen; |
--- src/main/java/itn/let/mjo/msgdata/service/impl/MjonMsgDataServiceImpl.java
+++ src/main/java/itn/let/mjo/msgdata/service/impl/MjonMsgDataServiceImpl.java
... | ... | @@ -4061,7 +4061,7 @@ |
| 4061 | 4061 |
|
| 4062 | 4062 |
System.out.println("================================");
|
| 4063 | 4063 |
// 스팸 및 스미싱 의심이면 slack 알림 |
| 4064 |
- boolean isHolidayNotified = mjonCommon.handleSmishingAlert(mjonMsgVO); |
|
| 4064 |
+ boolean isHolidayNotified = mjonCommon.handleSmishingAlert(); |
|
| 4065 | 4065 |
|
| 4066 | 4066 |
|
| 4067 | 4067 |
// 스팸관련 키워드 select |
... | ... | @@ -4095,7 +4095,9 @@ |
| 4095 | 4095 |
MsgSendUtils.setPriceforVO(mjonMsgVO, mjonMsgSendVOList, sysJoinSetVO, mberManageVO); |
| 4096 | 4096 |
|
| 4097 | 4097 |
// msg_id 대량 생성 |
| 4098 |
- List<String> idList = idgenMsgCId.getNextStringId(mjonMsgSendVOList.size()); |
|
| 4098 |
+ |
|
| 4099 |
+// List<String> idList = idgenMsgCId.getNextStringId(mjonMsgSendVOList.size()); |
|
| 4100 |
+ List<String> idList = mjonCommon.getNextCustomMsgCId(mjonMsgSendVOList.size()); |
|
| 4099 | 4101 |
for (int i = 0; i < mjonMsgSendVOList.size(); i++) {
|
| 4100 | 4102 |
mjonMsgSendVOList.get(i).setMsgId(idList.get(i)); |
| 4101 | 4103 |
} |
... | ... | @@ -4136,7 +4138,6 @@ |
| 4136 | 4138 |
int instTotalCnt = 0; |
| 4137 | 4139 |
// Step 2: 그룹화 된 데이터를 그룹별로 insert 처리 |
| 4138 | 4140 |
for (Map.Entry<String, List<MjonMsgSendVO>> entry : priceGroupedMessages.entrySet()) {
|
| 4139 |
- String price = entry.getKey(); // 가격 (String) |
|
| 4140 | 4141 |
List<MjonMsgSendVO> groupedMsgList = entry.getValue(); // 해당 가격의 메시지 리스트 |
| 4141 | 4142 |
|
| 4142 | 4143 |
// msgGroupId 생성 |
... | ... | @@ -4150,6 +4151,7 @@ |
| 4150 | 4151 |
|
| 4151 | 4152 |
instTotalCnt += instCnt; |
| 4152 | 4153 |
this.insertMsgGroupDataTb_advc(instCnt, mjonMsgVO, groupedMsgList); |
| 4154 |
+ log.info(" :: group data insert :: ");
|
|
| 4153 | 4155 |
|
| 4154 | 4156 |
// 금액 및 포인트 insert |
| 4155 | 4157 |
priceAndPoint.insertCashAndPoint( |
... | ... | @@ -4171,7 +4173,7 @@ |
| 4171 | 4173 |
// 수신거부 목록 업데이트 |
| 4172 | 4174 |
// returnMap.put("resultSts", instCnt);
|
| 4173 | 4175 |
|
| 4174 |
- log.debug("가격 [{}]의 총 갯수: [{}]", price, groupedMsgList.size());
|
|
| 4176 |
+ log.debug("가격 [{}]의 총 갯수: [{}]", entry.getKey(), groupedMsgList.size());
|
|
| 4175 | 4177 |
|
| 4176 | 4178 |
} |
| 4177 | 4179 |
|
--- src/main/java/itn/let/mjo/msgdata/web/MjonMsgDataController.java
+++ src/main/java/itn/let/mjo/msgdata/web/MjonMsgDataController.java
... | ... | @@ -114,8 +114,9 @@ |
| 114 | 114 |
import itn.let.uss.umt.service.MberManageVO; |
| 115 | 115 |
import itn.let.uss.umt.service.UserManageVO; |
| 116 | 116 |
import itn.let.utl.sim.service.EgovClntInfo; |
| 117 |
+import lombok.extern.slf4j.Slf4j; |
|
| 117 | 118 |
|
| 118 |
- |
|
| 119 |
+@Slf4j |
|
| 119 | 120 |
@Controller |
| 120 | 121 |
public class MjonMsgDataController {
|
| 121 | 122 |
|
... | ... | @@ -816,6 +817,7 @@ |
| 816 | 817 |
|
| 817 | 818 |
mjonMsgDataVO.setMsgSeqList(tempList); |
| 818 | 819 |
|
| 820 |
+ log.info("===================================================");
|
|
| 819 | 821 |
List<MjonMsgVO> resultList = mjonMsgDataService.selectReSendMsgDataList(mjonMsgDataVO); |
| 820 | 822 |
|
| 821 | 823 |
//문자발송 이미지 처리 - 사용하지 않아서 주석처리함. |
... | ... | @@ -2088,16 +2090,8 @@ |
| 2088 | 2090 |
|
| 2089 | 2091 |
} |
| 2090 | 2092 |
|
| 2091 |
- long startTime = System.currentTimeMillis(); // 시작 시간 측정 |
|
| 2092 |
- |
|
| 2093 | 2093 |
List<AddrVO> resultAddrList = mjonMsgDataService.selectMsgAddrListAjax(addrVO); |
| 2094 | 2094 |
|
| 2095 |
- long endTime = System.currentTimeMillis(); // 종료 시간 측정 |
|
| 2096 |
- |
|
| 2097 |
- long elapsedTime = endTime - startTime; // 소요 시간 계산 |
|
| 2098 |
- System.out.println("소요 시간: " + elapsedTime + " 밀리초");
|
|
| 2099 |
- |
|
| 2100 |
- |
|
| 2101 | 2095 |
|
| 2102 | 2096 |
modelAndView.addObject("resultAddrList", resultAddrList);
|
| 2103 | 2097 |
modelAndView.addObject("result", "success");
|
... | ... | @@ -5961,7 +5955,6 @@ |
| 5961 | 5955 |
* 발송관리 엑셀다운로드 기능 |
| 5962 | 5956 |
* @param searchVO |
| 5963 | 5957 |
* @param model |
| 5964 |
- * @return "/web/mjon/msgsent/msgSentExcelDownLoadAjax.do" |
|
| 5965 | 5958 |
* @throws Exception |
| 5966 | 5959 |
*/ |
| 5967 | 5960 |
@RequestMapping(value= {"/web/mjon/msgdata/recieveCallToListExcelDownAjax.do"})
|
+++ src/main/java/itn/let/mjo/msgsent/service/MjonMsgDetailSentVO.java
... | ... | @@ -0,0 +1,64 @@ |
| 1 | +package itn.let.mjo.msgsent.service; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | + | |
| 5 | +import itn.let.cmm.vo.FileInfoVO; | |
| 6 | +import itn.let.uss.umt.service.UserDefaultVO; | |
| 7 | +import lombok.Getter; | |
| 8 | +import lombok.Setter; | |
| 9 | + | |
| 10 | +@Getter | |
| 11 | +@Setter | |
| 12 | +public class MjonMsgDetailSentVO extends UserDefaultVO{ | |
| 13 | + | |
| 14 | + private static final long serialVersionUID = 1L; | |
| 15 | + | |
| 16 | + | |
| 17 | + private String msgGroupId; | |
| 18 | + private String reqDate; | |
| 19 | + private String regDate; | |
| 20 | + private String msgGroupCnt; | |
| 21 | + private String reserveYn; | |
| 22 | + private String reserveCYn; | |
| 23 | + private String canceldate; | |
| 24 | + private String callFrom; | |
| 25 | + private String userId; | |
| 26 | + private String smsTxt; | |
| 27 | + private String subject; | |
| 28 | + private String subjectChkYn; | |
| 29 | + private String msgType; | |
| 30 | + private String fileCnt; | |
| 31 | + private String msgKind; | |
| 32 | + private String eachPrice; | |
| 33 | + private String sentDate; | |
| 34 | + private String filePath1; | |
| 35 | + private String filePath2; | |
| 36 | + private String filePath3; | |
| 37 | + | |
| 38 | + private String callTo; | |
| 39 | + private String statusTxt; | |
| 40 | + private String addrNm; | |
| 41 | + | |
| 42 | + | |
| 43 | + private String resultSValue; | |
| 44 | + private String resultFValue; | |
| 45 | + private String resultWValue; | |
| 46 | + | |
| 47 | + private String successPct; | |
| 48 | + private String failedPct; | |
| 49 | + private String waitingPct; | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + private String statusCd; // 진행상태 코드 | |
| 56 | + private String divideYN; | |
| 57 | + private String divideText; | |
| 58 | + private int diffMin; | |
| 59 | + private String totPrice; | |
| 60 | + | |
| 61 | + | |
| 62 | + // FileInfo 리스트 필드 추가 | |
| 63 | + private List<FileInfoVO> fileInfos; | |
| 64 | +} |
+++ src/main/java/itn/let/mjo/msgsent/service/MjonMsgSWFDTO.java
... | ... | @@ -0,0 +1,33 @@ |
| 1 | +package itn.let.mjo.msgsent.service; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import lombok.Getter; | |
| 6 | +import lombok.Setter; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * | |
| 10 | + * @author : 이호영 | |
| 11 | + * @fileName : MjonMsgSWFDTO.java | |
| 12 | + * @date : 2025.01.16 | |
| 13 | + * @description : 그룹ID로 성공 실패 대기 건수를 구해서 전달해주는 DTO | |
| 14 | + * =========================================================== | |
| 15 | + * DATE AUTHOR NOTE | |
| 16 | + * ----------------------------------------------------------- * | |
| 17 | + * 2025.01.16 이호영 최초 생성 | |
| 18 | + * | |
| 19 | + * | |
| 20 | + * | |
| 21 | + */ | |
| 22 | +@Getter | |
| 23 | +@Setter | |
| 24 | +public class MjonMsgSWFDTO implements Serializable { | |
| 25 | + | |
| 26 | + private static final long serialVersionUID = 1L; // 선언 | |
| 27 | + | |
| 28 | + private int resultSValue; // 성공건수 | |
| 29 | + private int resultFValue; // 실패건수 | |
| 30 | + private int resultWValue; // 대기건수 | |
| 31 | + private String divideYN; // 분할여부 | |
| 32 | + | |
| 33 | +} |
--- src/main/java/itn/let/mjo/msgsent/service/MjonMsgSentService.java
+++ src/main/java/itn/let/mjo/msgsent/service/MjonMsgSentService.java
... | ... | @@ -1,6 +1,10 @@ |
| 1 | 1 |
package itn.let.mjo.msgsent.service; |
| 2 | 2 |
|
| 3 |
+import java.io.IOException; |
|
| 3 | 4 |
import java.util.List; |
| 5 |
+import java.util.Map; |
|
| 6 |
+ |
|
| 7 |
+import javax.servlet.http.HttpServletResponse; |
|
| 4 | 8 |
|
| 5 | 9 |
import itn.let.fax.addr.service.FaxAddrGroupVO; |
| 6 | 10 |
import itn.let.mjo.addr.service.AddrGroupVO; |
... | ... | @@ -15,6 +19,8 @@ |
| 15 | 19 |
|
| 16 | 20 |
//발송 관리 전체 발송 리스트 불러오기 |
| 17 | 21 |
public List<MjonMsgSentVO> selectAllMsgSentList(MjonMsgSentVO mjonMsgSentVO) throws Exception; |
| 22 |
+ |
|
| 23 |
+ public Map<String, Object> selectAllMsgSentList_advc(MjonMsgSentVO mjonMsgSentVO) throws Exception; |
|
| 18 | 24 |
|
| 19 | 25 |
//발송 관리 전체 발송 리스트 불러오기 => 주소록 조인 제거버전 |
| 20 | 26 |
public List<MjonMsgSentVO> selectAllMsgSentSimpleList(MjonMsgSentVO mjonMsgSentVO) throws Exception; |
... | ... | @@ -54,5 +60,14 @@ |
| 54 | 60 |
|
| 55 | 61 |
//첨부파일 정보 불러오기 |
| 56 | 62 |
public MjonMsgSentVO selectFileInfo(String streFileId) throws Exception; |
| 63 |
+ |
|
| 64 |
+ public int countAllMsgSentList(MjonMsgSentVO mjonMsgSentVO); |
|
| 65 |
+ |
|
| 66 |
+ public Map<String, Object> selectAllMsgSentDetailView(MjonMsgDetailSentVO mjonMsgDetailSentVO) throws Exception; |
|
| 67 |
+ |
|
| 68 |
+ public List<MjonMsgDetailSentVO> findByMsgDetailListAjax(MjonMsgDetailSentVO mjonMsgDetailSentVO); |
|
| 69 |
+ |
|
| 70 |
+ public void msgSentExcelDownLoad(MjonMsgSentVO mjonMsgSentVO, HttpServletResponse response) throws IOException, Exception; |
|
| 71 |
+ |
|
| 57 | 72 |
|
| 58 | 73 |
} |
--- src/main/java/itn/let/mjo/msgsent/service/MjonMsgSentVO.java
+++ src/main/java/itn/let/mjo/msgsent/service/MjonMsgSentVO.java
... | ... | @@ -4,7 +4,17 @@ |
| 4 | 4 |
import java.util.List; |
| 5 | 5 |
|
| 6 | 6 |
import itn.let.uss.umt.service.UserDefaultVO; |
| 7 |
+import lombok.AllArgsConstructor; |
|
| 8 |
+import lombok.Builder; |
|
| 9 |
+import lombok.Getter; |
|
| 10 |
+import lombok.NoArgsConstructor; |
|
| 11 |
+import lombok.Setter; |
|
| 7 | 12 |
|
| 13 |
+@Getter |
|
| 14 |
+@Setter |
|
| 15 |
+@Builder |
|
| 16 |
+@NoArgsConstructor |
|
| 17 |
+@AllArgsConstructor |
|
| 8 | 18 |
public class MjonMsgSentVO extends UserDefaultVO{
|
| 9 | 19 |
|
| 10 | 20 |
private static final long serialVersionUID = 1L; |
... | ... | @@ -16,8 +26,9 @@ |
| 16 | 26 |
private List msgGroupIdList; //문자 그룹아이디 리스트 |
| 17 | 27 |
private String smsTxt; //문자 내용 |
| 18 | 28 |
private String subject; //문자 제목 |
| 19 |
- private Date regdate; //문자 등록일자 |
|
| 20 |
- private Date reqdate; //문자 예약 발송 일자 |
|
| 29 |
+ private String subjectChkYn; //문자 제목 |
|
| 30 |
+ private String regDate; //문자 등록일자 |
|
| 31 |
+ private String reqDate; //문자 예약 발송 일자 |
|
| 21 | 32 |
private String callFrom; //발신번호 |
| 22 | 33 |
private String callTo; //수신자 번호 |
| 23 | 34 |
private List callToList; //수신자 번호 리스트 |
... | ... | @@ -86,399 +97,16 @@ |
| 86 | 97 |
private String successCount; |
| 87 | 98 |
|
| 88 | 99 |
private String resultSValue; |
| 100 |
+ private String resultFValue; |
|
| 101 |
+ private String resultWValue; |
|
| 89 | 102 |
private String resultWFValue; |
| 90 | 103 |
|
| 91 |
- public String getSuccessCount() {
|
|
| 92 |
- return successCount; |
|
| 93 |
- } |
|
| 94 |
- public void setSuccessCount(String successCount) {
|
|
| 95 |
- this.successCount = successCount; |
|
| 96 |
- } |
|
| 97 |
- public String getMsgSentType() {
|
|
| 98 |
- return msgSentType; |
|
| 99 |
- } |
|
| 100 |
- public void setMsgSentType(String msgSentType) {
|
|
| 101 |
- this.msgSentType = msgSentType; |
|
| 102 |
- } |
|
| 103 |
- public String getCallFromComma() {
|
|
| 104 |
- return callFromComma; |
|
| 105 |
- } |
|
| 106 |
- public void setCallFromComma(String callFromComma) {
|
|
| 107 |
- this.callFromComma = callFromComma; |
|
| 108 |
- } |
|
| 109 |
- public String getCallToComma() {
|
|
| 110 |
- return callToComma; |
|
| 111 |
- } |
|
| 112 |
- public void setCallToComma(String callToComma) {
|
|
| 113 |
- this.callToComma = callToComma; |
|
| 114 |
- } |
|
| 104 |
+ private String divideYN; // 분할여부 |
|
| 115 | 105 |
|
| 116 |
- public String getAtchFiles() {
|
|
| 117 |
- return atchFiles; |
|
| 118 |
- } |
|
| 119 |
- public void setAtchFiles(String atchFiles) {
|
|
| 120 |
- this.atchFiles = atchFiles; |
|
| 121 |
- } |
|
| 106 |
+ private String statusCd; // 진행상태 코드 |
|
| 122 | 107 |
|
| 123 |
- public String getMsgId() {
|
|
| 124 |
- return msgId; |
|
| 125 |
- } |
|
| 126 |
- public void setMsgId(String msgId) {
|
|
| 127 |
- this.msgId = msgId; |
|
| 128 |
- } |
|
| 129 |
- public int getSuccessCnt() {
|
|
| 130 |
- return successCnt; |
|
| 131 |
- } |
|
| 132 |
- public void setSuccessCnt(int successCnt) {
|
|
| 133 |
- this.successCnt = successCnt; |
|
| 134 |
- } |
|
| 135 |
- public String getMsgTypeName() {
|
|
| 136 |
- return msgTypeName; |
|
| 137 |
- } |
|
| 138 |
- public void setMsgTypeName(String msgTypeName) {
|
|
| 139 |
- this.msgTypeName = msgTypeName; |
|
| 140 |
- } |
|
| 141 |
- public int getOrderByCode() {
|
|
| 142 |
- return orderByCode; |
|
| 143 |
- } |
|
| 144 |
- public void setOrderByCode(int orderByCode) {
|
|
| 145 |
- this.orderByCode = orderByCode; |
|
| 146 |
- } |
|
| 147 |
- public String getAtchFileId() {
|
|
| 148 |
- return atchFileId; |
|
| 149 |
- } |
|
| 150 |
- public void setAtchFileId(String atchFileId) {
|
|
| 151 |
- this.atchFileId = atchFileId; |
|
| 152 |
- } |
|
| 153 |
- public String getFileSn() {
|
|
| 154 |
- return fileSn; |
|
| 155 |
- } |
|
| 156 |
- public void setFileSn(String fileSn) {
|
|
| 157 |
- this.fileSn = fileSn; |
|
| 158 |
- } |
|
| 159 |
- public String getUserId() {
|
|
| 160 |
- return userId; |
|
| 161 |
- } |
|
| 162 |
- public void setUserId(String userId) {
|
|
| 163 |
- this.userId = userId; |
|
| 164 |
- } |
|
| 165 |
- public String getAddrNm() {
|
|
| 166 |
- return addrNm; |
|
| 167 |
- } |
|
| 168 |
- public void setAddrNm(String addrNm) {
|
|
| 169 |
- this.addrNm = addrNm; |
|
| 170 |
- } |
|
| 171 |
- public String getMsgSeq() {
|
|
| 172 |
- return msgSeq; |
|
| 173 |
- } |
|
| 174 |
- public void setMsgSeq(String msgSeq) {
|
|
| 175 |
- this.msgSeq = msgSeq; |
|
| 176 |
- } |
|
| 177 |
- public String getMsgGroupId() {
|
|
| 178 |
- return msgGroupId; |
|
| 179 |
- } |
|
| 180 |
- public void setMsgGroupId(String msgGroupId) {
|
|
| 181 |
- this.msgGroupId = msgGroupId; |
|
| 182 |
- } |
|
| 183 |
- public List getMsgGroupIdList() {
|
|
| 184 |
- return msgGroupIdList; |
|
| 185 |
- } |
|
| 186 |
- public void setMsgGroupIdList(List msgGroupIdList) {
|
|
| 187 |
- this.msgGroupIdList = msgGroupIdList; |
|
| 188 |
- } |
|
| 189 |
- public String getSmsTxt() {
|
|
| 190 |
- return smsTxt; |
|
| 191 |
- } |
|
| 192 |
- public void setSmsTxt(String smsTxt) {
|
|
| 193 |
- this.smsTxt = smsTxt; |
|
| 194 |
- } |
|
| 195 |
- public String getSubject() {
|
|
| 196 |
- return subject; |
|
| 197 |
- } |
|
| 198 |
- public void setSubject(String subject) {
|
|
| 199 |
- this.subject = subject; |
|
| 200 |
- } |
|
| 201 |
- public Date getRegdate() {
|
|
| 202 |
- return regdate; |
|
| 203 |
- } |
|
| 204 |
- public void setRegdate(Date regdate) {
|
|
| 205 |
- this.regdate = regdate; |
|
| 206 |
- } |
|
| 207 |
- public Date getReqdate() {
|
|
| 208 |
- return reqdate; |
|
| 209 |
- } |
|
| 210 |
- public void setReqdate(Date reqdate) {
|
|
| 211 |
- this.reqdate = reqdate; |
|
| 212 |
- } |
|
| 213 |
- public String getCallFrom() {
|
|
| 214 |
- return callFrom; |
|
| 215 |
- } |
|
| 216 |
- public void setCallFrom(String callFrom) {
|
|
| 217 |
- this.callFrom = callFrom; |
|
| 218 |
- } |
|
| 219 |
- public String getCallTo() {
|
|
| 220 |
- return callTo; |
|
| 221 |
- } |
|
| 222 |
- public void setCallTo(String callTo) {
|
|
| 223 |
- this.callTo = callTo; |
|
| 224 |
- } |
|
| 225 |
- public List getCallToList() {
|
|
| 226 |
- return callToList; |
|
| 227 |
- } |
|
| 228 |
- public void setCallToList(List callToList) {
|
|
| 229 |
- this.callToList = callToList; |
|
| 230 |
- } |
|
| 231 |
- public String getTotPrice() {
|
|
| 232 |
- return totPrice; |
|
| 233 |
- } |
|
| 234 |
- public void setTotPrice(String totPrice) {
|
|
| 235 |
- this.totPrice = totPrice; |
|
| 236 |
- } |
|
| 237 |
- public String getEachPrice() {
|
|
| 238 |
- return eachPrice; |
|
| 239 |
- } |
|
| 240 |
- public void setEachPrice(String eachPrice) {
|
|
| 241 |
- this.eachPrice = eachPrice; |
|
| 242 |
- } |
|
| 243 |
- public String getDelFlag() {
|
|
| 244 |
- return delFlag; |
|
| 245 |
- } |
|
| 246 |
- public void setDelFlag(String delFlag) {
|
|
| 247 |
- this.delFlag = delFlag; |
|
| 248 |
- } |
|
| 249 |
- public String getTotMsgPrice() {
|
|
| 250 |
- return totMsgPrice; |
|
| 251 |
- } |
|
| 252 |
- public void setTotMsgPrice(String totMsgPrice) {
|
|
| 253 |
- this.totMsgPrice = totMsgPrice; |
|
| 254 |
- } |
|
| 255 |
- public String getRsltCode() {
|
|
| 256 |
- return rsltCode; |
|
| 257 |
- } |
|
| 258 |
- public void setRsltCode(String rsltCode) {
|
|
| 259 |
- this.rsltCode = rsltCode; |
|
| 260 |
- } |
|
| 261 |
- public String getRsltCode2() {
|
|
| 262 |
- return rsltCode2; |
|
| 263 |
- } |
|
| 264 |
- public void setRsltCode2(String rsltCode2) {
|
|
| 265 |
- this.rsltCode2 = rsltCode2; |
|
| 266 |
- } |
|
| 267 |
- public String getMsgType() {
|
|
| 268 |
- return msgType; |
|
| 269 |
- } |
|
| 270 |
- public void setMsgType(String msgType) {
|
|
| 271 |
- this.msgType = msgType; |
|
| 272 |
- } |
|
| 273 |
- public String getMsgGroupCnt() {
|
|
| 274 |
- return msgGroupCnt; |
|
| 275 |
- } |
|
| 276 |
- public void setMsgGroupCnt(String msgGroupCnt) {
|
|
| 277 |
- this.msgGroupCnt = msgGroupCnt; |
|
| 278 |
- } |
|
| 279 |
- public String getFileCnt() {
|
|
| 280 |
- return fileCnt; |
|
| 281 |
- } |
|
| 282 |
- public void setFileCnt(String fileCnt) {
|
|
| 283 |
- this.fileCnt = fileCnt; |
|
| 284 |
- } |
|
| 285 |
- public String getTotMsgCnt() {
|
|
| 286 |
- return totMsgCnt; |
|
| 287 |
- } |
|
| 288 |
- public void setTotMsgCnt(String totMsgCnt) {
|
|
| 289 |
- this.totMsgCnt = totMsgCnt; |
|
| 290 |
- } |
|
| 291 |
- public String getCurState() {
|
|
| 292 |
- return curState; |
|
| 293 |
- } |
|
| 294 |
- public void setCurState(String curState) {
|
|
| 295 |
- this.curState = curState; |
|
| 296 |
- } |
|
| 297 |
- public String getReserveYn() {
|
|
| 298 |
- return reserveYn; |
|
| 299 |
- } |
|
| 300 |
- public void setReserveYn(String reserveYn) {
|
|
| 301 |
- this.reserveYn = reserveYn; |
|
| 302 |
- } |
|
| 303 |
- public String getReserveCYn() {
|
|
| 304 |
- return reserveCYn; |
|
| 305 |
- } |
|
| 306 |
- public void setReserveCYn(String reserveCYn) {
|
|
| 307 |
- this.reserveCYn = reserveCYn; |
|
| 308 |
- } |
|
| 309 |
- public String getFilePath1() {
|
|
| 310 |
- return filePath1; |
|
| 311 |
- } |
|
| 312 |
- public void setFilePath1(String filePath1) {
|
|
| 313 |
- this.filePath1 = filePath1; |
|
| 314 |
- } |
|
| 315 |
- public String getFilePath2() {
|
|
| 316 |
- return filePath2; |
|
| 317 |
- } |
|
| 318 |
- public void setFilePath2(String filePath2) {
|
|
| 319 |
- this.filePath2 = filePath2; |
|
| 320 |
- } |
|
| 321 |
- public String getFilePath3() {
|
|
| 322 |
- return filePath3; |
|
| 323 |
- } |
|
| 324 |
- public void setFilePath3(String filePath3) {
|
|
| 325 |
- this.filePath3 = filePath3; |
|
| 326 |
- } |
|
| 327 |
- public Date getSentDate() {
|
|
| 328 |
- return sentDate; |
|
| 329 |
- } |
|
| 330 |
- public void setSentDate(Date sentDate) {
|
|
| 331 |
- this.sentDate = sentDate; |
|
| 332 |
- } |
|
| 333 |
- public String getAgentCode() {
|
|
| 334 |
- return agentCode; |
|
| 335 |
- } |
|
| 336 |
- public void setAgentCode(String agentCode) {
|
|
| 337 |
- this.agentCode = agentCode; |
|
| 338 |
- } |
|
| 339 |
- public String getUserData() {
|
|
| 340 |
- return userData; |
|
| 341 |
- } |
|
| 342 |
- public void setUserData(String userData) {
|
|
| 343 |
- this.userData = userData; |
|
| 344 |
- } |
|
| 345 |
- public List getUserDataList() {
|
|
| 346 |
- return userDataList; |
|
| 347 |
- } |
|
| 348 |
- public void setUserDataList(List userDataList) {
|
|
| 349 |
- this.userDataList = userDataList; |
|
| 350 |
- } |
|
| 351 |
- public Date getCancelDate() {
|
|
| 352 |
- return cancelDate; |
|
| 353 |
- } |
|
| 354 |
- public void setCancelDate(Date cancelDate) {
|
|
| 355 |
- this.cancelDate = cancelDate; |
|
| 356 |
- } |
|
| 357 |
- public String getStartDate() {
|
|
| 358 |
- return startDate; |
|
| 359 |
- } |
|
| 360 |
- public void setStartDate(String startDate) {
|
|
| 361 |
- this.startDate = startDate; |
|
| 362 |
- } |
|
| 363 |
- public String getEndDate() {
|
|
| 364 |
- return endDate; |
|
| 365 |
- } |
|
| 366 |
- public void setEndDate(String endDate) {
|
|
| 367 |
- this.endDate = endDate; |
|
| 368 |
- } |
|
| 369 |
- public String getSearchMsgType() {
|
|
| 370 |
- return searchMsgType; |
|
| 371 |
- } |
|
| 372 |
- public void setSearchMsgType(String searchMsgType) {
|
|
| 373 |
- this.searchMsgType = searchMsgType; |
|
| 374 |
- } |
|
| 375 |
- public String getTabType() {
|
|
| 376 |
- return tabType; |
|
| 377 |
- } |
|
| 378 |
- public void setTabType(String tabType) {
|
|
| 379 |
- this.tabType = tabType; |
|
| 380 |
- } |
|
| 381 |
- public String getStateType() {
|
|
| 382 |
- return stateType; |
|
| 383 |
- } |
|
| 384 |
- public void setStateType(String stateType) {
|
|
| 385 |
- this.stateType = stateType; |
|
| 386 |
- } |
|
| 387 |
- public String getListType() {
|
|
| 388 |
- return listType; |
|
| 389 |
- } |
|
| 390 |
- public void setListType(String listType) {
|
|
| 391 |
- this.listType = listType; |
|
| 392 |
- } |
|
| 393 |
- public String getResultType() {
|
|
| 394 |
- return resultType; |
|
| 395 |
- } |
|
| 396 |
- public void setResultType(String resultType) {
|
|
| 397 |
- this.resultType = resultType; |
|
| 398 |
- } |
|
| 399 |
- public String getMsgResultCnt() {
|
|
| 400 |
- return msgResultCnt; |
|
| 401 |
- } |
|
| 402 |
- public void setMsgResultCnt(String msgResultCnt) {
|
|
| 403 |
- this.msgResultCnt = msgResultCnt; |
|
| 404 |
- } |
|
| 405 |
- public String getMsgResultSts() {
|
|
| 406 |
- return msgResultSts; |
|
| 407 |
- } |
|
| 408 |
- public void setMsgResultSts(String msgResultSts) {
|
|
| 409 |
- this.msgResultSts = msgResultSts; |
|
| 410 |
- } |
|
| 411 |
- public String getAddrGrpNm() {
|
|
| 412 |
- return addrGrpNm; |
|
| 413 |
- } |
|
| 414 |
- public void setAddrGrpNm(String addrGrpNm) {
|
|
| 415 |
- this.addrGrpNm = addrGrpNm; |
|
| 416 |
- } |
|
| 417 |
- public int getOrderByrsltCode() {
|
|
| 418 |
- return orderByrsltCode; |
|
| 419 |
- } |
|
| 420 |
- public void setOrderByrsltCode(int orderByrsltCode) {
|
|
| 421 |
- this.orderByrsltCode = orderByrsltCode; |
|
| 422 |
- } |
|
| 423 |
- public String getMsgResult() {
|
|
| 424 |
- return msgResult; |
|
| 425 |
- } |
|
| 426 |
- public void setMsgResult(String msgResult) {
|
|
| 427 |
- this.msgResult = msgResult; |
|
| 428 |
- } |
|
| 429 |
- public String getNtceBgnde() {
|
|
| 430 |
- return ntceBgnde; |
|
| 431 |
- } |
|
| 432 |
- public void setNtceBgnde(String ntceBgnde) {
|
|
| 433 |
- this.ntceBgnde = ntceBgnde; |
|
| 434 |
- } |
|
| 435 |
- public String getNtceEndde() {
|
|
| 436 |
- return ntceEndde; |
|
| 437 |
- } |
|
| 438 |
- public void setNtceEndde(String ntceEndde) {
|
|
| 439 |
- this.ntceEndde = ntceEndde; |
|
| 440 |
- } |
|
| 441 |
- public String getMsgKind() {
|
|
| 442 |
- return msgKind; |
|
| 443 |
- } |
|
| 444 |
- public void setMsgKind(String msgKind) {
|
|
| 445 |
- this.msgKind = msgKind; |
|
| 446 |
- } |
|
| 447 |
- public String getDelayYn() {
|
|
| 448 |
- return delayYn; |
|
| 449 |
- } |
|
| 450 |
- public void setDelayYn(String delayYn) {
|
|
| 451 |
- this.delayYn = delayYn; |
|
| 452 |
- } |
|
| 453 |
- public String getDelayCompleteYn() {
|
|
| 454 |
- return delayCompleteYn; |
|
| 455 |
- } |
|
| 456 |
- public void setDelayCompleteYn(String delayCompleteYn) {
|
|
| 457 |
- this.delayCompleteYn = delayCompleteYn; |
|
| 458 |
- } |
|
| 459 |
- public String getSendKind() {
|
|
| 460 |
- return sendKind; |
|
| 461 |
- } |
|
| 462 |
- public void setSendKind(String sendKind) {
|
|
| 463 |
- this.sendKind = sendKind; |
|
| 464 |
- } |
|
| 465 |
- public String getResultSValue() {
|
|
| 466 |
- return resultSValue; |
|
| 467 |
- } |
|
| 468 |
- public void setResultSValue(String resultSValue) {
|
|
| 469 |
- this.resultSValue = resultSValue; |
|
| 470 |
- } |
|
| 471 |
- public String getResultWFValue() {
|
|
| 472 |
- return resultWFValue; |
|
| 473 |
- } |
|
| 474 |
- public void setResultWFValue(String resultWFValue) {
|
|
| 475 |
- this.resultWFValue = resultWFValue; |
|
| 476 |
- } |
|
| 477 |
- public Date getDelayOrgTime() {
|
|
| 478 |
- return delayOrgTime; |
|
| 479 |
- } |
|
| 480 |
- public void setDelayOrgTime(Date delayOrgTime) {
|
|
| 481 |
- this.delayOrgTime = delayOrgTime; |
|
| 482 |
- } |
|
| 108 |
+ // 결과 리스트 select 할 떄 |
|
| 109 |
+ // TIMESTAMPDIFF(minute, DATE_FORMAT(B.REQ_DATE, '%Y-%m-%d %T'), DATE_FORMAT(NOW(), '%Y-%m-%d %T')) as diffMin |
|
| 110 |
+ private int diffMin; |
|
| 483 | 111 |
|
| 484 | 112 |
} |
--- src/main/java/itn/let/mjo/msgsent/service/impl/MjonMsgSentDAO.java
+++ src/main/java/itn/let/mjo/msgsent/service/impl/MjonMsgSentDAO.java
... | ... | @@ -9,6 +9,8 @@ |
| 9 | 9 |
import itn.let.fax.addr.service.FaxAddrGroupVO; |
| 10 | 10 |
import itn.let.mjo.addr.service.AddrGroupVO; |
| 11 | 11 |
import itn.let.mjo.block.service.MjonBlockVO; |
| 12 |
+import itn.let.mjo.msgsent.service.MjonMsgDetailSentVO; |
|
| 13 |
+import itn.let.mjo.msgsent.service.MjonMsgSWFDTO; |
|
| 12 | 14 |
import itn.let.mjo.msgsent.service.MjonMsgSentVO; |
| 13 | 15 |
|
| 14 | 16 |
@Repository("MjonMsgSentDAO")
|
... | ... | @@ -54,6 +56,13 @@ |
| 54 | 56 |
public List<MjonMsgSentVO> selectAllMsgSentList(MjonMsgSentVO mjonMsgSentVO) throws Exception{
|
| 55 | 57 |
|
| 56 | 58 |
return (List<MjonMsgSentVO>) list("MjonMsgSentDAO.selectAllMsgSentList",mjonMsgSentVO);
|
| 59 |
+ } |
|
| 60 |
+ |
|
| 61 |
+ //발송 관리 전체 발송 리스트 불러오기 |
|
| 62 |
+ @SuppressWarnings("unchecked")
|
|
| 63 |
+ public List<MjonMsgSentVO> selectAllMsgSentList_advc(MjonMsgSentVO mjonMsgSentVO) throws Exception{
|
|
| 64 |
+ |
|
| 65 |
+ return (List<MjonMsgSentVO>) list("MjonMsgSentDAO.selectAllMsgSentList_advc",mjonMsgSentVO);
|
|
| 57 | 66 |
} |
| 58 | 67 |
|
| 59 | 68 |
//발송 관리 전체 발송 리스트 불러오기 => 주소록 조인 제거버전 |
... | ... | @@ -158,5 +167,28 @@ |
| 158 | 167 |
public MjonMsgSentVO selectFileInfo(String streFileId) throws Exception{
|
| 159 | 168 |
return (MjonMsgSentVO) select("MjonMsgSentDAO.selectFileInfo", streFileId);
|
| 160 | 169 |
} |
| 170 |
+ |
|
| 171 |
+ public int countAllMsgSentList(MjonMsgSentVO mjonMsgSentVO) {
|
|
| 172 |
+ return (Integer)select("MjonMsgSentDAO.countAllMsgSentList", mjonMsgSentVO);
|
|
| 173 |
+ } |
|
| 174 |
+ |
|
| 175 |
+ public MjonMsgSWFDTO findBySWF(String msgGroupId) {
|
|
| 176 |
+ |
|
| 177 |
+ return (MjonMsgSWFDTO) select("MjonMsgSentDAO.findBySWF", msgGroupId);
|
|
| 178 |
+ } |
|
| 179 |
+ |
|
| 180 |
+ public MjonMsgDetailSentVO selectAllMsgSentDetailView(MjonMsgDetailSentVO mjonMsgDetailSentVO) {
|
|
| 181 |
+ // TODO Auto-generated method stub |
|
| 182 |
+ return (MjonMsgDetailSentVO) select("MjonMsgSentDAO.selectAllMsgSentDetailView", mjonMsgDetailSentVO);
|
|
| 183 |
+ } |
|
| 184 |
+ |
|
| 185 |
+ public List<MjonMsgDetailSentVO> findByMsgDetailListAjax(MjonMsgDetailSentVO mjonMsgDetailSentVO) {
|
|
| 186 |
+ |
|
| 187 |
+ return (List<MjonMsgDetailSentVO>) list("MjonMsgSentDAO.findByMsgDetailListAjax", mjonMsgDetailSentVO);
|
|
| 188 |
+ } |
|
| 189 |
+ |
|
| 190 |
+ public List<String> findByReqDateWhereMsgGroupId(String msgGroupId) {
|
|
| 191 |
+ return (List<String>) list("MjonMsgSentDAO.findByReqDateWhereMsgGroupId", msgGroupId);
|
|
| 192 |
+ } |
|
| 161 | 193 |
|
| 162 | 194 |
} |
--- src/main/java/itn/let/mjo/msgsent/service/impl/MjonMsgSentServiceImpl.java
+++ src/main/java/itn/let/mjo/msgsent/service/impl/MjonMsgSentServiceImpl.java
... | ... | @@ -1,20 +1,51 @@ |
| 1 | 1 |
package itn.let.mjo.msgsent.service.impl; |
| 2 | 2 |
|
| 3 |
+import java.io.OutputStream; |
|
| 4 |
+import java.math.BigDecimal; |
|
| 5 |
+import java.math.RoundingMode; |
|
| 6 |
+import java.text.SimpleDateFormat; |
|
| 7 |
+import java.time.LocalDateTime; |
|
| 8 |
+import java.time.format.DateTimeFormatter; |
|
| 3 | 9 |
import java.util.ArrayList; |
| 10 |
+import java.util.Date; |
|
| 11 |
+import java.util.HashMap; |
|
| 12 |
+import java.util.LinkedHashMap; |
|
| 4 | 13 |
import java.util.List; |
| 14 |
+import java.util.Locale; |
|
| 15 |
+import java.util.Map; |
|
| 5 | 16 |
|
| 6 | 17 |
import javax.annotation.Resource; |
| 18 |
+import javax.servlet.http.HttpServletResponse; |
|
| 7 | 19 |
|
| 20 |
+import org.apache.commons.io.FilenameUtils; |
|
| 21 |
+import org.apache.commons.lang3.StringUtils; |
|
| 22 |
+import org.apache.poi.ss.usermodel.BorderStyle; |
|
| 23 |
+import org.apache.poi.ss.usermodel.Cell; |
|
| 24 |
+import org.apache.poi.ss.usermodel.CellStyle; |
|
| 25 |
+import org.apache.poi.ss.usermodel.Font; |
|
| 26 |
+import org.apache.poi.ss.usermodel.HorizontalAlignment; |
|
| 27 |
+import org.apache.poi.ss.usermodel.IndexedColors; |
|
| 28 |
+import org.apache.poi.ss.usermodel.Row; |
|
| 29 |
+import org.apache.poi.ss.usermodel.Sheet; |
|
| 30 |
+import org.apache.poi.ss.usermodel.VerticalAlignment; |
|
| 31 |
+import org.apache.poi.ss.util.CellRangeAddress; |
|
| 32 |
+import org.apache.poi.xssf.streaming.SXSSFWorkbook; |
|
| 8 | 33 |
import org.springframework.stereotype.Service; |
| 9 | 34 |
|
| 10 | 35 |
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl; |
| 11 | 36 |
import egovframework.rte.fdl.idgnr.EgovIdGnrService; |
| 37 |
+import itn.com.cmm.util.StringUtil2; |
|
| 38 |
+import itn.let.cmm.vo.FileInfoVO; |
|
| 12 | 39 |
import itn.let.fax.addr.service.FaxAddrGroupVO; |
| 13 | 40 |
import itn.let.mjo.addr.service.AddrGroupVO; |
| 14 | 41 |
import itn.let.mjo.block.service.MjonBlockVO; |
| 42 |
+import itn.let.mjo.msgsent.service.MjonMsgDetailSentVO; |
|
| 43 |
+import itn.let.mjo.msgsent.service.MjonMsgSWFDTO; |
|
| 15 | 44 |
import itn.let.mjo.msgsent.service.MjonMsgSentService; |
| 16 | 45 |
import itn.let.mjo.msgsent.service.MjonMsgSentVO; |
| 46 |
+import lombok.extern.slf4j.Slf4j; |
|
| 17 | 47 |
|
| 48 |
+@Slf4j |
|
| 18 | 49 |
@Service("MjonMsgSentService")
|
| 19 | 50 |
public class MjonMsgSentServiceImpl extends EgovAbstractServiceImpl implements MjonMsgSentService{
|
| 20 | 51 |
|
... | ... | @@ -82,6 +113,204 @@ |
| 82 | 113 |
} |
| 83 | 114 |
|
| 84 | 115 |
return resultList; |
| 116 |
+ } |
|
| 117 |
+ |
|
| 118 |
+ /** |
|
| 119 |
+ * advc |
|
| 120 |
+ * 이호영 20250121 |
|
| 121 |
+ * 발송 관리 전체 발송 리스트 불러오기 |
|
| 122 |
+ */ |
|
| 123 |
+ public Map<String, Object> selectAllMsgSentList_advc(MjonMsgSentVO mjonMsgSentVO) throws Exception{
|
|
| 124 |
+ |
|
| 125 |
+ |
|
| 126 |
+ Map<String, Object> resultMap = new HashMap<String, Object>(); |
|
| 127 |
+ |
|
| 128 |
+ // 목록 |
|
| 129 |
+ List<MjonMsgSentVO> resultList = mjonMsgSentDAO.selectAllMsgSentList_advc(mjonMsgSentVO); |
|
| 130 |
+ |
|
| 131 |
+ |
|
| 132 |
+ // groupID에 대한 결과건수(대기, 성공 실패) 분할건수를 가져옴 |
|
| 133 |
+ resultList = makeDetailFunction(resultList); |
|
| 134 |
+ |
|
| 135 |
+ /* |
|
| 136 |
+ * 진행상태 코드화 |
|
| 137 |
+ * */ |
|
| 138 |
+ resultList.stream().forEach(t->{
|
|
| 139 |
+ String code = getStatusCode(t); |
|
| 140 |
+ t.setStatusCd(code); |
|
| 141 |
+ }); |
|
| 142 |
+ |
|
| 143 |
+ |
|
| 144 |
+ resultList.stream().forEach(t->{
|
|
| 145 |
+ |
|
| 146 |
+ // 내용이 없고 이미지만 있을 경우 |
|
| 147 |
+ // 내용에 "이미지"표시 |
|
| 148 |
+ if("6".equals(t.getMsgType())
|
|
| 149 |
+ && StringUtils.isEmpty(t.getSmsTxt()) |
|
| 150 |
+ && !"0".equals(t.getFileCnt()) |
|
| 151 |
+ ) {
|
|
| 152 |
+ t.setSmsTxt("이미지");
|
|
| 153 |
+ } |
|
| 154 |
+ |
|
| 155 |
+ // 예약 취소일 시 대기건도 0으로 표시 |
|
| 156 |
+ if( t.getReserveCYn().equals(("Y")) ) {
|
|
| 157 |
+ t.setResultSValue("0");
|
|
| 158 |
+ t.setResultFValue("0");
|
|
| 159 |
+ t.setResultWValue("0");
|
|
| 160 |
+ } |
|
| 161 |
+ }); |
|
| 162 |
+ |
|
| 163 |
+ |
|
| 164 |
+ |
|
| 165 |
+ |
|
| 166 |
+ // 총 카운트 |
|
| 167 |
+ int totalCnt = mjonMsgSentDAO.countAllMsgSentList(mjonMsgSentVO); |
|
| 168 |
+ resultMap.put("resultList", resultList);
|
|
| 169 |
+ resultMap.put("totalCnt", totalCnt);
|
|
| 170 |
+ |
|
| 171 |
+ |
|
| 172 |
+ return resultMap; |
|
| 173 |
+ } |
|
| 174 |
+ |
|
| 175 |
+ |
|
| 176 |
+ |
|
| 177 |
+ public Map<String, Object> selectAllMsgSentDetailView(MjonMsgDetailSentVO mjonMsgDetailSentVO) throws Exception{
|
|
| 178 |
+ |
|
| 179 |
+ Map<String, Object> resultMap = new HashMap<String, Object>(); |
|
| 180 |
+ |
|
| 181 |
+ // 목록 |
|
| 182 |
+ MjonMsgDetailSentVO resultVO = mjonMsgSentDAO.selectAllMsgSentDetailView(mjonMsgDetailSentVO); |
|
| 183 |
+ |
|
| 184 |
+ log.info(" + :: [{}]", resultVO.getSmsTxt());
|
|
| 185 |
+ |
|
| 186 |
+ |
|
| 187 |
+ // 성공 대기 실패 발송금액 분할여부 |
|
| 188 |
+ MjonMsgSentVO updatedVO = getDetailFunction(resultVO.getMsgGroupId(), resultVO.getEachPrice()); |
|
| 189 |
+ resultVO.setResultSValue(updatedVO.getResultSValue()); // 성공건수 |
|
| 190 |
+ resultVO.setResultWValue(updatedVO.getResultWValue()); // 대기건수 |
|
| 191 |
+ resultVO.setResultFValue(updatedVO.getResultFValue()); // 실패건수 |
|
| 192 |
+ resultVO.setTotPrice(updatedVO.getTotPrice()); // 총 발송 금액 (성공건수 * 개별금액) |
|
| 193 |
+ resultVO.setDivideYN(updatedVO.getDivideYN()); // 분할 여부 |
|
| 194 |
+ |
|
| 195 |
+ |
|
| 196 |
+ // 퍼센트 계산 실행 |
|
| 197 |
+ Map<String, String> returnMap = calculatePercentages(resultVO); |
|
| 198 |
+ resultVO.setSuccessPct(returnMap.get("successPct"));
|
|
| 199 |
+ resultVO.setWaitingPct(returnMap.get("waitingPct"));
|
|
| 200 |
+ resultVO.setFailedPct(returnMap.get("failedPct"));
|
|
| 201 |
+ |
|
| 202 |
+ |
|
| 203 |
+ // 진행상태 코드화 |
|
| 204 |
+ String statusCode = getStatusCode(MjonMsgSentVO.builder() |
|
| 205 |
+ .reserveCYn(resultVO.getReserveCYn()) |
|
| 206 |
+ .reserveYn(resultVO.getReserveYn()) |
|
| 207 |
+ .msgGroupCnt(resultVO.getMsgGroupCnt()) |
|
| 208 |
+ .resultSValue(resultVO.getResultSValue()) |
|
| 209 |
+ .resultWValue(resultVO.getResultWValue()) |
|
| 210 |
+ .resultFValue(resultVO.getResultFValue()) |
|
| 211 |
+ .diffMin(resultVO.getDiffMin()) |
|
| 212 |
+ .build()); |
|
| 213 |
+ |
|
| 214 |
+ resultVO.setStatusCd(statusCode); |
|
| 215 |
+ |
|
| 216 |
+ // 결과 출력 |
|
| 217 |
+// log.info("성공률: [{}]", returnMap.get("successPct"));
|
|
| 218 |
+// log.info("대기율: [{}]", returnMap.get("waitingPct"));
|
|
| 219 |
+// log.info("실패율: [{}]", returnMap.get("failedPct"));
|
|
| 220 |
+ |
|
| 221 |
+ |
|
| 222 |
+ // 광고일떄 (광고)와 줄바꿈+무료거부 0808800858 삭제 |
|
| 223 |
+ if("A".equals(resultVO.getMsgKind())) {
|
|
| 224 |
+ resultVO.setSmsTxt(resultVO.getSmsTxt().replace("(광고)", "")
|
|
| 225 |
+ .replaceAll("\\s*무료거부 0808800858", ""));
|
|
| 226 |
+ } |
|
| 227 |
+ |
|
| 228 |
+ // 그림문자일 경우 그림정보 가져오기 |
|
| 229 |
+ if(StringUtils.isNotEmpty(resultVO.getFileCnt()) && Integer.parseInt(resultVO.getFileCnt()) > 0) |
|
| 230 |
+ {
|
|
| 231 |
+ List<FileInfoVO> fileInfos = getFileInfo(resultVO); |
|
| 232 |
+ resultVO.setFileInfos(fileInfos); |
|
| 233 |
+ } |
|
| 234 |
+ |
|
| 235 |
+ // 분할문자인 경우 |
|
| 236 |
+ if("Y".equals(resultVO.getDivideYN())) {
|
|
| 237 |
+ String divideText = calculateBatchInfo(resultVO); |
|
| 238 |
+ resultVO.setDivideText(divideText); |
|
| 239 |
+ } |
|
| 240 |
+ |
|
| 241 |
+ |
|
| 242 |
+ |
|
| 243 |
+ |
|
| 244 |
+ resultMap.put("result", resultVO);
|
|
| 245 |
+ |
|
| 246 |
+ return resultMap; |
|
| 247 |
+ } |
|
| 248 |
+ |
|
| 249 |
+ |
|
| 250 |
+ private String calculateBatchInfo(MjonMsgDetailSentVO resultVO) {
|
|
| 251 |
+ |
|
| 252 |
+ String msgGroupId = resultVO.getMsgGroupId(); |
|
| 253 |
+ |
|
| 254 |
+ |
|
| 255 |
+ List<String> requestTimes = mjonMsgSentDAO.findByReqDateWhereMsgGroupId(msgGroupId); |
|
| 256 |
+ |
|
| 257 |
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.S");
|
|
| 258 |
+ Map<LocalDateTime, Integer> timeCountMap = new LinkedHashMap<>(); |
|
| 259 |
+ |
|
| 260 |
+ // REQ_DATE 그룹화 (같은 시간대 몇 건인지) |
|
| 261 |
+ for (String timeStr : requestTimes) {
|
|
| 262 |
+ LocalDateTime time = LocalDateTime.parse(timeStr, formatter); |
|
| 263 |
+ timeCountMap.put(time, timeCountMap.getOrDefault(time, 0) + 1); |
|
| 264 |
+ } |
|
| 265 |
+ |
|
| 266 |
+ // 가장 첫 번째 시간 & 간격 계산 |
|
| 267 |
+ List<LocalDateTime> sortedKeys = new ArrayList<>(timeCountMap.keySet()); |
|
| 268 |
+ if (sortedKeys.size() < 2) {
|
|
| 269 |
+ return "데이터 부족 (분석 불가)"; |
|
| 270 |
+ } |
|
| 271 |
+ |
|
| 272 |
+ int batchSize = timeCountMap.get(sortedKeys.get(0)); // 한 번에 보낸 건수 |
|
| 273 |
+ int intervalMinutes = sortedKeys.get(1).getMinute() - sortedKeys.get(0).getMinute(); // 시간 간격 계산 |
|
| 274 |
+// int batchCount = sortedKeys.size(); // 총 몇 번 보냈는지 |
|
| 275 |
+ |
|
| 276 |
+// return String.format("%,d건씩 %d분 간격 (%d회 발송)", batchSize, intervalMinutes, batchCount);
|
|
| 277 |
+ return String.format("%,d건씩 %d분 간격", batchSize, intervalMinutes);
|
|
| 278 |
+ |
|
| 279 |
+ } |
|
| 280 |
+ |
|
| 281 |
+ private List<FileInfoVO> getFileInfo(MjonMsgDetailSentVO result) throws Exception {
|
|
| 282 |
+ |
|
| 283 |
+ |
|
| 284 |
+ List<FileInfoVO> fileInfos = new ArrayList<>(); |
|
| 285 |
+ |
|
| 286 |
+ // 파일 경로 필드들을 배열로 관리 |
|
| 287 |
+ String[] filePaths = { result.getFilePath1(), result.getFilePath2(), result.getFilePath3() };
|
|
| 288 |
+ |
|
| 289 |
+ for (String filePath : filePaths) {
|
|
| 290 |
+ if (filePath != null) {
|
|
| 291 |
+ // 파일 ID 추출 |
|
| 292 |
+ |
|
| 293 |
+ // 확장자 제외한 파일명 |
|
| 294 |
+ String fileId = FilenameUtils.getBaseName(filePath); |
|
| 295 |
+ |
|
| 296 |
+ // 파일 정보 조회 |
|
| 297 |
+ MjonMsgSentVO info = mjonMsgSentDAO.selectFileInfo(fileId); |
|
| 298 |
+ |
|
| 299 |
+ // FileInfo 객체 생성 및 추가 |
|
| 300 |
+ FileInfoVO fileInfo = new FileInfoVO(); |
|
| 301 |
+ fileInfo.setAtchFileId(info.getAtchFileId()); |
|
| 302 |
+ fileInfo.setFileSn(info.getFileSn()); |
|
| 303 |
+ |
|
| 304 |
+ fileInfos.add(fileInfo); |
|
| 305 |
+ } |
|
| 306 |
+ } |
|
| 307 |
+ return fileInfos; |
|
| 308 |
+ |
|
| 309 |
+ } |
|
| 310 |
+ |
|
| 311 |
+ @Override |
|
| 312 |
+ public int countAllMsgSentList(MjonMsgSentVO mjonMsgSentVO) {
|
|
| 313 |
+ return mjonMsgSentDAO.countAllMsgSentList(mjonMsgSentVO); |
|
| 85 | 314 |
} |
| 86 | 315 |
|
| 87 | 316 |
//발송 관리 전체 발송 리스트 불러오기 => 주소록 조인 제거버전 |
... | ... | @@ -243,4 +472,384 @@ |
| 243 | 472 |
public MjonMsgSentVO selectFileInfo(String streFileId) throws Exception {
|
| 244 | 473 |
return mjonMsgSentDAO.selectFileInfo(streFileId); |
| 245 | 474 |
} |
| 475 |
+ |
|
| 476 |
+ @Override |
|
| 477 |
+ public List<MjonMsgDetailSentVO> findByMsgDetailListAjax(MjonMsgDetailSentVO mjonMsgDetailSentVO) {
|
|
| 478 |
+ |
|
| 479 |
+ List<MjonMsgDetailSentVO> list = mjonMsgSentDAO.findByMsgDetailListAjax(mjonMsgDetailSentVO); |
|
| 480 |
+ list.stream().forEach(t->{
|
|
| 481 |
+ t.setCallTo(StringUtil2.formatPhone(t.getCallTo())); |
|
| 482 |
+ }); |
|
| 483 |
+ |
|
| 484 |
+ return list; |
|
| 485 |
+ } |
|
| 486 |
+ |
|
| 487 |
+ public void msgSentExcelDownLoad(MjonMsgSentVO mjonMsgSentVO, HttpServletResponse response) throws Exception{
|
|
| 488 |
+ |
|
| 489 |
+ |
|
| 490 |
+ mjonMsgSentVO.setRecordCountPerPage(100000); |
|
| 491 |
+ mjonMsgSentVO.setFirstIndex(0); |
|
| 492 |
+ |
|
| 493 |
+ if(StringUtils.isEmpty(mjonMsgSentVO.getSearchSortOrd())) {
|
|
| 494 |
+ mjonMsgSentVO.setSearchSortOrd("desc");
|
|
| 495 |
+ mjonMsgSentVO.setSearchSortCnd("B.REQ_DATE");
|
|
| 496 |
+ } |
|
| 497 |
+ |
|
| 498 |
+ //예약 관리 리스트 불러오기 |
|
| 499 |
+ List<MjonMsgSentVO> resultAllSentList = mjonMsgSentDAO.selectAllMsgSentList_advc(mjonMsgSentVO); |
|
| 500 |
+ |
|
| 501 |
+// long startTime = System.nanoTime(); // 시작 시간 측정 |
|
| 502 |
+ resultAllSentList = makeDetailFunction(resultAllSentList); |
|
| 503 |
+// long endTime = System.nanoTime(); // 끝난 시간 측정 |
|
| 504 |
+// double executionTimeInSeconds = (endTime - startTime) / 1_000_000_000.0; |
|
| 505 |
+// System.out.println("Execution time: " + executionTimeInSeconds + " seconds");
|
|
| 506 |
+ |
|
| 507 |
+ SXSSFWorkbook workbook = null; // SXSSFWorkbook 변수 선언 |
|
| 508 |
+ try{
|
|
| 509 |
+ |
|
| 510 |
+ |
|
| 511 |
+ // Workbook 생성 |
|
| 512 |
+ workbook = new SXSSFWorkbook(); |
|
| 513 |
+ Sheet sheet = workbook.createSheet("발송 내역");
|
|
| 514 |
+ |
|
| 515 |
+ // 열 너비 설정 |
|
| 516 |
+ sheet.setColumnWidth(0, 3000); // 번호 열 |
|
| 517 |
+ sheet.setColumnWidth(1, 4000); // 발송일시 열 |
|
| 518 |
+ sheet.setColumnWidth(2, 5000); // 구분 열 |
|
| 519 |
+ sheet.setColumnWidth(3, 3000); // 형태 열 |
|
| 520 |
+ sheet.setColumnWidth(4, 10000); // 내용 열 |
|
| 521 |
+ sheet.setColumnWidth(5, 4000); // 발송건수 열 |
|
| 522 |
+ sheet.setColumnWidth(6, 3000); // 대기 열 |
|
| 523 |
+ sheet.setColumnWidth(7, 3000); // 성공 열 |
|
| 524 |
+ sheet.setColumnWidth(8, 3000); // 실패 열 |
|
| 525 |
+ sheet.setColumnWidth(9, 4000); // 금액 열 |
|
| 526 |
+ sheet.setColumnWidth(10, 5000); // 진행상황 열 |
|
| 527 |
+ |
|
| 528 |
+ // 헤더 스타일 설정 |
|
| 529 |
+ CellStyle headerStyle = workbook.createCellStyle(); |
|
| 530 |
+ headerStyle.setAlignment(HorizontalAlignment.CENTER); |
|
| 531 |
+ headerStyle.setVerticalAlignment(VerticalAlignment.CENTER); |
|
| 532 |
+ headerStyle.setBorderTop(BorderStyle.THIN); |
|
| 533 |
+ headerStyle.setBorderBottom(BorderStyle.THIN); |
|
| 534 |
+ headerStyle.setBorderLeft(BorderStyle.THIN); |
|
| 535 |
+ headerStyle.setBorderRight(BorderStyle.THIN); |
|
| 536 |
+ headerStyle.setTopBorderColor(IndexedColors.GREY_25_PERCENT.getIndex()); |
|
| 537 |
+ headerStyle.setBottomBorderColor(IndexedColors.GREY_25_PERCENT.getIndex()); |
|
| 538 |
+ headerStyle.setLeftBorderColor(IndexedColors.GREY_25_PERCENT.getIndex()); |
|
| 539 |
+ headerStyle.setRightBorderColor(IndexedColors.GREY_25_PERCENT.getIndex()); |
|
| 540 |
+ |
|
| 541 |
+ Font font = workbook.createFont(); |
|
| 542 |
+ font.setBold(true); // 글씨체 굵게 |
|
| 543 |
+ font.setFontHeightInPoints((short) 12); // 글씨 크기 |
|
| 544 |
+ headerStyle.setFont(font); |
|
| 545 |
+ |
|
| 546 |
+ // 데이터 스타일 설정 (가운데 정렬) |
|
| 547 |
+ CellStyle centerStyle = workbook.createCellStyle(); |
|
| 548 |
+ centerStyle.setAlignment(HorizontalAlignment.CENTER); |
|
| 549 |
+ centerStyle.setVerticalAlignment(VerticalAlignment.CENTER); |
|
| 550 |
+ centerStyle.setBorderTop(BorderStyle.THIN); |
|
| 551 |
+ centerStyle.setBorderBottom(BorderStyle.THIN); |
|
| 552 |
+ centerStyle.setBorderLeft(BorderStyle.THIN); |
|
| 553 |
+ centerStyle.setBorderRight(BorderStyle.THIN); |
|
| 554 |
+ centerStyle.setTopBorderColor(IndexedColors.GREY_25_PERCENT.getIndex()); |
|
| 555 |
+ centerStyle.setBottomBorderColor(IndexedColors.GREY_25_PERCENT.getIndex()); |
|
| 556 |
+ centerStyle.setLeftBorderColor(IndexedColors.GREY_25_PERCENT.getIndex()); |
|
| 557 |
+ centerStyle.setRightBorderColor(IndexedColors.GREY_25_PERCENT.getIndex()); |
|
| 558 |
+ |
|
| 559 |
+ // 첫 번째 헤더 작성 (상단 병합) |
|
| 560 |
+ Row headerRow = sheet.createRow(0); |
|
| 561 |
+ |
|
| 562 |
+ // 번호 열 추가 |
|
| 563 |
+ Cell cell = headerRow.createCell(0); |
|
| 564 |
+ cell.setCellValue("번호");
|
|
| 565 |
+ cell.setCellStyle(headerStyle); |
|
| 566 |
+ sheet.addMergedRegion(new CellRangeAddress(0, 1, 0, 0)); // 번호 병합 |
|
| 567 |
+ |
|
| 568 |
+ // 구분 열 추가 |
|
| 569 |
+ cell = headerRow.createCell(1); |
|
| 570 |
+ cell.setCellValue("발송일시");
|
|
| 571 |
+ cell.setCellStyle(headerStyle); |
|
| 572 |
+ sheet.addMergedRegion(new CellRangeAddress(0, 1, 1, 1)); // 구분 병합 |
|
| 573 |
+ |
|
| 574 |
+ cell = headerRow.createCell(2); |
|
| 575 |
+ cell.setCellValue("구분");
|
|
| 576 |
+ cell.setCellStyle(headerStyle); |
|
| 577 |
+ sheet.addMergedRegion(new CellRangeAddress(0, 1, 2, 2)); // 발송일시 병합 |
|
| 578 |
+ |
|
| 579 |
+ cell = headerRow.createCell(3); |
|
| 580 |
+ cell.setCellValue("형태");
|
|
| 581 |
+ cell.setCellStyle(headerStyle); |
|
| 582 |
+ sheet.addMergedRegion(new CellRangeAddress(0, 1, 3, 3)); // 형태 병합 |
|
| 583 |
+ |
|
| 584 |
+ cell = headerRow.createCell(4); |
|
| 585 |
+ cell.setCellValue("내용");
|
|
| 586 |
+ cell.setCellStyle(headerStyle); |
|
| 587 |
+ sheet.addMergedRegion(new CellRangeAddress(0, 1, 4, 4)); // 내용 병합 |
|
| 588 |
+ |
|
| 589 |
+ cell = headerRow.createCell(5); |
|
| 590 |
+ cell.setCellValue("발송건수");
|
|
| 591 |
+ cell.setCellStyle(headerStyle); |
|
| 592 |
+ sheet.addMergedRegion(new CellRangeAddress(0, 1, 5, 5)); // 발송건수 병합 |
|
| 593 |
+ |
|
| 594 |
+ cell = headerRow.createCell(6); |
|
| 595 |
+ cell.setCellValue("결과");
|
|
| 596 |
+ cell.setCellStyle(headerStyle); |
|
| 597 |
+ sheet.addMergedRegion(new CellRangeAddress(0, 0, 6, 8)); // 결과 병합 |
|
| 598 |
+ |
|
| 599 |
+ cell = headerRow.createCell(9); |
|
| 600 |
+ cell.setCellValue("금액(원)");
|
|
| 601 |
+ cell.setCellStyle(headerStyle); |
|
| 602 |
+ sheet.addMergedRegion(new CellRangeAddress(0, 1, 9, 9)); // 금액(원) 병합 |
|
| 603 |
+ |
|
| 604 |
+ cell = headerRow.createCell(10); |
|
| 605 |
+ cell.setCellValue("진행상황");
|
|
| 606 |
+ cell.setCellStyle(headerStyle); |
|
| 607 |
+ sheet.addMergedRegion(new CellRangeAddress(0, 1, 10, 10)); // 진행상황 병합 |
|
| 608 |
+ |
|
| 609 |
+ // 두 번째 헤더 작성 (결과 하위 열) |
|
| 610 |
+ Row subHeaderRow = sheet.createRow(1); |
|
| 611 |
+ |
|
| 612 |
+ String[] subHeaders = {"대기", "성공", "실패"};
|
|
| 613 |
+ for (int i = 0; i < subHeaders.length; i++) {
|
|
| 614 |
+ cell = subHeaderRow.createCell(6 + i); // 결과 열 시작점(6번 열)부터 순차적으로 설정 |
|
| 615 |
+ cell.setCellValue(subHeaders[i]); |
|
| 616 |
+ cell.setCellStyle(headerStyle); |
|
| 617 |
+ } |
|
| 618 |
+ |
|
| 619 |
+ // 샘플 데이터 추가 |
|
| 620 |
+ // Object[][] data = {
|
|
| 621 |
+ // {1, "2025-01-23 12:00", "web", "SMS", "테스트 메시지입니다.", 139, 1, 0, 12, "-", "진행중"}
|
|
| 622 |
+ // }; |
|
| 623 |
+ |
|
| 624 |
+ |
|
| 625 |
+ |
|
| 626 |
+ |
|
| 627 |
+ // Object[][]로 변환 |
|
| 628 |
+ Object[][] data = new Object[resultAllSentList.size()][11]; // 11은 필드 수 |
|
| 629 |
+ |
|
| 630 |
+ for (int i = 0; i < resultAllSentList.size(); i++) {
|
|
| 631 |
+ MjonMsgSentVO vo = resultAllSentList.get(i); |
|
| 632 |
+ data[i][0] = i+1; |
|
| 633 |
+ data[i][1] = vo.getReqDate(); |
|
| 634 |
+// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
| 635 |
+// data[i][1] = sdf.format(vo.getReqDate()); |
|
| 636 |
+ |
|
| 637 |
+ |
|
| 638 |
+// log.info("엑셀에 넣을 데이터: [{}]", data[i][1]);
|
|
| 639 |
+ |
|
| 640 |
+ data[i][2] = "H".equals(vo.getSendKind()) ? "WEB" : "API"; |
|
| 641 |
+ |
|
| 642 |
+ String msgType="단문"; |
|
| 643 |
+ if ("6".equals(vo.getMsgType())) {
|
|
| 644 |
+ msgType = "0".equals(vo.getFileCnt()) ? "장문" : "그림"; |
|
| 645 |
+ } |
|
| 646 |
+ data[i][3] = msgType; |
|
| 647 |
+ |
|
| 648 |
+ String reserveTxt = ""; |
|
| 649 |
+ if("Y".equals(vo.getReserveYn())) {reserveTxt="[예약]";}
|
|
| 650 |
+ if("Y".equals(vo.getDivideYN())) {reserveTxt+="[분할]";}
|
|
| 651 |
+ |
|
| 652 |
+ data[i][4] = reserveTxt + (StringUtils.isEmpty(vo.getSmsTxt()) ? "-" : vo.getSmsTxt()); |
|
| 653 |
+ data[i][5] = vo.getMsgGroupCnt(); |
|
| 654 |
+ data[i][6] = vo.getResultWValue(); |
|
| 655 |
+ data[i][7] = vo.getResultSValue(); |
|
| 656 |
+ data[i][8] = vo.getResultFValue(); |
|
| 657 |
+ data[i][9] = vo.getTotPrice(); |
|
| 658 |
+ |
|
| 659 |
+ String statusTxt="진행중"; |
|
| 660 |
+ if ("Y".equals(vo.getReserveCYn())) {
|
|
| 661 |
+ statusTxt = "예약취소"; // 예약취소 코드 |
|
| 662 |
+ // } else if ("Y".equals(vo.getReserveYn()) && vo.getMsgGroupCnt().equals(vo.getResultWValue())) {
|
|
| 663 |
+ // statusTxt = "예약대기"; // 예약대기 코드 ( 예약취소 버튼 노출 ) |
|
| 664 |
+ } else if (vo.getMsgGroupCnt().equals(vo.getResultSValue()) || vo.getMsgGroupCnt().equals(vo.getResultFValue())) {
|
|
| 665 |
+ statusTxt = "완료"; // 완료 코드 |
|
| 666 |
+ } |
|
| 667 |
+ |
|
| 668 |
+ |
|
| 669 |
+ |
|
| 670 |
+ |
|
| 671 |
+ data[i][10] = statusTxt; |
|
| 672 |
+ } |
|
| 673 |
+ |
|
| 674 |
+ |
|
| 675 |
+ |
|
| 676 |
+ |
|
| 677 |
+ int rowNum = 2; // 데이터 시작 행 |
|
| 678 |
+ for (Object[] rowData : data) {
|
|
| 679 |
+ Row row = sheet.createRow(rowNum++); |
|
| 680 |
+ for (int col = 0; col < rowData.length; col++) {
|
|
| 681 |
+ cell = row.createCell(col); |
|
| 682 |
+ |
|
| 683 |
+ // "내용" 열만 제외하고 가운데 정렬 |
|
| 684 |
+ if (col == 4) { // 내용 열
|
|
| 685 |
+ cell.setCellValue((String) rowData[col]); |
|
| 686 |
+ } else if (rowData[col] instanceof String) {
|
|
| 687 |
+ cell.setCellValue((String) rowData[col]); |
|
| 688 |
+ cell.setCellStyle(centerStyle); |
|
| 689 |
+ } else if (rowData[col] instanceof Integer) {
|
|
| 690 |
+ cell.setCellValue((Integer) rowData[col]); |
|
| 691 |
+ cell.setCellStyle(centerStyle); |
|
| 692 |
+ } |
|
| 693 |
+ } |
|
| 694 |
+ } |
|
| 695 |
+ |
|
| 696 |
+ // 파일 다운로드 응답 설정 |
|
| 697 |
+ String fileName ="발송결과_리스트"; // 저장 파일명 |
|
| 698 |
+ SimpleDateFormat mSimpleDateFormat = new SimpleDateFormat ( "yyyyMMdd_HHmmss", Locale.KOREA ); |
|
| 699 |
+ Date currentTime = new Date (); |
|
| 700 |
+ String mTime = mSimpleDateFormat.format ( currentTime ); |
|
| 701 |
+ fileName = fileName+"("+mTime+")";
|
|
| 702 |
+ |
|
| 703 |
+ response.setHeader("Set-Cookie", "fileDownload=true; path=/");
|
|
| 704 |
+ response.setHeader("Content-Disposition", String.format("attachment; filename=\""+new String((fileName).getBytes("KSC5601"),"8859_1")+".xlsx"));
|
|
| 705 |
+ response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
|
| 706 |
+ |
|
| 707 |
+ // 파일 출력 |
|
| 708 |
+ workbook.write(response.getOutputStream()); |
|
| 709 |
+ workbook.close(); |
|
| 710 |
+ |
|
| 711 |
+ } catch (Exception e) {
|
|
| 712 |
+ // 에러 처리 로직 |
|
| 713 |
+ response.setHeader("Set-Cookie", "fileDownload=false; path=/");
|
|
| 714 |
+ response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
|
|
| 715 |
+ response.setHeader("Content-Type", "text/html; charset=utf-8");
|
|
| 716 |
+ |
|
| 717 |
+ try (OutputStream out = response.getOutputStream()) {
|
|
| 718 |
+ byte[] data = "fail..".getBytes(); |
|
| 719 |
+ out.write(data, 0, data.length); |
|
| 720 |
+ } catch (Exception ignore) {
|
|
| 721 |
+ ignore.printStackTrace(); |
|
| 722 |
+ } |
|
| 723 |
+ } finally {
|
|
| 724 |
+ if (workbook != null) {
|
|
| 725 |
+ try {
|
|
| 726 |
+ workbook.dispose(); // SXSSFWorkbook 임시 파일 제거 |
|
| 727 |
+ workbook.close(); |
|
| 728 |
+ } catch (Exception ignore) {
|
|
| 729 |
+ ignore.printStackTrace(); |
|
| 730 |
+ } |
|
| 731 |
+ } |
|
| 732 |
+ } |
|
| 733 |
+ |
|
| 734 |
+ } |
|
| 735 |
+ |
|
| 736 |
+ |
|
| 737 |
+ /** |
|
| 738 |
+ * @methodName : makeDetailFunction |
|
| 739 |
+ * @author : 이호영 |
|
| 740 |
+ * @date : 2025.02.04 |
|
| 741 |
+ * @description : 발송결과 성공건수, 실패건수, 대기건수, 분할발송여부, 총 발송금액 구하기 |
|
| 742 |
+ * @param resultList |
|
| 743 |
+ * @return |
|
| 744 |
+ */ |
|
| 745 |
+ private List<MjonMsgSentVO> makeDetailFunction(List<MjonMsgSentVO> resultList) {
|
|
| 746 |
+ resultList.stream().forEach(t->{
|
|
| 747 |
+ MjonMsgSentVO updatedVO = getDetailFunction(t.getMsgGroupId(), t.getEachPrice()); |
|
| 748 |
+ |
|
| 749 |
+ t.setResultSValue(updatedVO.getResultSValue()); |
|
| 750 |
+ t.setResultFValue(updatedVO.getResultFValue()); |
|
| 751 |
+ t.setResultWValue(updatedVO.getResultWValue()); |
|
| 752 |
+ t.setDivideYN(updatedVO.getDivideYN()); |
|
| 753 |
+ t.setTotPrice(updatedVO.getTotPrice()); |
|
| 754 |
+ }); |
|
| 755 |
+ return resultList; |
|
| 756 |
+ } |
|
| 757 |
+ |
|
| 758 |
+ |
|
| 759 |
+ private MjonMsgSentVO getDetailFunction(String p_msgGroupId, String p_eachPrice) {
|
|
| 760 |
+ |
|
| 761 |
+ |
|
| 762 |
+ MjonMsgSentVO returnVO = new MjonMsgSentVO(); |
|
| 763 |
+ |
|
| 764 |
+ MjonMsgSWFDTO mjonMsgSWFDTO = mjonMsgSentDAO.findBySWF(p_msgGroupId); |
|
| 765 |
+ returnVO.setResultSValue(String.valueOf(mjonMsgSWFDTO.getResultSValue())); // 성공건수 |
|
| 766 |
+ returnVO.setResultFValue(String.valueOf(mjonMsgSWFDTO.getResultFValue())); // 실패건수 |
|
| 767 |
+ returnVO.setResultWValue(String.valueOf(mjonMsgSWFDTO.getResultWValue())); // 대기건수 |
|
| 768 |
+ returnVO.setDivideYN(mjonMsgSWFDTO.getDivideYN()); |
|
| 769 |
+ |
|
| 770 |
+ |
|
| 771 |
+ // TotPrice : 성공건수에 대한 금액 곱하기 |
|
| 772 |
+ BigDecimal eachPrice = new BigDecimal(p_eachPrice); |
|
| 773 |
+ BigDecimal resultSValue = new BigDecimal(mjonMsgSWFDTO.getResultSValue()); |
|
| 774 |
+ BigDecimal totalPrice = eachPrice.multiply(resultSValue); |
|
| 775 |
+ // 소수점 한 자리로 설정 (반올림)// totalPrice 값을 소수점 한 자리까지 반올림하여 roundedTotalPrice에 저장 |
|
| 776 |
+ // RoundingMode.HALF_UP: 반올림 방식으로, 소수점 기준 5 이상이면 올림, 그렇지 않으면 내림 |
|
| 777 |
+ BigDecimal roundedTotalPrice = totalPrice.setScale(1, RoundingMode.HALF_UP); |
|
| 778 |
+ |
|
| 779 |
+ // roundedTotalPrice가 0인지 확인 |
|
| 780 |
+ // BigDecimal.compareTo(BigDecimal.ZERO)는 값을 비교하는 메서드 |
|
| 781 |
+ // 결과: |
|
| 782 |
+ // - 반환 값이 0이면 두 값이 같음 |
|
| 783 |
+ // - 반환 값이 음수이면 roundedTotalPrice가 0보다 작음 |
|
| 784 |
+ // - 반환 값이 양수이면 roundedTotalPrice가 0보다 큼 |
|
| 785 |
+ if (roundedTotalPrice.compareTo(BigDecimal.ZERO) == 0) {
|
|
| 786 |
+ // roundedTotalPrice 값이 0이면, "-" 문자열을 totPrice에 설정 |
|
| 787 |
+ returnVO.setTotPrice("-");
|
|
| 788 |
+ } else {
|
|
| 789 |
+ // roundedTotalPrice 값이 0이 아닌 경우 |
|
| 790 |
+ // 반올림된 BigDecimal 값을 toPlainString()을 사용하여 문자열로 변환 후 totPrice에 설정 |
|
| 791 |
+ // toPlainString(): 지수 표기법 없이 일반적인 문자열 형태로 반환 |
|
| 792 |
+ returnVO.setTotPrice(roundedTotalPrice.toPlainString()); |
|
| 793 |
+ } |
|
| 794 |
+// log.info(" + returnVO.getTotPrice() :: [{}]", returnVO.getTotPrice());
|
|
| 795 |
+ return returnVO; |
|
| 796 |
+ |
|
| 797 |
+ |
|
| 798 |
+ } |
|
| 799 |
+ |
|
| 800 |
+ |
|
| 801 |
+ |
|
| 802 |
+ private Map<String, String> calculatePercentages(MjonMsgDetailSentVO result) {
|
|
| 803 |
+ int total = Integer.parseInt(result.getMsgGroupCnt()); // 전체 건수 |
|
| 804 |
+ int success = Integer.parseInt(result.getResultSValue()); // 성공 건수 |
|
| 805 |
+ int waiting = Integer.parseInt(result.getResultWValue()); // 대기 건수 |
|
| 806 |
+ int failed = Integer.parseInt(result.getResultFValue()); // 실패 건수 |
|
| 807 |
+ |
|
| 808 |
+ // 퍼센트 계산 (0으로 나누는 경우 대비) |
|
| 809 |
+ String successPct = total > 0 ? String.format("%.1f%%", (success / (double) total) * 100) : "0.0%";
|
|
| 810 |
+ String waitingPct = total > 0 ? String.format("%.1f%%", (waiting / (double) total) * 100) : "0.0%";
|
|
| 811 |
+ String failedPct = total > 0 ? String.format("%.1f%%", (failed / (double) total) * 100) : "0.0%";
|
|
| 812 |
+ |
|
| 813 |
+ // 결과 맵에 저장 |
|
| 814 |
+ Map<String, String> percentages = new HashMap<>(); |
|
| 815 |
+ percentages.put("successPct", successPct);
|
|
| 816 |
+ percentages.put("waitingPct", waitingPct);
|
|
| 817 |
+ percentages.put("failedPct", failedPct);
|
|
| 818 |
+ |
|
| 819 |
+ return percentages; |
|
| 820 |
+ |
|
| 821 |
+ } |
|
| 822 |
+ |
|
| 823 |
+ // 공통코드 ITN057에 대한 코드화 진행 |
|
| 824 |
+ /* |
|
| 825 |
+ * CODE_ID CODE CODE_NM CODE_DC |
|
| 826 |
+ * ITN057 01 진행중 진행중 |
|
| 827 |
+ * ITN057 02 완료 완료출해야함 |
|
| 828 |
+ * ITN057 03 예약대기 예약대기(발송전) 버튼으로 노출해야함 |
|
| 829 |
+ * ITN057 04 - 예약취소 ( - 으로 노출 ) |
|
| 830 |
+ * */ |
|
| 831 |
+ private String getStatusCode(MjonMsgSentVO result) {
|
|
| 832 |
+ |
|
| 833 |
+ String returnCode; |
|
| 834 |
+ |
|
| 835 |
+ if ("Y".equals(result.getReserveCYn())) {
|
|
| 836 |
+ returnCode = "04"; // 예약취소 코드 |
|
| 837 |
+ } else if ( |
|
| 838 |
+ "Y".equals(result.getReserveYn()) |
|
| 839 |
+ && "N".equals(result.getReserveCYn()) |
|
| 840 |
+ && result.getMsgGroupCnt().equals(result.getResultWValue()) |
|
| 841 |
+ && result.getDiffMin() < -5 // 예약 시간이 5분 이상인 것들만 |
|
| 842 |
+ ) {
|
|
| 843 |
+ returnCode = "03"; // 예약대기 코드 ( 예약취소 버튼 노출 ) |
|
| 844 |
+ } else if (result.getMsgGroupCnt().equals(result.getResultSValue()) |
|
| 845 |
+ || result.getMsgGroupCnt().equals(result.getResultFValue())) {
|
|
| 846 |
+ returnCode = "02"; // 완료 코드 |
|
| 847 |
+ } else {
|
|
| 848 |
+ returnCode = "01"; // 진행중 코드 |
|
| 849 |
+ } |
|
| 850 |
+ |
|
| 851 |
+ |
|
| 852 |
+ return returnCode; |
|
| 853 |
+ |
|
| 854 |
+ } |
|
| 246 | 855 |
} |
--- src/main/java/itn/let/mjo/msgsent/web/MjonMsgSentController.java
+++ src/main/java/itn/let/mjo/msgsent/web/MjonMsgSentController.java
... | ... | @@ -5,14 +5,17 @@ |
| 5 | 5 |
import java.util.ArrayList; |
| 6 | 6 |
import java.util.Calendar; |
| 7 | 7 |
import java.util.Date; |
| 8 |
+import java.util.HashMap; |
|
| 8 | 9 |
import java.util.List; |
| 9 | 10 |
import java.util.Locale; |
| 11 |
+import java.util.Map; |
|
| 10 | 12 |
import java.util.stream.Collectors; |
| 11 | 13 |
|
| 12 | 14 |
import javax.annotation.Resource; |
| 13 | 15 |
import javax.servlet.http.HttpServletRequest; |
| 14 | 16 |
import javax.servlet.http.HttpServletResponse; |
| 15 | 17 |
|
| 18 |
+import org.apache.commons.lang3.StringUtils; |
|
| 16 | 19 |
import org.apache.poi.ss.usermodel.Cell; |
| 17 | 20 |
import org.apache.poi.ss.usermodel.CellStyle; |
| 18 | 21 |
import org.apache.poi.ss.usermodel.Font; |
... | ... | @@ -22,6 +25,8 @@ |
| 22 | 25 |
import org.apache.poi.xssf.streaming.SXSSFWorkbook; |
| 23 | 26 |
import org.slf4j.Logger; |
| 24 | 27 |
import org.slf4j.LoggerFactory; |
| 28 |
+import org.springframework.http.HttpStatus; |
|
| 29 |
+import org.springframework.http.ResponseEntity; |
|
| 25 | 30 |
import org.springframework.stereotype.Controller; |
| 26 | 31 |
import org.springframework.ui.ModelMap; |
| 27 | 32 |
import org.springframework.web.bind.annotation.ModelAttribute; |
... | ... | @@ -38,16 +43,20 @@ |
| 38 | 43 |
import itn.com.cmm.util.DateUtils; |
| 39 | 44 |
import itn.com.utl.fcc.service.EgovStringUtil; |
| 40 | 45 |
import itn.let.kakao.user.sent.service.KakaoSentService; |
| 46 |
+import itn.let.mail.service.StatusResponse; |
|
| 41 | 47 |
import itn.let.mjo.addr.service.AddrGroupService; |
| 42 | 48 |
import itn.let.mjo.addr.service.AddrGroupVO; |
| 43 | 49 |
import itn.let.mjo.addr.service.AddrService; |
| 44 | 50 |
import itn.let.mjo.addr.service.AddrVO; |
| 45 | 51 |
import itn.let.mjo.apikey.service.ApiKeyMngService; |
| 46 | 52 |
import itn.let.mjo.apikey.service.ApiKeyVO; |
| 53 |
+import itn.let.mjo.msgsent.service.MjonMsgDetailSentVO; |
|
| 47 | 54 |
import itn.let.mjo.msgsent.service.MjonMsgSentCntVO; |
| 48 | 55 |
import itn.let.mjo.msgsent.service.MjonMsgSentService; |
| 49 | 56 |
import itn.let.mjo.msgsent.service.MjonMsgSentVO; |
| 57 |
+import lombok.extern.slf4j.Slf4j; |
|
| 50 | 58 |
|
| 59 |
+@Slf4j |
|
| 51 | 60 |
@Controller |
| 52 | 61 |
public class MjonMsgSentController {
|
| 53 | 62 |
|
... | ... | @@ -99,115 +108,10 @@ |
| 99 | 108 |
return "redirect:/web/user/login/login.do"; |
| 100 | 109 |
} |
| 101 | 110 |
|
| 102 |
- mjonMsgSentVO.setUserId(userId); |
|
| 103 |
- |
|
| 104 |
- /* |
|
| 105 |
- //전체 발송 건수 통계 불러오기 |
|
| 106 |
- mjonMsgSentVO.setMsgType("");
|
|
| 107 |
- List<MjonMsgSentVO> totalMsgCnt = mjonMsgSentService.selectDetailMsgSentCnt(mjonMsgSentVO); |
|
| 108 |
- model.addAttribute("totalMsgCnt", totalMsgCnt);
|
|
| 109 |
- |
|
| 110 |
- //단문 성공건, 실패건 불러오기 |
|
| 111 |
- mjonMsgSentVO.setMsgType("4");
|
|
| 112 |
- List<MjonMsgSentVO> smsMsgCnt = mjonMsgSentService.selectDetailMsgSentCnt(mjonMsgSentVO); |
|
| 113 |
- model.addAttribute("smsMsgCnt", smsMsgCnt);
|
|
| 114 |
- |
|
| 115 |
- //장문 성공건, 실패건 불러오기 |
|
| 116 |
- mjonMsgSentVO.setMsgType("6");
|
|
| 117 |
- mjonMsgSentVO.setFileCnt("0");
|
|
| 118 |
- List<MjonMsgSentVO> lmsMsgCnt = mjonMsgSentService.selectDetailMsgSentCnt(mjonMsgSentVO); |
|
| 119 |
- model.addAttribute("lmsMsgCnt", lmsMsgCnt);
|
|
| 120 |
- |
|
| 121 |
- //그림문자 성공건, 실패건 불러오기 |
|
| 122 |
- mjonMsgSentVO.setMsgType("6");
|
|
| 123 |
- mjonMsgSentVO.setFileCnt("1");
|
|
| 124 |
- List<MjonMsgSentVO> mmsMsgCnt = mjonMsgSentService.selectDetailMsgSentCnt(mjonMsgSentVO); |
|
| 125 |
- model.addAttribute("mmsMsgCnt", mmsMsgCnt);
|
|
| 126 |
- */ |
|
| 127 |
- |
|
| 128 |
- /* |
|
| 129 |
- //전체 발송 건수 통계 불러오기 |
|
| 130 |
- mjonMsgSentVO.setMsgType("");
|
|
| 131 |
- List<MjonMsgSentVO> totalMsgCnt = mjonMsgSentService.selectDetailMsgSentCntMix(mjonMsgSentVO); |
|
| 132 |
- |
|
| 133 |
- System.out.println("start");
|
|
| 134 |
- |
|
| 135 |
- // H:홈페이지, A:API 로 sms, lms, mms 나누는 영역 |
|
| 136 |
- List<MjonMsgSentVO> H_totalMsgCnt = totalMsgCnt.stream().filter(t -> "H".equals(t.getSendKind())).collect(Collectors.toList()); |
|
| 137 |
- List<MjonMsgSentVO> H_smsMsgCnt = new ArrayList<MjonMsgSentVO>(); |
|
| 138 |
- List<MjonMsgSentVO> H_lmsMsgCnt = new ArrayList<MjonMsgSentVO>(); |
|
| 139 |
- List<MjonMsgSentVO> H_mmsMsgCnt = new ArrayList<MjonMsgSentVO>(); |
|
| 140 |
- |
|
| 141 |
- System.out.println("start");
|
|
| 142 |
- |
|
| 143 |
- List<MjonMsgSentVO> A_totalMsgCnt = totalMsgCnt.stream().filter(t -> "A".equals(t.getSendKind())).collect(Collectors.toList()); |
|
| 144 |
- List<MjonMsgSentVO> A_smsMsgCnt = new ArrayList<MjonMsgSentVO>(); |
|
| 145 |
- List<MjonMsgSentVO> A_lmsMsgCnt = new ArrayList<MjonMsgSentVO>(); |
|
| 146 |
- List<MjonMsgSentVO> A_mmsMsgCnt = new ArrayList<MjonMsgSentVO>(); |
|
| 147 |
- |
|
| 148 |
- System.out.println(" ::H_totalMsgCnt :: "+ H_totalMsgCnt.size());
|
|
| 149 |
- System.out.println(" ::A_totalMsgCnt :: "+ A_totalMsgCnt.size());
|
|
| 150 |
- |
|
| 151 |
- H_totalMsgCnt.forEach(t->{
|
|
| 152 |
- if (Integer.parseInt(t.getFilePath1())>0) {
|
|
| 153 |
- H_smsMsgCnt.add(t); |
|
| 154 |
- } else if (Integer.parseInt(t.getFilePath2())>0) {
|
|
| 155 |
- H_lmsMsgCnt.add(t); |
|
| 156 |
- } else if (Integer.parseInt(t.getFilePath3())>0) {
|
|
| 157 |
- H_mmsMsgCnt.add(t); |
|
| 158 |
- } |
|
| 159 |
- }); |
|
| 160 |
- |
|
| 161 |
- A_totalMsgCnt.forEach(t->{
|
|
| 162 |
- if (Integer.parseInt(t.getFilePath1())>0) {
|
|
| 163 |
- A_smsMsgCnt.add(t); |
|
| 164 |
- } else if (Integer.parseInt(t.getFilePath2())>0) {
|
|
| 165 |
- A_lmsMsgCnt.add(t); |
|
| 166 |
- } else if (Integer.parseInt(t.getFilePath3())>0) {
|
|
| 167 |
- A_mmsMsgCnt.add(t); |
|
| 168 |
- } |
|
| 169 |
- }); |
|
| 170 |
- |
|
| 171 |
- |
|
| 172 |
- |
|
| 173 |
- //* 홈페이지에서 보낸 데이터 LIST |
|
| 174 |
- //* SEND_KIND = "H" |
|
| 175 |
- |
|
| 176 |
- // 전체 영역 |
|
| 177 |
- model.addAttribute("H_allSentCntVO", this.getResultCntProc(H_totalMsgCnt));
|
|
| 178 |
- // 전체 단문(SMS) |
|
| 179 |
- model.addAttribute("H_smsSentCntVO", this.getResultCntProc(H_smsMsgCnt));
|
|
| 180 |
- // 전체 장문(LMS) |
|
| 181 |
- model.addAttribute("H_lmsSentCntVO", this.getResultCntProc(H_lmsMsgCnt));
|
|
| 182 |
- // 전체 장문(LMS) |
|
| 183 |
- model.addAttribute("H_mmsSentCntVO", this.getResultCntProc(H_mmsMsgCnt));
|
|
| 184 |
- |
|
| 185 |
- |
|
| 186 |
- |
|
| 187 |
- |
|
| 188 |
- |
|
| 189 |
- // * 홈페이지에서 보낸 데이터 LIST |
|
| 190 |
- //* SEND_KIND = "A" |
|
| 191 |
- |
|
| 192 |
- // 전체 영역 |
|
| 193 |
- model.addAttribute("A_allSentCntVO", this.getResultCntProc(A_totalMsgCnt));
|
|
| 194 |
- // 전체 단문(SMS) |
|
| 195 |
- model.addAttribute("A_smsSentCntVO", this.getResultCntProc(A_smsMsgCnt));
|
|
| 196 |
- // 전체 장문(LMS) |
|
| 197 |
- model.addAttribute("A_lmsSentCntVO", this.getResultCntProc(A_lmsMsgCnt));
|
|
| 198 |
- // 전체 장문(LMS) |
|
| 199 |
- model.addAttribute("A_mmsSentCntVO", this.getResultCntProc(A_mmsMsgCnt));
|
|
| 200 |
- */ |
|
| 201 |
- |
|
| 202 |
- |
|
| 203 |
- |
|
| 204 |
- /*<isEqual prepend="AND" property="searchCondition" compareValue="2"> |
|
| 205 |
- a.mber_nm LIKE CONCAT('%',#searchKeyword#,'%')
|
|
| 206 |
- </isEqual> |
|
| 207 |
- */ |
|
| 208 |
- ApiKeyVO apiKeyVO = new ApiKeyVO(); |
|
| 209 |
- apiKeyVO.setMberId(userId); |
|
| 210 |
- model.addAttribute("appMgmt", apiKeyMngService.selectMberApiKeyChk(apiKeyVO) > 0 ? true : false);
|
|
| 111 |
+// mjonMsgSentVO.setUserId(userId); |
|
| 112 |
+// ApiKeyVO apiKeyVO = new ApiKeyVO(); |
|
| 113 |
+// apiKeyVO.setMberId(userId); |
|
| 114 |
+// model.addAttribute("appMgmt", apiKeyMngService.selectMberApiKeyChk(apiKeyVO) > 0 ? true : false);
|
|
| 211 | 115 |
|
| 212 | 116 |
|
| 213 | 117 |
|
... | ... | @@ -231,37 +135,67 @@ |
| 231 | 135 |
|
| 232 | 136 |
} |
| 233 | 137 |
|
| 234 |
- String startDate = mjonMsgSentVO.getStartDate(); |
|
| 235 |
- String endDate = mjonMsgSentVO.getEndDate(); |
|
| 138 |
+// log.info(" + mjonMsgSentVO.getSearchStartDate() :: [{}]", mjonMsgSentVO.getSearchStartDate());
|
|
| 139 |
+// log.info(" + mjonMsgSentVO.getSearchStartDate() :: [{}]", mjonMsgSentVO.getSearchStartDate());
|
|
| 140 |
+// log.info(" + mjonMsgSentVO.getSearchStartDate() :: [{}]", mjonMsgSentVO.getSearchStartDate());
|
|
| 141 |
+// log.info(" + mjonMsgSentVO.getSearchStartDate() :: [{}]", mjonMsgSentVO.getSearchStartDate());
|
|
| 142 |
+// log.info(" + mjonMsgSentVO.getSearchStartDate() :: [{}]", mjonMsgSentVO.getSearchStartDate());
|
|
| 143 |
+ String startDate = mjonMsgSentVO.getSearchStartDate(); |
|
| 144 |
+ String endDate = mjonMsgSentVO.getSearchEndDate(); |
|
| 236 | 145 |
|
| 237 |
- if(startDate == null && endDate == null ) {
|
|
| 146 |
+ if(StringUtils.isEmpty(startDate) |
|
| 147 |
+ && StringUtils.isEmpty(endDate)) |
|
| 148 |
+ {
|
|
| 238 | 149 |
|
| 239 |
- |
|
| 240 |
-// |
|
| 241 |
-// Calendar cal = Calendar.getInstance(); |
|
| 242 |
-// Date now = new Date(); |
|
| 243 |
-// |
|
| 244 |
-// SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd");
|
|
| 245 |
-// |
|
| 246 |
-// //종료일은 오늘날짜 |
|
| 247 |
-// cal.setTime(now); |
|
| 248 |
-// endDate = format.format(cal.getTime()); |
|
| 249 |
-// |
|
| 250 |
-// //시작일은 전날로 셋팅 |
|
| 251 |
-// cal.add(Calendar.DATE, -1); |
|
| 252 |
-// startDate = format.format(cal.getTime()); |
|
| 253 |
- |
|
| 254 |
- mjonMsgSentVO.setStartDate(DateUtils.getDateMonthsAgo(3)); |
|
| 255 |
- mjonMsgSentVO.setEndDate(DateUtils.getCurrentDate()); |
|
| 150 |
+ mjonMsgSentVO.setSearchStartDate(DateUtils.getDateMonthsAgo(3)); |
|
| 151 |
+ mjonMsgSentVO.setSearchEndDate(DateUtils.getCurrentDate()); |
|
| 256 | 152 |
|
| 257 | 153 |
} |
| 258 |
- |
|
| 154 |
+ |
|
| 155 |
+ log.info("pageIndex :: [{}]", mjonMsgSentVO.getPageIndex());
|
|
| 259 | 156 |
model.addAttribute("searchKeyword", mjonMsgSentVO.getSearchKeyword());
|
| 260 | 157 |
model.addAttribute("mjonMsgSentVO", mjonMsgSentVO);
|
| 261 | 158 |
model.addAttribute("siteId", mjonMsgSentVO.getSiteId());
|
| 262 | 159 |
|
| 263 | 160 |
return "web/msgsent/MsgSentView"; |
| 264 | 161 |
} |
| 162 |
+ |
|
| 163 |
+ |
|
| 164 |
+ /** |
|
| 165 |
+ * 발송관리 화면 |
|
| 166 |
+ * @param searchVO |
|
| 167 |
+ * @param model/web/user/login/login.do |
|
| 168 |
+ * @return "/web/mjon/msgtxt/selectMsgTxtView.do" |
|
| 169 |
+ * @throws Exception |
|
| 170 |
+ */ |
|
| 171 |
+ @RequestMapping(value= {"/web/mjon/msgsent/msgSentDetailView.do"})
|
|
| 172 |
+ public String selectMsgSentDetailView(@ModelAttribute("searchVO") MjonMsgDetailSentVO mjonMsgDetailSentVO
|
|
| 173 |
+ , ModelMap model) throws Exception{
|
|
| 174 |
+ |
|
| 175 |
+ |
|
| 176 |
+ //로그인 권한정보 불러오기 |
|
| 177 |
+ LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; |
|
| 178 |
+ String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 179 |
+ if(loginVO == null) {
|
|
| 180 |
+ return "redirect:/web/user/login/login.do"; |
|
| 181 |
+ } |
|
| 182 |
+ |
|
| 183 |
+ Map<String, Object> resultMap = mjonMsgSentService.selectAllMsgSentDetailView(mjonMsgDetailSentVO); |
|
| 184 |
+ model.addAttribute("result", resultMap.get("result"));
|
|
| 185 |
+ |
|
| 186 |
+ return "web/msgsent/MsgSentDetailView"; |
|
| 187 |
+ } |
|
| 188 |
+ |
|
| 189 |
+ // 팩스 금일 발송통계 갱신 |
|
| 190 |
+ @RequestMapping(value= {"/web/mjon/msgsent/findByMsgDetailListAjax.do"})
|
|
| 191 |
+ public ResponseEntity<StatusResponse> findByMsgDetailListAjax(MjonMsgDetailSentVO mjonMsgDetailSentVO) throws Exception {
|
|
| 192 |
+ |
|
| 193 |
+ |
|
| 194 |
+ List<MjonMsgDetailSentVO> resultList = mjonMsgSentService.findByMsgDetailListAjax(mjonMsgDetailSentVO); |
|
| 195 |
+ |
|
| 196 |
+ |
|
| 197 |
+ return ResponseEntity.ok().body(new StatusResponse(HttpStatus.OK, "", resultList)); |
|
| 198 |
+ } |
|
| 265 | 199 |
|
| 266 | 200 |
/** |
| 267 | 201 |
* 마이페이지 - 이용내역 - ajax |
... | ... | @@ -275,7 +209,6 @@ |
| 275 | 209 |
HttpServletRequest request, |
| 276 | 210 |
ModelMap model) throws Exception{
|
| 277 | 211 |
|
| 278 |
- System.out.println("MsgSentView_HA_allSentAjax");
|
|
| 279 | 212 |
|
| 280 | 213 |
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser(); |
| 281 | 214 |
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
... | ... | @@ -283,29 +216,24 @@ |
| 283 | 216 |
|
| 284 | 217 |
mjonMsgSentVO.setUserId(userId); |
| 285 | 218 |
|
| 219 |
+ log.info("+ mjonMsgSentVO.getSearchStartDate() :: [{}]", mjonMsgSentVO.getSearchStartDate());
|
|
| 220 |
+ log.info("+ mjonMsgSentVO.getSearchEndDate() :: [{}]", mjonMsgSentVO.getSearchEndDate());
|
|
| 286 | 221 |
//전체 발송 건수 통계 불러오기 |
| 287 | 222 |
mjonMsgSentVO.setMsgType("");
|
| 223 |
+ long startTime = System.nanoTime(); // 시작 시간 측정 |
|
| 288 | 224 |
List<MjonMsgSentVO> totalMsgCnt = mjonMsgSentService.selectDetailMsgSentCntMix(mjonMsgSentVO); |
| 225 |
+ |
|
| 226 |
+ long endTime = System.nanoTime(); // 종료 시간 측정 |
|
| 227 |
+ double executionTimeInSeconds = (endTime - startTime) / 1_000_000_000.0; |
|
| 228 |
+ System.out.println("Execution time: " + executionTimeInSeconds + " seconds");
|
|
| 289 | 229 |
|
| 290 |
- System.out.println("start");
|
|
| 291 | 230 |
|
| 292 | 231 |
// H:홈페이지, A:API 로 sms, lms, mms 나누는 영역 |
| 293 |
- List<MjonMsgSentVO> H_totalMsgCnt = totalMsgCnt.stream().filter(t -> "H".equals(t.getSendKind())).collect(Collectors.toList()); |
|
| 294 | 232 |
List<MjonMsgSentVO> H_smsMsgCnt = new ArrayList<MjonMsgSentVO>(); |
| 295 | 233 |
List<MjonMsgSentVO> H_lmsMsgCnt = new ArrayList<MjonMsgSentVO>(); |
| 296 | 234 |
List<MjonMsgSentVO> H_mmsMsgCnt = new ArrayList<MjonMsgSentVO>(); |
| 297 | 235 |
|
| 298 |
- System.out.println("start");
|
|
| 299 |
- |
|
| 300 |
- List<MjonMsgSentVO> A_totalMsgCnt = totalMsgCnt.stream().filter(t -> "A".equals(t.getSendKind())).collect(Collectors.toList()); |
|
| 301 |
- List<MjonMsgSentVO> A_smsMsgCnt = new ArrayList<MjonMsgSentVO>(); |
|
| 302 |
- List<MjonMsgSentVO> A_lmsMsgCnt = new ArrayList<MjonMsgSentVO>(); |
|
| 303 |
- List<MjonMsgSentVO> A_mmsMsgCnt = new ArrayList<MjonMsgSentVO>(); |
|
| 304 |
- |
|
| 305 |
- System.out.println(" ::H_totalMsgCnt :: "+ H_totalMsgCnt.size());
|
|
| 306 |
- System.out.println(" ::A_totalMsgCnt :: "+ A_totalMsgCnt.size());
|
|
| 307 |
- |
|
| 308 |
- H_totalMsgCnt.forEach(t->{
|
|
| 236 |
+ totalMsgCnt.forEach(t->{
|
|
| 309 | 237 |
if (Integer.parseInt(t.getFilePath1())>0) {
|
| 310 | 238 |
H_smsMsgCnt.add(t); |
| 311 | 239 |
} else if (Integer.parseInt(t.getFilePath2())>0) {
|
... | ... | @@ -315,59 +243,23 @@ |
| 315 | 243 |
} |
| 316 | 244 |
}); |
| 317 | 245 |
|
| 318 |
- A_totalMsgCnt.forEach(t->{
|
|
| 319 |
- if (Integer.parseInt(t.getFilePath1())>0) {
|
|
| 320 |
- A_smsMsgCnt.add(t); |
|
| 321 |
- } else if (Integer.parseInt(t.getFilePath2())>0) {
|
|
| 322 |
- A_lmsMsgCnt.add(t); |
|
| 323 |
- } else if (Integer.parseInt(t.getFilePath3())>0) {
|
|
| 324 |
- A_mmsMsgCnt.add(t); |
|
| 325 |
- } |
|
| 326 |
- }); |
|
| 327 |
- |
|
| 328 |
- |
|
| 329 |
- |
|
| 330 | 246 |
//* 홈페이지에서 보낸 데이터 LIST |
| 331 | 247 |
//* SEND_KIND = "H" |
| 332 | 248 |
|
| 333 | 249 |
// 전체 영역 |
| 334 |
- model.addAttribute("H_allSentCntVO", this.getResultCntProc(H_totalMsgCnt));
|
|
| 250 |
+ log.info("all");
|
|
| 251 |
+ model.addAttribute("H_allSentCntVO", this.getResultCntProc(totalMsgCnt));
|
|
| 335 | 252 |
// 전체 단문(SMS) |
| 253 |
+ log.info("sms");
|
|
| 336 | 254 |
model.addAttribute("H_smsSentCntVO", this.getResultCntProc(H_smsMsgCnt));
|
| 337 | 255 |
// 전체 장문(LMS) |
| 256 |
+ log.info("lms");
|
|
| 338 | 257 |
model.addAttribute("H_lmsSentCntVO", this.getResultCntProc(H_lmsMsgCnt));
|
| 339 |
- // 전체 장문(LMS) |
|
| 258 |
+ // 전체 그림(MMS) |
|
| 259 |
+ log.info("mms");
|
|
| 340 | 260 |
model.addAttribute("H_mmsSentCntVO", this.getResultCntProc(H_mmsMsgCnt));
|
| 341 | 261 |
|
| 342 | 262 |
|
| 343 |
- |
|
| 344 |
- |
|
| 345 |
- |
|
| 346 |
- // * 홈페이지에서 보낸 데이터 LIST |
|
| 347 |
- //* SEND_KIND = "A" |
|
| 348 |
- |
|
| 349 |
- // 전체 영역 |
|
| 350 |
- model.addAttribute("A_allSentCntVO", this.getResultCntProc(A_totalMsgCnt));
|
|
| 351 |
- // 전체 단문(SMS) |
|
| 352 |
- model.addAttribute("A_smsSentCntVO", this.getResultCntProc(A_smsMsgCnt));
|
|
| 353 |
- // 전체 장문(LMS) |
|
| 354 |
- model.addAttribute("A_lmsSentCntVO", this.getResultCntProc(A_lmsMsgCnt));
|
|
| 355 |
- // 전체 장문(LMS) |
|
| 356 |
- model.addAttribute("A_mmsSentCntVO", this.getResultCntProc(A_mmsMsgCnt));
|
|
| 357 |
- |
|
| 358 |
- |
|
| 359 |
- |
|
| 360 |
- |
|
| 361 |
- /*<isEqual prepend="AND" property="searchCondition" compareValue="2"> |
|
| 362 |
- a.mber_nm LIKE CONCAT('%',#searchKeyword#,'%')
|
|
| 363 |
- </isEqual> |
|
| 364 |
- */ |
|
| 365 |
- ApiKeyVO apiKeyVO = new ApiKeyVO(); |
|
| 366 |
- apiKeyVO.setMberId(userId); |
|
| 367 |
- model.addAttribute("appMgmt", apiKeyMngService.selectMberApiKeyChk(apiKeyVO) > 0 ? true : false);
|
|
| 368 |
- |
|
| 369 |
- |
|
| 370 |
- System.out.println("MsgSentView_HA_allSentAjax_end");
|
|
| 371 | 263 |
|
| 372 | 264 |
return "/web/msgsent/subcontent/MsgSentView_HA_allSentAjax"; |
| 373 | 265 |
} |
... | ... | @@ -395,14 +287,17 @@ |
| 395 | 287 |
cntVO.setWaitCnt(msgCnt.stream() |
| 396 | 288 |
.filter(f->"W".equals(f.getMsgResultSts())) |
| 397 | 289 |
.mapToInt(t -> Integer.parseInt(t.getMsgResultCnt())).sum()); |
| 290 |
+ log.info(" :: cntVO.getWaitCnt() :: [{}]", cntVO.getWaitCnt());
|
|
| 398 | 291 |
// 전체 성공 갯수 |
| 399 | 292 |
cntVO.setSuccCnt(msgCnt.stream() |
| 400 | 293 |
.filter(f->"S".equals(f.getMsgResultSts())) |
| 401 | 294 |
.mapToInt(t -> Integer.parseInt(t.getMsgResultCnt())).sum()); |
| 295 |
+ log.info(" :: cntVO.getSuccCnt() :: [{}]", cntVO.getSuccCnt());
|
|
| 402 | 296 |
// 전체 실패 갯수 |
| 403 | 297 |
cntVO.setFailCnt(msgCnt.stream() |
| 404 | 298 |
.filter(f->"F".equals(f.getMsgResultSts())) |
| 405 | 299 |
.mapToInt(t -> Integer.parseInt(t.getMsgResultCnt())).sum()); |
| 300 |
+ log.info(" :: cntVO.getFailCnt() :: [{}]", cntVO.getFailCnt());
|
|
| 406 | 301 |
|
| 407 | 302 |
// 전체 갯수 구하기 |
| 408 | 303 |
cntVO.setTotCnt(cntVO.getWaitCnt() + cntVO.getSuccCnt() + cntVO.getFailCnt()); |
... | ... | @@ -421,89 +316,173 @@ |
| 421 | 316 |
@RequestMapping(value= {"/web/mjon/msgsent/selectMsgSentListViewAjax.do"})
|
| 422 | 317 |
public String selectMsgSentListViewAjax(@ModelAttribute("searchVO") MjonMsgSentVO mjonMsgSentVO, ModelMap model) throws Exception{
|
| 423 | 318 |
|
| 319 |
+ String pageUrl = ""; |
|
| 320 |
+ try {
|
|
| 321 |
+ |
|
| 322 |
+ |
|
| 323 |
+ log.info(" ListView pageIndex :: [{}]", mjonMsgSentVO.getPageIndex());
|
|
| 324 |
+ log.info(" ListView pageUnit :: [{}]", mjonMsgSentVO.getPageUnit());
|
|
| 325 |
+ |
|
| 326 |
+ |
|
| 327 |
+ //로그인 권한정보 불러오기 |
|
| 328 |
+ LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; |
|
| 329 |
+ String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 330 |
+ |
|
| 331 |
+ mjonMsgSentVO.setUserId(userId); |
|
| 332 |
+ |
|
| 333 |
+ // 검색 리스트 불러오기 |
|
| 334 |
+// if(mjonMsgSentVO.getPageUnit() != 10) {
|
|
| 335 |
+// mjonMsgSentVO.setPageUnit(mjonMsgSentVO.getPageUnit()); |
|
| 336 |
+// } |
|
| 337 |
+ |
|
| 338 |
+ //기본 내림차순 정렬 |
|
| 339 |
+ if(StringUtils.isEmpty(mjonMsgSentVO.getSearchSortOrd())) {
|
|
| 340 |
+ |
|
| 341 |
+ mjonMsgSentVO.setSearchSortOrd("desc");
|
|
| 342 |
+ mjonMsgSentVO.setSearchSortCnd("B.REQ_DATE");
|
|
| 343 |
+ } |
|
| 344 |
+ |
|
| 345 |
+ |
|
| 346 |
+ //선택 탭 정보 저장 |
|
| 347 |
+ //mjonResvMsgVO.setSearchMsgType(mjonResvMsgVO.getTabType()); |
|
| 348 |
+ |
|
| 349 |
+ /** pageing */ |
|
| 350 |
+ PaginationInfo paginationInfo = new PaginationInfo(); |
|
| 351 |
+ paginationInfo.setCurrentPageNo(mjonMsgSentVO.getPageIndex()); |
|
| 352 |
+ paginationInfo.setRecordCountPerPage(mjonMsgSentVO.getPageUnit()); |
|
| 353 |
+ paginationInfo.setPageSize(mjonMsgSentVO.getPageSize()); |
|
| 354 |
+ |
|
| 355 |
+ mjonMsgSentVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); |
|
| 356 |
+ mjonMsgSentVO.setLastIndex(paginationInfo.getLastRecordIndex()); |
|
| 357 |
+ mjonMsgSentVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); |
|
| 358 |
+ |
|
| 359 |
+ if(!DateUtils.dateChkAndValueChk(mjonMsgSentVO.getSearchStartDate(),mjonMsgSentVO.getSearchEndDate(), 3 )) {
|
|
| 360 |
+ mjonMsgSentVO.setSearchStartDate(DateUtils.getDateMonthsAgo(3)); |
|
| 361 |
+ mjonMsgSentVO.setSearchEndDate(DateUtils.getCurrentDate()); |
|
| 362 |
+ }; |
|
| 363 |
+ |
|
| 364 |
+ model.addAttribute("searchStartDate", mjonMsgSentVO.getSearchStartDate());
|
|
| 365 |
+ model.addAttribute("searchEndDate", mjonMsgSentVO.getSearchEndDate());
|
|
| 366 |
+ |
|
| 367 |
+ //전체 발송 리스트 불러오기 |
|
| 368 |
+ Map<String, Object> resultMap = mjonMsgSentService.selectAllMsgSentList_advc(mjonMsgSentVO); |
|
| 369 |
+ |
|
| 370 |
+ |
|
| 371 |
+ model.addAttribute("resultAllSentList", resultMap.get("resultList"));
|
|
| 372 |
+ |
|
| 373 |
+ |
|
| 374 |
+ paginationInfo.setTotalRecordCount((Integer)resultMap.get("totalCnt"));
|
|
| 375 |
+ model.addAttribute("paginationInfo", paginationInfo);
|
|
| 376 |
+ model.addAttribute("totalRecordCount", paginationInfo.getTotalRecordCount());
|
|
| 377 |
+ |
|
| 378 |
+ model.addAttribute("mjonMsgSentVO", mjonMsgSentVO);
|
|
| 379 |
+ |
|
| 380 |
+ String stateType = mjonMsgSentVO.getStateType(); |
|
| 381 |
+ |
|
| 382 |
+ } catch (Exception e) {
|
|
| 383 |
+ e.printStackTrace(); |
|
| 384 |
+ // TODO: handle exception |
|
| 385 |
+ } |
|
| 386 |
+ |
|
| 387 |
+ return "web/msgsent/MsgSentAllListAjax"; |
|
| 388 |
+ } |
|
| 389 |
+ |
|
| 390 |
+ @RequestMapping(value= {"/web/mjon/msgsent/selectMsgSentListViewAjax_backup.do"})
|
|
| 391 |
+ public String selectMsgSentListViewAjax_backup(@ModelAttribute("searchVO") MjonMsgSentVO mjonMsgSentVO, ModelMap model) throws Exception{
|
|
| 392 |
+ |
|
| 393 |
+ |
|
| 394 |
+ |
|
| 395 |
+ |
|
| 424 | 396 |
//로그인 권한정보 불러오기 |
| 425 |
- LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; |
|
| 426 |
- String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 427 |
- |
|
| 428 |
- mjonMsgSentVO.setUserId(userId); |
|
| 429 |
- |
|
| 430 |
- // 검색 리스트 불러오기 |
|
| 397 |
+ LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; |
|
| 398 |
+ String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 399 |
+ |
|
| 400 |
+ mjonMsgSentVO.setUserId(userId); |
|
| 401 |
+ |
|
| 402 |
+ // 검색 리스트 불러오기 |
|
| 431 | 403 |
if(mjonMsgSentVO.getPageUnit() != 10) {
|
| 432 | 404 |
mjonMsgSentVO.setPageUnit(mjonMsgSentVO.getPageUnit()); |
| 433 | 405 |
} |
| 434 | 406 |
|
| 435 |
- //기본 내림차순 정렬 |
|
| 436 |
- if(mjonMsgSentVO.getSearchSortOrd().equals("")) {
|
|
| 437 |
- |
|
| 438 |
- mjonMsgSentVO.setSearchSortOrd("desc");
|
|
| 439 |
- mjonMsgSentVO.setSearchSortCnd("regdate");
|
|
| 440 |
- } |
|
| 441 |
- |
|
| 442 |
- if(mjonMsgSentVO.getListType().equals("")) {
|
|
| 443 |
- |
|
| 444 |
- mjonMsgSentVO.setListType("groupList");
|
|
| 445 |
- |
|
| 446 |
- } |
|
| 447 |
- |
|
| 448 |
- //선택 탭 정보 저장 |
|
| 449 |
- //mjonResvMsgVO.setSearchMsgType(mjonResvMsgVO.getTabType()); |
|
| 450 |
- |
|
| 407 |
+ //기본 내림차순 정렬 |
|
| 408 |
+ if(mjonMsgSentVO.getSearchSortOrd().equals("")) {
|
|
| 409 |
+ |
|
| 410 |
+ mjonMsgSentVO.setSearchSortOrd("desc");
|
|
| 411 |
+ mjonMsgSentVO.setSearchSortCnd("regdate");
|
|
| 412 |
+ } |
|
| 413 |
+ |
|
| 414 |
+ if(mjonMsgSentVO.getListType().equals("")) {
|
|
| 415 |
+ |
|
| 416 |
+ mjonMsgSentVO.setListType("groupList");
|
|
| 417 |
+ |
|
| 418 |
+ } |
|
| 419 |
+ |
|
| 420 |
+ //선택 탭 정보 저장 |
|
| 421 |
+ //mjonResvMsgVO.setSearchMsgType(mjonResvMsgVO.getTabType()); |
|
| 422 |
+ |
|
| 451 | 423 |
/** pageing */ |
| 452 | 424 |
PaginationInfo paginationInfo = new PaginationInfo(); |
| 453 | 425 |
paginationInfo.setCurrentPageNo(mjonMsgSentVO.getPageIndex()); |
| 454 | 426 |
paginationInfo.setRecordCountPerPage(mjonMsgSentVO.getPageUnit()); |
| 455 | 427 |
paginationInfo.setPageSize(mjonMsgSentVO.getPageSize()); |
| 456 |
- |
|
| 428 |
+ |
|
| 457 | 429 |
mjonMsgSentVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); |
| 458 | 430 |
mjonMsgSentVO.setLastIndex(paginationInfo.getLastRecordIndex()); |
| 459 | 431 |
mjonMsgSentVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); |
| 460 |
- |
|
| 432 |
+ |
|
| 461 | 433 |
|
| 462 | 434 |
|
| 463 | 435 |
if(!DateUtils.dateChkAndValueChk(mjonMsgSentVO.getStartDate(),mjonMsgSentVO.getEndDate(), 3 )) {
|
| 464 | 436 |
mjonMsgSentVO.setStartDate(DateUtils.getDateMonthsAgo(3)); |
| 465 | 437 |
mjonMsgSentVO.setEndDate(DateUtils.getCurrentDate()); |
| 466 | 438 |
}; |
| 467 |
- |
|
| 468 |
- model.addAttribute("startDate", mjonMsgSentVO.getStartDate());
|
|
| 469 |
- model.addAttribute("endDate", mjonMsgSentVO.getEndDate());
|
|
| 470 | 439 |
|
| 471 |
- //전체 발송 리스트 불러오기 |
|
| 472 |
- List<MjonMsgSentVO> resultAllSentList = mjonMsgSentService.selectAllMsgSentList(mjonMsgSentVO); |
|
| 473 |
- model.addAttribute("resultAllSentList", resultAllSentList);
|
|
| 474 |
- model.addAttribute("resultAllSentCnt", resultAllSentList.size());
|
|
| 475 |
- |
|
| 476 |
- model.addAttribute("searchKeyword", mjonMsgSentVO.getSearchKeyword());
|
|
| 477 |
- paginationInfo.setTotalRecordCount( resultAllSentList.size()> 0 ? (Integer.parseInt((resultAllSentList.get(0)).getTotMsgCnt())) : 0); |
|
| 478 |
- model.addAttribute("paginationInfo", paginationInfo);
|
|
| 479 |
- model.addAttribute("totalRecordCount", paginationInfo.getTotalRecordCount());
|
|
| 480 |
- |
|
| 481 |
- //발송 결과 성공 실패 건수 리스트 불러오기 |
|
| 482 |
- List<MjonMsgSentVO> resultMsgSucFailList = new ArrayList<MjonMsgSentVO>(); |
|
| 483 |
- |
|
| 484 |
- if(resultAllSentList.size() > 0) {
|
|
| 485 |
- resultMsgSucFailList = mjonMsgSentService.selectAllMsgSentSucFailList(resultAllSentList, mjonMsgSentVO); |
|
| 486 |
- } |
|
| 487 |
- model.addAttribute("resultMsgSucFailList", resultMsgSucFailList);
|
|
| 488 |
- |
|
| 489 |
- model.addAttribute("mjonMsgSentVO", mjonMsgSentVO);
|
|
| 490 |
- |
|
| 491 |
- String stateType = mjonMsgSentVO.getStateType(); |
|
| 492 |
- String pageUrl = "web/msgsent/MsgSentAllListAjax"; |
|
| 493 |
- |
|
| 494 |
- if(stateType.equals("ready")) {
|
|
| 495 |
- |
|
| 496 |
- pageUrl = "web/msgsent/MsgSentReadyListAjax"; |
|
| 497 |
- |
|
| 498 |
- }else if(stateType.equals("complete")) {
|
|
| 499 |
- |
|
| 500 |
- pageUrl = "web/msgsent/MsgSentCompleteListAjax"; |
|
| 501 |
- |
|
| 502 |
- }else if(stateType.equals("fail")) {
|
|
| 503 |
- |
|
| 504 |
- pageUrl = "web/msgsent/MsgSentFailListAjax"; |
|
| 505 |
- |
|
| 506 |
- } |
|
| 440 |
+ model.addAttribute("startDate", mjonMsgSentVO.getStartDate());
|
|
| 441 |
+ model.addAttribute("endDate", mjonMsgSentVO.getEndDate());
|
|
| 442 |
+ |
|
| 443 |
+ //전체 발송 리스트 불러오기 |
|
| 444 |
+ List<MjonMsgSentVO> resultAllSentList = mjonMsgSentService.selectAllMsgSentList(mjonMsgSentVO); |
|
| 445 |
+ |
|
| 446 |
+ |
|
| 447 |
+ model.addAttribute("resultAllSentList", resultAllSentList);
|
|
| 448 |
+ model.addAttribute("resultAllSentCnt", resultAllSentList.size());
|
|
| 449 |
+ |
|
| 450 |
+ model.addAttribute("searchKeyword", mjonMsgSentVO.getSearchKeyword());
|
|
| 451 |
+ paginationInfo.setTotalRecordCount( resultAllSentList.size()> 0 ? (Integer.parseInt((resultAllSentList.get(0)).getTotMsgCnt())) : 0); |
|
| 452 |
+ model.addAttribute("paginationInfo", paginationInfo);
|
|
| 453 |
+ model.addAttribute("totalRecordCount", paginationInfo.getTotalRecordCount());
|
|
| 454 |
+ |
|
| 455 |
+ //발송 결과 성공 실패 건수 리스트 불러오기 |
|
| 456 |
+ List<MjonMsgSentVO> resultMsgSucFailList = new ArrayList<MjonMsgSentVO>(); |
|
| 457 |
+ |
|
| 458 |
+ if(resultAllSentList.size() > 0) {
|
|
| 459 |
+ System.out.println("=====resultMsgSucFailList=====");
|
|
| 460 |
+ resultMsgSucFailList = mjonMsgSentService.selectAllMsgSentSucFailList(resultAllSentList, mjonMsgSentVO); |
|
| 461 |
+ System.out.println("//=====resultMsgSucFailList=====");
|
|
| 462 |
+ } |
|
| 463 |
+ model.addAttribute("resultMsgSucFailList", resultMsgSucFailList);
|
|
| 464 |
+ |
|
| 465 |
+ model.addAttribute("mjonMsgSentVO", mjonMsgSentVO);
|
|
| 466 |
+ |
|
| 467 |
+ String stateType = mjonMsgSentVO.getStateType(); |
|
| 468 |
+ // String pageUrl = "web/msgsent/MsgSentAllListAjax"; |
|
| 469 |
+ String pageUrl = "web/msgsent/MsgSentAllListAjax"; |
|
| 470 |
+ |
|
| 471 |
+ if(stateType.equals("ready")) {
|
|
| 472 |
+ |
|
| 473 |
+ pageUrl = "web/msgsent/MsgSentReadyListAjax"; |
|
| 474 |
+ |
|
| 475 |
+ }else if(stateType.equals("complete")) {
|
|
| 476 |
+ |
|
| 477 |
+ pageUrl = "web/msgsent/MsgSentCompleteListAjax"; |
|
| 478 |
+ |
|
| 479 |
+ }else if(stateType.equals("fail")) {
|
|
| 480 |
+ |
|
| 481 |
+ pageUrl = "web/msgsent/MsgSentFailListAjax"; |
|
| 482 |
+ |
|
| 483 |
+ } |
|
| 484 |
+ |
|
| 485 |
+ log.info(" :: pageUrl [{}]", pageUrl);
|
|
| 507 | 486 |
return pageUrl; |
| 508 | 487 |
} |
| 509 | 488 |
|
... | ... | @@ -621,6 +600,9 @@ |
| 621 | 600 |
|
| 622 | 601 |
return "web/msgsent/MsgSentDetailPopAjax"; |
| 623 | 602 |
} |
| 603 |
+ |
|
| 604 |
+ |
|
| 605 |
+ |
|
| 624 | 606 |
|
| 625 | 607 |
/** |
| 626 | 608 |
* 발송관리 문자 상세보기 내용 |
... | ... | @@ -1138,320 +1120,9 @@ |
| 1138 | 1120 |
|
| 1139 | 1121 |
} |
| 1140 | 1122 |
|
| 1141 |
- String stateType = mjonMsgSentVO.getStateType(); |
|
| 1142 |
- String tabType = mjonMsgSentVO.getTabType(); |
|
| 1143 | 1123 |
|
| 1144 |
- // 메모리에 100개의 행을 유지합니다. 행의 수가 넘으면 디스크에 적습니다. |
|
| 1145 |
- SXSSFWorkbook wb = new SXSSFWorkbook(100); |
|
| 1146 |
- String fileName ="발송관리 엑셀 리스트"; // 저장 파일명 |
|
| 1147 |
- String sheetTitle = "문자 발송 내역" ; // 셀 제목 |
|
| 1148 |
- Sheet sheet = wb.createSheet(sheetTitle); |
|
| 1149 |
- Cell cell = null; |
|
| 1150 |
- Row row = null; |
|
| 1151 |
- |
|
| 1152 |
- CellStyle style = wb.createCellStyle(); |
|
| 1153 |
- style.setBorderBottom(CellStyle.BORDER_THIN); //테두리 두껍게 |
|
| 1154 |
- style.setBorderLeft(CellStyle.BORDER_THIN); |
|
| 1155 |
- style.setBorderRight(CellStyle.BORDER_THIN); |
|
| 1156 |
- style.setBorderTop(CellStyle.BORDER_THIN); |
|
| 1157 |
- |
|
| 1158 |
- // 정렬 |
|
| 1159 |
- style.setAlignment(CellStyle.ALIGN_CENTER); //가운데 정렬 |
|
| 1160 |
- style.setVerticalAlignment(CellStyle.VERTICAL_CENTER); //높이 가운데 정렬 |
|
| 1161 |
- |
|
| 1162 |
- Font font = wb.createFont(); |
|
| 1163 |
- font.setBoldweight(Font.BOLDWEIGHT_BOLD); //글씨 bold |
|
| 1164 |
- |
|
| 1165 |
- |
|
| 1166 |
- String type = ""; |
|
| 1167 |
- String fCnt = ""; |
|
| 1168 |
- |
|
| 1169 |
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
|
| 1170 |
- |
|
| 1171 |
- try{
|
|
| 1172 |
- |
|
| 1173 |
- |
|
| 1174 |
- mjonMsgSentVO.setRecordCountPerPage(100000); |
|
| 1175 |
- mjonMsgSentVO.setFirstIndex(0); |
|
| 1176 |
- |
|
| 1177 |
- if("".equals(mjonMsgSentVO.getSearchSortCnd())){ //최초조회시 최신것 조회List
|
|
| 1178 |
- mjonMsgSentVO.setSearchSortCnd("regdate");
|
|
| 1179 |
- mjonMsgSentVO.setSearchSortOrd("desc");
|
|
| 1180 |
- } |
|
| 1181 |
- |
|
| 1182 |
- //예약 관리 리스트 불러오기 |
|
| 1183 |
- List<MjonMsgSentVO> resultAllSentList = mjonMsgSentService.selectAllMsgSentList(mjonMsgSentVO); |
|
| 1184 |
- |
|
| 1185 |
- {//화면 리스트
|
|
| 1186 |
- |
|
| 1187 |
- row = sheet.createRow(0); |
|
| 1188 |
- |
|
| 1189 |
- sheet.setColumnWidth(1, 5000); // 발송일시 칼럼의 폭 조절 |
|
| 1190 |
- sheet.setColumnWidth(3, 10000); // 내용 칼럼의 폭 조절 |
|
| 1191 |
- sheet.setColumnWidth(4, 5000); // 받는사람 이름 칼럼의 폭 조절 |
|
| 1192 |
- sheet.setColumnWidth(5, 5000); // 받는사람 연락처 칼럼의 폭 조절 |
|
| 1193 |
- sheet.setColumnWidth(6, 5000); // 발신번호 칼럼의 폭 조절 |
|
| 1194 |
- sheet.setColumnWidth(7, 5000); // 발송상태 칼럼의 폭 조절 |
|
| 1195 |
- sheet.setColumnWidth(8, 5000); // 발송건수 칼럼의 폭 조절 |
|
| 1196 |
- |
|
| 1197 |
- //셀병합 처리 |
|
| 1198 |
- sheet.addMergedRegion(new CellRangeAddress(0,1,0,0)); //번호 세로 셀병합 |
|
| 1199 |
- sheet.addMergedRegion(new CellRangeAddress(0,1,1,1)); //발송일시 세로 셀병합 |
|
| 1200 |
- sheet.addMergedRegion(new CellRangeAddress(0,1,2,2)); //형태 세로 셀병합 |
|
| 1201 |
- sheet.addMergedRegion(new CellRangeAddress(0,1,3,3)); //내용 세로 셀병합 |
|
| 1202 |
- sheet.addMergedRegion(new CellRangeAddress(0,1,4,4)); //받는사람 이름 셀병합 |
|
| 1203 |
- sheet.addMergedRegion(new CellRangeAddress(0,1,5,5)); //받는사람 연락처 셀병합 |
|
| 1204 |
- sheet.addMergedRegion(new CellRangeAddress(0,1,6,6)); //발신번호 세로 셀병합 |
|
| 1205 |
- sheet.addMergedRegion(new CellRangeAddress(0,1,7,7)); //발송상태 세로 셀병합 |
|
| 1206 |
- sheet.addMergedRegion(new CellRangeAddress(0,1,8,8)); //발송건수 세로 셀병합 |
|
| 1207 |
- |
|
| 1208 |
- |
|
| 1209 |
- cell = row.createCell(0); |
|
| 1210 |
- cell.setCellValue("번호");
|
|
| 1211 |
- cell.setCellStyle(style); |
|
| 1212 |
- |
|
| 1213 |
- cell = row.createCell(1); |
|
| 1214 |
- cell.setCellValue("발송일시");
|
|
| 1215 |
- cell.setCellStyle(style); |
|
| 1216 |
- |
|
| 1217 |
- cell = row.createCell(2); |
|
| 1218 |
- cell.setCellValue("형태");
|
|
| 1219 |
- cell.setCellStyle(style); |
|
| 1220 |
- |
|
| 1221 |
- cell = row.createCell(3); |
|
| 1222 |
- cell.setCellValue("내용");
|
|
| 1223 |
- cell.setCellStyle(style); |
|
| 1224 |
- |
|
| 1225 |
- cell = row.createCell(4); |
|
| 1226 |
- cell.setCellValue("수신자");
|
|
| 1227 |
- cell.setCellStyle(style); |
|
| 1228 |
- |
|
| 1229 |
- cell = row.createCell(5); |
|
| 1230 |
- cell.setCellValue("수신번호");
|
|
| 1231 |
- cell.setCellStyle(style); |
|
| 1232 |
- |
|
| 1233 |
- cell = row.createCell(6); |
|
| 1234 |
- cell.setCellValue("발신번호");
|
|
| 1235 |
- cell.setCellStyle(style); |
|
| 1236 |
- |
|
| 1237 |
- cell = row.createCell(7); |
|
| 1238 |
- cell.setCellValue("발송상태");
|
|
| 1239 |
- cell.setCellStyle(style); |
|
| 1240 |
- |
|
| 1241 |
- cell = row.createCell(8); |
|
| 1242 |
- cell.setCellValue("발송건수");
|
|
| 1243 |
- cell.setCellStyle(style); |
|
| 1244 |
- |
|
| 1245 |
- cell = row.createCell(9); |
|
| 1246 |
- cell.setCellValue("발송결과");
|
|
| 1247 |
- sheet.addMergedRegion(new CellRangeAddress(0,0,9,10)); // 발송결과 건수 가로 셀병합 |
|
| 1248 |
- cell.setCellStyle(style); |
|
| 1249 |
- |
|
| 1250 |
- cell = row.createCell(10); |
|
| 1251 |
- cell.setCellStyle(style); |
|
| 1252 |
- |
|
| 1253 |
- cell = row.createCell(11); |
|
| 1254 |
- cell.setCellValue("금액");
|
|
| 1255 |
- sheet.addMergedRegion(new CellRangeAddress(0,0,11,12)); // 발송결과 건수 가로 셀병합 |
|
| 1256 |
- cell.setCellStyle(style); |
|
| 1257 |
- |
|
| 1258 |
- cell = row.createCell(12); |
|
| 1259 |
- cell.setCellValue("예약취소");
|
|
| 1260 |
- cell.setCellStyle(style); |
|
| 1261 |
- |
|
| 1262 |
- row = sheet.createRow(1); |
|
| 1263 |
- |
|
| 1264 |
- cell = row.createCell(0); |
|
| 1265 |
- cell.setCellStyle(style); |
|
| 1266 |
- |
|
| 1267 |
- cell = row.createCell(1); |
|
| 1268 |
- cell.setCellStyle(style); |
|
| 1269 |
- |
|
| 1270 |
- cell = row.createCell(2); |
|
| 1271 |
- cell.setCellStyle(style); |
|
| 1272 |
- |
|
| 1273 |
- cell = row.createCell(3); |
|
| 1274 |
- cell.setCellStyle(style); |
|
| 1275 |
- |
|
| 1276 |
- cell = row.createCell(4); |
|
| 1277 |
- cell.setCellStyle(style); |
|
| 1278 |
- |
|
| 1279 |
- cell = row.createCell(5); |
|
| 1280 |
- cell.setCellStyle(style); |
|
| 1281 |
- |
|
| 1282 |
- cell = row.createCell(6); |
|
| 1283 |
- cell.setCellStyle(style); |
|
| 1284 |
- |
|
| 1285 |
- cell = row.createCell(7); |
|
| 1286 |
- cell.setCellStyle(style); |
|
| 1287 |
- |
|
| 1288 |
- cell = row.createCell(8); |
|
| 1289 |
- cell.setCellStyle(style); |
|
| 1290 |
- |
|
| 1291 |
- cell = row.createCell(9); |
|
| 1292 |
- cell.setCellValue("성공");
|
|
| 1293 |
- cell.setCellStyle(style); |
|
| 1294 |
- |
|
| 1295 |
- cell = row.createCell(10); |
|
| 1296 |
- cell.setCellValue("실패/대기");
|
|
| 1297 |
- cell.setCellStyle(style); |
|
| 1298 |
- |
|
| 1299 |
- cell = row.createCell(11); |
|
| 1300 |
- cell.setCellValue("과금");
|
|
| 1301 |
- cell.setCellStyle(style); |
|
| 1302 |
- |
|
| 1303 |
- cell = row.createCell(12); |
|
| 1304 |
- cell.setCellValue("비과금");
|
|
| 1305 |
- cell.setCellStyle(style); |
|
| 1306 |
- } |
|
| 1307 |
- |
|
| 1308 |
- for(int i=0; i < resultAllSentList.size(); i++) {
|
|
| 1309 |
- String msgType = "단문"; |
|
| 1310 |
- if(resultAllSentList.get(i).getMsgType().equals("6") && resultAllSentList.get(i).getFileCnt().equals("0")) {
|
|
| 1311 |
- msgType = "장문"; |
|
| 1312 |
- }else if(resultAllSentList.get(i).getMsgType().equals("6") && !resultAllSentList.get(i).getFileCnt().equals("0")) {
|
|
| 1313 |
- msgType = "그림"; |
|
| 1314 |
- } |
|
| 1315 |
- |
|
| 1316 |
- |
|
| 1317 |
- int excelLen = 0; |
|
| 1318 |
- row = sheet.createRow(i+2); |
|
| 1319 |
- excelLen = 12; |
|
| 1320 |
- |
|
| 1321 |
- for(int j=0 ; j <= excelLen ; j++) {
|
|
| 1322 |
- cell = row.createCell(j); |
|
| 1323 |
- cell.setCellStyle(style); |
|
| 1324 |
- |
|
| 1325 |
- if(j==0) cell.setCellValue(i+1); //번호 |
|
| 1326 |
- if(j==1) cell.setCellValue(sdf.format((resultAllSentList.get(i)).getReqdate())); //발송일자 |
|
| 1327 |
- if(j==2) {
|
|
| 1328 |
- |
|
| 1329 |
- type = resultAllSentList.get(i).getMsgType(); |
|
| 1330 |
- fCnt = resultAllSentList.get(i).getFileCnt(); |
|
| 1331 |
- |
|
| 1332 |
- if(type.equals("4")) {
|
|
| 1333 |
- |
|
| 1334 |
- cell.setCellValue("단문"); //형태
|
|
| 1335 |
- |
|
| 1336 |
- }else {
|
|
| 1337 |
- |
|
| 1338 |
- if(fCnt.equals("0")) {
|
|
| 1339 |
- |
|
| 1340 |
- cell.setCellValue("장문"); //형태
|
|
| 1341 |
- |
|
| 1342 |
- }else {
|
|
| 1343 |
- |
|
| 1344 |
- cell.setCellValue("그림"); //형태
|
|
| 1345 |
- |
|
| 1346 |
- } |
|
| 1347 |
- |
|
| 1348 |
- } |
|
| 1349 |
- |
|
| 1350 |
- } |
|
| 1351 |
- if(j==3) cell.setCellValue((resultAllSentList.get(i)).getSmsTxt()); //내용 |
|
| 1352 |
- if(j==4) cell.setCellValue((resultAllSentList.get(i)).getAddrNm()); |
|
| 1353 |
- if(j==5) cell.setCellValue((resultAllSentList.get(i)).getCallToComma()); |
|
| 1354 |
- if(j==6) cell.setCellValue((resultAllSentList.get(i)).getCallFromComma()); //발신번호 |
|
| 1355 |
- if(j==7) { //발송상태 처리해주기
|
|
| 1356 |
- |
|
| 1357 |
- String resvCYn = resultAllSentList.get(i).getReserveCYn(); |
|
| 1358 |
- String curState = resultAllSentList.get(i).getCurState(); |
|
| 1359 |
- |
|
| 1360 |
- if(resvCYn.equals("Y")) {
|
|
| 1361 |
- |
|
| 1362 |
- cell.setCellValue("예약 취소"); //발송상태
|
|
| 1363 |
- |
|
| 1364 |
- }else {
|
|
| 1365 |
- |
|
| 1366 |
- if(curState.equals("0")) {
|
|
| 1367 |
- |
|
| 1368 |
- cell.setCellValue("발송 대기"); //발송상태
|
|
| 1369 |
- |
|
| 1370 |
- }else if(curState.equals("1")) {
|
|
| 1371 |
- |
|
| 1372 |
- cell.setCellValue("발송중"); //발송상태
|
|
| 1373 |
- |
|
| 1374 |
- }else if(curState.equals("2")) {
|
|
| 1375 |
- |
|
| 1376 |
- cell.setCellValue("결과 대기"); //발송상태
|
|
| 1377 |
- |
|
| 1378 |
- }else if(curState.equals("3")) {
|
|
| 1379 |
- |
|
| 1380 |
- cell.setCellValue("발송 완료"); //발송상태
|
|
| 1381 |
- |
|
| 1382 |
- } |
|
| 1383 |
- } |
|
| 1384 |
- |
|
| 1385 |
- } |
|
| 1386 |
- if(j==8) cell.setCellValue((resultAllSentList.get(i)).getMsgGroupCnt()); //발송건수 |
|
| 1387 |
- |
|
| 1388 |
- //발송결과 성공, 실패 처리 |
|
| 1389 |
- int resSucCnt = 0; |
|
| 1390 |
- int resFailCnt = 0; |
|
| 1391 |
- double resSucPrice = 0; |
|
| 1392 |
- double resFailPirce = 0; |
|
| 1393 |
- |
|
| 1394 |
- |
|
| 1395 |
- double eachPrice = Float.parseFloat(resultAllSentList.get(i).getEachPrice()); |
|
| 1396 |
- int resultSValue = 0; |
|
| 1397 |
- int resultWFValue = 0; |
|
| 1398 |
- |
|
| 1399 |
- if(resultAllSentList.get(i).getResultSValue() != null) {
|
|
| 1400 |
- resultSValue = Integer.parseInt(resultAllSentList.get(i).getResultSValue()); |
|
| 1401 |
- }else {
|
|
| 1402 |
- resultSValue = 1; |
|
| 1403 |
- } |
|
| 1404 |
- |
|
| 1405 |
- if(resultAllSentList.get(i).getResultWFValue() != null) {
|
|
| 1406 |
- resultWFValue = Integer.parseInt(resultAllSentList.get(i).getResultWFValue()); |
|
| 1407 |
- }else {
|
|
| 1408 |
- resultWFValue = 1; |
|
| 1409 |
- } |
|
| 1410 |
- |
|
| 1411 |
- |
|
| 1412 |
- if("S".equals(resultAllSentList.get(i).getMsgResult())) {
|
|
| 1413 |
- resSucCnt = resultSValue; |
|
| 1414 |
- } else {
|
|
| 1415 |
- resFailCnt = resultWFValue; |
|
| 1416 |
- } |
|
| 1417 |
- |
|
| 1418 |
- resSucPrice = eachPrice * resSucCnt; |
|
| 1419 |
- resFailPirce = eachPrice * resFailCnt; |
|
| 1420 |
- |
|
| 1421 |
- |
|
| 1422 |
- if(j==9) cell.setCellValue(resSucCnt); //발송결과 성공 |
|
| 1423 |
- if(j==10) cell.setCellValue(resFailCnt); //발송결과 실패 |
|
| 1424 |
- if(j==11) cell.setCellValue(resSucPrice); // 과금 금액 |
|
| 1425 |
- if(j==12) cell.setCellValue(resFailPirce); //비과금 금액 |
|
| 1426 |
- } |
|
| 1427 |
- } |
|
| 1428 |
- response.setHeader("Set-Cookie", "fileDownload=true; path=/");
|
|
| 1429 |
- SimpleDateFormat mSimpleDateFormat = new SimpleDateFormat ( "yyyyMMdd_HHmmss", Locale.KOREA ); |
|
| 1430 |
- Date currentTime = new Date (); |
|
| 1431 |
- String mTime = mSimpleDateFormat.format ( currentTime ); |
|
| 1432 |
- fileName = fileName+"("+mTime+")";
|
|
| 1433 |
- |
|
| 1434 |
- response.setHeader("Content-Disposition", String.format("attachment; filename=\""+new String((fileName).getBytes("KSC5601"),"8859_1")+".xlsx"));
|
|
| 1435 |
- wb.write(response.getOutputStream()); |
|
| 1436 |
- }catch(Exception e) {
|
|
| 1437 |
- response.setHeader("Set-Cookie", "fileDownload=false; path=/");
|
|
| 1438 |
- response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
|
|
| 1439 |
- response.setHeader("Content-Type","text/html; charset=utf-8");
|
|
| 1440 |
- OutputStream out = null; |
|
| 1441 |
- try {
|
|
| 1442 |
- out = response.getOutputStream(); |
|
| 1443 |
- byte[] data = new String("fail..").getBytes();
|
|
| 1444 |
- out.write(data, 0, data.length); |
|
| 1445 |
- } catch(Exception ignore) {
|
|
| 1446 |
- ignore.printStackTrace(); |
|
| 1447 |
- } finally {
|
|
| 1448 |
- if(out != null) try { out.close(); } catch(Exception ignore) {}
|
|
| 1449 |
- } |
|
| 1450 |
- }finally {
|
|
| 1451 |
- // 디스크 적었던 임시파일을 제거합니다. |
|
| 1452 |
- wb.dispose(); |
|
| 1453 |
- try { wb.close(); } catch(Exception ignore) {}
|
|
| 1454 |
- } |
|
| 1124 |
+ mjonMsgSentService.msgSentExcelDownLoad(mjonMsgSentVO, response); |
|
| 1125 |
+ |
|
| 1455 | 1126 |
|
| 1456 | 1127 |
|
| 1457 | 1128 |
} |
--- src/main/java/itn/let/mjo/pay/web/MjonPayController.java
+++ src/main/java/itn/let/mjo/pay/web/MjonPayController.java
... | ... | @@ -13,11 +13,9 @@ |
| 13 | 13 |
import java.text.NumberFormat; |
| 14 | 14 |
import java.text.SimpleDateFormat; |
| 15 | 15 |
import java.time.LocalDate; |
| 16 |
-import java.time.LocalDateTime; |
|
| 17 | 16 |
import java.util.ArrayList; |
| 18 | 17 |
import java.util.Calendar; |
| 19 | 18 |
import java.util.Date; |
| 20 |
-import java.util.HashMap; |
|
| 21 | 19 |
import java.util.List; |
| 22 | 20 |
import java.util.Locale; |
| 23 | 21 |
import java.util.Map; |
... | ... | @@ -41,18 +39,12 @@ |
| 41 | 39 |
import org.json.simple.parser.JSONParser; |
| 42 | 40 |
import org.slf4j.Logger; |
| 43 | 41 |
import org.slf4j.LoggerFactory; |
| 44 |
-import org.springframework.http.HttpStatus; |
|
| 45 |
-import org.springframework.http.MediaType; |
|
| 46 |
-import org.springframework.http.ResponseEntity; |
|
| 47 | 42 |
import org.springframework.stereotype.Controller; |
| 48 | 43 |
import org.springframework.ui.Model; |
| 49 | 44 |
import org.springframework.ui.ModelMap; |
| 50 | 45 |
import org.springframework.web.bind.annotation.ModelAttribute; |
| 51 |
-import org.springframework.web.bind.annotation.RequestBody; |
|
| 52 | 46 |
import org.springframework.web.bind.annotation.RequestMapping; |
| 53 |
-import org.springframework.web.bind.annotation.RequestMethod; |
|
| 54 | 47 |
import org.springframework.web.bind.annotation.RequestParam; |
| 55 |
-import org.springframework.web.bind.annotation.ResponseBody; |
|
| 56 | 48 |
import org.springframework.web.multipart.MultipartFile; |
| 57 | 49 |
import org.springframework.web.multipart.MultipartHttpServletRequest; |
| 58 | 50 |
import org.springframework.web.servlet.HandlerMapping; |
... | ... | @@ -67,7 +59,6 @@ |
| 67 | 59 |
import itn.com.cmm.ComDefaultCodeVO; |
| 68 | 60 |
import itn.com.cmm.EgovMessageSource; |
| 69 | 61 |
import itn.com.cmm.LoginVO; |
| 70 |
-import itn.com.cmm.RestResponse; |
|
| 71 | 62 |
import itn.com.cmm.service.EgovCmmUseService; |
| 72 | 63 |
import itn.com.cmm.service.FileVO; |
| 73 | 64 |
import itn.com.cmm.util.DateUtils; |
... | ... | @@ -76,8 +67,6 @@ |
| 76 | 67 |
import itn.com.cmm.util.RedirectUrlMaker; |
| 77 | 68 |
import itn.com.cmm.util.StringUtil; |
| 78 | 69 |
import itn.com.utl.fcc.service.EgovStringUtil; |
| 79 |
-import itn.let.fax.admin.service.FaxStatVO; |
|
| 80 |
-import itn.let.mail.service.StatusResponse; |
|
| 81 | 70 |
import itn.let.mjo.mjocommon.MjonCommon; |
| 82 | 71 |
import itn.let.mjo.msg.service.MjonMsgService; |
| 83 | 72 |
import itn.let.mjo.msg.service.MjonMsgVO; |
... | ... | @@ -107,6 +96,7 @@ |
| 107 | 96 |
import itn.let.uss.umt.service.MberManageVO; |
| 108 | 97 |
import itn.let.uss.umt.service.UserManageVO; |
| 109 | 98 |
import itn.let.utl.fcc.service.EgovCryptoUtil; |
| 99 |
+import itn.let.utl.user.service.ExcelUtil; |
|
| 110 | 100 |
import itn.let.utl.user.service.MjonNoticeSendUtil; |
| 111 | 101 |
|
| 112 | 102 |
@Controller |
... | ... | @@ -1952,7 +1942,6 @@ |
| 1952 | 1942 |
|
| 1953 | 1943 |
model.addAttribute("prePaymentYn", userManageVO.getPrePaymentYn());
|
| 1954 | 1944 |
|
| 1955 |
- |
|
| 1956 | 1945 |
System.out.println("pattern :: "+ pattern);
|
| 1957 | 1946 |
if(pattern.equals("/web/member/pay/PayListAllAjax.do")
|
| 1958 | 1947 |
|| pattern.equals("/web/member/pay/PayListMobileAjax.do")
|
... | ... | @@ -2051,7 +2040,7 @@ |
| 2051 | 2040 |
|
| 2052 | 2041 |
return "/web/pay/PayListRefundAjax"; |
| 2053 | 2042 |
} |
| 2054 |
- |
|
| 2043 |
+ |
|
| 2055 | 2044 |
//일반 결제 페이지 처리 |
| 2056 | 2045 |
if("".equals(mjonPayVO.getSearchSortCnd())){ //최초조회시 최신것 조회List
|
| 2057 | 2046 |
mjonPayVO.setSearchSortCnd("moid");
|
... | ... | @@ -2073,7 +2062,7 @@ |
| 2073 | 2062 |
} |
| 2074 | 2063 |
|
| 2075 | 2064 |
} |
| 2076 |
- |
|
| 2065 |
+ |
|
| 2077 | 2066 |
if(pattern.equals("/web/member/pay/PayListAllAjax.do")) { //전체
|
| 2078 | 2067 |
mjonPayVO.setPageType("all");
|
| 2079 | 2068 |
} |
... | ... | @@ -2121,7 +2110,7 @@ |
| 2121 | 2110 |
|
| 2122 | 2111 |
// mjonPayVO.setStartDate(mjonPayVO.getStartDate() == null ? DateUtil.getDateDaysAgo(365) : mjonPayVO.getStartDate()); |
| 2123 | 2112 |
// mjonPayVO.setEndDate(mjonPayVO.getEndDate() == null ? DateUtil.getCurrentDate() : mjonPayVO.getEndDate()); |
| 2124 |
- |
|
| 2113 |
+ |
|
| 2125 | 2114 |
if(!DateUtils.dateChkAndValueChk(mjonPayVO.getStartDate(),mjonPayVO.getEndDate(), 12 )) {
|
| 2126 | 2115 |
mjonPayVO.setStartDate(DateUtils.getDateMonthsAgo(12)); |
| 2127 | 2116 |
mjonPayVO.setEndDate(DateUtils.getCurrentDate()); |
... | ... | @@ -4085,7 +4074,7 @@ |
| 4085 | 4074 |
} |
| 4086 | 4075 |
|
| 4087 | 4076 |
//결제 엑셀 다운로드 |
| 4088 |
- @RequestMapping(value= {"/web/member/pay/PayExcelDownload.do"})
|
|
| 4077 |
+ @RequestMapping(value= {"/web/member/pay/PayExcelDownload_OLD.do"})
|
|
| 4089 | 4078 |
public void PayExcelDownload( MjonPayVO mjonPayVO, |
| 4090 | 4079 |
HttpServletRequest request, |
| 4091 | 4080 |
HttpServletResponse response , |
... | ... | @@ -4180,6 +4169,118 @@ |
| 4180 | 4169 |
} |
| 4181 | 4170 |
} |
| 4182 | 4171 |
|
| 4172 |
+ //결제 엑셀 다운로드 |
|
| 4173 |
+ @RequestMapping(value= {"/web/member/pay/PayExcelDownload.do"})
|
|
| 4174 |
+ public void PayNewExcelDownload( MjonPayVO mjonPayVO, |
|
| 4175 |
+ HttpServletRequest request, |
|
| 4176 |
+ HttpServletResponse response , |
|
| 4177 |
+ ModelMap model) throws Exception {
|
|
| 4178 |
+ |
|
| 4179 |
+ //로그인 여부 체크 및 ID 획득 |
|
| 4180 |
+ LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; |
|
| 4181 |
+ String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 4182 |
+ if(loginVO != null) {
|
|
| 4183 |
+ |
|
| 4184 |
+ String fileName ="결제내역 엑셀 리스트"; //file name |
|
| 4185 |
+ |
|
| 4186 |
+ try{
|
|
| 4187 |
+ /** pageing */ |
|
| 4188 |
+ PaginationInfo paginationInfo = new PaginationInfo(); |
|
| 4189 |
+ paginationInfo.setCurrentPageNo(1); |
|
| 4190 |
+ paginationInfo.setRecordCountPerPage(10000); |
|
| 4191 |
+ paginationInfo.setPageSize(10); |
|
| 4192 |
+ |
|
| 4193 |
+ mjonPayVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); |
|
| 4194 |
+ mjonPayVO.setLastIndex(paginationInfo.getLastRecordIndex()); |
|
| 4195 |
+ mjonPayVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); |
|
| 4196 |
+ |
|
| 4197 |
+ mjonPayVO.setUserId(userId); |
|
| 4198 |
+ |
|
| 4199 |
+ |
|
| 4200 |
+ //url에 따른 타입 처리 |
|
| 4201 |
+ String pattern = (String) request.getAttribute(HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE); |
|
| 4202 |
+ System.out.println("pattern========");
|
|
| 4203 |
+ System.out.println(pattern); |
|
| 4204 |
+ |
|
| 4205 |
+ //url에 따른 검색 조건 처리 |
|
| 4206 |
+ mjonPayVO = this.p_checkSearchCnd(pattern, mjonPayVO); |
|
| 4207 |
+ |
|
| 4208 |
+ |
|
| 4209 |
+ //검색 기간 처리 |
|
| 4210 |
+ mjonPayVO = this.p_checkSearchDate(mjonPayVO); |
|
| 4211 |
+ |
|
| 4212 |
+ |
|
| 4213 |
+ //정렬 처리 |
|
| 4214 |
+ mjonPayVO = this.p_checkSortCnd(mjonPayVO); |
|
| 4215 |
+ |
|
| 4216 |
+ |
|
| 4217 |
+ //결과 리스트 정보 불러오기 |
|
| 4218 |
+ List<MjonPayVO> resultList = mjonPayService.selectPayList(mjonPayVO); |
|
| 4219 |
+ |
|
| 4220 |
+ //필요 컬럼 추가 |
|
| 4221 |
+ for (int i=0;i<resultList.size();i++) {
|
|
| 4222 |
+ MjonPayVO tMjonPayVO = resultList.get(i); |
|
| 4223 |
+ tMjonPayVO.setSeqNo(resultList.size()-i); |
|
| 4224 |
+ } |
|
| 4225 |
+ |
|
| 4226 |
+ //excel 만들기 |
|
| 4227 |
+ List<Object> excelData = new ArrayList<>(); |
|
| 4228 |
+ excelData.addAll(resultList); |
|
| 4229 |
+ // 세팅값 |
|
| 4230 |
+ String title = "요금결제내역"; //sheet name & title |
|
| 4231 |
+ |
|
| 4232 |
+ // 너비 |
|
| 4233 |
+ int[] width = {
|
|
| 4234 |
+ 4000 |
|
| 4235 |
+ , 4000 |
|
| 4236 |
+ , 4000 |
|
| 4237 |
+ , 4000 |
|
| 4238 |
+ , 4000 |
|
| 4239 |
+ |
|
| 4240 |
+ , 4000 |
|
| 4241 |
+ //, 4000 |
|
| 4242 |
+ , 4000 |
|
| 4243 |
+ }; |
|
| 4244 |
+ |
|
| 4245 |
+ // 헤더 |
|
| 4246 |
+ String[] header = {
|
|
| 4247 |
+ "번호" |
|
| 4248 |
+ , "결제일시" |
|
| 4249 |
+ , "결제방식" |
|
| 4250 |
+ , "결제금액" |
|
| 4251 |
+ , "충전금액" |
|
| 4252 |
+ |
|
| 4253 |
+ , "결제상태" |
|
| 4254 |
+ //, "증빙서류 발행 요청" |
|
| 4255 |
+ , "비고1" |
|
| 4256 |
+ }; |
|
| 4257 |
+ |
|
| 4258 |
+ // 컬럼명 |
|
| 4259 |
+ String[] order = {
|
|
| 4260 |
+ "SeqNo" |
|
| 4261 |
+ , "RegDate" |
|
| 4262 |
+ , "PayMethodTxt" |
|
| 4263 |
+ , "Amt" |
|
| 4264 |
+ , "Cash" |
|
| 4265 |
+ |
|
| 4266 |
+ , "PgStatusTxt" |
|
| 4267 |
+ //, "RcptTypeTxt" |
|
| 4268 |
+ , "VbankNum" |
|
| 4269 |
+ |
|
| 4270 |
+ }; |
|
| 4271 |
+ |
|
| 4272 |
+ // 호출 - download file 처리 |
|
| 4273 |
+ SXSSFWorkbook workbook = ExcelUtil.makeSimpleFruitExcelWorkbook(excelData , header, order, width, title); |
|
| 4274 |
+ response = this.p_makeResponse(response, fileName); |
|
| 4275 |
+ workbook.write(response.getOutputStream()); |
|
| 4276 |
+ |
|
| 4277 |
+ }catch(Exception e) {
|
|
| 4278 |
+ e.printStackTrace(); |
|
| 4279 |
+ } |
|
| 4280 |
+ |
|
| 4281 |
+ } |
|
| 4282 |
+ |
|
| 4283 |
+ } |
|
| 4183 | 4284 |
|
| 4184 | 4285 |
//포인트 교환내역 엑셀 다운로드 |
| 4185 | 4286 |
@RequestMapping(value= {"/web/member/pay/PointExcelDownload.do"})
|
... | ... | @@ -6088,6 +6189,119 @@ |
| 6088 | 6189 |
model.addAttribute("paginationInfo", paginationInfo);
|
| 6089 | 6190 |
|
| 6090 | 6191 |
return "/uss/ion/pay/cashPointSendList"; |
| 6091 |
- } |
|
| 6192 |
+ } |
|
| 6193 |
+ |
|
| 6194 |
+ /** |
|
| 6195 |
+ * @param p_pattern |
|
| 6196 |
+ * @param p_mjonPayVO |
|
| 6197 |
+ * @return |
|
| 6198 |
+ * @throws Exception |
|
| 6199 |
+ */ |
|
| 6200 |
+ private MjonPayVO p_checkSearchCnd( |
|
| 6201 |
+ String p_pattern |
|
| 6202 |
+ , MjonPayVO p_mjonPayVO |
|
| 6203 |
+ ) throws Exception{
|
|
| 6204 |
+ if(p_pattern.equals("/web/member/pay/PayListAllAjax.do")) { //전체
|
|
| 6205 |
+ p_mjonPayVO.setPageType("all");
|
|
| 6206 |
+ } |
|
| 6207 |
+ if(p_pattern.equals("/web/member/pay/PayListMobileAjax.do")) { //모바일일때
|
|
| 6208 |
+ p_mjonPayVO.setSearchCondition2("CELLPHONE");
|
|
| 6209 |
+ p_mjonPayVO.setPayMethod("CELLPHONE");
|
|
| 6210 |
+ p_mjonPayVO.setPageType("cellphone");
|
|
| 6211 |
+ } |
|
| 6212 |
+ if(p_pattern.equals("/web/member/pay/PayListCardAjax.do")) { //신용카드
|
|
| 6213 |
+ p_mjonPayVO.setSearchCondition2("CARD");
|
|
| 6214 |
+ p_mjonPayVO.setPayMethod("CARD");
|
|
| 6215 |
+ p_mjonPayVO.setPageType("card");
|
|
| 6216 |
+ } |
|
| 6217 |
+ if(p_pattern.equals("/web/member/pay/PayListVBankAjax.do")) { //전용계좌
|
|
| 6218 |
+ p_mjonPayVO.setSearchCondition2("VBANK");
|
|
| 6219 |
+ p_mjonPayVO.setPayMethod("VBANK");
|
|
| 6220 |
+ p_mjonPayVO.setPageType("vbank");
|
|
| 6221 |
+ } |
|
| 6222 |
+ if(p_pattern.equals("/web/member/pay/PayListBankAjax.do")) { //즉시이체
|
|
| 6223 |
+ p_mjonPayVO.setSearchCondition2("BANK");
|
|
| 6224 |
+ p_mjonPayVO.setPayMethod("BANK");
|
|
| 6225 |
+ p_mjonPayVO.setPageType("bank");
|
|
| 6226 |
+ } |
|
| 6227 |
+ if(p_pattern.equals("/web/member/pay/PayListSPayAjax.do")) { //즉시이체
|
|
| 6228 |
+ p_mjonPayVO.setSearchCondition2("SPAY");
|
|
| 6229 |
+ p_mjonPayVO.setPayMethod("SPAY");
|
|
| 6230 |
+ p_mjonPayVO.setPageType("SPAY");
|
|
| 6231 |
+ } |
|
| 6232 |
+ if(p_pattern.equals("/web/member/pay/PayListOfflineAjax.do")) { //무통장
|
|
| 6233 |
+ p_mjonPayVO.setSearchCondition2("OFFLINE");
|
|
| 6234 |
+ p_mjonPayVO.setPayMethod("OFFLINE");
|
|
| 6235 |
+ p_mjonPayVO.setPageType("offline");
|
|
| 6236 |
+ } |
|
| 6237 |
+ |
|
| 6238 |
+ return p_mjonPayVO; |
|
| 6239 |
+ } |
|
| 6240 |
+ |
|
| 6241 |
+ /** |
|
| 6242 |
+ * @param p_mjonPayVO |
|
| 6243 |
+ * @return |
|
| 6244 |
+ * @throws Exception |
|
| 6245 |
+ */ |
|
| 6246 |
+ private MjonPayVO p_checkSortCnd( |
|
| 6247 |
+ MjonPayVO p_mjonPayVO |
|
| 6248 |
+ ) throws Exception{
|
|
| 6249 |
+ //정렬 처리 |
|
| 6250 |
+ if("".equals(p_mjonPayVO.getSearchSortCnd())){ //최초조회시 최신것 조회List
|
|
| 6251 |
+ p_mjonPayVO.setSearchSortCnd("moid");
|
|
| 6252 |
+ p_mjonPayVO.setSearchSortOrd("desc");
|
|
| 6253 |
+ }else {//포인트 교환내역에서 정렬 종류가 달라서 변환처리 해줌
|
|
| 6254 |
+ |
|
| 6255 |
+ String sortCnt = p_mjonPayVO.getSearchSortCnd(); |
|
| 6256 |
+ |
|
| 6257 |
+ if(sortCnt.equals("pointUseId") || sortCnt.equals("refundId")) {
|
|
| 6258 |
+ p_mjonPayVO.setSearchSortCnd("moid");
|
|
| 6259 |
+ }else if(sortCnt.equals("frstRegistPnttm") || sortCnt.equals("frstRegisterPnttm") || sortCnt.equals("refundHandlePnttm")) {
|
|
| 6260 |
+ p_mjonPayVO.setSearchSortCnd("regDate");
|
|
| 6261 |
+ }else if(sortCnt.equals("type")) {
|
|
| 6262 |
+ p_mjonPayVO.setSearchSortCnd("payMethodTxt");
|
|
| 6263 |
+ }else if(sortCnt.equals("point") || sortCnt.equals("refundMoney") || sortCnt.equals("refundCash")) {
|
|
| 6264 |
+ p_mjonPayVO.setSearchSortCnd("amt");
|
|
| 6265 |
+ }else if(sortCnt.equals("cmpltYn") || sortCnt.equals("refundStatus")) {
|
|
| 6266 |
+ p_mjonPayVO.setSearchSortCnd("pgStatusTxt");
|
|
| 6267 |
+ } |
|
| 6268 |
+ |
|
| 6269 |
+ } |
|
| 6270 |
+ |
|
| 6271 |
+ return p_mjonPayVO; |
|
| 6272 |
+ } |
|
| 6273 |
+ |
|
| 6274 |
+ /** |
|
| 6275 |
+ * @param p_mjonPayVO |
|
| 6276 |
+ * @return |
|
| 6277 |
+ * @throws Exception |
|
| 6278 |
+ */ |
|
| 6279 |
+ private MjonPayVO p_checkSearchDate( |
|
| 6280 |
+ MjonPayVO p_mjonPayVO |
|
| 6281 |
+ ) throws Exception{
|
|
| 6282 |
+ //검색 기간 처리 |
|
| 6283 |
+ if(!DateUtils.dateChkAndValueChk(p_mjonPayVO.getStartDate(),p_mjonPayVO.getEndDate(), 12 )) |
|
| 6284 |
+ {
|
|
| 6285 |
+ p_mjonPayVO.setStartDate(DateUtils.getDateMonthsAgo(12)); |
|
| 6286 |
+ p_mjonPayVO.setEndDate(DateUtils.getCurrentDate()); |
|
| 6287 |
+ } |
|
| 6288 |
+ |
|
| 6289 |
+ return p_mjonPayVO; |
|
| 6290 |
+ } |
|
| 6291 |
+ |
|
| 6292 |
+ private HttpServletResponse p_makeResponse( |
|
| 6293 |
+ HttpServletResponse p_response |
|
| 6294 |
+ , String p_fileName |
|
| 6295 |
+ ) throws Exception{
|
|
| 6296 |
+ p_response.setHeader("Set-Cookie", "fileDownload=true; path=/");
|
|
| 6297 |
+ SimpleDateFormat mSimpleDateFormat = new SimpleDateFormat ( "yyyy_MM_dd_HH_mm_ss", Locale.KOREA ); |
|
| 6298 |
+ Date currentTime = new Date (); |
|
| 6299 |
+ String mTime = mSimpleDateFormat.format ( currentTime ); |
|
| 6300 |
+ p_fileName = p_fileName+"("+mTime+")";
|
|
| 6301 |
+ |
|
| 6302 |
+ p_response.setHeader("Content-Disposition", String.format("attachment; filename=\""+new String((p_fileName).getBytes("KSC5601"),"8859_1")+".xlsx"));
|
|
| 6303 |
+ |
|
| 6304 |
+ return p_response; |
|
| 6305 |
+ } |
|
| 6092 | 6306 |
} |
| 6093 | 6307 |
|
--- src/main/java/itn/let/mjo/reservmsg/service/impl/MjonReservMsgServiceImpl.java
+++ src/main/java/itn/let/mjo/reservmsg/service/impl/MjonReservMsgServiceImpl.java
... | ... | @@ -341,6 +341,7 @@ |
| 341 | 341 |
} |
| 342 | 342 |
|
| 343 | 343 |
} catch (Exception e) {
|
| 344 |
+ e.printStackTrace(); |
|
| 344 | 345 |
System.out.println("++++++++++++++++++++++ 예약문자 취소 deleteReservMsgCancelDataAjax Service Imple Error !!! " + e);
|
| 345 | 346 |
} |
| 346 | 347 |
|
--- src/main/java/itn/let/mjo/reservmsg/web/MjonReservMsgController.java
+++ src/main/java/itn/let/mjo/reservmsg/web/MjonReservMsgController.java
... | ... | @@ -610,37 +610,43 @@ |
| 610 | 610 |
|
| 611 | 611 |
ModelAndView modelAndView = new ModelAndView(); |
| 612 | 612 |
modelAndView.setViewName("jsonView");
|
| 613 |
+ try {
|
|
| 613 | 614 |
|
| 614 |
- //로그인 권한정보 불러오기 |
|
| 615 |
- LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; |
|
| 616 |
- String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 617 |
- |
|
| 618 |
- if(!userId.equals("")) {
|
|
| 619 |
- |
|
| 620 |
- mjonResvMsgVO.setUserId(userId); |
|
| 621 |
- |
|
| 622 |
- }else {
|
|
| 623 |
- |
|
| 624 |
- modelAndView.addObject("message", "로그인 후 이용이 가능합니다.");
|
|
| 625 |
- modelAndView.addObject("result", "fail");
|
|
| 626 |
- |
|
| 627 |
- return modelAndView; |
|
| 628 |
- |
|
| 629 |
- } |
|
| 630 |
- |
|
| 631 |
- // 디비에 문자 내용을 저장해 준다. |
|
| 632 |
- int resultSts = mjonReservMsgService.deleteReservMsgCancelDataAjax(mjonResvMsgVO); |
|
| 633 |
- |
|
| 634 |
- if(resultSts > 0) {
|
|
| 615 |
+ //로그인 권한정보 불러오기 |
|
| 616 |
+ LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; |
|
| 617 |
+ String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 618 |
+ |
|
| 619 |
+ if(!userId.equals("")) {
|
|
| 620 |
+ |
|
| 621 |
+ mjonResvMsgVO.setUserId(userId); |
|
| 622 |
+ |
|
| 623 |
+ }else {
|
|
| 624 |
+ |
|
| 625 |
+ modelAndView.addObject("message", "로그인 후 이용이 가능합니다.");
|
|
| 626 |
+ modelAndView.addObject("result", "fail");
|
|
| 627 |
+ |
|
| 628 |
+ return modelAndView; |
|
| 629 |
+ |
|
| 630 |
+ } |
|
| 631 |
+ |
|
| 632 |
+ // 디비에 문자 내용을 저장해 준다. |
|
| 633 |
+ int resultSts = mjonReservMsgService.deleteReservMsgCancelDataAjax(mjonResvMsgVO); |
|
| 635 | 634 |
|
| 636 |
- modelAndView.addObject("message", "예약 발송이 정상적으로 취소 되었습니다.");
|
|
| 637 |
- modelAndView.addObject("result", "success");
|
|
| 635 |
+ if(resultSts > 0) {
|
|
| 636 |
+ |
|
| 637 |
+ modelAndView.addObject("message", "예약 발송이 정상적으로 취소 되었습니다.");
|
|
| 638 |
+ modelAndView.addObject("result", "success");
|
|
| 639 |
+ |
|
| 640 |
+ }else {
|
|
| 641 |
+ |
|
| 642 |
+ modelAndView.addObject("message", "예약 발송 취소 처리가 실패 되었습니다. 잠시 후 다시 시도해 주세요.");
|
|
| 643 |
+ modelAndView.addObject("result", "fail");
|
|
| 644 |
+ |
|
| 645 |
+ } |
|
| 638 | 646 |
|
| 639 |
- }else {
|
|
| 640 |
- |
|
| 641 |
- modelAndView.addObject("message", "예약 발송 취소 처리가 실패 되었습니다. 잠시 후 다시 시도해 주세요.");
|
|
| 642 |
- modelAndView.addObject("result", "fail");
|
|
| 643 |
- |
|
| 647 |
+ } catch (Exception e) {
|
|
| 648 |
+ e.printStackTrace(); |
|
| 649 |
+ // TODO: handle exception |
|
| 644 | 650 |
} |
| 645 | 651 |
|
| 646 | 652 |
return modelAndView; |
--- src/main/java/itn/let/module/base/PriceAndPoint.java
+++ src/main/java/itn/let/module/base/PriceAndPoint.java
... | ... | @@ -117,6 +117,7 @@ |
| 117 | 117 |
MjonPayVO mjonPayVO = new MjonPayVO(); |
| 118 | 118 |
mjonPayVO.setCashId(idgenMjonCashId.getNextStringId()); |
| 119 | 119 |
mjonPayVO.setUserId(userId); |
| 120 |
+ System.out.println(" + totPrice :: "+ totPrice);
|
|
| 120 | 121 |
mjonPayVO.setCash(totPrice); |
| 121 | 122 |
mjonPayVO.setFrstRegisterId(userId); |
| 122 | 123 |
mjonPayVO.setMemo(memo); |
--- src/main/java/itn/let/uat/uia/web/EgovLoginController.java
+++ src/main/java/itn/let/uat/uia/web/EgovLoginController.java
... | ... | @@ -1074,12 +1074,21 @@ |
| 1074 | 1074 |
String message = (String) commandMap.get("message");
|
| 1075 | 1075 |
String goEventPay = (String) commandMap.get("goEventPay");
|
| 1076 | 1076 |
|
| 1077 |
- // sns 회원가입 key 값 설정 |
|
| 1078 |
- String naverClientId = itnNaverClientId; |
|
| 1079 |
- String naverClientSecret = itnNaverClientSecret; |
|
| 1077 |
+ /* |
|
| 1078 |
+ * 헤더에서 id/pw는 맞지만 보안로그인 설정 되어있을때 -> secure |
|
| 1079 |
+ * |
|
| 1080 |
+ */ |
|
| 1080 | 1081 |
|
| 1081 |
- String kakaoRestApiKey = itnKakaoRestApiKey; |
|
| 1082 |
- String kakaoReturnUrl = itnKakaoReturnUrl; |
|
| 1082 |
+ String headerLoginResult = (String) commandMap.get("headerLoginResult");
|
|
| 1083 |
+ String id = (String) commandMap.get("id");
|
|
| 1084 |
+ String pw = (String) commandMap.get("password");
|
|
| 1085 |
+ |
|
| 1086 |
+ // sns 회원가입 key 값 설정 |
|
| 1087 |
+// String naverClientId = itnNaverClientId; |
|
| 1088 |
+// String naverClientSecret = itnNaverClientSecret; |
|
| 1089 |
+// |
|
| 1090 |
+// String kakaoRestApiKey = itnKakaoRestApiKey; |
|
| 1091 |
+// String kakaoReturnUrl = itnKakaoReturnUrl; |
|
| 1083 | 1092 |
|
| 1084 | 1093 |
// config 정보 가져오기 |
| 1085 | 1094 |
MberManageConfigVO mberConfigVO = new MberManageConfigVO(); |
... | ... | @@ -1129,6 +1138,16 @@ |
| 1129 | 1138 |
|
| 1130 | 1139 |
model.addAttribute("userIp", userIp);
|
| 1131 | 1140 |
model.addAttribute("goEventPay", goEventPay);
|
| 1141 |
+ |
|
| 1142 |
+ |
|
| 1143 |
+ if(StringUtil.isNotEmpty(headerLoginResult)) {
|
|
| 1144 |
+ model.addAttribute("id_secure", id);
|
|
| 1145 |
+ model.addAttribute("pw_secure", pw);
|
|
| 1146 |
+ }else {
|
|
| 1147 |
+ headerLoginResult = "N"; |
|
| 1148 |
+ } |
|
| 1149 |
+ |
|
| 1150 |
+ model.addAttribute("headerLoginResult", headerLoginResult);
|
|
| 1132 | 1151 |
|
| 1133 | 1152 |
return "web/login/EgovLoginGnrlUsr"; |
| 1134 | 1153 |
} |
... | ... | @@ -1833,6 +1852,8 @@ |
| 1833 | 1852 |
HttpServletRequest request, @RequestParam Map<String, Object> commandMap, ModelMap model, |
| 1834 | 1853 |
HttpSession session, RedirectAttributes redirectAttributes) throws Exception {
|
| 1835 | 1854 |
|
| 1855 |
+ |
|
| 1856 |
+ |
|
| 1836 | 1857 |
ModelAndView modelAndView = new ModelAndView(); |
| 1837 | 1858 |
modelAndView.setViewName("jsonView");
|
| 1838 | 1859 |
|
--- src/main/java/itn/let/uss/umt/service/UserDefaultVO.java
+++ src/main/java/itn/let/uss/umt/service/UserDefaultVO.java
... | ... | @@ -4,6 +4,9 @@ |
| 4 | 4 |
|
| 5 | 5 |
import org.apache.commons.lang3.builder.ToStringBuilder; |
| 6 | 6 |
|
| 7 |
+import lombok.Getter; |
|
| 8 |
+import lombok.Setter; |
|
| 9 |
+ |
|
| 7 | 10 |
/** |
| 8 | 11 |
* 사용자정보 VO클래스로서일반회원, 기업회원, 업무사용자의 비지니스로직 처리시 기타조건성 항을 구성한다. |
| 9 | 12 |
* @author 공통서비스 개발팀 조재영 |
... | ... | @@ -21,6 +24,8 @@ |
| 21 | 24 |
* |
| 22 | 25 |
* </pre> |
| 23 | 26 |
*/ |
| 27 |
+@Getter |
|
| 28 |
+@Setter |
|
| 24 | 29 |
public class UserDefaultVO implements Serializable {
|
| 25 | 30 |
|
| 26 | 31 |
/** |
... | ... | @@ -34,9 +39,19 @@ |
| 34 | 39 |
/** 검색조건-성별 (0, M, F)*/ |
| 35 | 40 |
private String searchSexdstn = "0"; |
| 36 | 41 |
|
| 37 |
- /** 검색조건 */ |
|
| 42 |
+ /** |
|
| 43 |
+ * 검색조건 |
|
| 44 |
+ * 20250122 이호영 |
|
| 45 |
+ * 개선은 검색조건을 아래 세개만 사용하려고 함 |
|
| 46 |
+ * */ |
|
| 38 | 47 |
private String searchCondition ; |
| 48 |
+ private String searchCondition01 ; |
|
| 49 |
+ private String searchCondition02 ; |
|
| 39 | 50 |
|
| 51 |
+ |
|
| 52 |
+ |
|
| 53 |
+ /** 검색조건 - 기존 */ |
|
| 54 |
+// private String searchCondition ; |
|
| 40 | 55 |
private String searchCondition_01 ; |
| 41 | 56 |
|
| 42 | 57 |
private String searchConditionSite ; |
... | ... | @@ -173,45 +188,6 @@ |
| 173 | 188 |
|
| 174 | 189 |
private String searchDeleteType; |
| 175 | 190 |
|
| 176 |
- public String getSearchDeleteType() {
|
|
| 177 |
- return searchDeleteType; |
|
| 178 |
- } |
|
| 179 |
- |
|
| 180 |
- public void setSearchDeleteType(String searchDeleteType) {
|
|
| 181 |
- this.searchDeleteType = searchDeleteType; |
|
| 182 |
- } |
|
| 183 |
- |
|
| 184 |
- public String getSearchHotlineAgentCode() {
|
|
| 185 |
- return searchHotlineAgentCode; |
|
| 186 |
- } |
|
| 187 |
- |
|
| 188 |
- public void setSearchHotlineAgentCode(String searchHotlineAgentCode) {
|
|
| 189 |
- this.searchHotlineAgentCode = searchHotlineAgentCode; |
|
| 190 |
- } |
|
| 191 |
- |
|
| 192 |
- public String getSearchExceptSpamYn() {
|
|
| 193 |
- return searchExceptSpamYn; |
|
| 194 |
- } |
|
| 195 |
- |
|
| 196 |
- public void setSearchExceptSpamYn(String searchExceptSpamYn) {
|
|
| 197 |
- this.searchExceptSpamYn = searchExceptSpamYn; |
|
| 198 |
- } |
|
| 199 |
- |
|
| 200 |
- public String getSearchSmishingYn() {
|
|
| 201 |
- return searchSmishingYn; |
|
| 202 |
- } |
|
| 203 |
- |
|
| 204 |
- public void setSearchSmishingYn(String searchSmishingYn) {
|
|
| 205 |
- this.searchSmishingYn = searchSmishingYn; |
|
| 206 |
- } |
|
| 207 |
- |
|
| 208 |
- public String getSearchDeptPrePayment() {
|
|
| 209 |
- return searchDeptPrePayment; |
|
| 210 |
- } |
|
| 211 |
- |
|
| 212 |
- public void setSearchDeptPrePayment(String searchDeptPrePayment) {
|
|
| 213 |
- this.searchDeptPrePayment = searchDeptPrePayment; |
|
| 214 |
- } |
|
| 215 | 191 |
|
| 216 | 192 |
private String searchAdminSmsNoticeYn; |
| 217 | 193 |
|
... | ... | @@ -224,570 +200,5 @@ |
| 224 | 200 |
private String searchThrDptCategoryCode; //3뎁스(하위카테고리) 검색 |
| 225 | 201 |
|
| 226 | 202 |
|
| 227 |
- public String getEditMode() {
|
|
| 228 |
- return editMode; |
|
| 229 |
- } |
|
| 230 |
- |
|
| 231 |
- public void setEditMode(String editMode) {
|
|
| 232 |
- this.editMode = editMode; |
|
| 233 |
- } |
|
| 234 |
- |
|
| 235 |
- public String getSearchSmsSalePrice() {
|
|
| 236 |
- return searchSmsSalePrice; |
|
| 237 |
- } |
|
| 238 |
- |
|
| 239 |
- public void setSearchSmsSalePrice(String searchSmsSalePrice) {
|
|
| 240 |
- this.searchSmsSalePrice = searchSmsSalePrice; |
|
| 241 |
- } |
|
| 242 |
- |
|
| 243 |
- public String getSearchAdminSmsNoticeYn() {
|
|
| 244 |
- return searchAdminSmsNoticeYn; |
|
| 245 |
- } |
|
| 246 |
- |
|
| 247 |
- public void setSearchAdminSmsNoticeYn(String searchAdminSmsNoticeYn) {
|
|
| 248 |
- this.searchAdminSmsNoticeYn = searchAdminSmsNoticeYn; |
|
| 249 |
- } |
|
| 250 |
- |
|
| 251 |
- public String getSearchDept() {
|
|
| 252 |
- return searchDept; |
|
| 253 |
- } |
|
| 254 |
- |
|
| 255 |
- public void setSearchDept(String searchDept) {
|
|
| 256 |
- this.searchDept = searchDept; |
|
| 257 |
- } |
|
| 258 |
- |
|
| 259 |
- public String getAuthorCode() {
|
|
| 260 |
- return authorCode; |
|
| 261 |
- } |
|
| 262 |
- |
|
| 263 |
- public void setAuthorCode(String authorCode) {
|
|
| 264 |
- this.authorCode = authorCode; |
|
| 265 |
- } |
|
| 266 |
- |
|
| 267 |
- public String getSearchCategoryCode() {
|
|
| 268 |
- return searchCategoryCode; |
|
| 269 |
- } |
|
| 270 |
- |
|
| 271 |
- public void setSearchCategoryCode(String searchCategoryCode) {
|
|
| 272 |
- this.searchCategoryCode = searchCategoryCode; |
|
| 273 |
- } |
|
| 274 |
- |
|
| 275 |
- public String getSearchKeywordFrom() {
|
|
| 276 |
- return searchKeywordFrom; |
|
| 277 |
- } |
|
| 278 |
- |
|
| 279 |
- public void setSearchKeywordFrom(String searchKeywordFrom) {
|
|
| 280 |
- this.searchKeywordFrom = searchKeywordFrom; |
|
| 281 |
- } |
|
| 282 |
- |
|
| 283 |
- public String getSearchKeywordTo() {
|
|
| 284 |
- return searchKeywordTo; |
|
| 285 |
- } |
|
| 286 |
- |
|
| 287 |
- public void setSearchKeywordTo(String searchKeywordTo) {
|
|
| 288 |
- this.searchKeywordTo = searchKeywordTo; |
|
| 289 |
- } |
|
| 290 |
- |
|
| 291 |
- public String getFrstRegistPnttm() {
|
|
| 292 |
- return frstRegistPnttm; |
|
| 293 |
- } |
|
| 294 |
- |
|
| 295 |
- public void setFrstRegistPnttm(String frstRegistPnttm) {
|
|
| 296 |
- this.frstRegistPnttm = frstRegistPnttm; |
|
| 297 |
- } |
|
| 298 |
- |
|
| 299 |
- public String getFrstRegisterId() {
|
|
| 300 |
- return frstRegisterId; |
|
| 301 |
- } |
|
| 302 |
- |
|
| 303 |
- public void setFrstRegisterId(String frstRegisterId) {
|
|
| 304 |
- this.frstRegisterId = frstRegisterId; |
|
| 305 |
- } |
|
| 306 |
- |
|
| 307 |
- public String getLastUpdtPnttm() {
|
|
| 308 |
- return lastUpdtPnttm; |
|
| 309 |
- } |
|
| 310 |
- |
|
| 311 |
- public void setLastUpdtPnttm(String lastUpdtPnttm) {
|
|
| 312 |
- this.lastUpdtPnttm = lastUpdtPnttm; |
|
| 313 |
- } |
|
| 314 |
- |
|
| 315 |
- public String getLastUpdusrId() {
|
|
| 316 |
- return lastUpdusrId; |
|
| 317 |
- } |
|
| 318 |
- |
|
| 319 |
- public void setLastUpdusrId(String lastUpdusrId) {
|
|
| 320 |
- this.lastUpdusrId = lastUpdusrId; |
|
| 321 |
- } |
|
| 322 |
- |
|
| 323 |
- public int getTotCnt() {
|
|
| 324 |
- return totCnt; |
|
| 325 |
- } |
|
| 326 |
- |
|
| 327 |
- public void setTotCnt(int totCnt) {
|
|
| 328 |
- this.totCnt = totCnt; |
|
| 329 |
- } |
|
| 330 |
- |
|
| 331 |
- public String getUserTotailCount() {
|
|
| 332 |
- return userTotailCount; |
|
| 333 |
- } |
|
| 334 |
- |
|
| 335 |
- public void setUserTotailCount(String userTotailCount) {
|
|
| 336 |
- this.userTotailCount = userTotailCount; |
|
| 337 |
- } |
|
| 338 |
- |
|
| 339 |
- public String getUserNewCount() {
|
|
| 340 |
- return userNewCount; |
|
| 341 |
- } |
|
| 342 |
- |
|
| 343 |
- public void setUserNewCount(String userNewCount) {
|
|
| 344 |
- this.userNewCount = userNewCount; |
|
| 345 |
- } |
|
| 346 |
- |
|
| 347 |
- public String getUserDeleteCount() {
|
|
| 348 |
- return userDeleteCount; |
|
| 349 |
- } |
|
| 350 |
- |
|
| 351 |
- public void setUserDeleteCount(String userDeleteCount) {
|
|
| 352 |
- this.userDeleteCount = userDeleteCount; |
|
| 353 |
- } |
|
| 354 |
- |
|
| 355 |
- public String getUserNewBlock() {
|
|
| 356 |
- return userNewBlock; |
|
| 357 |
- } |
|
| 358 |
- |
|
| 359 |
- public void setUserNewBlock(String userNewBlock) {
|
|
| 360 |
- this.userNewBlock = userNewBlock; |
|
| 361 |
- } |
|
| 362 |
- |
|
| 363 |
- public String getSnsSiteId() {
|
|
| 364 |
- return snsSiteId; |
|
| 365 |
- } |
|
| 366 |
- |
|
| 367 |
- public void setSnsSiteId(String snsSiteId) {
|
|
| 368 |
- this.snsSiteId = snsSiteId; |
|
| 369 |
- } |
|
| 370 |
- |
|
| 371 |
- public String getSnsSiteName() {
|
|
| 372 |
- return snsSiteName; |
|
| 373 |
- } |
|
| 374 |
- |
|
| 375 |
- public void setSnsSiteName(String snsSiteName) {
|
|
| 376 |
- this.snsSiteName = snsSiteName; |
|
| 377 |
- } |
|
| 378 |
- |
|
| 379 |
- public String getSnsSite() {
|
|
| 380 |
- return snsSite; |
|
| 381 |
- } |
|
| 382 |
- |
|
| 383 |
- public void setSnsSite(String snsSite) {
|
|
| 384 |
- this.snsSite = snsSite; |
|
| 385 |
- } |
|
| 386 |
- |
|
| 387 |
- public String getSnsId() {
|
|
| 388 |
- return snsId; |
|
| 389 |
- } |
|
| 390 |
- |
|
| 391 |
- public void setSnsId(String snsId) {
|
|
| 392 |
- this.snsId = snsId; |
|
| 393 |
- } |
|
| 394 |
- |
|
| 395 |
- public String getSnsEmail() {
|
|
| 396 |
- return snsEmail; |
|
| 397 |
- } |
|
| 398 |
- |
|
| 399 |
- public void setSnsEmail(String snsEmail) {
|
|
| 400 |
- this.snsEmail = snsEmail; |
|
| 401 |
- } |
|
| 402 |
- |
|
| 403 |
- public static long getSerialversionuid() {
|
|
| 404 |
- return serialVersionUID; |
|
| 405 |
- } |
|
| 406 |
- |
|
| 407 |
- /** |
|
| 408 |
- * sbscrbSttus attribute 값을 리턴한다. |
|
| 409 |
- * @return String |
|
| 410 |
- */ |
|
| 411 |
- public String getSbscrbSttus() {
|
|
| 412 |
- return sbscrbSttus; |
|
| 413 |
- } |
|
| 414 |
- |
|
| 415 |
- /** |
|
| 416 |
- * sbscrbSttus attribute 값을 설정한다. |
|
| 417 |
- * @param sbscrbSttus String |
|
| 418 |
- */ |
|
| 419 |
- public void setSbscrbSttus(String sbscrbSttus) {
|
|
| 420 |
- this.sbscrbSttus = sbscrbSttus; |
|
| 421 |
- } |
|
| 422 |
- |
|
| 423 |
- /** |
|
| 424 |
- * searchCondition attribute 값을 리턴한다. |
|
| 425 |
- * @return String |
|
| 426 |
- */ |
|
| 427 |
- public String getSearchCondition() {
|
|
| 428 |
- return searchCondition; |
|
| 429 |
- } |
|
| 430 |
- |
|
| 431 |
- /** |
|
| 432 |
- * searchCondition attribute 값을 설정한다. |
|
| 433 |
- * @param searchCondition String |
|
| 434 |
- */ |
|
| 435 |
- public void setSearchCondition(String searchCondition) {
|
|
| 436 |
- this.searchCondition = searchCondition; |
|
| 437 |
- } |
|
| 438 |
- |
|
| 439 |
- /** |
|
| 440 |
- * searchKeyword attribute 값을 리턴한다. |
|
| 441 |
- * @return String |
|
| 442 |
- */ |
|
| 443 |
- public String getSearchKeyword() {
|
|
| 444 |
- return searchKeyword; |
|
| 445 |
- } |
|
| 446 |
- |
|
| 447 |
- /** |
|
| 448 |
- * searchKeyword attribute 값을 설정한다. |
|
| 449 |
- * @param searchKeyword String |
|
| 450 |
- */ |
|
| 451 |
- public void setSearchKeyword(String searchKeyword) {
|
|
| 452 |
- this.searchKeyword = searchKeyword; |
|
| 453 |
- } |
|
| 454 |
- |
|
| 455 |
- /** |
|
| 456 |
- * searchUseYn attribute 값을 리턴한다. |
|
| 457 |
- * @return String |
|
| 458 |
- */ |
|
| 459 |
- public String getSearchUseYn() {
|
|
| 460 |
- return searchUseYn; |
|
| 461 |
- } |
|
| 462 |
- |
|
| 463 |
- /** |
|
| 464 |
- * searchUseYn attribute 값을 설정한다. |
|
| 465 |
- * @param searchUseYn String |
|
| 466 |
- */ |
|
| 467 |
- public void setSearchUseYn(String searchUseYn) {
|
|
| 468 |
- this.searchUseYn = searchUseYn; |
|
| 469 |
- } |
|
| 470 |
- |
|
| 471 |
- /** |
|
| 472 |
- * pageIndex attribute 값을 리턴한다. |
|
| 473 |
- * @return int |
|
| 474 |
- */ |
|
| 475 |
- public int getPageIndex() {
|
|
| 476 |
- return pageIndex; |
|
| 477 |
- } |
|
| 478 |
- |
|
| 479 |
- /** |
|
| 480 |
- * pageIndex attribute 값을 설정한다. |
|
| 481 |
- * @param pageIndex int |
|
| 482 |
- */ |
|
| 483 |
- public void setPageIndex(int pageIndex) {
|
|
| 484 |
- this.pageIndex = pageIndex; |
|
| 485 |
- } |
|
| 486 |
- |
|
| 487 |
- /** |
|
| 488 |
- * pageUnit attribute 값을 리턴한다. |
|
| 489 |
- * @return int |
|
| 490 |
- */ |
|
| 491 |
- public int getPageUnit() {
|
|
| 492 |
- return pageUnit; |
|
| 493 |
- } |
|
| 494 |
- |
|
| 495 |
- /** |
|
| 496 |
- * pageUnit attribute 값을 설정한다. |
|
| 497 |
- * @param pageUnit int |
|
| 498 |
- */ |
|
| 499 |
- public void setPageUnit(int pageUnit) {
|
|
| 500 |
- this.pageUnit = pageUnit; |
|
| 501 |
- } |
|
| 502 |
- |
|
| 503 |
- /** |
|
| 504 |
- * pageSize attribute 값을 리턴한다. |
|
| 505 |
- * @return int |
|
| 506 |
- */ |
|
| 507 |
- public int getPageSize() {
|
|
| 508 |
- return pageSize; |
|
| 509 |
- } |
|
| 510 |
- |
|
| 511 |
- /** |
|
| 512 |
- * pageSize attribute 값을 설정한다. |
|
| 513 |
- * @param pageSize int |
|
| 514 |
- */ |
|
| 515 |
- public void setPageSize(int pageSize) {
|
|
| 516 |
- this.pageSize = pageSize; |
|
| 517 |
- } |
|
| 518 |
- |
|
| 519 |
- /** |
|
| 520 |
- * firstIndex attribute 값을 리턴한다. |
|
| 521 |
- * @return int |
|
| 522 |
- */ |
|
| 523 |
- public int getFirstIndex() {
|
|
| 524 |
- return firstIndex; |
|
| 525 |
- } |
|
| 526 |
- |
|
| 527 |
- /** |
|
| 528 |
- * firstIndex attribute 값을 설정한다. |
|
| 529 |
- * @param firstIndex int |
|
| 530 |
- */ |
|
| 531 |
- public void setFirstIndex(int firstIndex) {
|
|
| 532 |
- this.firstIndex = firstIndex; |
|
| 533 |
- } |
|
| 534 |
- |
|
| 535 |
- /** |
|
| 536 |
- * lastIndex attribute 값을 리턴한다. |
|
| 537 |
- * @return int |
|
| 538 |
- */ |
|
| 539 |
- public int getLastIndex() {
|
|
| 540 |
- return lastIndex; |
|
| 541 |
- } |
|
| 542 |
- |
|
| 543 |
- /** |
|
| 544 |
- * lastIndex attribute 값을 설정한다. |
|
| 545 |
- * @param lastIndex int |
|
| 546 |
- */ |
|
| 547 |
- public void setLastIndex(int lastIndex) {
|
|
| 548 |
- this.lastIndex = lastIndex; |
|
| 549 |
- } |
|
| 550 |
- |
|
| 551 |
- /** |
|
| 552 |
- * recordCountPerPage attribute 값을 리턴한다. |
|
| 553 |
- * @return int |
|
| 554 |
- */ |
|
| 555 |
- public int getRecordCountPerPage() {
|
|
| 556 |
- return recordCountPerPage; |
|
| 557 |
- } |
|
| 558 |
- |
|
| 559 |
- /** |
|
| 560 |
- * recordCountPerPage attribute 값을 설정한다. |
|
| 561 |
- * @param recordCountPerPage int |
|
| 562 |
- */ |
|
| 563 |
- public void setRecordCountPerPage(int recordCountPerPage) {
|
|
| 564 |
- this.recordCountPerPage = recordCountPerPage; |
|
| 565 |
- } |
|
| 566 |
- |
|
| 567 |
- /*성별조건 검색*/ |
|
| 568 |
- public String getSearchSexdstn() {
|
|
| 569 |
- return searchSexdstn; |
|
| 570 |
- } |
|
| 571 |
- |
|
| 572 |
- public void setSearchSexdstn(String searchSexdstn) {
|
|
| 573 |
- this.searchSexdstn = searchSexdstn; |
|
| 574 |
- } |
|
| 575 |
- |
|
| 576 |
- /** |
|
| 577 |
- * toString 메소드를 대치한다. |
|
| 578 |
- */ |
|
| 579 |
- public String toString() {
|
|
| 580 |
- return ToStringBuilder.reflectionToString(this); |
|
| 581 |
- } |
|
| 582 |
- |
|
| 583 |
- public String getSiteId() {
|
|
| 584 |
- return siteId; |
|
| 585 |
- } |
|
| 586 |
- |
|
| 587 |
- public void setSiteId(String siteId) {
|
|
| 588 |
- this.siteId = siteId; |
|
| 589 |
- } |
|
| 590 |
- |
|
| 591 |
- public String getSearchConditionSite() {
|
|
| 592 |
- return searchConditionSite; |
|
| 593 |
- } |
|
| 594 |
- |
|
| 595 |
- public void setSearchConditionSite(String searchConditionSite) {
|
|
| 596 |
- this.searchConditionSite = searchConditionSite; |
|
| 597 |
- } |
|
| 598 |
- |
|
| 599 |
- public String getAdminYn() {
|
|
| 600 |
- return adminYn; |
|
| 601 |
- } |
|
| 602 |
- |
|
| 603 |
- public void setAdminYn(String adminYn) {
|
|
| 604 |
- this.adminYn = adminYn; |
|
| 605 |
- } |
|
| 606 |
- |
|
| 607 |
- public String getGnrlUser() {
|
|
| 608 |
- return gnrlUser; |
|
| 609 |
- } |
|
| 610 |
- |
|
| 611 |
- public void setGnrlUser(String gnrlUser) {
|
|
| 612 |
- this.gnrlUser = gnrlUser; |
|
| 613 |
- } |
|
| 614 |
- |
|
| 615 |
- |
|
| 616 |
- public String getEmplyrSttusCode() {
|
|
| 617 |
- return emplyrSttusCode; |
|
| 618 |
- } |
|
| 619 |
- |
|
| 620 |
- public void setEmplyrSttusCode(String emplyrSttusCode) {
|
|
| 621 |
- this.emplyrSttusCode = emplyrSttusCode; |
|
| 622 |
- } |
|
| 623 |
- |
|
| 624 |
- public String[] getEsntlIdNsttusCode() {
|
|
| 625 |
- return esntlIdNsttusCode; |
|
| 626 |
- } |
|
| 627 |
- |
|
| 628 |
- public void setEsntlIdNsttusCode(String[] esntlIdNsttusCode) {
|
|
| 629 |
- this.esntlIdNsttusCode = esntlIdNsttusCode; |
|
| 630 |
- } |
|
| 631 |
- |
|
| 632 |
- public String getEmplyrId() {
|
|
| 633 |
- return emplyrId; |
|
| 634 |
- } |
|
| 635 |
- |
|
| 636 |
- public void setEmplyrId(String emplyrId) {
|
|
| 637 |
- this.emplyrId = emplyrId; |
|
| 638 |
- } |
|
| 639 |
- |
|
| 640 |
- public String getSearchCondition_01() {
|
|
| 641 |
- return searchCondition_01; |
|
| 642 |
- } |
|
| 643 |
- |
|
| 644 |
- public void setSearchCondition_01(String searchCondition_01) {
|
|
| 645 |
- this.searchCondition_01 = searchCondition_01; |
|
| 646 |
- } |
|
| 647 |
- |
|
| 648 |
- public String getSearchSortCnd() {
|
|
| 649 |
- return searchSortCnd; |
|
| 650 |
- } |
|
| 651 |
- |
|
| 652 |
- public void setSearchSortCnd(String searchSortCnd) {
|
|
| 653 |
- this.searchSortCnd = searchSortCnd; |
|
| 654 |
- } |
|
| 655 |
- |
|
| 656 |
- public String getSearchSortOrd() {
|
|
| 657 |
- return searchSortOrd; |
|
| 658 |
- } |
|
| 659 |
- |
|
| 660 |
- public void setSearchSortOrd(String searchSortOrd) {
|
|
| 661 |
- this.searchSortOrd = searchSortOrd; |
|
| 662 |
- } |
|
| 663 |
- |
|
| 664 |
- public String getNiceFailUrl() {
|
|
| 665 |
- return niceFailUrl; |
|
| 666 |
- } |
|
| 667 |
- |
|
| 668 |
- public void setNiceFailUrl(String niceFailUrl) {
|
|
| 669 |
- this.niceFailUrl = niceFailUrl; |
|
| 670 |
- } |
|
| 671 |
- |
|
| 672 |
- public String getNiceSuccUrl() {
|
|
| 673 |
- return niceSuccUrl; |
|
| 674 |
- } |
|
| 675 |
- |
|
| 676 |
- public void setNiceSuccUrl(String niceSuccUrl) {
|
|
| 677 |
- this.niceSuccUrl = niceSuccUrl; |
|
| 678 |
- } |
|
| 679 |
- |
|
| 680 |
- public boolean isMobile() {
|
|
| 681 |
- return isMobile; |
|
| 682 |
- } |
|
| 683 |
- |
|
| 684 |
- public void setMobile(boolean isMobile) {
|
|
| 685 |
- this.isMobile = isMobile; |
|
| 686 |
- } |
|
| 687 |
- |
|
| 688 |
- public String getNiceMessage() {
|
|
| 689 |
- return niceMessage; |
|
| 690 |
- } |
|
| 691 |
- |
|
| 692 |
- public void setNiceMessage(String niceMessage) {
|
|
| 693 |
- this.niceMessage = niceMessage; |
|
| 694 |
- } |
|
| 695 |
- |
|
| 696 |
- public String getNiceNm() {
|
|
| 697 |
- return niceNm; |
|
| 698 |
- } |
|
| 699 |
- |
|
| 700 |
- public void setNiceNm(String niceNm) {
|
|
| 701 |
- this.niceNm = niceNm; |
|
| 702 |
- } |
|
| 703 |
- |
|
| 704 |
- public String getMblDn() {
|
|
| 705 |
- return mblDn; |
|
| 706 |
- } |
|
| 707 |
- |
|
| 708 |
- public void setMblDn(String mblDn) {
|
|
| 709 |
- this.mblDn = mblDn; |
|
| 710 |
- } |
|
| 711 |
- |
|
| 712 |
- public String getMberSttus() {
|
|
| 713 |
- return mberSttus; |
|
| 714 |
- } |
|
| 715 |
- |
|
| 716 |
- public void setMberSttus(String mberSttus) {
|
|
| 717 |
- this.mberSttus = mberSttus; |
|
| 718 |
- } |
|
| 719 |
- |
|
| 720 |
- public String getSearchStartDate() {
|
|
| 721 |
- return searchStartDate; |
|
| 722 |
- } |
|
| 723 |
- |
|
| 724 |
- public void setSearchStartDate(String searchStartDate) {
|
|
| 725 |
- this.searchStartDate = searchStartDate; |
|
| 726 |
- } |
|
| 727 |
- |
|
| 728 |
- public String getSearchEndDate() {
|
|
| 729 |
- return searchEndDate; |
|
| 730 |
- } |
|
| 731 |
- |
|
| 732 |
- public void setSearchEndDate(String searchEndDate) {
|
|
| 733 |
- this.searchEndDate = searchEndDate; |
|
| 734 |
- } |
|
| 735 |
- |
|
| 736 |
- public String getCandidateYn() {
|
|
| 737 |
- return candidateYn; |
|
| 738 |
- } |
|
| 739 |
- |
|
| 740 |
- public void setCandidateYn(String candidateYn) {
|
|
| 741 |
- this.candidateYn = candidateYn; |
|
| 742 |
- } |
|
| 743 |
- |
|
| 744 |
- public String getSearchBestCategory() {
|
|
| 745 |
- return searchBestCategory; |
|
| 746 |
- } |
|
| 747 |
- |
|
| 748 |
- public void setSearchBestCategory(String searchBestCategory) {
|
|
| 749 |
- this.searchBestCategory = searchBestCategory; |
|
| 750 |
- } |
|
| 751 |
- |
|
| 752 |
- public String getSearchDiv() {
|
|
| 753 |
- return searchDiv; |
|
| 754 |
- } |
|
| 755 |
- |
|
| 756 |
- public void setSearchDiv(String searchDiv) {
|
|
| 757 |
- this.searchDiv = searchDiv; |
|
| 758 |
- } |
|
| 759 |
- |
|
| 760 |
- public String getSearchTwoDptCategoryCode() {
|
|
| 761 |
- return searchTwoDptCategoryCode; |
|
| 762 |
- } |
|
| 763 |
- |
|
| 764 |
- public void setSearchTwoDptCategoryCode(String searchTwoDptCategoryCode) {
|
|
| 765 |
- this.searchTwoDptCategoryCode = searchTwoDptCategoryCode; |
|
| 766 |
- } |
|
| 767 |
- |
|
| 768 |
- public String getSearchThrDptCategoryCode() {
|
|
| 769 |
- return searchThrDptCategoryCode; |
|
| 770 |
- } |
|
| 771 |
- |
|
| 772 |
- public void setSearchThrDptCategoryCode(String searchThrDptCategoryCode) {
|
|
| 773 |
- this.searchThrDptCategoryCode = searchThrDptCategoryCode; |
|
| 774 |
- } |
|
| 775 |
- |
|
| 776 |
- public String getSearchStartDate2() {
|
|
| 777 |
- return searchStartDate2; |
|
| 778 |
- } |
|
| 779 |
- |
|
| 780 |
- public void setSearchStartDate2(String searchStartDate2) {
|
|
| 781 |
- this.searchStartDate2 = searchStartDate2; |
|
| 782 |
- } |
|
| 783 |
- |
|
| 784 |
- public String getSearchEndDate2() {
|
|
| 785 |
- return searchEndDate2; |
|
| 786 |
- } |
|
| 787 |
- |
|
| 788 |
- public void setSearchEndDate2(String searchEndDate2) {
|
|
| 789 |
- this.searchEndDate2 = searchEndDate2; |
|
| 790 |
- } |
|
| 791 |
- |
|
| 792 | 203 |
|
| 793 | 204 |
} |
+++ src/main/java/itn/let/utl/user/service/ExcelUtil.java
... | ... | @@ -0,0 +1,143 @@ |
| 1 | +package itn.let.utl.user.service; | |
| 2 | + | |
| 3 | +import java.beans.PropertyDescriptor; | |
| 4 | +import java.lang.reflect.Method; | |
| 5 | +import java.util.List; | |
| 6 | + | |
| 7 | +import org.apache.poi.hssf.usermodel.HSSFCellStyle; | |
| 8 | +import org.apache.poi.hssf.usermodel.HSSFDataFormat; | |
| 9 | +import org.apache.poi.ss.usermodel.Cell; | |
| 10 | +import org.apache.poi.ss.usermodel.CellStyle; | |
| 11 | +import org.apache.poi.ss.usermodel.HorizontalAlignment; | |
| 12 | +import org.apache.poi.ss.usermodel.Row; | |
| 13 | +import org.apache.poi.ss.usermodel.VerticalAlignment; | |
| 14 | +import org.apache.poi.xssf.streaming.SXSSFSheet; | |
| 15 | +import org.apache.poi.xssf.streaming.SXSSFWorkbook; | |
| 16 | +import org.slf4j.Logger; | |
| 17 | +import org.slf4j.LoggerFactory; | |
| 18 | +import org.springframework.stereotype.Component; | |
| 19 | + | |
| 20 | +@Component | |
| 21 | +public class ExcelUtil { | |
| 22 | + private static final Logger log = LoggerFactory.getLogger(ExcelUtil.class); | |
| 23 | + | |
| 24 | + /** | |
| 25 | + * 엑셀 파일을 방출합니다. | |
| 26 | + * | |
| 27 | + * @param voList 엑셀에 넣고 싶은 vo 리스트 형태로 넣습니다. | |
| 28 | + * @param header 엑셀 해더 | |
| 29 | + * @param order 헤더에 해당하는 내용의 vo 필드 이름을 작성합니다. 예를 들어 String userName; 필드의 1번째 해더이름을 "사용자 이름" 으로 정했으면 | |
| 30 | + * 순서를 맞추어 1번째 order 배열에 "UserName" 이라는 글짜를 입력해줍니다(*주의:첫 문자는 대문자, 낙타체). 첫번째 컬럼에는 "줄번호"가 | |
| 31 | + * 들어가는데, 이것에 대한 내용은 order에 값을 입력하지 않습니다. | |
| 32 | + * @param width 컬럼 너비를 설정합니다. length가 해더의 length와 일치할 필요는 없습니다. | |
| 33 | + * @param title | |
| 34 | + * @throws Exception | |
| 35 | + * @return SXSSFSheet | |
| 36 | + * | |
| 37 | + * 특징 : 해더보다 내용의 컬럼수가 많을 때 해당 줄의 컬럼은 cut, 해더 이름이 vo와 다르게 되면 해당 컬럼 출력 안됨 require : 날짜 포멧은 | |
| 38 | + * 지원하지 않습니다. | |
| 39 | + * | |
| 40 | + * | |
| 41 | + * *********************************************************************************************** | |
| 42 | + * EX String title = "게시판 리스트"; | |
| 43 | + * int[] width = {1500, 1500, 1500, 3000, 30000, 3000 }; | |
| 44 | + * String[] header = {"번호", "게시판번호", "작성자", "제목", "내용", "작성일" }; | |
| 45 | + * String[] order = { "Seq", "UserId", "Title", "Content", "RegDt" }; | |
| 46 | + * => 첫번째 "번호"에 대한 order 이름이 비어있습니다. | |
| 47 | + * | |
| 48 | + * *********************************************************************************************** | |
| 49 | + */ | |
| 50 | + public static SXSSFWorkbook makeSimpleFruitExcelWorkbook(List<Object> voList, String[] header, String[] order, int[] width, String title) throws Exception { | |
| 51 | + // 시트 생성 | |
| 52 | + SXSSFWorkbook workbook = new SXSSFWorkbook(); | |
| 53 | + SXSSFSheet sheet = workbook.createSheet(title); | |
| 54 | + for (int i = 0; i < width.length; i++) { | |
| 55 | + // JSP 2022.02.24 => width 변경 | |
| 56 | + //sheet.setColumnWidth(0, width[width.length - (i + 1)]); | |
| 57 | + sheet.setColumnWidth(i, width[i]); | |
| 58 | + } | |
| 59 | + | |
| 60 | + int r = 2;// 줄부터 찍기 | |
| 61 | + | |
| 62 | + CellStyle headerstyle = workbook.createCellStyle(); | |
| 63 | + headerstyle.setAlignment(HorizontalAlignment.CENTER); | |
| 64 | + headerstyle.setVerticalAlignment(VerticalAlignment.CENTER); | |
| 65 | + headerstyle.setBorderBottom(HSSFCellStyle.BORDER_THIN); | |
| 66 | + // 헤더 행 생 | |
| 67 | + Row headerRow = sheet.createRow(r); | |
| 68 | + // 해더 값 채움 (우측 방향으로) | |
| 69 | + Cell headerCell = null; | |
| 70 | + for (int i = 0; i < header.length; i++) { | |
| 71 | + headerRow.setHeight((short)512); | |
| 72 | + | |
| 73 | + headerCell = headerRow.createCell(i); | |
| 74 | + headerCell.setCellStyle(headerstyle); | |
| 75 | + headerCell.setCellValue(header[i]); | |
| 76 | + } | |
| 77 | + | |
| 78 | + // 내용 행 및 셀 생성 | |
| 79 | + Row bodyRow = null; | |
| 80 | + Cell bodyCell = null; | |
| 81 | + | |
| 82 | + bodyRow = sheet.createRow(0); | |
| 83 | + bodyCell = bodyRow.createCell(0); | |
| 84 | + bodyCell.setCellValue(title);// 읽어온 데이터 표시 | |
| 85 | + | |
| 86 | + //System.out.println("voList.size()"); | |
| 87 | + //System.out.println(voList.size()); | |
| 88 | + //System.out.println(voList.size()); | |
| 89 | + | |
| 90 | + int c = 0;// 컬럼 | |
| 91 | + for (Object vo : voList) { | |
| 92 | + bodyRow = sheet.createRow(r + 1); | |
| 93 | + bodyCell = bodyRow.createCell(0); | |
| 94 | + //bodyCell.setCellValue(r + 1); // 첫 컬럼은 줄 번호 | |
| 95 | + | |
| 96 | + PropertyDescriptor pd; // 클래스의 필드 메소드를 찾아줌. 이름을 기존에 vo.setUserId() 란 메소드를 통해서만 호출이 가능 했다면, PropertyDescriptor는 이름만으로 메소드 | |
| 97 | + // 호출이 가능함. 클래스가 변경 되어도 동일한 작동으로 getter&setter 호출이 가능하도록 도와줌 | |
| 98 | + Method[] methods = vo.getClass().getDeclaredMethods(); // 메소드들 호출함 | |
| 99 | + // 배열로 준 이름 과 같으면 해당 열 데이터 쓰기 | |
| 100 | + for (int i = 0; i < order.length; i++) { | |
| 101 | + for (Method method : methods) { // vo 내부 메소드 반복 | |
| 102 | + | |
| 103 | +// System.out.println("i :: "+ i + "methods : "+ methods); | |
| 104 | + /*System.out.println("voList.method()"); | |
| 105 | + System.out.println(method.getName());*/ | |
| 106 | + | |
| 107 | + if (method.getName().equals("get" + (order[i] == null ? "" : order[i]))) { // vo메소드 이름과 order의 이름 비교 | |
| 108 | + // getter 호출 준비 | |
| 109 | + String getMethodName = method.getName().substring(3); // getter의 이름 가져옴 | |
| 110 | + pd = new PropertyDescriptor(getMethodName, vo.getClass()); | |
| 111 | + // vo의 데이터 세팅 | |
| 112 | + String cellData = (pd.getReadMethod().invoke(vo) != null ? pd.getReadMethod().invoke(vo) : "").toString(); | |
| 113 | + bodyCell = bodyRow.createCell(c++); // 데이터 순서 | |
| 114 | + if(getMethodName.equals("InstrFee") || getMethodName.equals("SpecialWorkAllow") || getMethodName.equals("DistanceAllow") | |
| 115 | + || getMethodName.equals("TrafficFee") || getMethodName.equals("AcmdtFee") | |
| 116 | + || getMethodName.equals("Amt") || getMethodName.equals("Cash") | |
| 117 | + ){ | |
| 118 | + | |
| 119 | + // JSP 2022.02.22 => null 에러 try~catch 문 추가 | |
| 120 | + try { | |
| 121 | + double num = Double.parseDouble(cellData); | |
| 122 | + CellStyle bodyStyle = workbook.createCellStyle(); | |
| 123 | + bodyCell.setCellValue(num);// 읽어온 데이터 표시 | |
| 124 | + bodyStyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("#,##0")); | |
| 125 | + bodyCell.setCellStyle(bodyStyle); | |
| 126 | + } | |
| 127 | + catch (Exception ex) { | |
| 128 | + bodyCell.setCellValue(cellData); | |
| 129 | + } | |
| 130 | + }else { | |
| 131 | + bodyCell.setCellValue(cellData);// 읽어온 데이터 표시 | |
| 132 | + } | |
| 133 | + //System.out.println("@@ : "+getMethodName +" --- " + cellData); | |
| 134 | + } | |
| 135 | + } | |
| 136 | + } | |
| 137 | + c = 0; | |
| 138 | + r++; | |
| 139 | + } | |
| 140 | + return workbook; | |
| 141 | + } | |
| 142 | + | |
| 143 | +} |
--- src/main/resources/egovframework/sqlmap/let/mjo/addr/Addr_SQL_Mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/mjo/addr/Addr_SQL_Mysql.xml
... | ... | @@ -933,7 +933,7 @@ |
| 933 | 933 |
|
| 934 | 934 |
</select> |
| 935 | 935 |
|
| 936 |
- <insert id="AddrDAO.insertAddrList" parameterClass="java.util.List"> |
|
| 936 |
+ <update id="AddrDAO.insertAddrList" parameterClass="java.util.List"> |
|
| 937 | 937 |
/* AddrDAO.insertAddrList */ |
| 938 | 938 |
INSERT INTO MJ_ADDR |
| 939 | 939 |
( |
... | ... | @@ -967,7 +967,18 @@ |
| 967 | 967 |
) |
| 968 | 968 |
</iterate> |
| 969 | 969 |
|
| 970 |
- </insert> |
|
| 970 |
+ </update> |
|
| 971 |
+ |
|
| 972 |
+ <update id="AddrDAO.deleteAddrPhoneNo" parameterClass="addrVO"> |
|
| 973 |
+ |
|
| 974 |
+ DELETE FROM MJ_ADDR |
|
| 975 |
+ |
|
| 976 |
+ WHERE MBER_ID = #mberId# |
|
| 977 |
+ <iterate prepend="AND ADDR_PHONE_NO IN" open="(" close=")" conjunction="," property="addrPhones">
|
|
| 978 |
+ #addrPhones[]# |
|
| 979 |
+ </iterate> |
|
| 980 |
+ |
|
| 981 |
+ </update> |
|
| 971 | 982 |
|
| 972 | 983 |
<!-- 주소록 그룹명 중복확인 --> |
| 973 | 984 |
<select id="AddrDAO.selectDuplAddrCnt" parameterClass="addrVO" resultClass="int"> |
--- src/main/resources/egovframework/sqlmap/let/mjo/kakao/KakaoSent_SQL_Mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/mjo/kakao/KakaoSent_SQL_Mysql.xml
... | ... | @@ -4,11 +4,13 @@ |
| 4 | 4 |
========= ======= ================================================= |
| 5 | 5 |
2023.02.17 안주영 |
| 6 | 6 |
--> |
| 7 |
-<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-config-2.dtd"> |
|
| 7 |
+<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd" > |
|
| 8 | 8 |
<sqlMap namespace="KakaoSent"> |
| 9 | 9 |
<typeAlias alias="kakaoSentVO" type="itn.let.kakao.user.sent.service.KakaoSentVO"/> |
| 10 | 10 |
<typeAlias alias="mjonKakaoATVO" type="itn.let.kakao.admin.kakaoAt.service.MjonKakaoATVO"/> |
| 11 | 11 |
<typeAlias alias="kakaoAtStatVO" type="itn.let.kakao.admin.kakaoAt.service.MjonKakaoAtStatVO"/> |
| 12 |
+ <typeAlias alias="kakaoSentDetailVO" type="itn.let.kakao.user.sent.service.KakaoSentDetailVO"/> |
|
| 13 |
+ |
|
| 12 | 14 |
|
| 13 | 15 |
<!-- 공통 쿼리 부분 문자 발송 관련 --> |
| 14 | 16 |
<sql id="KakaoSentDAO.selectJoinQuery"> |
... | ... | @@ -1350,4 +1352,559 @@ |
| 1350 | 1352 |
) M2 |
| 1351 | 1353 |
</select> |
| 1352 | 1354 |
|
| 1355 |
+ <!-- 전체 발송결과 조회 (그룹별)--> |
|
| 1356 |
+ <select id="KakaoSentDAO.selectAllKakaoSentList_advc" parameterClass="kakaoSentVO" resultClass="kakaoSentVO"> |
|
| 1357 |
+ /* KakaoSentDAO.selectAllKakaoSentList_advc */ |
|
| 1358 |
+ SELECT t1.totMsgCnt, |
|
| 1359 |
+ t1.userId, |
|
| 1360 |
+ t1.msgGroupId, |
|
| 1361 |
+ t1.msgGroupCnt, |
|
| 1362 |
+ t1.smsTxt, |
|
| 1363 |
+ t1.subject, |
|
| 1364 |
+ t1.subjectChkYn, |
|
| 1365 |
+ t1.regDate, |
|
| 1366 |
+ t1.reqDate, |
|
| 1367 |
+ t1.delayOrgTime, |
|
| 1368 |
+ t1.callFrom, |
|
| 1369 |
+ t1.totPrice, |
|
| 1370 |
+ t1.eachPrice, |
|
| 1371 |
+ t1.msgType, |
|
| 1372 |
+ t1.fileCnt, |
|
| 1373 |
+ t1.agentCode, |
|
| 1374 |
+ t1.canceldate, |
|
| 1375 |
+ t1.delFlag, |
|
| 1376 |
+ t1.sendKind, |
|
| 1377 |
+ t1.msgKind, |
|
| 1378 |
+ t1.delayYn, |
|
| 1379 |
+ t1.delayCompleteYn, |
|
| 1380 |
+ t1.reserveYn, |
|
| 1381 |
+ t1.reserveCYn, |
|
| 1382 |
+ t1.diffMin, |
|
| 1383 |
+ t1.atDelayYn, |
|
| 1384 |
+ t1.atDelayCompleteYn, |
|
| 1385 |
+ t1.msgNoticetalkSenderKey, |
|
| 1386 |
+ t1.bizKakaoResendYn, |
|
| 1387 |
+ t1.atDelayOrgTime |
|
| 1388 |
+ FROM ( |
|
| 1389 |
+ SELECT COUNT(B.USER_ID) OVER() AS totMsgCnt, |
|
| 1390 |
+ B.USER_ID AS userId , |
|
| 1391 |
+ B.MSG_GROUP_ID AS msgGroupId , |
|
| 1392 |
+ B.MSG_GROUP_CNT AS msgGroupCnt , |
|
| 1393 |
+ B.SMS_TXT AS smsTxt , |
|
| 1394 |
+ B.SUBJECT AS subject , |
|
| 1395 |
+ B.SUBJECT_CHK_YN AS subjectChkYn , |
|
| 1396 |
+ B.REGDATE AS regDate , |
|
| 1397 |
+ B.REQ_DATE AS reqDate , |
|
| 1398 |
+ ( CASE |
|
| 1399 |
+ WHEN B.DELAY_YN = 'Y' |
|
| 1400 |
+ AND B.DELAY_COMPLETE_YN = 'N' |
|
| 1401 |
+ THEN DATE_ADD(B.REQ_DATE, INTERVAL -30 MINUTE) |
|
| 1402 |
+ ELSE B.REQ_DATE |
|
| 1403 |
+ END ) AS delayOrgTime , |
|
| 1404 |
+ B.CALL_FROM AS callFrom , |
|
| 1405 |
+ B.TOT_PRICE AS totPrice , |
|
| 1406 |
+ B.EACH_PRICE AS eachPrice , |
|
| 1407 |
+ B.MSG_TYPE AS msgType , |
|
| 1408 |
+ B.FILE_CNT AS fileCnt , |
|
| 1409 |
+ B.AGENT_CODE AS agentCode , |
|
| 1410 |
+ B.RESERVE_C_YN AS reserveCYn , |
|
| 1411 |
+ B.CANCELDATE AS canceldate , |
|
| 1412 |
+ B.DEL_FLAG AS delFlag , |
|
| 1413 |
+ B.SEND_KIND AS sendKind , |
|
| 1414 |
+ B.MSG_KIND AS msgKind , |
|
| 1415 |
+ B.DELAY_YN AS delayYn , |
|
| 1416 |
+ B.DELAY_COMPLETE_YN AS delayCompleteYn , |
|
| 1417 |
+ B.RESERVE_YN AS reserveYn , |
|
| 1418 |
+ TIMESTAMPDIFF(minute, CAST(DATE_FORMAT(B.REQ_DATE, '%Y-%m-%d %H:%i') AS CHAR), DATE_FORMAT(NOW(), '%Y-%m-%d %H:%i')) AS diffMin, |
|
| 1419 |
+ B.AT_DELAY_YN AS atDelayYn, |
|
| 1420 |
+ B.AT_DELAY_COMPLETE_YN AS atDelayCompleteYn, |
|
| 1421 |
+ A.MSG_NOTICETALK_SENDER_KEY AS msgNoticetalkSenderKey, |
|
| 1422 |
+ A.BIZ_KAKAO_RESEND_YN AS bizKakaoResendYn, |
|
| 1423 |
+ IF(B.AT_DELAY_YN = 'Y' and B.AT_DELAY_COMPLETE_YN = 'N', DATE_ADD(B.REQ_DATE, INTERVAL -30 MINUTE), B.REQ_DATE) AS atDelayOrgTime |
|
| 1424 |
+ FROM MJ_MSG_DATA A |
|
| 1425 |
+ JOIN MJ_MSG_GROUP_DATA B |
|
| 1426 |
+ ON A.MSG_GROUP_ID = B.MSG_GROUP_ID |
|
| 1427 |
+ WHERE ( |
|
| 1428 |
+ B.DEL_FLAG = 'N' OR B.DEL_FLAG IS NULL |
|
| 1429 |
+ ) |
|
| 1430 |
+ AND A.DEL_FLAG = 'N' |
|
| 1431 |
+<!-- AND B.REQ_DATE <![CDATA[ <= ]]> DATE_ADD(NOW(), INTERVAL 60 MINUTE) --> |
|
| 1432 |
+ AND B.USER_ID = #userId# |
|
| 1433 |
+ <isNotEmpty property="startDate"> |
|
| 1434 |
+ AND DATE_FORMAT(B.REGDATE, '%Y-%m-%d') <![CDATA[ >= ]]> DATE_FORMAT(#startDate#, '%Y-%m-%d') |
|
| 1435 |
+ </isNotEmpty> |
|
| 1436 |
+ <isNotEmpty property="endDate"> |
|
| 1437 |
+ AND DATE_FORMAT(B.REGDATE, '%Y-%m-%d') <![CDATA[ <= ]]> DATE_FORMAT(#endDate#, '%Y-%m-%d') |
|
| 1438 |
+ </isNotEmpty> |
|
| 1439 |
+ <isNotEmpty property="tabType"> |
|
| 1440 |
+ <isEqual property="tabType" compareValue="at"> |
|
| 1441 |
+ AND A.MSG_TYPE = '8' |
|
| 1442 |
+ </isEqual> |
|
| 1443 |
+ <isEqual property="tabType" compareValue="ft"> |
|
| 1444 |
+ AND A.MSG_TYPE = '9' |
|
| 1445 |
+ </isEqual> |
|
| 1446 |
+ <isEqual property="tabType" compareValue="all"> |
|
| 1447 |
+ AND A.MSG_TYPE IN ('8','9')
|
|
| 1448 |
+ </isEqual> |
|
| 1449 |
+ </isNotEmpty> |
|
| 1450 |
+ <isEmpty property="tabType"> |
|
| 1451 |
+ AND A.MSG_TYPE IN ('8','9')
|
|
| 1452 |
+ </isEmpty> |
|
| 1453 |
+ <isNotEmpty property="stateType"> |
|
| 1454 |
+ <isEqual property="stateType" compareValue="Y"> |
|
| 1455 |
+ AND B.RESERVE_YN = 'Y' |
|
| 1456 |
+ </isEqual> |
|
| 1457 |
+ <isEqual property="stateType" compareValue="N"> |
|
| 1458 |
+ AND B.RESERVE_YN = 'N' |
|
| 1459 |
+ </isEqual> |
|
| 1460 |
+ </isNotEmpty> |
|
| 1461 |
+ GROUP BY B.MSG_GROUP_ID |
|
| 1462 |
+ ORDER BY 1=1 |
|
| 1463 |
+ <isNotEmpty property="searchSortCnd"> |
|
| 1464 |
+ <isEqual property="searchSortCnd" compareValue="curState"> |
|
| 1465 |
+ , A.CUR_STATE $searchSortOrd$ |
|
| 1466 |
+ , IF((RSLT_CODE != '7000'),'1','0') |
|
| 1467 |
+ </isEqual> |
|
| 1468 |
+ <isNotEqual property="searchSortCnd" compareValue="curState"> |
|
| 1469 |
+ ,$searchSortCnd$ |
|
| 1470 |
+ </isNotEqual> |
|
| 1471 |
+ </isNotEmpty> |
|
| 1472 |
+ <isNotEmpty property="searchSortOrd"> |
|
| 1473 |
+ $searchSortOrd$ |
|
| 1474 |
+ </isNotEmpty> |
|
| 1475 |
+ LIMIT #recordCountPerPage# |
|
| 1476 |
+ OFFSET #firstIndex# |
|
| 1477 |
+ ) t1 |
|
| 1478 |
+ </select> |
|
| 1479 |
+ |
|
| 1480 |
+ |
|
| 1481 |
+ <!-- 발송결과 상단 전광판 조회(전체, 알림톡, 친구톡) MIX 결과 수량 --> |
|
| 1482 |
+ <select id="KakaoSentDAO.selectKakaoSentCntAll_advc" parameterClass="kakaoSentVO" resultClass="kakaoSentVO"> |
|
| 1483 |
+ /* 발송결과 상단 전광판 조회(전체, 알림톡, 친구톡) MIX 결과 수량 */ |
|
| 1484 |
+ SELECT |
|
| 1485 |
+ A0.MSG_GROUP_ID AS msgGroupId |
|
| 1486 |
+ , COUNT(A0.RESULT) AS msgResultCnt |
|
| 1487 |
+ , A0.RESULT AS msgResultSts |
|
| 1488 |
+ , A0.RSLT_CODE AS rsltCode |
|
| 1489 |
+ , A0.RSLT_CODE2 AS rsltCode2 |
|
| 1490 |
+ , A0.AGENT_CODE AS agentCode |
|
| 1491 |
+ , A0.EACH_PRICE AS eachPrice |
|
| 1492 |
+ , sum(if(A0.tab1=0,0,1)) as filePath1 /* 알림톡 */ |
|
| 1493 |
+ , sum(if(A0.tab2=0,0,1)) as filePath2 /* 친구톡 */ |
|
| 1494 |
+ FROM( |
|
| 1495 |
+ SELECT |
|
| 1496 |
+ MD.MSG_ID |
|
| 1497 |
+ , MD.MSG_GROUP_ID |
|
| 1498 |
+ , MD.MSG_SEQ |
|
| 1499 |
+ , MD.CUR_STATE |
|
| 1500 |
+ , MD.SENT_DATE |
|
| 1501 |
+ , (CASE |
|
| 1502 |
+ WHEN |
|
| 1503 |
+ MD.RSLT_CODE = '7000' |
|
| 1504 |
+ THEN 'S' |
|
| 1505 |
+ WHEN |
|
| 1506 |
+ ( |
|
| 1507 |
+ MD.RSLT_CODE IS NULL |
|
| 1508 |
+ AND MD.SENT_DATE IS NULL |
|
| 1509 |
+ AND MD.RSLT_DATE IS NULL |
|
| 1510 |
+ ) |
|
| 1511 |
+ THEN 'W' |
|
| 1512 |
+ ELSE 'F' |
|
| 1513 |
+ END) AS RESULT |
|
| 1514 |
+ , MD.RSLT_CODE |
|
| 1515 |
+ , MD.RSLT_CODE2 |
|
| 1516 |
+ , MD.AGENT_CODE |
|
| 1517 |
+ , MG.EACH_PRICE |
|
| 1518 |
+ , if (MD.MSG_TYPE= '8','01','00') AS tab1 |
|
| 1519 |
+ , if (MD.MSG_TYPE= '9','01','00') AS tab2 |
|
| 1520 |
+ FROM |
|
| 1521 |
+ MJ_MSG_DATA MD |
|
| 1522 |
+ INNER JOIN |
|
| 1523 |
+ MJ_MSG_GROUP_DATA MG |
|
| 1524 |
+ ON |
|
| 1525 |
+ MD.MSG_GROUP_ID = MG.MSG_GROUP_ID |
|
| 1526 |
+ INNER JOIN |
|
| 1527 |
+ BIZ_KAKAO_PRICE BZP |
|
| 1528 |
+ ON |
|
| 1529 |
+ MG.MSG_GROUP_ID = BZP.MSG_GROUP_ID |
|
| 1530 |
+ WHERE 1=1 |
|
| 1531 |
+ AND IFNULL(MG.DEL_FLAG,'N') = 'N' |
|
| 1532 |
+ AND MD.USER_ID = #userId# |
|
| 1533 |
+ <isNotEmpty property="ntceBgnde"> |
|
| 1534 |
+ AND DATE_FORMAT(MG.REQ_DATE, '%Y/%m/%d') BETWEEN #ntceBgnde# AND #ntceEndde# |
|
| 1535 |
+ </isNotEmpty> |
|
| 1536 |
+ AND MD.MSG_TYPE IN ('8','9')
|
|
| 1537 |
+ AND MG.RESERVE_C_YN = 'N' |
|
| 1538 |
+ ) A0 |
|
| 1539 |
+ GROUP BY |
|
| 1540 |
+ A0.MSG_GROUP_ID |
|
| 1541 |
+ , A0.RESULT |
|
| 1542 |
+ , A0.RSLT_CODE |
|
| 1543 |
+ , A0.RSLT_CODE2 |
|
| 1544 |
+ , A0.AGENT_CODE |
|
| 1545 |
+ ORDER BY |
|
| 1546 |
+ A0.MSG_GROUP_ID DESC |
|
| 1547 |
+ </select> |
|
| 1548 |
+ |
|
| 1549 |
+ <select id="KakaoSentDAO.selectKakaoSentCntEachCnt_advc" parameterClass="kakaoSentVO" resultClass="kakaoSentVO"> |
|
| 1550 |
+ SELECT a.MSG_GROUP_ID AS msgGroupId, |
|
| 1551 |
+ a.successCount, |
|
| 1552 |
+ a.waitCount, |
|
| 1553 |
+ a.failCount, |
|
| 1554 |
+ a.kakaoResendSuccCount, |
|
| 1555 |
+ a.kakaoResendFailCount, |
|
| 1556 |
+ a.successCount * bkp.BIZ_KAKAO_AT_PRICE AS successPrice, |
|
| 1557 |
+ (a.smsCnt * bkp.BIZ_SMS_PRICE) + (a.mmsCnt * bkp.BIZ_MMS_PRICE) AS kakaoResendSuccPrice, |
|
| 1558 |
+ a.divideYn |
|
| 1559 |
+ FROM (SELECT t1.MSG_GROUP_ID, |
|
| 1560 |
+ ( SELECT COUNT(0) |
|
| 1561 |
+ FROM MJ_MSG_DATA C |
|
| 1562 |
+ WHERE C.RESERVE_C_YN = 'N' |
|
| 1563 |
+ AND C.MSG_GROUP_ID = t1.MSG_GROUP_ID |
|
| 1564 |
+ AND C.RSLT_CODE = '7000' |
|
| 1565 |
+ ) |
|
| 1566 |
+ AS successCount , |
|
| 1567 |
+ ( SELECT COUNT(0) |
|
| 1568 |
+ FROM MJ_MSG_DATA C |
|
| 1569 |
+ WHERE C.RESERVE_C_YN = 'N' |
|
| 1570 |
+ AND C.MSG_GROUP_ID = t1.MSG_GROUP_ID |
|
| 1571 |
+ AND |
|
| 1572 |
+ ( |
|
| 1573 |
+ C.RSLT_CODE IS NULL |
|
| 1574 |
+ AND C.SENT_DATE IS NULL |
|
| 1575 |
+ AND C.RSLT_DATE IS NULL |
|
| 1576 |
+ ) |
|
| 1577 |
+ ) |
|
| 1578 |
+ AS waitCount , |
|
| 1579 |
+ ( SELECT COUNT(0) |
|
| 1580 |
+ FROM MJ_MSG_DATA C |
|
| 1581 |
+ WHERE C.RESERVE_C_YN = 'N' |
|
| 1582 |
+ AND C.MSG_GROUP_ID = t1.MSG_GROUP_ID |
|
| 1583 |
+ AND |
|
| 1584 |
+ ( |
|
| 1585 |
+ C.RSLT_CODE != '7000' |
|
| 1586 |
+ AND C.RSLT_CODE IS NOT NULL |
|
| 1587 |
+ ) |
|
| 1588 |
+ ) |
|
| 1589 |
+ AS failCount , |
|
| 1590 |
+ ( SELECT COUNT(0) |
|
| 1591 |
+ FROM BIZ_LOG BL1, |
|
| 1592 |
+ MJ_MSG_DATA MMD1 |
|
| 1593 |
+ WHERE t1.BIZ_KAKAO_RESEND_YN = 'Y' |
|
| 1594 |
+ AND t1.MSG_GROUP_ID = MMD1.MSG_GROUP_ID |
|
| 1595 |
+ AND MMD1.BIZ_UMID = BL1.CMID |
|
| 1596 |
+ AND ( |
|
| 1597 |
+ CASE |
|
| 1598 |
+ WHEN BL1.CALL_STATUS IN ('6600',
|
|
| 1599 |
+ '4100') |
|
| 1600 |
+ THEN 'S' |
|
| 1601 |
+ ELSE 'F' |
|
| 1602 |
+ END ) = 'S' |
|
| 1603 |
+ ) |
|
| 1604 |
+ kakaoResendSuccCount, |
|
| 1605 |
+ ( SELECT COUNT(0) |
|
| 1606 |
+ FROM BIZ_LOG BL1, |
|
| 1607 |
+ MJ_MSG_DATA MMD1 |
|
| 1608 |
+ WHERE t1.BIZ_KAKAO_RESEND_YN = 'Y' |
|
| 1609 |
+ AND t1.MSG_GROUP_ID = MMD1.MSG_GROUP_ID |
|
| 1610 |
+ AND MMD1.BIZ_UMID = BL1.CMID |
|
| 1611 |
+ AND ( |
|
| 1612 |
+ CASE |
|
| 1613 |
+ WHEN BL1.CALL_STATUS IN ('6600',
|
|
| 1614 |
+ '4100') |
|
| 1615 |
+ THEN 'S' |
|
| 1616 |
+ ELSE 'F' |
|
| 1617 |
+ END ) = 'F' |
|
| 1618 |
+ ) |
|
| 1619 |
+ kakaoResendFailCount, |
|
| 1620 |
+ ( SELECT COUNT(0) |
|
| 1621 |
+ FROM BIZ_LOG BL1, |
|
| 1622 |
+ MJ_MSG_DATA MMD1 |
|
| 1623 |
+ WHERE t1.BIZ_KAKAO_RESEND_YN = 'Y' |
|
| 1624 |
+ AND t1.MSG_GROUP_ID = MMD1.MSG_GROUP_ID |
|
| 1625 |
+ AND MMD1.BIZ_UMID = BL1.CMID |
|
| 1626 |
+ AND ( |
|
| 1627 |
+ CASE |
|
| 1628 |
+ WHEN BL1.CALL_STATUS IN ('6600',
|
|
| 1629 |
+ '4100') |
|
| 1630 |
+ THEN 'S' |
|
| 1631 |
+ ELSE 'F' |
|
| 1632 |
+ END ) = 'S' |
|
| 1633 |
+ AND MMD1.BIZ_KAKAO_RESEND_TYPE = 'SMS' |
|
| 1634 |
+ ) |
|
| 1635 |
+ smsCnt, |
|
| 1636 |
+ ( SELECT COUNT(0) |
|
| 1637 |
+ FROM BIZ_LOG BL1, |
|
| 1638 |
+ MJ_MSG_DATA MMD1 |
|
| 1639 |
+ WHERE t1.BIZ_KAKAO_RESEND_YN = 'Y' |
|
| 1640 |
+ AND t1.MSG_GROUP_ID = MMD1.MSG_GROUP_ID |
|
| 1641 |
+ AND MMD1.BIZ_UMID = BL1.CMID |
|
| 1642 |
+ AND ( |
|
| 1643 |
+ CASE |
|
| 1644 |
+ WHEN BL1.CALL_STATUS IN ('6600',
|
|
| 1645 |
+ '4100') |
|
| 1646 |
+ THEN 'S' |
|
| 1647 |
+ ELSE 'F' |
|
| 1648 |
+ END ) = 'S' |
|
| 1649 |
+ AND MMD1.BIZ_KAKAO_RESEND_TYPE = 'MMS' |
|
| 1650 |
+ ) |
|
| 1651 |
+ mmsCnt, |
|
| 1652 |
+ CASE |
|
| 1653 |
+ WHEN COUNT(DISTINCT t1.REQ_DATE) > 1 THEN 'Y' |
|
| 1654 |
+ ELSE 'N' |
|
| 1655 |
+ END AS divideYN |
|
| 1656 |
+ FROM mj_msg_data t1 |
|
| 1657 |
+ WHERE t1.DEL_FLAG = 'N' |
|
| 1658 |
+ AND t1.MSG_TYPE IN ('8',
|
|
| 1659 |
+ '9') |
|
| 1660 |
+ AND t1.CUR_STATE IN ('0',
|
|
| 1661 |
+ '1', |
|
| 1662 |
+ '2', |
|
| 1663 |
+ '3') |
|
| 1664 |
+ AND t1.MSG_GROUP_ID = #msgGroupId# |
|
| 1665 |
+ GROUP BY t1.MSG_GROUP_ID |
|
| 1666 |
+ ) |
|
| 1667 |
+ a |
|
| 1668 |
+ LEFT OUTER JOIN BIZ_KAKAO_PRICE bkp |
|
| 1669 |
+ ON bkp.MSG_GROUP_ID = a.MSG_GROUP_ID |
|
| 1670 |
+ </select> |
|
| 1671 |
+ |
|
| 1672 |
+ <!-- 알림톡 발송결과 상세 데이터--> |
|
| 1673 |
+ <select id="KakaoSentDAO.selectKakaoSentDetailView" parameterClass="kakaoSentDetailVO" resultClass="kakaoSentDetailVO"> |
|
| 1674 |
+ /* KakaoSentDAO.selectKakaoSentDetailView */ |
|
| 1675 |
+ select |
|
| 1676 |
+ a.msgGroupId |
|
| 1677 |
+ , a.msgGroupCnt |
|
| 1678 |
+ , a.reserveYn |
|
| 1679 |
+ , a.reserveCYn |
|
| 1680 |
+ , a.canceldate |
|
| 1681 |
+ , a.callFrom |
|
| 1682 |
+ , a.userId |
|
| 1683 |
+ , a.smsTxt |
|
| 1684 |
+ , a.subject |
|
| 1685 |
+ , a.reqDate |
|
| 1686 |
+ , a.regDate |
|
| 1687 |
+ , a.msgType |
|
| 1688 |
+ , a.msgKind |
|
| 1689 |
+ , a.eachPrice |
|
| 1690 |
+ , a.sentDate |
|
| 1691 |
+ , a.diffMin |
|
| 1692 |
+ , a.subjectChkYn |
|
| 1693 |
+ , a.msgGroupId |
|
| 1694 |
+ , a.successCount |
|
| 1695 |
+ , a.waitCount |
|
| 1696 |
+ , a.failCount |
|
| 1697 |
+ , a.kakaoResendSuccCount |
|
| 1698 |
+ , a.kakaoResendFailCount |
|
| 1699 |
+ , a.successCount * bkp.BIZ_KAKAO_AT_PRICE AS successPrice |
|
| 1700 |
+ , (a.smsCnt * bkp.BIZ_SMS_PRICE) + (a.mmsCnt * bkp.BIZ_MMS_PRICE) AS kakaoResendSuccPrice |
|
| 1701 |
+ , a.divideYn |
|
| 1702 |
+ , a.bizKakaoResendYn |
|
| 1703 |
+ , MKPI.YELLOW_ID AS yellowId |
|
| 1704 |
+ , a.MSG_NOTICETALK_TMP_KEY as msgNoticetalkTmpKey |
|
| 1705 |
+ FROM (SELECT MD.MSG_GROUP_ID, |
|
| 1706 |
+ ( SELECT COUNT(0) |
|
| 1707 |
+ FROM MJ_MSG_DATA C |
|
| 1708 |
+ WHERE C.RESERVE_C_YN = 'N' |
|
| 1709 |
+ AND C.MSG_GROUP_ID = MD.MSG_GROUP_ID |
|
| 1710 |
+ AND C.RSLT_CODE = '7000' |
|
| 1711 |
+ ) |
|
| 1712 |
+ AS successCount , |
|
| 1713 |
+ ( SELECT COUNT(0) |
|
| 1714 |
+ FROM MJ_MSG_DATA C |
|
| 1715 |
+ WHERE C.RESERVE_C_YN = 'N' |
|
| 1716 |
+ AND C.MSG_GROUP_ID = MD.MSG_GROUP_ID |
|
| 1717 |
+ AND |
|
| 1718 |
+ ( |
|
| 1719 |
+ C.RSLT_CODE IS NULL |
|
| 1720 |
+ AND C.SENT_DATE IS NULL |
|
| 1721 |
+ AND C.RSLT_DATE IS NULL |
|
| 1722 |
+ ) |
|
| 1723 |
+ ) |
|
| 1724 |
+ AS waitCount , |
|
| 1725 |
+ ( SELECT COUNT(0) |
|
| 1726 |
+ FROM MJ_MSG_DATA C |
|
| 1727 |
+ WHERE C.RESERVE_C_YN = 'N' |
|
| 1728 |
+ AND C.MSG_GROUP_ID = MD.MSG_GROUP_ID |
|
| 1729 |
+ AND |
|
| 1730 |
+ ( |
|
| 1731 |
+ C.RSLT_CODE != '7000' |
|
| 1732 |
+ AND C.RSLT_CODE IS NOT NULL |
|
| 1733 |
+ ) |
|
| 1734 |
+ ) |
|
| 1735 |
+ AS failCount , |
|
| 1736 |
+ ( SELECT COUNT(0) |
|
| 1737 |
+ FROM BIZ_LOG BL1, |
|
| 1738 |
+ MJ_MSG_DATA MMD1 |
|
| 1739 |
+ WHERE MD.BIZ_KAKAO_RESEND_YN = 'Y' |
|
| 1740 |
+ AND MD.MSG_GROUP_ID = MMD1.MSG_GROUP_ID |
|
| 1741 |
+ AND MMD1.BIZ_UMID = BL1.CMID |
|
| 1742 |
+ AND ( |
|
| 1743 |
+ CASE |
|
| 1744 |
+ WHEN BL1.CALL_STATUS IN ('6600',
|
|
| 1745 |
+ '4100') |
|
| 1746 |
+ THEN 'S' |
|
| 1747 |
+ ELSE 'F' |
|
| 1748 |
+ END ) = 'S' |
|
| 1749 |
+ ) |
|
| 1750 |
+ kakaoResendSuccCount, |
|
| 1751 |
+ ( SELECT COUNT(0) |
|
| 1752 |
+ FROM BIZ_LOG BL1, |
|
| 1753 |
+ MJ_MSG_DATA MMD1 |
|
| 1754 |
+ WHERE MD.BIZ_KAKAO_RESEND_YN = 'Y' |
|
| 1755 |
+ AND MD.MSG_GROUP_ID = MMD1.MSG_GROUP_ID |
|
| 1756 |
+ AND MMD1.BIZ_UMID = BL1.CMID |
|
| 1757 |
+ AND ( |
|
| 1758 |
+ CASE |
|
| 1759 |
+ WHEN BL1.CALL_STATUS IN ('6600',
|
|
| 1760 |
+ '4100') |
|
| 1761 |
+ THEN 'S' |
|
| 1762 |
+ ELSE 'F' |
|
| 1763 |
+ END ) = 'F' |
|
| 1764 |
+ ) |
|
| 1765 |
+ kakaoResendFailCount, |
|
| 1766 |
+ ( SELECT COUNT(0) |
|
| 1767 |
+ FROM BIZ_LOG BL1, |
|
| 1768 |
+ MJ_MSG_DATA MMD1 |
|
| 1769 |
+ WHERE MD.BIZ_KAKAO_RESEND_YN = 'Y' |
|
| 1770 |
+ AND MD.MSG_GROUP_ID = MMD1.MSG_GROUP_ID |
|
| 1771 |
+ AND MMD1.BIZ_UMID = BL1.CMID |
|
| 1772 |
+ AND ( |
|
| 1773 |
+ CASE |
|
| 1774 |
+ WHEN BL1.CALL_STATUS IN ('6600',
|
|
| 1775 |
+ '4100') |
|
| 1776 |
+ THEN 'S' |
|
| 1777 |
+ ELSE 'F' |
|
| 1778 |
+ END ) = 'S' |
|
| 1779 |
+ AND MMD1.BIZ_KAKAO_RESEND_TYPE = 'SMS' |
|
| 1780 |
+ ) |
|
| 1781 |
+ smsCnt, |
|
| 1782 |
+ ( SELECT COUNT(0) |
|
| 1783 |
+ FROM BIZ_LOG BL1, |
|
| 1784 |
+ MJ_MSG_DATA MMD1 |
|
| 1785 |
+ WHERE MD.BIZ_KAKAO_RESEND_YN = 'Y' |
|
| 1786 |
+ AND MD.MSG_GROUP_ID = MMD1.MSG_GROUP_ID |
|
| 1787 |
+ AND MMD1.BIZ_UMID = BL1.CMID |
|
| 1788 |
+ AND ( |
|
| 1789 |
+ CASE |
|
| 1790 |
+ WHEN BL1.CALL_STATUS IN ('6600',
|
|
| 1791 |
+ '4100') |
|
| 1792 |
+ THEN 'S' |
|
| 1793 |
+ ELSE 'F' |
|
| 1794 |
+ END ) = 'S' |
|
| 1795 |
+ AND MMD1.BIZ_KAKAO_RESEND_TYPE = 'MMS' |
|
| 1796 |
+ ) |
|
| 1797 |
+ mmsCnt, |
|
| 1798 |
+ CASE |
|
| 1799 |
+ WHEN COUNT(DISTINCT MD.REQ_DATE) > 1 THEN 'Y' |
|
| 1800 |
+ ELSE 'N' |
|
| 1801 |
+ END AS divideYN, |
|
| 1802 |
+ MGD.MSG_GROUP_ID as msgGroupId |
|
| 1803 |
+ , MGD.MSG_GROUP_CNT as msgGroupCnt |
|
| 1804 |
+ , MGD.RESERVE_YN as reserveYn |
|
| 1805 |
+ , MGD.RESERVE_C_YN as reserveCYn |
|
| 1806 |
+ , DATE_FORMAT(MGD.CANCELDATE, '%Y-%m-%d %T') as canceldate |
|
| 1807 |
+ , MGD.CALL_FROM as callFrom |
|
| 1808 |
+ , MGD.USER_ID as userId |
|
| 1809 |
+ , MGD.SMS_TXT as smsTxt |
|
| 1810 |
+ , MGD.SUBJECT as subject |
|
| 1811 |
+ , DATE_FORMAT(MGD.REQ_DATE, '%Y-%m-%d %T') as reqDate |
|
| 1812 |
+ , DATE_FORMAT(MGD.REGDATE, '%Y-%m-%d %T') as regDate |
|
| 1813 |
+ , MGD.MSG_TYPE as msgType |
|
| 1814 |
+ , MGD.MSG_KIND as msgKind |
|
| 1815 |
+ , MGD.EACH_PRICE as eachPrice |
|
| 1816 |
+ , DATE_FORMAT(MD.SENT_DATE, '%Y-%m-%d %T') as sentDate |
|
| 1817 |
+ , MD.FILE_CNT as fileCnt |
|
| 1818 |
+ , MD.FILE_PATH1 as filePath1 |
|
| 1819 |
+ , MD.FILE_PATH2 as filePath2 |
|
| 1820 |
+ , MD.FILE_PATH3 as filePath3 |
|
| 1821 |
+ , TIMESTAMPDIFF(minute, DATE_FORMAT(MGD.REQ_DATE, '%Y-%m-%d %T'), DATE_FORMAT(NOW(), '%Y-%m-%d %T')) as diffMin |
|
| 1822 |
+ , SUBJECT_CHK_YN as subjectChkYn |
|
| 1823 |
+ , MD.BIZ_KAKAO_RESEND_YN as bizKakaoResendYn |
|
| 1824 |
+ , MD.MSG_NOTICETALK_SENDER_KEY |
|
| 1825 |
+ , MD.MSG_NOTICETALK_TMP_KEY |
|
| 1826 |
+ FROM MJ_MSG_DATA MD |
|
| 1827 |
+ inner join MJ_MSG_GROUP_DATA MGD on |
|
| 1828 |
+ MGD.MSG_GROUP_ID = MD.MSG_GROUP_ID |
|
| 1829 |
+ and MGD.USER_ID = MD.USER_ID |
|
| 1830 |
+ AND MGD.MSG_GROUP_ID = #msgGroupId# |
|
| 1831 |
+ GROUP BY MGD.MSG_GROUP_ID |
|
| 1832 |
+ ) |
|
| 1833 |
+ a |
|
| 1834 |
+ LEFT OUTER JOIN BIZ_KAKAO_PRICE bkp |
|
| 1835 |
+ ON bkp.MSG_GROUP_ID = a.MSG_GROUP_ID |
|
| 1836 |
+ LEFT OUTER JOIN |
|
| 1837 |
+ (SELECT a.SENDER_KEY, |
|
| 1838 |
+ a.YELLOW_ID |
|
| 1839 |
+ FROM mj_kakao_profile_info a |
|
| 1840 |
+ GROUP BY a.SENDER_KEY |
|
| 1841 |
+ ) |
|
| 1842 |
+ MKPI |
|
| 1843 |
+ ON MKPI.SENDER_KEY = a.MSG_NOTICETALK_SENDER_KEY |
|
| 1844 |
+ |
|
| 1845 |
+ </select> |
|
| 1846 |
+ |
|
| 1847 |
+ <!-- REQ_DATE 조회--> |
|
| 1848 |
+ <select id="KakaoSentDAO.findByReqDateWhereMsgGroupId" parameterClass="String" resultClass="String"> |
|
| 1849 |
+ /* MjonMsgSentDAO.findByReqDateWhereMsgGroupId*/ |
|
| 1850 |
+ |
|
| 1851 |
+ SELECT REQ_DATE FROM MJ_MSG_DATA WHERE MSG_GROUP_ID =#msgGroupId# |
|
| 1852 |
+ |
|
| 1853 |
+ </select> |
|
| 1854 |
+ |
|
| 1855 |
+ <!-- 발신 내용 상세보기 조회 (상세보기 버튼 클릭시)--> |
|
| 1856 |
+ <select id="KakaoSentDAO.selectKakaoSentDetailViewPhoneAjax" parameterClass="mjonKakaoATVO" resultClass="mjonKakaoATVO"> |
|
| 1857 |
+ |
|
| 1858 |
+ SELECT |
|
| 1859 |
+ MGD.MSG_GROUP_ID as msgGroupId |
|
| 1860 |
+ , MGD.USER_ID as userId |
|
| 1861 |
+ , MD.MSG_TYPE as msgType |
|
| 1862 |
+ , MD.REQ_DATE as reqDate /* 발송 시간 */ |
|
| 1863 |
+ , MD.MSG_NOTICETALK_SENDER_KEY as msgNoticetalkSenderKey /* api key */ |
|
| 1864 |
+ , MD.MSG_NOTICETALK_TMP_KEY as msgNoticetalkTmpKey /* 특정 템플릿 key */ |
|
| 1865 |
+ , MGD.SMS_TXT as smsTxt /* 알림톡 본문 내용 치환(X) */ |
|
| 1866 |
+ , MD.SMS_TXT as smsTxtTrans /* 알림톡 본문 내용 치환(O)*/ |
|
| 1867 |
+ , MD.BIZ_KAKAO_TITLE as bizKakaoTitle /* 강조형 타이틀 */ |
|
| 1868 |
+ , MD.BIZ_KAKAO_RESEND_YN as bizKakaoResendYn /* 대체 문자 사용 여부*/ |
|
| 1869 |
+ , MD.BIZ_KAKAO_RESEND_TYPE as bizKakaoResendType /* MMS / LMS / SMS */ |
|
| 1870 |
+ , MD.BIZ_KAKAO_RESEND_DATA as bizKakaoResendData /* 대체 문자 (치환O) */ |
|
| 1871 |
+ , MGD.BIZ_KAKAO_RESEND_ORGNL_TXT as bizKakaoResendOrgnlTxt /* 대체 문자( 치환X ) */ |
|
| 1872 |
+ , MD.BIZ_KAKAO_JSON_FILE as bizKakaoJsonFile /* Json 파일 경로 */ |
|
| 1873 |
+ , MKPI.YELLOW_ID as yellowId |
|
| 1874 |
+ , COUNT_TYPE.cnt AS bizKakaoResendTypeCnt |
|
| 1875 |
+ , ifnull(MGD.BIZ_KAKAO_RESEND_TYPE, MD.BIZ_KAKAO_RESEND_TYPE) AS bizKakaoResendType |
|
| 1876 |
+ , MD.BIZ_KAKAO_RESEND_YN AS bizKakaoResendYn |
|
| 1877 |
+ FROM MJ_MSG_GROUP_DATA MGD |
|
| 1878 |
+ INNER JOIN MJ_MSG_DATA MD |
|
| 1879 |
+ ON MGD.MSG_GROUP_ID = MD.MSG_GROUP_ID |
|
| 1880 |
+ AND MGD.USER_ID = MD.USER_ID |
|
| 1881 |
+ LEFT OUTER JOIN (SELECT a.SENDER_KEY, |
|
| 1882 |
+ a.YELLOW_ID |
|
| 1883 |
+ FROM mj_kakao_profile_info a |
|
| 1884 |
+ GROUP BY a.SENDER_KEY |
|
| 1885 |
+ ) |
|
| 1886 |
+ MKPI |
|
| 1887 |
+ ON MKPI.SENDER_KEY = MD.MSG_NOTICETALK_SENDER_KEY |
|
| 1888 |
+ LEFT OUTER JOIN |
|
| 1889 |
+ ( SELECT MSG_GROUP_ID, |
|
| 1890 |
+ COUNT(*) AS cnt |
|
| 1891 |
+ FROM ( SELECT MSG_GROUP_ID, |
|
| 1892 |
+ BIZ_KAKAO_RESEND_TYPE |
|
| 1893 |
+ FROM MJ_MSG_DATA |
|
| 1894 |
+ WHERE MSG_GROUP_ID = 'MSGGID_0000000332753' |
|
| 1895 |
+ GROUP BY MSG_GROUP_ID, |
|
| 1896 |
+ BIZ_KAKAO_RESEND_TYPE |
|
| 1897 |
+ ) |
|
| 1898 |
+ t |
|
| 1899 |
+ GROUP BY MSG_GROUP_ID |
|
| 1900 |
+ ) |
|
| 1901 |
+ COUNT_TYPE |
|
| 1902 |
+ ON COUNT_TYPE.MSG_GROUP_ID = MGD.MSG_GROUP_ID |
|
| 1903 |
+ WHERE |
|
| 1904 |
+ MGD.USER_ID = #userId# |
|
| 1905 |
+ AND |
|
| 1906 |
+ MGD.MSG_GROUP_ID = #msgGroupId# |
|
| 1907 |
+ GROUP BY MGD.MSG_GROUP_ID |
|
| 1908 |
+ </select> |
|
| 1909 |
+ |
|
| 1353 | 1910 |
</sqlMap>(No newline at end of file) |
--- src/main/resources/egovframework/sqlmap/let/mjo/kakao/Kakao_AT_SQL_Mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/mjo/kakao/Kakao_AT_SQL_Mysql.xml
... | ... | @@ -4,9 +4,10 @@ |
| 4 | 4 |
========= ======= ================================================= |
| 5 | 5 |
2023.02.02 우영두 |
| 6 | 6 |
--> |
| 7 |
-<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-config-2.dtd"> |
|
| 7 |
+<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> |
|
| 8 | 8 |
<sqlMap namespace="kakaoAlimTalk"> |
| 9 | 9 |
<typeAlias alias="kakaoVO" type="itn.let.kakao.kakaoComm.KakaoVO"/> |
| 10 |
+ <typeAlias alias="kakaoSendAdvcVO" type="itn.let.kakao.kakaoComm.KakaoSendAdvcVO"/> |
|
| 10 | 11 |
|
| 11 | 12 |
<insert id="kakaoAlimTalkDAO.insertKakaoAtDataInfo" parameterClass="java.util.List"> |
| 12 | 13 |
INSERT INTO MJ_MSG_DATA |
... | ... | @@ -54,6 +55,119 @@ |
| 54 | 55 |
</iterate> |
| 55 | 56 |
</insert> |
| 56 | 57 |
|
| 58 |
+ <insert id="kakaoAlimTalkDAO.insertKakaoAtDataInfo_advc" parameterClass="java.util.List"> |
|
| 59 |
+ INSERT INTO MJ_MSG_DATA |
|
| 60 |
+ ( |
|
| 61 |
+ MSG_ID |
|
| 62 |
+ , MSG_GROUP_ID |
|
| 63 |
+ , USER_ID |
|
| 64 |
+ , AGENT_CODE |
|
| 65 |
+ , CUR_STATE |
|
| 66 |
+ |
|
| 67 |
+ , MSG_NOTICETALK_SENDER_KEY |
|
| 68 |
+ , MSG_NOTICETALK_TMP_KEY |
|
| 69 |
+ , CALL_TO |
|
| 70 |
+ , CALL_FROM |
|
| 71 |
+ , MSG_TYPE |
|
| 72 |
+ |
|
| 73 |
+ , SMS_TXT |
|
| 74 |
+ , BIZ_KAKAO_TITLE |
|
| 75 |
+ |
|
| 76 |
+ , BIZ_KAKAO_RESEND_YN |
|
| 77 |
+ , BIZ_KAKAO_RESEND_DATA |
|
| 78 |
+ , BIZ_KAKAO_RESEND_TYPE |
|
| 79 |
+ , BIZ_KAKAO_JSON_FILE |
|
| 80 |
+ , REQ_DATE |
|
| 81 |
+ )VALUES |
|
| 82 |
+ <iterate conjunction=","> |
|
| 83 |
+ ( |
|
| 84 |
+ #[].msgId# |
|
| 85 |
+ , #[].msgGroupId# |
|
| 86 |
+ , #[].userId# |
|
| 87 |
+ , #[].agentCode# |
|
| 88 |
+ , 0 |
|
| 89 |
+ |
|
| 90 |
+ , #[].senderKey# |
|
| 91 |
+ , #[].templateCode# |
|
| 92 |
+ , #[].callTo# |
|
| 93 |
+ , #[].callFrom# |
|
| 94 |
+ , #[].msgType# |
|
| 95 |
+ |
|
| 96 |
+ , #[].templateContent# |
|
| 97 |
+ , #[].templateTitle# |
|
| 98 |
+ |
|
| 99 |
+ , #[].subMsgSendYn# |
|
| 100 |
+ , #[].subMsgTxt# |
|
| 101 |
+ , #[].subMsgType# |
|
| 102 |
+ , #[].bizJsonName# |
|
| 103 |
+ , #[].reqDate# |
|
| 104 |
+ ) |
|
| 105 |
+ </iterate> |
|
| 106 |
+ </insert> |
|
| 107 |
+ <insert id="kakaoAlimTalkDAO.insertKakaoAtDataJsonInfo_advc" parameterClass="java.util.List"> |
|
| 108 |
+ INSERT INTO BIZ_ATTACHMENTS |
|
| 109 |
+ ( |
|
| 110 |
+ MSG_KEY |
|
| 111 |
+ , TYPE |
|
| 112 |
+ , CONTENTS |
|
| 113 |
+ )VALUES |
|
| 114 |
+ <iterate conjunction=","> |
|
| 115 |
+ ( |
|
| 116 |
+ #[].msgId# |
|
| 117 |
+ , 'JSON' |
|
| 118 |
+ , #[].jsonStr# |
|
| 119 |
+ ) |
|
| 120 |
+ </iterate> |
|
| 121 |
+ </insert> |
|
| 122 |
+ |
|
| 123 |
+ <insert id="kakaoAlimTalkDAO.insertKakaoGroupDataTb_advc" parameterClass="kakaoSendAdvcVO"> |
|
| 124 |
+ INSERT INTO MJ_MSG_GROUP_DATA |
|
| 125 |
+ ( |
|
| 126 |
+ MSG_GROUP_ID, |
|
| 127 |
+ USER_ID, |
|
| 128 |
+ CALL_FROM, |
|
| 129 |
+ SMS_TXT, |
|
| 130 |
+ |
|
| 131 |
+ REQ_DATE, |
|
| 132 |
+ MSG_GROUP_CNT, |
|
| 133 |
+ MSG_TYPE, |
|
| 134 |
+ |
|
| 135 |
+ AGENT_CODE, |
|
| 136 |
+ EACH_PRICE, |
|
| 137 |
+ RESERVE_YN, |
|
| 138 |
+ BEF_CASH, |
|
| 139 |
+ BEF_POINT, |
|
| 140 |
+ |
|
| 141 |
+ TOT_PRICE, |
|
| 142 |
+ |
|
| 143 |
+ AT_DELAY_YN, |
|
| 144 |
+ BIZ_KAKAO_RESEND_ORGNL_TXT, |
|
| 145 |
+ BIZ_KAKAO_RESEND_TYPE |
|
| 146 |
+ )VALUES |
|
| 147 |
+ ( |
|
| 148 |
+ #msgGroupId#, |
|
| 149 |
+ #userId#, |
|
| 150 |
+ #callFrom#, |
|
| 151 |
+ #templateContent#, |
|
| 152 |
+ |
|
| 153 |
+ #reqDate#, |
|
| 154 |
+ #msgGroupCnt#, |
|
| 155 |
+ #msgType#, |
|
| 156 |
+ |
|
| 157 |
+ #agentCode#, |
|
| 158 |
+ #eachPrice#, |
|
| 159 |
+ #reserveYn#, |
|
| 160 |
+ #befCash#, |
|
| 161 |
+ #befPoint#, |
|
| 162 |
+ |
|
| 163 |
+ #totPrice#, |
|
| 164 |
+ |
|
| 165 |
+ #atDelayYn#, |
|
| 166 |
+ #bizKakaoResendOrgnlTxt#, |
|
| 167 |
+ #bizKakaoResendType# |
|
| 168 |
+ ) |
|
| 169 |
+ </insert> |
|
| 170 |
+ |
|
| 57 | 171 |
<insert id="kakaoAlimTalkDAO.insertKakaoSendPrice" parameterClass="kakaoVO"> |
| 58 | 172 |
INSERT INTO BIZ_KAKAO_PRICE |
| 59 | 173 |
( |
--- src/main/resources/egovframework/sqlmap/let/msg/MjonMsgData_SQL_mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/msg/MjonMsgData_SQL_mysql.xml
... | ... | @@ -2319,7 +2319,8 @@ |
| 2319 | 2319 |
EVENT_YN, |
| 2320 | 2320 |
DELAY_YN, |
| 2321 | 2321 |
AT_DELAY_YN, |
| 2322 |
- BIZ_KAKAO_RESEND_ORGNL_TXT |
|
| 2322 |
+ BIZ_KAKAO_RESEND_ORGNL_TXT, |
|
| 2323 |
+ SUBJECT_CHK_YN |
|
| 2323 | 2324 |
) |
| 2324 | 2325 |
VALUES |
| 2325 | 2326 |
|
... | ... | @@ -2345,7 +2346,8 @@ |
| 2345 | 2346 |
#eventYn#, |
| 2346 | 2347 |
#delayYn#, |
| 2347 | 2348 |
#atDelayYn#, |
| 2348 |
- #kakaoSubMagOrgnlTxt# |
|
| 2349 |
+ #kakaoSubMagOrgnlTxt#, |
|
| 2350 |
+ #subjectChkYn# |
|
| 2349 | 2351 |
) |
| 2350 | 2352 |
</insert> |
| 2351 | 2353 |
|
... | ... | @@ -3307,10 +3309,16 @@ |
| 3307 | 3309 |
, ( |
| 3308 | 3310 |
<include refid="MjonMsgSentDAO.selectAgentWithKakaoResultQuery_A"/> |
| 3309 | 3311 |
) AS RESULT |
| 3310 |
- <include refid="MjonMsgSentDAO.selectJoinQuery"/> |
|
| 3312 |
+ from |
|
| 3313 |
+ MJ_MSG_DATA A , |
|
| 3314 |
+ MJ_MSG_GROUP_DATA B |
|
| 3315 |
+ where |
|
| 3316 |
+ A.MSG_GROUP_ID = B.MSG_GROUP_ID |
|
| 3317 |
+ /*and IFNULL(B.DEL_FLAG, 'N') = 'N'*/ |
|
| 3318 |
+ /*and A.DEL_FLAG = 'N'*/ |
|
| 3311 | 3319 |
AND A.USER_ID = #userId# |
| 3312 | 3320 |
AND B.USER_ID = #userId# |
| 3313 |
- AND B.RESERVE_C_YN = 'N' |
|
| 3321 |
+ /*AND B.RESERVE_C_YN = 'N'*/ |
|
| 3314 | 3322 |
ORDER BY 1=1 |
| 3315 | 3323 |
, msgGroupId DESC |
| 3316 | 3324 |
, sentDate DESC |
... | ... | @@ -4020,6 +4028,8 @@ |
| 4020 | 4028 |
</select> |
| 4021 | 4029 |
|
| 4022 | 4030 |
<select id="MjonMsgDataDAO.selectReSendMsgDataList" parameterClass="mjonMsgDataVO" resultClass="mjonMsgVO"> |
| 4031 |
+ |
|
| 4032 |
+ /* MjonMsgDataDAO.selectReSendMsgDataList */ |
|
| 4023 | 4033 |
|
| 4024 | 4034 |
SELECT MSG_ID AS msgId, |
| 4025 | 4035 |
USER_ID AS userId, |
... | ... | @@ -7895,6 +7905,7 @@ |
| 7895 | 7905 |
SELECT |
| 7896 | 7906 |
CALL_FROM AS callFrom |
| 7897 | 7907 |
, SUBJECT AS subject |
| 7908 |
+ , SUBJECT_CHK_YN AS subjectChkYn |
|
| 7898 | 7909 |
, SMS_TXT AS smsTxt |
| 7899 | 7910 |
,( |
| 7900 | 7911 |
SELECT |
... | ... | @@ -7936,6 +7947,7 @@ |
| 7936 | 7947 |
</select> |
| 7937 | 7948 |
|
| 7938 | 7949 |
<select id="MjonMsgDataDAO.selectMjMsgListByResend" parameterClass="mjonMsgDataVO" resultClass="mjonMsgDataVO"> |
| 7950 |
+ /* MjonMsgDataDAO.selectMjMsgListByResend */ |
|
| 7939 | 7951 |
SELECT |
| 7940 | 7952 |
CALL_TO AS callTo |
| 7941 | 7953 |
FROM MJ_MSG_DATA |
--- src/main/resources/egovframework/sqlmap/let/msg/MjonMsgSent_SQL_mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/msg/MjonMsgSent_SQL_mysql.xml
... | ... | @@ -3,8 +3,10 @@ |
| 3 | 3 |
========= ======= ================================================= |
| 4 | 4 |
2021.06.21 우영두 |
| 5 | 5 |
--> |
| 6 |
-<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-config-2.dtd"> |
|
| 6 |
+<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> |
|
| 7 | 7 |
<sqlMap namespace="Msg"> |
| 8 |
+ <typeAlias alias="mjonMsgSWFDTO" type="itn.let.mjo.msgsent.service.MjonMsgSWFDTO"/> |
|
| 9 |
+ <typeAlias alias="mjonMsgDetailSentVO" type="itn.let.mjo.msgsent.service.MjonMsgDetailSentVO"/> |
|
| 8 | 10 |
<typeAlias alias="mjonMsgSentVO" type="itn.let.mjo.msgsent.service.MjonMsgSentVO"/> |
| 9 | 11 |
<typeAlias alias="mjonMsgVO" type="itn.let.mjo.msg.service.MjonMsgVO"/> |
| 10 | 12 |
<typeAlias alias="addrGroupVO" type="itn.let.mjo.addr.service.AddrGroupVO"/> |
... | ... | @@ -46,8 +48,8 @@ |
| 46 | 48 |
,'01','00') AS tab2 |
| 47 | 49 |
, if (A.MSG_TYPE= '6' AND B.MSG_TYPE= '6' AND B.FILE_CNT > '0' |
| 48 | 50 |
,'01','00') AS tab3 |
| 49 |
- |
|
| 50 | 51 |
<include refid="MjonMsgSentDAO.selectJoinQuery"/> |
| 52 |
+ |
|
| 51 | 53 |
AND A.USER_ID = #userId# |
| 52 | 54 |
AND B.USER_ID = #userId# |
| 53 | 55 |
<isNotEmpty property="ntceBgnde"> |
... | ... | @@ -60,10 +62,6 @@ |
| 60 | 62 |
<isEmpty property="msgType"> |
| 61 | 63 |
AND A.MSG_TYPE IN ('4','6')
|
| 62 | 64 |
</isEmpty> |
| 63 |
- AND B.RESERVE_C_YN = 'N' |
|
| 64 |
- <![CDATA[ |
|
| 65 |
- AND B.REQ_DATE <= DATE_ADD(NOW(), INTERVAL 60 MINUTE) |
|
| 66 |
- ]]> |
|
| 67 | 65 |
<isNotEmpty property="fileCnt"> |
| 68 | 66 |
<isEqual property="fileCnt" compareValue="0"> |
| 69 | 67 |
AND B.FILE_CNT = '0' |
... | ... | @@ -71,6 +69,16 @@ |
| 71 | 69 |
<isNotEqual property="fileCnt" compareValue="0"> |
| 72 | 70 |
<![CDATA[ AND B.FILE_CNT > '0' ]]> |
| 73 | 71 |
</isNotEqual> |
| 72 |
+ </isNotEmpty> |
|
| 73 |
+ <isNotEmpty property="searchStartDate"> |
|
| 74 |
+ <![CDATA[ |
|
| 75 |
+ AND DATE_FORMAT(B.REGDATE, '%Y-%m-%d') >= DATE_FORMAT(#searchStartDate#, '%Y-%m-%d') |
|
| 76 |
+ ]]> |
|
| 77 |
+ </isNotEmpty> |
|
| 78 |
+ <isNotEmpty property="searchEndDate"> |
|
| 79 |
+ <![CDATA[ |
|
| 80 |
+ AND DATE_FORMAT(B.REGDATE, '%Y-%m-%d') <= DATE_FORMAT(#searchEndDate#, '%Y-%m-%d') |
|
| 81 |
+ ]]> |
|
| 74 | 82 |
</isNotEmpty> |
| 75 | 83 |
) A0 |
| 76 | 84 |
GROUP BY |
... | ... | @@ -222,6 +230,293 @@ |
| 222 | 230 |
|
| 223 | 231 |
</select> |
| 224 | 232 |
|
| 233 |
+ <!-- 전체 발송결과 조회 (전송사별) 카운트--> |
|
| 234 |
+ <select id="MjonMsgSentDAO.countAllMsgSentList" parameterClass="mjonMsgSentVO" resultClass="int"> |
|
| 235 |
+ |
|
| 236 |
+ select |
|
| 237 |
+ COUNT(DISTINCT B.MSG_GROUP_ID) as totalGroupCount |
|
| 238 |
+ from |
|
| 239 |
+ MJ_MSG_DATA A |
|
| 240 |
+ join MJ_MSG_GROUP_DATA B on |
|
| 241 |
+ A.MSG_GROUP_ID = B.MSG_GROUP_ID |
|
| 242 |
+ WHERE (B.DEL_FLAG = 'N' OR B.DEL_FLAG IS NULL) |
|
| 243 |
+ AND A.DEL_FLAG = 'N' |
|
| 244 |
+ AND B.USER_ID = #userId# |
|
| 245 |
+ <isNotEmpty property="searchKeyword"> |
|
| 246 |
+ <isEqual property="searchCondition" compareValue="1" > |
|
| 247 |
+ AND B.SUBJECT LIKE CONCAT('%', #searchKeyword#, '%')
|
|
| 248 |
+ </isEqual> |
|
| 249 |
+ <isEqual property="searchCondition" compareValue="2" > |
|
| 250 |
+ AND B.CALL_FROM LIKE CONCAT('%', #searchKeyword#, '%')
|
|
| 251 |
+ </isEqual> |
|
| 252 |
+ <isEqual property="searchCondition" compareValue="3" > |
|
| 253 |
+ AND B.SMS_TXT LIKE CONCAT('%', #searchKeyword#, '%')
|
|
| 254 |
+ </isEqual> |
|
| 255 |
+ </isNotEmpty> |
|
| 256 |
+ <isNotEmpty property="searchCondition01"> |
|
| 257 |
+ AND B.RESERVE_YN = #searchCondition01# |
|
| 258 |
+ </isNotEmpty> |
|
| 259 |
+ <isNotEmpty property="searchCondition02"> |
|
| 260 |
+ <isEqual property="searchCondition02" compareValue="S"> |
|
| 261 |
+ AND B.MSG_TYPE = '4' |
|
| 262 |
+ </isEqual> |
|
| 263 |
+ <isEqual property="searchCondition02" compareValue="L"> |
|
| 264 |
+ AND B.MSG_TYPE = '6' |
|
| 265 |
+ AND B.FILE_CNT = '0' |
|
| 266 |
+ </isEqual> |
|
| 267 |
+ <isEqual property="searchCondition02" compareValue="M"> |
|
| 268 |
+ <![CDATA[ |
|
| 269 |
+ AND B.MSG_TYPE = '6' |
|
| 270 |
+ AND B.FILE_CNT > '0' |
|
| 271 |
+ ]]> |
|
| 272 |
+ </isEqual> |
|
| 273 |
+ </isNotEmpty> |
|
| 274 |
+ <isNotEmpty property="searchStartDate"> |
|
| 275 |
+ <![CDATA[ |
|
| 276 |
+ AND DATE_FORMAT(REGDATE, '%Y-%m-%d') >= DATE_FORMAT(#searchStartDate#, '%Y-%m-%d') |
|
| 277 |
+ ]]> |
|
| 278 |
+ </isNotEmpty> |
|
| 279 |
+ <isNotEmpty property="searchEndDate"> |
|
| 280 |
+ <![CDATA[ |
|
| 281 |
+ AND DATE_FORMAT(REGDATE, '%Y-%m-%d') <= DATE_FORMAT(#searchEndDate#, '%Y-%m-%d') |
|
| 282 |
+ ]]> |
|
| 283 |
+ </isNotEmpty> |
|
| 284 |
+ </select> |
|
| 285 |
+ |
|
| 286 |
+ |
|
| 287 |
+ <!-- 전체 발송결과 조회 (전송사별) 카운트--> |
|
| 288 |
+ <select id="MjonMsgSentDAO.findBySWF" parameterClass="String" resultClass="mjonMsgSWFDTO"> |
|
| 289 |
+ /* MjonMsgSentDAO.findBySWF */ |
|
| 290 |
+ select |
|
| 291 |
+ SUM(IF(aa.result = 'S', 1, 0)) AS resultSValue, |
|
| 292 |
+ SUM(IF(aa.result = 'W', 1, 0)) AS resultWValue, |
|
| 293 |
+ SUM(IF(aa.result = 'F', 1, 0)) AS resultFValue, |
|
| 294 |
+ CASE |
|
| 295 |
+ WHEN COUNT(DISTINCT REQ_DATE) > 1 THEN 'Y' |
|
| 296 |
+ ELSE 'N' |
|
| 297 |
+ END AS divideYN |
|
| 298 |
+ from |
|
| 299 |
+ ( |
|
| 300 |
+ select |
|
| 301 |
+ case |
|
| 302 |
+ when A.AGENT_CODE = '01' |
|
| 303 |
+ and ( A.RSLT_CODE = '100' |
|
| 304 |
+ and (A.RSLT_CODE2 = '0')) then 'S' |
|
| 305 |
+ when A.AGENT_CODE = '02' |
|
| 306 |
+ and (A.RSLT_CODE = '0') then 'S' |
|
| 307 |
+ when A.AGENT_CODE = '03' |
|
| 308 |
+ and (A.RSLT_CODE = '100' |
|
| 309 |
+ or A.RSLT_CODE = '101' |
|
| 310 |
+ or A.RSLT_CODE = '110' |
|
| 311 |
+ or A.RSLT_CODE = '800') then 'S' |
|
| 312 |
+ when |
|
| 313 |
+ A.AGENT_CODE = '04' |
|
| 314 |
+ and (A.RSLT_CODE = '4100' |
|
| 315 |
+ or A.RSLT_CODE = '6600' |
|
| 316 |
+ or A.RSLT_CODE = '7000') then 'S' |
|
| 317 |
+ when |
|
| 318 |
+ A.AGENT_CODE = '05' |
|
| 319 |
+ and (A.RSLT_CODE = '1000' |
|
| 320 |
+ or A.RSLT_CODE = '1001') then 'S' |
|
| 321 |
+ when |
|
| 322 |
+ A.AGENT_CODE = '07' |
|
| 323 |
+ and (A.RSLT_CODE = '6' |
|
| 324 |
+ or A.RSLT_CODE = '1000') then 'S' |
|
| 325 |
+ when |
|
| 326 |
+ A.AGENT_CODE = '08' |
|
| 327 |
+ and (A.RSLT_CODE = '1000' |
|
| 328 |
+ or A.RSLT_CODE = '1001') then 'S' |
|
| 329 |
+ when |
|
| 330 |
+ A.AGENT_CODE = '09' |
|
| 331 |
+ and (A.RSLT_CODE = '1000' |
|
| 332 |
+ or A.RSLT_CODE = '1001') then 'S' |
|
| 333 |
+ when ( |
|
| 334 |
+ A.RSLT_CODE is null |
|
| 335 |
+ and A.RSLT_CODE2 is null |
|
| 336 |
+ and A.SENT_DATE is null |
|
| 337 |
+ and A.RSLT_DATE is null ) then 'W' |
|
| 338 |
+ else 'F' |
|
| 339 |
+ end as result /* common query */ |
|
| 340 |
+ , A.REQ_DATE |
|
| 341 |
+ from |
|
| 342 |
+ MJ_MSG_DATA A |
|
| 343 |
+ where |
|
| 344 |
+ A.MSG_GROUP_ID = #msgGroupId# |
|
| 345 |
+ ) aa |
|
| 346 |
+ </select> |
|
| 347 |
+ |
|
| 348 |
+ |
|
| 349 |
+ |
|
| 350 |
+ <!-- 발송결과 상세 데이터--> |
|
| 351 |
+ <select id="MjonMsgSentDAO.selectAllMsgSentDetailView" parameterClass="mjonMsgDetailSentVO" resultClass="mjonMsgDetailSentVO"> |
|
| 352 |
+ /* MjonMsgSentDAO.selectAllMsgSentDetailView */ |
|
| 353 |
+ select |
|
| 354 |
+ MGD.MSG_GROUP_ID as msgGroupId |
|
| 355 |
+ , MGD.MSG_GROUP_CNT as msgGroupCnt |
|
| 356 |
+ , MGD.RESERVE_YN as reserveYn |
|
| 357 |
+ , MGD.RESERVE_C_YN as reserveCYn |
|
| 358 |
+ , DATE_FORMAT(MGD.CANCELDATE, '%Y-%m-%d %H:%i') as canceldate |
|
| 359 |
+ , MGD.CALL_FROM as callFrom |
|
| 360 |
+ , MGD.USER_ID as userId |
|
| 361 |
+ , MGD.SMS_TXT as smsTxt |
|
| 362 |
+ , MGD.SUBJECT as subject |
|
| 363 |
+ , DATE_FORMAT(MGD.REQ_DATE, '%Y-%m-%d %H:%i') as reqDate |
|
| 364 |
+ , DATE_FORMAT(MGD.REGDATE, '%Y-%m-%d %H:%i') as regDate |
|
| 365 |
+ , MGD.MSG_TYPE as msgType |
|
| 366 |
+ , MGD.MSG_KIND as msgKind |
|
| 367 |
+ , MGD.EACH_PRICE as eachPrice |
|
| 368 |
+ , DATE_FORMAT(MD.SENT_DATE, '%Y-%m-%d %H:%i') as sentDate |
|
| 369 |
+ , MD.FILE_CNT as fileCnt |
|
| 370 |
+ , MD.FILE_PATH1 as filePath1 |
|
| 371 |
+ , MD.FILE_PATH2 as filePath2 |
|
| 372 |
+ , MD.FILE_PATH3 as filePath3 |
|
| 373 |
+ , TIMESTAMPDIFF(minute, DATE_FORMAT(MGD.REQ_DATE, '%Y-%m-%d %T'), DATE_FORMAT(NOW(), '%Y-%m-%d %T')) as diffMin |
|
| 374 |
+ , SUBJECT_CHK_YN as subjectChkYn |
|
| 375 |
+ from |
|
| 376 |
+ MJ_MSG_GROUP_DATA MGD |
|
| 377 |
+ inner join MJ_MSG_DATA MD on |
|
| 378 |
+ MGD.MSG_GROUP_ID = MD.MSG_GROUP_ID |
|
| 379 |
+ and MGD.USER_ID = MD.USER_ID |
|
| 380 |
+ where |
|
| 381 |
+ MGD.MSG_GROUP_ID = #msgGroupId# |
|
| 382 |
+ limit 1 |
|
| 383 |
+ |
|
| 384 |
+ </select> |
|
| 385 |
+ |
|
| 386 |
+ |
|
| 387 |
+ <!-- 전체 발송결과 조회 (전송사별)--> |
|
| 388 |
+ <select id="MjonMsgSentDAO.findByMsgDetailListAjax" parameterClass="mjonMsgDetailSentVO" resultClass="mjonMsgDetailSentVO"> |
|
| 389 |
+ /* MjonMsgSentDAO.findByMsgDetailListAjax*/ |
|
| 390 |
+ |
|
| 391 |
+ SELECT |
|
| 392 |
+ A.USER_ID as userId, |
|
| 393 |
+ A.CALL_TO as callTo, |
|
| 394 |
+ case |
|
| 395 |
+ WHEN A.AGENT_CODE = '01' AND (A.RSLT_CODE = '100' and (A.RSLT_CODE2 = '0')) then '성공' |
|
| 396 |
+ WHEN A.AGENT_CODE = '02' AND (A.RSLT_CODE = '0') then '성공' |
|
| 397 |
+ WHEN A.AGENT_CODE = '03' AND (A.RSLT_CODE in ('100', '101', '110', '800')) then '성공'
|
|
| 398 |
+ WHEN A.AGENT_CODE = '04' AND (A.RSLT_CODE in ('4100', '6600', '7000')) then '성공'
|
|
| 399 |
+ WHEN A.AGENT_CODE = '05' AND (A.RSLT_CODE in ('1000', '1001')) then '성공'
|
|
| 400 |
+ WHEN A.AGENT_CODE = '07' AND (A.RSLT_CODE in ('6', '1000')) then '성공'
|
|
| 401 |
+ WHEN A.AGENT_CODE = '08' AND (A.RSLT_CODE in ('1000', '1001')) then '성공'
|
|
| 402 |
+ WHEN A.AGENT_CODE = '09' AND (A.RSLT_CODE in ('1000', '1001')) then '성공'
|
|
| 403 |
+ WHEN (A.RSLT_CODE is null AND A.RSLT_CODE2 IS NULL AND A.SENT_DATE IS NULL AND A.RSLT_DATE IS NULL) then '대기' |
|
| 404 |
+ ELSE '실패' |
|
| 405 |
+ END as statusTxt |
|
| 406 |
+ from |
|
| 407 |
+ MJ_MSG_DATA A |
|
| 408 |
+ where |
|
| 409 |
+ A.MSG_GROUP_ID = #msgGroupId# |
|
| 410 |
+ |
|
| 411 |
+ |
|
| 412 |
+ </select> |
|
| 413 |
+ |
|
| 414 |
+ <!-- REQ_DATE 조회--> |
|
| 415 |
+ <select id="MjonMsgSentDAO.findByReqDateWhereMsgGroupId" parameterClass="String" resultClass="String"> |
|
| 416 |
+ /* MjonMsgSentDAO.findByReqDateWhereMsgGroupId*/ |
|
| 417 |
+ |
|
| 418 |
+ SELECT REQ_DATE FROM MJ_MSG_DATA WHERE MSG_GROUP_ID =#msgGroupId# |
|
| 419 |
+ |
|
| 420 |
+ </select> |
|
| 421 |
+ |
|
| 422 |
+ |
|
| 423 |
+ <!-- 전체 발송결과 조회 (전송사별)--> |
|
| 424 |
+ <select id="MjonMsgSentDAO.selectAllMsgSentList_advc" parameterClass="mjonMsgSentVO" resultClass="mjonMsgSentVO"> |
|
| 425 |
+ /* MjonMsgSentDAO.selectAllMsgSentList_advc */ |
|
| 426 |
+ SELECT |
|
| 427 |
+ B.USER_ID as userId |
|
| 428 |
+ , B.MSG_GROUP_ID as msgGroupId |
|
| 429 |
+ , B.MSG_GROUP_CNT as msgGroupCnt |
|
| 430 |
+ , B.SMS_TXT as smsTxt |
|
| 431 |
+ , B.SUBJECT as subject |
|
| 432 |
+ , B.SUBJECT_CHK_YN as subjectChkYn |
|
| 433 |
+ , CAST(DATE_FORMAT(B.REGDATE, '%Y-%m-%d %H:%i') AS CHAR) AS regDate |
|
| 434 |
+ , CAST(DATE_FORMAT(B.REQ_DATE, '%Y-%m-%d %H:%i') AS CHAR) AS reqDate |
|
| 435 |
+ , ( |
|
| 436 |
+ CASE |
|
| 437 |
+ WHEN B.DELAY_YN = 'Y' AND B.DELAY_COMPLETE_YN = 'N' THEN DATE_ADD(B.REQ_DATE, INTERVAL -30 MINUTE) |
|
| 438 |
+ ELSE B.REQ_DATE |
|
| 439 |
+ END |
|
| 440 |
+ ) AS delayOrgTime |
|
| 441 |
+ , B.CALL_FROM as callFrom |
|
| 442 |
+ , B.TOT_PRICE as totPrice |
|
| 443 |
+ , B.EACH_PRICE as eachPrice |
|
| 444 |
+ , B.MSG_TYPE as msgType |
|
| 445 |
+ , B.FILE_CNT as fileCnt |
|
| 446 |
+ , B.AGENT_CODE as agentCode |
|
| 447 |
+ , B.RESERVE_C_YN as reserveCYn |
|
| 448 |
+ , B.CANCELDATE as canceldate |
|
| 449 |
+ , B.DEL_FLAG as delFlag |
|
| 450 |
+ , B.SEND_KIND as sendKind |
|
| 451 |
+ , B.MSG_KIND as msgKind |
|
| 452 |
+ , B.DELAY_YN as delayYn |
|
| 453 |
+ , B.DELAY_COMPLETE_YN as delayCompleteYn |
|
| 454 |
+ , B.RESERVE_YN as reserveYn |
|
| 455 |
+ , B.RESERVE_C_YN as reserveCYn |
|
| 456 |
+ , TIMESTAMPDIFF(minute, CAST(DATE_FORMAT(B.REQ_DATE, '%Y-%m-%d %H:%i') AS CHAR), DATE_FORMAT(NOW(), '%Y-%m-%d %H:%i')) as diffMin |
|
| 457 |
+ FROM MJ_MSG_DATA A |
|
| 458 |
+ JOIN MJ_MSG_GROUP_DATA B ON A.MSG_GROUP_ID = B.MSG_GROUP_ID |
|
| 459 |
+ WHERE (B.DEL_FLAG = 'N' OR B.DEL_FLAG IS NULL) |
|
| 460 |
+ AND A.DEL_FLAG = 'N' |
|
| 461 |
+ AND B.USER_ID = #userId# |
|
| 462 |
+ <isNotEmpty property="searchKeyword"> |
|
| 463 |
+ <isEqual property="searchCondition" compareValue="2" > |
|
| 464 |
+ AND B.CALL_FROM LIKE CONCAT('%', #searchKeyword#, '%')
|
|
| 465 |
+ </isEqual> |
|
| 466 |
+ <isEqual property="searchCondition" compareValue="3" > |
|
| 467 |
+ AND B.SMS_TXT LIKE CONCAT('%', #searchKeyword#, '%')
|
|
| 468 |
+ </isEqual> |
|
| 469 |
+ </isNotEmpty> |
|
| 470 |
+ <isNotEmpty property="searchCondition01"> |
|
| 471 |
+ AND B.RESERVE_YN = #searchCondition01# |
|
| 472 |
+ </isNotEmpty> |
|
| 473 |
+ <isNotEmpty property="searchCondition02"> |
|
| 474 |
+ <isEqual property="searchCondition02" compareValue="S"> |
|
| 475 |
+ AND B.MSG_TYPE = '4' |
|
| 476 |
+ </isEqual> |
|
| 477 |
+ <isEqual property="searchCondition02" compareValue="L"> |
|
| 478 |
+ AND B.MSG_TYPE = '6' |
|
| 479 |
+ AND B.FILE_CNT = '0' |
|
| 480 |
+ </isEqual> |
|
| 481 |
+ <isEqual property="searchCondition02" compareValue="M"> |
|
| 482 |
+ <![CDATA[ |
|
| 483 |
+ AND B.MSG_TYPE = '6' |
|
| 484 |
+ AND B.FILE_CNT > '0' |
|
| 485 |
+ ]]> |
|
| 486 |
+ </isEqual> |
|
| 487 |
+ </isNotEmpty> |
|
| 488 |
+ <isEmpty property="searchCondition02"> |
|
| 489 |
+ AND B.MSG_TYPE in ('4', '6')
|
|
| 490 |
+ </isEmpty> |
|
| 491 |
+ <isNotEmpty property="searchStartDate"> |
|
| 492 |
+ <![CDATA[ |
|
| 493 |
+ AND DATE_FORMAT(B.REGDATE, '%Y-%m-%d') >= DATE_FORMAT(#searchStartDate#, '%Y-%m-%d') |
|
| 494 |
+ ]]> |
|
| 495 |
+ </isNotEmpty> |
|
| 496 |
+ <isNotEmpty property="searchEndDate"> |
|
| 497 |
+ <![CDATA[ |
|
| 498 |
+ AND DATE_FORMAT(B.REGDATE, '%Y-%m-%d') <= DATE_FORMAT(#searchEndDate#, '%Y-%m-%d') |
|
| 499 |
+ ]]> |
|
| 500 |
+ </isNotEmpty> |
|
| 501 |
+ GROUP BY B.MSG_GROUP_ID |
|
| 502 |
+ ORDER BY 1=1 |
|
| 503 |
+ <isNotEmpty property="searchSortCnd"> |
|
| 504 |
+ <isEqual property="searchSortCnd" compareValue="curState"> |
|
| 505 |
+ , curState $searchSortOrd$ |
|
| 506 |
+ , orderByrsltCode |
|
| 507 |
+ </isEqual> |
|
| 508 |
+ <isNotEqual property="searchSortCnd" compareValue="curState"> |
|
| 509 |
+ ,$searchSortCnd$ |
|
| 510 |
+ </isNotEqual> |
|
| 511 |
+ </isNotEmpty> |
|
| 512 |
+ <isNotEmpty property="searchSortOrd"> |
|
| 513 |
+ $searchSortOrd$ |
|
| 514 |
+ </isNotEmpty> |
|
| 515 |
+ LIMIT #recordCountPerPage# OFFSET #firstIndex# |
|
| 516 |
+ |
|
| 517 |
+ |
|
| 518 |
+ </select> |
|
| 519 |
+ |
|
| 225 | 520 |
<!-- 전체 발송결과 조회 (전송사별)--> |
| 226 | 521 |
<select id="MjonMsgSentDAO.selectAllMsgSentList" parameterClass="mjonMsgSentVO" resultClass="mjonMsgSentVO"> |
| 227 | 522 |
SELECT |
--- src/main/resources/egovframework/sqlmap/let/uss/ion/bnr/MainPopupManage_SQL_Mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/uss/ion/bnr/MainPopupManage_SQL_Mysql.xml
... | ... | @@ -12,6 +12,7 @@ |
| 12 | 12 |
<typeAlias alias="PopupManageVO" type="itn.com.uss.ion.pwm.service.PopupManageVO" /> |
| 13 | 13 |
<typeAlias alias="popupzoneVO" type="itn.com.uss.ion.pwm.service.PopupzoneVO"/> |
| 14 | 14 |
<typeAlias alias="mainPopupVO" type="itn.com.uss.ion.bnr.pop.service.MainPopupVO"/> |
| 15 |
+ <typeAlias alias="mainPopupLinkVO" type="itn.com.uss.ion.bnr.pop.service.MainPopupLinkVO"/> |
|
| 15 | 16 |
|
| 16 | 17 |
|
| 17 | 18 |
|
... | ... | @@ -19,7 +20,7 @@ |
| 19 | 20 |
<result property="popId" column="POP_ID"></result> |
| 20 | 21 |
<result property="mlink" column="MLINK"></result> |
| 21 | 22 |
<result property="coords" column="COORDS"></result> |
| 22 |
- <result property="sort" column="SORT"></result> |
|
| 23 |
+ <result property="popLinkId" column="POP_LINK_ID"></result> |
|
| 23 | 24 |
</resultMap> |
| 24 | 25 |
|
| 25 | 26 |
|
... | ... | @@ -146,17 +147,17 @@ |
| 146 | 147 |
WHERE MP.POP_ID = #popId# |
| 147 | 148 |
</select> |
| 148 | 149 |
|
| 150 |
+ |
|
| 149 | 151 |
<select id="mainPopup.selectMainPopupVOLink" parameterClass="String" resultMap="MainPopupLinkResultMap"> |
| 150 | 152 |
|
| 151 |
- /* mainPopup.selectMainPopupVO */ |
|
| 153 |
+ /* mainPopup.selectMainPopupVOLink */ |
|
| 152 | 154 |
SELECT |
| 155 |
+ POP_LINK_ID, |
|
| 153 | 156 |
POP_ID, |
| 154 | 157 |
MLINK, |
| 155 |
- COORDS, |
|
| 156 |
- SORT |
|
| 158 |
+ COORDS |
|
| 157 | 159 |
FROM MAIN_POPUP_LINK |
| 158 | 160 |
WHERE POP_ID = #popId# |
| 159 |
- order by SORT asc |
|
| 160 | 161 |
</select> |
| 161 | 162 |
|
| 162 | 163 |
|
... | ... | @@ -196,6 +197,16 @@ |
| 196 | 197 |
DELETE FROM MAIN_POPUP WHERE POP_ID=#popId# |
| 197 | 198 |
</delete> |
| 198 | 199 |
|
| 200 |
+ <delete id="mainPopup.deleteMainPopupLinkInfo" parameterClass="mainPopupLinkVO"> |
|
| 201 |
+ /* mainPopup.deleteMainPopupLinkInfo */ |
|
| 202 |
+ |
|
| 203 |
+ DELETE FROM MAIN_POPUP_LINK |
|
| 204 |
+ WHERE |
|
| 205 |
+ POP_ID=#popId# |
|
| 206 |
+ AND |
|
| 207 |
+ POP_LINK_ID = #popLinkId# |
|
| 208 |
+ </delete> |
|
| 209 |
+ |
|
| 199 | 210 |
|
| 200 | 211 |
<update id="mainPopup.resetMainPopupSort" parameterClass="mainPopupVO"> |
| 201 | 212 |
/*mainPopup.resetMainPopupSort*/ |
--- src/main/resources/egovframework/sqlmap/let/uss/pwm/PopupManage_SQL_Mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/uss/pwm/PopupManage_SQL_Mysql.xml
... | ... | @@ -1083,7 +1083,6 @@ |
| 1083 | 1083 |
POP_ID |
| 1084 | 1084 |
, MLINK |
| 1085 | 1085 |
, COORDS |
| 1086 |
- , SORT |
|
| 1087 | 1086 |
) |
| 1088 | 1087 |
VALUES |
| 1089 | 1088 |
<iterate conjunction=","> |
... | ... | @@ -1091,7 +1090,6 @@ |
| 1091 | 1090 |
#[].popId# |
| 1092 | 1091 |
, #[].mlink# |
| 1093 | 1092 |
, #[].coords# |
| 1094 |
- , #[].sort# |
|
| 1095 | 1093 |
) |
| 1096 | 1094 |
</iterate> |
| 1097 | 1095 |
|
... | ... | @@ -1123,7 +1121,6 @@ |
| 1123 | 1121 |
SET |
| 1124 | 1122 |
MLINK = #mlink# |
| 1125 | 1123 |
, COORDS = #coords# |
| 1126 |
- , SORT = #sort# |
|
| 1127 | 1124 |
WHERE POP_ID = #popId# |
| 1128 | 1125 |
</update> |
| 1129 | 1126 |
|
--- src/main/resources/egovframework/sqlmap/let/uss/umt/EgovUserManage_SQL_Mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/uss/umt/EgovUserManage_SQL_Mysql.xml
... | ... | @@ -1315,6 +1315,7 @@ |
| 1315 | 1315 |
ADMIN_SMS_NOTICE_YN AS adminSmsNoticeYn |
| 1316 | 1316 |
,PRE_PAYMENT_YN AS prePaymentYn |
| 1317 | 1317 |
,SMISHING_YN AS smishingYn |
| 1318 |
+ ,AT_SMISHING_YN AS atSmishingYn |
|
| 1318 | 1319 |
,AUTO_CASH AS autoCash |
| 1319 | 1320 |
,IFNULL(BLINE_CODE, 'N') AS blineCode |
| 1320 | 1321 |
,IFNULL(RECOMMEND_ID, '') AS recommendId |
--- src/main/webapp/WEB-INF/jsp/cmm/sym/ccm/EgovCcmCmmnCodeTree.jsp
+++ src/main/webapp/WEB-INF/jsp/cmm/sym/ccm/EgovCcmCmmnCodeTree.jsp
... | ... | @@ -553,6 +553,9 @@ |
| 553 | 553 |
<div id="kopost_organization" class="orgCont"></div> |
| 554 | 554 |
</div> |
| 555 | 555 |
<div class="tbWrap"> |
| 556 |
+ <div class="btnWrap"> |
|
| 557 |
+ <input type="button" class="btnType1 bg_456ded main1_save_btn" value="저 장" onClick="fn_save_menuInfo(); return false;"> |
|
| 558 |
+ </div> |
|
| 556 | 559 |
<span class="tbTit" id="menuTopNm" >코드를 선택하세요</span> |
| 557 | 560 |
<table class="tbType2"> |
| 558 | 561 |
<colgroup> |
--- src/main/webapp/WEB-INF/jsp/cmm/uss/umt/EgovGnrlUserSelectUpdt.jsp
+++ src/main/webapp/WEB-INF/jsp/cmm/uss/umt/EgovGnrlUserSelectUpdt.jsp
... | ... | @@ -22,6 +22,7 @@ |
| 22 | 22 |
<%@ taglib prefix="double-submit" uri="http://www.egovframe.go.kr/tags/double-submit/jsp" %> |
| 23 | 23 |
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> |
| 24 | 24 |
<%@ taglib prefix="ec" uri="/WEB-INF/tld/ecnet_tld.tld"%> |
| 25 |
+<%@ taglib prefix="fnc" uri="/WEB-INF/tld/functions.tld"%> |
|
| 25 | 26 |
<% pageContext.setAttribute("newLineChar", "\r\n"); %>
|
| 26 | 27 |
<% pageContext.setAttribute("newLineChar2", "\n"); %>
|
| 27 | 28 |
<% String serverName = request.getServerName(); %> |
... | ... | @@ -4157,8 +4158,10 @@ |
| 4157 | 4158 |
</td> |
| 4158 | 4159 |
<td> |
| 4159 | 4160 |
<c:choose> |
| 4160 |
- <c:when test="${not empty mjonMsgSentList.regdate}">
|
|
| 4161 |
- <fmt:formatDate value="${mjonMsgSentList.regdate}" pattern="MM-dd HH:mm"/>
|
|
| 4161 |
+ <c:when test="${not empty mjonMsgSentList.regDate}">
|
|
| 4162 |
+<%-- <fmt:formatDate value="${mjonMsgSentList.regDate}" pattern="MM-dd HH:mm"/> --%>
|
|
| 4163 |
+ ${fnc:setStrToDataFormatter(mjonMsgSentList.regDate, 'MM-dd HH:mm') }
|
|
| 4164 |
+<%-- <c:out value="${mjonMsgSentList.regDate}" /> --%>
|
|
| 4162 | 4165 |
</c:when> |
| 4163 | 4166 |
<c:otherwise> |
| 4164 | 4167 |
- |
... | ... | @@ -4190,7 +4193,8 @@ |
| 4190 | 4193 |
</c:when> |
| 4191 | 4194 |
<c:when test="${mjonMsgSentList.reserveYn eq 'Y' && mjonMsgSentList.reserveCYn eq 'N'}">
|
| 4192 | 4195 |
[예약]<br /> |
| 4193 |
- <fmt:formatDate value="${mjonMsgSentList.reqdate}" pattern="MM-dd HH:mm"/>
|
|
| 4196 |
+<%-- <fmt:formatDate value="${mjonMsgSentList.reqDate}" pattern="MM-dd HH:mm"/> --%>
|
|
| 4197 |
+ ${fnc:setStrToDataFormatter(mjonMsgSentList.regDate, 'MM-dd HH:mm') }
|
|
| 4194 | 4198 |
</c:when> |
| 4195 | 4199 |
<c:otherwise> |
| 4196 | 4200 |
- |
... | ... | @@ -4367,8 +4371,11 @@ |
| 4367 | 4371 |
</td> |
| 4368 | 4372 |
<td> |
| 4369 | 4373 |
<c:choose> |
| 4370 |
- <c:when test="${not empty mjonMsgSentList.regdate}">
|
|
| 4371 |
- <fmt:formatDate value="${mjonMsgSentList.regdate}" pattern="MM-dd HH:mm"/>
|
|
| 4374 |
+ <c:when test="${not empty mjonMsgSentList.regDate}">
|
|
| 4375 |
+<%-- <fmt:formatDate value="${mjonMsgSentList.regDate}" pattern="MM-dd HH:mm"/> --%>
|
|
| 4376 |
+<%-- <c:out value="${mjonMsgSentList.regDate}" /> --%>
|
|
| 4377 |
+ |
|
| 4378 |
+ ${fnc:setStrToDataFormatter(mjonMsgSentList.regDate, 'MM-dd HH:mm') }
|
|
| 4372 | 4379 |
</c:when> |
| 4373 | 4380 |
<c:otherwise> |
| 4374 | 4381 |
- |
... | ... | @@ -4400,7 +4407,8 @@ |
| 4400 | 4407 |
</c:when> |
| 4401 | 4408 |
<c:when test="${mjonMsgSentList.reserveYn eq 'Y' && mjonMsgSentList.reserveCYn eq 'N'}">
|
| 4402 | 4409 |
[예약]<br /> |
| 4403 |
- <fmt:formatDate value="${mjonMsgSentList.reqdate}" pattern="yyyy-MM-dd HH:mm"/>
|
|
| 4410 |
+ ${fnc:setStrToDataFormatter(mjonMsgSentList.regDate, 'yyyy-MM-dd HH:mm') }
|
|
| 4411 |
+<%-- <fmt:formatDate value="${mjonMsgSentList.reqDate}" pattern="yyyy-MM-dd HH:mm"/> --%>
|
|
| 4404 | 4412 |
</c:when> |
| 4405 | 4413 |
<c:otherwise> |
| 4406 | 4414 |
- |
... | ... | @@ -4586,8 +4594,8 @@ |
| 4586 | 4594 |
</td> |
| 4587 | 4595 |
<td> |
| 4588 | 4596 |
<c:choose> |
| 4589 |
- <c:when test="${not empty mjonMsgDelaySentList.regdate}">
|
|
| 4590 |
- <fmt:formatDate value="${mjonMsgDelaySentList.regdate}" pattern="yyyy-MM-dd HH:mm"/>
|
|
| 4597 |
+ <c:when test="${not empty mjonMsgDelaySentList.regDate}">
|
|
| 4598 |
+ <fmt:formatDate value="${mjonMsgDelaySentList.regDate}" pattern="yyyy-MM-dd HH:mm"/>
|
|
| 4591 | 4599 |
</c:when> |
| 4592 | 4600 |
<c:otherwise> |
| 4593 | 4601 |
- |
... | ... | @@ -4605,7 +4613,7 @@ |
| 4605 | 4613 |
<c:otherwise> |
| 4606 | 4614 |
<c:choose> |
| 4607 | 4615 |
<c:when test="${mjonMsgDelaySentList.delayYn eq 'Y'}">
|
| 4608 |
- [스미싱의심] <fmt:formatDate value="${mjonMsgDelaySentList.reqdate}" pattern="yyyy-MM-dd HH:mm"/>
|
|
| 4616 |
+ [스미싱의심] <fmt:formatDate value="${mjonMsgDelaySentList.reqDate}" pattern="yyyy-MM-dd HH:mm"/>
|
|
| 4609 | 4617 |
</c:when> |
| 4610 | 4618 |
<c:otherwise> |
| 4611 | 4619 |
- |
... | ... | @@ -4785,6 +4793,10 @@ |
| 4785 | 4793 |
<td> |
| 4786 | 4794 |
<c:choose> |
| 4787 | 4795 |
<c:when test="${not empty kakaoResultList.regDate}">
|
| 4796 |
+ |
|
| 4797 |
+ <c:out value="${kakaoResultList.regDate}" />
|
|
| 4798 |
+ |
|
| 4799 |
+<%-- ${fnc:setStrToDataFormatter(kakaoResultList.regDate, 'MM-dd HH:mm') } --%>
|
|
| 4788 | 4800 |
<fmt:parseDate value="${kakaoResultList.regDate}" var="dateValue" pattern="yyyy-MM-dd HH:mm:ss"/>
|
| 4789 | 4801 |
<fmt:formatDate value="${dateValue}" pattern="MM-dd HH:mm"/>
|
| 4790 | 4802 |
</c:when> |
... | ... | @@ -4925,8 +4937,10 @@ |
| 4925 | 4937 |
<td> |
| 4926 | 4938 |
<c:choose> |
| 4927 | 4939 |
<c:when test="${not empty kakaoReserveList.regDate}">
|
| 4928 |
- <fmt:parseDate value="${kakaoReserveList.regDate}" var="dateValue" pattern="yyyy-MM-dd HH:mm:ss"/>
|
|
| 4929 |
- <fmt:formatDate value="${dateValue}" pattern="MM-dd HH:mm"/>
|
|
| 4940 |
+ <c:out value="${kakaoReserveList.regDate}" />
|
|
| 4941 |
+ ${fnc:setStrToDataFormatter(kakaoReserveList.regDate, 'MM-dd HH:mm') }
|
|
| 4942 |
+<%-- <fmt:parseDate value="${kakaoReserveList.regDate}" var="dateValue" pattern="yyyy-MM-dd HH:mm:ss"/> --%>
|
|
| 4943 |
+<%-- <fmt:formatDate value="${dateValue}" pattern="MM-dd HH:mm"/> --%>
|
|
| 4930 | 4944 |
|
| 4931 | 4945 |
</c:when> |
| 4932 | 4946 |
<c:otherwise> |
... | ... | @@ -5073,8 +5087,11 @@ |
| 5073 | 5087 |
<td> |
| 5074 | 5088 |
<c:choose> |
| 5075 | 5089 |
<c:when test="${not empty kakaoDelayInfo.regDate}">
|
| 5076 |
- <fmt:parseDate value="${kakaoDelayInfo.regDate}" var="kakaoDelayRegdate" pattern="yyyy-MM-dd HH:mm:ss"/>
|
|
| 5077 |
- <fmt:formatDate value="${kakaoDelayRegdate}" pattern="MM-dd HH:mm"/>
|
|
| 5090 |
+<%-- <c:out value="${kakaoDelayInfo.regDate}" /> --%>
|
|
| 5091 |
+ ${fnc:setStrToDataFormatter(kakaoDelayInfo.regDate, 'MM-dd HH:mm') }
|
|
| 5092 |
+<%-- <fmt:formatDate value="${kakaoDelayRegdate}" pattern="MM-dd HH:mm"/> --%>
|
|
| 5093 |
+<%-- <fmt:parseDate value="${kakaoDelayInfo.regDate}" var="kakaoDelayRegdate" pattern="yyyy-MM-dd HH:mm:ss"/> --%>
|
|
| 5094 |
+<%-- <fmt:formatDate value="${kakaoDelayRegdate}" pattern="MM-dd HH:mm"/> --%>
|
|
| 5078 | 5095 |
</c:when> |
| 5079 | 5096 |
<c:otherwise> |
| 5080 | 5097 |
- |
--- src/main/webapp/WEB-INF/jsp/uss/ion/bnr/pop/mainPopupModify.jsp
+++ src/main/webapp/WEB-INF/jsp/uss/ion/bnr/pop/mainPopupModify.jsp
... | ... | @@ -31,8 +31,18 @@ |
| 31 | 31 |
|
| 32 | 32 |
makeDate('ntceBgndeYYYMMDD');
|
| 33 | 33 |
makeTomorrow('ntceEnddeYYYMMDD');
|
| 34 |
- |
|
| 35 |
- |
|
| 34 |
+ // class="mlink"인 모든 input 요소에 대해 이벤트 리스너 추가 |
|
| 35 |
+ document.getElementById('linkTable').addEventListener('paste', function(event) {
|
|
| 36 |
+ if (event.target.classList.contains('mlink')) {
|
|
| 37 |
+ let pastedText = event.clipboardData.getData("text");
|
|
| 38 |
+ console.log("붙여넣기 한 URL:", pastedText);
|
|
| 39 |
+ let cleanedUrl = cleanUrlParameters(pastedText); |
|
| 40 |
+ setTimeout(() => {
|
|
| 41 |
+ event.target.value = cleanedUrl; |
|
| 42 |
+ console.log("정리된 URL:", cleanedUrl);
|
|
| 43 |
+ }, 0); |
|
| 44 |
+ } |
|
| 45 |
+ }); |
|
| 36 | 46 |
}); |
| 37 | 47 |
|
| 38 | 48 |
/** |
... | ... | @@ -40,39 +50,37 @@ |
| 40 | 50 |
* @param {string} url 원본 URL 문자열
|
| 41 | 51 |
* @returns {string} 불필요한 파라미터가 제거된 URL
|
| 42 | 52 |
*/ |
| 43 |
- function cleanUrlParameters(url) {
|
|
| 44 |
- try {
|
|
| 45 |
- // URL이 절대경로 (/web/... 형태)인지 확인 |
|
| 46 |
- let hasFullDomain = url.startsWith("http://") || url.startsWith("https://");
|
|
| 47 |
- let urlObj; |
|
| 48 |
- |
|
| 49 |
- if (hasFullDomain) {
|
|
| 50 |
- // 도메인이 포함된 URL 처리 |
|
| 51 |
- urlObj = new URL(url); |
|
| 52 |
- } else {
|
|
| 53 |
- // 절대경로 URL 처리 (가상의 도메인 추가 후 파싱) |
|
| 54 |
- urlObj = new URL("https://www.munjaon.co.kr" + url);
|
|
| 55 |
- } |
|
| 56 |
- |
|
| 57 |
- let params = new URLSearchParams(urlObj.search); |
|
| 58 |
- |
|
| 59 |
- // ❗ 값이 비어있는 모든 파라미터 제거 |
|
| 60 |
- for (let [key, value] of [...params.entries()]) { // `params.entries()`를 배열로 변환하여 반복
|
|
| 61 |
- if (!value.trim()) { // 값이 비어있는 경우 제거
|
|
| 62 |
- params.delete(key); |
|
| 63 |
- } |
|
| 64 |
- } |
|
| 65 |
- |
|
| 66 |
- // 정리된 URL 반환 |
|
| 67 |
- let cleanedPath = urlObj.pathname + (params.toString() ? "?" + params.toString() : ""); |
|
| 68 |
- // 정리된 URL 반환 (도메인을 제거하고 절대경로만 반환) |
|
| 69 |
- return cleanedPath.replace(/^https:\/\/www\.munjaon\.co\.kr/, ""); |
|
| 70 |
- |
|
| 71 |
- } catch (e) {
|
|
| 72 |
- console.warn("잘못된 URL 형식:", url);
|
|
| 73 |
- return url; // URL 파싱 실패 시 원본 유지 |
|
| 53 |
+function cleanUrlParameters(url) {
|
|
| 54 |
+ try {
|
|
| 55 |
+ // URL이 절대경로 (/web/... 형태)인지 확인 |
|
| 56 |
+ let hasFullDomain = url.startsWith("http://") || url.startsWith("https://");
|
|
| 57 |
+ let urlObj; |
|
| 58 |
+ |
|
| 59 |
+ if (hasFullDomain) {
|
|
| 60 |
+ // 도메인이 포함된 URL 처리 |
|
| 61 |
+ urlObj = new URL(url); |
|
| 62 |
+ } else {
|
|
| 63 |
+ // 절대경로 URL 처리 (가상의 도메인 추가 후 파싱) |
|
| 64 |
+ urlObj = new URL("https://www.munjaon.co.kr" + url);
|
|
| 74 | 65 |
} |
| 66 |
+ |
|
| 67 |
+ let params = new URLSearchParams(urlObj.search); |
|
| 68 |
+ |
|
| 69 |
+ // 값이 비어있는 모든 파라미터 제거 |
|
| 70 |
+ for (let [key, value] of [...params.entries()]) {
|
|
| 71 |
+ if (!value.trim()) { // 값이 비어있는 경우 제거
|
|
| 72 |
+ params.delete(key); |
|
| 73 |
+ } |
|
| 74 |
+ } |
|
| 75 |
+ |
|
| 76 |
+ // 정리된 URL 반환 |
|
| 77 |
+ let cleanedPath = urlObj.pathname + (params.toString() ? "?" + params.toString() : ""); |
|
| 78 |
+ return cleanedPath.replace(/^https:\/\/www\.munjaon\.co\.kr/, ""); |
|
| 79 |
+ } catch (e) {
|
|
| 80 |
+ console.warn("잘못된 URL 형식:", url);
|
|
| 81 |
+ return url; // URL 파싱 실패 시 원본 유지 |
|
| 75 | 82 |
} |
| 83 |
+} |
|
| 76 | 84 |
|
| 77 | 85 |
//게시기간이 없으면 초기 값 입력 |
| 78 | 86 |
function makeDate(id){
|
... | ... | @@ -141,17 +149,6 @@ |
| 141 | 149 |
for (let i = 0; i < linkRows.length; i++) {
|
| 142 | 150 |
let linkInput = document.querySelector('input[name="mainPopupLinkList['+i+'].mlink"]');
|
| 143 | 151 |
let coordInput = document.querySelector('input[name="mainPopupLinkList['+i+'].coords"]');
|
| 144 |
- let sortInput = document.querySelector('input[name="mainPopupLinkList['+i+'].sort"]');
|
|
| 145 |
- |
|
| 146 |
- if (!linkInput.value && !coordInput.value) {
|
|
| 147 |
- if(sortInput.value){
|
|
| 148 |
- let trElement = sortInput.closest("tr");
|
|
| 149 |
- if (trElement) {
|
|
| 150 |
- trElement.remove(); |
|
| 151 |
- } |
|
| 152 |
- } |
|
| 153 |
- continue; // 요소가 없으면 건너뛴다. |
|
| 154 |
- } |
|
| 155 | 152 |
|
| 156 | 153 |
if (linkInput.value.trim() === "") {
|
| 157 | 154 |
alert('['+(i + 1)+']번째 링크주소를 입력해 주십시오');
|
... | ... | @@ -165,11 +162,6 @@ |
| 165 | 162 |
return false; |
| 166 | 163 |
} |
| 167 | 164 |
|
| 168 |
- if (sortInput.value.trim() === "") {
|
|
| 169 |
- alert('['+(i + 1)+']번째 순서를 입력해 주십시오');
|
|
| 170 |
- sortInput.focus(); |
|
| 171 |
- return false; |
|
| 172 |
- } |
|
| 173 | 165 |
} |
| 174 | 166 |
|
| 175 | 167 |
console.log('isTbodyEmpty("tbody_fiielist") : ', isTbodyEmpty("tbody_fiielist"));
|
... | ... | @@ -286,30 +278,77 @@ |
| 286 | 278 |
coordTd.innerHTML = '<input type="text" name="mainPopupLinkList['+rowCount+'].coords" maxlength="200" />'; |
| 287 | 279 |
|
| 288 | 280 |
// 세 번째 컬럼 (링크 좌표) |
| 289 |
- let sortTh = document.createElement("th");
|
|
| 290 |
- sortTh.innerHTML = '<span>순서</span>'; |
|
| 291 | 281 |
let sortTd = document.createElement("td");
|
| 292 |
- sortTd.innerHTML = '<input type="text" name="mainPopupLinkList['+rowCount+'].sort" maxlength="200" value="'+rowCountP+'" />'; |
|
| 293 |
- |
|
| 282 |
+ sortTd.setAttribute("colspan", "2");
|
|
| 283 |
+ sortTd.innerHTML = '<input type="button" class="btnType2" value="삭제" onclick="fn_linkDel(\'\')" />'; |
|
| 294 | 284 |
// tr에 추가 |
| 295 | 285 |
newRow.appendChild(linkTh); |
| 296 | 286 |
newRow.appendChild(linkTd); |
| 297 | 287 |
newRow.appendChild(coordTh); |
| 298 | 288 |
newRow.appendChild(coordTd); |
| 299 |
- newRow.appendChild(sortTh); |
|
| 300 | 289 |
newRow.appendChild(sortTd); |
| 301 | 290 |
|
| 302 | 291 |
// tbody에 추가 |
| 303 | 292 |
tbody.appendChild(newRow); |
| 304 | 293 |
} |
| 305 | 294 |
|
| 306 |
- |
|
| 295 |
+function fn_linkDel(p_linkId) {
|
|
| 296 |
+ // event.target을 저장 |
|
| 297 |
+ const $target = $(event.target); |
|
| 298 |
+ |
|
| 299 |
+ if (!p_linkId) {
|
|
| 300 |
+ |
|
| 301 |
+ $target.closest('tr').remove();
|
|
| 302 |
+ }else{
|
|
| 303 |
+ |
|
| 304 |
+ var p_popId = $('#popId').val();
|
|
| 305 |
+ var p_popLinkId = p_linkId; |
|
| 306 |
+ |
|
| 307 |
+ var sendData = {
|
|
| 308 |
+ "popId" : p_popId |
|
| 309 |
+ , "popLinkId" : p_popLinkId |
|
| 310 |
+ } |
|
| 311 |
+ |
|
| 312 |
+ $.ajax({
|
|
| 313 |
+ type: 'POST', |
|
| 314 |
+ url: '<c:url value="/uss/ion/bnr/pop/mainPopupLinkDeleteAjax.do" />', |
|
| 315 |
+ contentType: 'application/json', |
|
| 316 |
+ data: JSON.stringify(sendData), |
|
| 317 |
+ dataType: 'json', |
|
| 318 |
+ success : function(data) {
|
|
| 319 |
+ alert(data.msg); |
|
| 320 |
+ console.log('data : ', data);
|
|
| 321 |
+ if(data.status == 'OK') |
|
| 322 |
+ {
|
|
| 323 |
+ console.log('data OK : ', data);
|
|
| 324 |
+ $target.closest('tr').remove();
|
|
| 325 |
+ } |
|
| 326 |
+ else |
|
| 327 |
+ {
|
|
| 328 |
+ // 실패 처리 로직 |
|
| 329 |
+ } |
|
| 330 |
+ }, |
|
| 331 |
+ error : function(jqXHR, textStatus, errorThrown) {
|
|
| 332 |
+ console.error("AJAX Error:", textStatus, errorThrown);
|
|
| 333 |
+ console.error("Response:", jqXHR.responseText);
|
|
| 334 |
+ } |
|
| 335 |
+ }); |
|
| 336 |
+ |
|
| 337 |
+ } |
|
| 338 |
+ |
|
| 339 |
+ |
|
| 340 |
+ |
|
| 341 |
+} |
|
| 307 | 342 |
</script> |
| 308 | 343 |
<style> |
| 309 | 344 |
.date_format{width:91px !important;}
|
| 310 | 345 |
.del_file_btn{border: none;background-color: transparent;background-image: url(/direct/img/upload_delect_img.png);background-repeat: no-repeat;background-position: center center;vertical-align: middle;margin-top: -4px;margin-right: 15px;}
|
| 311 | 346 |
.file_size{color: #0388d2;font-weight: bold;}
|
| 312 | 347 |
.uploaded_obj{width: 100%;}
|
| 348 |
+.btnType2 {
|
|
| 349 |
+ border: 1px solid #456ded; |
|
| 350 |
+ color: #456ded; |
|
| 351 |
+} |
|
| 313 | 352 |
</style> |
| 314 | 353 |
</head> |
| 315 | 354 |
<body> |
... | ... | @@ -441,30 +480,12 @@ |
| 441 | 480 |
<td> |
| 442 | 481 |
<form:input path="mainPopupLinkList[${status.index}].coords" class="mlink" maxlength="200" />
|
| 443 | 482 |
</td> |
| 444 |
- <th><span>순서</span></th> |
|
| 445 |
- <td> |
|
| 446 |
- <form:input path="mainPopupLinkList[${status.index}].sort" class="mlink" maxlength="200" oninput="this.value = this.value.replace(/[^0-9]/g, '');" />
|
|
| 483 |
+ <td colspan="2"> |
|
| 484 |
+ <input type="button" class="btnType2" value="삭제" onclick="fn_linkDel('${link.popLinkId }'); return false;">
|
|
| 447 | 485 |
</td> |
| 448 | 486 |
</tr> |
| 449 | 487 |
</c:forEach> |
| 450 | 488 |
</c:when> |
| 451 |
- <c:otherwise> |
|
| 452 |
- <!-- 값이 없을 때 빈 input 생성 --> |
|
| 453 |
- <tr> |
|
| 454 |
- <th><span>[1]링크주소</span></th> |
|
| 455 |
- <td> |
|
| 456 |
- <form:input path="mainPopupLinkList[0].mlink" class="mlink" maxlength="200" /> |
|
| 457 |
- </td> |
|
| 458 |
- <th><span>링크좌표</span></th> |
|
| 459 |
- <td> |
|
| 460 |
- <form:input path="mainPopupLinkList[0].coords" maxlength="200" /> |
|
| 461 |
- </td> |
|
| 462 |
- <th><span>순서</span></th> |
|
| 463 |
- <td> |
|
| 464 |
- <form:input path="mainPopupLinkList[0].sort" maxlength="200" value="1" oninput="this.value = this.value.replace(/[^0-9]/g, '');" /> |
|
| 465 |
- </td> |
|
| 466 |
- </tr> |
|
| 467 |
- </c:otherwise> |
|
| 468 | 489 |
</c:choose> |
| 469 | 490 |
</tbody> |
| 470 | 491 |
<tr> |
--- src/main/webapp/WEB-INF/jsp/web/com/webCommonHeader.jsp
+++ src/main/webapp/WEB-INF/jsp/web/com/webCommonHeader.jsp
... | ... | @@ -341,8 +341,8 @@ |
| 341 | 341 |
} |
| 342 | 342 |
|
| 343 | 343 |
function actionLogin() {
|
| 344 |
- location.href="<c:url value='/web/user/login/login.do'/>"; |
|
| 345 |
- /* |
|
| 344 |
+// location.href="<c:url value='/web/user/login/login.do'/>"; |
|
| 345 |
+ |
|
| 346 | 346 |
// 아이디 공백 제거 |
| 347 | 347 |
document.loginForm.id_text.value = $.trim(document.loginForm.id_text.value); |
| 348 | 348 |
|
... | ... | @@ -353,16 +353,6 @@ |
| 353 | 353 |
alert("비밀번호를 입력하세요");
|
| 354 | 354 |
return; |
| 355 | 355 |
} else {
|
| 356 |
- |
|
| 357 |
- // Whois IP 국가코드 |
|
| 358 |
- //whoisIpCountry(); |
|
| 359 |
- setTimeout(function() {
|
|
| 360 |
- if (isKoreaIpAddress == false) {
|
|
| 361 |
- alert("해외 IP로 감지되어 로그인이 제한되었습니다.\n문자온 고객센터로 문의 바랍니다.");
|
|
| 362 |
- location.href='/web/uat/uia/actionLogout.do'; |
|
| 363 |
- return false; |
|
| 364 |
- } |
|
| 365 |
- |
|
| 366 | 356 |
// 로그인 START |
| 367 | 357 |
var rsa = new RSAKey(); |
| 368 | 358 |
rsa.setPublic($('#RSAModulus').val(),$('#RSAExponent').val());
|
... | ... | @@ -373,13 +363,84 @@ |
| 373 | 363 |
$("#id").val(rsa.encrypt(id.val().toLowerCase()));
|
| 374 | 364 |
$("#password").val(rsa.encrypt(pw.val()));
|
| 375 | 365 |
|
| 376 |
- document.loginForm.action="<c:url value='/web/user/login/actionSecurityLogin.do'/>"; |
|
| 377 | 366 |
saveid(document.loginForm); |
| 378 |
- document.loginForm.submit(); |
|
| 379 |
- }, 600); |
|
| 380 |
- |
|
| 367 |
+ |
|
| 368 |
+ var checkForm = $("form[name=loginForm]").serialize() ;
|
|
| 369 |
+ |
|
| 370 |
+ $.ajax({
|
|
| 371 |
+ type : "POST", |
|
| 372 |
+ async : false, |
|
| 373 |
+ url : "/web/user/login/actionSecurityLoginBeforeHpAjax.do", |
|
| 374 |
+ data : checkForm, |
|
| 375 |
+ dataType:'json', |
|
| 376 |
+ success : function(data) {
|
|
| 377 |
+ if (data.status=="success"){
|
|
| 378 |
+ |
|
| 379 |
+ document.loginForm.passFlag.value = data.passFlag; |
|
| 380 |
+ if(data.passFlag == "Y") |
|
| 381 |
+ {
|
|
| 382 |
+ actionLogin_end(); |
|
| 383 |
+ } |
|
| 384 |
+ else |
|
| 385 |
+ {
|
|
| 386 |
+ goLoginPage(id.val(), pw.val(), "secure"); |
|
| 387 |
+ } |
|
| 388 |
+ }else if (data.status=="fail"){
|
|
| 389 |
+ |
|
| 390 |
+ if (data.returnType == "A"){
|
|
| 391 |
+ //휴면 회원 |
|
| 392 |
+ document.loginForm.action="<c:url value='/web/user/humanPage.do'/>"; |
|
| 393 |
+ document.loginForm.submit(); |
|
| 394 |
+ }else if (data.returnType == "B"){
|
|
| 395 |
+ //기업회원 기업정보 기입 |
|
| 396 |
+ document.cmpChangeForm.mberId.value = data.mberId; |
|
| 397 |
+ document.cmpChangeForm.action="<c:url value='/web/user/login/membershipAttachDocBefore.do'/>"; |
|
| 398 |
+ document.cmpChangeForm.submit(); |
|
| 399 |
+ }else if (data.returnType == "C"){
|
|
| 400 |
+ document.cmpChangeForm.mberId.value = data.mberId; |
|
| 401 |
+ document.cmpChangeForm.action="<c:url value='/web/user/login/loginRestrictionUse.do'/>"; |
|
| 402 |
+ document.cmpChangeForm.submit(); |
|
| 403 |
+ }else{
|
|
| 404 |
+ //로그인 실패 page이동 |
|
| 405 |
+ goLoginPage(id.val(), pw.val(), data.msg); |
|
| 406 |
+ } |
|
| 407 |
+ } |
|
| 408 |
+ |
|
| 409 |
+ //alert(JSON.stringify(data)); |
|
| 410 |
+ console.log("sucess data1 : " + JSON.stringify(data));
|
|
| 411 |
+ if (data.isSuccess == true) {
|
|
| 412 |
+ console.log("fn_click_banner_add_stat sucess data2 : " + JSON.stringify(data));
|
|
| 413 |
+ } |
|
| 414 |
+ else {
|
|
| 415 |
+ console.log("data.isSuccess not true ");
|
|
| 416 |
+ console.log("sucess data.msg : " + data.msg);
|
|
| 417 |
+ console.log("sucess data1 : " + JSON.stringify(data));
|
|
| 418 |
+ } |
|
| 419 |
+ }, |
|
| 420 |
+ error : function(xhr, status, error) {
|
|
| 421 |
+ console.log("fn_click_banner_add_stat error : " + error);
|
|
| 422 |
+ console.log("fn_click_banner_add_stat xhr : " + JSON.stringify(xhr) + "\r\status : " + JSON.stringify(status) + "\r\error : " + JSON.stringify(error));
|
|
| 423 |
+ return false; |
|
| 424 |
+ } |
|
| 425 |
+ }); |
|
| 381 | 426 |
} |
| 382 |
- */ |
|
| 427 |
+ |
|
| 428 |
+} |
|
| 429 |
+ |
|
| 430 |
+function goLoginPage(id, pw, headerLoginResult){
|
|
| 431 |
+ document.loginForm.id.value = id; |
|
| 432 |
+ document.loginForm.password.value = pw; |
|
| 433 |
+ document.loginForm.headerLoginResult.value = headerLoginResult; |
|
| 434 |
+ document.loginForm.action = "<c:url value='/web/user/login/login.do'/>"; |
|
| 435 |
+ |
|
| 436 |
+ document.loginForm.submit(); |
|
| 437 |
+} |
|
| 438 |
+ |
|
| 439 |
+//아이디/휴대폰 번호 체크 |
|
| 440 |
+function actionLogin_end(){
|
|
| 441 |
+ document.loginForm.action="<c:url value='/web/user/login/actionSecurityLoginAfterHp.do'/>"; |
|
| 442 |
+ saveid(document.loginForm); |
|
| 443 |
+ document.loginForm.submit(); |
|
| 383 | 444 |
} |
| 384 | 445 |
|
| 385 | 446 |
function saveid(form) {
|
... | ... | @@ -1636,14 +1697,19 @@ |
| 1636 | 1697 |
<input type="hidden" id="id" name="id"> |
| 1637 | 1698 |
<input type="hidden" id="password" name="password"> |
| 1638 | 1699 |
<input type="hidden" id="ip" name="ip" value="${userIp}">
|
| 1700 |
+ <input type="hidden" id="passFlag" name="passFlag"> |
|
| 1701 |
+ <input type="hidden" id="headerLoginResult" name="headerLoginResult"> |
|
| 1702 |
+ |
|
| 1639 | 1703 |
<div id="login" class="login"> |
| 1640 | 1704 |
<div class="inner"> |
| 1641 | 1705 |
<div class="login_left"> |
| 1642 | 1706 |
<div class="login_put"> |
| 1643 | 1707 |
<label for="id_text" class="label"></label> |
| 1644 |
- <input type="text" placeholder="아이디를 입력해주세요"id="id_text" name="id_text" class="id_text" maxlength="20" size="18" onclick="actionLogin();"> |
|
| 1708 |
+<!-- <input type="text" placeholder="아이디를 입력해주세요"id="id_text" name="id_text" class="id_text" maxlength="20" size="18" onclick="actionLogin();"> --> |
|
| 1709 |
+ <input type="text" placeholder="아이디를 입력해주세요"id="id_text" name="id_text" class="id_text" maxlength="20" size="18"> |
|
| 1645 | 1710 |
<label for="password_text" class="label"></label> |
| 1646 |
- <input type="password" placeholder="비밀번호를 입력해주세요" id="password_text" class="password_text" maxlength="30"size="18" onkeypress="if(event.keyCode==13) {actionLogin(); return false;}" onclick="actionLogin();">
|
|
| 1711 |
+<!-- <input type="password" placeholder="비밀번호를 입력해주세요" id="password_text" class="password_text" maxlength="30"size="18" onkeypress="if(event.keyCode==13) {actionLogin(); return false;}" onclick="actionLogin();"> -->
|
|
| 1712 |
+ <input type="password" placeholder="비밀번호를 입력해주세요" id="password_text" class="password_text" maxlength="30"size="18" onkeypress="if(event.keyCode==13) {actionLogin(); return false;}">
|
|
| 1647 | 1713 |
<label for="login_button" class="label"></label> |
| 1648 | 1714 |
<button type="button" id="login_button" class="btnType btnType1" class="login_button" onclick="actionLogin();">로그인</button> |
| 1649 | 1715 |
</div> |
... | ... | @@ -1758,5 +1824,9 @@ |
| 1758 | 1824 |
<input type="hidden" name="tr_url" id="tr_urlHeader" value = ""> |
| 1759 | 1825 |
<input type="hidden" name="tr_add" id="tr_addHeader" value = ""> |
| 1760 | 1826 |
</form> |
| 1827 |
+ |
|
| 1828 |
+ <form name="cmpChangeForm" id="cmpChangeForm" method="post" action="#"> |
|
| 1829 |
+ <input type="hidden" name="mberId" value=""/> |
|
| 1830 |
+ </form> |
|
| 1761 | 1831 |
|
| 1762 | 1832 |
</header><!--// header 영역 --> |
--- src/main/webapp/WEB-INF/jsp/web/kakao/include/KaKaoAlimtalkTopMenuTap.jsp
+++ src/main/webapp/WEB-INF/jsp/web/kakao/include/KaKaoAlimtalkTopMenuTap.jsp
... | ... | @@ -142,10 +142,10 @@ |
| 142 | 142 |
|
| 143 | 143 |
<ul class="tabType4"> |
| 144 | 144 |
<li id="tabAt" class="tab topTab"><button type="button" onclick="javascript:fnLinkPageTopTab('tabAlim');">알림톡</button></li>
|
| 145 |
-<%-- <c:if test="${fn:contains(pageContext.request.requestURL , 'localhost') --%>
|
|
| 146 |
-<%-- || fn:contains(pageContext.request.requestURL , '119.193.215.98')}"> --%> |
|
| 147 |
-<!-- <li id="tabFt" class="tab topTab"><button type="button" onclick="javascript:fnLinkPageTopTab('tabFriend');">친구톡</button></li> -->
|
|
| 148 |
-<%-- </c:if> --%> |
|
| 145 |
+ <c:if test="${pageContext.request.serverName == 'localhost'
|
|
| 146 |
+ || pageContext.request.serverName == '119.193.215.98'}"> |
|
| 147 |
+ <li id="tabFt" class="tab topTab"><button type="button" onclick="javascript:fnLinkPageTopTab('tabFriend');">친구톡</button></li>
|
|
| 148 |
+ </c:if> |
|
| 149 | 149 |
<li id="tabConf" class="tab topTab"><button type="button" onclick="javascript:fnLinkPageTopTab('tabConf');">카카오톡 설정</button></li>
|
| 150 | 150 |
<li id="tabIntro" class="tab topTab"><button type="button" onclick="javascript:fnLinkPageTopTab('tabAlimtalkIntrd');">알림톡 소개</button></li>
|
| 151 | 151 |
</ul>(No newline at end of file) |
--- src/main/webapp/WEB-INF/jsp/web/kakao/include/KakaoSentTopMentTap.jsp
+++ src/main/webapp/WEB-INF/jsp/web/kakao/include/KakaoSentTopMentTap.jsp
... | ... | @@ -25,16 +25,23 @@ |
| 25 | 25 |
console.log('uri:', uri);
|
| 26 | 26 |
|
| 27 | 27 |
|
| 28 |
- if(uri.includes('selectMsgSentView')){
|
|
| 29 |
- $('.topTab').removeClass("active");
|
|
| 30 |
- $("#smsTab").addClass("active");
|
|
| 31 |
- }else if(uri.includes('selectKakaoSentView')){
|
|
| 32 |
- $('.topTab').removeClass("active");
|
|
| 33 |
- $("#kakaoTab").addClass("active");
|
|
| 34 |
- }else if(uri.includes('faxSendList')){
|
|
| 35 |
- $('.topTab').removeClass("active");
|
|
| 36 |
- $("#faxTab").addClass("active");
|
|
| 28 |
+ // URI 키워드와 해당 탭 ID를 매핑 |
|
| 29 |
+ const tabMapping = [ |
|
| 30 |
+ { keyword: 'selectMsgSentView', tabId: '#smsTab' }, // 'selectMsgSentView' 키워드를 '#smsTab'으로 매핑
|
|
| 31 |
+ { keyword: 'selectKakaoSentView', tabId: '#kakaoTab' }, // 'selectKakaoSentView' 키워드를 '#kakaoTab'으로 매핑
|
|
| 32 |
+ { keyword: 'faxSendList', tabId: '#faxTab' } // 'faxSendList' 키워드를 '#faxTab'으로 매핑
|
|
| 33 |
+ ]; |
|
| 34 |
+ |
|
| 35 |
+ // URI에 특정 키워드가 포함되어 있는지 확인하여 활성 탭 정보를 찾음 |
|
| 36 |
+ const activeTab = tabMapping.find(mapping => uri.includes(mapping.keyword)); // 'uri'에 키워드가 포함된 첫 번째 매핑을 검색 |
|
| 37 |
+ |
|
| 38 |
+ // 매칭된 탭이 있으면 UI를 업데이트하여 해당 탭을 활성화 |
|
| 39 |
+ if (activeTab) {
|
|
| 40 |
+ $('.topTab').removeClass("active"); // 모든 탭에서 "active" 클래스 제거
|
|
| 41 |
+ $(activeTab.tabId).addClass("active"); // 매핑된 탭 ID에 "active" 클래스 추가
|
|
| 37 | 42 |
} |
| 43 |
+ |
|
| 44 |
+ |
|
| 38 | 45 |
} |
| 39 | 46 |
|
| 40 | 47 |
function fnLinkPageTab(tabInfo){
|
--- src/main/webapp/WEB-INF/jsp/web/kakao/msgdata/at/KakaoAlimtalkMsgDataView.jsp
+++ src/main/webapp/WEB-INF/jsp/web/kakao/msgdata/at/KakaoAlimtalkMsgDataView.jsp
... | ... | @@ -7,15 +7,18 @@ |
| 7 | 7 |
|
| 8 | 8 |
<!-- <script src="/publish/js/content.js"></script> --> |
| 9 | 9 |
<!-- 주소록관련 js --> |
| 10 |
+ |
|
| 11 |
+ |
|
| 10 | 12 |
<script type="text/javascript" defer src="<c:out value='/js/kakao/at/init.js' />"></script> |
| 11 | 13 |
<script type="text/javascript" src="<c:out value='/js/kakao/at/tabulator.js' />"></script> |
| 12 | 14 |
<script type="text/javascript" src="<c:out value='/js/kakao/at/addr.js' />"></script> |
| 13 | 15 |
<script type="text/javascript" src="<c:out value='/js/kakao/at/alimtalkExcel.js' />"></script> |
| 14 | 16 |
<script type="text/javascript" src="<c:out value='/js/kakao/at/priceClclt.js' />"></script> |
| 15 | 17 |
<script type="text/javascript" src="<c:out value='/js/common/popup.js' />"></script> |
| 18 |
+<!-- 주소록 유효성 체크 공통유틸로 인해 추가 --> |
|
| 19 |
+<script type="text/javascript" src="<c:url value='/js/web/addr/cmn.js?date=202409021440'/>"></script> |
|
| 16 | 20 |
<script type="text/javascript"> |
| 17 | 21 |
var loginVO = '${loginVO}';
|
| 18 |
- |
|
| 19 | 22 |
// 체크박스 동적 바인딩 |
| 20 | 23 |
$(document).on('click','.wrap01C', function(){
|
| 21 | 24 |
var total = $(".wrap01C").length;
|
... | ... | @@ -87,28 +90,52 @@ |
| 87 | 90 |
|
| 88 | 91 |
//선택삭제 버튼 클릭 이벤트 |
| 89 | 92 |
$("#select_del").on('click', function(){
|
| 90 |
- |
|
| 91 |
- if($('.wrap01C:checkbox:checked').length < 1)
|
|
| 92 |
- {
|
|
| 93 |
- alert("삭제할 연락처를 선택해주세요.!!");
|
|
| 93 |
+ |
|
| 94 |
+ |
|
| 95 |
+ if(tableL == null || tableL == ""){
|
|
| 96 |
+ |
|
| 97 |
+ alert("받는사람을 추가해 주세요.");
|
|
| 94 | 98 |
return false; |
| 99 |
+ |
|
| 95 | 100 |
} |
| 96 | 101 |
|
| 97 |
- $('.wrap01C').each(function(index, item){
|
|
| 98 |
- if($(item).is(':checked'))
|
|
| 99 |
- $(item).parent().parent().remove(); |
|
| 100 |
- }); |
|
| 101 |
- updateTotCnt(); |
|
| 102 |
+ var selectedData = tableL.getSelectedRows(); |
|
| 103 |
+ |
|
| 104 |
+ if(selectedData == "" || selectedData == null){
|
|
| 105 |
+ |
|
| 106 |
+ alert("삭제할 연락처를 선택해주세요.");
|
|
| 107 |
+ return false; |
|
| 108 |
+ |
|
| 109 |
+ // 선택한 Row 데이터 삭제하기 |
|
| 110 |
+ }else if(confirm("선택하신 받는 사람을 삭제하시겠습니까?")){
|
|
| 111 |
+ |
|
| 112 |
+ // 선택 데이터 삭제 |
|
| 113 |
+ selectedData.forEach(row => row.delete()); |
|
| 114 |
+ |
|
| 115 |
+ |
|
| 116 |
+ totRows = tableL.getRows().length; |
|
| 117 |
+ updateTotCnt(totRows); |
|
| 118 |
+ |
|
| 119 |
+ var smsTxtArea = $('#smsTxtArea').val();
|
|
| 120 |
+ |
|
| 121 |
+ //일괄변환 문구 결제금액 처리 |
|
| 122 |
+ |
|
| 123 |
+ } |
|
| 124 |
+ |
|
| 102 | 125 |
}); |
| 103 | 126 |
|
| 104 | 127 |
//선택삭제 버튼 클릭 이벤트 |
| 105 | 128 |
$("#all_del").on('click', function(){
|
| 106 |
- |
|
| 129 |
+ |
|
| 130 |
+ |
|
| 107 | 131 |
if(!confirm("받는사람 목록을 모두 삭제하시겠습니까?"))
|
| 108 | 132 |
return false; |
| 109 | 133 |
|
| 110 | 134 |
$('#wrap01_body .list_body').remove();
|
| 111 | 135 |
|
| 136 |
+ tableL.clearData(); |
|
| 137 |
+ |
|
| 138 |
+ |
|
| 112 | 139 |
$('#rowTotCnt').text(0);
|
| 113 | 140 |
$('#rowDupCnt').text(0);
|
| 114 | 141 |
}); |
... | ... | @@ -509,19 +536,13 @@ |
| 509 | 536 |
return false; |
| 510 | 537 |
} |
| 511 | 538 |
|
| 512 |
- //수신자 목록 체크 |
|
| 513 |
- if($('.phoneArea').length < 1)
|
|
| 514 |
- {
|
|
| 515 |
- alert('받는 사람 입력 후 발송해 주세요');
|
|
| 516 |
- return false; |
|
| 517 |
- } |
|
| 518 | 539 |
|
| 519 | 540 |
//수신자 목록 체크 |
| 520 |
- if($('.phoneArea').length > 500)
|
|
| 541 |
+ /* if($('.phoneArea').length > 500)
|
|
| 521 | 542 |
{
|
| 522 | 543 |
alert("최대 발송 건수는 500건 입니다.");
|
| 523 | 544 |
return false; |
| 524 |
- } |
|
| 545 |
+ } */ |
|
| 525 | 546 |
|
| 526 | 547 |
|
| 527 | 548 |
if($('#errorChk').val() === 'N'
|
... | ... | @@ -550,7 +571,7 @@ |
| 550 | 571 |
|
| 551 | 572 |
// 초기화 |
| 552 | 573 |
$('.varValList').remove();
|
| 553 |
- $('#bizForm #varNmList').val('');
|
|
| 574 |
+// $('#bizForm #varNmList').val('');
|
|
| 554 | 575 |
|
| 555 | 576 |
|
| 556 | 577 |
// 대체문자 전송 확인 |
... | ... | @@ -613,133 +634,225 @@ |
| 613 | 634 |
}else{
|
| 614 | 635 |
$('#bizForm #reqDate').val("");
|
| 615 | 636 |
} |
| 616 |
- |
|
| 637 |
+ |
|
| 638 |
+ var dataList = []; |
|
| 617 | 639 |
// 치환문자 있는 데이터 파씽 |
| 618 | 640 |
if($('#bizForm #txtReplYn').val() === 'Y'){
|
| 619 |
- fn_excelDataTransParsing(); |
|
| 641 |
+ // fn_excelDataTransParsing(); |
|
| 620 | 642 |
// 치환문자 있는 수신자 리스트 |
| 621 |
- fn_transCallToListParsing(); |
|
| 643 |
+ dataList = fn_transCallToListParsing(); |
|
| 622 | 644 |
}else{
|
| 623 |
- // 치환문자 없는 수신자 리스트 |
|
| 624 |
- fn_callToListParsing(); |
|
| 645 |
+ // 치환문자 없는 수신자 리스트 |
|
| 646 |
+ dataList = fn_callToListParsing(); |
|
| 625 | 647 |
} |
| 626 | 648 |
|
| 627 |
- $('#bizForm #senderKey').val($('#selectKakaoProfileList').val());
|
|
| 628 |
- $('#bizForm #templateCode').val($('#selectTemplateList').val());
|
|
| 629 | 649 |
|
| 650 |
+ |
|
| 651 |
+ //수신자 목록 체크 |
|
| 652 |
+ if(dataList.length < 1) |
|
| 653 |
+ {
|
|
| 654 |
+ alert('받는 사람 입력 후 발송해 주세요');
|
|
| 655 |
+ return false; |
|
| 656 |
+ } |
|
| 657 |
+ |
|
| 658 |
+ |
|
| 659 |
+ // 채널 ID |
|
| 660 |
+ $('#bizForm #senderKey').val($('#selectKakaoProfileList').val());
|
|
| 661 |
+ // 채널 > 템플릿 |
|
| 662 |
+ $('#bizForm #templateCode').val($('#selectTemplateList').val());
|
|
| 630 | 663 |
// 발신번호 |
| 631 | 664 |
$('#bizForm #callFrom').val(removeDash($('#callFromList option:selected').val()));
|
| 632 | 665 |
|
| 633 |
- if(confirm("알림톡을 발송하시겠습니까?")){
|
|
| 634 |
- var spamChk = true; |
|
| 635 |
- //2023.09.06 알림톡 스팸체크 기능 제거요청으로 인한 주석처리 |
|
| 636 |
- /*var spamChk = false; |
|
| 637 |
- var spmData = new FormData(document.bizForm); |
|
| 638 |
- $.ajax({
|
|
| 639 |
- type: "POST" |
|
| 640 |
- , url: "/web/mjon/alimtalk/selectSpamKakaoAlimtalkMsgChkAjax.do" |
|
| 641 |
- , data: spmData |
|
| 642 |
- , dataType:'json' |
|
| 643 |
- , async: false |
|
| 644 |
- , processData: false |
|
| 645 |
- , contentType: false |
|
| 646 |
- , cache: false |
|
| 647 |
- , success: function (returnData, status) {
|
|
| 648 |
- if(status == 'success'){ // status 확인 필요한가. 석세스 안뜨면 에러 가지 않나
|
|
| 649 |
- |
|
| 650 |
- if("fail" == returnData.result){
|
|
| 651 |
- alert(returnData.message); |
|
| 652 |
- return false; |
|
| 653 |
- }else if("loginFail" == returnData.result){
|
|
| 654 |
- alert(returnData.message); |
|
| 655 |
- return false; |
|
| 656 |
- }else if("spams" == returnData.result){
|
|
| 657 |
- alert("전송 내용에 스팸문구가 포함되어 있습니다.")
|
|
| 658 |
- return false; |
|
| 659 |
- }else{
|
|
| 660 |
- spamChk = true; |
|
| 661 |
- return false; |
|
| 662 |
- } |
|
| 663 |
- |
|
| 664 |
- } else if(status== 'fail'){
|
|
| 665 |
- alert(returnData.message); |
|
| 666 |
- return false; |
|
| 667 |
- } |
|
| 668 |
- } |
|
| 669 |
- , error: function (e) {
|
|
| 670 |
- alert("문자 발송에 실패하였습니다.");
|
|
| 671 |
- console.log("ERROR : ", e);
|
|
| 672 |
- return false; |
|
| 673 |
- } |
|
| 674 |
- }); */ |
|
| 675 |
- |
|
| 676 |
- if(spamChk){
|
|
| 677 |
- var data = new FormData(document.bizForm); |
|
| 678 |
- $.ajax({
|
|
| 679 |
- type: "POST" |
|
| 680 |
- , url: "/web/mjon/kakao/alimtalk/kakaoAlimTalkMsgSendAjax.do" |
|
| 681 |
- , data: data |
|
| 682 |
- , dataType: 'json' |
|
| 683 |
- , async: true |
|
| 684 |
- , processData: false |
|
| 685 |
- , contentType: false |
|
| 686 |
- , cache: false |
|
| 687 |
- , success: function (returnData, status) {
|
|
| 688 |
- if(status == 'success'){
|
|
| 689 |
- if("loginFail" == returnData.result){
|
|
| 690 |
- |
|
| 691 |
- alert(returnData.message); |
|
| 692 |
- return false; |
|
| 693 |
- |
|
| 694 |
- }else if('fail' == returnData.result){
|
|
| 695 |
- |
|
| 696 |
- alert(returnData.message); |
|
| 697 |
- return false; |
|
| 698 |
- |
|
| 699 |
- }else if('authFail' == returnData.result){
|
|
| 700 |
- |
|
| 701 |
- alert(returnData.message); |
|
| 702 |
- location.reload(); |
|
| 703 |
- |
|
| 704 |
- } else if(status == 'success'){
|
|
| 705 |
- |
|
| 706 |
- var kakaoSendCnt = returnData.resultSts; |
|
| 707 |
- |
|
| 708 |
- $('.pop_msg_success').css({'display':'block','opacity':'1','left':'50%','top':'50%','transform':'translate(-50%,-50%)'});
|
|
| 709 |
- |
|
| 710 |
- //예약발송 건의 경우 결과 팝업 문구 변경 |
|
| 711 |
- if(reserYn == 'Y'){
|
|
| 712 |
- $('.pop_msg_success .msg_text').html("예약 성공 : <strong>"+ kakaoSendCnt + "</strong>건의<br>알림톡이 예약 되었습니다.");
|
|
| 713 |
- }else{
|
|
| 714 |
- $('.pop_msg_success .msg_text').html("발송 성공 : <strong>"+ kakaoSendCnt + "</strong>건의<br>알림톡이 발송 되었습니다.");
|
|
| 715 |
- } |
|
| 716 |
- |
|
| 717 |
- $('.mask').addClass('on');
|
|
| 718 |
- } |
|
| 719 |
- } |
|
| 720 |
- } |
|
| 721 |
- ,beforeSend : function(xmlHttpRequest) {
|
|
| 722 |
- //로딩창 show |
|
| 723 |
- $('.loading_layer').addClass('active');
|
|
| 724 |
- } |
|
| 725 |
- ,complete : function(xhr, textStatus) {
|
|
| 726 |
- //로딩창 hide |
|
| 727 |
- $('.loading_layer').removeClass('active');
|
|
| 728 |
- } |
|
| 729 |
- ,error: function (e) {
|
|
| 730 |
- console.log("ERROR : ", e);
|
|
| 731 |
- alert("카카오 알림톡 전송에 실패하였습니다.");
|
|
| 732 |
- } |
|
| 733 |
- }); |
|
| 666 |
+ // 폼 데이터를 배열로 직렬화 |
|
| 667 |
+ var form = $('#bizForm');
|
|
| 668 |
+ var formDataArray = form.serializeArray(); |
|
| 669 |
+ |
|
| 670 |
+ // 배열을 객체로 변환 |
|
| 671 |
+ var formData = {};
|
|
| 672 |
+ $.each(formDataArray, function(index, field) {
|
|
| 673 |
+ formData[field.name] = field.value; |
|
| 674 |
+ }); |
|
| 675 |
+ |
|
| 676 |
+ // 빈 값 제거 (참고 코드 기반) |
|
| 677 |
+ for (var key in formData) {
|
|
| 678 |
+ if (formData[key] === '' || formData[key] === null || formData[key] === undefined) {
|
|
| 679 |
+ delete formData[key]; |
|
| 734 | 680 |
} |
| 735 | 681 |
} |
| 682 |
+ |
|
| 683 |
+// delete formData['varNmList']; |
|
| 684 |
+ |
|
| 685 |
+ // 선택된 데이터 추가 (varListMap) |
|
| 686 |
+ formData["varListMap"] = dataList; |
|
| 687 |
+ console.log('formData : ', formData);
|
|
| 688 |
+ |
|
| 689 |
+ if(confirm("알림톡을 발송하시겠습니까?")){
|
|
| 690 |
+ |
|
| 691 |
+ // 프로그래스파 시간을 위한 계산 |
|
| 692 |
+ var estimtedTime = calculateEstimatedTime(dataList.length); |
|
| 693 |
+ |
|
| 694 |
+ $.ajax({
|
|
| 695 |
+ type: "POST", |
|
| 696 |
+ url: "/web/mjon/kakao/alimtalk/kakaoAlimTalkMsgSendAjax_advc.do", |
|
| 697 |
+ data: JSON.stringify(formData), |
|
| 698 |
+ contentType: 'application/json', |
|
| 699 |
+ dataType: 'json', |
|
| 700 |
+ success: function (data) {
|
|
| 701 |
+ console.log('data : ', data);
|
|
| 702 |
+ |
|
| 703 |
+ var status = data.status; |
|
| 704 |
+ if("OK" == status){
|
|
| 705 |
+ var resultSts = data.object.resultSts; |
|
| 706 |
+ var reserYn = data.object.reserYn; |
|
| 707 |
+ var resText = (reserYn === 'Y') ? '예약' : '발송'; |
|
| 708 |
+ |
|
| 709 |
+ $('.pop_msg_success').css({'display':'block','opacity':'1','left':'50%','top':'50%','transform':'translate(-50%,-50%)'});
|
|
| 710 |
+ $('.pop_msg_success .msg_text').html(resText+" 성공 : <strong>"+ resultSts + "</strong>건의<br>알림톡이 " + resText + " 되었습니다.");
|
|
| 711 |
+ |
|
| 712 |
+ }else if("UNAUTHORIZED" == status){
|
|
| 713 |
+ alert(data.message); |
|
| 714 |
+ location.reload(); |
|
| 715 |
+ }else{
|
|
| 716 |
+ alert(data.message); |
|
| 717 |
+ return false; |
|
| 718 |
+ } |
|
| 719 |
+ |
|
| 720 |
+ |
|
| 721 |
+// if(data == 'success'){
|
|
| 722 |
+ /* if("loginFail" == returnData.result){
|
|
| 723 |
+ |
|
| 724 |
+ alert(returnData.message); |
|
| 725 |
+ return false; |
|
| 726 |
+ |
|
| 727 |
+ }else if('fail' == returnData.result){
|
|
| 728 |
+ |
|
| 729 |
+ alert(returnData.message); |
|
| 730 |
+ return false; |
|
| 731 |
+ |
|
| 732 |
+ }else if('authFail' == returnData.result){
|
|
| 733 |
+ |
|
| 734 |
+ alert(returnData.message); |
|
| 735 |
+ location.reload(); |
|
| 736 |
+ |
|
| 737 |
+ } else if(status == 'success'){
|
|
| 738 |
+ |
|
| 739 |
+ var kakaoSendCnt = returnData.resultSts; |
|
| 740 |
+ |
|
| 741 |
+ $('.pop_msg_success').css({'display':'block','opacity':'1','left':'50%','top':'50%','transform':'translate(-50%,-50%)'});
|
|
| 742 |
+ |
|
| 743 |
+ //예약발송 건의 경우 결과 팝업 문구 변경 |
|
| 744 |
+ if(reserYn == 'Y'){
|
|
| 745 |
+ $('.pop_msg_success .msg_text').html("예약 성공 : <strong>"+ kakaoSendCnt + "</strong>건의<br>알림톡이 예약 되었습니다.");
|
|
| 746 |
+ }else{
|
|
| 747 |
+ $('.pop_msg_success .msg_text').html("발송 성공 : <strong>"+ kakaoSendCnt + "</strong>건의<br>알림톡이 발송 되었습니다.");
|
|
| 748 |
+ } |
|
| 749 |
+ |
|
| 750 |
+ $('.mask').addClass('on');
|
|
| 751 |
+ } */ |
|
| 752 |
+// } |
|
| 753 |
+ } |
|
| 754 |
+ ,beforeSend : function(xmlHttpRequest) {
|
|
| 755 |
+ //로딩창 show |
|
| 756 |
+// $('.loading_layer').addClass('active');
|
|
| 757 |
+ // 프로그래스 바 실행 |
|
| 758 |
+ progressStart(estimtedTime); |
|
| 759 |
+ } |
|
| 760 |
+ ,complete : function(xhr, textStatus) {
|
|
| 761 |
+ //로딩창 hide |
|
| 762 |
+// $('.loading_layer').removeClass('active');
|
|
| 763 |
+ |
|
| 764 |
+ // 프로그래스 바 종료 |
|
| 765 |
+ progressComplete();; |
|
| 766 |
+ } |
|
| 767 |
+ ,error: function (e) {
|
|
| 768 |
+ console.log("ERROR : ", e);
|
|
| 769 |
+ alert("카카오 알림톡 전송에 실패하였습니다.");
|
|
| 770 |
+ } |
|
| 771 |
+ }); |
|
| 772 |
+ } |
|
| 773 |
+} |
|
| 774 |
+//선택된 데이터의 길이에 따라 예상 시간 계산 함수 |
|
| 775 |
+function calculateEstimatedTime(selectedCount) {
|
|
| 776 |
+ //기준값 |
|
| 777 |
+ // const processTimePerBatch = 130; // 130초 |
|
| 778 |
+ |
|
| 779 |
+ |
|
| 780 |
+ // 30만건 기준 10분으로 기준을 잡아서 |
|
| 781 |
+ // 시간계산함 |
|
| 782 |
+ const processTimePerBatch = 600; |
|
| 783 |
+ const batchSize = 300000; |
|
| 784 |
+ |
|
| 785 |
+ // 1건당 처리 시간 |
|
| 786 |
+ const timePerRecord = processTimePerBatch / batchSize; |
|
| 787 |
+ |
|
| 788 |
+ // 예상 시간 계산 |
|
| 789 |
+ const estimatedTimeInSeconds = selectedCount * timePerRecord; |
|
| 790 |
+ |
|
| 791 |
+ return estimatedTimeInSeconds.toFixed(2); |
|
| 792 |
+} |
|
| 793 |
+ |
|
| 794 |
+ |
|
| 795 |
+//프로그레스바 |
|
| 796 |
+var start, change; |
|
| 797 |
+var progressInterval = null; // 전역 변수로 타이머 ID 관리 |
|
| 798 |
+function progressStart(time) {
|
|
| 799 |
+ // 기존 타이머 정지 및 초기화 |
|
| 800 |
+ if (progressInterval !== null) {
|
|
| 801 |
+ clearInterval(progressInterval); // 이전 타이머 정지 |
|
| 802 |
+ progressInterval = null; // 타이머 ID 초기화 |
|
| 803 |
+ } |
|
| 804 |
+ resetProgressBar(); // 프로그레스바 초기화 |
|
| 805 |
+ |
|
| 806 |
+ // 프로그레스바 보이기 |
|
| 807 |
+ $(".progress_bar_wrap").css("display", "flex");
|
|
| 808 |
+ |
|
| 809 |
+ // 프로그레스바 요소 가져오기 |
|
| 810 |
+ var timeText = document.querySelector(".time_text");
|
|
| 811 |
+ var bar = document.querySelector(".change_bar");
|
|
| 812 |
+ |
|
| 813 |
+ // 초기 상태 설정 |
|
| 814 |
+ var width = 1; |
|
| 815 |
+ var totalTime = time * 1000; // 총 실행 시간 (밀리초) |
|
| 816 |
+ var cmpWid = totalTime / 100; // width 증가 간격 (밀리초) |
|
| 817 |
+ |
|
| 818 |
+ // 새 타이머 시작 |
|
| 819 |
+ progressInterval = setInterval(changeWidth, cmpWid); |
|
| 820 |
+ |
|
| 821 |
+ function changeWidth() {
|
|
| 822 |
+ if (width >= 100) {
|
|
| 823 |
+ // 프로그레스바 100% 도달 |
|
| 824 |
+ clearInterval(progressInterval); // 타이머 종료 |
|
| 825 |
+ progressInterval = null; // 타이머 ID 초기화 |
|
| 826 |
+ |
|
| 827 |
+ timeText.innerHTML = "100%"; |
|
| 828 |
+ |
|
| 829 |
+ setTimeout(function () {
|
|
| 830 |
+ // 100% 표시 후 "잠시만 기다려주세요" 변경 |
|
| 831 |
+ timeText.innerHTML = "잠시만 기다려주세요..."; |
|
| 832 |
+ $(".time_text").addClass("animation");
|
|
| 833 |
+ }, 1000); |
|
| 834 |
+ } else {
|
|
| 835 |
+ // 프로그레스바 진행 |
|
| 836 |
+ width++; |
|
| 837 |
+ bar.style.width = width + "%"; |
|
| 838 |
+ timeText.innerHTML = width + "%"; |
|
| 839 |
+ } |
|
| 840 |
+ } |
|
| 841 |
+} |
|
| 842 |
+ |
|
| 843 |
+ |
|
| 844 |
+//프로그레스바 완료 |
|
| 845 |
+function progressComplete() {
|
|
| 846 |
+ // var width = parseInt($(".time_text").text().replace('%', '')) || 0; // 현재 width 가져오기
|
|
| 847 |
+ |
|
| 848 |
+ $(".progress_bar_wrap").hide();
|
|
| 736 | 849 |
} |
| 737 | 850 |
|
| 738 | 851 |
/* |
| 739 | 852 |
* 치환문자 있는 수신자 목록 파씽 |
| 740 | 853 |
*/ |
| 741 | 854 |
function fn_transCallToListParsing(){
|
| 742 |
- var callToList = []; |
|
| 855 |
+/* var callToList = []; |
|
| 743 | 856 |
// excel body |
| 744 | 857 |
$('.excelBody').each(function(indexBody, itemBody){
|
| 745 | 858 |
$(itemBody).find('.list_table_name').each(function(indexRow, itemRow){
|
... | ... | @@ -750,7 +863,31 @@ |
| 750 | 863 |
}); |
| 751 | 864 |
}); |
| 752 | 865 |
$('#bizForm #callToList').val(callToList);
|
| 866 |
+ */ |
|
| 753 | 867 |
|
| 868 |
+ var dataList = []; |
|
| 869 |
+ |
|
| 870 |
+ var headers = []; |
|
| 871 |
+ $('#excelHead .list_table_name').each(function() {
|
|
| 872 |
+ headers.push($(this).text().trim()); |
|
| 873 |
+ }); |
|
| 874 |
+ |
|
| 875 |
+ $('.excelBody').each(function() {
|
|
| 876 |
+ var row = {};
|
|
| 877 |
+ $(this).find('.list_table_name').each(function(index) {
|
|
| 878 |
+ var key = headers[index]; |
|
| 879 |
+ var value = $(this).text().trim(); |
|
| 880 |
+ if (index === 0) {
|
|
| 881 |
+ row["callToList"] = value; // 수신번호는 별도로 처리 |
|
| 882 |
+ } else {
|
|
| 883 |
+ row[key] = value; // |
|
| 884 |
+ } |
|
| 885 |
+ }); |
|
| 886 |
+ console.log(row) |
|
| 887 |
+ dataList.push(row); |
|
| 888 |
+ }); |
|
| 889 |
+ |
|
| 890 |
+ return dataList; |
|
| 754 | 891 |
} |
| 755 | 892 |
|
| 756 | 893 |
/* |
... | ... | @@ -758,13 +895,28 @@ |
| 758 | 895 |
*/ |
| 759 | 896 |
function fn_callToListParsing(){
|
| 760 | 897 |
|
| 761 |
- var callToList = []; |
|
| 762 |
- // excel body |
|
| 763 |
- $('.phoneArea').each(function(index, item){
|
|
| 764 |
- callToList.push($(item).text().replaceAll('\\t', ''));
|
|
| 898 |
+ var dataList = []; |
|
| 899 |
+ |
|
| 900 |
+/* $('.phoneArea').each(function(index, item){
|
|
| 901 |
+ var row = {};
|
|
| 902 |
+ var value = $(item).text().replaceAll('\\t', '')
|
|
| 903 |
+ row["callToList"] = value; // 수신번호는 별도로 처리 |
|
| 904 |
+ dataList.push(row); |
|
| 905 |
+ }); |
|
| 906 |
+ */ |
|
| 907 |
+ |
|
| 908 |
+ // Tabulator 테이블의 데이터 가져오기 |
|
| 909 |
+ var tableData = tableL.getData(); |
|
| 910 |
+ |
|
| 911 |
+ tableData.forEach(function(row){
|
|
| 912 |
+ var dataRow = {};
|
|
| 913 |
+ dataRow["callToList"] = row.phone; // phone 필드 값을 callToList로 저장 |
|
| 914 |
+ dataList.push(dataRow); |
|
| 765 | 915 |
}); |
| 766 | 916 |
|
| 767 |
- $('#bizForm #callToList').val(callToList);
|
|
| 917 |
+ return dataList; |
|
| 918 |
+ |
|
| 919 |
+ |
|
| 768 | 920 |
|
| 769 | 921 |
} |
| 770 | 922 |
|
... | ... | @@ -777,9 +929,8 @@ |
| 777 | 929 |
// title 배열 |
| 778 | 930 |
var varHead = []; |
| 779 | 931 |
// 값 배열 |
| 780 |
- var varVal = []; |
|
| 932 |
+// var varVal = []; |
|
| 781 | 933 |
|
| 782 |
- var inputTag = '<input type="hidden" class="varValList" name="varValList[$INDEX$]" value="$VAL$">'; |
|
| 783 | 934 |
|
| 784 | 935 |
// excel title |
| 785 | 936 |
$('#excelHead').find('div').each(function(index, item){
|
... | ... | @@ -803,7 +954,7 @@ |
| 803 | 954 |
$("#bizForm").append(inputTag.replace('$VAL$',varValTemp ).replace('$INDEX$',index ));
|
| 804 | 955 |
}); */ |
| 805 | 956 |
|
| 806 |
- $('.excelBody').each(function(index, item){
|
|
| 957 |
+/* $('.excelBody').each(function(index, item){
|
|
| 807 | 958 |
|
| 808 | 959 |
var valLeng = $('#excelHead').find('.list_table_name').length-1;
|
| 809 | 960 |
varValTemp = ''; |
... | ... | @@ -821,7 +972,7 @@ |
| 821 | 972 |
console.log('varValTemp : ',varValTemp);
|
| 822 | 973 |
varVal.push(varValTemp); |
| 823 | 974 |
}); |
| 824 |
- $('#bizForm #varValList').val(varVal);
|
|
| 975 |
+ $('#bizForm #varValList').val(varVal); */
|
|
| 825 | 976 |
} |
| 826 | 977 |
|
| 827 | 978 |
|
... | ... | @@ -881,9 +1032,9 @@ |
| 881 | 1032 |
$('#smsLen').val(conLeng);
|
| 882 | 1033 |
|
| 883 | 1034 |
|
| 1035 |
+ $('#msgLeng').html(conLeng + " / ");
|
|
| 884 | 1036 |
if(conLeng > 90){
|
| 885 | 1037 |
|
| 886 |
- $('#msgLeng').html(conLeng + " / ");
|
|
| 887 | 1038 |
$('#limitLeng').html("2000");
|
| 888 | 1039 |
$('.msg_com').html("장문");
|
| 889 | 1040 |
$('#msgType').val("6"); // 메세지 타입 설정
|
... | ... | @@ -897,7 +1048,6 @@ |
| 897 | 1048 |
|
| 898 | 1049 |
}else{
|
| 899 | 1050 |
|
| 900 |
- $('#msgLeng').html(conLeng + " / ");
|
|
| 901 | 1051 |
$('#limitLeng').html("90");
|
| 902 | 1052 |
$('.msg_com').html("단문");
|
| 903 | 1053 |
$('#msgType').val("4"); // 메세지 타입 설정
|
... | ... | @@ -910,7 +1060,7 @@ |
| 910 | 1060 |
} |
| 911 | 1061 |
|
| 912 | 1062 |
//수신목록 전체 데이터 갯수 구하기 |
| 913 |
- updateTotCnt(totRows); |
|
| 1063 |
+ //updateTotCnt(totRows); |
|
| 914 | 1064 |
} |
| 915 | 1065 |
|
| 916 | 1066 |
/** |
... | ... | @@ -1076,6 +1226,62 @@ |
| 1076 | 1226 |
return true; |
| 1077 | 1227 |
} |
| 1078 | 1228 |
|
| 1229 |
+//재전송 스크립트 수정 |
|
| 1230 |
+$(window).on('load', function() {
|
|
| 1231 |
+ if(${msgResendAllFlag eq 'Y'}) {
|
|
| 1232 |
+ // 채널 ID 및 템플릿 선택 코드는 유지 |
|
| 1233 |
+ $("#selectKakaoProfileList option").filter(function() {
|
|
| 1234 |
+ return $(this).text() === '${kakaoVO.msgResendAllYellowId}';
|
|
| 1235 |
+ }).prop('selected', true).parent().trigger("click");
|
|
| 1236 |
+ |
|
| 1237 |
+ // 템플릿 선택 |
|
| 1238 |
+ $("#selectTemplateList option").remove();
|
|
| 1239 |
+ selectTemplateList(); |
|
| 1240 |
+ $("#selectTemplateList").val("${kakaoVO.msgResendAllTmpKey}");
|
|
| 1241 |
+ selectTemplateInfo("${kakaoVO.msgResendAllTmpKey}");
|
|
| 1242 |
+ fn_viewDataInit02(); |
|
| 1243 |
+ priceInit(); |
|
| 1244 |
+ |
|
| 1245 |
+ try {
|
|
| 1246 |
+ // JSON 파싱 |
|
| 1247 |
+ var resendListObj = JSON.parse('${resendListJson}');
|
|
| 1248 |
+ var listCnt = resendListObj.length; |
|
| 1249 |
+ |
|
| 1250 |
+ // 중복 제거 - Set 사용 |
|
| 1251 |
+ var uniquePhones = new Set(); |
|
| 1252 |
+ var uniqueResendList = []; |
|
| 1253 |
+ |
|
| 1254 |
+ // 중복 제거 로직 |
|
| 1255 |
+ for(var i = 0; i < resendListObj.length; i++) {
|
|
| 1256 |
+ var phone = removeDash(resendListObj[i].callTo); |
|
| 1257 |
+ if(!uniquePhones.has(phone)) {
|
|
| 1258 |
+ uniquePhones.add(phone); |
|
| 1259 |
+ uniqueResendList.push(resendListObj[i]); |
|
| 1260 |
+ } |
|
| 1261 |
+ } |
|
| 1262 |
+ |
|
| 1263 |
+ |
|
| 1264 |
+ // 중복 제거된 데이터로 처리 |
|
| 1265 |
+ for(var i = 0; i < uniqueResendList.length; i++) {
|
|
| 1266 |
+ var phoneNumber = removeDash(uniqueResendList[i].callTo); |
|
| 1267 |
+ |
|
| 1268 |
+ // callTo 입력 필드에 값 설정 후 번호추가 버튼 클릭 |
|
| 1269 |
+ $("#callTo").val(phoneNumber);
|
|
| 1270 |
+ $(".addCallToF").trigger("click");
|
|
| 1271 |
+ |
|
| 1272 |
+ } |
|
| 1273 |
+ |
|
| 1274 |
+ // 총 건수 확인 |
|
| 1275 |
+ setTimeout(function() {
|
|
| 1276 |
+ updateTotCnt(); |
|
| 1277 |
+ }, 500); |
|
| 1278 |
+ |
|
| 1279 |
+ } catch(e) {
|
|
| 1280 |
+ console.error("재전송 데이터 처리 오류:", e);
|
|
| 1281 |
+ } |
|
| 1282 |
+ } |
|
| 1283 |
+}); |
|
| 1284 |
+ |
|
| 1079 | 1285 |
</script> |
| 1080 | 1286 |
|
| 1081 | 1287 |
<div class="loading_layer"> |
... | ... | @@ -1085,6 +1291,17 @@ |
| 1085 | 1291 |
</div> |
| 1086 | 1292 |
</div> |
| 1087 | 1293 |
|
| 1294 |
+ <div class="progress_bar_wrap"> |
|
| 1295 |
+ <div class="progress_box"> |
|
| 1296 |
+ <p class="time_text">0%</p> |
|
| 1297 |
+ <div class="bar"> |
|
| 1298 |
+ <span class="change_bar"></span> |
|
| 1299 |
+ </div> |
|
| 1300 |
+ </div> |
|
| 1301 |
+ <div class="btn_wrap"> |
|
| 1302 |
+ </div> |
|
| 1303 |
+ |
|
| 1304 |
+ </div> |
|
| 1088 | 1305 |
<!-- 기업회원 이동 팝업 --> |
| 1089 | 1306 |
<div class="tooltip-wrap cvt_member_popup_wrap"> |
| 1090 | 1307 |
<div class="popup-com cvt_member_layer" tabindex="0" data-tooltip-con="cvt_member_layer" data-focus="cvt_member_layer" data-focus-prev="cvt_member_layer-close"> |
... | ... | @@ -1136,8 +1353,8 @@ |
| 1136 | 1353 |
<input type="hidden" id="divideTime" name="divideTime" value=""> <!--전송일자--> |
| 1137 | 1354 |
|
| 1138 | 1355 |
<input type="hidden" id="callFrom" name="callFrom" value=""> <!--완 보내는사람 --> |
| 1139 |
- <input type="hidden" id="callToList" name="callToList" value=""> <!--완 받는사람 리스트--> |
|
| 1140 |
- <input type="hidden" id="varNmList" name="varNmList" value=""> <!--완 변수 이름 리스트--> |
|
| 1356 |
+<!-- <input type="hidden" id="callToList" name="callToList" value=""> 완 받는사람 리스트 --> |
|
| 1357 |
+<!-- <input type="hidden" id="varNmList" name="varNmList" value=""> 완 변수 이름 리스트 --> |
|
| 1141 | 1358 |
<input type="hidden" id="varValList" name="varValList" value=""> <!--완 변수 리스트--> |
| 1142 | 1359 |
|
| 1143 | 1360 |
<input type="hidden" id="atSmishingYn" name="atSmishingYn" value="${atSmishingYn}"> <!--알림톡 스미싱 여부-->
|
... | ... | @@ -1298,32 +1515,32 @@ |
| 1298 | 1515 |
</span> |
| 1299 | 1516 |
</div> |
| 1300 | 1517 |
<div class="receipt_num_midde"> |
| 1301 |
- <div class="listType list01" > |
|
| 1302 |
- <div class="list_table list_head"> |
|
| 1518 |
+ <div class="listType list01 callList_box_P"> |
|
| 1519 |
+ <!-- <div class="list_table list_head"> |
|
| 1303 | 1520 |
<div class="cb_wrap"> |
| 1304 | 1521 |
<label for="select_all" class="label"></label> |
| 1305 | 1522 |
<input type="checkbox" id="select_all"> |
| 1306 | 1523 |
</div> |
| 1307 | 1524 |
<div class="list_table_num"> |
| 1308 | 1525 |
<p>휴대폰</p> |
| 1309 |
-<!-- <img src="/publish/images/sortUp.png"> --> |
|
| 1310 |
-<!-- <img src="/publish/images/sortDown.png"> --> |
|
| 1526 |
+ <img src="/publish/images/sortUp.png"> |
|
| 1527 |
+ <img src="/publish/images/sortDown.png"> |
|
| 1311 | 1528 |
</div> |
| 1312 |
-<!-- <div class="list_table_name"> --> |
|
| 1313 |
-<!-- <p>이름</p> --> |
|
| 1314 |
-<!-- <img src="/publish/images/sortUp.png"> --> |
|
| 1315 |
-<!-- <img src="/publish/images/sortDown.png"> --> |
|
| 1316 |
-<!-- </div> --> |
|
| 1529 |
+ <div class="list_table_name"> |
|
| 1530 |
+ <p>이름</p> |
|
| 1531 |
+ <img src="/publish/images/sortUp.png"> |
|
| 1532 |
+ <img src="/publish/images/sortDown.png"> |
|
| 1533 |
+ </div> |
|
| 1317 | 1534 |
</div> |
| 1318 | 1535 |
<div class="list_body_wrap" id="wrap01_body"> |
| 1319 |
- </div> |
|
| 1536 |
+ </div> --> |
|
| 1320 | 1537 |
</div> |
| 1321 | 1538 |
<div class="put_right"> |
| 1322 | 1539 |
<div class="btn_popup_wrap spc_wrap"> |
| 1323 | 1540 |
<button type="button" data-tooltip="popup06" class="btnType btnType7 popupAddr">주소록 불러오기</button> |
| 1324 | 1541 |
</div> |
| 1325 | 1542 |
<div class="btn_popup_wrap"> |
| 1326 |
- <button type="button" data-tooltip="popup02" class="btnType btnType7">엑셀 불러오기</button> |
|
| 1543 |
+ <button type="button" data-tooltip="popup07" class="btnType btnType7">엑셀 불러오기</button> |
|
| 1327 | 1544 |
</div> |
| 1328 | 1545 |
<div class="btn_popup_wrap"> |
| 1329 | 1546 |
<button type="button" data-tooltip="popup03" class="btnType btnType7 tab1">최근 전송내역</button> |
... | ... | @@ -1331,13 +1548,13 @@ |
| 1331 | 1548 |
<div class="btn_popup_wrap"> |
| 1332 | 1549 |
<button type="button" data-tooltip="popup03" class="btnType btnType7 tab2">자주보내는 번호</button> |
| 1333 | 1550 |
</div> |
| 1334 |
- <div class="btn_popup_wrap check_validity_wrap"> |
|
| 1551 |
+ <!-- <div class="btn_popup_wrap check_validity_wrap"> |
|
| 1335 | 1552 |
<button type="button" class="btnType btnType7" id="check_validity">오류검사 <i class="qmMark"></i></button> |
| 1336 | 1553 |
<div class="error_hover_cont send_hover_cont"> |
| 1337 | 1554 |
<p>휴대폰 번호 입력 시 해당 휴대폰 번호에 대한 형식이 어긋나거나 휴대폰 번호에 오류가 있는지 등을 검사하는 기능</p> |
| 1338 | 1555 |
<span>(예시) 010-1234-0001(O) / 010-123-0001(X)</span> |
| 1339 | 1556 |
</div> |
| 1340 |
- </div> |
|
| 1557 |
+ </div> --> |
|
| 1341 | 1558 |
</div> |
| 1342 | 1559 |
</div> |
| 1343 | 1560 |
<div class="list_bottom clearfix"> |
... | ... | @@ -1577,7 +1794,7 @@ |
| 1577 | 1794 |
|
| 1578 | 1795 |
<!-- 주소록 불러오기 --> |
| 1579 | 1796 |
<div class="tooltip-wrap"> |
| 1580 |
- <div class="popup-com import_layer popup06" tabindex="0" data-tooltip-con="popup06" data-focus="popup06" data-focus-prev="popup06-close" style="width: 1000px"> |
|
| 1797 |
+ <div class="popup-com import_layer popup06 adr_call_popup" tabindex="0" data-tooltip-con="popup06" data-focus="popup06" data-focus-prev="popup06-close" style="width: 1000px"> |
|
| 1581 | 1798 |
<div class="popup_heading"> |
| 1582 | 1799 |
<p><span>주소록 불러오기</p> |
| 1583 | 1800 |
<button type="button" onClick="javascript:addrClose(); return false;"> |
... | ... | @@ -1628,7 +1845,9 @@ |
| 1628 | 1845 |
<!--// table --> |
| 1629 | 1846 |
</div> |
| 1630 | 1847 |
<div class="popup_btn_wrap2"> |
| 1631 |
- <button type="button" onClick="javascript:addrToList(); return false;">추가</button> |
|
| 1848 |
+ <button type="button" onClick="javascript:addrToList_advc('all'); return false;">전체추가</button>
|
|
| 1849 |
+ <button type="button" onClick="javascript:addrToList_advc('select'); return false;">선택추가</button>
|
|
| 1850 |
+<!-- <button type="button" onClick="javascript:addrToList(); return false;">추가</button> --> |
|
| 1632 | 1851 |
<button type="button" onClick="javascript:addrClose(); return false;">닫기</button> |
| 1633 | 1852 |
</div> |
| 1634 | 1853 |
<%-- 주소록 레이어 팝업 닫기 실행 코드 --%> |
... | ... | @@ -1717,44 +1936,58 @@ |
| 1717 | 1936 |
|
| 1718 | 1937 |
|
| 1719 | 1938 |
|
| 1939 |
+<!-- <div class="popup-com import_layer popup07" tabindex="0" data-tooltip-con="popup07" data-focus="popup07" data-focus-prev="popup07-close"> --> |
|
| 1940 |
+<%-- <%@include file="/WEB-INF/jsp/web/kakao/msgdata/include/atDataIncludeExcel.jsp" %> --%> |
|
| 1941 |
+<!-- </div> --> |
|
| 1942 |
+ |
|
| 1720 | 1943 |
<!-- 엑셀 불러오기 --> |
| 1944 |
+ |
|
| 1721 | 1945 |
<form id="excelToolTipForm" name="excelToolTipForm" method="post"> |
| 1722 |
- <div class="tooltip-wrap"> |
|
| 1723 |
- <div class="popup-com import_layer popup02" tabindex="0" data-tooltip-con="popup02" data-focus="popup02" data-focus-prev="popup02-close"> |
|
| 1724 |
- <div class="popup_heading"> |
|
| 1725 |
- <p><span>엑셀</span> 불러오기</p> |
|
| 1726 |
- <button type="button" class="tooltip-close" data-focus="popup02-close"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> |
|
| 1727 |
- </div> |
|
| 1728 |
- <div class="layer_in"> |
|
| 1729 |
- <!-- 엑셀파일 불러오기 --> |
|
| 1730 |
- <div class="hascont"> |
|
| 1731 |
- <div class="titBox"> |
|
| 1732 |
- <p>- 최대 2만 건까지 등록할 수 있습니다.</p> |
|
| 1733 |
- <p>- [엑셀 불러오기]시 문서의 A, B열을 불러옵니다.(지원하는 파일 형식 : xls, xlsx)</p> |
|
| 1734 |
- <p>- 휴대폰 항목은 숫자, 하이픈(-)만 인식하며, 번호 앞에 0이 생략되어도 정상 등록됩니다. |
|
| 1735 |
- </p> |
|
| 1736 |
- <!-- <button type="button" class="excel_btn" onclick="location.href='/cmm/fms/FileDown.do?atchFileId=FILE_000000000011651&fileSn=1'"><i></i>샘플파일 다운로드</button> --> |
|
| 1737 |
- <button type="button" class="excel_btn" onclick="location.href='/download/msg/알림톡_엑셀주소록_등록양식.xlsx'"><i class="downroad"></i>샘플파일 다운로드</button> |
|
| 1738 |
- </div> |
|
| 1739 |
- <div class="attachedFile"> |
|
| 1740 |
- <label for="excelNm01" class="attachedFile_label">첨부파일</label> |
|
| 1741 |
- <input type="text" id="excelNm01" value="" readonly> |
|
| 1742 |
- <input type="file" id="excelFile01" accept=".xls, .xlsx" onchange="excelExportAjax(event); return false;" style="display:none"/> |
|
| 1743 |
- <!-- <input type="file" id="excelFile01" accept=".xls, .xlsx" onchange="excelExport01(event); return false;" style="display:none"/> --> |
|
| 1744 |
- <button type="button" class="btnType btnType6 c1">찾아보기</button> |
|
| 1745 |
-<!-- <p><span class="vMiddle">*</span> 첨부된 파일은 <span class="c_e40000">[추가]버튼을 클릭</span>하셔야 받는 사람에 등록됩니다.</p> --> |
|
| 1746 |
- <p><span class="vMiddle">*</span> 첨부된 파일은 <span class="c_e40000">[추가]버튼을 클릭</span>하셔야 받는 사람에 등록됩니다.</p> |
|
| 1747 |
- </div> |
|
| 1748 |
- </div><!--// 엑셀파일 불러오기 --> |
|
| 1749 |
- <div class="popup_btn_wrap2"> |
|
| 1750 |
- <button type="button" class="tooltip-close" data-focus="popup02-close" data-focus-next="popup02" onclick="excelAddAjax()">추가</button> |
|
| 1751 |
- <!-- <button type="button" class="tooltip-close" data-focus="popup02-close" data-focus-next="popup02" onclick="excelAdd()">추가</button> --> |
|
| 1752 |
- <button type="button" class="tooltip-close" data-focus="popup02-close" data-focus-next="popup02">닫기</button> |
|
| 1753 |
- </div> |
|
| 1754 |
- </div> |
|
| 1755 |
- </div> |
|
| 1756 |
- </div><!--// 엑셀 불러오기 --> |
|
| 1946 |
+ <div class="tooltip-wrap"> |
|
| 1947 |
+ <div class="popup-com import_layer popup07" tabindex="0" data-tooltip-con="popup07" data-focus="popup07" data-focus-prev="popup07-close"> |
|
| 1948 |
+ |
|
| 1949 |
+ <%@include file="/WEB-INF/jsp/web/kakao/msgdata/include/atDataIncludeExcel.jsp" %> |
|
| 1950 |
+ </div> |
|
| 1951 |
+ </div> |
|
| 1757 | 1952 |
</form> |
| 1953 |
+<!-- 엑셀 불러오기 --> |
|
| 1954 |
+<!-- <form id="excelToolTipForm" name="excelToolTipForm" method="post"> |
|
| 1955 |
+ <div class="tooltip-wrap"> |
|
| 1956 |
+ <div class="popup-com import_layer popup07" tabindex="0" data-tooltip-con="popup07" data-focus="popup07" data-focus-prev="popup07-close"> |
|
| 1957 |
+ |
|
| 1958 |
+ |
|
| 1959 |
+ <div class="popup_heading"> |
|
| 1960 |
+ <p><span>엑셀</span> 불러오기</p> |
|
| 1961 |
+ <button type="button" class="tooltip-close" data-focus="popup07-close"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> |
|
| 1962 |
+ </div> |
|
| 1963 |
+ <div class="layer_in"> |
|
| 1964 |
+ 엑셀파일 불러오기 |
|
| 1965 |
+ <div class="hascont"> |
|
| 1966 |
+ <div class="titBox"> |
|
| 1967 |
+ <p>- 최대 2만 건까지 등록할 수 있습니다.</p> |
|
| 1968 |
+ <p>- [엑셀 불러오기]시 문서의 A, B열을 불러옵니다.(지원하는 파일 형식 : xls, xlsx)</p> |
|
| 1969 |
+ <p>- 휴대폰 항목은 숫자, 하이픈(-)만 인식하며, 번호 앞에 0이 생략되어도 정상 등록됩니다. |
|
| 1970 |
+ </p> |
|
| 1971 |
+ <button type="button" class="excel_btn" onclick="location.href='/cmm/fms/FileDown.do?atchFileId=FILE_000000000011651&fileSn=1'"><i></i>샘플파일 다운로드</button> |
|
| 1972 |
+ <button type="button" class="excel_btn" onclick="location.href='/download/msg/알림톡_엑셀주소록_등록양식.xlsx'"><i class="downroad"></i>샘플파일 다운로드</button> |
|
| 1973 |
+ </div> |
|
| 1974 |
+ <div class="attachedFile"> |
|
| 1975 |
+ <label for="excelNm01" class="attachedFile_label">첨부파일</label> |
|
| 1976 |
+ <input type="text" id="excelNm01" value="" readonly> |
|
| 1977 |
+ <input type="file" id="excelFile01" accept=".xls, .xlsx" onchange="excelExportAjax(event); return false;" style="display:none"/> |
|
| 1978 |
+ <button type="button" class="btnType btnType6 c1">찾아보기</button> |
|
| 1979 |
+ <p><span class="vMiddle">*</span> 첨부된 파일은 <span class="c_e40000">[추가]버튼을 클릭</span>하셔야 받는 사람에 등록됩니다.</p> |
|
| 1980 |
+ </div> |
|
| 1981 |
+ </div>// 엑셀파일 불러오기 |
|
| 1982 |
+ <div class="popup_btn_wrap2"> |
|
| 1983 |
+ <button type="button" class="tooltip-close" data-focus="popup07-close" data-focus-next="popup07" onclick="excelAddAjax()">추가</button> |
|
| 1984 |
+ <button type="button" class="tooltip-close" data-focus="popup07-close" data-focus-next="popup07" onclick="excelAdd()">추가</button> |
|
| 1985 |
+ <button type="button" class="tooltip-close" data-focus="popup07-close" data-focus-next="popup07">닫기</button> |
|
| 1986 |
+ </div> |
|
| 1987 |
+ </div> |
|
| 1988 |
+ </div> |
|
| 1989 |
+ </div>// 엑셀 불러오기 |
|
| 1990 |
+</form> --> |
|
| 1758 | 1991 |
<form id="excelVarFileForm" name="excelVarFileForm" method="post"> |
| 1759 | 1992 |
<input type="hidden" id="excelVarCnt" name="excelVarCnt" value="0"/> |
| 1760 | 1993 |
<input type="hidden" id="excelVarList" name="excelVarList" value=""/> |
+++ src/main/webapp/WEB-INF/jsp/web/kakao/msgdata/at/KakaoAlimtalkMsgDataView_advcbackup_20250310.jsp
... | ... | @@ -0,0 +1,1773 @@ |
| 1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | |
| 2 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | |
| 3 | +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> | |
| 4 | +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> | |
| 5 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> | |
| 6 | +<%@ page import="itn.com.cmm.LoginVO" %> | |
| 7 | + | |
| 8 | +<!-- <script src="/publish/js/content.js"></script> --> | |
| 9 | +<!-- 주소록관련 js --> | |
| 10 | +<script type="text/javascript" defer src="<c:out value='/js/kakao/at/init.js' />"></script> | |
| 11 | +<script type="text/javascript" src="<c:out value='/js/kakao/at/tabulator.js' />"></script> | |
| 12 | +<script type="text/javascript" src="<c:out value='/js/kakao/at/addr.js' />"></script> | |
| 13 | +<script type="text/javascript" src="<c:out value='/js/kakao/at/alimtalkExcel.js' />"></script> | |
| 14 | +<script type="text/javascript" src="<c:out value='/js/kakao/at/priceClclt.js' />"></script> | |
| 15 | +<script type="text/javascript" src="<c:out value='/js/common/popup.js' />"></script> | |
| 16 | +<script type="text/javascript"> | |
| 17 | +var loginVO = '${loginVO}'; | |
| 18 | + | |
| 19 | +// 체크박스 동적 바인딩 | |
| 20 | +$(document).on('click','.wrap01C', function(){ | |
| 21 | + var total = $(".wrap01C").length; | |
| 22 | + var checked = $(".wrap01C:checked").length; | |
| 23 | + if(total != checked) $("#select_all").prop("checked", false); | |
| 24 | + else $("#select_all").prop("checked", true); | |
| 25 | +}); | |
| 26 | + | |
| 27 | +$(document).ready(function(){ | |
| 28 | + | |
| 29 | + //채널 ID change function | |
| 30 | + $("#selectKakaoProfileList").on("change", function(){ | |
| 31 | + | |
| 32 | + if(usrDeptChk()){ | |
| 33 | + | |
| 34 | + $("#selectTemplateList option").remove(); | |
| 35 | + selectTemplateList(); | |
| 36 | + | |
| 37 | + }else { | |
| 38 | + | |
| 39 | + $("#selectKakaoProfileList option:eq(0)").prop("selected", true); | |
| 40 | + | |
| 41 | + } | |
| 42 | + | |
| 43 | + }); | |
| 44 | + | |
| 45 | + //템플릿 change function | |
| 46 | + $("#selectTemplateList").on("change", function(){ | |
| 47 | + selectTemplateInfo($(this).val()); | |
| 48 | + fn_viewDataInit02(); | |
| 49 | + priceInit(); // 발송금액 라인 text / 금액 초기화 | |
| 50 | + }); | |
| 51 | + | |
| 52 | + $("#fileClick").click(function(){ | |
| 53 | + if($('#selectTemplateList').val() == '') | |
| 54 | + { | |
| 55 | + alert('템플릿을 선택 후 진행해 주세요.'); | |
| 56 | + return false; | |
| 57 | + } | |
| 58 | + if($("#tpButtonTypeDs").val() == "DS"){ | |
| 59 | + alert("템플릿 내용에 배송조회 버튼이 포함되어 있습니다. \n운송장 번호는 숫자만 등록해주세요") | |
| 60 | + } | |
| 61 | + $('#excelFile').val(''); | |
| 62 | + $("#excelFile").click(); | |
| 63 | + }); | |
| 64 | + | |
| 65 | + //즉시 발송 라디오 버튼 선택시 숨김처리 | |
| 66 | + $("#reserYnN").on('click', function(){ | |
| 67 | + $('.rev_selected').hide(); | |
| 68 | + $('.send_rev .send_content').css('padding-bottom','108px'); | |
| 69 | + $('.send_btn .btnType:first-child').html('발송하기'); | |
| 70 | + $('#bizForm #reserveYn').val($(this).val()); | |
| 71 | + }); | |
| 72 | + | |
| 73 | + //예약 발송 라디오 버튼 선택시 숨김 해제처리 | |
| 74 | + $("#reserYnY").on('click', function(){ | |
| 75 | + $('.rev_selected').show(); | |
| 76 | + $('.send_rev .send_content').css('padding-bottom','0'); | |
| 77 | + $('.send_btn .btnType:first-child').html('예약하기'); | |
| 78 | + $('#bizForm #reserveYn').val($(this).val()); | |
| 79 | + }); | |
| 80 | + | |
| 81 | + //전체선색 버튼 이벤트 | |
| 82 | + $("#select_all").on('click', function(){ | |
| 83 | + if($("#select_all").is(":checked")) $(".wrap01C").prop("checked", true); | |
| 84 | + else $(".wrap01C").prop("checked", false); | |
| 85 | + | |
| 86 | + }); | |
| 87 | + | |
| 88 | + //선택삭제 버튼 클릭 이벤트 | |
| 89 | + $("#select_del").on('click', function(){ | |
| 90 | + | |
| 91 | + if($('.wrap01C:checkbox:checked').length < 1) | |
| 92 | + { | |
| 93 | + alert("삭제할 연락처를 선택해주세요.!!"); | |
| 94 | + return false; | |
| 95 | + } | |
| 96 | + | |
| 97 | + $('.wrap01C').each(function(index, item){ | |
| 98 | + if($(item).is(':checked')) | |
| 99 | + $(item).parent().parent().remove(); | |
| 100 | + }); | |
| 101 | + updateTotCnt(); | |
| 102 | + }); | |
| 103 | + | |
| 104 | + //선택삭제 버튼 클릭 이벤트 | |
| 105 | + $("#all_del").on('click', function(){ | |
| 106 | + | |
| 107 | + if(!confirm("받는사람 목록을 모두 삭제하시겠습니까?")) | |
| 108 | + return false; | |
| 109 | + | |
| 110 | + $('#wrap01_body .list_body').remove(); | |
| 111 | + | |
| 112 | + $('#rowTotCnt').text(0); | |
| 113 | + $('#rowDupCnt').text(0); | |
| 114 | + }); | |
| 115 | + | |
| 116 | + /* | |
| 117 | + * 오류 검사 | |
| 118 | + */ | |
| 119 | + $('#check_validity').click(function(){ | |
| 120 | + var regExp_ctn = /^(01[016789]{1}|02|0[3-9]{1}[0-9]{1})([0-9]{3,4})([0-9]{4})$/; | |
| 121 | + // 치환문자 있는 데이터 | |
| 122 | + if($('#bizForm #txtReplYn').val() === 'N'){ | |
| 123 | + | |
| 124 | + if($('.phoneArea').length < 1){ | |
| 125 | + alert("등록된 연락처가 없습니다.") | |
| 126 | + return false; | |
| 127 | + } | |
| 128 | + | |
| 129 | + $('.phoneArea').each(function(index, item){ | |
| 130 | + var phoneVal = $(item).text().trim(); | |
| 131 | + if(phoneVal.length==11 || phoneVal.length==10) | |
| 132 | + { | |
| 133 | + if(!regExp_ctn.test(phoneVal)) | |
| 134 | + { | |
| 135 | + alert(phoneVal+"는 유효하지 않은 전화번호 입니다."); | |
| 136 | + return false; | |
| 137 | + } | |
| 138 | + } | |
| 139 | + else | |
| 140 | + { | |
| 141 | + alert("유효하지 않은 전화번호 입니다."); | |
| 142 | + return false; | |
| 143 | + } | |
| 144 | + }); | |
| 145 | + alert("오류 데이터가 없습니다."); | |
| 146 | + } | |
| 147 | + }); | |
| 148 | + | |
| 149 | + /** | |
| 150 | + * 템플릿 재선택 버튼 function | |
| 151 | + */ | |
| 152 | + $('#reSelectBtn').click(function(){ | |
| 153 | + var senderKey = $('#selectKakaoProfileList option:selected').val(); | |
| 154 | + | |
| 155 | + if(!senderKey) | |
| 156 | + { | |
| 157 | + alert("채널ID를 선택하고 다시 시도해 주세요."); | |
| 158 | + return false; | |
| 159 | + } | |
| 160 | + | |
| 161 | + | |
| 162 | + var url = ""; | |
| 163 | + var windowTargetName = "KakaoAlimtalkTemplateListPopupAjax"; | |
| 164 | +// var features = "width=930, height=860, top=100, left=100, fullscreen=no, menubar=no, status=no, toolbar=no, titlebar=yes, location=no, scrollbars=yes"; | |
| 165 | + // 2.POST로 데이터 전달 | |
| 166 | + document.templateListPopup.senderKey.value=$('#selectKakaoProfileList option:selected').val(); | |
| 167 | + document.templateListPopup.yellowId.value=$('#selectKakaoProfileList option:selected').text(); | |
| 168 | + document.templateListPopup.target=windowTargetName; | |
| 169 | + showPopup2('',windowTargetName ,'930','860'); | |
| 170 | + document.templateListPopup.submit(); | |
| 171 | + | |
| 172 | + }); | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + $("#send_fail_check").change(function(){ | |
| 177 | + if($("#send_fail_check").is(":checked")){ | |
| 178 | + | |
| 179 | + | |
| 180 | + if(loginVO == "" || loginVO == null){ | |
| 181 | + alert("로그인 후 사용 가능한 기능입니다."); | |
| 182 | + location.href="<c:url value='/web/user/login/login.do'/>"; | |
| 183 | + return false; | |
| 184 | + | |
| 185 | + $("#send_fail_check").prop("checked", false); | |
| 186 | + } | |
| 187 | + | |
| 188 | + if($('#callFromList').val() === ''){ | |
| 189 | + | |
| 190 | + if(confirm('대체문자 전송을 위한 발신번호가 등록되지 않았습니다. \n대체문자 발신번호를 지금 등록하시겠습니까?')){ | |
| 191 | + window.location="<c:out value='/web/user/sendNumberManage.do' />"; | |
| 192 | + } | |
| 193 | + $("#send_fail_check").prop("checked", false); | |
| 194 | + | |
| 195 | + }else if($('#selectTemplateList').val() == '') | |
| 196 | + { | |
| 197 | + alert('템플릿을 선택 후 진행해 주세요.'); | |
| 198 | + $("#send_fail_check").prop("checked", false); | |
| 199 | + return false; | |
| 200 | + }else{ | |
| 201 | + // 에러버튼 체크 초기화 | |
| 202 | + fn_insertErrorYN('N'); | |
| 203 | + | |
| 204 | + $('#smsTxtArea').val(''); | |
| 205 | +// // 미리보기 텍스트를 가져와 줄바꿈 처리 후 대체문자 내용으로 입력 | |
| 206 | + var template_text = $('.template_text').html().trim(); | |
| 207 | + template_text = XSSChange(template_text); | |
| 208 | + $('#smsTxtArea').val(template_text); | |
| 209 | + | |
| 210 | +// //문자 내용 입력시 바이트수 계산하기 | |
| 211 | + | |
| 212 | + $(".replace_send_wrap").slideDown(400); | |
| 213 | + thisFnByteString($('#smsTxtArea').val()); | |
| 214 | + } | |
| 215 | + }else{ | |
| 216 | + $(".replace_send_wrap").slideUp(400); | |
| 217 | + // 초기화 버튼 클릭 | |
| 218 | + $('#failCheckInit').click(); | |
| 219 | + $('.send_top .send_right .phone').css({'top': '0','transition': 'top .4s linear'}); | |
| 220 | + } | |
| 221 | + | |
| 222 | + // 금액 계산 fn 호출 | |
| 223 | + fn_priceClclt(); | |
| 224 | + }); | |
| 225 | + | |
| 226 | + // 대체문자 내용 수정 | |
| 227 | + $('#smsTxtArea').keyup(function(){ | |
| 228 | + // 금액 계산 fn 호출 | |
| 229 | + fn_priceClclt(); | |
| 230 | + // 문자 바이트수 체크 | |
| 231 | + thisFnByteString($('#smsTxtArea').val()); | |
| 232 | + // 에러버튼 체크 초기화 | |
| 233 | + fn_insertErrorYN('N'); | |
| 234 | + | |
| 235 | + }); | |
| 236 | +}); | |
| 237 | +function sendFailCheckInit(){ | |
| 238 | + | |
| 239 | + $("#send_fail_check").prop("checked", false); | |
| 240 | + | |
| 241 | +} | |
| 242 | + | |
| 243 | +function fnTemplateReg(){ | |
| 244 | + if(loginVO == "" || loginVO == null){ | |
| 245 | + alert("신규 템플릿 등록 서비스는 로그인 후 이용 가능합니다."); | |
| 246 | + location.href="<c:url value='/web/user/login/login.do'/>"; | |
| 247 | + return false; | |
| 248 | + } | |
| 249 | + if(usrDeptChk()){ | |
| 250 | + | |
| 251 | + if(confirm('신규 템플릿 등록 화면으로 이동하시겠습니까?')){ | |
| 252 | + location.href="<c:url value='/web/mjon/kakao/template/selectKaKaoTemplateList.do'/>"; | |
| 253 | + } | |
| 254 | + } | |
| 255 | + | |
| 256 | +} | |
| 257 | + | |
| 258 | +/* | |
| 259 | + * 탬플릿 재선택 팝업에서 실행하는 function | |
| 260 | + */ | |
| 261 | +function call_templateChange(templateId){ | |
| 262 | + | |
| 263 | + $('#selectTemplateList').val(templateId).prop('selected', true); | |
| 264 | + selectTemplateInfo(templateId); | |
| 265 | +// $('#selectTemplateList').val('bizp_2023021711142018819557746').prop('selected', true); | |
| 266 | +} | |
| 267 | + | |
| 268 | + | |
| 269 | +/** | |
| 270 | + * 먼저 불러온 DATA가 있으면 삭제 | |
| 271 | + * !! 화면에 보이는 data만 삭제 !! | |
| 272 | + * 치환 데이터 | |
| 273 | + */ | |
| 274 | +function fn_viewDataInit01(){ | |
| 275 | + | |
| 276 | + // excel Data (치환 문자 table) 비우기 | |
| 277 | + $('#excelHead').empty(); | |
| 278 | + $('.excelBody').remove(); | |
| 279 | + $('#excelNm01').val(''); | |
| 280 | + // 치환문자 없을 경우 | |
| 281 | +// $('#wrap01_body .list_body').remove(); | |
| 282 | +} | |
| 283 | + | |
| 284 | +/** | |
| 285 | + * 먼저 불러온 DATA가 있으면 삭제 | |
| 286 | + * !! 화면에 보이는 data만 삭제 !! | |
| 287 | + * 총건수, 중복건수 데이터 0으로 초기화 | |
| 288 | + * 엑셀 불러오기 데이터 | |
| 289 | + */ | |
| 290 | +function fn_viewDataInit02(){ | |
| 291 | + $('.excelBody').remove(); | |
| 292 | + $('#excelHead').empty(); | |
| 293 | + $('#rowTotCnt').text("0"); | |
| 294 | + $('#rowDupCnt').text("0"); | |
| 295 | +} | |
| 296 | + | |
| 297 | +/* | |
| 298 | + *변수 다운로드 excel show function | |
| 299 | + */ | |
| 300 | +function variableWrapShow(){ | |
| 301 | + $(".receiver_wrap02").attr("style","display: block !important;"); | |
| 302 | + $(".receiver_wrap01").attr("style","display: none !important;"); | |
| 303 | + $(".variable_wrap").show(); | |
| 304 | + $('#bizForm #txtReplYn').val('Y'); | |
| 305 | + | |
| 306 | +} | |
| 307 | + | |
| 308 | +/* | |
| 309 | + * 변수 다운로드 excel hide function | |
| 310 | + */ | |
| 311 | +function variableWrapHide(){ | |
| 312 | + $(".receiver_wrap01").attr("style","display: block !important;"); | |
| 313 | + $(".receiver_wrap02").attr("style","display: none !important;"); | |
| 314 | + $(".variable_wrap").hide(); | |
| 315 | + $('#bizForm #txtReplYn').val('N'); | |
| 316 | + | |
| 317 | +} | |
| 318 | + | |
| 319 | + | |
| 320 | +/* | |
| 321 | + * 등록된 발신 탬플릿 목록 조회 function | |
| 322 | + */ | |
| 323 | +function selectTemplateList(){ | |
| 324 | + var selectAgentCode = $("select[name='selectKakaoProfileList']").val(); | |
| 325 | + $.ajax({ | |
| 326 | + type: "POST" | |
| 327 | + , url: "<c:out value ='/web/mjon/kakao/alimtalk/selectKakaoApiTemplateAjax.do' />" | |
| 328 | + , data:{ "senderKey":selectAgentCode, "pageType":"notityTalk"} | |
| 329 | + , dataType:'json' | |
| 330 | + , cache: false | |
| 331 | + , async: false | |
| 332 | + , timeout: 600000 | |
| 333 | + , success: function (returnData, status) { | |
| 334 | + if(status == 'success'){ | |
| 335 | + | |
| 336 | + $("#selectTemplateList option").remove(); | |
| 337 | + $("#selectTemplateList").append("<option value=''>알림톡 템플릿 선택</option>"); | |
| 338 | + | |
| 339 | + var list = returnData.kakaoTemplateList; | |
| 340 | + for(var i=0; i < list.templatList.length; i++){ | |
| 341 | + $("#selectTemplateList").append("<option value='"+list.templatList[i].templateCode+"'>"+list.templatList[i].templateName+"</option>"); | |
| 342 | + } | |
| 343 | + | |
| 344 | + } else if(status== 'fail'){ | |
| 345 | + alert(returnData.message); | |
| 346 | + } | |
| 347 | + } | |
| 348 | + ,error: function (e) { | |
| 349 | + console.log("ERROR : ", e); | |
| 350 | + alert("관리자에게 문의해 주세요"); | |
| 351 | + } | |
| 352 | + }); | |
| 353 | +} | |
| 354 | + | |
| 355 | +/* | |
| 356 | + * 템플릿 선택하여 정보 가져오는 function | |
| 357 | + */ | |
| 358 | +function selectTemplateInfo(id){ | |
| 359 | + | |
| 360 | + var selectAgentCode = $("select[name='selectKakaoProfileList']").val(); | |
| 361 | + | |
| 362 | + $("#alimtalkTemplate").empty(); | |
| 363 | + | |
| 364 | + // 우측 본문내용 만들기 | |
| 365 | + $("#alimtalkTemplate").load("/web/mjon/kakao/template/selectKakaoApiTemplateDataViewLoadAjax.do" | |
| 366 | + , { | |
| 367 | + "senderKey":selectAgentCode | |
| 368 | + , "templateCode" : id | |
| 369 | + },function(){ | |
| 370 | + | |
| 371 | + | |
| 372 | + // =================== 대체문자 숨김 / html 초기화 | |
| 373 | + $(".replace_send_wrap").slideUp(400); | |
| 374 | + // 초기화 버튼 클릭 | |
| 375 | + $('#failCheckInit').click(); | |
| 376 | + $('.send_top .send_right .phone').css({'top': '0','transition': 'top .4s linear'}); | |
| 377 | + $("#send_fail_check").prop("checked", false); | |
| 378 | + // //=================== 대체문자 숨김 / html 초기화 | |
| 379 | + | |
| 380 | + | |
| 381 | + // 미리보기에 채널ID 노출 | |
| 382 | + $('#prev_p_top').text($('#selectKakaoProfileList option:selected').text()); | |
| 383 | + | |
| 384 | + | |
| 385 | + var tpTemplateContent = $('#tpTemplateContent').val(); | |
| 386 | + $("#senderKeyInfo").val(selectAgentCode); | |
| 387 | + $("#templateCodeInfo").val($('#tpTemplateCode').val()); | |
| 388 | + | |
| 389 | + //엑셀 샘플 정보 - 내용만 변수처리하기 | |
| 390 | + $("#excelTemplateContent").val(tpTemplateContent); | |
| 391 | + $("#excelTemplateSubtitle").val($('#tpTemplateSubtitle').val()); | |
| 392 | + $("#excelTemplateTitle").val($('#tpTemplateTitle').val()); | |
| 393 | + | |
| 394 | + if(($('#tpTemplateEmphasizeType').val() != "NONE") || $('#tpBottonListSize').val() != "0"){ | |
| 395 | + $('#bizForm #bizJsonYn').val('Y'); | |
| 396 | + }else{ | |
| 397 | + $('#bizForm #bizJsonYn').val('N'); | |
| 398 | + } | |
| 399 | + | |
| 400 | + | |
| 401 | + if($('#tpTemplateEmphasizeType').val() == "TEXT"){ | |
| 402 | + $("#templateEmphasizeType").val($('#tpTemplateEmphasizeType').val()); | |
| 403 | + $("#templateTitle").val($('#tpTemplateTitle').val()); | |
| 404 | + $("#templateSubtitle").val($('#tpTemplateSubtitle').val()); | |
| 405 | + } | |
| 406 | + | |
| 407 | + $("#bizForm #templateContent").val(tpTemplateContent); | |
| 408 | + templateChange(); | |
| 409 | + | |
| 410 | + }); | |
| 411 | +} | |
| 412 | + | |
| 413 | +/* | |
| 414 | + * 알림톡 변수가 있는지 체크해서 변수 다운로드 excel show / hide 하는 function | |
| 415 | + */ | |
| 416 | +function templateChange(){ | |
| 417 | + var varList = $("#excelTemplateContent").val().match(/#\{([^}]+)\}/g); | |
| 418 | + if(varList == null) | |
| 419 | + variableWrapHide(); | |
| 420 | + else | |
| 421 | + variableWrapShow(); | |
| 422 | + | |
| 423 | +} | |
| 424 | +//엑셀 업로드 양식 다운로드 받기 | |
| 425 | +function excelDownload(){ | |
| 426 | + | |
| 427 | + if(loginVO == "" || loginVO == null){ | |
| 428 | + alert("변수설정 엑셀파일 다운로드는 서비스는 로그인 후 이용 가능합니다."); | |
| 429 | + location.href="<c:url value='/web/user/login/login.do'/>"; | |
| 430 | + return false; | |
| 431 | + } | |
| 432 | + | |
| 433 | + var profile = $("#selectKakaoProfileList").val(); | |
| 434 | + var template = $("#selectTemplateList").val(); | |
| 435 | + | |
| 436 | + if(profile == ''){ | |
| 437 | + | |
| 438 | + alert("채널ID를 선택해주세요."); | |
| 439 | + return false; | |
| 440 | + | |
| 441 | + } | |
| 442 | + | |
| 443 | + if(template == ''){ | |
| 444 | + | |
| 445 | + alert("알림톡 템플릿을 선택해주세요."); | |
| 446 | + return false; | |
| 447 | + | |
| 448 | + } | |
| 449 | + | |
| 450 | + //합친 내용에서 변수 문자열 뽑기 - #과{}미포함 | |
| 451 | + var fullVarList = $("#excelTemplateContent").val().match(/(?<=\#\{)(.*?)(?=\})/g); | |
| 452 | + $('#excelForm #varNmList').val(fullVarList); | |
| 453 | + $('#excelForm').submit(); | |
| 454 | + | |
| 455 | +} | |
| 456 | + | |
| 457 | +function checkConf() { | |
| 458 | + var confCheck = false; | |
| 459 | + | |
| 460 | + $.ajax({ | |
| 461 | + type: "POST", | |
| 462 | + url: "/web/mjon/conf/selectMjonMsgUseConfAjax.do", | |
| 463 | + data: {}, | |
| 464 | + dataType:'json', | |
| 465 | + async: false, | |
| 466 | + success: function (returnData, status) { | |
| 467 | + if(returnData.result == "fail") { | |
| 468 | + console.log(returnData.message); | |
| 469 | + }else if(returnData.result == "success"){ | |
| 470 | + confCheck = true; | |
| 471 | + } | |
| 472 | + } | |
| 473 | + ,error: function (e) {console.log("ERROR : ", e); } | |
| 474 | + }); | |
| 475 | + | |
| 476 | + return confCheck; | |
| 477 | +} | |
| 478 | + | |
| 479 | +/* | |
| 480 | + * 등록된 발신 탬플릿 카카오톡 전송 | |
| 481 | + */ | |
| 482 | +function sendTemplateInfo(){ | |
| 483 | + | |
| 484 | + if(!checkConf()){ //문자온 conf-check | |
| 485 | + alert("현재 알림톡 발송하기 기능 점검 중입니다.\n\n1분 후 다시 시도해주세요."); | |
| 486 | + return false; | |
| 487 | + } | |
| 488 | + | |
| 489 | + if(loginVO == "" || loginVO == null){ | |
| 490 | + alert("카카오톡 발송 서비스는 로그인 후 이용 가능합니다."); | |
| 491 | + location.href="<c:url value='/web/user/login/login.do'/>"; | |
| 492 | + return false; | |
| 493 | + } | |
| 494 | + | |
| 495 | + if(!usrDeptChk()){ | |
| 496 | + return false; | |
| 497 | + } | |
| 498 | + | |
| 499 | + //채널ID / 템플릿 선택 | |
| 500 | + if(!$('#selectKakaoProfileList').val()) | |
| 501 | + { | |
| 502 | + alert('채널ID를 선택 후 발송해 주세요'); | |
| 503 | + return false; | |
| 504 | + } | |
| 505 | + | |
| 506 | + if(!$('#selectTemplateList').val() ) | |
| 507 | + { | |
| 508 | + alert('템플릿을 선택 후 발송해 주세요'); | |
| 509 | + return false; | |
| 510 | + } | |
| 511 | + | |
| 512 | + //수신자 목록 체크 | |
| 513 | + if($('.phoneArea').length < 1) | |
| 514 | + { | |
| 515 | + alert('받는 사람 입력 후 발송해 주세요'); | |
| 516 | + return false; | |
| 517 | + } | |
| 518 | + | |
| 519 | + //수신자 목록 체크 | |
| 520 | + if($('.phoneArea').length > 500) | |
| 521 | + { | |
| 522 | + alert("최대 발송 건수는 500건 입니다."); | |
| 523 | + return false; | |
| 524 | + } | |
| 525 | + | |
| 526 | + | |
| 527 | + if($('#errorChk').val() === 'N' | |
| 528 | + && $("#send_fail_check").is(":checked") | |
| 529 | + && $('#txtReplYn').val() === 'Y' | |
| 530 | + ) | |
| 531 | + { | |
| 532 | + alert('대체문자 전송을 원하시면 오류검사 버튼을 확인해 주세요.'); | |
| 533 | + return false; | |
| 534 | + } | |
| 535 | + | |
| 536 | + // 금액 확인 | |
| 537 | + // 사용자 금액 | |
| 538 | + var userMoney = $('#oriUserMoney').val(); | |
| 539 | + // 발송 금액 | |
| 540 | + var totalPriceTxt = $('#totalPriceTxt').text(); | |
| 541 | + // 금액 확인 | |
| 542 | + var resutlPrice = parseFloat(userMoney)-parseFloat(totalPriceTxt); | |
| 543 | + | |
| 544 | + // 음수면 -1 값 | |
| 545 | + if(Math.sign(resutlPrice) < 0) | |
| 546 | + { | |
| 547 | + alert("발송에 필요한 회원님의 보유 잔액이 부족 합니다."); | |
| 548 | + return false; | |
| 549 | + } | |
| 550 | + | |
| 551 | + // 초기화 | |
| 552 | + $('.varValList').remove(); | |
| 553 | + $('#bizForm #varNmList').val(''); | |
| 554 | + | |
| 555 | + | |
| 556 | + // 대체문자 전송 확인 | |
| 557 | + if($('#send_fail_check').is(':checked')){ | |
| 558 | + $('#bizForm #subMsgSendYn').val("Y"); | |
| 559 | + $('#bizForm #subMsgTxt').val($("#smsTxtArea").val()); | |
| 560 | + | |
| 561 | + var subMsgTxt = $("#smsTxtArea").val().match(/#\{([^}]+)\}/g); | |
| 562 | + if(subMsgTxt == null){ | |
| 563 | + $('#bizForm #subMsgTxtReplYn').val("N"); | |
| 564 | + }else{ | |
| 565 | + $('#bizForm #subMsgTxtReplYn').val("Y"); | |
| 566 | + } | |
| 567 | + }else{ | |
| 568 | + $('#bizForm #subMsgSendYn').val("N"); | |
| 569 | + } | |
| 570 | + | |
| 571 | + // 예약문자 및 분할전송 확인 | |
| 572 | + var reserYn = $("input[name=reserYn]:checked").val(); // 예약 발송 여부 확인 | |
| 573 | + $('#bizForm #reserveYn').val(reserYn); | |
| 574 | + if(reserYn == 'Y'){ | |
| 575 | + | |
| 576 | + var date = $(".resDate").val();//form.msgResDate.value; | |
| 577 | + var hour = $("select[name='msgResHour']").val(); | |
| 578 | + var min = $("select[name='msgResMin']").val(); | |
| 579 | + | |
| 580 | + if(date == ""){ | |
| 581 | + alert("예약전송 날짜를 선택해 주세요."); | |
| 582 | + return false; | |
| 583 | + | |
| 584 | + }else{ | |
| 585 | + | |
| 586 | + var now = new Date(); | |
| 587 | + var reqDate = date + " " + hour + ":" + min + ":00"; | |
| 588 | + var gapDate = getGapDayTime(date, hour, min); | |
| 589 | + | |
| 590 | + if(gapDate < 0){ // 음수이면 이전날짜, 크면 이후 날짜. | |
| 591 | + alert("예약 날짜는 현재 시간 이후의 날짜 및 시간을 선택해 주세요."); | |
| 592 | + return false; | |
| 593 | + }else{ | |
| 594 | + $('#bizForm #reqDate').val(reqDate); | |
| 595 | + } | |
| 596 | + } | |
| 597 | + | |
| 598 | + var divideChk = ""; | |
| 599 | + if($('#inputDivideChk').is(':checked')){ | |
| 600 | + divideChk = "Y"; | |
| 601 | + }else{ | |
| 602 | + divideChk = "N" | |
| 603 | + } | |
| 604 | + | |
| 605 | + //var divideCnt = $("select[name='frmDivideCnt']").val(); | |
| 606 | + var divideCnt = $('#frmDivideCnt').val(); | |
| 607 | + var divideTime = $("select[name='divideTime']").val(); | |
| 608 | + | |
| 609 | + $('#bizForm #divideChk').val(divideChk); | |
| 610 | + $('#bizForm #divideCnt').val(divideCnt); | |
| 611 | + $('#bizForm #divideTime').val(divideTime); | |
| 612 | + | |
| 613 | + }else{ | |
| 614 | + $('#bizForm #reqDate').val(""); | |
| 615 | + } | |
| 616 | + | |
| 617 | + // 치환문자 있는 데이터 파씽 | |
| 618 | + if($('#bizForm #txtReplYn').val() === 'Y'){ | |
| 619 | + fn_excelDataTransParsing(); | |
| 620 | + // 치환문자 있는 수신자 리스트 | |
| 621 | + fn_transCallToListParsing(); | |
| 622 | + }else{ | |
| 623 | + // 치환문자 없는 수신자 리스트 | |
| 624 | + fn_callToListParsing(); | |
| 625 | + } | |
| 626 | + | |
| 627 | + $('#bizForm #senderKey').val($('#selectKakaoProfileList').val()); | |
| 628 | + $('#bizForm #templateCode').val($('#selectTemplateList').val()); | |
| 629 | + | |
| 630 | + // 발신번호 | |
| 631 | + $('#bizForm #callFrom').val(removeDash($('#callFromList option:selected').val())); | |
| 632 | + | |
| 633 | + if(confirm("알림톡을 발송하시겠습니까?")){ | |
| 634 | + var spamChk = true; | |
| 635 | + //2023.09.06 알림톡 스팸체크 기능 제거요청으로 인한 주석처리 | |
| 636 | + /*var spamChk = false; | |
| 637 | + var spmData = new FormData(document.bizForm); | |
| 638 | + $.ajax({ | |
| 639 | + type: "POST" | |
| 640 | + , url: "/web/mjon/alimtalk/selectSpamKakaoAlimtalkMsgChkAjax.do" | |
| 641 | + , data: spmData | |
| 642 | + , dataType:'json' | |
| 643 | + , async: false | |
| 644 | + , processData: false | |
| 645 | + , contentType: false | |
| 646 | + , cache: false | |
| 647 | + , success: function (returnData, status) { | |
| 648 | + if(status == 'success'){ // status 확인 필요한가. 석세스 안뜨면 에러 가지 않나 | |
| 649 | + | |
| 650 | + if("fail" == returnData.result){ | |
| 651 | + alert(returnData.message); | |
| 652 | + return false; | |
| 653 | + }else if("loginFail" == returnData.result){ | |
| 654 | + alert(returnData.message); | |
| 655 | + return false; | |
| 656 | + }else if("spams" == returnData.result){ | |
| 657 | + alert("전송 내용에 스팸문구가 포함되어 있습니다.") | |
| 658 | + return false; | |
| 659 | + }else{ | |
| 660 | + spamChk = true; | |
| 661 | + return false; | |
| 662 | + } | |
| 663 | + | |
| 664 | + } else if(status== 'fail'){ | |
| 665 | + alert(returnData.message); | |
| 666 | + return false; | |
| 667 | + } | |
| 668 | + } | |
| 669 | + , error: function (e) { | |
| 670 | + alert("문자 발송에 실패하였습니다."); | |
| 671 | + console.log("ERROR : ", e); | |
| 672 | + return false; | |
| 673 | + } | |
| 674 | + }); */ | |
| 675 | + | |
| 676 | + if(spamChk){ | |
| 677 | + var data = new FormData(document.bizForm); | |
| 678 | + $.ajax({ | |
| 679 | + type: "POST" | |
| 680 | + , url: "/web/mjon/kakao/alimtalk/kakaoAlimTalkMsgSendAjax.do" | |
| 681 | +// , url: "/web/mjon/kakao/alimtalk/kakaoAlimTalkMsgSendAjax_advc.do" | |
| 682 | + , data: data | |
| 683 | + , dataType: 'json' | |
| 684 | + , async: true | |
| 685 | + , processData: false | |
| 686 | + , contentType: false | |
| 687 | + , cache: false | |
| 688 | + , success: function (returnData, status) { | |
| 689 | + console.log('returnData : ', returnData); | |
| 690 | + if(status == 'success'){ | |
| 691 | + /* if("loginFail" == returnData.result){ | |
| 692 | + | |
| 693 | + alert(returnData.message); | |
| 694 | + return false; | |
| 695 | + | |
| 696 | + }else if('fail' == returnData.result){ | |
| 697 | + | |
| 698 | + alert(returnData.message); | |
| 699 | + return false; | |
| 700 | + | |
| 701 | + }else if('authFail' == returnData.result){ | |
| 702 | + | |
| 703 | + alert(returnData.message); | |
| 704 | + location.reload(); | |
| 705 | + | |
| 706 | + } else if(status == 'success'){ | |
| 707 | + | |
| 708 | + var kakaoSendCnt = returnData.resultSts; | |
| 709 | + | |
| 710 | + $('.pop_msg_success').css({'display':'block','opacity':'1','left':'50%','top':'50%','transform':'translate(-50%,-50%)'}); | |
| 711 | + | |
| 712 | + //예약발송 건의 경우 결과 팝업 문구 변경 | |
| 713 | + if(reserYn == 'Y'){ | |
| 714 | + $('.pop_msg_success .msg_text').html("예약 성공 : <strong>"+ kakaoSendCnt + "</strong>건의<br>알림톡이 예약 되었습니다."); | |
| 715 | + }else{ | |
| 716 | + $('.pop_msg_success .msg_text').html("발송 성공 : <strong>"+ kakaoSendCnt + "</strong>건의<br>알림톡이 발송 되었습니다."); | |
| 717 | + } | |
| 718 | + | |
| 719 | + $('.mask').addClass('on'); | |
| 720 | + } */ | |
| 721 | + } | |
| 722 | + } | |
| 723 | + ,beforeSend : function(xmlHttpRequest) { | |
| 724 | + //로딩창 show | |
| 725 | + $('.loading_layer').addClass('active'); | |
| 726 | + } | |
| 727 | + ,complete : function(xhr, textStatus) { | |
| 728 | + //로딩창 hide | |
| 729 | + $('.loading_layer').removeClass('active'); | |
| 730 | + } | |
| 731 | + ,error: function (e) { | |
| 732 | + console.log("ERROR : ", e); | |
| 733 | + alert("카카오 알림톡 전송에 실패하였습니다."); | |
| 734 | + } | |
| 735 | + }); | |
| 736 | + } | |
| 737 | + } | |
| 738 | +} | |
| 739 | + | |
| 740 | +/* | |
| 741 | + * 치환문자 있는 수신자 목록 파씽 | |
| 742 | + */ | |
| 743 | +function fn_transCallToListParsing(){ | |
| 744 | + var callToList = []; | |
| 745 | + // excel body | |
| 746 | + $('.excelBody').each(function(indexBody, itemBody){ | |
| 747 | + $(itemBody).find('.list_table_name').each(function(indexRow, itemRow){ | |
| 748 | + if(indexRow == 0) | |
| 749 | + { | |
| 750 | + callToList.push($(itemRow).text().replaceAll('\\t', '')); | |
| 751 | + } | |
| 752 | + }); | |
| 753 | + }); | |
| 754 | + $('#bizForm #callToList').val(callToList); | |
| 755 | + | |
| 756 | +} | |
| 757 | + | |
| 758 | +/* | |
| 759 | + * 치환문자 없는 수신자 목록 파씽 | |
| 760 | + */ | |
| 761 | +function fn_callToListParsing(){ | |
| 762 | + | |
| 763 | + var callToList = []; | |
| 764 | + // excel body | |
| 765 | + $('.phoneArea').each(function(index, item){ | |
| 766 | + callToList.push($(item).text().replaceAll('\\t', '')); | |
| 767 | + }); | |
| 768 | + | |
| 769 | + $('#bizForm #callToList').val(callToList); | |
| 770 | + | |
| 771 | +} | |
| 772 | + | |
| 773 | +/* | |
| 774 | + * 받는사람 excel data 파씽 | |
| 775 | + */ | |
| 776 | +function fn_excelDataTransParsing(){ | |
| 777 | + | |
| 778 | + | |
| 779 | + // title 배열 | |
| 780 | + var varHead = []; | |
| 781 | + // 값 배열 | |
| 782 | + var varVal = []; | |
| 783 | + | |
| 784 | + var inputTag = '<input type="hidden" class="varValList" name="varValList[$INDEX$]" value="$VAL$">'; | |
| 785 | + | |
| 786 | + // excel title | |
| 787 | + $('#excelHead').find('div').each(function(index, item){ | |
| 788 | + if(index != 0) | |
| 789 | + varHead.push($(item).text().replaceAll('\\t', '')); | |
| 790 | + }); | |
| 791 | + $('#bizForm #varNmList').val(varHead); | |
| 792 | + | |
| 793 | + // excel body | |
| 794 | +/* $('.excelBody').each(function(index, item){ | |
| 795 | + varValTemp = []; | |
| 796 | + $(item).find('.list_table_name').each(function(index, item){ | |
| 797 | + if(index != 0){ | |
| 798 | + if(index == 1){ | |
| 799 | + varValTemp = $(item).text().replaceAll('\\t', ''); | |
| 800 | + }else | |
| 801 | + varValTemp += ","+$(item).text().replaceAll('\\t', ''); | |
| 802 | + } | |
| 803 | + }); | |
| 804 | + | |
| 805 | + $("#bizForm").append(inputTag.replace('$VAL$',varValTemp ).replace('$INDEX$',index )); | |
| 806 | + }); */ | |
| 807 | + | |
| 808 | + $('.excelBody').each(function(index, item){ | |
| 809 | + | |
| 810 | + var valLeng = $('#excelHead').find('.list_table_name').length-1; | |
| 811 | + varValTemp = ''; | |
| 812 | + | |
| 813 | + $(item).find('.list_table_name').each(function(index, item){ | |
| 814 | + if(index != 0) | |
| 815 | + { | |
| 816 | + var itemText = $(item).text().replaceAll('\\t', ''); | |
| 817 | + if(index !== 1) | |
| 818 | + varValTemp += '§'+itemText.replaceAll(',', 'Ï'); | |
| 819 | + else | |
| 820 | + varValTemp += itemText.replaceAll(',', 'Ï'); | |
| 821 | + } | |
| 822 | + }); | |
| 823 | + console.log('varValTemp : ',varValTemp); | |
| 824 | + varVal.push(varValTemp); | |
| 825 | + }); | |
| 826 | + $('#bizForm #varValList').val(varVal); | |
| 827 | +} | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | +//주소록 불러오기 버튼 클릭시 | |
| 832 | +$('.popupAddr').click(function(){ | |
| 833 | + | |
| 834 | + if(loginVO == "" || loginVO == null){ | |
| 835 | + alert("주소록 불러오기 서비스는 로그인 후 이용 가능합니다."); | |
| 836 | + location.href="<c:url value='/web/user/login/login.do'/>"; | |
| 837 | + return false; | |
| 838 | + } | |
| 839 | + | |
| 840 | + $("#addrGroupLoad").load("/web/mjon/msgdata/selectAddrGroupListAjax.do", "" ,function(response, status, xhr){ | |
| 841 | + //리스트 스크롤 처리해주기 | |
| 842 | + $(".adr_pop_list").mCustomScrollbar({ | |
| 843 | + axis: 'y', | |
| 844 | + scrollbarPosition: "outside", | |
| 845 | + theme: "dark", | |
| 846 | + autoHideScrollbar: false | |
| 847 | + }); | |
| 848 | + }); | |
| 849 | + | |
| 850 | +}); | |
| 851 | + | |
| 852 | + | |
| 853 | +//알림톡 상세보기 화면 호출 | |
| 854 | +function fnTemplateDetail(templateCode){ | |
| 855 | + var form = document.templateForm; | |
| 856 | + var selectAgentCode = $("select[name='selectKakaoProfileList']").val(); // 선택 채널ID | |
| 857 | + | |
| 858 | + form.senderKey.value = selectAgentCode; | |
| 859 | + form.templateCode.value = templateCode; | |
| 860 | + form.target='_blank'; | |
| 861 | + form.action="/web/mjon/kakao/template/requestKakaoApiTemplateDetail.do"; | |
| 862 | + form.submit(); | |
| 863 | + | |
| 864 | +} | |
| 865 | + | |
| 866 | + | |
| 867 | +//문자 바이트수 계산하기 함수 | |
| 868 | +function thisFnByteString(contents){ | |
| 869 | + var totalByte = 0; | |
| 870 | + //var content = contents; | |
| 871 | + var adverYn = $("input[name='send_adYn']:checked").val(); | |
| 872 | + var adTxtLeng = 0; | |
| 873 | + var denyTxtLeng = 0; | |
| 874 | + | |
| 875 | + $('#msgLeng').html(""); | |
| 876 | + $('#limitLeng').html(""); | |
| 877 | + var conLeng = conByteLeng(contents); // 내용 문자 입력 바이트 수 계산하기 | |
| 878 | + | |
| 879 | + | |
| 880 | + $('#msgLeng').text(conLeng); | |
| 881 | + | |
| 882 | + //문자 길이 변수에 저장해주기 | |
| 883 | + $('#smsLen').val(conLeng); | |
| 884 | + | |
| 885 | + | |
| 886 | + if(conLeng > 90){ | |
| 887 | + | |
| 888 | + $('#msgLeng').html(conLeng + " / "); | |
| 889 | + $('#limitLeng').html("2000"); | |
| 890 | + $('.msg_com').html("장문"); | |
| 891 | + $('#msgType').val("6"); // 메세지 타입 설정 | |
| 892 | + | |
| 893 | + $('.msg_com').removeClass("msg_short"); //단문 클래스 삭제하고 | |
| 894 | + $('.put_left').removeClass("short"); //내용 입력 박스 클래스 삭제 | |
| 895 | + $('.msg_com').addClass("msg_long"); // 장문 클래스 삽입 | |
| 896 | +// $('.put_left').addClass("long"); // 내용 입력 박스에 클래스 삽입 | |
| 897 | +// $('.msg_title').addClass('active'); | |
| 898 | + //document.getElementById("mmsSubject").disabled = false; | |
| 899 | + | |
| 900 | + }else{ | |
| 901 | + | |
| 902 | + $('#msgLeng').html(conLeng + " / "); | |
| 903 | + $('#limitLeng').html("90"); | |
| 904 | + $('.msg_com').html("단문"); | |
| 905 | + $('#msgType').val("4"); // 메세지 타입 설정 | |
| 906 | + $('.msg_com').removeClass("msg_long"); //단문 클래스 삭제하고 | |
| 907 | + $('.put_left').removeClass("long"); //내용 입력 박스 클래스 삭제 | |
| 908 | + $('.msg_com').addClass("msg_short"); // 장문 클래스 삽입 | |
| 909 | +// $('.put_left').addClass("short"); // 내용 입력 박스에 클래스 삽입 | |
| 910 | +// $('.msg_title, .title_wrap .textbox').removeClass('active'); | |
| 911 | + | |
| 912 | + } | |
| 913 | + | |
| 914 | + //수신목록 전체 데이터 갯수 구하기 | |
| 915 | + updateTotCnt(totRows); | |
| 916 | +} | |
| 917 | + | |
| 918 | +/** | |
| 919 | + * @description 대체문자 오류체크 funciton | |
| 920 | + */ | |
| 921 | +function fn_errorChk(){ | |
| 922 | + | |
| 923 | + // 대체문자가 없을 시 return false; | |
| 924 | + if($('#txtReplYn').val() === 'N') | |
| 925 | + { | |
| 926 | + alert('오류가 없습니다.'); | |
| 927 | + return false; | |
| 928 | + } | |
| 929 | + | |
| 930 | + // 치환 부분 변수명만 추출 = 배열 | |
| 931 | + var varList = $("#excelTemplateContent").val().match(/#\{([^}]+)\}/g); | |
| 932 | + | |
| 933 | + var smsTxt = $('#smsTxtArea').val(); | |
| 934 | + for(var i=0; i < varList.length; i++){ | |
| 935 | + if(smsTxt.indexOf(varList[i]) < 0){ | |
| 936 | + if(confirm(varList[i] + '값이 없습니다. 치환문자 없이 진행하시겠습니까?')){ | |
| 937 | + fn_insertErrorYN('Y'); | |
| 938 | + }; | |
| 939 | + return false; | |
| 940 | + } | |
| 941 | + smsTxt = smsTxt.replace(varList[i], ''); | |
| 942 | + }; | |
| 943 | + alert('오류가 없습니다.'); | |
| 944 | + fn_insertErrorYN('Y'); | |
| 945 | +} | |
| 946 | + | |
| 947 | + | |
| 948 | +function fn_insertErrorYN(val){ | |
| 949 | + $('#errorChk').val(val); | |
| 950 | +} | |
| 951 | + | |
| 952 | +function msgResultLink(){ | |
| 953 | + var reserYn = $("input[name=reserYn]:checked").val(); // 예약 발송 여부 확인 | |
| 954 | + if(reserYn == 'Y'){ | |
| 955 | + | |
| 956 | + location.href="/web/mjon/reservmsg/selectReservKaKaoView.do"; | |
| 957 | + | |
| 958 | + }else{ | |
| 959 | + location.href="/web/kakao/sent/selectKakaoSentView.do"; | |
| 960 | + } | |
| 961 | +} | |
| 962 | + | |
| 963 | +function msgSuccessClose(obj){ | |
| 964 | + $(obj).closest('.pop_msg_success').attr('style',''); | |
| 965 | + location.reload(true); | |
| 966 | + $('html').scrollTop(0); | |
| 967 | +} | |
| 968 | + | |
| 969 | +function goToKakaoTestPopUp(){ | |
| 970 | + | |
| 971 | + if(loginVO == "" || loginVO == null){ | |
| 972 | + alert("테스트 발송 서비스는 로그인 후 이용 가능합니다."); | |
| 973 | + location.href="<c:url value='/web/user/login/login.do'/>"; | |
| 974 | + return false; | |
| 975 | + } | |
| 976 | + | |
| 977 | + //기업회원 체크 | |
| 978 | + if(!usrDeptChk()){ | |
| 979 | + return false; | |
| 980 | + } | |
| 981 | + | |
| 982 | + var form = document.kakaoAtDataTestPopupForm; | |
| 983 | + var selectAgentCode = $("select[name='selectKakaoProfileList']").val(); | |
| 984 | + var selectTemplateCode = $("select[name='selectTemplateList']").val(); | |
| 985 | + var selectAgentTxt = $('#selectKakaoProfileList option:selected').text() | |
| 986 | + var txtRepYn = $('#bizForm #txtReplYn').val(); | |
| 987 | + var tpTemplateContent = $('#tpTemplateContent').val(); | |
| 988 | + var jsonYn = $('#bizForm #bizJsonYn').val(); | |
| 989 | + | |
| 990 | + if(selectAgentCode == '') { | |
| 991 | + alert("채널ID를 선택하고 다시 시도해 주세요."); | |
| 992 | + return false; | |
| 993 | + } | |
| 994 | + | |
| 995 | + if(selectTemplateCode == ''){ | |
| 996 | + alert('템플릿을 선택 후 진행해 주세요.'); | |
| 997 | + return false; | |
| 998 | + } | |
| 999 | + | |
| 1000 | + // 치환문자 있는 데이터 파씽 | |
| 1001 | + if($('#bizForm #txtReplYn').val() === 'Y'){ | |
| 1002 | + | |
| 1003 | + //수신자 목록 체크 | |
| 1004 | + if($('.phoneArea').length < 1){ | |
| 1005 | + alert('받는 사람 입력 후 발송해 주세요'); | |
| 1006 | + return false; | |
| 1007 | + } | |
| 1008 | + | |
| 1009 | + // title 배열 | |
| 1010 | + var varHead = []; | |
| 1011 | + // 값 배열 | |
| 1012 | + var varVal = []; | |
| 1013 | + | |
| 1014 | + // excel title | |
| 1015 | + $('#excelHead').find('div').each(function(index, item){ | |
| 1016 | + if(index != 0) | |
| 1017 | + varHead.push($(item).text().replaceAll('\\t', '')); | |
| 1018 | + }); | |
| 1019 | + form.varNmList.value = varHead; | |
| 1020 | + | |
| 1021 | + $('.excelBody').each(function(index, item){ | |
| 1022 | + varValTemp = ''; | |
| 1023 | + | |
| 1024 | + if(index == 0){ | |
| 1025 | + $(item).find('.list_table_name').each(function(index, item){ | |
| 1026 | + if(index != 0) | |
| 1027 | + { | |
| 1028 | + if(index !== 1) | |
| 1029 | + varValTemp += '§'+$(item).text().replaceAll('\\t', ''); | |
| 1030 | + else | |
| 1031 | + varValTemp += $(item).text().replaceAll('\\t', ''); | |
| 1032 | + } | |
| 1033 | + }); | |
| 1034 | + varVal.push(varValTemp); | |
| 1035 | + } | |
| 1036 | + }); | |
| 1037 | + form.varValList.value = varVal; | |
| 1038 | + } | |
| 1039 | + | |
| 1040 | + form.senderKey.value = selectAgentCode; | |
| 1041 | + form.templateCode.value = selectTemplateCode; | |
| 1042 | + form.agentCodeTxt.value = selectAgentTxt; | |
| 1043 | + form.txtReplYn.value = txtRepYn; | |
| 1044 | + form.templateContent.value = tpTemplateContent; | |
| 1045 | + form.bizJsonYn.value = jsonYn; | |
| 1046 | + | |
| 1047 | + form.method = "post"; | |
| 1048 | + window.open("about:blank", 'testSendPop', 'width=770, height=850, top=100, left=100, fullscreen=no, menubar=no, status=no, toolbar=no, titlebar=yes, location=no, scrollbars=1'); | |
| 1049 | + form.target = "testSendPop"; | |
| 1050 | + form.action = "/web/mjon/kakao/alimtalk/selectKakaoAlimtalkTemplateDataTestPopup.do"; | |
| 1051 | + form.submit(); | |
| 1052 | +} | |
| 1053 | + | |
| 1054 | +function goToReservKaKaoView(){ | |
| 1055 | + location.href="/web/mjon/reservmsg/selectReservKaKaoView.do"; | |
| 1056 | +} | |
| 1057 | + | |
| 1058 | +function goToSendKaKaoView(){ | |
| 1059 | + location.href="/web/kakao/sent/selectKakaoSentView.do"; | |
| 1060 | +} | |
| 1061 | +function goToPayUserKaKaoView(){ | |
| 1062 | + location.href="/web/member/pay/PayUserWithKakaoList.do"; | |
| 1063 | +} | |
| 1064 | + | |
| 1065 | +function checkNumber(event) { | |
| 1066 | + var divideCnt = $('#frmDivideCnt').val(); | |
| 1067 | + if(!(event.key >= 0 && event.key <= 9)) { | |
| 1068 | + return false; | |
| 1069 | + } | |
| 1070 | + | |
| 1071 | + var totCnt = divideCnt + "" + event.key; | |
| 1072 | + if(Number(totCnt) > 5000){ | |
| 1073 | + alert("분할전송 건수는 5,000건을 초과할 수 없습니다."); | |
| 1074 | + $('#frmDivideCnt').val("20"); | |
| 1075 | + return false; | |
| 1076 | + } | |
| 1077 | + | |
| 1078 | + return true; | |
| 1079 | +} | |
| 1080 | + | |
| 1081 | +</script> | |
| 1082 | + | |
| 1083 | + <div class="loading_layer"> | |
| 1084 | + <div class="loading_container"> | |
| 1085 | + <div class="bar"></div> | |
| 1086 | + <div class="text">Loading</div> | |
| 1087 | + </div> | |
| 1088 | + </div> | |
| 1089 | + | |
| 1090 | + <!-- 기업회원 이동 팝업 --> | |
| 1091 | + <div class="tooltip-wrap cvt_member_popup_wrap"> | |
| 1092 | + <div class="popup-com cvt_member_layer" tabindex="0" data-tooltip-con="cvt_member_layer" data-focus="cvt_member_layer" data-focus-prev="cvt_member_layer-close"> | |
| 1093 | + <div class="popup_heading"> | |
| 1094 | + <p>알림</p> | |
| 1095 | + <button type="button" class="tooltip-close" data-focus="cvt_member_layer-close"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> | |
| 1096 | + </div> | |
| 1097 | + <div class="layer_in"> | |
| 1098 | + <p>카카오톡 알림톡은 기업회원만 전송 가능합니다.<br>기업회원 전환 페이지로 이동하시겠습니까?</p> | |
| 1099 | + <div class="popup_btn_wrap2"> | |
| 1100 | + <button type="button" onclick="location.href='/web/user/membershipChange.do'">확인</button> | |
| 1101 | + <button type="button" class="tooltip-close" data-focus="cvt_member_layer-close" data-focus-next="cvt_member_layer">취소</button> | |
| 1102 | + </div> | |
| 1103 | + </div> | |
| 1104 | + </div> | |
| 1105 | + </div> | |
| 1106 | + <button type="button" id="btnDeptPop" data-tooltip="cvt_member_layer" style="display: none;"></button> | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + <!-- 템플릿 설정 디테일을 위한 FORM --> | |
| 1110 | + <form id="templateForm" name="templateForm" method="post"> | |
| 1111 | + <input type="hidden" name="senderKey" value=""/> | |
| 1112 | + <input type="hidden" name="templateCode" value=""/> | |
| 1113 | + <input type="hidden" name="arrTemplateCode" value=""/> | |
| 1114 | + </form> | |
| 1115 | + | |
| 1116 | + <form id="bizForm" name="bizForm" method="post"> | |
| 1117 | + <input type="hidden" id="menuTopTab" name="menuTopTab" value="tabAlim"> | |
| 1118 | + <input type="hidden" id="senderKey" name="senderKey" value=""> <!-- 카카오 보내는 사람 Key --> | |
| 1119 | + <input type="hidden" id="templateCode" name="templateCode" value=""> <!-- 카카오 전송 templat Code --> | |
| 1120 | + | |
| 1121 | + <input type="hidden" id="templateEmphasizeType" name="templateEmphasizeType" value=""> <!-- 카카오 전송 templateEmphasizeType 타입 --> | |
| 1122 | + | |
| 1123 | + <input type="hidden" id="templateContent" name="templateContent" value=""> <!-- 카카오 전송 templat내용 --> | |
| 1124 | + <input type="hidden" id="templateTitle" name="templateTitle" value=""> <!-- 카카오 전송 templat 타이틀 --> | |
| 1125 | + <input type="hidden" id="templateSubtitle" name="templateSubtitle" value=""> <!-- 카카오 전송 templat 서브 타이틀 --> | |
| 1126 | + | |
| 1127 | + <input type="hidden" id="subMsgTxtReplYn" name="subMsgTxtReplYn" value=""> <!-- 대체문자 전송내용에 변환문자가 있는지--> | |
| 1128 | + <input type="hidden" id="subMsgSendYn" name="subMsgSendYn" value=""> <!-- 대체문자 전송여부 - 알림톡 전송 실패 시 문자 전송--> | |
| 1129 | + <input type="hidden" id="subMsgTxt" name="subMsgTxt" value=""> <!-- 대체문자 전송내용 --> | |
| 1130 | + <input type="hidden" id="txtReplYn" name="txtReplYn" value="N"> <!-- 완 치환문자 여부 - --> | |
| 1131 | + <input type="hidden" id="bizJsonYn" name="bizJsonYn" value=""> <!-- JSON 생성 여부 --> | |
| 1132 | + | |
| 1133 | + <input type="hidden" id="reserveYn" name="reserveYn" value=""> <!-- 예약문자 여부 - 예약 선택 여부 // 아래 하단 화면 노출 여부도 같이--> | |
| 1134 | + <input type="hidden" id="reqDate" name="reqDate" value=""> <!--전송일자--> | |
| 1135 | + | |
| 1136 | + <input type="hidden" id="divideChk" name="divideChk" value=""> <!--전송일자--> | |
| 1137 | + <input type="hidden" id="divideCnt" name="divideCnt" value=""> <!--전송일자--> | |
| 1138 | + <input type="hidden" id="divideTime" name="divideTime" value=""> <!--전송일자--> | |
| 1139 | + | |
| 1140 | + <input type="hidden" id="callFrom" name="callFrom" value=""> <!--완 보내는사람 --> | |
| 1141 | + <input type="hidden" id="callToList" name="callToList" value=""> <!--완 받는사람 리스트--> | |
| 1142 | + <input type="hidden" id="varNmList" name="varNmList" value=""> <!--완 변수 이름 리스트--> | |
| 1143 | + <input type="hidden" id="varValList" name="varValList" value=""> <!--완 변수 리스트--> | |
| 1144 | + | |
| 1145 | + <input type="hidden" id="atSmishingYn" name="atSmishingYn" value="${atSmishingYn}"> <!--알림톡 스미싱 여부--> | |
| 1146 | + </form> | |
| 1147 | + | |
| 1148 | + <form id="excelForm" name="excelForm" action="<c:url value='/web/mjon/alimtalk/kakaoApiNotityTalkSampleExcelDownload.do'/>"> | |
| 1149 | + <input type="hidden" id="excelTemplateContent" name="excelTemplateContent" value=""> | |
| 1150 | + <input type="hidden" id="excelTemplateSubtitle" name="excelTemplateSubtitle" value=""> | |
| 1151 | + <input type="hidden" id="excelTemplateTitle" name="excelTemplateTitle" value=""> | |
| 1152 | + <input type="hidden" id="varNmList" name="varNmList" value=""> | |
| 1153 | + <input type="hidden" id="varValList" name="varValList[]" value=""> | |
| 1154 | + </form> | |
| 1155 | + | |
| 1156 | +<%-- <form id="templateListPopup" name="templateListPopup" action="<c:url value='/web/mjon/kakao/template/selectKakaoAlimtalkTemplateListPopupAjax.do'/>" method="post"> --%> | |
| 1157 | + <form id="templateListPopup" name="templateListPopup" action="<c:url value='/web/mjon/kakao/template/selectKakaoAlimtalkTemplateListPopupAjax.do'/>" method="post"> | |
| 1158 | + <input type="hidden" id="senderKey" name="senderKey" value=""> | |
| 1159 | + <input type="hidden" id="yellowId" name="yellowId" value=""> | |
| 1160 | + <input type="hidden" id="page" name="page" value="1"> | |
| 1161 | + <input type="hidden" id="formListType" name="formListType" value="thumbnail"> | |
| 1162 | + <input type="hidden" id="templateStatus" name="templateStatus" value="ACT"> <!-- 기본값 ACT:정상 --> | |
| 1163 | + </form> | |
| 1164 | + | |
| 1165 | + <!-- 테스트 전송 FORM --> | |
| 1166 | + <form id="kakaoAtDataTestPopupForm" name="kakaoAtDataTestPopupForm" method="post"> | |
| 1167 | + <input type="hidden" id="senderKey" name="senderKey" value=""> <!-- 카카오 보내는 사람 Key --> | |
| 1168 | + <input type="hidden" id="templateCode" name="templateCode" value=""> <!-- 카카오 전송 templat Code --> | |
| 1169 | + <input type="hidden" id="templateContent" name="templateContent" value=""> <!-- 카카오 전송 templat내용 --> | |
| 1170 | + <input type="hidden" id="agentCodeTxt" name="agentCodeTxt" value=""> <!-- 카카오 전송 templat Code --> | |
| 1171 | + <input type="hidden" id="txtReplYn" name="txtReplYn" value="N"> <!-- 치환문자 여부 - --> | |
| 1172 | + <input type="hidden" id="varNmList" name="varNmList" value=""> <!-- 변수 이름 리스트--> | |
| 1173 | + <input type="hidden" id="varValList" name="varValList" value=""> <!-- 변수 리스트--> | |
| 1174 | + <input type="hidden" id="bizJsonYn" name="bizJsonYn" value=""> <!-- 변수 리스트--> | |
| 1175 | + </form> | |
| 1176 | + | |
| 1177 | + <!-- 유저 보유잔액 --> | |
| 1178 | + <input type="hidden" id="oriUserMoney" value="<c:out value='${userMoney }' />"> | |
| 1179 | + | |
| 1180 | + <!-- 각 금액 단가 --> | |
| 1181 | + <input type="hidden" id="kakaoAtPrice" value="<c:out value='${sendPrice.kakaoAtPrice }' />"> <!-- 알림톡 단가 --> | |
| 1182 | + <input type="hidden" id="longPrice" value="<c:out value='${sendPrice.longPrice }' />"> <!-- mms 단가 --> | |
| 1183 | + <input type="hidden" id="shortPrice" value="<c:out value='${sendPrice.shortPrice }' />"> <!-- sms 단가 --> | |
| 1184 | + | |
| 1185 | + <!-- 각 금액 단가 --> | |
| 1186 | + <input type="hidden" id="errorChk" value="N"> <!-- sms 단가 --> | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + <div class="tooltip-wrap"> | |
| 1190 | + <!-- 문자발송 성공 레이어팝업 --> | |
| 1191 | + <div class="popup-com pop_msg_success"> | |
| 1192 | + <div class="popup_heading"> | |
| 1193 | + <p>알림톡 전송 결과</p> | |
| 1194 | + <button type="button" class="tooltip-close" onclick="msgSuccessClose(this);"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> | |
| 1195 | + </div> | |
| 1196 | + <div class="layer_in"> | |
| 1197 | + <div class="msg_text">발송 성공 : <strong>1</strong> 건,수신거부 : <span>0</span>건의<br>알림톡이 발송 되었습니다.</div> | |
| 1198 | + </div> | |
| 1199 | + <div class="popup_btn"> | |
| 1200 | + <button type="button" onclick="msgResultLink(); return false;">알림톡 발송결과 바로가기</button> | |
| 1201 | + <button type="button" class="tooltip-close" onclick="msgSuccessClose(this);">확인</button> | |
| 1202 | + </div> | |
| 1203 | + </div> | |
| 1204 | + </div> | |
| 1205 | + <div class="tooltip-wrap"> | |
| 1206 | + <!-- 문자발송 실패 레이어팝업 --> | |
| 1207 | + <div class="popup-com pop_msg_fails"> | |
| 1208 | + <div class="popup_heading"> | |
| 1209 | + <p>문자 전송 결과</p> | |
| 1210 | + <button type="button" class="tooltip-close" onclick="msgFailsClose(this);"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> | |
| 1211 | + </div> | |
| 1212 | + <div class="layer_in"> | |
| 1213 | + <div class="msg_text">발송 성공 : <strong>1</strong> 건,수신거부 : <span>0</span>건의<br>문자가 발송 되었습니다.</div> | |
| 1214 | + </div> | |
| 1215 | + <div class="popup_btn"> | |
| 1216 | + <button type="button" class="tooltip-close" onclick="msgFailsClose(this);">확인</button> | |
| 1217 | + </div> | |
| 1218 | + </div> | |
| 1219 | + </div> | |
| 1220 | + <div class="tooltip-wrap"> | |
| 1221 | + <!-- 문자발송 스팸 이용정지 레이어팝업 --> | |
| 1222 | + <div class="popup-com pop_msg_spam"> | |
| 1223 | + <div class="popup_heading"> | |
| 1224 | + <p>문자 전송 결과</p> | |
| 1225 | + <button type="button" class="tooltip-close" onclick="msgSpamClose(this);"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> | |
| 1226 | + </div> | |
| 1227 | + <div class="layer_in"> | |
| 1228 | + <div class="msg_text"></div> | |
| 1229 | + </div> | |
| 1230 | + <div class="popup_btn"> | |
| 1231 | + <button type="button" class="tooltip-close" onclick="msgSpamClose(this);">확인</button> | |
| 1232 | + </div> | |
| 1233 | + </div> | |
| 1234 | + </div> | |
| 1235 | + <div class="inner"> | |
| 1236 | + <!-- send top --> | |
| 1237 | + <div class="send_top"> | |
| 1238 | + <!-- tab button --> | |
| 1239 | + <%@include file="/WEB-INF/jsp/web/kakao/include/KaKaoAlimtalkTopMenuTap.jsp" %> | |
| 1240 | + <!--// tab button --> | |
| 1241 | + <!-- 카카오톡 설정 - 알림톡 템플릿 등록/관리 - 내템플릿 --> | |
| 1242 | + <div class="top_content kakaotalksend_cont current pay_tab_wrap"> | |
| 1243 | + <div class="send_general kakao_wrap"> | |
| 1244 | + <div class="send_left"> | |
| 1245 | + <table class="tType1"> | |
| 1246 | + <colgroup> | |
| 1247 | + <col style="width: 90px;"> | |
| 1248 | + <col style="width: auto;"> | |
| 1249 | + </colgroup> | |
| 1250 | + <tbody> | |
| 1251 | + <tr> | |
| 1252 | + <th>채널ID</th> | |
| 1253 | + <td> | |
| 1254 | + <label for="selectKakaoProfileList" class="채널ID 선택"></label> | |
| 1255 | + <select class="select_gray_type" id="selectKakaoProfileList" name="selectKakaoProfileList"> | |
| 1256 | + <option value="">채널ID 선택</option> | |
| 1257 | + <c:forEach var="kakaoProfileInfo" items="${kakaoProfileList}" varStatus="status"> | |
| 1258 | + <option value="${kakaoProfileInfo.senderKey}"><c:out value='${kakaoProfileInfo.yellowId}'/></option> | |
| 1259 | + </c:forEach> | |
| 1260 | + </select> | |
| 1261 | + | |
| 1262 | + </td> | |
| 1263 | + </tr> | |
| 1264 | + <tr> | |
| 1265 | + <th>템플릿</th> | |
| 1266 | + <td> | |
| 1267 | + <select class="select_gray_type" id="selectTemplateList" name="selectTemplateList"> | |
| 1268 | +<!-- <select name="" id="" class="select_gray_type"> --> | |
| 1269 | + <option value="">알림톡 템플릿 선택</option> | |
| 1270 | + </select> | |
| 1271 | +<!-- <button type="button" class="btnType btnType6" onclick="window.open('popup_allimtalk_template_choice.html','_blank','width=930, height=860, top=100, left=100, fullscreen=no, menubar=no, status=no, toolbar=no, titlebar=yes, location=no, scrollbars=yes')">템플릿 선택</button> --> | |
| 1272 | + <button type="button" class="btnType btnType6" onclick="javascript:fnTemplateReg(); return false;">템플릿 등록</button> | |
| 1273 | + <div class="variable_wrap"> | |
| 1274 | + <ul> | |
| 1275 | + <li>* 변수명 설정파일을 다운로드 받으신 후 전송대상과 변수를 입력 후 업로드해주세요.</li> | |
| 1276 | + <li>* 엑셀서식은 반드시 <span>텍스트 서식으로 등록</span>해주세요.</li> | |
| 1277 | + <li>* 한번에 전송가능한 <span>최대 발송건은 500건</span>입니다.</li> | |
| 1278 | + <li>* 배송조회시 운송장 번호는 <span>숫자만 등록</span>해주세요.</li> | |
| 1279 | + </ul> | |
| 1280 | + <button type="button" class="excel_btn" onclick="excelDownload();"><i></i> <c:out value="#"/>{변수명} 설정 파일 다운로드</button> | |
| 1281 | +<!-- <button type="button" class="excel_btn"><i></i> 변수명 설정 파일 다운로드</button> --> | |
| 1282 | + </div> | |
| 1283 | + </td> | |
| 1284 | + </tr> | |
| 1285 | + <tr> | |
| 1286 | + <th>받는사람</th> | |
| 1287 | + <td class="putText"> | |
| 1288 | + <div class="clearfix receipt_num receiver_wrap01"> | |
| 1289 | + <div class="receipt_num_top"> | |
| 1290 | + <label for="callTo" class="label">받는 번호입력</label> | |
| 1291 | + <input type="text" id="callTo" name="callTo" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" placeholder="번호를 입력하세요" onfocus="this.placeholder=''" onblur="this.placeholder='번호를 입력하세요'" style="width:340px;"> | |
| 1292 | + <button type="button" class="btnType btnType6 addCallToF">번호추가</button> | |
| 1293 | + </br> | |
| 1294 | + <span> | |
| 1295 | + <span class="vMiddle">*</span> 중복번호는 한번만 발송됩니다. | |
| 1296 | + </span> | |
| 1297 | + </br> | |
| 1298 | + <span> | |
| 1299 | + <span class="vMiddle">*</span> 한번에 전송가능한 최대 발송건은 500건 입니다. | |
| 1300 | + </span> | |
| 1301 | + </div> | |
| 1302 | + <div class="receipt_num_midde"> | |
| 1303 | + <div class="listType list01" > | |
| 1304 | + <div class="list_table list_head"> | |
| 1305 | + <div class="cb_wrap"> | |
| 1306 | + <label for="select_all" class="label"></label> | |
| 1307 | + <input type="checkbox" id="select_all"> | |
| 1308 | + </div> | |
| 1309 | + <div class="list_table_num"> | |
| 1310 | + <p>휴대폰</p> | |
| 1311 | +<!-- <img src="/publish/images/sortUp.png"> --> | |
| 1312 | +<!-- <img src="/publish/images/sortDown.png"> --> | |
| 1313 | + </div> | |
| 1314 | +<!-- <div class="list_table_name"> --> | |
| 1315 | +<!-- <p>이름</p> --> | |
| 1316 | +<!-- <img src="/publish/images/sortUp.png"> --> | |
| 1317 | +<!-- <img src="/publish/images/sortDown.png"> --> | |
| 1318 | +<!-- </div> --> | |
| 1319 | + </div> | |
| 1320 | + <div class="list_body_wrap" id="wrap01_body"> | |
| 1321 | + </div> | |
| 1322 | + </div> | |
| 1323 | + <div class="put_right"> | |
| 1324 | + <div class="btn_popup_wrap spc_wrap"> | |
| 1325 | + <button type="button" data-tooltip="popup06" class="btnType btnType7 popupAddr">주소록 불러오기</button> | |
| 1326 | + </div> | |
| 1327 | + <div class="btn_popup_wrap"> | |
| 1328 | + <button type="button" data-tooltip="popup02" class="btnType btnType7">엑셀 불러오기</button> | |
| 1329 | + </div> | |
| 1330 | + <div class="btn_popup_wrap"> | |
| 1331 | + <button type="button" data-tooltip="popup03" class="btnType btnType7 tab1">최근 전송내역</button> | |
| 1332 | + </div> | |
| 1333 | + <div class="btn_popup_wrap"> | |
| 1334 | + <button type="button" data-tooltip="popup03" class="btnType btnType7 tab2">자주보내는 번호</button> | |
| 1335 | + </div> | |
| 1336 | + <div class="btn_popup_wrap check_validity_wrap"> | |
| 1337 | + <button type="button" class="btnType btnType7" id="check_validity">오류검사 <i class="qmMark"></i></button> | |
| 1338 | + <div class="error_hover_cont send_hover_cont"> | |
| 1339 | + <p>휴대폰 번호 입력 시 해당 휴대폰 번호에 대한 형식이 어긋나거나 휴대폰 번호에 오류가 있는지 등을 검사하는 기능</p> | |
| 1340 | + <span>(예시) 010-1234-0001(O) / 010-123-0001(X)</span> | |
| 1341 | + </div> | |
| 1342 | + </div> | |
| 1343 | + </div> | |
| 1344 | + </div> | |
| 1345 | + <div class="list_bottom clearfix"> | |
| 1346 | + <div class="remove_btnWrap"> | |
| 1347 | + <button type="button" class="btnType15" id="all_del"><i class="remove_img"></i>전체삭제</button> | |
| 1348 | + <button type="button" class="btnType15" id="select_del"><i class="remove_img"></i>선택삭제</button> | |
| 1349 | + </div> | |
| 1350 | + <div class="list_bottom_right"> | |
| 1351 | + <p>총 <span class="c_e40000" id="rowTotCnt">0</span>건 / 중복 <span class="c_002c9a" id="rowDupCnt">0</span>건</p> | |
| 1352 | +<!-- <button type="button" class="address_reg2">주소록에 등록</button> --> | |
| 1353 | + </div> | |
| 1354 | + </div> | |
| 1355 | + </div> | |
| 1356 | + <div class="clearfix receipt_num receiver_wrap02"> | |
| 1357 | + <div class="receipt_num_top"> | |
| 1358 | + <input type="text" placeholder="선택된 파일이 없습니다." onfocus="this.placeholder=''" onblur="this.placeholder='번호를 입력하세요'" style="width:340px;"> | |
| 1359 | + <button type="button" class="btnType btnType6" id="fileClick"/>파일선택</button> | |
| 1360 | + <input type="file" id="excelFile" accept=".xls, .xlsx" onchange="excelExportVarAjax(event); return false;" style="display:none"/> | |
| 1361 | + <!-- <input type="file" id="excelFile" accept=".xls, .xlsx" onchange="excelExport02(event); return false;" style="display:none"/> --> | |
| 1362 | + </div> | |
| 1363 | + <div class="receipt_num_midde"> | |
| 1364 | + <div class="listType list01" id="wrap02"> | |
| 1365 | + <!-- /publish/kakao_allimtalk_send.html 참고 --> | |
| 1366 | + <div class="list_table list_head" id="excelHead"> | |
| 1367 | + </div> | |
| 1368 | + <div class="list_body_wrap" id="excelBody02"> | |
| 1369 | + </div> | |
| 1370 | + </div> | |
| 1371 | + </div> | |
| 1372 | + </div> | |
| 1373 | + </td> | |
| 1374 | + </tr> | |
| 1375 | + <tr> | |
| 1376 | + <th colspan="2" class="billingAmount"> | |
| 1377 | + <div> | |
| 1378 | + <div class="final_pay"> | |
| 1379 | + <div class="pay_info_list"> | |
| 1380 | + <p>발송금액 :</p> | |
| 1381 | + <div class="info" id="repPriceTxt" style="display: none;"> | |
| 1382 | +<!-- <div class="info" id="repPriceTxt"> --> | |
| 1383 | +<!-- 단문 : <strong>20</strong>건<span>/</span> --> | |
| 1384 | +<!-- 장문 :<strong>150</strong>건<span>/</span> --> | |
| 1385 | +<!-- 그림문자 :<strong>30</strong>건 --> | |
| 1386 | + </div> | |
| 1387 | + </div> | |
| 1388 | + <p class="price"><span id="repPriceTxt"></span><span id="totalPriceTxt">0.0</span> 원<span></span></p> | |
| 1389 | + </div> | |
| 1390 | + <div class="pay_type clearfix"> | |
| 1391 | + <fmt:formatNumber type="number" maxFractionDigits="3" value="${userMoney}" var="commaPrice" /> | |
| 1392 | + <div> | |
| 1393 | + <input type="radio" id="radio_bill_1" name="radio_bill" checked="checked"> | |
| 1394 | + <label for="radio_bill_1">보유잔액</label> | |
| 1395 | + <label for="userMoney" class="la bel">보유잔액</label> | |
| 1396 | + <input type="text" id="userMoney" name="userMoney" value="<c:out value='${commaPrice}'/>" readonly> | |
| 1397 | + <span class="won">원</span> | |
| 1398 | + <button type="button" class="btnType btnType21" onclick="location.href='/web/member/pay/PayView.do'">충전</button> | |
| 1399 | + </div> | |
| 1400 | + <div></div> | |
| 1401 | + </div> | |
| 1402 | + </div> | |
| 1403 | + </th> | |
| 1404 | + </tr> | |
| 1405 | + <tr> | |
| 1406 | + <th colspan="2" class="replace_send_th"> | |
| 1407 | + <div class="title_th"><p>대체문자</p> | |
| 1408 | + <input type="checkbox" id="send_fail_check" style="margin: 0 8px 0 0;"><label for="send_fail_check">알림톡 전송 실패 시 문자 전송</label> | |
| 1409 | + </div> | |
| 1410 | + <div class="replace_send_wrap"> | |
| 1411 | +<!-- <div class="replace_send_wrap" style="display: block;"> --> | |
| 1412 | + <table class="tType1"> | |
| 1413 | + <colgroup> | |
| 1414 | + <col style="width: 90px;"> | |
| 1415 | + <col style="width: auto;"> | |
| 1416 | + </colgroup> | |
| 1417 | + <tbody> | |
| 1418 | + <tr> | |
| 1419 | + <th>발신번호</th> | |
| 1420 | + <td class="put_num"> | |
| 1421 | + <label for="callFromList" class="label"></label> | |
| 1422 | + <select id="callFromList" name="callFromList" class="sel_number"> | |
| 1423 | + <c:choose> | |
| 1424 | + <c:when test="${not empty resultPhonList}"> | |
| 1425 | + <c:forEach var="phonList" items="${resultPhonList}" varStatus="status"> | |
| 1426 | + <option value="${phonList}">${phonList}</option> | |
| 1427 | + </c:forEach> | |
| 1428 | + </c:when> | |
| 1429 | + <c:otherwise> | |
| 1430 | + <option value="">등록된 발신 번호가 없습니다.</option> | |
| 1431 | + </c:otherwise> | |
| 1432 | + </c:choose> | |
| 1433 | + </select> | |
| 1434 | + <button type="button" class="btnType btnType6" onclick="location.href='/web/user/sendNumberManage.do'">번호등록</button> | |
| 1435 | + </td> | |
| 1436 | + </tr> | |
| 1437 | + <tr> | |
| 1438 | + <th>내용</th> | |
| 1439 | + <td class="putText"> | |
| 1440 | + <div class="clearfix"> | |
| 1441 | + <div class="put_left short"> | |
| 1442 | + <!-- 업로드한 이미지의 썸네일 영역 --> | |
| 1443 | + <ul class="thumb_wrap liOnImg ui-sortable"></ul> | |
| 1444 | + <!-- //업로드한 이미지의 썸네일 영역 --> | |
| 1445 | + <label for="smsTxtArea" class="label"></label> | |
| 1446 | + <textarea id="smsTxtArea" name="smsTxtArea" class="put_text"></textarea> | |
| 1447 | + <div class="text_length"> | |
| 1448 | + <div name="afterDeny" id="afterDeny"> | |
| 1449 | + <p> | |
| 1450 | + <span class="fwMd" id="msgLeng">0 / | |
| 1451 | + </span> | |
| 1452 | + <span class="c_002c9a fwMd" id="limitLeng">90</span>byte | |
| 1453 | + </p> | |
| 1454 | + <span | |
| 1455 | + class="msg_com msg_short">단문</span> | |
| 1456 | + </div> | |
| 1457 | + </div> | |
| 1458 | + </div> | |
| 1459 | + <div class="put_right"> | |
| 1460 | + <button type="button" class="btnType btnType9" id="failCheckInit">초기화</button> | |
| 1461 | + <button type="button" class="btnType btnType7" onclick="javascript:fn_errorChk(); return false;">오류검사<i class="qmMark"></i></button> | |
| 1462 | +<!-- <button type="button" class="btnType btnType8" onclick="showPotoediter();">이미지 불러오기</button> --> | |
| 1463 | +<!-- <div class="send_btnWrap"> --> | |
| 1464 | +<!-- <button type="button" class="btnType btnType9">문자저장</button> --> | |
| 1465 | +<!-- </div> --> | |
| 1466 | + </div> | |
| 1467 | + | |
| 1468 | + </div> | |
| 1469 | +<!-- <p id="lowText">* 현재 [<span id="nowMsgType">단문</span>] <span class="c_e40000 fwBold nowMsgCnt">0</span>건 발송 가능합니다.</p> --> | |
| 1470 | + </td> | |
| 1471 | + </tr> | |
| 1472 | + </tbody> | |
| 1473 | + </table> | |
| 1474 | + </div> | |
| 1475 | + </th> | |
| 1476 | + </tr> | |
| 1477 | + </tbody> | |
| 1478 | + </table> | |
| 1479 | + </div> | |
| 1480 | + <div class="send_right"> | |
| 1481 | + <div class="phone"> | |
| 1482 | + <div class="phoneIn"> | |
| 1483 | + <p class="prev_p" id="prev_p_top"><img src="/publish/images/content/kakao_prev_icon.png" alt=""></p> | |
| 1484 | + <!-- 텍스트 미리보기 --> | |
| 1485 | + <div class="text_preview"> | |
| 1486 | + <div class="allimtalk_title"> | |
| 1487 | + <img src="/publish/images/content/icon_allimtalk.png" alt="">알림톡 도착 | |
| 1488 | + </div> | |
| 1489 | + <div class="allimtalk_content" id="alimtalkTemplate"> | |
| 1490 | + <p class="emphasis_side_text">템플릿을 선택해 주세요</p> | |
| 1491 | + </div> | |
| 1492 | + </div> | |
| 1493 | + <!-- //텍스트 미리보기 --> | |
| 1494 | + <div class="template_info_wrap"> | |
| 1495 | + <div class="template_byte"> | |
| 1496 | +<!-- <p><span class="fwMd" id="msgLeng">50 / </span><span class="c_002c9a fwMd" id="limitLeng">2000</span>byte</p> --> | |
| 1497 | + </div> | |
| 1498 | + <button type="button" class="btn_template_choice" id="reSelectBtn">템플릿 재선택</button> | |
| 1499 | + </div> | |
| 1500 | + </div> | |
| 1501 | + <p class="addText">※ 단말기 설정에 따라 다르게 보일 수 있습니다<p> | |
| 1502 | + </div> | |
| 1503 | + <div class="phone_bottom"> | |
| 1504 | + <div class="send_rev"> | |
| 1505 | + <div class="send_content" style="padding-bottom: 0;"> | |
| 1506 | + <div class="rev_radio"> | |
| 1507 | + <ul> | |
| 1508 | + <li> | |
| 1509 | + <input type="radio" id="reserYnN" name="reserYn" value="N" checked="checked"><label for="reserYnN">즉시</label> | |
| 1510 | + </li> | |
| 1511 | + <li> | |
| 1512 | + <input type="radio" id="reserYnY" name="reserYn" value="Y"><label for="reserYnY">예약</label> | |
| 1513 | + </li> | |
| 1514 | + </ul> | |
| 1515 | + </div> | |
| 1516 | + <div class="send_btn"> | |
| 1517 | + <button type="button" class="btnType btnType11" onclick="javascript:sendTemplateInfo(); return false;">발송하기</button> | |
| 1518 | + <button type="button" class="btnType btnType10" onclick="javascript:goToKakaoTestPopUp(); return false;">테스트발송</button> | |
| 1519 | + </div> | |
| 1520 | + </div> | |
| 1521 | + <div class="rev_selected"> | |
| 1522 | + <div class="rev_top"> | |
| 1523 | + <span>날짜 :</span> | |
| 1524 | + <div class="calendar_wrap"> | |
| 1525 | + <input type="text" class="startDate2 inp resDate calendar picker__input picker__input--active" title="검색 시작일" id="startDate2" name="startDate2" value="" data-datecontrol="true" readonly="" aria-haspopup="true" aria-expanded="true" aria-readonly="false" aria-owns="startDate2_root"> | |
| 1526 | + </div> | |
| 1527 | + <label for="msgResHour" class="label">시 선택</label> | |
| 1528 | + <div class="selBox"> | |
| 1529 | + <select class="selType1" id="msgResHour" name="msgResHour"> | |
| 1530 | + <c:forEach var="hour" begin="0" end="23" step="1" varStatus="status"> | |
| 1531 | + <c:choose> | |
| 1532 | + <c:when test="${hour < 10}"> | |
| 1533 | + <option value="0${hour}">0${hour}시</option> | |
| 1534 | + </c:when> | |
| 1535 | + <c:otherwise> | |
| 1536 | + <option value="${hour}">${hour}시</option> | |
| 1537 | + </c:otherwise> | |
| 1538 | + </c:choose> | |
| 1539 | + </c:forEach> | |
| 1540 | + </select> | |
| 1541 | + <label for="msgResMin" class="label">분 선택</label> | |
| 1542 | + <select class="selType1" id="msgResMin" name="msgResMin"> | |
| 1543 | + <c:forEach var="min" begin="0" end="55" step="5"> | |
| 1544 | + <c:choose> | |
| 1545 | + <c:when test="${min < 10}"> | |
| 1546 | + <option value="0${min}">0${min}분</option> | |
| 1547 | + </c:when> | |
| 1548 | + <c:otherwise> | |
| 1549 | + <option value="${min}">${min}분</option> | |
| 1550 | + </c:otherwise> | |
| 1551 | + </c:choose> | |
| 1552 | + </c:forEach> | |
| 1553 | + </select> | |
| 1554 | + </div> | |
| 1555 | + </div> | |
| 1556 | + <div class="rev_bottom"> | |
| 1557 | + <input type="checkbox" id="inputDivideChk" name="inputDivideChk"> | |
| 1558 | + <label for="inputDivideChk">분할전송</label> | |
| 1559 | + <input type="text" class="dividType1" id="frmDivideCnt" name="frmDivideCnt" value="20" onkeypress='return checkNumber(event)' maxlength="4"/> | |
| 1560 | + <label for="frmDivideCnt">건씩</label> | |
| 1561 | + <select class="selType1" id="divideTime" name="divideTime"> | |
| 1562 | + <option value="5">05분</option> | |
| 1563 | + <option value="10">10분</option> | |
| 1564 | + <option value="15">15분</option> | |
| 1565 | + <option value="20">20분</option> | |
| 1566 | + <option value="30">30분</option> | |
| 1567 | + </select> | |
| 1568 | + <label for="divideTime">간격</label> | |
| 1569 | + </div> | |
| 1570 | + </div> | |
| 1571 | + </div> | |
| 1572 | + </div> | |
| 1573 | + </div> | |
| 1574 | + </div> | |
| 1575 | + </div> | |
| 1576 | + </div> | |
| 1577 | + </div> | |
| 1578 | + <!--// send top --> | |
| 1579 | + | |
| 1580 | +<!-- 주소록 불러오기 --> | |
| 1581 | +<div class="tooltip-wrap"> | |
| 1582 | + <div class="popup-com import_layer popup06" tabindex="0" data-tooltip-con="popup06" data-focus="popup06" data-focus-prev="popup06-close" style="width: 1000px"> | |
| 1583 | + <div class="popup_heading"> | |
| 1584 | + <p><span>주소록 불러오기</p> | |
| 1585 | + <button type="button" onClick="javascript:addrClose(); return false;"> | |
| 1586 | + <img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> | |
| 1587 | + </div> | |
| 1588 | + <div class="layer_in"> | |
| 1589 | + <div class="titBox titBox_pad"> | |
| 1590 | + <p>- 주소록 수정 및 변경은 <span>[주소록 관리]</span>에서만 가능합니다.</p> | |
| 1591 | + <button type="button" class="adr_admin" onClick="location.href='/web/mjon/addr/selectAddrList.do'">주소록 관리</button> | |
| 1592 | + </div> | |
| 1593 | + <div class="adr_wrap"> | |
| 1594 | + <form id="searchAddrGrpForm" name="searchAddrGrpForm" method="post" style="display: flex; justify-content: space-between;"> | |
| 1595 | + <input type="hidden" id="searchAddrGrpId" name="searchAddrGrpId" value=""/> | |
| 1596 | + <input type="hidden" id="type" name="type" value="all"/> | |
| 1597 | + <input type="hidden" id="searchKeyword" name="searchKeyword" value=""/> | |
| 1598 | + <input type="hidden" name="searchCondition" id="searchCondition" value="0" /> | |
| 1599 | + <div class="adr_pop_left"> | |
| 1600 | + <div class="adr_left_search"> | |
| 1601 | + <label for="searchGrpKeyword" class="label">그룹명 검색</label> | |
| 1602 | + <input type="text" name="searchGrpKeyword" id="searchGrpKeyword" placeholder="그룹명 검색" onfocus="this.placeholder=''" onblur="this.placeholder='그룹명 검색'" class="inputLight"> | |
| 1603 | + <button type="button" onClick="javascrit:fnAddrGrpSearch(); return false;"><img src="/publish/images/popup/search.png" alt="검색"></button> | |
| 1604 | + </div> | |
| 1605 | + <div class="adr_pop_box"> | |
| 1606 | + <div id="addrGroupLoad"> | |
| 1607 | + </div> | |
| 1608 | + </div> | |
| 1609 | + <!-- <div class="popup_btn"> | |
| 1610 | + <button type="button" class="btnType" onClick="javascript:fnSelectAddrGrpList(); return false;">선택 그룹 추가</button> | |
| 1611 | + </div> --> | |
| 1612 | + </div> | |
| 1613 | + <div class="adr_pop_right"> | |
| 1614 | + <div class="clearfix"> | |
| 1615 | + <div class="btnWrap_last"> | |
| 1616 | + <label for="searchAddrCondition" class="label">카테고리 선택</label> | |
| 1617 | + <select id="searchAddrCondition" name="searchAddrCondition" class="selType2"> | |
| 1618 | + <option value='0'>전체</option> | |
| 1619 | + <option value='1'>그룹명</option> | |
| 1620 | + <option value='2'>이름</option> | |
| 1621 | + <option value='3'>핸드폰번호</option> | |
| 1622 | + </select> | |
| 1623 | + <label for="searchAddrKeyword" class="label">검색어 입력</label> | |
| 1624 | + <input type="text" id="searchAddrKeyword" name="searchAddrKeyword" placeholder="검색어를 입력하세요" onfocus="this.placeholder=''" onblur="this.placeholder='검색어를 입력하세요'" > | |
| 1625 | + <button type="button" class="btnType btnType17" onClick="javascrit:fnAddrSearch(); return false;">검색</button> | |
| 1626 | + </div> | |
| 1627 | + <!-- table --> | |
| 1628 | + <div class="adr_excel adr_pop_list2 callAddr_box"> | |
| 1629 | + </div> | |
| 1630 | + <!--// table --> | |
| 1631 | + </div> | |
| 1632 | + <div class="popup_btn_wrap2"> | |
| 1633 | + <button type="button" onClick="javascript:addrToList(); return false;">추가</button> | |
| 1634 | + <button type="button" onClick="javascript:addrClose(); return false;">닫기</button> | |
| 1635 | + </div> | |
| 1636 | + <%-- 주소록 레이어 팝업 닫기 실행 코드 --%> | |
| 1637 | + <input type="hidden" name="btnAddrClose" id="btnAddrClose" class="tooltip-close closeAddr" data-focus="popup06-close" /> | |
| 1638 | + </div> | |
| 1639 | + </form> | |
| 1640 | + </div> | |
| 1641 | + </div> | |
| 1642 | + </div> | |
| 1643 | +</div> | |
| 1644 | +<!--// 주소록 불러오기 --> | |
| 1645 | + | |
| 1646 | +<!-- 최근 전송 내역 --> | |
| 1647 | +<div class="tooltip-wrap"> | |
| 1648 | + <div class="popup-com history_layer popup03" tabindex="0" data-tooltip-con="popup03" data-focus="popup03" data-focus-prev="popup03-close"> | |
| 1649 | + <div class="popup_heading"> | |
| 1650 | + <p><span>전송내역</p> | |
| 1651 | + <button type="button" class="tooltip-close" data-focus="popup03-close" id="btnLatestAddPhoneClose"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> | |
| 1652 | + </div> | |
| 1653 | + <div class="layer_in"> | |
| 1654 | + <!-- tab button --> | |
| 1655 | + <ul class="tabType6"> | |
| 1656 | + <li class="tab active"><button type="button" onclick="TabType(this,'1');">최근 전송내역</button></li> | |
| 1657 | + <li class="tab"><button type="button" onclick="TabType(this,'2');">자주보내는 번호</button></li> | |
| 1658 | + </ul><!--// tab button --> | |
| 1659 | + <!-- 최근 전송내역 --> | |
| 1660 | + <div class="history_cont hascont current"> | |
| 1661 | + <div class="histroy_trans latestMsgArea" id="latestMsgArea"> | |
| 1662 | + <ul id="latestMsgUl"> | |
| 1663 | + <c:choose> | |
| 1664 | + <c:when test="${not empty resultLatestMsgList}"> | |
| 1665 | + <c:forEach var="latestMsgList" items="${resultLatestMsgList}" varStatus="status"> | |
| 1666 | + <li id="latestLi"> | |
| 1667 | + <input type="checkbox" id="addrChk_${status.count}" name="latAddrChk" value="<c:out value='${latestMsgList.callTo}'/>"> | |
| 1668 | + <label for="addrChk_${status.count}" class="label">최근 전송내역</label> | |
| 1669 | + <p><c:out value="${latestMsgList.callTo}"/></p> | |
| 1670 | + <button type="button" id="latestAddrDel"><img src="/publish/images/popup/close3.png" alt="전화번호 삭제"></button> | |
| 1671 | + </li> | |
| 1672 | + </c:forEach> | |
| 1673 | + </c:when> | |
| 1674 | + <c:otherwise> | |
| 1675 | + <li> | |
| 1676 | + <p>최근 발송 내역이 없습니다.</p> | |
| 1677 | + </li> | |
| 1678 | + </c:otherwise> | |
| 1679 | + </c:choose> | |
| 1680 | + </ul> | |
| 1681 | + </div> | |
| 1682 | + <div class="popup_btn_wrap2 hisroy_btn"> | |
| 1683 | + <button type="button" id="latestAddPhone">선택추가</button> | |
| 1684 | + <button type="button" id="latestCancelPhone">선택취소</button> | |
| 1685 | + </div> | |
| 1686 | + </div><!--// 최근 전송내역 --> | |
| 1687 | + <!-- 자주보내는 번호 --> | |
| 1688 | + <div class="history_cont hascont"> | |
| 1689 | + <div class="histroy_trans" id="bookMarkMsgArea"> | |
| 1690 | + <ul id="bookMsgUl"> | |
| 1691 | + <c:choose> | |
| 1692 | + <c:when test="${not empty resultBookMarkMsgList}"> | |
| 1693 | + <c:forEach var="bookMarkMsgList" items="${resultBookMarkMsgList}" varStatus="status"> | |
| 1694 | + <li id="bookMarkLi"> | |
| 1695 | + <input type="checkbox" id="bokAddrChk_${status.count}" name="bookAddrChk" value="<c:out value='${bookMarkMsgList.addrPhoneNo}'/>"> | |
| 1696 | + <label for="addrChk_${status.count}" class="label">최근 전송내역</label> | |
| 1697 | + <p><c:out value="${bookMarkMsgList.addrPhoneNo}"/></p> | |
| 1698 | + <button type="button" id="bookMarkAddrDel"><img src="/publish/images/popup/close3.png" alt="전화번호 삭제"></button> | |
| 1699 | + </li> | |
| 1700 | + </c:forEach> | |
| 1701 | + </c:when> | |
| 1702 | + <c:otherwise> | |
| 1703 | + <li> | |
| 1704 | + <p>등록된 자주 보내는 번호 내역이 없습니다.</p> | |
| 1705 | + </li> | |
| 1706 | + </c:otherwise> | |
| 1707 | + </c:choose> | |
| 1708 | + </ul> | |
| 1709 | + </div> | |
| 1710 | + <div class="popup_btn_wrap2 hisroy_btn"> | |
| 1711 | + <button type="button" id="bookMarkAddPhone">선택추가</button> | |
| 1712 | + <button type="button" id="bookMarkCancelPhone">선택취소</button> | |
| 1713 | + </div> | |
| 1714 | + </div><!--// 자주보내는 번호 --> | |
| 1715 | + </div> | |
| 1716 | + </div> | |
| 1717 | +</div> | |
| 1718 | +<!--// 전송내역 팝업 --> | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | +<!-- 엑셀 불러오기 --> | |
| 1723 | +<form id="excelToolTipForm" name="excelToolTipForm" method="post"> | |
| 1724 | + <div class="tooltip-wrap"> | |
| 1725 | + <div class="popup-com import_layer popup02" tabindex="0" data-tooltip-con="popup02" data-focus="popup02" data-focus-prev="popup02-close"> | |
| 1726 | + <div class="popup_heading"> | |
| 1727 | + <p><span>엑셀</span> 불러오기</p> | |
| 1728 | + <button type="button" class="tooltip-close" data-focus="popup02-close"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> | |
| 1729 | + </div> | |
| 1730 | + <div class="layer_in"> | |
| 1731 | + <!-- 엑셀파일 불러오기 --> | |
| 1732 | + <div class="hascont"> | |
| 1733 | + <div class="titBox"> | |
| 1734 | + <p>- 최대 2만 건까지 등록할 수 있습니다.</p> | |
| 1735 | + <p>- [엑셀 불러오기]시 문서의 A, B열을 불러옵니다.(지원하는 파일 형식 : xls, xlsx)</p> | |
| 1736 | + <p>- 휴대폰 항목은 숫자, 하이픈(-)만 인식하며, 번호 앞에 0이 생략되어도 정상 등록됩니다. | |
| 1737 | + </p> | |
| 1738 | + <!-- <button type="button" class="excel_btn" onclick="location.href='/cmm/fms/FileDown.do?atchFileId=FILE_000000000011651&fileSn=1'"><i></i>샘플파일 다운로드</button> --> | |
| 1739 | + <button type="button" class="excel_btn" onclick="location.href='/download/msg/알림톡_엑셀주소록_등록양식.xlsx'"><i class="downroad"></i>샘플파일 다운로드</button> | |
| 1740 | + </div> | |
| 1741 | + <div class="attachedFile"> | |
| 1742 | + <label for="excelNm01" class="attachedFile_label">첨부파일</label> | |
| 1743 | + <input type="text" id="excelNm01" value="" readonly> | |
| 1744 | + <input type="file" id="excelFile01" accept=".xls, .xlsx" onchange="excelExportAjax(event); return false;" style="display:none"/> | |
| 1745 | + <!-- <input type="file" id="excelFile01" accept=".xls, .xlsx" onchange="excelExport01(event); return false;" style="display:none"/> --> | |
| 1746 | + <button type="button" class="btnType btnType6 c1">찾아보기</button> | |
| 1747 | +<!-- <p><span class="vMiddle">*</span> 첨부된 파일은 <span class="c_e40000">[추가]버튼을 클릭</span>하셔야 받는 사람에 등록됩니다.</p> --> | |
| 1748 | + <p><span class="vMiddle">*</span> 첨부된 파일은 <span class="c_e40000">[추가]버튼을 클릭</span>하셔야 받는 사람에 등록됩니다.</p> | |
| 1749 | + </div> | |
| 1750 | + </div><!--// 엑셀파일 불러오기 --> | |
| 1751 | + <div class="popup_btn_wrap2"> | |
| 1752 | + <button type="button" class="tooltip-close" data-focus="popup02-close" data-focus-next="popup02" onclick="excelAddAjax()">추가</button> | |
| 1753 | + <!-- <button type="button" class="tooltip-close" data-focus="popup02-close" data-focus-next="popup02" onclick="excelAdd()">추가</button> --> | |
| 1754 | + <button type="button" class="tooltip-close" data-focus="popup02-close" data-focus-next="popup02">닫기</button> | |
| 1755 | + </div> | |
| 1756 | + </div> | |
| 1757 | + </div> | |
| 1758 | + </div><!--// 엑셀 불러오기 --> | |
| 1759 | +</form> | |
| 1760 | +<form id="excelVarFileForm" name="excelVarFileForm" method="post"> | |
| 1761 | + <input type="hidden" id="excelVarCnt" name="excelVarCnt" value="0"/> | |
| 1762 | + <input type="hidden" id="excelVarList" name="excelVarList" value=""/> | |
| 1763 | + | |
| 1764 | +</form> | |
| 1765 | + | |
| 1766 | +<form id="msgResendForm" name="msgResendForm" method="post"> | |
| 1767 | + <input name="msgResendFlag" type="hidden" value="N"/> | |
| 1768 | + <input name="msgSeqList" type="hidden" value=""/> | |
| 1769 | +</form> | |
| 1770 | +<form id="moveAddrForm" name="moveAddrForm" method="post"> | |
| 1771 | + <input name="moveAddrFlag" type="hidden" value="N"/> | |
| 1772 | + <input name="addrIdList" type="hidden" value=""/> | |
| 1773 | +</form> |
+++ src/main/webapp/WEB-INF/jsp/web/kakao/msgdata/at/KakaoAlimtalkMsgDataView_tmp.jsp
... | ... | @@ -0,0 +1,219 @@ |
| 1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | |
| 2 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | |
| 3 | +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> | |
| 4 | +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> | |
| 5 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> | |
| 6 | +<%@ page import="itn.com.cmm.LoginVO" %> | |
| 7 | + | |
| 8 | +<!-- <script src="/publish/js/content.js"></script> --> | |
| 9 | +<!-- 주소록관련 js --> | |
| 10 | +<script type="text/javascript" defer src="<c:out value='/js/kakao/at/init.js' />"></script> | |
| 11 | +<script type="text/javascript" src="<c:out value='/js/kakao/at/tabulator.js' />"></script> | |
| 12 | +<script type="text/javascript" src="<c:out value='/js/kakao/at/addr.js' />"></script> | |
| 13 | +<script type="text/javascript" src="<c:out value='/js/kakao/at/alimtalkExcel.js' />"></script> | |
| 14 | +<script type="text/javascript" src="<c:out value='/js/kakao/at/priceClclt.js' />"></script> | |
| 15 | +<script type="text/javascript" src="<c:out value='/js/common/popup.js' />"></script> | |
| 16 | +<script type="text/javascript"> | |
| 17 | +/* | |
| 18 | + * 등록된 발신 탬플릿 카카오톡 전송 | |
| 19 | + */ | |
| 20 | + | |
| 21 | + | |
| 22 | +function send_many(cnt){ | |
| 23 | + for(var i = 0 ; i < cnt ; i ++){ | |
| 24 | + sendTemplateInfo(); | |
| 25 | + } | |
| 26 | +} | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | +function sendTemplateInfo(){ | |
| 31 | + | |
| 32 | + var data = new FormData(document.bizForm); | |
| 33 | + $.ajax({ | |
| 34 | + type: "POST" | |
| 35 | + , url: "/web/mjon/kakao/alimtalk/kakaoAlimTalkMsgSendAjax.do" | |
| 36 | + , data: data | |
| 37 | + , dataType: 'json' | |
| 38 | + , async: true | |
| 39 | + , processData: false | |
| 40 | + , contentType: false | |
| 41 | + , cache: false | |
| 42 | + , success: function (returnData, status) { | |
| 43 | + if(status == 'success'){ | |
| 44 | + if("loginFail" == returnData.result){ | |
| 45 | + | |
| 46 | + alert(returnData.message); | |
| 47 | + return false; | |
| 48 | + | |
| 49 | + }else if('fail' == returnData.result){ | |
| 50 | + | |
| 51 | + alert(returnData.message); | |
| 52 | + return false; | |
| 53 | + | |
| 54 | + }else if('authFail' == returnData.result){ | |
| 55 | + | |
| 56 | + alert(returnData.message); | |
| 57 | + location.reload(); | |
| 58 | + | |
| 59 | + } else if(status == 'success'){ | |
| 60 | + | |
| 61 | + var kakaoSendCnt = returnData.resultSts; | |
| 62 | + | |
| 63 | + $('.pop_msg_success').css({'display':'block','opacity':'1','left':'50%','top':'50%','transform':'translate(-50%,-50%)'}); | |
| 64 | + | |
| 65 | + //예약발송 건의 경우 결과 팝업 문구 변경 | |
| 66 | + if(reserYn == 'Y'){ | |
| 67 | + $('.pop_msg_success .msg_text').html("예약 성공 : <strong>"+ kakaoSendCnt + "</strong>건의<br>알림톡이 예약 되었습니다."); | |
| 68 | + }else{ | |
| 69 | + $('.pop_msg_success .msg_text').html("발송 성공 : <strong>"+ kakaoSendCnt + "</strong>건의<br>알림톡이 발송 되었습니다."); | |
| 70 | + } | |
| 71 | + | |
| 72 | + $('.mask').addClass('on'); | |
| 73 | + } | |
| 74 | + } | |
| 75 | + } | |
| 76 | + ,beforeSend : function(xmlHttpRequest) { | |
| 77 | + //로딩창 show | |
| 78 | + $('.loading_layer').addClass('active'); | |
| 79 | + } | |
| 80 | + ,complete : function(xhr, textStatus) { | |
| 81 | + //로딩창 hide | |
| 82 | + $('.loading_layer').removeClass('active'); | |
| 83 | + } | |
| 84 | + ,error: function (e) { | |
| 85 | + console.log("ERROR : ", e); | |
| 86 | + alert("카카오 알림톡 전송에 실패하였습니다."); | |
| 87 | + } | |
| 88 | + }); | |
| 89 | +} | |
| 90 | + | |
| 91 | + | |
| 92 | +</script> | |
| 93 | + | |
| 94 | + <div class="loading_layer"> | |
| 95 | + <div class="loading_container"> | |
| 96 | + <div class="bar"></div> | |
| 97 | + <div class="text">Loading</div> | |
| 98 | + </div> | |
| 99 | + </div> | |
| 100 | + | |
| 101 | + <form id="bizForm" name="bizForm" method="post"> | |
| 102 | + <input type="hidden" id="menuTopTab" name="menuTopTab" value="tabAlim"> | |
| 103 | + <input type="hidden" id="senderKey" name="senderKey" value="669143473b1af459628b8bdf2f48da090c8895de"> <!-- 카카오 보내는 사람 Key --> | |
| 104 | + <input type="hidden" id="templateCode" name="templateCode" value="bizp_2023040511022617802391882"> <!-- 카카오 전송 templat Code --> | |
| 105 | + | |
| 106 | + <input type="hidden" id="templateEmphasizeType" name="templateEmphasizeType" value="TEXT"> <!-- 카카오 전송 templateEmphasizeType 타입 --> | |
| 107 | + | |
| 108 | + <input type="hidden" id="templateContent" name="templateContent" value="test"> <!-- 카카오 전송 templat내용 --> | |
| 109 | + <input type="hidden" id="templateTitle" name="templateTitle" value="test"> <!-- 카카오 전송 templat 타이틀 --> | |
| 110 | + <input type="hidden" id="templateSubtitle" name="templateSubtitle" value="test"> <!-- 카카오 전송 templat 서브 타이틀 --> | |
| 111 | + | |
| 112 | + <input type="hidden" id="subMsgTxtReplYn" name="subMsgTxtReplYn" value=""> <!-- 대체문자 전송내용에 변환문자가 있는지--> | |
| 113 | + <input type="hidden" id="subMsgSendYn" name="subMsgSendYn" value="N"> <!-- 대체문자 전송여부 - 알림톡 전송 실패 시 문자 전송--> | |
| 114 | + <input type="hidden" id="subMsgTxt" name="subMsgTxt" value=""> <!-- 대체문자 전송내용 --> | |
| 115 | + <input type="hidden" id="txtReplYn" name="txtReplYn" value="N"> <!-- 완 치환문자 여부 - --> | |
| 116 | + <input type="hidden" id="bizJsonYn" name="bizJsonYn" value="N"> <!-- JSON 생성 여부 --> | |
| 117 | + | |
| 118 | + <input type="hidden" id="reserveYn" name="reserveYn" value="N"> <!-- 예약문자 여부 - 예약 선택 여부 // 아래 하단 화면 노출 여부도 같이--> | |
| 119 | + <input type="hidden" id="reqDate" name="reqDate" value=""> <!--전송일자--> | |
| 120 | + | |
| 121 | + <input type="hidden" id="divideChk" name="divideChk" value=""> <!--전송일자--> | |
| 122 | + <input type="hidden" id="divideCnt" name="divideCnt" value=""> <!--전송일자--> | |
| 123 | + <input type="hidden" id="divideTime" name="divideTime" value=""> <!--전송일자--> | |
| 124 | + | |
| 125 | + <input type="hidden" id="callFrom" name="callFrom" value="01093414986"> <!--완 보내는사람 --> | |
| 126 | + <input type="hidden" id="callToList" name="callToList" value="01012345678,01012345679,01012345680,01012345681,01012345682,01012345683,01012345684,01012345685,01012345686,01012345687,01012345688,01012345689,01012345690,01012345691,01012345692,01012345693,01012345694,01012345695,01012345696,01012345697,01012345698,01012345699,01012345700,01012345701,01012345702,01012345703,01012345704,01012345705,01012345706,01012345707,01012345708,01012345709,01012345710,01012345711,01012345712,01012345713,01012345714,01012345715,01012345716,01012345717,01012345718,01012345719,01012345720,01012345721,01012345722,01012345723,01012345724,01012345725,01012345726,01012345727,01012345728,01012345729,01012345730,01012345731,01012345732,01012345733,01012345734,01012345735,01012345736,01012345737,01012345738,01012345739,01012345740,01012345741,01012345742,01012345743,01012345744,01012345745,01012345746,01012345747,01012345748,01012345749,01012345750,01012345751,01012345752,01012345753,01012345754,01012345755,01012345756,01012345757,01012345758,01012345759,01012345760,01012345761,01012345762,01012345763,01012345764,01012345765,01012345766,01012345767,01012345768,01012345769,01012345770,01012345771,01012345772,01012345773,01012345774,01012345775,01012345776,01012345777,01012345778,01012345779,01012345780,01012345781,01012345782,01012345783,01012345784,01012345785,01012345786,01012345787,01012345788,01012345789,01012345790,01012345791,01012345792,01012345793,01012345794,01012345795,01012345796,01012345797,01012345798,01012345799,01012345800,01012345801,01012345802,01012345803,01012345804,01012345805,01012345806,01012345807,01012345808,01012345809,01012345810,01012345811,01012345812,01012345813,01012345814,01012345815,01012345816,01012345817,01012345818,01012345819,01012345820,01012345821,01012345822,01012345823,01012345824,01012345825,01012345826,01012345827,01012345828,01012345829,01012345830,01012345831,01012345832,01012345833,01012345834,01012345835,01012345836,01012345837,01012345838,01012345839,01012345840,01012345841,01012345842,01012345843,01012345844,01012345845,01012345846,01012345847,01012345848,01012345849,01012345850,01012345851,01012345852,01012345853,01012345854,01012345855,01012345856,01012345857,01012345858,01012345859,01012345860,01012345861,01012345862,01012345863,01012345864,01012345865,01012345866,01012345867,01012345868,01012345869,01012345870,01012345871,01012345872,01012345873,01012345874,01012345875,01012345876,01012345877"> <!--완 받는사람 리스트--> | |
| 127 | + <input type="hidden" id="varNmList" name="varNmList" value=""> <!--완 변수 이름 리스트--> | |
| 128 | + <input type="hidden" id="varValList" name="varValList" value=""> <!--완 변수 리스트--> | |
| 129 | + | |
| 130 | + <input type="hidden" id="atSmishingYn" name="atSmishingYn" value="N"> <!--알림톡 스미싱 여부--> | |
| 131 | + </form> | |
| 132 | + | |
| 133 | + <div class="inner"> | |
| 134 | + <!-- send top --> | |
| 135 | + <div class="send_top"> | |
| 136 | + <!-- tab button --> | |
| 137 | + <%@include file="/WEB-INF/jsp/web/kakao/include/KaKaoAlimtalkTopMenuTap.jsp" %> | |
| 138 | + <!--// tab button --> | |
| 139 | + <!-- 카카오톡 설정 - 알림톡 템플릿 등록/관리 - 내템플릿 --> | |
| 140 | + <div class="top_content kakaotalksend_cont current pay_tab_wrap"> | |
| 141 | + <div class="send_general kakao_wrap"> | |
| 142 | + <div class="send_right"> | |
| 143 | + <div class="phone_bottom"> | |
| 144 | + <div class="send_rev"> | |
| 145 | + <div class="send_content" style="padding-bottom: 0;"> | |
| 146 | + <div class="rev_radio"> | |
| 147 | + <ul> | |
| 148 | + <li> | |
| 149 | + <input type="radio" id="reserYnN" name="reserYn" value="N" checked="checked"><label for="reserYnN">즉시</label> | |
| 150 | + </li> | |
| 151 | + <li> | |
| 152 | + <input type="radio" id="reserYnY" name="reserYn" value="Y"><label for="reserYnY">예약</label> | |
| 153 | + </li> | |
| 154 | + </ul> | |
| 155 | + </div> | |
| 156 | + <div class="send_btn"> | |
| 157 | + <button type="button" class="btnType btnType11" onclick="javascript:sendTemplateInfo(); return false;">발송하기</button> | |
| 158 | + <button type="button" class="btnType btnType11" onclick="javascript:send_many(2000); return false;">여러번발송하기</button> | |
| 159 | + <button type="button" class="btnType btnType10" onclick="javascript:goToKakaoTestPopUp(); return false;">테스트발송</button> | |
| 160 | + </div> | |
| 161 | + </div> | |
| 162 | + <div class="rev_selected"> | |
| 163 | + <div class="rev_top"> | |
| 164 | + <span>날짜 :</span> | |
| 165 | + <div class="calendar_wrap"> | |
| 166 | + <input type="text" class="startDate2 inp resDate calendar picker__input picker__input--active" title="검색 시작일" id="startDate2" name="startDate2" value="" data-datecontrol="true" readonly="" aria-haspopup="true" aria-expanded="true" aria-readonly="false" aria-owns="startDate2_root"> | |
| 167 | + </div> | |
| 168 | + <label for="msgResHour" class="label">시 선택</label> | |
| 169 | + <div class="selBox"> | |
| 170 | + <select class="selType1" id="msgResHour" name="msgResHour"> | |
| 171 | + <c:forEach var="hour" begin="0" end="23" step="1" varStatus="status"> | |
| 172 | + <c:choose> | |
| 173 | + <c:when test="${hour < 10}"> | |
| 174 | + <option value="0${hour}">0${hour}시</option> | |
| 175 | + </c:when> | |
| 176 | + <c:otherwise> | |
| 177 | + <option value="${hour}">${hour}시</option> | |
| 178 | + </c:otherwise> | |
| 179 | + </c:choose> | |
| 180 | + </c:forEach> | |
| 181 | + </select> | |
| 182 | + <label for="msgResMin" class="label">분 선택</label> | |
| 183 | + <select class="selType1" id="msgResMin" name="msgResMin"> | |
| 184 | + <c:forEach var="min" begin="0" end="55" step="5"> | |
| 185 | + <c:choose> | |
| 186 | + <c:when test="${min < 10}"> | |
| 187 | + <option value="0${min}">0${min}분</option> | |
| 188 | + </c:when> | |
| 189 | + <c:otherwise> | |
| 190 | + <option value="${min}">${min}분</option> | |
| 191 | + </c:otherwise> | |
| 192 | + </c:choose> | |
| 193 | + </c:forEach> | |
| 194 | + </select> | |
| 195 | + </div> | |
| 196 | + </div> | |
| 197 | + <div class="rev_bottom"> | |
| 198 | + <input type="checkbox" id="inputDivideChk" name="inputDivideChk"> | |
| 199 | + <label for="inputDivideChk">분할전송</label> | |
| 200 | + <input type="text" class="dividType1" id="frmDivideCnt" name="frmDivideCnt" value="20" onkeypress='return checkNumber(event)' maxlength="4"/> | |
| 201 | + <label for="frmDivideCnt">건씩</label> | |
| 202 | + <select class="selType1" id="divideTime" name="divideTime"> | |
| 203 | + <option value="5">05분</option> | |
| 204 | + <option value="10">10분</option> | |
| 205 | + <option value="15">15분</option> | |
| 206 | + <option value="20">20분</option> | |
| 207 | + <option value="30">30분</option> | |
| 208 | + </select> | |
| 209 | + <label for="divideTime">간격</label> | |
| 210 | + </div> | |
| 211 | + </div> | |
| 212 | + </div> | |
| 213 | + </div> | |
| 214 | + </div> | |
| 215 | + </div> | |
| 216 | + </div> | |
| 217 | + </div> | |
| 218 | + </div> | |
| 219 | + <!--// send top -->(No newline at end of file) |
+++ src/main/webapp/WEB-INF/jsp/web/kakao/msgdata/include/atDataIncludeExcel.jsp
... | ... | @@ -0,0 +1,916 @@ |
| 1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | |
| 2 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | |
| 3 | +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> | |
| 4 | +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> | |
| 5 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> | |
| 6 | + | |
| 7 | +<script type="text/javascript" src="<c:url value='/publish/js/content.js'/>"></script> | |
| 8 | + | |
| 9 | +<script type="text/javascript"> | |
| 10 | + | |
| 11 | +var $tableExcel = null; //엑셀입력 탭 | |
| 12 | +var $tableError = null; //엑셀입력 탭 | |
| 13 | +$(document).ready(function(){ | |
| 14 | + | |
| 15 | + //Tabulator AJAX Data Loading | |
| 16 | + $tableError = new Tabulator("#tabulator_error", { | |
| 17 | + height:"255px", | |
| 18 | + width:"100%", | |
| 19 | + layout:"fitColumns", | |
| 20 | + autoColumns:false, | |
| 21 | + headerHozAlign:"center", | |
| 22 | + validationMode:"highlight", | |
| 23 | + clipboard:false, | |
| 24 | + clipboardCopySelector:"table", | |
| 25 | + clipboardPasteAction:"insert", // insert, update, replace | |
| 26 | + placeholder:"등록 팝업에서 휴대폰을 선택 후 확인해주세요.", //fit columns to width of table (optional) | |
| 27 | + columns:[ //Define Table Columns | |
| 28 | +// {title:"이름", field:"name", hozAlign:"center", headerHozAlign: "center", width:125}, | |
| 29 | + {title:"휴대폰", field:"phone", hozAlign:"center", headerHozAlign: "center"}, | |
| 30 | + {title:"미등록 결과", field:"result", hozAlign:"center", headerHozAlign: "center"} | |
| 31 | + ] | |
| 32 | + }); | |
| 33 | + | |
| 34 | + | |
| 35 | + //Tabulator AJAX Data Loading | |
| 36 | + $tableExcel = new Tabulator("#tabulator_excel", { | |
| 37 | + height:"255px", | |
| 38 | + width:"100%", | |
| 39 | + layout:"fitColumns", | |
| 40 | + autoColumns:false, | |
| 41 | + headerHozAlign:"center", | |
| 42 | + validationMode:"highlight", | |
| 43 | + clipboard:false, | |
| 44 | + clipboardCopySelector:"table", | |
| 45 | + clipboardPasteAction:"insert", // insert, update, replace | |
| 46 | + placeholder:"Excel 파일을 업로드 해주세요.", //fit columns to width of table (optional) | |
| 47 | + columns:[ //Define Table Columns | |
| 48 | + {formatter:"rowSelection", titleFormatter:"rowSelection",clipboard:false, headerHozAlign:"center", hozAlign:"center", headerSort:false, cellClick:function(e, cell){ | |
| 49 | + cell.getRow().toggleSelect(); | |
| 50 | + } | |
| 51 | + }, | |
| 52 | + {formatter:"rownum", align:"center" ,title:"No", hozAlign:"center", headerHozAlign:"center", width:50}, | |
| 53 | + {title:"휴대폰", field:"addrPhoneNo", hozAlign:"center", headerHozAlign: "center", width:600, validator:["maxLength:100", "string"]} | |
| 54 | + ], | |
| 55 | + validationFailed:function(cell, value, parameters){ // 유효성 체크 함수 | |
| 56 | + var valid = cell.isValid(); | |
| 57 | + if(!valid){ | |
| 58 | + alert("양식에 맞지 않는 정보가 입력되었습니다."); | |
| 59 | + | |
| 60 | + //해당 셀 데이터 삭제 | |
| 61 | + cell.setValue(""); | |
| 62 | + } | |
| 63 | + return value % parameters.phone; | |
| 64 | + }, | |
| 65 | + }); | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + // 타뷸레이터 width값 변경 시 위에 select width 값 변경 | |
| 71 | + var titleArray = ["No","A","B","C","D","E","F"]; | |
| 72 | + | |
| 73 | + $tableExcel.on("columnWidth",function(column){ | |
| 74 | + var titleIndex = titleArray.indexOf(column._column.definition.title); | |
| 75 | + titleIndex += 1; | |
| 76 | + | |
| 77 | + if(titleIndex != 0){ | |
| 78 | + $('.select_adr_hd>div').eq(titleIndex).css('width', column._column.width); | |
| 79 | + }else{ | |
| 80 | + $('.select_adr_hd>div').eq(0).css('width', column._column.width); | |
| 81 | + | |
| 82 | + } | |
| 83 | + }); | |
| 84 | + | |
| 85 | + $tableExcel.on("scrollHorizontal",function(left){ | |
| 86 | + $(".adr_excel").scrollLeft(left); | |
| 87 | + }) | |
| 88 | + | |
| 89 | + | |
| 90 | + $(".adr_excel").on("scroll",function(){ | |
| 91 | + $(".tabulator-tableholder").scrollLeft($(this).scrollLeft()); | |
| 92 | + }); | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + $("#excelFileC4").on("change", function(event) { | |
| 98 | + var fileInfo = event.target.files; | |
| 99 | + if(fileInfo.length > 0){ | |
| 100 | + excelFileChange(fileInfo[0]); | |
| 101 | + } else { | |
| 102 | + fn_loadRemoveActive(); // 파일이 선택되지 않은 경우 로딩 상태 제거 | |
| 103 | + setTimeout(() => { $(this).val(''); }, 0); // 파일 선택 초기화 | |
| 104 | + } | |
| 105 | + }); | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + $(document).on('click', '#btnAddrMassClose', function() { | |
| 110 | + | |
| 111 | + $('.field-selector').each(function() { $(this).val(''); }); | |
| 112 | + setAddrMassClose(); | |
| 113 | + }); | |
| 114 | + | |
| 115 | + | |
| 116 | + $(document).on('click', '#closeBtn', function() { | |
| 117 | + // 대량등록 닫기 | |
| 118 | + setAddrMassClose(); | |
| 119 | + }); | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + // 엑셀등록 닫기 | |
| 125 | + function setAddrMassClose() { | |
| 126 | + $tableExcel.clearData(); | |
| 127 | + $("#excelRowTotCnt").text(0); //총건수 수정 | |
| 128 | + $("#excelRowDupCnt").text(0); //중복건수 수정 | |
| 129 | + $("#excelRowErrorCnt").text(0); //중복건수 수정 | |
| 130 | +// dupliPhoneDataRealList.length = 0; // 중복 휴대폰번호 초기화 | |
| 131 | + | |
| 132 | + | |
| 133 | + // 중복 카운트 | |
| 134 | + $("#errorPopDupCnt").text(0); | |
| 135 | + // 에러 카운트 | |
| 136 | + $("#errorPopErrorCnt").text(0); | |
| 137 | + // | |
| 138 | + $("#errorPopTotCnt").text(0); | |
| 139 | + | |
| 140 | + // popup 영역 | |
| 141 | + $tableError.clearData(); | |
| 142 | + | |
| 143 | + } | |
| 144 | + | |
| 145 | + //############################################################################################# | |
| 146 | + //파일업로드 드래그앤 드롭 | |
| 147 | + //############################################################################################# | |
| 148 | + var objDragAndDrop = $(".upload_area"); | |
| 149 | + $(document).on("dragenter",".upload_area",function(e){ | |
| 150 | + e.stopPropagation(); | |
| 151 | + e.preventDefault(); | |
| 152 | + //$(this).css('border', '2px solid #0B85A1'); | |
| 153 | + }); | |
| 154 | + $(document).on("dragover",".upload_area",function(e){ | |
| 155 | + e.stopPropagation(); | |
| 156 | + e.preventDefault(); | |
| 157 | + }); | |
| 158 | + $(document).on("drop",".upload_area",function(e){ | |
| 159 | + fn_loadAddActive(); | |
| 160 | + e.preventDefault(); | |
| 161 | + var files = e.originalEvent.dataTransfer.files; | |
| 162 | + excelFileChange(files[0]); | |
| 163 | + }); | |
| 164 | + | |
| 165 | + $(document).on('dragenter', function (e){ | |
| 166 | + e.stopPropagation(); | |
| 167 | + e.preventDefault(); | |
| 168 | + }); | |
| 169 | + $(document).on('dragover', function (e){ | |
| 170 | + e.stopPropagation(); | |
| 171 | + e.preventDefault(); | |
| 172 | + //objDragAndDrop.css('border', '2px dotted #0B85A1'); | |
| 173 | + }); | |
| 174 | + $(document).on('drop', function (e){ | |
| 175 | + e.stopPropagation(); | |
| 176 | + e.preventDefault(); | |
| 177 | + }); | |
| 178 | + //파일 드래그앤드롭 종료 | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + // 받는사람 선택삭제 버튼 처리해주기 | |
| 186 | + $('#in_select_del').click(function(){ | |
| 187 | + | |
| 188 | + if($tableExcel == null || $tableExcel == ""){ | |
| 189 | + | |
| 190 | + alert("받는사람을 추가해 주세요."); | |
| 191 | + return false; | |
| 192 | + | |
| 193 | + } | |
| 194 | + | |
| 195 | + var selectedData = $tableExcel.getSelectedRows(); | |
| 196 | + | |
| 197 | + if(selectedData == "" || selectedData == null){ | |
| 198 | + | |
| 199 | + alert("삭제할 연락처를 선택해주세요."); | |
| 200 | + return false; | |
| 201 | + | |
| 202 | + }else{ // 선택한 Row 데이터 삭제하기 | |
| 203 | + | |
| 204 | + if(confirm("선택하신 받는 사람을 삭제하시겠습니까?")){ | |
| 205 | + | |
| 206 | + // 선택 데이터 삭제 | |
| 207 | + selectedData.forEach(row => row.delete()); | |
| 208 | + | |
| 209 | + | |
| 210 | + totRows = $tableExcel.getRows().length; | |
| 211 | + $("#excelRowTotCnt").text(totRows); | |
| 212 | + | |
| 213 | + | |
| 214 | + } | |
| 215 | + | |
| 216 | + } | |
| 217 | + | |
| 218 | + }); | |
| 219 | + | |
| 220 | + // 추가버튼 | |
| 221 | + $('#btnAddrMassReg').click(function(){ | |
| 222 | + | |
| 223 | + if($tableExcel.getData().length < 1){ | |
| 224 | + alert("한 개 이상의 연락처를 입력하세요"); | |
| 225 | + return false; | |
| 226 | + } | |
| 227 | +// else if (selectedData.length > 20000) { | |
| 228 | +// alert("2만줄 이상의 업로드는 데이터 부하로 업로드 할수 없습니다."); | |
| 229 | +// return false; | |
| 230 | +// } | |
| 231 | + | |
| 232 | + | |
| 233 | + // tableExcel 그룹의 select 요소들을 확인 | |
| 234 | + var columns = $tableExcel.getColumns(); | |
| 235 | + var isAddrPhoneNoSelected = columns.some(column => column.getField() === 'addrPhoneNo'); | |
| 236 | + | |
| 237 | + if (!isAddrPhoneNoSelected) { | |
| 238 | + alert('휴대폰이 선택되지 않았습니다.'); | |
| 239 | + return false; | |
| 240 | + | |
| 241 | + } | |
| 242 | + | |
| 243 | + var addrData = $tableExcel.getData().map((row, index) => ({ | |
| 244 | + name: row.addrNm, | |
| 245 | + phone: removeDash(row.addrPhoneNo), | |
| 246 | + rep1: row.addrInfo1, | |
| 247 | + rep2: row.addrInfo2, | |
| 248 | + rep3: row.addrInfo3, | |
| 249 | + rep4: row.addrInfo4, | |
| 250 | + })); | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + // 기존 tableL의 데이터를 가져옵니다. | |
| 255 | + var existingData = tableL.getData(); | |
| 256 | + // 기존 데이터와 새로운 데이터를 합칩니다. | |
| 257 | + var combinedData = existingData.concat(addrData); | |
| 258 | + | |
| 259 | + | |
| 260 | + /** | |
| 261 | + * @ phone을 기준으로 중복 제거 및 갯수 계산 | |
| 262 | + * @ 결과 반환 | |
| 263 | + * return { | |
| 264 | + * uniqueArray, // 중복 제거된 배열 | |
| 265 | + * uniqueCount, // 중복 제거된 데이터 개수 | |
| 266 | + * duplicateArray, // 중복된 데이터 배열 | |
| 267 | + * duplicateCount: duplicateArray.length // 중복된 데이터 개수 | |
| 268 | + * }; | |
| 269 | + */ | |
| 270 | + const result = removeDuplicatesAndCount(combinedData, 'phone'); | |
| 271 | + | |
| 272 | + | |
| 273 | + // 총 30만건이 넘으면 false | |
| 274 | + if (!validateRowLimit(result.uniqueCount)) { | |
| 275 | + return false; | |
| 276 | + } | |
| 277 | + | |
| 278 | + | |
| 279 | + // 6. 수량/가격 계산 | |
| 280 | + setAllCntData(result); | |
| 281 | + fn_priceClclt(); | |
| 282 | + | |
| 283 | + | |
| 284 | + $('#closeBtn').click(); | |
| 285 | + }); | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + //받는사람 전체삭제 버튼 처리 | |
| 290 | + $('#allDel').click(function(){ | |
| 291 | + var data = $tableExcel.getRows(); | |
| 292 | + $tableExcel.clearData(); | |
| 293 | + $("#excelRowTotCnt").text(0); //총건수 수정 | |
| 294 | + $("#excelRowDupCnt").text(0); //중복건수 수정 | |
| 295 | + $("#excelRowErrorCnt").text(0); //중복건수 수정 | |
| 296 | + dupliPhoneDataRealList.length = 0; // 중복 휴대폰번호 초기화 | |
| 297 | + $tableError.clearData(); | |
| 298 | + | |
| 299 | + // select box 초기화 | |
| 300 | + $('.field-selector').each(function() { $(this).val(''); }); | |
| 301 | + | |
| 302 | + }); | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + //치환문자 있는 엑섹불러오기 버튼 클릭시 파일 첨부 실행 | |
| 307 | + $('.c3').click(function(){ // 엑셀파일 불러오기 선택 시 | |
| 308 | + | |
| 309 | + $("#excelFileC4").click(); | |
| 310 | + | |
| 311 | + }); | |
| 312 | +}); | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | +function excelFileChange(file) { | |
| 317 | + if (file) { | |
| 318 | + | |
| 319 | + // 파일 크기 체크 (20MB) | |
| 320 | + const maxSize = 20 * 1024 * 1024; // 20MB in bytes | |
| 321 | + if (file.size > maxSize) { | |
| 322 | + alert('파일 크기는 20MB를 초과할 수 없습니다.'); | |
| 323 | + return; | |
| 324 | + } | |
| 325 | + | |
| 326 | + fn_loadAddActive(); | |
| 327 | + var reader = new FileReader(); | |
| 328 | + var extension = file.name.split('.').pop().toLowerCase(); | |
| 329 | + reader.onload = function(e) { | |
| 330 | + setTimeout(() => { // 파일 읽기 완료 후 실행되도록 함 | |
| 331 | + if (extension === 'xlsx') { | |
| 332 | + var data = new Uint8Array(e.target.result); | |
| 333 | + var workbook = XLSX.read(data, {type: 'array'}); | |
| 334 | + var firstSheet = workbook.Sheets[workbook.SheetNames[0]]; | |
| 335 | + var jsonData = XLSX.utils.sheet_to_json(firstSheet, {header: 1}); | |
| 336 | + // 문제 데이터를 확인하는 함수 호출 | |
| 337 | + findInvalidDBCharacters(jsonData); | |
| 338 | + processExcelData(jsonData); | |
| 339 | + } else if (extension === 'xls') { | |
| 340 | + var data = e.target.result; | |
| 341 | + var workbook = XLSX.read(data, { type: 'binary' }); | |
| 342 | + var firstSheet = workbook.Sheets[workbook.SheetNames[0]]; | |
| 343 | + var jsonData = XLSX.utils.sheet_to_json(firstSheet, { header: 1 }); | |
| 344 | + | |
| 345 | + // 문제 데이터를 확인하는 함수 호출 | |
| 346 | + findInvalidDBCharacters(jsonData); | |
| 347 | + | |
| 348 | + | |
| 349 | + processExcelData(jsonData); | |
| 350 | + } else if (extension === 'txt') { | |
| 351 | + var textData = e.target.result; | |
| 352 | + processTextData(textData); | |
| 353 | + } else { | |
| 354 | + alert('지원되지 않는 파일 형식입니다.'); | |
| 355 | + } | |
| 356 | + fn_loadRemoveActive(); | |
| 357 | + }, 0); // 지연 없이 즉시 실행되도록 0ms 지연을 설정 | |
| 358 | + }; | |
| 359 | + if (extension === 'xlsx') { | |
| 360 | + reader.readAsArrayBuffer(file); | |
| 361 | + } else if (extension === 'xls') { | |
| 362 | + reader.readAsBinaryString(file); // xls 파일에 적절한 read 메서드 호출 | |
| 363 | + } else if (extension === 'txt') { | |
| 364 | + reader.readAsText(file); | |
| 365 | + } | |
| 366 | + } | |
| 367 | +} | |
| 368 | + | |
| 369 | +//문제 데이터를 확인하는 함수 | |
| 370 | +function findInvalidDBCharacters(jsonData) { | |
| 371 | + console.log('DB 입력 값 검사 중...'); | |
| 372 | + const invalidCharPattern = /[\uD800-\uDBFF][\uDC00-\uDFFF]/; // 4바이트 유니코드 문자 (이모지 등) | |
| 373 | + for (let rowIndex = 0; rowIndex < jsonData.length; rowIndex++) { | |
| 374 | + const row = jsonData[rowIndex]; | |
| 375 | + if (Array.isArray(row)) { | |
| 376 | + for (let colIndex = 0; colIndex < row.length; colIndex++) { | |
| 377 | + const cell = row[colIndex]; | |
| 378 | + if (typeof cell === 'string' && invalidCharPattern.test(cell)) { | |
| 379 | + console.warn('허용되지 않는 문자: row', rowIndex + 1,', col ', colIndex + 1, ', value:', cell); | |
| 380 | + // 허용되지 않는 문자를 제거 (선택 사항) | |
| 381 | + row[colIndex] = cell.replace(invalidCharPattern, ''); | |
| 382 | + console.log('수정된 값:', row[colIndex]); | |
| 383 | + } | |
| 384 | + } | |
| 385 | + } | |
| 386 | + } | |
| 387 | +} | |
| 388 | + | |
| 389 | + | |
| 390 | +// 엑셀 데이터 처리 함수 | |
| 391 | +function processExcelData(data) { | |
| 392 | + console.log('data : ', data); | |
| 393 | + | |
| 394 | + let tableData = data.slice(1).map(row => { | |
| 395 | + return { | |
| 396 | + addrPhoneNo: row[0], // 필드명을 fn_phoneDupl()에서 사용하는 이름으로! | |
| 397 | + addrNm: "", // 이름 필드가 없어도 오류 방지용으로 추가 | |
| 398 | + }; | |
| 399 | + }); | |
| 400 | + | |
| 401 | + console.log("변환된 데이터: ", tableData); | |
| 402 | + | |
| 403 | + // Tabulator에 데이터 설정 | |
| 404 | + $tableExcel.setData(tableData); | |
| 405 | + | |
| 406 | + // 중복/오류 처리 함수 호출 | |
| 407 | + fn_phoneDupl($tableExcel); | |
| 408 | +} | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | +/* function processExcelData(data) { | |
| 413 | + console.log('data : ', data); | |
| 414 | + var keys = ['A', 'B', 'C', 'D', 'E', 'F', 'G']; | |
| 415 | + var tableData = []; | |
| 416 | + var totalRows = data.length - 2; // 전체 데이터 수 (1, 2행 제외) | |
| 417 | + console.log('data: ', data); | |
| 418 | + | |
| 419 | + // 3번째 행부터 입력 | |
| 420 | + data.slice(0).forEach((row, index) => { | |
| 421 | + var rowData = {}; | |
| 422 | + keys.forEach((key, idx) => { // index 변수명 변경 (내부와 외부에서 사용되므로 충돌 방지) | |
| 423 | +// console.log('row[idx] : ', row[idx]); | |
| 424 | + rowData[key] = row[idx] ? row[idx].trim() : ""; // 각 컬럼에 대해 기본값을 설정 | |
| 425 | + rowData[key] = (typeof row[idx] === 'string') ? row[idx].trim() : row[idx]; | |
| 426 | + }); | |
| 427 | + tableData.push(rowData); | |
| 428 | + | |
| 429 | + }); | |
| 430 | + console.log('tableData :: ', tableData); | |
| 431 | + updateTable(tableData); | |
| 432 | +} */ | |
| 433 | + | |
| 434 | + | |
| 435 | +// 텍스트 데이터 처리 함수 | |
| 436 | +function processTextData(text) { | |
| 437 | + var lines = text.split('\n'); // 각 줄을 배열로 분리 | |
| 438 | + var keys = ['A', 'B', 'C', 'D', 'E', 'F', 'G']; | |
| 439 | + var tableData = []; | |
| 440 | + | |
| 441 | + lines.forEach(line => { | |
| 442 | + var rowData = {}; | |
| 443 | + var row = line.split(','); // 쉼표로 분리 | |
| 444 | + keys.forEach((key, index) => { | |
| 445 | + rowData[key] = row[index] ? row[index].trim() : ""; // 각 컬럼에 대해 기본값을 설정 | |
| 446 | + }); | |
| 447 | + tableData.push(rowData); | |
| 448 | + }); | |
| 449 | + | |
| 450 | + updateTable(tableData); | |
| 451 | +} | |
| 452 | + | |
| 453 | +//공통 테이블 업데이트 함수 | |
| 454 | +function updateTable(tableData) { | |
| 455 | + $tableExcel.setColumns([ //Define Table Columns | |
| 456 | + {formatter:"rowSelection", titleFormatter:"rowSelection",clipboard:false, headerHozAlign:"center", hozAlign:"center", headerSort:false, cellClick:function(e, cell){ | |
| 457 | + cell.getRow().toggleSelect(); | |
| 458 | + } | |
| 459 | + }, | |
| 460 | + {formatter:"rownum", align:"center" ,title:"No", hozAlign:"center", headerHozAlign:"center", width:60}, | |
| 461 | + {title:"A", field:"A", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]}, | |
| 462 | + {title:"B", field:"B", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]}, | |
| 463 | + {title:"C", field:"C", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]}, | |
| 464 | + {title:"D", field:"D", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]}, | |
| 465 | + {title:"E", field:"E", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]}, | |
| 466 | + {title:"F", field:"F", hozAlign:"center", headerHozAlign: "center", width:140, validator:["maxLength:100", "string"]} | |
| 467 | + ]); | |
| 468 | + | |
| 469 | + $tableExcel.setData(tableData).then(() => { | |
| 470 | + // excelRowTotCnt 업데이트 | |
| 471 | + document.getElementById("excelRowTotCnt").innerText = tableData.length; | |
| 472 | + }); | |
| 473 | + | |
| 474 | + fn_loadRemoveActive(); | |
| 475 | +} | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | +/* | |
| 480 | +* 타이틀 select 선택할때마다 실행해서 | |
| 481 | +* 데이터테이블 필드값 수정 | |
| 482 | +*/ | |
| 483 | +function updateTableFields($objTabul) { | |
| 484 | + var currentData = $objTabul.getData(); | |
| 485 | + var columns = [ | |
| 486 | + {formatter: "rowSelection", titleFormatter: "rowSelection", clipboard: false, hozAlign: "center", headerHozAlign: "center", headerSort: false, cellClick: function(e, cell) { | |
| 487 | + cell.getRow().toggleSelect(); | |
| 488 | + }} | |
| 489 | + ,{formatter:"rownum", align:"center", title:"No", hozAlign:"center", headerHozAlign:"center", width:60} | |
| 490 | + ]; | |
| 491 | + | |
| 492 | + var fieldMapping = []; | |
| 493 | + $('.field-selector').each(function(index) { | |
| 494 | + var selectedField = $(this).val(); | |
| 495 | + // ASCII 문자 코드 사용 - 65=A, 66=B ... | |
| 496 | + var field = String.fromCharCode(65 + index); | |
| 497 | + if (selectedField) { | |
| 498 | + columns.push({ | |
| 499 | + title: field | |
| 500 | + , field: selectedField | |
| 501 | + , hozAlign: "center" | |
| 502 | + , headerHozAlign: "center" | |
| 503 | +// , editor: "input" | |
| 504 | + , editor: false | |
| 505 | + , width: 140 | |
| 506 | + , validator: ["maxLength:100", "string"] | |
| 507 | + }); | |
| 508 | + fieldMapping.push(selectedField); | |
| 509 | + } else { | |
| 510 | + columns.push({ | |
| 511 | + title: field | |
| 512 | + , field: field | |
| 513 | + , hozAlign: "center" | |
| 514 | + , headerHozAlign: "center" | |
| 515 | + , editor: false | |
| 516 | +// , editor: "input" | |
| 517 | + , width: 140 | |
| 518 | + , validator: ["maxLength:100", "string"] | |
| 519 | + }); | |
| 520 | + fieldMapping.push(field); | |
| 521 | + } | |
| 522 | + }); | |
| 523 | + | |
| 524 | + var updatedData = currentData.map(row => { | |
| 525 | + console.log('row : ', row); | |
| 526 | + var newRow = {}; | |
| 527 | + fieldMapping.forEach((field, index) => { | |
| 528 | + newRow[field] = row[Object.keys(row)[index]] ?? ""; | |
| 529 | + }); | |
| 530 | + return newRow; | |
| 531 | + }); | |
| 532 | + | |
| 533 | + $objTabul.setColumns(columns); | |
| 534 | + $objTabul.setData(updatedData); | |
| 535 | +} | |
| 536 | + | |
| 537 | + | |
| 538 | +/** | |
| 539 | + * @ 핸드폰 중복 데이터 | |
| 540 | + * */ | |
| 541 | +function fn_phoneDupl($objTabul) { | |
| 542 | + | |
| 543 | + $tableError.clearData(); | |
| 544 | + | |
| 545 | + var data = $objTabul.getData(); | |
| 546 | + var phoneNumberChk = false; | |
| 547 | + var existingNumbers = new Set(); // 배열에서 Set으로 변경 | |
| 548 | + | |
| 549 | + let errorCount = 0; // 중복 번호 개수를 저장할 변수 | |
| 550 | + let duplicateCount = 0; // 중복 번호 개수를 저장할 변수 | |
| 551 | + | |
| 552 | + const errors = []; // 오류 데이터를 저장할 배열 | |
| 553 | + const newData = []; // 유효한 데이터만 저장할 새로운 배열 | |
| 554 | + | |
| 555 | + data.forEach((row, index) => { | |
| 556 | + | |
| 557 | + const number = row.addrPhoneNo; | |
| 558 | + | |
| 559 | + // number가 null, undefined, 빈 문자열이거나 숫자인 경우 처리 | |
| 560 | + if (!number || (typeof number === 'string' && !number.trim())){ | |
| 561 | + console.log("number : ", number); | |
| 562 | + return; | |
| 563 | + } | |
| 564 | + | |
| 565 | + const formattedNumber = formatPhoneNumber(number); // 번호 표준화 | |
| 566 | + const cleanedNumber = formattedNumber.replace(/[^0-9]/g, ''); // 숫자만 남김 | |
| 567 | + | |
| 568 | + if (!existingNumbers.has(cleanedNumber)) { // 중복 번호 체크 | |
| 569 | + if (isValidPhoneNumber(formattedNumber)) { // 유효성 검사 | |
| 570 | + row.addrPhoneNo = formattedNumber; | |
| 571 | + existingNumbers.add(cleanedNumber); // 추가된 번호를 기존 목록에 추가 | |
| 572 | + newData.push(row); // 유효한 데이터만 새로운 배열에 추가 | |
| 573 | + } else { | |
| 574 | + // 오류: 유효성 통과 못함 | |
| 575 | + errorCount++; | |
| 576 | + | |
| 577 | + errors.push({ | |
| 578 | + name: row.addrNm, // 이름 | |
| 579 | + phone: row.addrPhoneNo, // 폰번호 | |
| 580 | + result: "오류" // 결과 메시지 추가 | |
| 581 | + }); | |
| 582 | + } | |
| 583 | + } else { | |
| 584 | + // 중복 | |
| 585 | + duplicateCount++; | |
| 586 | + | |
| 587 | + errors.push({ | |
| 588 | + name: row.addrNm, // 이름 | |
| 589 | + phone: row.addrPhoneNo, // 폰번호 | |
| 590 | + result: "중복" // 결과 메시지 추가 | |
| 591 | + }); | |
| 592 | + } | |
| 593 | + }); | |
| 594 | + | |
| 595 | + // data 배열을 newData 배열로 대체 | |
| 596 | + | |
| 597 | + data = newData; | |
| 598 | + console.log('data : ', data); | |
| 599 | + | |
| 600 | + // 수정된 데이터로 테이블 업데이트 | |
| 601 | + $objTabul.setData(data); | |
| 602 | + // 오류 총 카운트 | |
| 603 | + $("#excelRowTotCnt").text($objTabul.getDataCount()); | |
| 604 | + // 중복 카운트 | |
| 605 | + $("#excelRowDupCnt").text(duplicateCount); | |
| 606 | + // 에러 카운트 | |
| 607 | + $("#excelRowErrorCnt").text(errorCount); | |
| 608 | + | |
| 609 | + // popup 영역 | |
| 610 | + $("#errorPopTotCnt").text($objTabul.getDataCount()); | |
| 611 | + // 중복 카운트 | |
| 612 | + $("#errorPopDupCnt").text(duplicateCount); | |
| 613 | + // 에러 카운트 | |
| 614 | + $("#errorPopErrorCnt").text(errorCount); | |
| 615 | + | |
| 616 | + | |
| 617 | + $tableError.setData(errors); | |
| 618 | + | |
| 619 | + if(errorCount > 0){ | |
| 620 | + alert('휴대폰 형식에 맞지 않는 데이터는 삭제 후 업로드 됩니다.\nex) 발송불가 특수문자, 자릿수 오류 등'); | |
| 621 | + } | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | +} | |
| 626 | + | |
| 627 | +function fn_dupliPopupShow(){ | |
| 628 | + | |
| 629 | + $("#tableExcelDupliBtn").show(); | |
| 630 | +} | |
| 631 | + | |
| 632 | + | |
| 633 | +// 상단 설명 더보기 | |
| 634 | +function popMore(e){ | |
| 635 | + $(e).closest(".pop_more_cont").toggleClass("pop_more_click"); | |
| 636 | + | |
| 637 | + if($(e).closest(".pop_more_cont").is(".pop_more_click")){ | |
| 638 | + $(e).html('숨기기'); | |
| 639 | + $(e).append('<i></i>'); | |
| 640 | + }else { | |
| 641 | + $(e).html('더보기'); | |
| 642 | + $(e).append('<i></i>'); | |
| 643 | + } | |
| 644 | +} | |
| 645 | + | |
| 646 | +// excel 오류정보 테스트 | |
| 647 | +$(document).on('click', '#errorExcelBtn', function() { | |
| 648 | + if($tableError.getDataCount()<1){ | |
| 649 | + alert('오류 정보가 없습니다.'); | |
| 650 | + return false; | |
| 651 | + } | |
| 652 | + $tableError.download("xlsx", "error_data.xlsx"); | |
| 653 | +}); | |
| 654 | + | |
| 655 | + | |
| 656 | +</script> | |
| 657 | + | |
| 658 | +<!-- 중복전화번호 data-tooltip:addrMassDupli_layer --> | |
| 659 | +<div class="tooltip-wrap"> | |
| 660 | + <div class="popup-com addrMassDupli_layer" tabindex="0" data-tooltip-con="addrMassDupli_layer" data-focus="addrMassDupli_layer" data-focus-prev="addrMassDupli_layer-close" style="width: 270px; height: 500px;"> | |
| 661 | + <div class="popup_heading"> | |
| 662 | + <p>중복 휴대폰번호</p> | |
| 663 | + <button type="button" class="tooltip-close" data-focus="addrMassDupli_layer-close" onclick="setAddrDupliClose();"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> | |
| 664 | + </div> | |
| 665 | + <div class="layer_in" style="padding:20px 0px;" id="addrMassDupli_layer"> | |
| 666 | + </div> | |
| 667 | + | |
| 668 | + <div class="popup_btn_wrap2" style="margin-top: 0px;"> | |
| 669 | + <button type="button" class="tooltip-close" data-focus="addrMassDupli_layer-close" data-focus-next="addrMassDupli_layer">닫기</button> | |
| 670 | + </div> | |
| 671 | + | |
| 672 | + </div> | |
| 673 | +</div> | |
| 674 | + | |
| 675 | + | |
| 676 | +<!-- 주소록 상세 결과 팝업 data-tooltip:adr_popup14 --> | |
| 677 | + <div class="tooltip-wrap"> | |
| 678 | + <div class="popup-com adr_layer adr_detail_result adr_popup14" tabindex="0" data-tooltip-con="adr_popup14" data-focus="adr_popup14" data-focus-prev="adr_popu14-close" style="width: 525px;z-index:125;"> | |
| 679 | + <div class="popup_heading"> | |
| 680 | + <p>주소록 상세 결과</p> | |
| 681 | + <button type="button" class="tooltip-close" data-focus="adr_popup14-close"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> | |
| 682 | + </div> | |
| 683 | + <div class="layer_in" style="padding:30px 20px;"> | |
| 684 | + <div class="table_top"> | |
| 685 | + <p> | |
| 686 | + 총 <span class="c_e40000" id="errorPopTotCnt">0</span>건 | |
| 687 | + / 중복 <span class="c_002c9a" id="errorPopDupCnt">0</span>건 | |
| 688 | + / 오류 <span class="c_002c9a" id="errorPopErrorCnt">0</span>건</p> | |
| 689 | + <button type="button" class="excel_btn btnType" id="errorExcelBtn"><i class="downroad"></i>엑셀 다운로드</button> | |
| 690 | + </div> | |
| 691 | + <div class="tb_wrap adr_list" id="tabulator_error"> | |
| 692 | + <!-- $tableError 참고 --> | |
| 693 | + </div> | |
| 694 | + <ul class="cf_text_ul"> | |
| 695 | + <li>*중복번호는 하나의 번호만 등록됩니다.</li> | |
| 696 | + <li>*휴대폰 형식에 맞지 않는 데이터는 삭제 후 업로드 됩니다.</li> | |
| 697 | + <li>ex) 발송불가 특수문자, 자릿수 오류 등</li> | |
| 698 | + </ul> | |
| 699 | + <div class="popup_btn_wrap2"> | |
| 700 | +<!-- <button type="button">저장</button> --> | |
| 701 | + <button type="button" class="tooltip-close" data-focus="adr_popup14-close" data-focus-next="adr_popup14">닫기</button> | |
| 702 | + </div> | |
| 703 | + </div> | |
| 704 | + </div> | |
| 705 | + </div> | |
| 706 | + | |
| 707 | +<!--// 중복전화번호 팝업 --> | |
| 708 | + <div class="popup_heading"> | |
| 709 | + <p>엑셀 불러오기</p> | |
| 710 | + <button type="button" class="tooltip-close" id="closeBtn" data-focus="popup07-close"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> | |
| 711 | + </div> | |
| 712 | + <div class="layer_in execl_upload_layer" style="padding: 25px 30px;"> | |
| 713 | +<!-- <div class="list_tab_wrap2"> --> | |
| 714 | + <!-- tab button --> | |
| 715 | +<!-- <ul class="list_tab" id="tbTabl"> --> | |
| 716 | +<!-- <li class="tab active" data-tabul="tableExcel"><button type="button" onclick="popupTab(this,'1'); fn_tabToggle('1');">엑셀입력</button></li> --> | |
| 717 | +<!-- <li class="tab" data-tabul="tableClip"><button type="button" onclick="popupTab(this,'2'); fn_tabToggle('2');">붙여넣기</button></li> --> | |
| 718 | +<!-- <li class="tab" data-tabul="tableSelf"><button type="button" onclick="popupTab(this,'3'); fn_tabToggle('3');">직접입력</button></li> --> | |
| 719 | +<!-- </ul>// tab button --> | |
| 720 | +<!-- </div> --> | |
| 721 | + <!-- 엑셀입력 --> | |
| 722 | + <div class="popCont current pop_more_cont" id="popCont_1"> | |
| 723 | + <div class="titBox"> | |
| 724 | + <p>- 주소록은 한 번에 최대 30만건까지 등록(EXCEL파일, 최대용량 20MB) 가능합니다. </p> | |
| 725 | + <p>- 엑셀 파일에 비밀번호 설정, 제한된 보기, 수식 등이 설정되어 있는 경우 업로드가 불가합니다.</p> | |
| 726 | + <p>- 구분선(|), 역슬래시(\, ₩), 큰따옴표("), 이모지(이모티콘) 등 발송불가 특수문자는 저장되지 않습니다.</p> | |
| 727 | + <p>- 이름 200byte, [*1*]~[*4*] 200byte, 메모 250byte까지 입력 가능합니다.</p> | |
| 728 | + <p>- 주소록 등록이 어려우신 경우에는 <a href="<c:url value='/web/mjon/addragency/selectAddrAgencyList.do'/>" style="font-weight: bold; color: blue;">주소록 입력대행</a> 메뉴를 이용하실 수 있습니다. </p> | |
| 729 | + </div> | |
| 730 | + <div class="pop_more_wrap"> | |
| 731 | + <button type="button" class="pop_more" onclick="popMore(this);">더보기<i></i></button> | |
| 732 | + </div> | |
| 733 | + </div><!--// 엑셀입력 --> | |
| 734 | + | |
| 735 | + <!-- 공통 --> | |
| 736 | + <div> | |
| 737 | + <table class="layer_tType1"> | |
| 738 | + <caption>엑셀입력 표</caption> | |
| 739 | + <colgroup> | |
| 740 | + <col style="width: 95px"> | |
| 741 | + <col style="width: auto"> | |
| 742 | + </colgroup> | |
| 743 | + <tbody> | |
| 744 | + <tr> | |
| 745 | + <!-- <th>그룹 선택</th> | |
| 746 | + <td> | |
| 747 | + <label for="" class="label">그룹 선택</label> | |
| 748 | + <select id="addrGrpIdInfo" name="addrGrpIdInfo"> | |
| 749 | + </select> | |
| 750 | + <label for="" class="label">그룹명 입력</label> | |
| 751 | + <input type="text" id="addrGrpNm" name="addrGrpNm" placeholder="새 그룹명을 입력해주세요." onfocus="this.placeholder=''" onblur="this.placeholder='새 그룹명을 입력해주세요.'"class="inputLight" style="width: 300px;"> | |
| 752 | + <input type="file" id="excelFile" accept=".xls, .xlsx, .txt" style="display:none"/> | |
| 753 | + <button type="button" class="excel_btn2 btnType c3"><i class="uproad"></i>엑셀, TXT파일 업로드</button> | |
| 754 | + </td> --> | |
| 755 | + <td colspan="2" style="padding:10px 0;"> | |
| 756 | + <div class="file_upload_wrap" style="width:100%;display:flex;"> | |
| 757 | + <div class="file_add upload_area"> | |
| 758 | + <p><img src="/publish/images/content/file_add.png" alt="파일 붙여넣기">마우스로 엑셀파일을 여기에 끌어다 놓으세요</p> | |
| 759 | + </div> | |
| 760 | + <input type="file" id="excelFileC4" accept=".xls, .xlsx, .txt" style="display:none"/> | |
| 761 | + <button type="button" class="excel_btn2 btnType c3"><i class="uproad"></i>엑셀파일 업로드</button> | |
| 762 | + </div> | |
| 763 | + </td> | |
| 764 | + </tr> | |
| 765 | + </tbody> | |
| 766 | + </table> | |
| 767 | + </div> | |
| 768 | + | |
| 769 | + | |
| 770 | + <div class="excel_middle2"> | |
| 771 | + <p> | |
| 772 | + 총 <span class="c_e40000 fwBold" id="excelRowTotCnt">0</span>건 | |
| 773 | + / 중복 <span class="c_002c9a fwBold" id="excelRowDupCnt">0</span>건 | |
| 774 | + / 오류 <span class="c_002c9a fwBold" id="excelRowErrorCnt">0</span>건 | |
| 775 | + <button type="button" class="btn_list_detail" data-tooltip="adr_popup14"><img src="/publish/images/search.png"></button> | |
| 776 | + </p> | |
| 777 | +<!-- --> | |
| 778 | +<!-- <button type="button" class="btnType btnType6" data-tooltip="addrMassDupli_layer" id="tableExcelDupliBtn">중복번호</button> --> | |
| 779 | +<!-- --> | |
| 780 | +<!-- <button type="button" class="btnType btnType6" data-tooltip="addrMassSaveDupli_layer" onclick="GetAddrMassSaveDupli()" id="btnAddrMassSaveDupli">중복번호</button> --> | |
| 781 | + </p> | |
| 782 | +<!-- <button type="button" class="btnType btnType6 addCallToF">번호추가</button> --> | |
| 783 | + </div> | |
| 784 | + | |
| 785 | + | |
| 786 | + <!-- | |
| 787 | + | |
| 788 | + <div class="adr_excel" style="margin-top: 13px; overflow-x:auto;"> | |
| 789 | + <div class="adr_excel" style="margin-top: 13px;"> | |
| 790 | + thead | |
| 791 | + <div class="adr_hd select_adr_hd msg" data-group="tableExcel"> | |
| 792 | + <div style="width: 100px;"></div> | |
| 793 | + <div style="width: 100px;"></div> | |
| 794 | + <div style="width: 140px;"> | |
| 795 | + <label for="" class="label"></label> | |
| 796 | + <select class="field-selector"> | |
| 797 | + <option value="">선택하기</option> | |
| 798 | + <option value="addrNm">이름</option> | |
| 799 | + <option value="addrPhoneNo">휴대폰</option> | |
| 800 | + <option value="addrInfo1">[*1*]</option> | |
| 801 | + <option value="addrInfo2">[*2*]</option> | |
| 802 | + <option value="addrInfo3">[*3*]</option> | |
| 803 | + <option value="addrInfo4">[*4*]</option> | |
| 804 | + <option value="addrComment">메모</option> | |
| 805 | + </select> | |
| 806 | + </div> | |
| 807 | + <div style="width: 140px;"> | |
| 808 | + <label for="" class="label"></label> | |
| 809 | + <select class="field-selector"> | |
| 810 | + <option value="">선택하기</option> | |
| 811 | + <option value="addrNm">이름</option> | |
| 812 | + <option value="addrPhoneNo">휴대폰</option> | |
| 813 | + <option value="addrInfo1">[*1*]</option> | |
| 814 | + <option value="addrInfo2">[*2*]</option> | |
| 815 | + <option value="addrInfo3">[*3*]</option> | |
| 816 | + <option value="addrInfo4">[*4*]</option> | |
| 817 | + <option value="addrComment">메모</option> | |
| 818 | + </select> | |
| 819 | + </div> | |
| 820 | + <div style="width: 140px;"> | |
| 821 | + <label for="" class="label"></label> | |
| 822 | + <select class="field-selector"> | |
| 823 | + <option value="">선택하기</option> | |
| 824 | + <option value="addrNm">이름</option> | |
| 825 | + <option value="addrPhoneNo">휴대폰</option> | |
| 826 | + <option value="addrInfo1">[*1*]</option> | |
| 827 | + <option value="addrInfo2">[*2*]</option> | |
| 828 | + <option value="addrInfo3">[*3*]</option> | |
| 829 | + <option value="addrInfo4">[*4*]</option> | |
| 830 | + <option value="addrComment">메모</option> | |
| 831 | + </select> | |
| 832 | + </div> | |
| 833 | + <div style="width: 140px;"> | |
| 834 | + <label for="" class="label"></label> | |
| 835 | + <select class="field-selector"> | |
| 836 | + <option value="">선택하기</option> | |
| 837 | + <option value="addrNm">이름</option> | |
| 838 | + <option value="addrPhoneNo">휴대폰</option> | |
| 839 | + <option value="addrInfo1">[*1*]</option> | |
| 840 | + <option value="addrInfo2">[*2*]</option> | |
| 841 | + <option value="addrInfo3">[*3*]</option> | |
| 842 | + <option value="addrInfo4">[*4*]</option> | |
| 843 | + <option value="addrComment">메모</option> | |
| 844 | + </select> | |
| 845 | + </div> | |
| 846 | + <div style="width: 140px;"> | |
| 847 | + <label for="" class="label"></label> | |
| 848 | + <select class="field-selector"> | |
| 849 | + <option value="">선택하기</option> | |
| 850 | + <option value="addrNm">이름</option> | |
| 851 | + <option value="addrPhoneNo">휴대폰</option> | |
| 852 | + <option value="addrInfo1">[*1*]</option> | |
| 853 | + <option value="addrInfo2">[*2*]</option> | |
| 854 | + <option value="addrInfo3">[*3*]</option> | |
| 855 | + <option value="addrInfo4">[*4*]</option> | |
| 856 | + <option value="addrComment">메모</option> | |
| 857 | + </select> | |
| 858 | + </div> | |
| 859 | + <div style="width: 140px;"> | |
| 860 | + <label for="" class="label"></label> | |
| 861 | + <select class="field-selector"> | |
| 862 | + <option value="">선택하기</option> | |
| 863 | + <option value="addrNm">이름</option> | |
| 864 | + <option value="addrPhoneNo">휴대폰</option> | |
| 865 | + <option value="addrInfo1">[*1*]</option> | |
| 866 | + <option value="addrInfo2">[*2*]</option> | |
| 867 | + <option value="addrInfo3">[*3*]</option> | |
| 868 | + <option value="addrInfo4">[*4*]</option> | |
| 869 | + <option value="addrComment">메모</option> | |
| 870 | + </select> | |
| 871 | + </div> | |
| 872 | + <div style="width: 125px;"> | |
| 873 | + <label for="" class="label"></label> | |
| 874 | + <select class="field-selector"> | |
| 875 | + <option value="">선택하기</option> | |
| 876 | + <option value="addrNm">이름</option> | |
| 877 | + <option value="addrPhoneNo">휴대폰</option> | |
| 878 | + <option value="addrInfo1">[*1*]</option> | |
| 879 | + <option value="addrInfo2">[*2*]</option> | |
| 880 | + <option value="addrInfo3">[*3*]</option> | |
| 881 | + <option value="addrInfo4">[*4*]</option> | |
| 882 | + <option value="addrComment">메모</option> | |
| 883 | + </select> | |
| 884 | + </div> | |
| 885 | + </div> | |
| 886 | + </div> --> | |
| 887 | + | |
| 888 | + <div class="drag_drop_wrap callList_includ_box" id="tabulator_excel"> | |
| 889 | +<!-- <img src="/publish/images/content/excel.jpg" style="width: 100%;"> --> | |
| 890 | + </div> | |
| 891 | + <div class="excel_middle"> | |
| 892 | + <div class="select_btnWrap clearfix"> | |
| 893 | + <div> | |
| 894 | + <button type="button" id="allDel"><i class="remove_img"></i>전체삭제</button> | |
| 895 | + <button type="button" id="in_select_del"><i class="remove_img"></i>선택삭제</button> | |
| 896 | + </div> | |
| 897 | + | |
| 898 | + </div> | |
| 899 | + </div><!--// 공통 --> | |
| 900 | + | |
| 901 | + <!-- 붙여놓기 설명 --> | |
| 902 | +<!-- <div class="req_area"> --> | |
| 903 | +<!-- <div class="text_box"> --> | |
| 904 | +<!-- - 휴대폰 번호가 입력된 txt 파일을 열어 복사(Ctrl+c) + 붙여넣기(Ctrl+v)로도 입력하실 수 있습니다.<br> --> | |
| 905 | +<!-- - 휴대폰 번호는 필수입력 항목입니다.<br> --> | |
| 906 | +<!-- - 이름,휴대폰 번호,[*1*],[*2*],[*3*],[*4*],메모 순서대로 입력해주세요.(예 : 010-1234-5678,홍길동,변수1…메모)<br> --> | |
| 907 | +<!-- - 이름은 24byte, [*1*]~[*4*] 40byte, 메모는 250byte까지 입력 가능합니다.<br> --> | |
| 908 | +<!-- - '오류 검사'를 통해 등록된 데이터에 전화번호 입력 오류를 확인하실 수 있습니다. --> | |
| 909 | +<!-- </div> --> | |
| 910 | +<!-- </div> --> | |
| 911 | + <div class="popup_btn_wrap2" style="margin: 0 auto 30px auto;"> | |
| 912 | + <button type="button" id="btnAddrMassReg">추가</button> | |
| 913 | + <button type="button" id="btnAddrMassClose" class="tooltip-close" data-focus="adr_popup07-close" data-focus-next="popup07">닫기</button> | |
| 914 | + </div> | |
| 915 | + | |
| 916 | + </div>(No newline at end of file) |
--- src/main/webapp/WEB-INF/jsp/web/kakao/sent/KakaoSentAllListAjax.jsp
+++ src/main/webapp/WEB-INF/jsp/web/kakao/sent/KakaoSentAllListAjax.jsp
... | ... | @@ -3,6 +3,7 @@ |
| 3 | 3 |
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> |
| 4 | 4 |
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> |
| 5 | 5 |
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> |
| 6 |
+<%@ taglib prefix="ec" uri="/WEB-INF/tld/ecnet_tld.tld"%> |
|
| 6 | 7 |
<%@ page import="itn.com.cmm.LoginVO" %> |
| 7 | 8 |
<script src="/publish/js/content.js"></script> |
| 8 | 9 |
<script src="/publish/js/popupLayer.js"></script> |
... | ... | @@ -48,102 +49,145 @@ |
| 48 | 49 |
|
| 49 | 50 |
} |
| 50 | 51 |
}); |
| 51 |
- |
|
| 52 |
- if($("#tdType").val() == "groupList" || $("#tdType").val() == ""){
|
|
| 53 |
- $("#privateListTable").hide();
|
|
| 54 |
- $("#groupListTable").show();
|
|
| 55 |
- }else{
|
|
| 56 |
- $("#privateListTable").show();
|
|
| 57 |
- $("#groupListTable").hide();
|
|
| 58 |
- } |
|
| 59 | 52 |
}); |
| 60 | 53 |
|
| 54 |
+function fnReservCancel(msgGroupId){
|
|
| 55 |
+ |
|
| 56 |
+ var form = document.resCancelForm; |
|
| 57 |
+ var loginVO = '${LoginVO}';
|
|
| 58 |
+ |
|
| 59 |
+ form.msgGroupId.value = msgGroupId; |
|
| 60 |
+ |
|
| 61 |
+ if(loginVO == "" || loginVO == null){
|
|
| 62 |
+ |
|
| 63 |
+ alert("로그인 후 이용이 가능합니다.");
|
|
| 64 |
+ return false; |
|
| 65 |
+ |
|
| 66 |
+ } |
|
| 67 |
+ |
|
| 68 |
+ var data = new FormData(form); |
|
| 69 |
+ url = "/web/mjon/reservmsg/deleteReservMsgCancelDataAjax.do"; |
|
| 70 |
+ |
|
| 71 |
+ if(confirm("정말 예약을 취소하시겠습니까?")){
|
|
| 72 |
+ |
|
| 73 |
+ $.ajax({
|
|
| 74 |
+ type: "POST", |
|
| 75 |
+ url: url, |
|
| 76 |
+ data: data, |
|
| 77 |
+ dataType:'json', |
|
| 78 |
+ async: false, |
|
| 79 |
+ processData: false, |
|
| 80 |
+ contentType: false, |
|
| 81 |
+ cache: false, |
|
| 82 |
+ success: function (returnData, status) {
|
|
| 83 |
+ if(status == 'success'){
|
|
| 84 |
+ if("fail"==returnData.result){
|
|
| 85 |
+ |
|
| 86 |
+ alert(returnData.message); |
|
| 87 |
+ return false; |
|
| 88 |
+ } |
|
| 89 |
+ |
|
| 90 |
+ var smsCnt = returnData.resultSts; |
|
| 91 |
+ |
|
| 92 |
+ alert("예약 발송이 정상적으로 취소 되었습니다.");
|
|
| 93 |
+ |
|
| 94 |
+ linkPage(1); |
|
| 95 |
+ |
|
| 96 |
+ } else if(status== 'fail'){
|
|
| 97 |
+ alert(returnData.message); |
|
| 98 |
+ } |
|
| 99 |
+ }, |
|
| 100 |
+ error: function (e) { alert("예약 취소에 실패하였습니다."); console.log("ERROR : ", e); }
|
|
| 101 |
+ }); |
|
| 102 |
+ |
|
| 103 |
+ } |
|
| 104 |
+ |
|
| 105 |
+} |
|
| 106 |
+ |
|
| 107 |
+function fn_sentDetailView(msgGroupId) {
|
|
| 108 |
+ // msgGroupId 값을 form에 설정 |
|
| 109 |
+ $("#searchForm #msgGroupId").val(msgGroupId);
|
|
| 110 |
+ |
|
| 111 |
+ // form을 해당 URL로 제출 |
|
| 112 |
+ $("#searchForm").attr("action", "/web/kakao/sent/selectKakaoSentDetailView.do");
|
|
| 113 |
+ $("#searchForm").submit();
|
|
| 114 |
+} |
|
| 115 |
+ |
|
| 61 | 116 |
</script> |
| 62 |
- <input type="button" id="tooltopClick" data-tooltip="rev_popup01" style="display:none;"/> |
|
| 63 | 117 |
<div class="list_info"> |
| 64 |
- <input type="hidden" id="tdType" value="${kakaoSentVO.listType}">
|
|
| 65 |
- <p>총 <span class="c_e40000"><c:out value="${totalRecordCount}"/></span>건</p>
|
|
| 66 |
- <div> |
|
| 67 |
- <label for="pageUnit" class="label">줄보기 선택</label> |
|
| 68 |
- <select id="pageUnit" name="pageUnit" class="selType2"> |
|
| 69 |
- <option value="10" <c:if test="${paginationInfo.recordCountPerPage == '10'}">selected</c:if> >10개보기</option>
|
|
| 118 |
+ <p>총 발송건수 <span class="c_e40000"><c:out value="${totalRecordCount}"/></span>건</p>
|
|
| 119 |
+ <div> |
|
| 120 |
+ <p class="cf_text c_e40000">※ 예약 발송취소는 예약 발송시간 기준 5분 전까지만 가능</p> |
|
| 121 |
+ <label for="pageUnit" class="label">줄보기 선택</label> |
|
| 122 |
+ <select id="pageUnit" name="pageUnit" class="selType2"> |
|
| 123 |
+ <option value="10" <c:if test="${paginationInfo.recordCountPerPage == '10'}">selected</c:if> >10개보기</option>
|
|
| 70 | 124 |
<option value="20" <c:if test="${paginationInfo.recordCountPerPage == '20'}">selected</c:if> >20개보기</option>
|
| 71 | 125 |
<option value="30" <c:if test="${paginationInfo.recordCountPerPage == '30'}">selected</c:if> >30개보기</option>
|
| 72 |
- </select> |
|
| 73 |
- </div> |
|
| 74 |
- </div> |
|
| 75 |
- <!-- 전송건별 - groupList - --> |
|
| 76 |
- <div class="tb_wrap" id="groupListTable"> |
|
| 126 |
+ </select> |
|
| 127 |
+ </div> |
|
| 128 |
+ </div> |
|
| 129 |
+ <!-- 발송화면 개선 : 카카오톡 테이블 수정 --> |
|
| 130 |
+ <div class="tb_wrap"> |
|
| 77 | 131 |
<table class="tType4"> |
| 78 | 132 |
<colgroup> |
| 79 |
- <col style="width: 40px;"> |
|
| 80 |
- <col style="width: 14%;"> |
|
| 81 |
- <col style="width: 7%;"> |
|
| 82 |
- <col style="width: 10%;"> |
|
| 83 |
- <col style="width: 18%;"> |
|
| 84 |
- <col style="width: 12%;"> |
|
| 85 |
- <col style="width: 10%;"> |
|
| 133 |
+ <col style="width: 45px;"> |
|
| 86 | 134 |
<col style="width: 12%;"> |
| 87 | 135 |
<col style="width: 7%;"> |
| 88 |
- <col style="width: 12%;"> |
|
| 136 |
+ <col style="width: auto;"> |
|
| 89 | 137 |
<col style="width: 7%;"> |
| 90 |
- <%-- <col style="width: 10%;"> --%> |
|
| 138 |
+ <col style="width: 6%;"> |
|
| 139 |
+ <col style="width: 6%;"> |
|
| 140 |
+ <col style="width: 6%;"> |
|
| 141 |
+ <col style="width: 6%;"> |
|
| 142 |
+ <col style="width: 6%;"> |
|
| 143 |
+ <col style="width: 8%;"> |
|
| 144 |
+ <col style="width: 8%;"> |
|
| 91 | 145 |
</colgroup> |
| 92 | 146 |
<thead> |
| 93 | 147 |
<tr> |
| 94 |
- <th> |
|
| 148 |
+ <th rowspan="2"> |
|
| 95 | 149 |
<label for="" class="label">전체 선택</label> |
| 96 | 150 |
<input type="checkbox"> |
| 97 | 151 |
</th> |
| 98 |
- <th> |
|
| 99 |
- 발송일시 |
|
| 152 |
+ <th rowspan="2">발송일시 |
|
| 100 | 153 |
<div class="sort_wrap"> |
| 101 | 154 |
<input type="button" class="sort sortBtn" id="sort_reqdate"> |
| 102 | 155 |
</div> |
| 103 | 156 |
</th> |
| 104 |
- <th> |
|
| 105 |
- 형태 |
|
| 157 |
+ <th rowspan="2">형태 |
|
| 106 | 158 |
<div class="sort_wrap"> |
| 107 |
- <input type="button" class="sort sortBtn" id="sort_msgType"> |
|
| 159 |
+ <input type="button" class="sort sortBtn" id="sort_orderByCode"> |
|
| 108 | 160 |
</div> |
| 109 | 161 |
</th> |
| 110 |
- <th>내용</th> |
|
| 111 |
- <th> |
|
| 112 |
- 받는사람 |
|
| 113 |
- <div class="sort_wrap"> |
|
| 114 |
- <input type="button" class="sort sortBtn" id="sort_callTo"> |
|
| 115 |
- </div> |
|
| 116 |
- </th> |
|
| 117 |
- <th> |
|
| 118 |
- 발신번호 |
|
| 119 |
- <div class="sort_wrap"> |
|
| 120 |
- <input type="button" class="sort sortBtn" id="sort_callFrom"> |
|
| 121 |
- </div> |
|
| 122 |
- </th> |
|
| 123 |
- <th> |
|
| 124 |
- 발송건수 |
|
| 162 |
+ <th rowspan="2">내용</th> |
|
| 163 |
+ <th rowspan="2">발송건수 |
|
| 125 | 164 |
<div class="sort_wrap"> |
| 126 | 165 |
<input type="button" class="sort sortBtn" id="sort_msgGroupCnt"> |
| 127 | 166 |
</div> |
| 128 | 167 |
</th> |
| 129 |
- <th>카카오톡 결과</th> |
|
| 130 |
- <th>건수</th> |
|
| 131 |
- <th>대체문자 결과</th> |
|
| 132 |
- <th>건수</th> |
|
| 133 |
- <!-- <th>금액</th> --> |
|
| 168 |
+ <th rowspan="2">대기</th> |
|
| 169 |
+ <th colspan="2">카카오톡결과</th> |
|
| 170 |
+ <th colspan="2">대체문자결과</th> |
|
| 171 |
+ <th rowspan="2">금액(원)</th> |
|
| 172 |
+ <th rowspan="2">진행상황</th> |
|
| 134 | 173 |
</tr> |
| 174 |
+ <tr> |
|
| 175 |
+ <th>성공</th> |
|
| 176 |
+ <th>실패</th> |
|
| 177 |
+ <th>성공</th> |
|
| 178 |
+ <th>실패</th> |
|
| 179 |
+ </tr> |
|
| 180 |
+ |
|
| 135 | 181 |
</thead> |
| 136 |
- |
|
| 137 | 182 |
<tbody> |
| 138 | 183 |
<c:if test="${not empty resultAllSentList}">
|
| 139 | 184 |
<c:forEach var="resultAllSentList" items="${resultAllSentList}" varStatus="status">
|
| 140 | 185 |
<tr> |
| 141 |
- <td rowspan="2"> |
|
| 186 |
+ <td> |
|
| 142 | 187 |
<label for="msgSentDel${status.count}" class="label">선택</label>
|
| 143 |
- <input type="checkbox" id="msgSentDel${status.count}" name="msgSentDel"
|
|
| 144 |
- value="${resultAllSentList.msgGroupId}" <c:if test="${resultAllSentList.curState eq '0'}">disabled</c:if>>
|
|
| 188 |
+ <input type="checkbox" id="msgSentDel${status.count}" name="msgSentDel" value="${resultAllSentList.msgGroupId}" <c:if test="${resultAllSentList.curState eq '0'}">disabled</c:if>>
|
|
| 145 | 189 |
</td> |
| 146 |
- <td rowspan="2"> |
|
| 190 |
+ <td> |
|
| 147 | 191 |
<c:choose> |
| 148 | 192 |
<c:when test="${resultAllSentList.atDelayYn eq 'Y' && resultAllSentList.atDelayCompleteYn eq 'N'}">
|
| 149 | 193 |
<c:choose> |
... | ... | @@ -165,240 +209,89 @@ |
| 165 | 209 |
</c:otherwise> |
| 166 | 210 |
</c:choose> |
| 167 | 211 |
</td> |
| 168 |
- <td rowspan="2"> |
|
| 169 |
- <p class="c_222 fwRg"> |
|
| 170 |
- <c:if test="${resultAllSentList.msgType eq '8'}">알림톡</c:if>
|
|
| 171 |
- <c:if test="${resultAllSentList.msgType eq '9'}">친구톡</c:if>
|
|
| 172 |
- </p> |
|
| 212 |
+ <td> |
|
| 213 |
+ <c:if test="${resultAllSentList.msgType eq '8'}">알림톡</c:if>
|
|
| 214 |
+ <c:if test="${resultAllSentList.msgType eq '9'}">친구톡</c:if>
|
|
| 173 | 215 |
</td> |
| 174 |
- <td rowspan="2"> |
|
| 175 |
-<%-- <button class="btnType btnType20" data-tooltip="rev_popup01" onClick="javascript:fnRevDetailPop('${resultAllSentList.msgGroupId}','${resultAllSentList.msgId}','${resultAllSentList.fileCnt}'); return false;">상세보기</button> --%>
|
|
| 176 |
- <button class="btnType btnType20" onClick="javascript:fnRevDetailPop('${resultAllSentList.msgGroupId}','${resultAllSentList.msgId}'); return false;">상세보기</button>
|
|
| 216 |
+ <td class="result_cont"> |
|
| 217 |
+ <div class="icon_wrap"> |
|
| 218 |
+ <c:if test="${resultAllSentList.reserveYn eq 'Y'}">
|
|
| 219 |
+ <span class="re">예약</span> |
|
| 220 |
+ <!-- 예약일때만 분할이 있음 --> |
|
| 221 |
+ <c:if test="${resultAllSentList.divideYn eq 'Y'}">
|
|
| 222 |
+ <span class="di">분할</span> |
|
| 223 |
+ </c:if> |
|
| 224 |
+ </c:if> |
|
| 225 |
+ <a href="#none" onclick="fn_sentDetailView('${resultAllSentList.msgGroupId}');">
|
|
| 226 |
+ <c:out value="${resultAllSentList.smsTxt}"/>
|
|
| 227 |
+ </a> |
|
| 228 |
+ </div> |
|
| 229 |
+ </td> |
|
| 230 |
+ <td> |
|
| 231 |
+ <c:out value="${resultAllSentList.msgGroupCnt}"/>
|
|
| 177 | 232 |
</td> |
| 178 |
- <td rowspan="2"> |
|
| 233 |
+ <td> |
|
| 234 |
+ <fmt:formatNumber value="${resultAllSentList.waitCount}" type="number" groupingUsed="true" />
|
|
| 235 |
+ </td> |
|
| 236 |
+ <td> |
|
| 237 |
+ <p class="c_002c9a"><fmt:formatNumber value="${resultAllSentList.successCount}" type="number" groupingUsed="true" /></p>
|
|
| 238 |
+ </td> |
|
| 239 |
+ <td> |
|
| 240 |
+ <p class="c_e40000"><fmt:formatNumber value="${resultAllSentList.failCount}" type="number" groupingUsed="true" /></p>
|
|
| 241 |
+ </td> |
|
| 242 |
+ <td> |
|
| 243 |
+ <p class="c_002c9a"><fmt:formatNumber value="${resultAllSentList.kakaoResendSuccCount}" type="number" groupingUsed="true" /></p>
|
|
| 244 |
+ </td> |
|
| 245 |
+ <td> |
|
| 246 |
+ <p class="c_e40000"><fmt:formatNumber value="${resultAllSentList.kakaoResendFailCount}" type="number" groupingUsed="true" /></p>
|
|
| 247 |
+ </td> |
|
| 248 |
+ <td> |
|
| 249 |
+ <c:if test="${resultAllSentList.totPrice ne '-'}">
|
|
| 250 |
+ <fmt:formatNumber value="${resultAllSentList.totPrice}" type="number" groupingUsed="true" minFractionDigits="0" maxFractionDigits="1" />
|
|
| 251 |
+ </c:if> |
|
| 252 |
+ <c:if test="${resultAllSentList.totPrice eq '-'}">
|
|
| 253 |
+ - |
|
| 254 |
+ </c:if> |
|
| 255 |
+ </td> |
|
| 256 |
+ <td> |
|
| 179 | 257 |
<c:choose> |
| 180 |
- <c:when test="${resultAllSentList.msgGroupCnt > 1}">
|
|
| 181 |
- <p> |
|
| 182 |
- <c:choose> |
|
| 183 |
- <c:when test="${resultAllSentList.addrNm ne '-' and resultAllSentList.addrNm ne ''}">
|
|
| 184 |
- <c:out value="${resultAllSentList.addrNm}"/>
|
|
| 185 |
- </c:when> |
|
| 186 |
- <c:otherwise> |
|
| 187 |
- <c:out value="${resultAllSentList.callToComma}"/>
|
|
| 188 |
- </c:otherwise> |
|
| 189 |
- </c:choose> 외 <fmt:formatNumber value="${resultAllSentList.msgGroupCnt - 1}" pattern="#,###"/>명
|
|
| 190 |
- </p> |
|
| 191 |
- </c:when> |
|
| 192 |
- <c:when test="${resultAllSentList.addrNm ne '-' and resultAllSentList.addrNm ne ''}">
|
|
| 193 |
- <p><c:out value="${resultAllSentList.addrNm}"/></p>
|
|
| 258 |
+ <c:when test="${resultAllSentList.statusCd ne '03' }">
|
|
| 259 |
+ <ec:code codeId="ITN057" code="${resultAllSentList.statusCd }" />
|
|
| 194 | 260 |
</c:when> |
| 195 | 261 |
<c:otherwise> |
| 196 |
- <p><c:out value="${resultAllSentList.callToComma}"/></p>
|
|
| 262 |
+ <p><button class="btnType btnType20" onClick="javascript:fnReservCancel('${resultAllSentList.msgGroupId}'); return false;">예약취소</button></p>
|
|
| 197 | 263 |
</c:otherwise> |
| 198 | 264 |
</c:choose> |
| 199 | 265 |
</td> |
| 200 |
- <td rowspan="2"><p><c:out value="${resultAllSentList.callFromComma}"/></p></td>
|
|
| 201 |
- <td rowspan="2"><p><c:out value="${resultAllSentList.msgGroupCnt}"/></p></td>
|
|
| 202 |
- |
|
| 203 |
- |
|
| 204 |
- |
|
| 205 |
- <td><p class="c_002c9a fwRg">정상수신</p></td> |
|
| 206 |
- <td> |
|
| 207 |
- <!-- 성공건이 1건 이상이면 클릭이벤트 추가 --> |
|
| 208 |
- <p class="c_002c9a fwRg" <c:if test="${resultAllSentList.successCount > 0}">onclick="javascript:fnMsgSFDetailList('${resultAllSentList.msgGroupId}', 'S'); return false;" style="cursor:pointer;"</c:if>>
|
|
| 209 |
- <fmt:formatNumber value="${resultAllSentList.successCount}" pattern="#,###.#"/></p>
|
|
| 210 |
- </td> |
|
| 211 |
- <td><p class="c_002c9a fwRg">정상수신</p></td> |
|
| 212 |
- <td> |
|
| 213 |
- <!-- 성공건이 1건 이상이면 클릭이벤트 추가 --> |
|
| 214 |
- <p class="c_002c9a fwRg" <c:if test="${resultAllSentList.kakaoResendSuccCount > 0}">onclick="javascript:fnMsgSFDetailList('${resultAllSentList.msgGroupId}', 'S'); return false;" style="cursor:pointer;"</c:if>>
|
|
| 215 |
- <fmt:formatNumber value="${resultAllSentList.kakaoResendSuccCount}" pattern="#,###.#"/></p>
|
|
| 216 |
- </td> |
|
| 217 |
- <%-- <td> |
|
| 218 |
- <p class="c_002c9a fwRg"> |
|
| 219 |
- <c:if test="${succPrice > 0}"><fmt:formatNumber value="${succPrice}" pattern="#,###.#"/></c:if>
|
|
| 220 |
- <c:if test="${succPrice eq 0}">0</c:if>
|
|
| 221 |
- </p> |
|
| 222 |
- </td> --%> |
|
| 223 |
- </tr> |
|
| 224 |
- <tr> |
|
| 225 |
- <td class="c_222"><p>실패/대기</p></td> |
|
| 226 |
- <td class="c_222"> |
|
| 227 |
- <!-- 실패건이 1건 이상이면 클릭이벤트 추가 --> |
|
| 228 |
- <p <c:if test="${(resultAllSentList.waitCount+resultAllSentList.failCount) > 0}"> onclick="javascript:fnMsgSFDetailList('${resultAllSentList.msgGroupId}', 'F'); return false;" style="cursor:pointer;"</c:if>>
|
|
| 229 |
- <fmt:formatNumber value="${resultAllSentList.failCount}" pattern="#,###"/> / <fmt:formatNumber value="${resultAllSentList.waitCount}" pattern="#,###"/></p>
|
|
| 230 |
- </td> |
|
| 231 |
- <td class="c_222"><p>실패</p></td> |
|
| 232 |
- <td class="c_222"><!-- 실패건이 1건 이상이면 클릭이벤트 추가 --> |
|
| 233 |
- <p <c:if test="${resultAllSentList.kakaoResendFailCount > 0}"> onclick="javascript:fnMsgSFDetailList('${resultAllSentList.msgGroupId}', 'F'); return false;" style="cursor:pointer;"</c:if>>
|
|
| 234 |
- <fmt:formatNumber value="${resultAllSentList.kakaoResendFailCount}" pattern="#,###"/></p></td>
|
|
| 235 |
- <%--<td class="c_222"> |
|
| 236 |
- <p> |
|
| 237 |
- <c:if test="${(failPrice+waitPrice) > 0}"><fmt:formatNumber value="${(failPrice+waitPrice)}" pattern="#,###.#"/></c:if>
|
|
| 238 |
- <c:if test="${(failPrice+waitPrice) eq 0}">0</c:if>
|
|
| 239 |
- </p> |
|
| 240 |
- </td>--%> |
|
| 241 | 266 |
</tr> |
| 242 | 267 |
</c:forEach> |
| 243 | 268 |
</c:if> |
| 244 | 269 |
<c:if test="${empty resultAllSentList}">
|
| 245 | 270 |
<tr> |
| 246 |
- <td colspan="11">발송 내역이 없습니다.</td> |
|
| 271 |
+ <td colspan="12">발송 내역이 없습니다.</td> |
|
| 247 | 272 |
</tr> |
| 248 | 273 |
</c:if> |
| 249 | 274 |
</tbody> |
| 250 | 275 |
</table> |
| 251 | 276 |
</div> |
| 252 |
- <!-- 전송건별 끝 --> |
|
| 253 | 277 |
|
| 254 |
- <!-- 받는사람(개인별) privatevate --> |
|
| 255 |
- <div class="tb_wrap" id="privateListTable" style="display:none;"> |
|
| 256 |
- <table class="tType4"> |
|
| 257 |
- <colgroup> |
|
| 258 |
- <col style="width: 40px;"> |
|
| 259 |
- <col style="width: 15%;"> |
|
| 260 |
- <col style="width: 12%;"> |
|
| 261 |
- <col style="width: 90px;"> |
|
| 262 |
- <col style="width: 12%;"> |
|
| 263 |
- <col style="width: 14%;"> |
|
| 264 |
- <col style="width: 11%;"> |
|
| 265 |
- <col style="width: 11%;"> |
|
| 266 |
- </colgroup> |
|
| 267 |
- <thead> |
|
| 268 |
- <tr> |
|
| 269 |
- <th> |
|
| 270 |
- <label for="" class="label">전체 선택</label> |
|
| 271 |
- <input type="checkbox"> |
|
| 272 |
- </th> |
|
| 273 |
- <th> |
|
| 274 |
- 발송일시 |
|
| 275 |
- <div class="sort_wrap"> |
|
| 276 |
- <input type="button" class="sort sortBtn" id="sort_reqdate"> |
|
| 277 |
- </div> |
|
| 278 |
- </th> |
|
| 279 |
- <th> |
|
| 280 |
- 형태 |
|
| 281 |
- <div class="sort_wrap"> |
|
| 282 |
- <input type="button" class="sort sortBtn" id="sort_msgType"> |
|
| 283 |
- </div> |
|
| 284 |
- </th> |
|
| 285 |
- <th>내용</th> |
|
| 286 |
- <th> |
|
| 287 |
- 받는사람 |
|
| 288 |
- <div class="sort_wrap"> |
|
| 289 |
- <input type="button" class="sort sortBtn" id="sort_callTo"> |
|
| 290 |
- </div> |
|
| 291 |
- </th> |
|
| 292 |
- <th> |
|
| 293 |
- 발신번호 |
|
| 294 |
- <div class="sort_wrap"> |
|
| 295 |
- <input type="button" class="sort sortBtn" id="sort_callFrom"> |
|
| 296 |
- </div> |
|
| 297 |
- </th> |
|
| 298 |
- <th>카카오톡 결과</th> |
|
| 299 |
- <th>대체문자 결과</th> |
|
| 300 |
- </tr> |
|
| 301 |
- </thead> |
|
| 302 |
- |
|
| 303 |
- <tbody> |
|
| 304 |
- <c:if test="${not empty resultAllSentList}">
|
|
| 305 |
- <c:forEach var="resultAllSentList" items="${resultAllSentList}" varStatus="status">
|
|
| 306 |
- <tr> |
|
| 307 |
- <td> |
|
| 308 |
- <label for="msgSentDel${status.count}" class="label">선택</label>
|
|
| 309 |
- <input type="checkbox" id="msgSentDel${status.count}" name="msgSentDel"
|
|
| 310 |
- value="${resultAllSentList.msgSeq}" <c:if test="${resultAllSentList.curState eq '0'}">disabled</c:if>>
|
|
| 311 |
- </td> |
|
| 312 |
- <td><p><fmt:formatDate pattern = "yyyy-MM-dd HH:mm" value = "${resultAllSentList.reqdate}" /></p></td>
|
|
| 313 |
- <td> |
|
| 314 |
- <p class="c_222 fwRg"> |
|
| 315 |
- <c:if test="${resultAllSentList.msgType eq '8'}">알림톡</c:if>
|
|
| 316 |
- <c:if test="${resultAllSentList.msgType eq '9'}">친구톡</c:if>
|
|
| 317 |
- </p> |
|
| 318 |
- </td> |
|
| 319 |
- <td> |
|
| 320 |
-<%-- <button class="btnType btnType20" data-tooltip="rev_popup01" onClick="javascript:fnRevDetailPop('${resultAllSentList.msgGroupId}','${resultAllSentList.msgId}','${resultAllSentList.fileCnt}'); return false;">상세보기</button> --%>
|
|
| 321 |
- <button class="btnType btnType20" onClick="javascript:fnRevDetailPop('${resultAllSentList.msgGroupId}','${resultAllSentList.msgId}'); return false;">상세보기</button>
|
|
| 322 |
- <!-- <button class="btnType btnType20" data-tooltip="rev_popup03">상세보기</button> --> |
|
| 323 |
- </td> |
|
| 324 |
- <td> |
|
| 325 |
- <c:choose> |
|
| 326 |
- <c:when test="${resultAllSentList.msgGroupCnt > 1}">
|
|
| 327 |
- <p> |
|
| 328 |
- <c:choose> |
|
| 329 |
- <c:when test="${resultAllSentList.addrNm ne '-' and resultAllSentList.addrNm ne ''}">
|
|
| 330 |
- <c:out value="${resultAllSentList.addrNm}"/>
|
|
| 331 |
- </c:when> |
|
| 332 |
- <c:otherwise> |
|
| 333 |
- <c:out value="${resultAllSentList.callToComma}"/>
|
|
| 334 |
- </c:otherwise> |
|
| 335 |
- </c:choose> 외 <fmt:formatNumber value="${resultAllSentList.msgGroupCnt - 1}" pattern="#,###"/>명
|
|
| 336 |
- </p> |
|
| 337 |
- </c:when> |
|
| 338 |
- <c:when test="${resultAllSentList.addrNm ne '-' and resultAllSentList.addrNm ne ''}">
|
|
| 339 |
- <p><c:out value="${resultAllSentList.addrNm}"/></p>
|
|
| 340 |
- </c:when> |
|
| 341 |
- <c:otherwise> |
|
| 342 |
- <p><c:out value="${resultAllSentList.callToComma}"/></p>
|
|
| 343 |
- </c:otherwise> |
|
| 344 |
- </c:choose> |
|
| 345 |
- </td> |
|
| 346 |
- <td><p><c:out value="${resultAllSentList.callFromComma}"/></p></td>
|
|
| 347 |
- <td> |
|
| 348 |
- <c:choose> |
|
| 349 |
- <c:when test="${resultAllSentList.msgResult eq 'S'}">
|
|
| 350 |
- <p class="c_002c9a fwRg">정상수신</p> |
|
| 351 |
- </c:when> |
|
| 352 |
- <c:when test="${resultAllSentList.msgResult eq 'W'}">
|
|
| 353 |
- <p class="fwRg c_19b32b">발송대기</p> |
|
| 354 |
- </c:when> |
|
| 355 |
- <c:when test="${resultAllSentList.msgResult eq 'F'}">
|
|
| 356 |
- <p class="fwRg c_e40000">수신오류</p> |
|
| 357 |
- </c:when> |
|
| 358 |
- <c:otherwise>-</c:otherwise> |
|
| 359 |
- </c:choose> |
|
| 360 |
- </td> |
|
| 361 |
- <td> |
|
| 362 |
- <!-- 알림톡 수신오류인 경우, 대체문자 발송 여부에 따라 정상수신/수신오류 표기 --> |
|
| 363 |
- <c:choose> |
|
| 364 |
- <c:when test="${resultAllSentList.msgResult eq 'F' and resultAllSentList.bizKakaoResendYn eq 'Y' and resultAllSentList.callStatus eq 'S'}">
|
|
| 365 |
- <p class="c_002c9a fwRg">정상수신</p> |
|
| 366 |
- </c:when> |
|
| 367 |
- <c:when test="${resultAllSentList.msgResult eq 'F' and resultAllSentList.bizKakaoResendYn eq 'Y' and resultAllSentList.callStatus eq 'F'}">
|
|
| 368 |
- <p class="fwRg c_e40000">수신오류</p> |
|
| 369 |
- </c:when> |
|
| 370 |
- <c:otherwise>-</c:otherwise> |
|
| 371 |
- </c:choose> |
|
| 372 |
- </td> |
|
| 373 |
- |
|
| 374 |
- </tr> |
|
| 375 |
- </c:forEach> |
|
| 376 |
- </c:if> |
|
| 377 |
- <c:if test="${empty resultAllSentList}">
|
|
| 378 |
- <tr> |
|
| 379 |
- <td colspan="8">발송 내역이 없습니다.</td> |
|
| 380 |
- </tr> |
|
| 381 |
- </c:if> |
|
| 382 |
- </tbody> |
|
| 383 |
- </table> |
|
| 384 |
- </div> |
|
| 385 |
- <!-- 수신자별 끝 --> |
|
| 386 |
- |
|
| 278 |
+ <!--// 발송화면 개선 : 카카오톡 테이블 수정 --> |
|
| 279 |
+ |
|
| 387 | 280 |
<div class="table_btn clearfix"> |
| 388 |
- <div class="table_btn_left"> |
|
| 389 |
- <!-- 2022.07.04 발송결과 화면에 리스트 선택삭제 기능 제거(카운팅 및 금액 합산 오류 관련) --> |
|
| 390 |
-<!-- <button type="button" class="btnType btnType15" onClick="javascript:fnDelete(); return false;"><i class="remove_img"></i>선택삭제</button> --> |
|
| 391 |
- <button type="button" data-tooltip="rev_popup02" class="btnType btnType15"><i class="add_img"></i>그룹등록</button> |
|
| 392 |
- <button type="button" class="btnType btnType15" onClick="javascript:fnDeleteAddrNo('${kakaoSentVO.listType}'); return false;"><i class="remove_img"></i>주소록에서 번호 삭제</button>
|
|
| 393 |
- <button type="button" class="btnType btnType15" onClick="javascript:fnAddBlockNo('${kakaoSentVO.listType}'); return false;"></i>수신거부번호 등록</button>
|
|
| 281 |
+ <div class="table_btn_left"> |
|
| 282 |
+ <button type="button" onclick="javascript:fnDelete(); return false;" class="btnType btnType15"><i class="remove_img"></i>선택삭제</button> |
|
| 394 | 283 |
</div> |
| 395 | 284 |
<div class="table_btn_right"> |
| 396 |
- <button type="button" class="excel_btn btnType" onClick="javascript:fnExcelDownLoad('all','${kakaoSentVO.listType}'); return false;"><i class="downroad"></i>엑셀 다운로드</button>
|
|
| 397 |
- <button type="button" class="print_btn btnType" onClick="javascript:fnShowPrintPopup('all','${kakaoSentVO.tabType}'); return false;"><i class="print_img"></i>발송결과 출력하기</button>
|
|
| 285 |
+ <button type="button" class="excel_btn btnType"><i class="downroad"></i>발송결과 리스트</button> |
|
| 398 | 286 |
</div> |
| 399 |
- </div> |
|
| 287 |
+ </div> |
|
| 288 |
+ |
|
| 400 | 289 |
<c:if test="${!empty resultAllSentList}">
|
| 401 | 290 |
<ul class="pagination"> |
| 402 | 291 |
<ui:pagination paginationInfo = "${paginationInfo}" type="imageWeb" jsFunction="linkPage" />
|
| 403 | 292 |
</ul> |
| 404 | 293 |
</c:if> |
| 294 |
+ |
|
| 295 |
+ <form id="resCancelForm" name="resCancelForm" method="post"> |
|
| 296 |
+ <input type="hidden" id="msgGroupId" name="msgGroupId" value=""/> |
|
| 297 |
+ </form>(No newline at end of file) |
+++ src/main/webapp/WEB-INF/jsp/web/kakao/sent/KakaoSentAllListAjax_back_250318.jsp
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/WEB-INF/jsp/web/kakao/sent/KakaoSentDetailPopAjax.jsp
+++ src/main/webapp/WEB-INF/jsp/web/kakao/sent/KakaoSentDetailPopAjax.jsp
| This diff is skipped because there are too many other diffs. |
+++ src/main/webapp/WEB-INF/jsp/web/kakao/sent/KakaoSentDetailPopAjax_back_250320.jsp
| This diff is skipped because there are too many other diffs. |
+++ src/main/webapp/WEB-INF/jsp/web/kakao/sent/KakaoSentDetailView.jsp
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/WEB-INF/jsp/web/kakao/sent/KakaoSentView.jsp
+++ src/main/webapp/WEB-INF/jsp/web/kakao/sent/KakaoSentView.jsp
| This diff is skipped because there are too many other diffs. |
+++ src/main/webapp/WEB-INF/jsp/web/kakao/sent/KakaoSentView_back_250305.jsp
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/WEB-INF/jsp/web/login/EgovLoginGnrlUsr.jsp
+++ src/main/webapp/WEB-INF/jsp/web/login/EgovLoginGnrlUsr.jsp
| This diff is skipped because there are too many other diffs. |
+++ src/main/webapp/WEB-INF/jsp/web/login/EgovLoginGnrlUsr_back_250325.jsp
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataSMLView.jsp
+++ src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataSMLView.jsp
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataView.jsp
+++ src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataView.jsp
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/WEB-INF/jsp/web/msgsent/MsgSentAllListAjax.jsp
+++ src/main/webapp/WEB-INF/jsp/web/msgsent/MsgSentAllListAjax.jsp
| This diff is skipped because there are too many other diffs. |
+++ src/main/webapp/WEB-INF/jsp/web/msgsent/MsgSentAllListAjax_advc_backup_20250115.jsp
| This diff is skipped because there are too many other diffs. |
+++ src/main/webapp/WEB-INF/jsp/web/msgsent/MsgSentDetailView.jsp
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/WEB-INF/jsp/web/msgsent/MsgSentView.jsp
+++ src/main/webapp/WEB-INF/jsp/web/msgsent/MsgSentView.jsp
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/WEB-INF/jsp/web/msgsent/subcontent/MsgSentView_HA_allSentAjax.jsp
+++ src/main/webapp/WEB-INF/jsp/web/msgsent/subcontent/MsgSentView_HA_allSentAjax.jsp
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/WEB-INF/jsp/web/user/mberInfoIndex.jsp
+++ src/main/webapp/WEB-INF/jsp/web/user/mberInfoIndex.jsp
| This diff is skipped because there are too many other diffs. |
+++ src/main/webapp/WEB-INF/tld/functions.tld
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/js/MJUtill.js
+++ src/main/webapp/js/MJUtill.js
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/js/kakao/at/addr.js
+++ src/main/webapp/js/kakao/at/addr.js
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/js/kakao/at/alimtalkExcel.js
+++ src/main/webapp/js/kakao/at/alimtalkExcel.js
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/js/kakao/at/init.js
+++ src/main/webapp/js/kakao/at/init.js
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/js/kakao/at/priceClclt.js
+++ src/main/webapp/js/kakao/at/priceClclt.js
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/js/kakao/at/tabulator.js
+++ src/main/webapp/js/kakao/at/tabulator.js
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/js/web/msgdata/msgDataView.js
+++ src/main/webapp/js/web/msgdata/msgDataView.js
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/publish/css/content.css
+++ src/main/webapp/publish/css/content.css
| This diff is skipped because there are too many other diffs. |
+++ src/main/webapp/publish/images/content/kakaoBg_01.png
| Binary file is not shown |
--- src/main/webapp/publish/publish_m/munjaon_intro_03.html
+++ src/main/webapp/publish/publish_m/munjaon_intro_campaign.html
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/publish/textingmsg_2025_detail_kakao.html
+++ src/main/webapp/publish/textingmsg_2025_detail_kakao.html
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/publish/textingmsg_2025_list.html
+++ src/main/webapp/publish/textingmsg_2025_list.html
| This diff is skipped because there are too many other diffs. |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?