rosewiper 2024-09-02
발송결과 엑셀다운로드 정렬 및 성공, 실패 카운트 오류 수정
@be8286da2b562162dcd2801f75de205993a3ea70
src/main/java/itn/let/mjo/msgsent/service/MjonMsgSentVO.java
--- src/main/java/itn/let/mjo/msgsent/service/MjonMsgSentVO.java
+++ src/main/java/itn/let/mjo/msgsent/service/MjonMsgSentVO.java
@@ -84,6 +84,9 @@
 	private String msgSentType;
 	private String successCount;
 	
+	private String resultSValue;
+	private String resultWFValue;
+	
 	public String getSuccessCount() {
 		return successCount;
 	}
@@ -458,5 +461,17 @@
 	public void setSendKind(String sendKind) {
 		this.sendKind = sendKind;
 	}
+	public String getResultSValue() {
+		return resultSValue;
+	}
+	public void setResultSValue(String resultSValue) {
+		this.resultSValue = resultSValue;
+	}
+	public String getResultWFValue() {
+		return resultWFValue;
+	}
+	public void setResultWFValue(String resultWFValue) {
+		this.resultWFValue = resultWFValue;
+	}
 	
 }
src/main/java/itn/let/mjo/msgsent/web/MjonMsgSentController.java
--- src/main/java/itn/let/mjo/msgsent/web/MjonMsgSentController.java
+++ src/main/java/itn/let/mjo/msgsent/web/MjonMsgSentController.java
@@ -1280,7 +1280,7 @@
 					cell.setCellStyle(style);
 					
 					cell = row.createCell(10);
-					cell.setCellValue("실패");
+					cell.setCellValue("실패/대기");
 					cell.setCellStyle(style);
 					
 					cell = row.createCell(11);
@@ -1380,11 +1380,26 @@
 						
 						
 						double eachPrice = Float.parseFloat(resultAllSentList.get(i).getEachPrice());
+						int resultSValue = 0;
+						int resultWFValue = 0;
+						
+						if(resultAllSentList.get(i).getResultSValue() != null) {
+							resultSValue = Integer.parseInt(resultAllSentList.get(i).getResultSValue());
+						}else {
+							resultSValue = 1;
+						}
+						
+						if(resultAllSentList.get(i).getResultWFValue() != null) {
+							resultWFValue = Integer.parseInt(resultAllSentList.get(i).getResultWFValue());
+						}else {
+							resultWFValue = 1;
+						}
+						
 						
 						if("S".equals(resultAllSentList.get(i).getMsgResult())) {
-							resSucCnt = 1;
+							resSucCnt = resultSValue;
 						} else {
-							resFailCnt = 1;
+							resFailCnt = resultWFValue;
 						}
 							
 						resSucPrice = eachPrice * resSucCnt;
src/main/resources/egovframework/sqlmap/let/msg/MjonMsgSent_SQL_mysql.xml
--- src/main/resources/egovframework/sqlmap/let/msg/MjonMsgSent_SQL_mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/msg/MjonMsgSent_SQL_mysql.xml
@@ -256,6 +256,8 @@
 			, M2.msgResult
 			, M2.sendKind
 			, M2.msgKind
+			, M2.resultSValue
+			, M2.resultWFValue
 		FROM
 			(		
 			SELECT
@@ -297,6 +299,8 @@
 				, msgTypeName					 AS msgTypeName
 				, orderByCode					 AS orderByCode
 				, RESULT						 AS msgResult
+				, SUM(IF(RESULT = 'S', 1, 0 ))	 AS resultSValue
+                , SUM(IF(RESULT = 'W' OR RESULT = 'F', 1, 0 ))	AS resultWFValue
 				, sendKind						 AS sendKind
 				, MSG_KIND						 AS msgKind
 			FROM
Add a comment
List