From 68b3b540ee4d2c7f1a58ba0dcba722072b9a095d Mon Sep 17 00:00:00 2001
From: kubo8
Date: Thu, 22 Dec 2022 14:03:20 +0900
Subject: [PATCH] =?UTF-8?q?=EA=B3=A0=EA=B0=9D=20=EC=9D=BC=EB=B3=84=20?=
=?UTF-8?q?=ED=86=B5=EA=B3=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../service/mock/bsnmDayExcelHeader.json | 39 +
.../src/modules/stats/views/BsnmDayList.vue | 110 ++-
.../co/uplus/ez/api/stats/StatsService.java | 11 +
.../uplus/ez/api/stats/dto/BsnmDayList.java | 19 +
.../api/stats/dto/BsnmDayListExcelReqDto.java | 4 +
.../ez/api/stats/dto/BsnmDayListReqDto.java | 4 +
src/main/resources/application-stg.yml | 8 +-
.../mapper/mysql/stats/stats-mapper.xml | 729 ++++++++----------
8 files changed, 504 insertions(+), 420 deletions(-)
diff --git a/frontend/src/modules/stats/service/mock/bsnmDayExcelHeader.json b/frontend/src/modules/stats/service/mock/bsnmDayExcelHeader.json
index 94d9748..8962156 100644
--- a/frontend/src/modules/stats/service/mock/bsnmDayExcelHeader.json
+++ b/frontend/src/modules/stats/service/mock/bsnmDayExcelHeader.json
@@ -36,6 +36,18 @@
{
"name": "알림톡",
"colspan": 2
+ },
+ {
+ "name": "대체발송SMS",
+ "colspan": 2
+ },
+ {
+ "name": "대체발송LMS",
+ "colspan": 2
+ },
+ {
+ "name": "대체발송MMS",
+ "colspan": 2
}
],
[
@@ -83,6 +95,33 @@
{
"key": "succCntR",
"name": "성공건수"
+ },
+ {
+ "key": "fbSndCntS",
+ "name": "발송건수",
+ "format": "Format_00"
+ },
+ {
+ "key": "fbSuccCntS",
+ "name": "성공건수"
+ },
+ {
+ "key": "fbSndCntL",
+ "name": "발송건수",
+ "format": "Format_00"
+ },
+ {
+ "key": "fbSuccCntL",
+ "name": "성공건수"
+ },
+ {
+ "key": "fbSndCntM",
+ "name": "발송건수",
+ "format": "Format_00"
+ },
+ {
+ "key": "fbSuccCntM",
+ "name": "성공건수"
}
]
]
diff --git a/frontend/src/modules/stats/views/BsnmDayList.vue b/frontend/src/modules/stats/views/BsnmDayList.vue
index fc225dd..28ecf1d 100644
--- a/frontend/src/modules/stats/views/BsnmDayList.vue
+++ b/frontend/src/modules/stats/views/BsnmDayList.vue
@@ -155,13 +155,16 @@ export default {
{ header: 'LMS', childNames: ['sndCntL', 'succCntRtL'] },
{ header: 'MMS', childNames: ['sndCntM', 'succCntRtM'] },
{ header: '알림톡', childNames: ['sndCntR', 'succCntRtR'] },
+ { header: '대체발송SMS', childNames: ['fbSndCntS', 'fbSuccCntRtS'] },
+ { header: '대체발송LMS', childNames: ['fbSndCntL', 'fbSuccCntRtL'] },
+ { header: '대체발송MMS', childNames: ['fbSndCntM', 'fbSuccCntRtM'] }
],
],
columns: [
- { name: 'sumYmd', header: '날짜', align: 'center', width: '8%' },
- { name: 'custNm', header: '고객사명', align: 'center', width: '12%' },
- { name: 'bizrno', header: '사업자번호', align: 'center', width: '8%' },
+ { name: 'sumYmd', header: '날짜', align: 'center', width: '5%' },
+ { name: 'custNm', header: '고객사명', align: 'center', width: '9%' },
+ { name: 'bizrno', header: '사업자번호', align: 'center', width: '6%' },
{
name: 'sndCnt',
header: '발송건수',
@@ -171,7 +174,7 @@ export default {
let result = props.sndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result;
},
- width: '7%',
+ width: '5%',
},
{
name: 'succCntRt',
@@ -187,7 +190,7 @@ export default {
'%)
'
);
},
- width: '7%',
+ width: '5%',
},
{
name: 'sndCntS',
@@ -198,7 +201,7 @@ export default {
let result = props.sndCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result;
},
- width: '7%',
+ width: '5%',
},
{
name: 'succCntRtS',
@@ -214,7 +217,7 @@ export default {
'%)'
);
},
- width: '7%',
+ width: '5%',
},
{
name: 'sndCntL',
@@ -225,7 +228,7 @@ export default {
let result = props.sndCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result;
},
- width: '7%',
+ width: '5%',
},
{
name: 'succCntRtL',
@@ -241,7 +244,7 @@ export default {
'%)'
);
},
- width: '7%',
+ width: '5%',
},
{
name: 'sndCntM',
@@ -252,7 +255,7 @@ export default {
let result = props.sndCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result;
},
- width: '7%',
+ width: '5%',
},
{
name: 'succCntRtM',
@@ -268,7 +271,7 @@ export default {
'%)'
);
},
- width: '7%',
+ width: '5%',
},
{
name: 'sndCntR',
@@ -279,7 +282,7 @@ export default {
let result = props.sndCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result;
},
- width: '7%',
+ width: '5%',
},
{
name: 'succCntRtR',
@@ -295,7 +298,88 @@ export default {
')'
);
},
- width: '7%',
+ width: '5%',
+ },
+ {
+ name: 'fbSndCntS',
+ header: '발송건수',
+ align: 'center',
+ cls: 'td_line',
+ formatter: (props) => {
+ let result = props.fbSndCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
+ return result;
+ },
+ width: '5%',
+ },
+ {
+ name: 'fbSuccCntRtS',
+ header: '성공건수/(%)',
+ align: 'center',
+ cls: 'td_line',
+ formatter: (props) => {
+ return (
+ '' +
+ props.fbSuccCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') +
+ '
\n(' +
+ props.succFbRtS +
+ ')
'
+ );
+ },
+ width: '5%',
+ },
+ {
+ name: 'fbSndCntL',
+ header: '발송건수',
+ align: 'center',
+ cls: 'td_line',
+ formatter: (props) => {
+ let result = props.fbSndCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
+ return result;
+ },
+ width: '5%',
+ },
+ {
+ name: 'fbSuccCntRtL',
+ header: '성공건수/(%)',
+ align: 'center',
+ cls: 'td_line',
+ formatter: (props) => {
+ return (
+ '' +
+ props.fbSuccCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') +
+ '
\n(' +
+ props.succFbRtL +
+ ')
'
+ );
+ },
+ width: '5%',
+ },
+ {
+ name: 'fbSndCntM',
+ header: '발송건수',
+ align: 'center',
+ cls: 'td_line',
+ formatter: (props) => {
+ let result = props.fbSndCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
+ return result;
+ },
+ width: '5%',
+ },
+ {
+ name: 'fbSuccCntRtL',
+ header: '성공건수/(%)',
+ align: 'center',
+ cls: 'td_line',
+ formatter: (props) => {
+ return (
+ '' +
+ props.fbSuccCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') +
+ '
\n(' +
+ props.succFbRtM +
+ ')
'
+ );
+ },
+ width: '5%',
},
],
noDataStr: '검색 결과가 없습니다.',
diff --git a/src/main/java/kr/co/uplus/ez/api/stats/StatsService.java b/src/main/java/kr/co/uplus/ez/api/stats/StatsService.java
index e558f5c..9584ac5 100644
--- a/src/main/java/kr/co/uplus/ez/api/stats/StatsService.java
+++ b/src/main/java/kr/co/uplus/ez/api/stats/StatsService.java
@@ -217,6 +217,12 @@ public class StatsService {
StatsMapper statsMapper = sqlSessionSlave.getMapper(StatsMapper.class);
String nowPage = String.valueOf(bsnmDayListReqDto.getPage());
+
+ //오늘 날짜 조회인지 확인
+ if(DateUtils.date2strYMD().equals(bsnmDayListReqDto.getEndDay())) {
+ bsnmDayListReqDto.setNowDiv("Y");
+ }
+
int totalCnt = statsMapper.selectCustDstatListTotalCnt(bsnmDayListReqDto);
if (totalCnt == 0) {
@@ -260,6 +266,11 @@ public class StatsService {
public BsnmDayListExcelResDto bsnmDayListExcel(BsnmDayListExcelReqDto bsnmDayListExcelReqDto) {
StatsMapper statsMapper = sqlSessionSlave.getMapper(StatsMapper.class);
+
+ //오늘 날짜 조회인지 확인
+ if(DateUtils.date2strYMD().equals(bsnmDayListExcelReqDto.getEndDay())) {
+ bsnmDayListExcelReqDto.setNowDiv("Y");
+ }
List bsnmDayLists = statsMapper.selectCustDstatExcelList(bsnmDayListExcelReqDto);
diff --git a/src/main/java/kr/co/uplus/ez/api/stats/dto/BsnmDayList.java b/src/main/java/kr/co/uplus/ez/api/stats/dto/BsnmDayList.java
index 057b718..77ddaa6 100644
--- a/src/main/java/kr/co/uplus/ez/api/stats/dto/BsnmDayList.java
+++ b/src/main/java/kr/co/uplus/ez/api/stats/dto/BsnmDayList.java
@@ -45,4 +45,23 @@ public class BsnmDayList implements Serializable {
private String succCntR;
@ApiModelProperty(example = "알림톡 성공율", name = "알림톡 성공율", dataType = "String")
private String succRtR;
+ @ApiModelProperty(example = "대체발송SMS 발송건수", name = "대체발송SMS 발송건수", dataType = "String")
+ private String fbSndCntS;
+ @ApiModelProperty(example = "대체발송SMS 성공건수", name = "대체발송SMS 성공건수", dataType = "String")
+ private String fbSuccCntS;
+ @ApiModelProperty(example = "대체발송SMS 성공율", name = "대체발송SMS 성공율", dataType = "String")
+ private String succFbRtS;
+ @ApiModelProperty(example = "대체발송LMS 발송건수", name = "대체발송LMS 발송건수", dataType = "String")
+ private String fbSndCntL;
+ @ApiModelProperty(example = "대체발송LMS 성공건수", name = "대체발송LMS 성공건수", dataType = "String")
+ private String fbSuccCntL;
+ @ApiModelProperty(example = "대체발송LMS 성공율", name = "대체발송LMS 성공율", dataType = "String")
+ private String succFbRtL;
+ @ApiModelProperty(example = "대체발송MMS 발송건수", name = "대체발송MMS 발송건수", dataType = "String")
+ private String fbSndCntM;
+ @ApiModelProperty(example = "대체발송MMS 성공건수", name = "대체발송MMS 성공건수", dataType = "String")
+ private String fbSuccCntM;
+ @ApiModelProperty(example = "대체발송MMS 성공율", name = "대체발송MMS 성공율", dataType = "String")
+ private String succFbRtM;
+
}
\ No newline at end of file
diff --git a/src/main/java/kr/co/uplus/ez/api/stats/dto/BsnmDayListExcelReqDto.java b/src/main/java/kr/co/uplus/ez/api/stats/dto/BsnmDayListExcelReqDto.java
index 3fd2843..1da6203 100644
--- a/src/main/java/kr/co/uplus/ez/api/stats/dto/BsnmDayListExcelReqDto.java
+++ b/src/main/java/kr/co/uplus/ez/api/stats/dto/BsnmDayListExcelReqDto.java
@@ -23,5 +23,9 @@ public class BsnmDayListExcelReqDto implements Serializable {
@ApiModelProperty(example = "사업자등록번호", name = "사업자등록번호", dataType = "String")
private String bizrno;
+
+ @NotNull
+ @ApiModelProperty(example = "당일 조회 여부", name = "당일 조회 여부", dataType = "String")
+ private String nowDiv = "N";
}
\ No newline at end of file
diff --git a/src/main/java/kr/co/uplus/ez/api/stats/dto/BsnmDayListReqDto.java b/src/main/java/kr/co/uplus/ez/api/stats/dto/BsnmDayListReqDto.java
index 24a70a8..4af587c 100644
--- a/src/main/java/kr/co/uplus/ez/api/stats/dto/BsnmDayListReqDto.java
+++ b/src/main/java/kr/co/uplus/ez/api/stats/dto/BsnmDayListReqDto.java
@@ -31,5 +31,9 @@ public class BsnmDayListReqDto implements Serializable {
@NotNull
@ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "int")
private int page;
+
+ @NotNull
+ @ApiModelProperty(example = "당일 조회 여부", name = "당일 조회 여부", dataType = "String")
+ private String nowDiv = "N";
}
\ No newline at end of file
diff --git a/src/main/resources/application-stg.yml b/src/main/resources/application-stg.yml
index a443752..44b9bc8 100644
--- a/src/main/resources/application-stg.yml
+++ b/src/main/resources/application-stg.yml
@@ -8,9 +8,9 @@ spring:
pool-name: hikari-cp
maximum-pool-size: 30
minimum-idle: 5
- connection-timeout: 5000
+ connection-timeout: 1800000
connection-init-sql: SELECT 1
- validation-timeout: 2000
+ validation-timeout: 600000
idle-timeout: 600000
max-lifetime: 1800000
datasource-db2:
@@ -22,9 +22,9 @@ spring:
pool-name: hikari-cp
maximum-pool-size: 30
minimum-idle: 5
- connection-timeout: 5000
+ connection-timeout: 1800000
connection-init-sql: SELECT 1
- validation-timeout: 2000
+ validation-timeout: 600000
idle-timeout: 600000
max-lifetime: 1800000
diff --git a/src/main/resources/mapper/mysql/stats/stats-mapper.xml b/src/main/resources/mapper/mysql/stats/stats-mapper.xml
index f92c29b..b5131cc 100644
--- a/src/main/resources/mapper/mysql/stats/stats-mapper.xml
+++ b/src/main/resources/mapper/mysql/stats/stats-mapper.xml
@@ -933,422 +933,345 @@