리스크관리 / 발송통계 추가

This commit is contained in:
kimre
2022-06-29 17:52:26 +09:00
parent 056ccf20e1
commit 0a2e30b1c2
32 changed files with 2864 additions and 992 deletions

View File

@@ -0,0 +1,72 @@
@charset "utf-8";
/* CSS Document */
@font-face {
font-family: 'SpoqaHanSansNeo';
src: url('../font/SpoqaHanSansNeo-Thin.woff2') format('woff2');
font-weight: 100;
font-style: normal;
}
@font-face {
font-family: 'SpoqaHanSansNeo';
src: url('../font/SpoqaHanSansNeo-Light.woff2') format('woff2');
font-weight: 300;
font-style: normal;
}
@font-face {
font-family: 'SpoqaHanSansNeo';
src: url('../font/SpoqaHanSansNeo-Regular.woff2') format('woff2');
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: 'SpoqaHanSansNeo';
src: url('../font/SpoqaHanSansNeo-Medium.woff2') format('woff2');
font-weight: 500;
font-style: normal;
}
@font-face {
font-family: 'SpoqaHanSansNeo';
src: url('../font/SpoqaHanSansNeo-Bold.woff2') format('woff2');
font-weight: 700;
font-style: normal;
}
.error-wrap {background: #fff; text-align: center; padding:0; margin: 0 auto; font-family: 'SpoqaHanSansNeo';
width:90vw; height:90vh; position: relative; }
.error-body { width:450px; max-width: 98%; margin: 0 auto; text-align: center; position: absolute; top:50%;transform: translate(0, -50%); left:calc(50% - 225px); }
.error-body > .header { font-weight: 700; font-size: 2.5em; margin: 30px 0 20px 0;}
.error-body > .message { font-weight: 400; font-size:1em; line-height: 150%;}
.error-body > .error-btns { width:100%; display: flex;text-align: center; margin-top: 3em; }
.error-body > .error-btns a:nth-child(1) {background: #eb008b; border:1px solid #eb008b; font-weight: 400; font-size:1em; line-height: 150%; border-radius: 5px; color:#fff; text-decoration:none;padding: 10px 0; width: 50%; }
.error-body > .error-btns a:nth-child(2) { display: inline-block; background: #fff; border:1px solid #282828; font-weight: 400; font-size:1em; line-height: 150%; border-radius: 5px; color:#000; text-decoration:none; padding: 10px 0; width: 50%; margin-left: 10px; }
@media only screen and (max-width: 550px) {
.error-body { max-width: 98%; margin: 0 auto; text-align: center; position: relative; top:3em; left:auto; transform: none;}
}
@media only screen and (max-width: 414px) {
.error-body > img { width:6em;}
.error-body > .header {font-size: 1.6em; letter-spacing: -0.05em; margin: 20px 0 10px 0;}
.error-body > .message {font-size:0.9em; letter-spacing: -0.05em;}
}
@media only screen and (max-width: 280px) {
.error-body > img { width:6em;}
.error-body > .header {font-size: 1.35em; letter-spacing: -0.05em; margin: 20px 0 10px 0;}
.error-body > .message {font-size:0.9em; letter-spacing: -0.05em; line-height: 140%;}
.error-body > .error-btns { margin-top: 2em; }
}

View File

@@ -539,95 +539,62 @@ header .user_wrap .user_info .logout {
} }
/* input cal + search-box*/ /* input cal + search-box*/
/*.w35{width:35%;}*/ .w35{width:35%;}
/*.contents .table.table_form.m50{margin-bottom: 50px;}*/ .contents .table.table_form.m50{margin-bottom: 50px;}
/*.contents .input_box.cal{*/ .contents .input_box.cal{
/* display: inline-block;*/ display: inline-block;
/* width: 27.34%;*/ width: 27.34%;
/*}*/ }
/*.contents .input_box.cal label {*/ .contents .input_box.cal label {
/* display: block;*/ display: block;
/*}*/ }
/*.contents .input_box.cal .txt{*/ .contents .input_box.cal .txt{
/* display: inline-block;*/ display: inline-block;
/*}*/ }
/*.contents .input_box.cal p{*/ .contents .input_box.cal p{
/* display: inline-flex;*/ display: inline-flex;
/* margin-left: 10px;*/ margin-left: 10px;
/*}*/ }
/*.contents .input_box.cal input {*/ .contents .input_box.cal input {
/* display: inline-block;*/ display: inline-block;
/* width: 48%;*/ width: 48%;
/* float: left;*/
/* background: #fff url(../images/icon-calender.png) no-repeat right 6% center;*/
/*}*/
/*.contents .input_box.cal input {*/
/* display: inline-block;*/
/* width: 48%;*/
/* float: left;*/
/* background: #fff url(../images/icon-calender.png) no-repeat right 6% center;*/
/*}*/
/*.contents .input_box.cal span {*/
/* display: inline-block;*/
/* width: 48%;*/
/* float: left;*/
/* background: #fff url(../images/icon-calender.png) no-repeat right 6% center;*/
/*}*/
.custom_input.icon_date input[type="text"] {
width: 52%;
float: left; float: left;
background: #fff url(../images/icon-calender.png) no-repeat right 6% center; background: #fff url(../images/icon-calender.png) no-repeat right 6% center;
} }
.custom_input.icon_date input[type="text"]:focus { .contents .input_box.cal input + input{
border-color: #cccccc;
background-color: #f6f6f6;
color: #898989;
}
.contents .input_box.cal span + input{
margin-left: 5%; margin-left: 5%;
} }
.contents .input_box.cal.one{
.vdp-datepicker__calendar header { width: 13.67%;
display: block;
line-height: 40px;
height: 40px;
} }
/*.contents .input_box.cal input + input{*/ .contents .input_box.cal.one input{
/* margin-left: 5%;*/ width: 100%;
/*}*/ }
/*.contents .input_box.cal.one{*/ .contents .input_box.cal.one + .btn-a{
/* width: 13.67%;*/ margin-right: 10px;
/*}*/ }
/*.contents .input_box.cal.one input{*/ .contents .input_box.cal .term{
/* width: 100%;*/ display: flex;
/*}*/ justify-content: space-around;
align-items: center;
}
/*.contents .input_box.cal.one + .btn-a{*/ .contents .input_box.cal .term input:nth-child(1){
/* margin-right: 10px;*/ margin-right: 4%;
/*}*/ }
/*.contents .input_box.cal .term{*/ .vdp-datepicker__calendar div {margin-top:80px;}
/* display: flex;*/
/* justify-content: space-around;*/
/* align-items: center;*/
/*}*/
/*.contents .input_box.cal .term input:nth-child(1){*/ /*.vdp-datepicker__calendar div*/
/* margin-right: 4%;*/
/*}*/
.contents .input_box .search-box { .contents .input_box .search-box {
background: #fff url(../images/icon-search.png) no-repeat 6% center/14px auto; background: #fff url(../images/icon-search.png) no-repeat 6% center/14px auto;
@@ -904,6 +871,8 @@ header .user_wrap .user_info .logout {
/*contents table 추가*/ /*contents table 추가*/
/* arrow_box 반려사유 삭제 */
/*
.contents .table table .arrow_box { .contents .table table .arrow_box {
display: none; display: none;
background-color: #fff; background-color: #fff;
@@ -946,6 +915,7 @@ header .user_wrap .user_info .logout {
width: 0; width: 0;
z-index: 1; z-index: 1;
} }
*/
.contents .table.calculate table td, .contents .table.calculate table th{ .contents .table.calculate table td, .contents .table.calculate table th{
border-left: 1px solid #dadae6; border-left: 1px solid #dadae6;
@@ -976,10 +946,6 @@ header .user_wrap .user_info .logout {
.contents .table table td span {cursor: pointer;} .contents .table table td span {cursor: pointer;}
.contents .table table td .linkstyle {cursor: pointer; text-decoration: underline;}
.contents .table table td .linkstyle:hover {color:#eb008b;}
.contents .table table td span:hover + p.arrow_box { .contents .table table td span:hover + p.arrow_box {
display: block; display: block;
} }
@@ -1593,10 +1559,10 @@ header .user_wrap .user_info .logout {
background: url(../images/icon-add-b.png) no-repeat center center; background: url(../images/icon-add-b.png) no-repeat center center;
} }
/*.popup.popup_form.register .input_add div:nth-child(2){*/ .popup.popup_form.register .input_add div:nth-child(2){
/* width: 89%;*/ width: 89%;
/* padding-top: 5px;*/ padding-top: 5px;
/*}*/ }
.popup .button.white{ .popup .button.white{
background-color: #fff; background-color: #fff;

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@@ -45,6 +45,7 @@ export default {
//this.setMenuData(); //this.setMenuData();
} else { } else {
this.isLogin = false; this.isLogin = false;
window.top.location.href = '/';
//this.menuList = null; //this.menuList = null;
} }
}, },
@@ -53,6 +54,7 @@ export default {
this.isErrPage = true; this.isErrPage = true;
} else { } else {
this.isErrPage = false; this.isErrPage = false;
window.top.location.href = '/';
} }
}, },
}, },

View File

@@ -20,6 +20,10 @@
<script> <script>
//import "../assets/js/script.js"; //import "../assets/js/script.js";
import api from '@/service/api.js'; import api from '@/service/api.js';
// import api from "@/service/api";
// import loginApi from "@/modules/login/service/api"
import tokenSvc from '@/common/token-service';
import { mapGetters } from 'vuex';
export default { export default {
name: 'Nav', name: 'Nav',
@@ -30,21 +34,48 @@ export default {
return { return {
isLogin : false, isLogin : false,
isAuthChk : false, isAuthChk : false,
isErrPage: false,
navActive: false,
menuList: [], menuList: [],
tempList: [] tempList: []
} }
}, },
created() { created() {
// 메뉴 가져오기 this.isLogin = !!tokenSvc.getToken();
let curPage = location.pathname;
if (this.isLogin && curPage != "/login") {
this.$store.commit("login/isLogin", true);
this.setMenuData(); this.setMenuData();
} else {
this.$store.commit("login/isLogin", false);
this.isLogin = false;
}
}, },
mounted() {}, mounted() {},
computed: { computed: {
...mapGetters({
getLogin: 'login/isLogin',
getErrorPage: 'login/isErrorPage',
}),
}, },
watch: { watch: {
getLogin(data) {
if (data != null && data != '' && data == true) {
this.isLogin = true;
this.setMenuData();
} else {
this.isLogin = false;
this.menuList = null;
}
},
getErrorPage(data) {
if (data != null && data != '' && data == true) {
this.isErrPage = true;
} else {
this.isErrPage = false;
}
},
}, },
methods: { methods: {
setMenuData() { setMenuData() {
@@ -73,23 +104,42 @@ export default {
//console.log(classNm); //console.log(classNm);
} }
//this.menuList = rootMenu.children; //this.menuList = rootMenu.children;
this.menuList = this.tempList; this.menuList = this.tempList;
var location = this.$route.fullPath;
console.log(location)
if(location.contains(classNm)){
}
//this.$store.commit("login/isLogin", true); //this.$store.commit("login/isLogin", true);
//this.$store.commit("login/isAuthChk", true); //this.$store.commit("login/isAuthChk", true);
} else { } else {
window.top.location.href = '/'; window.top.location.href = '/';
this.isLogin = false;
this.menuList = null;
} }
}); }).catch(rsponse => {
this.isLogin = false;
this.menuList = null;
})
}, },
clickMenu(link){ clickMenu(link){
var location = this.$route.fullPath;
if(link != location){
this.$router.push({ this.$router.push({
path: link path: link
}); });
}
},
reload(){
var location = this.$route.fullPath;
if (location == "/" || location == "") {
// nothing
} else {
this.$router.replace('/');
this.$nextTick(() => this.$router.replace(location));
}
}, },
actionMenu(e){ actionMenu(e){
const menuList = document.querySelectorAll('.main_menu .is-current'); const menuList = document.querySelectorAll('.main_menu .is-current');

View File

@@ -34,12 +34,32 @@
<p v-if="msg3 !== ''">{{ msg3 }}</p> <p v-if="msg3 !== ''">{{ msg3 }}</p>
<p v-if="msg4 !== ''">{{ msg4 }}</p> <p v-if="msg4 !== ''">{{ msg4 }}</p>
</div> </div>
<div class="pop-btn2"> <div class="popup-btn2">
<button class="btn-pcolor" @click="confirmModalClose();">확인</button> <button class="btn-pcolor" @click="confirmModalClose();">확인</button>
<button class="btn-default" @click="confirmModalCancel();">취소</button> <button class="btn-default" @click="confirmModalCancel();">취소</button>
</div> </div>
</div> </div>
</div> </div>
<div class="dimmed confirm2" @click="confirmModalCancel2();"></div>
<div class="popup-wrap confirm2">
<!-- 수정 확인 -->
<div class="popup confirm2">
<div class="pop-head">
<h3 class="popup-tit">{{title}}</h3>
</div>
<div class="pop-cont">
<p>{{ msg1 }}</p>
<p v-if="msg2 !== ''">{{ msg2 }}</p>
<p v-if="msg3 !== ''">{{ msg3 }}</p>
<p v-if="msg4 !== ''">{{ msg4 }}</p>
</div>
<div class="popup-btn2">
<button class="btn-pcolor" @click="confirmModalClose2();">확인</button>
<button class="btn-default" @click="confirmModalCancel2();">취소</button>
</div>
</div>
</div>
</div> </div>
</template> </template>
@@ -59,7 +79,6 @@ export default {
}, },
methods :{ methods :{
alertModalOpen(props){ alertModalOpen(props){
console.log(props)
var dimmed = document.getElementsByClassName('modal01'); var dimmed = document.getElementsByClassName('modal01');
for(var i = 0; i < dimmed.length; i++){ for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'block'; dimmed[i].style.display = 'block';
@@ -89,6 +108,18 @@ export default {
dimmed[i].style.display = 'block'; dimmed[i].style.display = 'block';
} }
this.title = props.title;
this.msg1 = props.msg1;
this.msg2 = props.msg2;
this.msg3 = props.msg3;
this.msg4 = props.msg4;
},
confirmModalOpen2(props){
var dimmed = document.getElementsByClassName('confirm2');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'block';
}
this.title = props.title; this.title = props.title;
this.msg1 = props.msg1; this.msg1 = props.msg1;
this.msg2 = props.msg2; this.msg2 = props.msg2;
@@ -102,6 +133,17 @@ export default {
dimmed[i].style.display = 'none'; dimmed[i].style.display = 'none';
} }
this.row.result = true;
// 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row);
},
// 모달 끄기(ok)
confirmModalClose2(){
var dimmed = document.getElementsByClassName('confirm2');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
this.row.result = true; this.row.result = true;
// 부모 함수 호출. // 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row); this.$parent.confirmCalbackFnc(this.row);
@@ -113,6 +155,17 @@ export default {
dimmed[i].style.display = 'none'; dimmed[i].style.display = 'none';
} }
this.row.result = false;
// 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row);
},
// 모달 끄기(취소)
confirmModalCancel2(){
var dimmed = document.getElementsByClassName('confirm2');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
this.row.result = false; this.row.result = false;
// 부모 함수 호출. // 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row); this.$parent.confirmCalbackFnc(this.row);

View File

@@ -53,11 +53,13 @@
</table> </table>
</form> </form>
<div class="popup-btn2"> <div class="popup-btn2">
<button class="btn-pcolor" @click="doInsert">등록</button> <button class="btn-pcolor" @click="regisConfirm()">등록</button>
<button class="btn-default" @click="ModalClose();">취소</button> <button class="btn-default" @click="ModalClose();">취소</button>
</div> </div>
<common-modal ref="commmonModal"></common-modal>
</div> </div>
<common-modal ref="commonModal"></common-modal>
<validation-confirm-popup ref="ValidationConfirmPopup"></validation-confirm-popup>
</div> </div>
</div> </div>
@@ -66,12 +68,14 @@
import api from '@/service/api'; import api from '@/service/api';
import riskMgtApi from '../service/riskMgtApi' import riskMgtApi from '../service/riskMgtApi'
import { utils_mixin, chkPattern2 } from '../service/mixins'; import { utils_mixin, chkPattern2 } from '../service/mixins';
import commonModal from "@/components/modal/commonModal";
import lodash from "lodash"; import lodash from "lodash";
import commonModal from "@/components/modal/commonModal";
import ValidationConfirmPopup from './ValidationConfirmPopup.vue';
export default { export default {
mixins: [utils_mixin, chkPattern2], mixins: [utils_mixin, chkPattern2],
data(){ data(){
return{ return{
props : {},
row: {}, row: {},
rsnType: [], rsnType: [],
tpType: [], tpType: [],
@@ -95,7 +99,8 @@ export default {
}, },
components: { components: {
commonModal, commonModal,
}, ValidationConfirmPopup
},
methods :{ methods :{
//모달 띄우기 //모달 띄우기
ModalOpen(){ ModalOpen(){
@@ -119,27 +124,28 @@ export default {
}, },
// 저장 후 부모창 호출 // 저장 후 부모창 호출
toComplete(){ toComplete(){z
this.$parent.$refs.table.reloadData(); this.$parent.$refs.table.reloadData();
this.ModalClose(); this.ModalClose();
}, },
async doInsert(){ async doInsert(){
if(this.doValidate() && window.confirm('등록 하시겠습니까?')){ // if(this.doValidate() && this.regisConfirm()){
try { try {
const response = await riskMgtApi.insertIntrcp(this.row); const response = await riskMgtApi.insertIntrcp(this.row);
const result = response.data; const result = response.data;
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == "0000") {
this.row.title = '청약고객관리'; this.row.title = '발신번호 차단';
this.row.msg1 = '저장 하였습니다.'; this.row.msg1 = '성공 하였습니다.';
console.log(this.row); this.$parent.alertInsert(this.row);
this.$refs.commmonModal.alertModalOpen(this.row);
this.toComplete(); this.toComplete();
} }
} catch(err) { } catch(err) {
console.log(err); console.log(err);
alert("실패 하였습니다."); this.row.title = '발신번호 차단';
} this.row.msg1 = '실패 하였습니다.';
this.$parent.alertInsert(this.row);
} }
// }
}, },
setCodeDate(){ setCodeDate(){
// 발송타입 // 발송타입
@@ -153,18 +159,17 @@ export default {
doValidate(){ doValidate(){
if(this.isNull(this.blckSndrno)){ if(this.isNull(this.blckSndrno)){
this.row.title = '청약고객관리'; this.row.title = '발신번호 차단';
this.row.msg1 = '저장 하였습니다.'; this.row.msg1 = '발신번호를 입력해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$parent.alertInsert(this.row);
this.$refs._blckSndrno.focus(); this.$refs._blckSndrno.focus();
return false; return false;
} }
const hp = this.blckSndrno; const hp = this.blckSndrno;
if(!this.isNull(hp) && !this.isMobile(hp)){ if(!this.isNull(hp) && !this.isMobile(hp)){
alert("발신번호 형식이 잘못되었습니다. 확인 해주세요."); this.row.title = '발신번호 차단';
this.row.title = '청약고객관리'; this.row.msg1 = '발신번호 형식이 잘못되었습니다. 확인 해주세요.';
this.row.msg1 = '저장 하였습니다.'; this.$parent.alertInsert(this.row)
this.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._blckSndrno.focus(); this.$refs._blckSndrno.focus();
return false; return false;
} }
@@ -179,8 +184,13 @@ export default {
Object.assign(this.$data, this.$options.data()); Object.assign(this.$data, this.$options.data());
this.insertType = type; this.insertType = type;
}, },
regisConfirm(){
if(this.doValidate()){
this.$refs.ValidationConfirmPopup.confirmInsertOpen();
}
}, },
},
} }
</script> </script>

View File

@@ -61,10 +61,11 @@
</table> </table>
</form> </form>
<div class="popup-btn2"> <div class="popup-btn2">
<button class="btn-pcolor" @click="doInsert">저장</button> <button class="btn-pcolor" @click="regisConfirm()">저장</button>
<button class="btn-default" @click="ModalClose();">취소</button> <button class="btn-default" @click="ModalClose();">취소</button>
</div> </div>
</div> </div>
<validation-confirm-popup ref="ValidationConfirmPopup"></validation-confirm-popup>
</div> </div>
</div> </div>
</template> </template>
@@ -74,6 +75,7 @@ import api from '@/service/api';
import riskMgtApi from '../service/riskMgtApi'; import riskMgtApi from '../service/riskMgtApi';
import lodash from "lodash"; import lodash from "lodash";
import { utils_mixin, chkPattern2 } from '../service/mixins'; import { utils_mixin, chkPattern2 } from '../service/mixins';
import ValidationConfirmPopup from './ValidationConfirmPopup.vue';
export default { export default {
mixins: [utils_mixin, chkPattern2], mixins: [utils_mixin, chkPattern2],
data(){ data(){
@@ -84,7 +86,6 @@ export default {
// word:'', // word:'',
// }, // },
msgBlckwordList: [ msgBlckwordList: [
{ seqNo: '' , word : '도박'},
// { word : '스팸'}, // { word : '스팸'},
], ],
rsnType: [], rsnType: [],
@@ -106,6 +107,9 @@ export default {
created(){ created(){
this.formReset(); this.formReset();
}, },
components: {
ValidationConfirmPopup
},
methods :{ methods :{
ModalOpen(){ ModalOpen(){
@@ -141,22 +145,29 @@ export default {
}, },
async doInsert(){ async doInsert(){
if(this.doValidate() && window.confirm('등록 하시겠습니까?')){ // if(this.doValidate() && window.confirm('등록 하시겠습니까?')){
try { try {
const response = await riskMgtApi.msgIntrcpList(this.row); const response = await riskMgtApi.msgIntrcpList(this.row);
const result = response.data; const result = response.data;
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == "0000") {
alert('저장 하였습니다.'); this.row.title = '메세지 차단';
this.row.msg1 = '저장하였습니다.';
this.$parent.msgAlertModalOpen(this.row);
} }
this.toComplete(); this.toComplete();
} catch(err) { } catch(err) {
alert("실패 하였습니다."); this.row.title = '메세지 차단';
} this.row.msg1 = '실패하였습니다.';
this.$parent.msgAlertModalOpen(this.row);
} }
// }
}, },
doValidate(){ doValidate(){
if(this.isNull(this.word)){ if(this.isNull(this.msgBlckwordList)){
this.row.title = '메세지 차단';
this.row.msg1 = '문구를 입력해주세요.';
this.$parent.msgAlertModalOpen(this.row);
this.$refs._word.focus(); this.$refs._word.focus();
return false; return false;
} }
@@ -176,6 +187,13 @@ export default {
}, },
//신규등록 팝업에서 문구 추가 버튼 //신규등록 팝업에서 문구 추가 버튼
doAdd: function() { doAdd: function() {
if(this.isNull(this.word)){
this.row.title = '메세지 차단';
this.row.msg1 = '문구를 입력해주세요.';
this.$parent.msgAlertModalOpen(this.row);
this.$refs._word.focus();
return false;
}
if(this.msgBlckwordList.length < 10){ if(this.msgBlckwordList.length < 10){
this.msgBlckwordList.push({ this.msgBlckwordList.push({
//seqNo: '', //seqNo: '',
@@ -194,11 +212,11 @@ export default {
Object.assign(this.$data, this.$options.data()); Object.assign(this.$data, this.$options.data());
this.insertType = type; this.insertType = type;
}, },
regisConfirm(){
if(this.doValidate()){
this.$refs.ValidationConfirmPopup.msgConfirmInsertOpen();
}
},
}, },

View File

@@ -58,12 +58,12 @@
</table> </table>
</form> </form>
<div class="popup-btn2 pop-btn3"> <div class="popup-btn2 pop-btn3">
<button class="btn-pcolor" @click="IntrcpUpdateModal();">수정</button> <button class="btn-pcolor" @click="UpdateConfirm();">수정</button>
<button class="btn-default" @click="IntrcpDetailModalClose();">취소</button> <button class="btn-default" @click="IntrcpDetailModalClose();">취소</button>
<button class="btn-p2color" @click="IntrcpDeleteModal()">삭제</button> <button class="btn-p2color" @click="DeleteConfirm()">삭제</button>
</div> </div>
</div> </div>
<validation-confirm-popup ref="ValidationConfirmPopup"></validation-confirm-popup>
</div> </div>
</div> </div>
@@ -73,6 +73,7 @@
//import api from '@/service/api'; //import api from '@/service/api';
import riskMgtApi from '../service/riskMgtApi'; import riskMgtApi from '../service/riskMgtApi';
import api from '@/service/api'; import api from '@/service/api';
import ValidationConfirmPopup from './ValidationConfirmPopup.vue';
export default { export default {
data(){ data(){
return{ return{
@@ -87,6 +88,9 @@ export default {
regId: '', regId: '',
meno: '', meno: '',
} }
},
components: {
ValidationConfirmPopup
}, },
methods :{ methods :{
// 모달 띄우기 // 모달 띄우기
@@ -134,12 +138,14 @@ export default {
//삭제버튼 //삭제버튼
async IntrcpDeleteModal(){ async IntrcpDeleteModal(){
this.setCodeDate(); this.setCodeDate();
if(window.confirm('삭제 하시겠습니까?')){ // if(window.confirm('삭제 하시겠습니까?')){
try { try {
const response = await riskMgtApi.deleteIntrcp(this.row); const response = await riskMgtApi.deleteIntrcp(this.row);
const result = response.data; const result = response.data;
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == "0000") {
alert('삭제 하였습니다.'); this.row.title = '발신번호 차단';
this.row.msg1 = '삭제하였습니다.';
this.$parent.alertInsert(this.row);
// grid.reloadData(); // grid.reloadData();
// this.$refs.table.reloadData(); // this.$refs.table.reloadData();
this.toComplete(); this.toComplete();
@@ -147,22 +153,24 @@ export default {
} catch(err) { } catch(err) {
alert("실패 하였습니다."); alert("실패 하였습니다.");
} }
} // }
}, },
//수정버튼 //수정버튼
async IntrcpUpdateModal(){ async IntrcpUpdateModal(){
if(this.doValidate() && window.confirm('수정 하시겠습니까?')){ // if(this.doValidate() && window.confirm('수정 하시겠습니까?')){
try { try {
const response = await riskMgtApi.updateIntrcp(this.row); const response = await riskMgtApi.updateIntrcp(this.row);
const result = response.data; const result = response.data;
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == "0000") {
alert('수정 하였습니다.'); this.row.title = '발신번호 차단';
this.row.msg1 = '수정 하였습니다.';
this.$parent.alertInsert(this.row);
this.toComplete(); this.toComplete();
} }
} catch(err) { } catch(err) {
alert("실패 하였습니다."); alert("실패 하였습니다.");
} }
} // }
}, },
// 모달 끄기 // 모달 끄기
ModalClose(){ ModalClose(){
@@ -191,6 +199,17 @@ export default {
this.row.meno=this.meno; this.row.meno=this.meno;
return true; return true;
}, },
UpdateConfirm(){
if(this.doValidate()){
this.$refs.ValidationConfirmPopup.confirmUpdateOpen();
}
},
DeleteConfirm(){
if(this.doValidate()){
this.$refs.ValidationConfirmPopup.confirmDeleteOpen();
}
},

View File

@@ -40,7 +40,7 @@
<tr> <tr>
<th>차단사유</th> <th>차단사유</th>
<td> <td>
<div class="select_box"> <div>
<select name="" id="" v-model.trim="blckRsnCd" ref="blckRsnCd"> <select name="" id="" v-model.trim="blckRsnCd" ref="blckRsnCd">
<option v-for="(option, i) in rsnType" <option v-for="(option, i) in rsnType"
v-bind:value="option.code" v-bind:value="option.code"
@@ -69,11 +69,12 @@
</table> </table>
</form> </form>
<div class="popup-btn2 pop-btn3"> <div class="popup-btn2 pop-btn3">
<button class="btn-pcolor" @click="MsgIntrcpUpdateModal()">수정</button> <button class="btn-pcolor" @click="UpdateConfirm()">수정</button>
<button class="btn-default" @click="IntrcpDetailModalClose();">취소</button> <button class="btn-default" @click="IntrcpDetailModalClose();">취소</button>
<button class="btn-p2color" @click="MsgIntrcpDeleteModal()">삭제</button> <button class="btn-p2color" @click="DeleteConfirm()">삭제</button>
</div> </div>
</div> </div>
<validation-confirm-popup ref="ValidationConfirmPopup"></validation-confirm-popup>
</div> </div>
</div> </div>
</template> </template>
@@ -81,6 +82,7 @@
<script> <script>
import api from '@/service/api'; import api from '@/service/api';
import riskMgtApi from '../service/riskMgtApi'; import riskMgtApi from '../service/riskMgtApi';
import ValidationConfirmPopup from './ValidationConfirmPopup.vue';
export default { export default {
data(){ data(){
return{ return{
@@ -106,7 +108,9 @@ export default {
created(){ created(){
this.formReset(); this.formReset();
}, },
components: {
ValidationConfirmPopup
},
methods :{ methods :{
ModalOpen(){ ModalOpen(){
this.formReset(); this.formReset();
@@ -209,36 +213,42 @@ export default {
//삭제버튼 //삭제버튼
async MsgIntrcpDeleteModal(){ async MsgIntrcpDeleteModal(){
this.setCodeDate(); this.setCodeDate();
if(window.confirm('삭제 하시겠습니까?')){ // if(window.confirm('삭제 하시겠습니까?')){
try { try {
const response = await riskMgtApi.deleteMsgIntrcp(this.row); const response = await riskMgtApi.deleteMsgIntrcp(this.row);
const result = response.data; const result = response.data;
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == "0000") {
alert('삭제 하였습니다.'); this.row.title = '메세지 차단';
// grid.reloadData(); this.row.msg1 = '삭제 하였습니다.';
// this.$refs.table.reloadData(); this.$parent.msgAlertModalOpen(this.row);
}
this.toComplete(); this.toComplete();
}
} catch(err) { } catch(err) {
alert("실패 하였습니다."); this.row.title = '메세지 차단';
} this.row.msg1 = '실패 하였습니다.';
this.$parent.msgAlertModalOpen(this.row);
} }
// }
}, },
//수정버튼 //수정버튼
async MsgIntrcpUpdateModal(){ async MsgIntrcpUpdateModal(){
if(this.doValidate() && window.confirm('수정 하시겠습니까?')){ // if(this.doValidate() && window.confirm('수정 하시겠습니까?')){
try { try {
const response = await riskMgtApi.updateMsgIntrcp(this.row); const response = await riskMgtApi.updateMsgIntrcp(this.row);
const result = response.data; const result = response.data;
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == "0000") {
alert('수정 하였습니다.'); this.row.title = '메세지 차단';
this.row.msg1 = '수정 하였습니다.';
this.$parent.msgAlertModalOpen(this.row);
} }
this.toComplete(); this.toComplete();
} catch(err) { } catch(err) {
alert("실패 하였습니다."); this.row.title = '메세지 차단';
} this.row.msg1 = '실패 하였습니다.';
this.$parent.msgAlertModalOpen(this.row);
} }
// }
}, },
IntrcpDetailModalClose(){ IntrcpDetailModalClose(){
@@ -259,6 +269,16 @@ export default {
popup[0].style.display = 'none'; popup[0].style.display = 'none';
}, },
UpdateConfirm(){
if(this.doValidate()){
this.$refs.ValidationConfirmPopup.msgConfirmUpdateOpen();
}
},
DeleteConfirm(){
if(this.doValidate()){
this.$refs.ValidationConfirmPopup.msgConfirmDeleteOpen();
}
},

View File

@@ -0,0 +1,288 @@
<template>
<div>
<div class="dimmed confirm" @click="confirmModalCancel();"></div>
<div class="popup-wrap confirm">
<!-- 수정 확인 -->
<div class="popup confirm">
<div class="pop-head">
<h3 class="pop-tit">{{title}}</h3>
</div>
<div class="pop-cont">
<p>{{msg}}</p>
</div>
<div class="popup-btn2">
<button class="btn-pcolor" @click="confirmModalClose();">확인</button>
<button class="btn-default" @click="confirmModalCancel();">취소</button>
</div>
</div>
</div>
<!-- 발신번호차단 등록 - 최초 등록 -->
<div class="dimmed confirm-insert" @click="confirmInsertClose();"></div>
<div class="popup-wrap confirm-insert">
<div class="popup confirm-insert">
<div class="pop-head">
<h3 class="pop-tit">발신번호차단 등록</h3>
</div>
<div class="pop-cont">
<p>작성된 내용으로 등록 하시겠습니까?</p>
</div>
<div class="popup-btn2">
<button class="btn-pcolor" @click="confirmInsert();">확인</button>
<button class="btn-default" @click="confirmInsertClose();">취소</button>
</div>
</div>
</div>
<!-- 발신번호차단 상세 - 수정 -->
<div class="dimmed confirm-update" @click="confirmUpdateClose();"></div>
<div class="popup-wrap confirm-update">
<div class="popup confirm-update">
<div class="pop-head">
<h3 class="pop-tit">발신번호 차단 상세</h3>
</div>
<div class="pop-cont">
<p>작성된 내용으로 수정하겠습니까?</p>
</div>
<div class="popup-btn2">
<button class="btn-pcolor" @click="confirmUpdate();">확인</button>
<button class="btn-default" @click="confirmUpdateClose();">취소</button>
</div>
</div>
</div>
<!-- 발신번호차단 상세 삭제-->
<div class="dimmed confirm-delete" @click="confirmDeleteClose();"></div>
<div class="popup-wrap confirm-delete">
<div class="popup confirm-delete">
<div class="pop-head">
<h3 class="pop-tit">발신번호 차단 상세</h3>
</div>
<div class="pop-cont">
<p>해당 발신번호를 차단리스트에서</p>
<p>삭제하시겠습니까?</p>
</div>
<div class="popup-btn2">
<button class="btn-pcolor" @click="confirmDelete();">확인</button>
<button class="btn-default" @click="confirmDeleteClose();">취소</button>
</div>
</div>
</div>
<!-- 메세지 등록 - 최초 등록 -->
<div class="dimmed msgconfirm-insert" @click="msgConfirmInsertClose();"></div>
<div class="popup-wrap msgconfirm-insert">
<div class="popup msgconfirm-insert">
<div class="pop-head">
<h3 class="pop-tit">메세지차단 등록</h3>
</div>
<div class="pop-cont">
<p>작성된 내용으로 등록 하시겠습니까?</p>
</div>
<div class="popup-btn2">
<button class="btn-pcolor" @click="msgConfirmInsert();">확인</button>
<button class="btn-default" @click="msgConfirmInsertClose();">취소</button>
</div>
</div>
</div>
<!-- 메세지차단 상세 - 수정 -->
<div class="dimmed msgconfirm-update" @click="msgConfirmUpdateClose();"></div>
<div class="popup-wrap msgconfirm-update">
<div class="popup msgconfirm-update">
<div class="pop-head">
<h3 class="pop-tit">메세지 차단 상세</h3>
</div>
<div class="pop-cont">
<p>작성된 내용으로 수정하겠습니까?</p>
</div>
<div class="popup-btn2">
<button class="btn-pcolor" @click="msgConfirmUpdate();">확인</button>
<button class="btn-default" @click="msgConfirmUpdateClose();">취소</button>
</div>
</div>
</div>
<!-- 메세지차단 상세 삭제-->
<div class="dimmed msgconfirm-delete" @click="msgConfirmDeleteClose();"></div>
<div class="popup-wrap msgconfirm-delete">
<div class="popup msgconfirm-delete">
<div class="pop-head">
<h3 class="pop-tit">메세지 차단 상세</h3>
</div>
<div class="pop-cont">
<p>해당 메세지를 차단리스트에서</p>
<p>삭제하시겠습니까?</p>
</div>
<div class="popup-btn2">
<button class="btn-pcolor" @click="msgConfirmDelete();">확인</button>
<button class="btn-default" @click="msgConfirmDeleteClose();">취소</button>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "validationConfirmPopup",
data(){
return{
row:{},
title:'',
msg:'',
}
},
methods :{
//발신번호차단등록 - 최초등록 Open
confirmInsertOpen(){
var dimmed = document.getElementsByClassName('confirm-insert');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'block';
}
},
//사용자등록 - 최초등록
confirmInsert(){
var dimmed = document.getElementsByClassName('confirm-insert');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
this.$parent.doInsert();
},
//발신번호차단등록 - 최초등록 Close
confirmInsertClose(){
var dimmed = document.getElementsByClassName('confirm-insert');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
},
// 발신번호차단 삭제 Open
confirmDeleteOpen(){
var dimmed = document.getElementsByClassName('confirm-delete');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'block';
}
},
//발신번호차단번호 삭제
confirmDelete(){
var dimmed = document.getElementsByClassName('confirm-delete');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
this.$parent.IntrcpDeleteModal();
},
//발신번호차단 삭제 Close
confirmDeleteClose(){
var dimmed = document.getElementsByClassName('confirm-delete');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
},
//발신번호차단 수정 확인 Open
confirmUpdateOpen(){
var dimmed = document.getElementsByClassName('confirm-update');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'block';
}
},
//발신번호차단 수정 확인
confirmUpdate(){
var dimmed = document.getElementsByClassName('confirm-update');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
this.$parent.IntrcpUpdateModal();
},
// 발신번호차단 수정 Close
confirmUpdateClose(){
var dimmed = document.getElementsByClassName('confirm-update');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
},
//메세지차단등록 - 최초등록 Open
msgConfirmInsertOpen(){
var dimmed = document.getElementsByClassName('msgconfirm-insert');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'block';
}
},
//메세지등록 - 최초등록
msgConfirmInsert(){
var dimmed = document.getElementsByClassName('msgconfirm-insert');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
this.$parent.doInsert();
},
//메세지차단등록 - 최초등록 Close
msgConfirmInsertClose(){
var dimmed = document.getElementsByClassName('msgconfirm-insert');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
},
// 메세지차단 삭제 Open
msgConfirmDeleteOpen(){
var dimmed = document.getElementsByClassName('msgconfirm-delete');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'block';
}
},
//메세지차단번호 삭제
msgConfirmDelete(){
var dimmed = document.getElementsByClassName('msgconfirm-delete');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
this.$parent.MsgIntrcpDeleteModal();
},
//메세지차단 삭제 Close
msgConfirmDeleteClose(){
var dimmed = document.getElementsByClassName('msgconfirm-delete');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
},
//메세지차단 수정 확인 Open
msgConfirmUpdateOpen(){
var dimmed = document.getElementsByClassName('msgconfirm-update');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'block';
}
},
//메세지차단 수정 확인
msgConfirmUpdate(){
var dimmed = document.getElementsByClassName('msgconfirm-update');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
this.$parent.MsgIntrcpUpdateModal();
},
// 메세지차단 수정 Close
msgConfirmUpdateClose(){
var dimmed = document.getElementsByClassName('msgconfirm-update');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
},
},
}
</script>

View File

@@ -82,7 +82,7 @@
</div> </div>
<insert-intrcp-pop ref="insertIntrcpPop"> </insert-intrcp-pop> <insert-intrcp-pop ref="insertIntrcpPop"> </insert-intrcp-pop>
<intrcp-detail-popup ref="intrcpDetailPopup"></intrcp-detail-popup> <intrcp-detail-popup ref="intrcpDetailPopup"></intrcp-detail-popup>
<common-modal ref="commmonModal"></common-modal> <common-modal ref="commonModal"></common-modal>
</div> </div>
</div> </div>
</template> </template>
@@ -242,6 +242,20 @@ export default {
// this.insertType = type; // this.insertType = type;
// }, // },
alertInsert(props){
console.log(props);
this.$refs.commonModal.alertModalOpen(props);
},
confirmInsert(props){
this.$refs.commonModal.confirmModalOpen(props);
},
confirmCalbackFnc: function(props){
console.log('dsfsd');
// if(props.result){
// // this.doInsert(props.result);
// }
},
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {

View File

@@ -61,7 +61,7 @@
</div> </div>
<insert-msg-pop ref="InsertMsgPop"></insert-msg-pop> <insert-msg-pop ref="InsertMsgPop"></insert-msg-pop>
<intrcp-msg-detail ref="IntrcpMsgDetail"></intrcp-msg-detail> <intrcp-msg-detail ref="IntrcpMsgDetail"></intrcp-msg-detail>
<common-modal ref="commmonModal"></common-modal> <common-modal ref="commonModal"></common-modal>
</div> </div>
</template> </template>
@@ -202,6 +202,9 @@ export default {
msgDetailPop(props) { msgDetailPop(props) {
// console.log(props); // console.log(props);
this.$refs.IntrcpMsgDetail.IntrcpMsgDetailModalOpen(props); this.$refs.IntrcpMsgDetail.IntrcpMsgDetailModalOpen(props);
},
msgAlertModalOpen(props){
this.$refs.commonModal.alertModalOpen(props);
} }
}, },

View File

@@ -185,7 +185,8 @@ export default {
}, },
//회원 상세페이지로 이동 //회원 상세페이지로 이동
memberDetail(props) { memberDetail(props) {
this.row.custNm = props.serviceId; console.log(props);
this.row.serviceId = props.userId;
this.$router.push({ name: 'subsDetail', params: this.row}); this.$router.push({ name: 'subsDetail', params: this.row});
} }
}, },

View File

@@ -1,5 +1,7 @@
import MonthList from '../views/MonthList' import MonthList from '../views/MonthList'
import BsnmMonthList from '../views/BsnmMonthList' import BsnmMonthList from '../views/BsnmMonthList'
import DayList from '../views/DayList'
import BsnmDayList from '../views/BsnmDayList'
export default [ export default [
{ {
@@ -14,6 +16,18 @@ export default [
name: 'bsnmMonthList', name: 'bsnmMonthList',
meta: { public: true } meta: { public: true }
}, },
{
path: '/stats/dayList',
component: DayList,
name: 'dayList',
meta: { public: true }
},
{
path: '/stats/bsnmDayList',
component: BsnmDayList,
name: 'bsnmDayList',
meta: { public: true }
},
] ]

View File

@@ -0,0 +1,29 @@
import httpClient from '@/common/http-client';
// HUBEZ_BO_API - 일별 통계 목록 조회.
const dayList = (params) => {
return httpClient.post('/api/v1/bo/stats/dayList', params, { withCredentials: false });
}
// HUBEZ_BO_API - 월별 통계 목록 조회.
const monthList = (params) => {
return httpClient.post('/api/v1/bo/stats/monthList', params, { withCredentials: false });
}
// HUBEZ_BO_API - [사업자별] 일별 통계 목록 조회.
const bsnmDayList = (params) => {
return httpClient.post('/api/v1/bo/stats/bsnmDayList', params, { withCredentials: false });
}
// HUBEZ_BO_API - [사업자별] 월별 통계 목록 조회.
const bsnmMonthList = (params) => {
return httpClient.post('/api/v1/bo/stats/bsnmMonthList', params, { withCredentials: false });
}
export default {
dayList,
monthList,
bsnmDayList,
bsnmMonthList,
}

View File

@@ -0,0 +1,366 @@
<template>
<div class="contents">
<div class="contents_wrap">
<div class="top_wrap">
<h3 class="title">사업자별 통계</h3>
<p class="breadcrumb">발송통계 &gt; 사업자별 통계</p>
</div>
<div class="top_tab">
<a href="javascript:void(0);" @click="toMove('bsnmMonthList')">월별통계</a>
<a href="javascript:void(0);" class="on">일별통계</a>
</div>
<form autocomplete="off" class="search_form">
<div class="search_wrap">
<div class="input_box cal">
<label for="right" class="label txt">날짜</label>
<p> 최대 3개월까지 조회 가능합니다.</p>
<div class="term">
<!--
<input class="date" type="text" id="" placeholder="2022-10-12"/>
~
<input class="" type="text" id="" placeholder="2022-10-12"/>
-->
<div class="group" style="width:500px;">
<span class="custom_input icon_date">
<vuejs-datepicker
:language="ko"
:format="customFormatter"
:disabled-dates="disabledSDate"
v-model="startDate"
@selected="selectedStartDate(0)"
@closed="closeDate('start')"
></vuejs-datepicker>
</span>~
<span class="custom_input icon_date">
<vuejs-datepicker
:language="ko"
:format="customFormatter"
:disabled-dates="disabledEDate"
v-model="endDate"
@selected="selectedEndDate(0)"
@closed="closeDate('end')"
></vuejs-datepicker>
</span>
</div>
</div>
</div>
<div class="input_box id">
<label for="name" class="label">고객사명</label>
<input type="text" id="name" placeholder="검색어 입력" v-model="grid.params.custNm">
</div>
<div class="input_box">
<label for="name" class="label">사업자등록번호</label>
<input type="text" id="name" placeholder="검색어 입력" v-model="grid.params.bizrno">
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div>
</form>
<div class="info">
<div class="count">집계결과</div>
<div class="button_group">
<button type="button" class="button blue download">엑셀 다운로드</button>
</div>
</div>
<div class="table calculate scroll">
<custom-grid
ref="table"
:totalItems="'totalItems'"
:url="grid.url"
:pagePerRows="grid.pagePerRows"
:initialRequest="grid.initialRequest"
:pagination="grid.pagination"
:isCheckbox="grid.isCheckbox"
:columns="grid.columns"
:noDataStr="grid.noDataStr"
:addCls="grid.addCls"
:header="grid.header"
></custom-grid>
</div>
<common-modal ref="commmonModal"></common-modal>
</div>
</div>
</template>
<script>
import moment from 'moment';
import statsApi from "../service/statsApi.js";
import customGrid from '@/components/CustomGrid';
import xlsx from '@/common/excel';
import commonModal from "@/components/modal/commonModal";
export default {
name: 'bsnmDayList',
data() {
return {
// 달력 데이터
ko: vdp_translation_ko.js,
periodDay: 7,
sDateDiv: 'date',
startDate: new Date(),
endDate: new Date(),
startDt:'',
endDt:'',
startYear:'',
startMonth:'',
endYear:'',
endMonth:'',
row: {},
list:[],
totalCnt: '',
pageType: 'SUBS',
// 테이블 리스트 데이터
perPageCnt: 50,
options: [
{ text: '20', value: 20},
{ text: '50', value: 50},
{ text: '100', value: 100}
],
totalItems: 0,
grid: {
url: '/api/v1/bo/stats/bsnmDayList',
pagePerRows: 20,
pagination: true,
isCheckbox: false, // true:첫번째 컬럼 앞에 체크박스 생성 / false:체크박스 제거
initialRequest: false,
addCls: 'box_OFvis',
header:[
[
{ header: '날짜', childNames: [] },
{ header: '고객사명', childNames: [] },
{ header: '사업자번호', childNames: [] },
{ header: '전체', childNames: ['sndCnt','succCntRt'] },
{ header: 'SMS', childNames: ['sndCntS','succCntRtS'] },
{ header: 'LMS', childNames: ['sndCntL','succCntRtL'] },
{ header: 'MMS', childNames: ['sndCntM','succCntRtM'] },
{ header: '알림톡', childNames: ['sndCntR','succCntRtR'] },
]
],
columns: [
{ name: 'sumYmd', header: '날짜', align: 'center'},
{ name: 'custNm', header: '고객사명', align: 'center'},
{ name: 'bizrno', header: '사업자번호', align: 'center'},
{ name: 'sndCnt', header: '발송건수', align: 'center', cls: 'td_line',
formatter: props =>{
let result = props.sndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result;
}
},
{ name: 'succCntRt',
header: '성공건수/(%)',
align: 'center',
cls: 'td_line',
formatter: props => {
return "<p>"+ props.succCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRt+"%)</p>";
}
},
{ name: 'sndCntS', header: '발송건수', align: 'center', cls: 'td_line',
formatter: props =>{
let result = props.sndCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result;
}
},
{ name: 'succCntRtS',
header: '성공건수/(%)',
align: 'center',
cls: 'td_line',
formatter: props => {
return "<p>"+ props.succCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRtS+"%)</p>";
}
},
{ name: 'sndCntL', header: '발송건수', align: 'center', cls: 'td_line',
formatter: props =>{
let result = props.sndCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result;
}
},
{ name: 'succCntRtL',
header: '성공건수/(%)',
align: 'center',
cls: 'td_line',
formatter: props => {
return "<p>"+ props.succCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRtL+"%)</p>";
}
},
{ name: 'sndCntM', header: '발송건수', align: 'center', cls: 'td_line',
formatter: props =>{
let result = props.sndCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result;
}
},
{ name: 'succCntRtM',
header: '성공건수/(%)',
align: 'center',
cls: 'td_line',
formatter: props => {
return "<p>"+ props.succCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRtM+"%)</p>";
}
},
{ name: 'sndCntR', header: '발송건수', align: 'center', cls: 'td_line',
formatter: props =>{
let result = props.sndCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result;
}
},
{ name: 'succCntRtR',
header: '성공건수/(%)',
align: 'center',
cls: 'td_line',
formatter: props => {
return "<p>"+ props.succCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRtR+")</p>";
}
},
],
noDataStr: '검색 결과가 없습니다.',
params: {
startDay: '',
endDay: ''
},
excelHeader: []
}
};
},
components: {
customGrid: customGrid,
commonModal,
vuejsDatepicker,
},
created(){
this.$store.commit("login/isLogin", true);
this.$store.commit("login/isAuthChk", true);
this.setPeriodDay(0);
},
destroyed() {
},
mounted() {
let page = 1;
// 페이지 정보 및 검색 조건
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
console.log('getCondition : '+getCondition);
// store에 저장된 페이지 정보 및 검색 조건을 불러오기
let isKeep = false;
if (getCondition) {
this.grid.pagePerRows = getCondition.perPage;
this.grid.params = getCondition.params;
page = getCondition.page;
isKeep = true;
}
this.search(isKeep);
},
beforeRouteLeave(to, from, next) {
const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP._currentPage);
this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage,
perPage: this.perPageCnt,
params: this.grid.params
});
// 라우트 하기전 실행
next();
},
methods: {
search: function(isKeep) {
console.log('>>>>>>> search Start >>>>>>');
this.grid.params = {
startDay: moment(this.startDate).format('YYYYMMDD'),
endDay: moment(this.endDate).format('YYYYMMDD'),
custNm: this.grid.params.custNm,
bizrno: this.grid.params.bizrno
};
console.log('this.perPageCnt'+this.perPageCnt);
console.log(this.grid.params);
if (moment(this.grid.params.startDay).isBefore(moment(this.grid.params.endDay).subtract(1, 'months').format('YYYYMMDD'))) {
//alert('검색 기간은 최대 1개월까지 선택 가능 합니다.');
this.row.title = '발송통계';
this.row.msg1 = '검색 기간은 최대 1개월까지 선택 가능 합니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false
}
this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData();
},
toMove(routeName) {
this.$router.push({ name: routeName, params: { page: 1, searchText: '' } });
},
setPeriodDay(day) {
this.periodDay = day;
this.endDate = new Date();
this.startDate = moment(this.endDate)
.subtract(day, 'day')
.toDate();
this.closeDate('start');
this.closeDate('end');
},
selectedStartDate(day) {
if (day != undefined && day != null) {
this.periodDay = day;
}
if (this.startDate > this.endDate) {
this.startDate = this.endDate;
}
// console.log(this.disabledSDate)
// this.grid.params.startDt = day
},
selectedEndDate(day) {
if (day != undefined && day != null) {
this.periodDay = day;
}
},
closeDate(type) {
if (type != undefined && type != null) {
if (type == 'start') {
this.disabledSDate = { from: this.endDate };
this.disabledEDate = { to: this.startDate, from: this.endDate };
} else if (type == 'end') {
this.disabledSDate = { from: this.endDate };
this.disabledEDate = { to: this.startDate, from: new Date() };
}
}
},
customFormatter: function(date) {
if (this.sDateDiv == 'month') {
return moment(date).format('YYYY-MM');
} else if (this.sDateDiv == 'year') {
return moment(date).format('YYYY');
} else {
return moment(date).format('YYYY-MM-DD');
}
},
changePerPage: function(){ // 페이지당 조회할 개수
this.grid.pagePerRows = this.perPageCnt;
this.search(true);
},
sendStoreData: function() {
const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP._currentPage);
this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage,
perPage: this.perPageCnt,
params: this.grid.params
});
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
console.log("getCondition : "+ getCondition.perPage);
},
}
};
</script>

View File

@@ -8,7 +8,8 @@
</div> </div>
<div class="top_tab"> <div class="top_tab">
<a href="statistics_business.html" class="on">월별통계</a><a href="statistics_business_day.html">일별통계</a> <a href="javascript:void(0);" class="on">월별통계</a>
<a href="javascript:void(0);" @click="toMove('bsnmDayList')">일별통계</a>
</div> </div>
@@ -18,20 +19,49 @@
<label for="right" class="label txt">날짜</label> <label for="right" class="label txt">날짜</label>
<p> 최대 3개월까지 조회 가능합니다.</p> <p> 최대 3개월까지 조회 가능합니다.</p>
<div class="term"> <div class="term">
<!--
<input class="date" type="text" id="" placeholder="2022-10-12"/> <input class="date" type="text" id="" placeholder="2022-10-12"/>
~ ~
<input class="" type="text" id="" placeholder="2022-10-12"/> <input class="" type="text" id="" placeholder="2022-10-12"/>
-->
<div class="group" style="width:500px;">
<span class="custom_input icon_date">
<vuejs-datepicker
:language="ko"
:format="customFormatter"
:disabled-dates="disabledSDate"
:minimumView="sDateDiv"
:maximumView="sDateDiv"
v-model="startDate"
@selected="selectedStartDate(0)"
@closed="closeDate('start')"
></vuejs-datepicker>
</span>~
<span class="custom_input icon_date">
<vuejs-datepicker
:language="ko"
:format="customFormatter"
:disabled-dates="disabledEDate"
:minimumView="sDateDiv"
:maximumView="sDateDiv"
v-model="endDate"
@selected="selectedEndDate(0)"
@closed="closeDate('end')"
></vuejs-datepicker>
</span>
</div>
</div> </div>
</div> </div>
<div class="input_box id"> <div class="input_box id">
<label for="name" class="label">고객사명</label> <label for="name" class="label">고객사명</label>
<input type="text" id="name" placeholder="검색어 입력"> <input type="text" id="name" placeholder="검색어 입력" v-model="grid.params.custNm">
</div> </div>
<div class="input_box"> <div class="input_box">
<label for="name" class="label">사업자등록번호</label> <label for="name" class="label">사업자등록번호</label>
<input type="text" id="name" placeholder="검색어 입력"> <input type="text" id="name" placeholder="검색어 입력" v-model="grid.params.bizrno">
</div> </div>
<button type="button" class="button grey">조회</button> <button type="button" class="button grey" @click="search">조회</button>
</div> </div>
</form> </form>
<div class="info"> <div class="info">
@@ -42,215 +72,298 @@
</div> </div>
<div class="table calculate scroll"> <div class="table calculate scroll">
<div> <custom-grid
<table> ref="table"
<thead> :totalItems="'totalItems'"
<tr> :url="grid.url"
<th rowspan="2">날짜</th> :pagePerRows="grid.pagePerRows"
<th rowspan="2">고객사명</th> :initialRequest="grid.initialRequest"
<th rowspan="2">사업자번호</th> :pagination="grid.pagination"
<th colspan="2">전체</th> :isCheckbox="grid.isCheckbox"
<th colspan="2">SMS</th> :columns="grid.columns"
<th colspan="2">LMS</th> :noDataStr="grid.noDataStr"
<th colspan="2">MMS</th> :addCls="grid.addCls"
<th colspan="2">알림톡</th> :header="grid.header"
</tr> ></custom-grid>
<tr class="total">
<th>발송건수</th>
<th>성공건수/(%)</th>
<th>발송건수</th>
<th>성공건수/(%)</th>
<th>발송건수</th>
<th>성공건수/(%)</th>
<th>발송건수</th>
<th>성공건수/(%)</th>
<th>발송건수</th>
<th>성공건수/(%)</th>
</tr>
</thead>
<tbody>
<tr>
<td>2022-04</td>
<td>유플러스</td>
<td>229-81-39938</td>
<td>84,000,000</td>
<td>84,000,000<br>(100%)</td>
<td>21,000,000</td>
<td>21,000,000<br>(100%)</td>
<td>21,000,000</td>
<td>21,000,000<br>(100%)</td>
<td>21,000,000</td>
<td>21,000,000<br>(100%)</td>
<td>21,000,000</td>
<td>21,000,000<br>(100%)</td>
</tr>
<tr>
<td>2022-03</td>
<td>유플러스</td>
<td>229-81-39938</td>
<td>40,000,000</td>
<td>40,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
</tr>
<tr>
<td>2022-02</td>
<td>유플러스</td>
<td>229-81-39938</td>
<td>40,000,000</td>
<td>40,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
</tr>
<tr>
<td>2022-01</td>
<td>유플러스</td>
<td>229-81-39938</td>
<td>40,000,000</td>
<td>40,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
</tr>
<tr>
<td>2021-12</td>
<td>유플러스</td>
<td>229-81-39938</td>
<td>40,000,000</td>
<td>40,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
</tr>
<tr>
<td>2021-11</td>
<td>유플러스</td>
<td>229-81-39938</td>
<td>40,000,000</td>
<td>40,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
</tr>
<tr>
<td>2021-10</td>
<td>유플러스</td>
<td>229-81-39938</td>
<td>40,000,000</td>
<td>40,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
</tr>
<tr>
<td>2021-09</td>
<td>유플러스</td>
<td>229-81-39938</td>
<td>40,000,000</td>
<td>40,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
</tr>
<tr>
<td>2021-08</td>
<td>유플러스</td>
<td>229-81-39938</td>
<td>40,000,000</td>
<td>40,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
</tr>
<tr>
<td>2021-07</td>
<td>유플러스</td>
<td>229-81-39938</td>
<td>40,000,000</td>
<td>40,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
</tr>
</tbody>
</table>
</div>
</div> </div>
<common-modal ref="commmonModal"></common-modal>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import moment from 'moment';
import statsApi from "../service/statsApi.js";
import customGrid from '@/components/CustomGrid'; import customGrid from '@/components/CustomGrid';
//import api from '../service/api'; import xlsx from '@/common/excel';
import commonModal from "@/components/modal/commonModal";
export default { export default {
name: 'monthList', name: 'bsnmMonthList',
data() { data() {
return { return {
// 달력 데이터
ko: vdp_translation_ko.js,
periodDay: 7,
sDateDiv: 'month',
startDate: new Date(),
endDate: new Date(),
startDt:'',
endDt:'',
startYear:'',
startMonth:'',
endYear:'',
endMonth:'',
row: {},
list:[],
totalCnt: '',
pageType: 'SUBS',
// 테이블 리스트 데이터
perPageCnt: 50,
options: [
{ text: '20', value: 20},
{ text: '50', value: 50},
{ text: '100', value: 100}
],
totalItems: 0,
grid: {
url: '/api/v1/bo/stats/bsnmMonthList',
pagePerRows: 20,
pagination: true,
isCheckbox: false, // true:첫번째 컬럼 앞에 체크박스 생성 / false:체크박스 제거
initialRequest: false,
addCls: 'box_OFvis',
header:[
[
{ header: '날짜', childNames: [] },
{ header: '고객사명', childNames: [] },
{ header: '사업자번호', childNames: [] },
{ header: '전체', childNames: ['sndCnt','succCntRt'] },
{ header: 'SMS', childNames: ['sndCntS','succCntRtS'] },
{ header: 'LMS', childNames: ['sndCntL','succCntRtL'] },
{ header: 'MMS', childNames: ['sndCntM','succCntRtM'] },
{ header: '알림톡', childNames: ['sndCntR','succCntRtR'] },
]
],
columns: [
{ name: 'sumYm', header: '날짜', align: 'center'},
{ name: 'custNm', header: '고객사명', align: 'center'},
{ name: 'bizrno', header: '사업자번호', align: 'center'},
{ name: 'sndCnt', header: '발송건수', align: 'center', cls: 'td_line',
formatter: props =>{
let result = props.sndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result;
}
},
{ name: 'succCntRt',
header: '성공건수/(%)',
align: 'center',
cls: 'td_line',
formatter: props => {
return "<p>"+ props.succCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRt+"%)</p>";
}
},
{ name: 'sndCntS', header: '발송건수', align: 'center', cls: 'td_line',
formatter: props =>{
let result = props.sndCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result;
}
},
{ name: 'succCntRtS',
header: '성공건수/(%)',
align: 'center',
cls: 'td_line',
formatter: props => {
return "<p>"+ props.succCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRtS+"%)</p>";
}
},
{ name: 'sndCntL', header: '발송건수', align: 'center', cls: 'td_line',
formatter: props =>{
let result = props.sndCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result;
}
},
{ name: 'succCntRtL',
header: '성공건수/(%)',
align: 'center',
cls: 'td_line',
formatter: props => {
return "<p>"+ props.succCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRtL+"%)</p>";
}
},
{ name: 'sndCntM', header: '발송건수', align: 'center', cls: 'td_line',
formatter: props =>{
let result = props.sndCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result;
}
},
{ name: 'succCntRtM',
header: '성공건수/(%)',
align: 'center',
cls: 'td_line',
formatter: props => {
return "<p>"+ props.succCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRtM+"%)</p>";
}
},
{ name: 'sndCntR', header: '발송건수', align: 'center', cls: 'td_line',
formatter: props =>{
let result = props.sndCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result;
}
},
{ name: 'succCntRtR',
header: '성공건수/(%)',
align: 'center',
cls: 'td_line',
formatter: props => {
return "<p>"+ props.succCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRtR+")</p>";
}
},
],
noDataStr: '검색 결과가 없습니다.',
params: {
startMon: '',
endMon: ''
},
excelHeader: []
}
}; };
}, },
components: { components: {
customGrid: customGrid customGrid: customGrid,
commonModal,
vuejsDatepicker,
},
created(){
this.$store.commit("login/isLogin", true);
this.$store.commit("login/isAuthChk", true);
this.setPeriodDay(0);
}, },
destroyed() { destroyed() {
}, },
mounted() { mounted() {
let page = 1;
// 페이지 정보 및 검색 조건
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
console.log('getCondition : '+getCondition);
// store에 저장된 페이지 정보 및 검색 조건을 불러오기
let isKeep = false; let isKeep = false;
if (getCondition) {
this.grid.pagePerRows = getCondition.perPage;
this.grid.params = getCondition.params;
page = getCondition.page;
isKeep = true; isKeep = true;
}
this.search(isKeep); this.search(isKeep);
}, },
beforeRouteLeave(to, from, next) {
const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP._currentPage);
this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage,
perPage: this.perPageCnt,
params: this.grid.params
});
// 라우트 하기전 실행
next();
},
methods: { methods: {
search: function(isKeep) { search: function(isKeep) {
console.log('>>>>>>> search Start >>>>>>');
this.grid.params = {
startMon: moment(this.startDate).format('YYYYMM'),
endMon: moment(this.endDate).format('YYYYMM'),
custNm: this.grid.params.custNm,
bizrno: this.grid.params.bizrno
};
console.log('this.perPageCnt'+this.perPageCnt);
console.log(this.grid.params);
if (moment(this.grid.params.startMon).isBefore(moment(this.grid.params.endMon).subtract(2, 'months').format('YYYYMM'))) {
//alert('검색 기간은 최대 3개월까지 선택 가능 합니다.');
this.row.title = '발송통계';
this.row.msg1 = '검색 기간은 최대 3개월까지 선택 가능 합니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false
}
this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData();
},
toMove(routeName) {
this.$router.push({ name: routeName, params: { page: 1, searchText: '' } });
},
setPeriodDay(day) {
this.periodDay = day;
this.endDate = new Date();
this.startDate = moment(this.endDate)
.subtract(day, 'day')
.toDate();
this.closeDate('start');
this.closeDate('end');
},
selectedStartDate(day) {
if (day != undefined && day != null) {
this.periodDay = day;
}
if (this.startDate > this.endDate) {
this.startDate = this.endDate;
}
// console.log(this.disabledSDate)
// this.grid.params.startDt = day
},
selectedEndDate(day) {
if (day != undefined && day != null) {
this.periodDay = day;
}
},
closeDate(type) {
if (type != undefined && type != null) {
if (type == 'start') {
this.disabledSDate = { from: this.endDate };
this.disabledEDate = { to: this.startDate, from: this.endDate };
} else if (type == 'end') {
this.disabledSDate = { from: this.endDate };
this.disabledEDate = { to: this.startDate, from: new Date() };
}
}
},
customFormatter: function(date) {
if (this.sDateDiv == 'month') {
return moment(date).format('YYYY-MM');
} else if (this.sDateDiv == 'year') {
return moment(date).format('YYYY');
} else {
return moment(date).format('YYYY-MM-DD');
}
},
changePerPage: function(){ // 페이지당 조회할 개수
this.grid.pagePerRows = this.perPageCnt;
this.search(true);
},
sendStoreData: function() {
const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP._currentPage);
this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage,
perPage: this.perPageCnt,
params: this.grid.params
});
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
console.log("getCondition : "+ getCondition.perPage);
}, },
} }
}; };

View File

@@ -0,0 +1,273 @@
<template>
<div class="contents">
<div class="contents_wrap">
<div class="top_wrap">
<h3 class="title">날짜별 통계</h3>
<p class="breadcrumb">발송통계 &gt; 날짜별 통계</p>
</div>
<div class="top_tab">
<a href="javascript:void(0);" @click="toMove('monthList')">월별통계</a>
<a href="javascript:void(0);" class="on">일별통계</a>
</div>
<form autocomplete="off" class="search_form">
<div class="search_wrap">
<div class="input_box cal">
<label for="right" class="label txt">날짜</label>
<p> 최대 1개월까지 조회 가능합니다.</p>
<div class="term">
<span class="custom_input icon_date">
<vuejs-datepicker
:language="ko"
:format="customFormatter"
:disabled-dates="disabledSDate"
v-model="startDate"
@selected="selectedStartDate(0)"
@closed="closeDate('start')"
></vuejs-datepicker>
</span>~
<span class="custom_input icon_date">
<vuejs-datepicker
:language="ko"
:format="customFormatter"
:disabled-dates="disabledEDate"
v-model="endDate"
@selected="selectedEndDate(0)"
@closed="closeDate('end')"
></vuejs-datepicker>
</span>
</div>
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div>
</form>
<div class="info">
<div class="count">집계결과</div>
<div class="button_group">
<button type="button" class="button blue download">엑셀 다운로드</button>
</div>
</div>
<div class="table calculate">
<table>
<colgroup>
<col width="7%">
<col width="9.3%">
<col width="9.3%">
<col width="9.3%">
<col width="9.3%">
<col width="9.3%">
<col width="9.3%">
<col width="9.3%">
<col width="9.3%">
<col width="9.3%">
<col width="9.3%">
</colgroup>
<thead>
<tr>
<th rowspan="2">날짜</th>
<th colspan="2">전체</th>
<th colspan="2">SMS</th>
<th colspan="2">LMS</th>
<th colspan="2">MMS</th>
<th colspan="2">알림톡</th>
</tr>
<tr class="total">
<th>발송건수</th>
<th>성공건수/(%)</th>
<th>발송건수</th>
<th>성공건수/(%)</th>
<th>발송건수</th>
<th>성공건수/(%)</th>
<th>발송건수</th>
<th>성공건수/(%)</th>
<th>발송건수</th>
<th>성공건수/(%)</th>
</tr>
</thead>
<tbody>
<tr v-for="(option, i) in list" v-bind:key="i">
<td>{{ option.sumYmd }}</td>
<td>{{ option.sndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<td>{{ option.succCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRt }}%)</td>
<td>{{ option.sndCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<td>{{ option.succCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtS }}%)</td>
<td>{{ option.sndCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<td>{{ option.succCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtL }}%)</td>
<td>{{ option.sndCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<td>{{ option.succCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtM }}%)</td>
<td>{{ option.sndCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<td>{{ option.succCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtR }}%)</td>
</tr>
</tbody>
</table>
</div>
<common-modal ref="commmonModal"></common-modal>
</div>
</div>
</template>
<script>
import moment from 'moment';
import statsApi from "../service/statsApi.js";
import xlsx from '@/common/excel';
import commonModal from "@/components/modal/commonModal";
export default {
name: 'dayList',
data() {
return {
// 달력 데이터
ko: vdp_translation_ko.js,
periodDay: 7,
sDateDiv: 'day',
startDate: new Date(),
endDate: new Date(),
startDt:'',
endDt:'',
row: {},
list:[],
totalCnt: '',
};
},
components: {
commonModal,
vuejsDatepicker,
},
created(){
this.$store.commit("login/isLogin", true);
this.$store.commit("login/isAuthChk", true);
// this.startDt = moment().format('YYYY-MM-DD');
// this.endDt = moment().format('YYYY-MM-DD');
this.setPeriodDay(0);
this.getDayList();
},
destroyed() {
},
mounted() {
},
methods: {
async getDayList(){
console.log('getDayList Start');
this.row.startDay = moment(this.startDate).format('YYYYMMDD');
this.row.endDay = moment(this.endDate).format('YYYYMMDD');
console.log('검색_시작일시(변환후):'+this.row.startDay);
console.log('검색_종료일시(변환후):'+this.row.endDay);
if (moment(this.row.startDay).isBefore(moment(this.row.endDay).subtract(1, 'months').format('YYYYMMDD'))) {
//alert('검색 기간은 최대 1개월까지 선택 가능 합니다.');
this.row.title = '발송통계';
this.row.msg1 = '검색 기간은 최대 1개월까지 선택 가능 합니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false
}
try {
const response = await statsApi.dayList(this.row);
const result = response.data;
console.log(result);
if (result != null && result.retCode == "0000") {
if(result.data.list.length > 0){
this.list = result.data.list;
}
this.totalCnt = result.data.list.length;
} else {
alert("조회정보가 없습니다.");
}
} catch(err) {
alert("실패 하였습니다.");
}
},
toMove(routeName) {
this.$router.push({ name: routeName, params: { page: 1, searchText: '' } });
},
search: function() {
console.log('검색_시작일시:'+this.startDt);
console.log('검색_종료일시:'+this.endDt);
this.getDayList();
},
// calendarCalbackFnc(year, month, day){
// if(this.openStartPicker){
// this.startDate= year +''+ month +''+ day
// if(Number(this.endDate) < Number(this.startDate) && this.endDate !== 0){
// this.row.title = '발송통계';
// this.row.msg1 = '조회 시작일이 종료일보다 큽니다.';
// this.$refs.commmonModal.alertModalOpen(this.row);
// this.openStartPicker = false
// return false
// }
// this.startDt = year + '-' + month + '-' + day
// this.openStartPicker = false
// }
// if(this.openEndPicker){
// this.endDate=year +''+ month +''+ day
// if(Number(this.endDate) < Number(this.startDate) && this.startDate !== 0){
// this.row.title = '발송통계';
// this.row.msg1 = '조회 종료일이 시작일보다 작습니다.';
// this.$refs.commmonModal.alertModalOpen(this.row);
// this.openEndPicker = false
// return false
// }
// this.endDt = year + '-' + month + '-' + day
// this.openEndPicker = false
// }
// },
setPeriodDay(day) {
this.periodDay = day;
this.endDate = new Date();
this.startDate = moment(this.endDate)
.subtract(day, 'day')
.toDate();
this.closeDate('start');
this.closeDate('end');
},
selectedStartDate(day) {
if (day != undefined && day != null) {
this.periodDay = day;
}
if (this.startDate > this.endDate) {
this.startDate = this.endDate;
}
console.log(this.disabledSDate)
// this.grid.params.startDt = day
},
selectedEndDate(day) {
if (day != undefined && day != null) {
this.periodDay = day;
}
},
closeDate(type) {
if (type != undefined && type != null) {
if (type == 'start') {
this.disabledSDate = { from: this.endDate };
this.disabledEDate = { to: this.startDate, from: this.endDate };
} else if (type == 'end') {
this.disabledSDate = { from: this.endDate };
this.disabledEDate = { to: this.startDate, from: new Date() };
}
}
},
customFormatter: function(date) {
if (this.sDateDiv == 'month') {
return moment(date).format('YYYY-MM');
} else if (this.sDateDiv == 'year') {
return moment(date).format('YYYY');
} else {
return moment(date).format('YYYY-MM-DD');
}
},
}
};
</script>

View File

@@ -1,5 +1,4 @@
<template> <template>
<div class="contents"> <div class="contents">
<div class="contents_wrap"> <div class="contents_wrap">
<div class="top_wrap"> <div class="top_wrap">
@@ -8,7 +7,8 @@
</div> </div>
<div class="top_tab"> <div class="top_tab">
<a href="statistics_date.html" class="on">월별통계</a><a href="statistics_date_day.html">일별통계</a> <a href="javascript:void(0);" class="on">월별통계</a>
<a href="javascript:void(0);" @click="toMove('dayList')" >일별통계</a>
</div> </div>
@@ -18,12 +18,41 @@
<label for="right" class="label txt">날짜</label> <label for="right" class="label txt">날짜</label>
<p> 최대 3개월까지 조회 가능합니다.</p> <p> 최대 3개월까지 조회 가능합니다.</p>
<div class="term"> <div class="term">
<input class="date" type="text" id="" placeholder="2022-10-12"/>
~ <div class="group" style="width:500px;">
<input class="" type="text" id="" placeholder="2022-10-12"/>
<span class="custom_input icon_date">
<vuejs-datepicker
:language="ko"
:format="customFormatter"
:disabled-dates="disabledSDate"
:minimumView="sDateDiv"
:maximumView="sDateDiv"
v-model="startDate"
@selected="selectedStartDate(0)"
@closed="closeDate('start')"
></vuejs-datepicker>
</span>~
<span class="custom_input icon_date">
<vuejs-datepicker
:language="ko"
:format="customFormatter"
:disabled-dates="disabledEDate"
:minimumView="sDateDiv"
:maximumView="sDateDiv"
v-model="endDate"
@selected="selectedEndDate(0)"
@closed="closeDate('end')"
></vuejs-datepicker>
</span>
<button type="button" class="button grey" @click="search">조회</button>
</div>
</div> </div>
</div> </div>
<button type="button" class="button grey">조회</button> <!--<button type="button" class="button grey">조회</button>-->
</div> </div>
</form> </form>
<div class="info"> <div class="info">
@@ -36,17 +65,17 @@
<div class="table calculate"> <div class="table calculate">
<table> <table>
<colgroup> <colgroup>
<col width="8%"> <col width="7%">
<col width="9.2%"> <col width="9.3%">
<col width="9.2%"> <col width="9.3%">
<col width="9.2%"> <col width="9.3%">
<col width="9.2%"> <col width="9.3%">
<col width="9.2%"> <col width="9.3%">
<col width="9.2%"> <col width="9.3%">
<col width="9.2%"> <col width="9.3%">
<col width="9.2%"> <col width="9.3%">
<col width="9.2%"> <col width="9.3%">
<col width="9.2%"> <col width="9.3%">
</colgroup> </colgroup>
<thead> <thead>
<tr> <tr>
@@ -71,164 +100,186 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr v-for="(option, i) in list" v-bind:key="i">
<td>전체</td> <td>{{ option.sumYm }}</td>
<td>84,000,000</td> <td>{{ option.sndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<td>84,000,000<br>(100%)</td> <td>{{ option.succCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRt }}%)</td>
<td>21,000,000</td> <td>{{ option.sndCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<td>21,000,000<br>(100%)</td> <td>{{ option.succCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtS }}%)</td>
<td>21,000,000</td> <td>{{ option.sndCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<td>21,000,000<br>(100%)</td> <td>{{ option.succCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtL }}%)</td>
<td>21,000,000</td> <td>{{ option.sndCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<td>21,000,000<br>(100%)</td> <td>{{ option.succCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtM }}%)</td>
<td>21,000,000</td> <td>{{ option.sndCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<td>21,000,000<br>(100%)</td> <td>{{ option.succCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtR }}%)</td>
</tr>
<tr>
<td>2022-03</td>
<td>40,000,000</td>
<td>40,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
</tr>
<tr>
<td>2022-02</td>
<td>40,000,000</td>
<td>40,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
</tr>
<tr>
<td>2022-01</td>
<td>40,000,000</td>
<td>40,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
</tr>
<tr>
<td>2021-12</td>
<td>40,000,000</td>
<td>40,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
</tr>
<tr>
<td>2021-11</td>
<td>40,000,000</td>
<td>40,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
</tr>
<tr>
<td>2021-10</td>
<td>40,000,000</td>
<td>40,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
</tr>
<tr>
<td>2021-09</td>
<td>40,000,000</td>
<td>40,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
</tr>
<tr>
<td>2021-08</td>
<td>40,000,000</td>
<td>40,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
</tr>
<tr>
<td>2021-07</td>
<td>40,000,000</td>
<td>40,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
<td>10,000,000</td>
<td>10,000,000<br>(100%)</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
<common-modal ref="commmonModal"></common-modal>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import customGrid from '@/components/CustomGrid'; import moment from 'moment';
//import api from '../service/api'; import statsApi from "../service/statsApi.js";
import xlsx from '@/common/excel';
import commonModal from "@/components/modal/commonModal";
// import DatePicker from "vue2-datepicker";
export default { export default {
name: 'monthList', name: 'monthList',
data() { data() {
return { return {
// 달력 데이터
ko: vdp_translation_ko.js,
periodDay: 7,
sDateDiv: 'month',
startDate: new Date(),
endDate: new Date(),
startDt:'',
endDt:'',
startYear:'',
startMonth:'',
endYear:'',
endMonth:'',
row: {},
list:[],
totalCnt: '',
}; };
}, },
components: { components: {
customGrid: customGrid commonModal,
vuejsDatepicker,
},
created(){
this.$store.commit("login/isLogin", true);
this.$store.commit("login/isAuthChk", true);
this.setPeriodDay(0);
this.getMonthList();
}, },
destroyed() { destroyed() {
}, },
mounted() { mounted() {
}, },
methods: { methods: {
async getMonthList(){
console.log('getMonthList Start');
this.row.startMon = moment(this.startDate).format('YYYYMM');
this.row.endMon = moment(this.endDate).format('YYYYMM');
console.log('검색_시작년월:'+this.row.startMon);
console.log('검색_종료년월:'+this.row.endMon);
if (moment(this.row.startMon).isBefore(moment(this.row.endMon).subtract(2, 'months').format('YYYYMM'))) {
//alert('검색 기간은 최대 3개월까지 선택 가능 합니다.');
this.row.title = '발송통계';
this.row.msg1 = '검색 기간은 최대 3개월까지 선택 가능 합니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false
}
try {
const response = await statsApi.monthList(this.row);
const result = response.data;
console.log(result);
if (result != null && result.retCode == "0000") {
this.list = result.data.list;
this.totalCnt = result.data.list.length;
} else {
alert("조회정보가 없습니다.");
}
} catch(err) {
alert("실패 하였습니다.");
}
},
search: function() {
this.getMonthList();
},
toMove(routeName) {
//this.$router.push({ name: routeName, params: { page: 1, searchText: '' } });
this.$router.push({ name: routeName, params: {} });
},
// disabledStDate(date) {
// date = moment(String(date)).format('YYYYMMDD');
// return date > moment().format('YYYYMMDD') || date < moment().add(-1, 'years').format('YYYYMMDD');
// },
// disabledEdDate(date) {
// date = moment(String(date)).format('YYYYMMDD')
// return date > moment().format('YYYYMMDD') || date < this.searchData.startDate ;
// },
// changeDate(type) {
// if (type === 'start') {
// if (this.endDate === null || this.startDate > this.endDate) {
// this.endDate = this.startDate;
// }
// if (moment(this.startDate).isBefore(moment(this.endDate).subtract(2, 'months').format('YYYYMMDD'))) {
// alert('검색 기간은 최대 3개월까지 선택 가능 합니다.');
// this.startDate = moment(this.endDate).subtract(2, 'months').format('YYYYMMDD');
// }
// } else if (type === 'end') {
// if (this.startDate === null || this.startDate > this.endDate) {
// this.startDate = this.endDate;
// }
// if (moment(this.endDate).isAfter(moment(this.startDate).add(2, 'months').format('YYYYMMDD'))) {
// alert('검색 기간은 최대 3개월까지 선택 가능 합니다.')
// this.endDate = moment(this.startDate).add(2, 'months').format('YYYYMMDD');
// }
// }
// },
setPeriodDay(day) {
this.periodDay = day;
this.endDate = new Date();
this.startDate = moment(this.endDate)
.subtract(day, 'day')
.toDate();
this.closeDate('start');
this.closeDate('end');
},
selectedStartDate(day) {
if (day != undefined && day != null) {
this.periodDay = day;
}
if (this.startDate > this.endDate) {
this.startDate = this.endDate;
}
console.log(this.disabledSDate)
// this.grid.params.startDt = day
},
selectedEndDate(day) {
if (day != undefined && day != null) {
this.periodDay = day;
}
},
closeDate(type) {
if (type != undefined && type != null) {
if (type == 'start') {
this.disabledSDate = { from: this.endDate };
this.disabledEDate = { to: this.startDate, from: this.endDate };
} else if (type == 'end') {
this.disabledSDate = { from: this.endDate };
this.disabledEDate = { to: this.startDate, from: new Date() };
}
}
},
customFormatter: function(date) {
if (this.sDateDiv == 'month') {
return moment(date).format('YYYY-MM');
} else if (this.sDateDiv == 'year') {
return moment(date).format('YYYY');
} else {
return moment(date).format('YYYY-MM-DD');
}
},
} }
}; };
</script> </script>
<style>
</style>

View File

@@ -23,5 +23,6 @@ public class ZezNumIntrcpList implements Serializable {
private String regDt; private String regDt;
@ApiModelProperty(example = "등록구분", name = "등록구분", dataType = "String") @ApiModelProperty(example = "등록구분", name = "등록구분", dataType = "String")
private String regTpCd; private String regTpCd;
@ApiModelProperty(hidden = true)
private String userId;
} }

View File

@@ -12,9 +12,12 @@ import kr.co.uplus.ez.api.sendNumMgt.dto.*;
import kr.co.uplus.ez.common.components.ValidComponents; import kr.co.uplus.ez.common.components.ValidComponents;
import kr.co.uplus.ez.common.data.ApiResponseCode; import kr.co.uplus.ez.common.data.ApiResponseCode;
import kr.co.uplus.ez.common.data.ApiResponseMessage; import kr.co.uplus.ez.common.data.ApiResponseMessage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid; import javax.validation.Valid;
@@ -24,6 +27,8 @@ import java.util.Map;
@RequestMapping(value = "api/v1/bo/sendNumMgt") @RequestMapping(value = "api/v1/bo/sendNumMgt")
public class SendNumMgtController { public class SendNumMgtController {
private static final Logger logger = LoggerFactory.getLogger(SendNumMgtController.class);
@Autowired @Autowired
SendNumMgtService sendNumService; SendNumMgtService sendNumService;
@@ -94,13 +99,8 @@ public class SendNumMgtController {
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") }) @ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
@RequestMapping(value = "insertNumber", method = { RequestMethod.POST }) @RequestMapping(value = "insertNumber", method = { RequestMethod.POST })
@ResponseBody @ResponseBody
public InsertNumberResDto insertNumber(@RequestBody @Valid InsertNumberReqDto insertNumberReqDto, BindingResult bindingResult) { public InsertNumberResDto insertNumber(@RequestPart(value = "key") InsertNumberReqDto insertNumberReqDto, MultipartHttpServletRequest multipartRequest) {
return sendNumService.insertNumber(insertNumberReqDto, multipartRequest);
if (validComponents.validParameter(bindingResult)) {
return new InsertNumberResDto(ApiResponseCode.CM_PARAMETER_ERROR);
}
return sendNumService.insertNumber(insertNumberReqDto);
} }
/** /**

View File

@@ -5,11 +5,13 @@ import kr.co.uplus.ez.common.data.ApiResponseCode;
import kr.co.uplus.ez.common.data.ApiResponseMessage; import kr.co.uplus.ez.common.data.ApiResponseMessage;
import kr.co.uplus.ez.common.data.Paging; import kr.co.uplus.ez.common.data.Paging;
import kr.co.uplus.ez.common.utils.FileUtil; import kr.co.uplus.ez.common.utils.FileUtil;
import org.apache.commons.lang3.StringUtils;
import org.mybatis.spring.SqlSessionTemplate; import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartHttpServletRequest;
import java.io.File; import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
@@ -28,7 +30,8 @@ public class SendNumMgtService {
@Qualifier("sqlSessionTemplateDb2") @Qualifier("sqlSessionTemplateDb2")
private SqlSessionTemplate sqlSessionSlave; private SqlSessionTemplate sqlSessionSlave;
@Value("${file-resource.info.sendNumber.path:/efs/admin/sendNumber/}")
private String sendNumUploadPath;
/** /**
* date : 2022. 4. 25. * date : 2022. 4. 25.
* auth : ckr * auth : ckr
@@ -138,144 +141,160 @@ public class SendNumMgtService {
* @param paramMap * @param paramMap
* @return * @return
*/ */
public InsertNumberResDto insertNumber(InsertNumberReqDto insertNumberReqDto) { public InsertNumberResDto insertNumber(InsertNumberReqDto insertNumberReqDto, MultipartHttpServletRequest multipartRequest) {
FileUtil fileUtil = new FileUtil(); FileUtil fileUtil = new FileUtil();
SendNumMgtMapper sendNumMgtMapper = sqlSessionSlave.getMapper(SendNumMgtMapper.class); SendNumMgtMapper sendNumMgtMapper = sqlSessionSlave.getMapper(SendNumMgtMapper.class);
String adminId = insertNumberReqDto.getAdminId(); String adminId = insertNumberReqDto.getAdminId();
String userSeq = sendNumMgtMapper.selectUserSeqByAdminId(adminId); if(StringUtils.equals("01", insertNumberReqDto.getNmineeDivCd())){
File tenureFile = (File) multipartRequest.getFile("tenureFile");
File businessFile = (File) multipartRequest.getFile("businessFile");
File communicationFile = (File) multipartRequest.getFile("communicationFile");
insertNumberReqDto.setUserSeq(userSeq); }else{
insertNumberReqDto.setReqCnt(insertNumberReqDto.getList().size()+1); File trustFile = (File) multipartRequest.getFile("trustFile");
try { File warrantFile = (File) multipartRequest.getFile("warrantFile");
// 1. EZ_SNDRNO_REG File deputyFile = (File) multipartRequest.getFile("deputyFile");
sendNumMgtMapper.insertNumber(insertNumberReqDto); File tenureFile = (File) multipartRequest.getFile("tenureFile");
File businessFile = (File) multipartRequest.getFile("businessFile");
String path = "C:/hubeasyfiles/sndrNo/"+insertNumberReqDto.getAdminId();
File dir = new File(path);
if(!dir.isDirectory()) {
dir.mkdirs();
} }
for(int i=0;i<insertNumberReqDto.getAuthSendNum().size();i++) { // 1. 발신번호 등록
// sendNumUploadPath
String docTpCd = ""; // 2. 발신번호 등록용 파일.
// String userSeq = sendNumMgtMapper.selectUserSeqByAdminId(adminId);
if(insertNumberReqDto.getAuthSendNum().size() == 2) { //서류 유형코드 구분 //
switch(i){ // insertNumberReqDto.setUserSeq(userSeq);
case 0: // insertNumberReqDto.setReqCnt(insertNumberReqDto.getList().size()+1);
docTpCd = "08"; // 통신서비스 이용 증명원 // try {
break; // // 1. EZ_SNDRNO_REG
case 1: // sendNumMgtMapper.insertNumber(insertNumberReqDto);
docTpCd = "07"; //재직증명서 //
break; // String path = "C:/hubeasyfiles/sndrNo/"+insertNumberReqDto.getAdminId();
default: // File dir = new File(path);
docTpCd = "00"; // if(!dir.isDirectory()) {
break; // dir.mkdirs();
} // }
} //
else if(insertNumberReqDto.getAuthSendNum().size() == 4) {//서류 유형코드 구분 // for(int i=0;i<insertNumberReqDto.getAuthSendNum().size();i++) {
switch(i){ //
case 0: // String docTpCd = "";
docTpCd = "03"; //위임수임관계확인서류 //
break; // if(insertNumberReqDto.getAuthSendNum().size() == 2) { //서류 유형코드 구분
case 1: // switch(i){
docTpCd = "04"; //위임장 // case 0:
break; // docTpCd = "08"; // 통신서비스 이용 증명원
case 2: // break;
docTpCd = "05"; //대리인 신분증 사본 인증 // case 1:
break; // docTpCd = "07"; //재직증명서
case 3: // break;
docTpCd = "07"; //재직증명서 // default:
break; // docTpCd = "00";
default: // break;
docTpCd = "00"; // }
break; // }
} // else if(insertNumberReqDto.getAuthSendNum().size() == 4) {//서류 유형코드 구분
} // switch(i){
// case 0:
path += path +"/"+ docTpCd; // docTpCd = "03"; //위임수임관계확인서류
// break;
InsertNumberFile insertFile = new InsertNumberFile(); // case 1:
// docTpCd = "04"; //위임장
MultipartFile file = insertNumberReqDto.getAuthSendNum().get(i); // break;
String docTitle = file.getName(); // case 2:
String fileNm = file.getOriginalFilename(); // docTpCd = "05"; //대리인 신분증 사본 인증
String filePath = path+"/"+file.getOriginalFilename(); // break;
long fileSize = file.getSize(); // case 3:
String regId = insertNumberReqDto.getRegId(); // docTpCd = "07"; //재직증명서
// break;
// default:
if(!fileUtil.upload(file, docTitle, path)) {//파일저장 // docTpCd = "00";
return new InsertNumberResDto(ApiResponseCode.CM_DB_QUERY_ERR);//파일저장 실패시 // break;
} // }
//파일저장 성공시 insert // }
insertFile.setRegReqNo(insertNumberReqDto.getRegReqNo()); //
insertFile.setDocTpCd(docTpCd); // path += path +"/"+ docTpCd;
insertFile.setDocTitle(docTitle); //
insertFile.setFileNm(fileNm); // InsertNumberFile insertFile = new InsertNumberFile();
insertFile.setFilePath(filePath); //
insertFile.setFileSize(fileSize); // MultipartFile file = insertNumberReqDto.getAuthSendNum().get(i);
insertFile.setRegId(regId); // String docTitle = file.getName();
// String fileNm = file.getOriginalFilename();
// 2. EZ_SNDRNO_DOC // String filePath = path+"/"+file.getOriginalFilename();
sendNumMgtMapper.insertNumberDoc(insertFile); // long fileSize = file.getSize();
} // String regId = insertNumberReqDto.getRegId();
for(int j=0;j<insertNumberReqDto.getAuthBsns().size();j++) { //
//
String docTpCd = ""; // if(!fileUtil.upload(file, docTitle, path)) {//파일저장
// return new InsertNumberResDto(ApiResponseCode.CM_DB_QUERY_ERR);//파일저장 실패시
switch(j){//서류 유형코드 구분 // }
case 0: // //파일저장 성공시 insert
docTpCd = "06"; //사업자등록증 // insertFile.setRegReqNo(insertNumberReqDto.getRegReqNo());
break; // insertFile.setDocTpCd(docTpCd);
default: // insertFile.setDocTitle(docTitle);
docTpCd = "00"; // insertFile.setFileNm(fileNm);
break; // insertFile.setFilePath(filePath);
} // insertFile.setFileSize(fileSize);
// insertFile.setRegId(regId);
path += path +"/"+ docTpCd; //
// // 2. EZ_SNDRNO_DOC
InsertNumberFile insertFile = new InsertNumberFile(); // sendNumMgtMapper.insertNumberDoc(insertFile);
// }
MultipartFile file = insertNumberReqDto.getAuthSendNum().get(j); // for(int j=0;j<insertNumberReqDto.getAuthBsns().size();j++) {
String docTitle = file.getName(); //
String fileNm = file.getOriginalFilename(); // String docTpCd = "";
String filePath = path+"/"+file.getOriginalFilename(); //
long fileSize = file.getSize(); // switch(j){//서류 유형코드 구분
String regId = insertNumberReqDto.getRegId(); // case 0:
// docTpCd = "06"; //사업자등록증
// break;
if(!fileUtil.upload(file, docTitle, path)) {//파일저장 // default:
return new InsertNumberResDto(ApiResponseCode.SE_UNKNOWN);// 파일저장 실패하면 // docTpCd = "00";
} // break;
// }
insertFile.setRegReqNo(insertNumberReqDto.getRegReqNo()); //
insertFile.setDocTpCd(docTpCd); // path += path +"/"+ docTpCd;
insertFile.setDocTitle(docTitle); //
insertFile.setFileNm(fileNm); // InsertNumberFile insertFile = new InsertNumberFile();
insertFile.setFilePath(filePath); //
insertFile.setFileSize(fileSize); // MultipartFile file = insertNumberReqDto.getAuthSendNum().get(j);
insertFile.setRegId(regId); // String docTitle = file.getName();
// 3. EZ_SVC_SNDRNO // String fileNm = file.getOriginalFilename();
sendNumMgtMapper.insertNumberDoc(insertFile); // String filePath = path+"/"+file.getOriginalFilename();
} // long fileSize = file.getSize();
// String regId = insertNumberReqDto.getRegId();
for(int k=0;k<insertNumberReqDto.getList().size();k++) { //
InsertNumber insertNumber = insertNumberReqDto.getList().get(k); //
// if(!fileUtil.upload(file, docTitle, path)) {//파일저장
insertNumber.setCustSeq(insertNumberReqDto.getUserSeq()); // return new InsertNumberResDto(ApiResponseCode.SE_UNKNOWN);// 파일저장 실패하면
insertNumber.setRegReqNo(insertNumberReqDto.getRegReqNo()); // }
insertNumber.setNmineeDivCd(insertNumberReqDto.getNmineeDivCd()); //
insertNumber.setInchDivCd(insertNumberReqDto.getInchDivCd()); // insertFile.setRegReqNo(insertNumberReqDto.getRegReqNo());
// insertFile.setDocTpCd(docTpCd);
sendNumMgtMapper.insertNumberList(insertNumber); // insertFile.setDocTitle(docTitle);
} // insertFile.setFileNm(fileNm);
} catch (Exception e) { // insertFile.setFilePath(filePath);
return new InsertNumberResDto(ApiResponseCode.CM_DB_QUERY_ERR); // insertFile.setFileSize(fileSize);
} // insertFile.setRegId(regId);
// // 3. EZ_SVC_SNDRNO
// sendNumMgtMapper.insertNumberDoc(insertFile);
// }
//
// for(int k=0;k<insertNumberReqDto.getList().size();k++) {
// InsertNumber insertNumber = insertNumberReqDto.getList().get(k);
//
// insertNumber.setCustSeq(insertNumberReqDto.getUserSeq());
// insertNumber.setRegReqNo(insertNumberReqDto.getRegReqNo());
// insertNumber.setNmineeDivCd(insertNumberReqDto.getNmineeDivCd());
// insertNumber.setInchDivCd(insertNumberReqDto.getInchDivCd());
//
// sendNumMgtMapper.insertNumberList(insertNumber);
// }
// } catch (Exception e) {
// return new InsertNumberResDto(ApiResponseCode.CM_DB_QUERY_ERR);
// }
return new InsertNumberResDto(ApiResponseCode.SUCCESS); return new InsertNumberResDto(ApiResponseCode.SUCCESS);
} }

View File

@@ -1,11 +1,11 @@
package kr.co.uplus.ez.api.sendNumMgt.dto; package kr.co.uplus.ez.api.sendNumMgt.dto;
import java.io.Serializable;
import java.util.List;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable;
import java.util.List;
@SuppressWarnings("serial") @SuppressWarnings("serial")
@Data @Data
public class DetailNumber implements Serializable{ public class DetailNumber implements Serializable{
@@ -14,16 +14,25 @@ public class DetailNumber implements Serializable{
private String adminId; private String adminId;
@ApiModelProperty(example = "고객사명(이름)", name = "고객사명(이름)", dataType = "String") @ApiModelProperty(example = "고객사명(이름)", name = "고객사명(이름)", dataType = "String")
private String custNm; private String custNm;
@ApiModelProperty(example = "사업자번호(생년월일)", name = "사업자번호(생년월일)", dataType = "String") @ApiModelProperty(example = "등록자ID", name = "등록자ID", dataType = "String")
private String register;
@ApiModelProperty(example = "사업자번호", name = "사업자번호", dataType = "String")
private String bRegNo; private String bRegNo;
@ApiModelProperty(example = "발신번호", name = "발신번호", dataType = "String")
private String regNo;
@ApiModelProperty(example = "명의자 구분", name = "명의자 구분", dataType = "String") @ApiModelProperty(example = "명의자 구분", name = "명의자 구분", dataType = "String")
private String nmineeDivCd; private String nmineeDivCd;
@ApiModelProperty(example = "인입채널", name = "인입채널", dataType = "String")
private String inchDivCd;
@ApiModelProperty(example = "발신번호명", name = "발신번호명", dataType = "String")
private String sndrnoNm;
@ApiModelProperty(example = "발신번호", name = "발신번호", dataType = "String")
private String sndrno;
@ApiModelProperty(example = "상태", name = "상태", dataType = "String")
private String sttusCd;
@ApiModelProperty(example = "등록일자", name = "등록일자", dataType = "String")
private String regDt;
private List<AuthFileInfo> list; private List<AuthFileInfo> list;
@ApiModelProperty(example = "등록요청번호", name = "등록요청번호", dataType = "String", hidden=true) @ApiModelProperty(example = "등록요청번호", name = "등록요청번호", dataType = "String", hidden=true)
private String regRegNo; private String regRegNo;
} }

View File

@@ -1,18 +1,18 @@
package kr.co.uplus.ez.api.sendNumMgt.dto; package kr.co.uplus.ez.api.sendNumMgt.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial") @SuppressWarnings("serial")
@Data @Data
public class DetailNumberReqDto implements Serializable{ public class DetailNumberReqDto implements Serializable{
@ApiModelProperty(example = "등록번호", name = "등록번호", dataType = "String") @ApiModelProperty(example = "등록번호", name = "등록번호", dataType = "String")
private String regNo; private String regReqNo;
@ApiModelProperty(example = "관리자 ID", name = "관리자 ID", dataType = "String") @ApiModelProperty(example = "발신번호", name = "발신번호", dataType = "String")
private String adminId; private String sndrno;
} }

View File

@@ -31,5 +31,7 @@ public class SendNumberInfo implements Serializable{
private String regTpCd; private String regTpCd;
@ApiModelProperty(example = "등록일", name = "등록일", notes = "YYYY-MM-DD", dataType = "String") @ApiModelProperty(example = "등록일", name = "등록일", notes = "YYYY-MM-DD", dataType = "String")
private String regDt; private String regDt;
@ApiModelProperty(example = "발신번호등록번호", name = "발신번호등록번호", dataType = "String")
private String regReqNo;
} }

View File

@@ -152,6 +152,7 @@
, eci.BIZRNO , eci.BIZRNO
, er.AUTHCD_080 , er.AUTHCD_080
, er.RCVBLCKNO , er.RCVBLCKNO
, esu.USER_ID
, DATE_FORMAT(er.REG_DT, '%Y-%m-%d') AS REG_DT , DATE_FORMAT(er.REG_DT, '%Y-%m-%d') AS REG_DT
,( ,(
SELECT SELECT
@@ -266,6 +267,7 @@
</select> </select>
<select id="selectMsgBlckWordSeq" resultType="String"> <select id="selectMsgBlckWordSeq" resultType="String">
/* riskMgt-mapper.xml(selectMsgBlckWordSeq) */
SELECT ${HUBEZ_COMMON}.FUN_NEXT_SEQ('MSG_BLCKWORD_SEQ') SELECT ${HUBEZ_COMMON}.FUN_NEXT_SEQ('MSG_BLCKWORD_SEQ')
</select> </select>

View File

@@ -349,22 +349,61 @@
<select id="detailNumber" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.DetailNumberReqDto" resultType="kr.co.uplus.ez.api.sendNumMgt.dto.DetailNumber"> <select id="detailNumber" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.DetailNumberReqDto" resultType="kr.co.uplus.ez.api.sendNumMgt.dto.DetailNumber">
/* sendNumMgt-mapper.xml(detailNumber) */ /* sendNumMgt-mapper.xml(detailNumber) */
SELECT SELECT
esu.USER_ID AS adminId eci.CUST_NM AS custNm
,eci.CUST_NM AS custNm , ess.SNDRNO
,eci.BIZRNO AS bRegNo , esu.USER_ID AS adminId
,esr.REG_REQ_NO AS regReqNo , ess.REG_ID AS register
,ess.NMINEE_DIV_CD AS nmineeDivCd , eci.BIZRNO AS bRegNo
, ess.SNDRNO_NM
, ess.SNDRNO
, esr.REG_REQ_NO
,(
SELECT
ecd.DTL_CD_NM
FROM FROM
${HUBEZ_COMMON}.EZ_SVC_USER esu hubez_common.EZ_CD_DTL ecd
LEFT JOIN ${HUBEZ_COMMON}.EZ_CUST_INFO eci
ON esu.CUST_SEQ = eci.CUST_SEQ
LEFT JOIN ${HUBEZ_COMMON}.EZ_SNDRNO_REG esr
ON esu.USER_SEQ = esr.USER_SEQ
LEFT JOIN ${HUBEZ_COMMON}.EZ_SVC_SNDRNO ess
ON esr.REG_REQ_NO = ess.REG_REQ_NO
WHERE WHERE
esu.USER_ID = #{adminId} ecd.GRP_CD = 'NMINEE_DIV_CD'
AND ess.SNDRNO = #{regNo} AND ecd.DTL_CD = ess.NMINEE_DIV_CD) AS nmineeDivCd
,(
SELECT
ecd.DTL_CD_NM
FROM
hubez_common.EZ_CD_DTL ecd
WHERE
ecd.GRP_CD = 'INCH_DIV_CD'
AND ecd.DTL_CD = ess.INCH_DIV_CD) AS inchDivCd
,(
SELECT
ecd.DTL_CD_NM
FROM
hubez_common.EZ_CD_DTL ecd
WHERE
ecd.GRP_CD = 'SNDRNO_STTUS_CD'
AND ecd.DTL_CD = ess.STTUS_CD) AS sttusCd
,(
SELECT
ecd.DTL_CD_NM
FROM
hubez_common.EZ_CD_DTL ecd
WHERE
ecd.GRP_CD = 'SNDRNO_REG_TP_CD'
AND ecd.DTL_CD = ess.REG_TP_CD) AS regTpCd
, DATE_FORMAT(ess.REG_DT, '%Y-%m-%d') AS regDt
FROM
hubez_common.EZ_CUST_INFO eci
INNER JOIN hubez_common.EZ_SVC_USER esu
ON
eci.CUST_SEQ = esu.CUST_SEQ
INNER JOIN hubez_common.EZ_SNDRNO_REG esr
ON
esu.USER_SEQ = esr.USER_SEQ
INNER JOIN hubez_common.EZ_SVC_SNDRNO ess
ON
eci.CUST_SEQ = ess.CUST_SEQ
WHERE 1 = 1
AND ess.SNDRNO = #{sndrno}
AND esr.REG_REQ_NO = #{regReqNo}
</select> </select>
<select id="selectAuthFileList" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.DetailNumberReqDto" resultType="kr.co.uplus.ez.api.sendNumMgt.dto.AuthFileInfo"> <select id="selectAuthFileList" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.DetailNumberReqDto" resultType="kr.co.uplus.ez.api.sendNumMgt.dto.AuthFileInfo">

View File

@@ -5,198 +5,532 @@
<select id="selectMonStatList" parameterType="kr.co.uplus.ez.api.stats.dto.MonthListReqDto" resultType="kr.co.uplus.ez.api.stats.dto.MonthList"> <select id="selectMonStatList" parameterType="kr.co.uplus.ez.api.stats.dto.MonthListReqDto" resultType="kr.co.uplus.ez.api.stats.dto.MonthList">
SELECT * FROM (
SELECT SELECT
ems.SUM_YM '전체' AS sumYm
, ems.SND_CNT , IFNULL(ecm1.SND_CNT,0) AS sndCnt
, ems.SUCC_CNT , IFNULL(ecm1.SUCC_CNT,0) AS succCnt
, ems.SUCC_RT , IFNULL(ecm1.SUCC_RT,0) AS succRt
, S.SND_CNT AS SND_CNT_S , IFNULL(S1.SND_CNT,0) AS sndCntS
, S.SUCC_CNT AS SUCC_CNT_S , IFNULL(S1.SUCC_CNT,0) AS succCntS
, S.SUCC_RT AS SUCC_RT_S , IFNULL(S1.SUCC_RT,0) AS succRtS
, L.SND_CNT AS SND_CNT_L , IFNULL(L1.SND_CNT,0) AS sndCntL
, L.SUCC_CNT AS SUCC_CNT_L , IFNULL(L1.SUCC_CNT,0) AS succCntL
, L.SUCC_RT AS SUCC_RT_L , IFNULL(L1.SUCC_RT,0) AS succRtL
, M.SND_CNT AS SND_CNT_M , IFNULL(M1.SND_CNT,0) AS sndCntM
, M.SUCC_CNT AS SUCC_CNT_M , IFNULL(M1.SUCC_CNT,0) AS succCntM
, M.SUCC_RT AS SUCC_RT_M , IFNULL(M1.SUCC_RT,0) AS succRtM
, R.SND_CNT AS SND_CNT_R , IFNULL(A1.SND_CNT,0) AS sndCntR
, R.SUCC_CNT AS SUCC_CNT_R , IFNULL(A1.SUCC_CNT,0) AS succCntR
, R.SUCC_RT AS SUCC_RT_R , IFNULL(A1.SUCC_RT,0) AS succRtR
FROM FROM
hubez_common.EZ_MON_STAT ems (SELECT
JOIN ( SUM(IFNULL(SND_CNT,0)) AS SND_CNT
,SUM(IFNULL(SUCC_CNT,0)) AS SUCC_CNT
,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS SUCC_RT
FROM
${HUBEZ_COMMON}.EZ_MON_STAT
WHERE 1=1
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
) ecm1,
(
SELECT SELECT
SND_CNT SUM(IFNULL(SND_CNT,0)) AS SND_CNT
, SUCC_CNT ,SUM(IFNULL(SUCC_CNT,0)) AS SUCC_CNT
, SUCC_RT ,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS SUCC_RT
FROM FROM
hubez_common.EZ_MON_STAT ${HUBEZ_COMMON}.EZ_MON_STAT
WHERE WHERE 1=1
SND_CH_CD = 'SMS') AS S AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
JOIN ( AND SND_CH_CD = 'SMS'
) S1,
(
SELECT SELECT
SND_CNT SUM(IFNULL(SND_CNT,0)) AS SND_CNT
, SUCC_CNT ,SUM(IFNULL(SUCC_CNT,0)) AS SUCC_CNT
, SUCC_RT ,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS SUCC_RT
FROM FROM
hubez_common.EZ_MON_STAT ${HUBEZ_COMMON}.EZ_MON_STAT
WHERE WHERE 1=1
SND_CH_CD = 'MMS') AS M AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
JOIN ( AND SND_CH_CD = 'LMS'
) L1,
(
SELECT SELECT
SND_CNT SUM(IFNULL(SND_CNT,0)) AS SND_CNT
, SUCC_CNT ,SUM(IFNULL(SUCC_CNT,0)) AS SUCC_CNT
, SUCC_RT ,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS SUCC_RT
FROM FROM
hubez_common.EZ_MON_STAT ${HUBEZ_COMMON}.EZ_MON_STAT
WHERE WHERE 1=1
SND_CH_CD = 'LMS') AS L AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
JOIN ( AND SND_CH_CD = 'MMS'
) M1,
(
SELECT SELECT
SND_CNT SUM(IFNULL(SND_CNT,0)) AS SND_CNT
, SUCC_CNT ,SUM(IFNULL(SUCC_CNT,0)) AS SUCC_CNT
, SUCC_RT ,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100),2) AS SUCC_RT
FROM FROM
hubez_common.EZ_MON_STAT ${HUBEZ_COMMON}.EZ_MON_STAT
WHERE WHERE 1=1
SND_CH_CD = 'RCS') AS R AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
WHERE DATE_FORMAT(ems.SUM_YM, '%Y%m') BETWEEN #{startMon} AND #{endMon} AND SND_CH_CD = 'ALIMTALK'
ORDER BY ems.SUM_YM DESC ) A1
UNION ALL
SELECT
DATE_FORMAT(ecm.SUM_YM, '%Y-%m') AS sumYm
, ecm.SND_CNT AS sndCnt
, ecm.SUCC_CNT AS succCnt
, ecm.SUCC_RT AS succRt
, S.SND_CNT AS sndCntS
, S.SUCC_CNT AS succCntS
, S.SUCC_RT AS succRtS
, L.SND_CNT AS sndCntL
, L.SUCC_CNT AS succCntL
, L.SUCC_RT AS succRtL
, M.SND_CNT AS sndCntM
, M.SUCC_CNT AS succCntM
, M.SUCC_RT AS succRtM
, A.SND_CNT AS sndCntR
, A.SUCC_CNT AS succCntR
, A.SUCC_RT AS succRtR
FROM
(SELECT
SUM_YM
,SUM(IFNULL(SND_CNT,0)) AS SND_CNT
,SUM(IFNULL(SUCC_CNT,0)) AS SUCC_CNT
,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS SUCC_RT
FROM
${HUBEZ_COMMON}.EZ_MON_STAT
WHERE 1=1
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
GROUP BY SUM_YM ) ecm,
(SELECT
SUM_YM
,SUM(IFNULL(SND_CNT,0)) AS SND_CNT
,SUM(IFNULL(SUCC_CNT,0)) AS SUCC_CNT
,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS SUCC_RT
FROM
${HUBEZ_COMMON}.EZ_MON_STAT
WHERE 1=1
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
AND SND_CH_CD = 'SMS'
GROUP BY SUM_YM ) S,
(SELECT
SUM_YM
,SUM(IFNULL(SND_CNT,0)) AS SND_CNT
,SUM(IFNULL(SUCC_CNT,0)) AS SUCC_CNT
,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS SUCC_RT
FROM
${HUBEZ_COMMON}.EZ_MON_STAT
WHERE 1=1
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
AND SND_CH_CD = 'LMS'
GROUP BY SUM_YM ) L,
( SELECT
SUM_YM
,SUM(IFNULL(SND_CNT,0)) AS SND_CNT
,SUM(IFNULL(SUCC_CNT,0)) AS SUCC_CNT
,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS SUCC_RT
FROM
${HUBEZ_COMMON}.EZ_MON_STAT
WHERE 1=1
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
AND SND_CH_CD = 'MMS'
GROUP BY SUM_YM ) M,
( SELECT
SUM_YM
,SUM(IFNULL(SND_CNT,0)) AS SND_CNT
,SUM(IFNULL(SUCC_CNT,0)) AS SUCC_CNT
,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100),2) AS SUCC_RT
FROM
${HUBEZ_COMMON}.EZ_MON_STAT
WHERE 1=1
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
AND SND_CH_CD = 'ALIMTALK'
GROUP BY SUM_YM ) A
WHERE 1=1
AND ecm.SUM_YM = S.SUM_YM
AND ecm.SUM_YM = L.SUM_YM
AND ecm.SUM_YM = M.SUM_YM
AND ecm.SUM_YM = A.SUM_YM
) T
ORDER BY sumYm DESC
</select> </select>
<select id="selectDayStatList" parameterType="kr.co.uplus.ez.api.stats.dto.DayListReqDto" resultType="kr.co.uplus.ez.api.stats.dto.DayList"> <select id="selectDayStatList" parameterType="kr.co.uplus.ez.api.stats.dto.DayListReqDto" resultType="kr.co.uplus.ez.api.stats.dto.DayList">
SELECT * FROM (
SELECT SELECT
eds.SUM_YMD '전체' AS sumYmd
, eds.SND_CNT , IFNULL(ecm1.SND_CNT,0) AS sndCnt
, eds.SUCC_CNT , IFNULL(ecm1.SUCC_CNT,0) AS succCnt
, eds.SUCC_RT , IFNULL(ecm1.SUCC_RT,0) AS succRt
, S.SND_CNT AS SND_CNT_S , IFNULL(S1.SND_CNT,0) AS sndCntS
, S.SUCC_CNT AS SUCC_CNT_S , IFNULL(S1.SUCC_CNT,0) AS succCntS
, S.SUCC_RT AS SUCC_RT_S , IFNULL(S1.SUCC_RT,0) AS succRtS
, L.SND_CNT AS SND_CNT_L , IFNULL(L1.SND_CNT,0) AS sndCntL
, L.SUCC_CNT AS SUCC_CNT_L , IFNULL(L1.SUCC_CNT,0) AS succCntL
, L.SUCC_RT AS SUCC_RT_L , IFNULL(L1.SUCC_RT,0) AS succRtL
, M.SND_CNT AS SND_CNT_M , IFNULL(M1.SND_CNT,0) AS sndCntM
, M.SUCC_CNT AS SUCC_CNT_M , IFNULL(M1.SUCC_CNT,0) AS succCntM
, M.SUCC_RT AS SUCC_RT_M , IFNULL(M1.SUCC_RT,0) AS succRtM
, R.SND_CNT AS SND_CNT_R , IFNULL(A1.SND_CNT,0) AS sndCntR
, R.SUCC_CNT AS SUCC_CNT_R , IFNULL(A1.SUCC_CNT,0) AS succCntR
, R.SUCC_RT AS SUCC_RT_R , IFNULL(A1.SUCC_RT,0) AS succRtR
FROM FROM
hubez_common.EZ_DAY_STAT eds (SELECT
JOIN ( SUM(IFNULL(SND_CNT,0)) AS SND_CNT
,SUM(IFNULL(SUCC_CNT,0)) AS SUCC_CNT
,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS SUCC_RT
FROM
${HUBEZ_COMMON}.EZ_DAY_STAT
WHERE 1=1
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
) ecm1,
(
SELECT SELECT
SND_CNT SUM(IFNULL(SND_CNT,0)) AS SND_CNT
, SUCC_CNT ,SUM(IFNULL(SUCC_CNT,0)) AS SUCC_CNT
, SUCC_RT ,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS SUCC_RT
FROM FROM
hubez_common.EZ_DAY_STAT ${HUBEZ_COMMON}.EZ_DAY_STAT
WHERE WHERE 1=1
SND_CH_CD = 'SMS') AS S AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
JOIN ( AND SND_CH_CD = 'SMS'
) S1,
(
SELECT SELECT
SND_CNT SUM(IFNULL(SND_CNT,0)) AS SND_CNT
, SUCC_CNT ,SUM(IFNULL(SUCC_CNT,0)) AS SUCC_CNT
, SUCC_RT ,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS SUCC_RT
FROM FROM
hubez_common.EZ_DAY_STAT ${HUBEZ_COMMON}.EZ_DAY_STAT
WHERE WHERE 1=1
SND_CH_CD = 'MMS') AS M AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
JOIN ( AND SND_CH_CD = 'LMS'
) L1,
(
SELECT SELECT
SND_CNT SUM(IFNULL(SND_CNT,0)) AS SND_CNT
, SUCC_CNT ,SUM(IFNULL(SUCC_CNT,0)) AS SUCC_CNT
, SUCC_RT ,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS SUCC_RT
FROM FROM
hubez_common.EZ_DAY_STAT ${HUBEZ_COMMON}.EZ_DAY_STAT
WHERE WHERE 1=1
SND_CH_CD = 'LMS') AS L AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
JOIN ( AND SND_CH_CD = 'MMS'
) M1,
(
SELECT SELECT
SND_CNT SUM(IFNULL(SND_CNT,0)) AS SND_CNT
, SUCC_CNT ,SUM(IFNULL(SUCC_CNT,0)) AS SUCC_CNT
, SUCC_RT ,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100),2) AS SUCC_RT
FROM FROM
hubez_common.EZ_DAY_STAT ${HUBEZ_COMMON}.EZ_DAY_STAT
WHERE WHERE 1=1
SND_CH_CD = 'RCS') AS R AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
WHERE DATE_FORMAT(eds.SUM_YMD, '%Y%m%d') BETWEEN #{startDay} AND #{endDay} AND SND_CH_CD = 'ALIMTALK'
ORDER BY eds.SUM_YMD DESC ) A1
UNION ALL
SELECT
DATE_FORMAT(ecm.SUM_YMD, '%Y-%m-%d') AS sumYmd
, ecm.SND_CNT AS sndCnt
, ecm.SUCC_CNT AS succCnt
, ecm.SUCC_RT AS succRt
, S.SND_CNT AS sndCntS
, S.SUCC_CNT AS succCntS
, S.SUCC_RT AS succRtS
, L.SND_CNT AS sndCntL
, L.SUCC_CNT AS succCntL
, L.SUCC_RT AS succRtL
, M.SND_CNT AS sndCntM
, M.SUCC_CNT AS succCntM
, M.SUCC_RT AS succRtM
, A.SND_CNT AS sndCntR
, A.SUCC_CNT AS succCntR
, A.SUCC_RT AS succRtR
FROM
(SELECT
SUM_YMD
,SUM(IFNULL(SND_CNT,0)) AS SND_CNT
,SUM(IFNULL(SUCC_CNT,0)) AS SUCC_CNT
,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS SUCC_RT
FROM
${HUBEZ_COMMON}.EZ_DAY_STAT
WHERE 1=1
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
GROUP BY SUM_YMD ) ecm,
(SELECT
SUM_YMD
,SUM(IFNULL(SND_CNT,0)) AS SND_CNT
,SUM(IFNULL(SUCC_CNT,0)) AS SUCC_CNT
,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS SUCC_RT
FROM
${HUBEZ_COMMON}.EZ_DAY_STAT
WHERE 1=1
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
AND SND_CH_CD = 'SMS'
GROUP BY SUM_YMD ) S,
(SELECT
SUM_YMD
,SUM(IFNULL(SND_CNT,0)) AS SND_CNT
,SUM(IFNULL(SUCC_CNT,0)) AS SUCC_CNT
,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS SUCC_RT
FROM
${HUBEZ_COMMON}.EZ_DAY_STAT
WHERE 1=1
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
AND SND_CH_CD = 'LMS'
GROUP BY SUM_YMD ) L,
( SELECT
SUM_YMD
,SUM(IFNULL(SND_CNT,0)) AS SND_CNT
,SUM(IFNULL(SUCC_CNT,0)) AS SUCC_CNT
,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS SUCC_RT
FROM
${HUBEZ_COMMON}.EZ_DAY_STAT
WHERE 1=1
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
AND SND_CH_CD = 'MMS'
GROUP BY SUM_YMD ) M,
( SELECT
SUM_YMD
,SUM(IFNULL(SND_CNT,0)) AS SND_CNT
,SUM(IFNULL(SUCC_CNT,0)) AS SUCC_CNT
,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100),2) AS SUCC_RT
FROM
${HUBEZ_COMMON}.EZ_DAY_STAT
WHERE 1=1
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
AND SND_CH_CD = 'ALIMTALK'
GROUP BY SUM_YMD ) A
WHERE 1=1
AND ecm.SUM_YMD = S.SUM_YMD
AND ecm.SUM_YMD = L.SUM_YMD
AND ecm.SUM_YMD = M.SUM_YMD
AND ecm.SUM_YMD = A.SUM_YMD
) T
ORDER BY sumYmd DESC
</select> </select>
<select id="selectCustMstatList" parameterType="kr.co.uplus.ez.api.stats.dto.BsnmMonthListReqDto" resultType="kr.co.uplus.ez.api.stats.dto.BsnmMonthListResDto"> <select id="selectCustMstatListTotalCnt" parameterType="kr.co.uplus.ez.api.stats.dto.BsnmMonthList" resultType="int">
SELECT
COUNT(*) AS TOTALCNT
FROM
(SELECT
SUM_YM
,USER_SEQ
FROM ${HUBEZ_COMMON}.EZ_CUST_MSTAT
WHERE 1=1
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
<if test="custNm != null and custNm != ''">
AND CUST_NM LIKE CONCAT('%',#{custNm},'%')
</if>
<if test="bizrno != null and bizrno != ''">
AND BIZRNO LIKE CONCAT('%',#{bizrno},'%')
</if>
GROUP BY SUM_YM, USER_SEQ) A
</select>
<select id="selectCustMstatList" parameterType="kr.co.uplus.ez.api.stats.dto.BsnmMonthList" resultType="kr.co.uplus.ez.api.stats.dto.BsnmMonthList">
SELECT SELECT
ecm.SUM_YMD DATE_FORMAT(ecm.SUM_YM, '%Y-%m') AS sumYm
-- ,ecm.CUST_NM ,ecm.CUST_NM AS custNm
-- ,ecm.BIZRNO ,ecm.BIZRNO AS bizrno
, ecm.SND_CNT , ecm.SND_CNT AS sndCnt
, ecm.SUCC_CNT , ecm.SUCC_CNT AS succCnt
, ecm.SUCC_RT , ecm.SUCC_RT AS succRt
, S.SND_CNT AS SND_CNT_S , S.SND_CNT AS sndCntS
, S.SUCC_CNT AS SUCC_CNT_S , S.SUCC_CNT AS succCntS
, S.SUCC_RT AS SUCC_RT_S , S.SUCC_RT AS succRtS
, L.SND_CNT AS SND_CNT_L , L.SND_CNT AS sndCntL
, L.SUCC_CNT AS SUCC_CNT_L , L.SUCC_CNT AS succCntL
, L.SUCC_RT AS SUCC_RT_L , L.SUCC_RT AS succRtL
, M.SND_CNT AS SND_CNT_M , M.SND_CNT AS sndCntM
, M.SUCC_CNT AS SUCC_CNT_M , M.SUCC_CNT AS succCntM
, M.SUCC_RT AS SUCC_RT_M , M.SUCC_RT AS succRtM
, R.SND_CNT AS SND_CNT_R , A.SND_CNT AS sndCntR
, R.SUCC_CNT AS SUCC_CNT_R , A.SUCC_CNT AS succCntR
, R.SUCC_RT AS SUCC_RT_R , A.SUCC_RT AS succRtR
FROM FROM
hubez_common.EZ_CUST_MSTAT ecm (SELECT
JOIN ( SUM_YM
,USER_SEQ
,CUST_NM
,BIZRNO
,SUM(IFNULL(SND_CNT,0) + IFNULL(FBACK_CNT,0)) AS SND_CNT
,SUM(IFNULL(SUCC_CNT,0) + IFNULL(FBACK_SUCC_CNT,0)) AS SUCC_CNT
,ROUND((SUM(IFNULL(SUCC_CNT,0) + IFNULL(FBACK_SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0) + IFNULL(FBACK_CNT,0)) * 100), 2) AS SUCC_RT
FROM
${HUBEZ_COMMON}.EZ_CUST_MSTAT
WHERE 1=1
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
GROUP BY SUM_YM, USER_SEQ) ecm,
(SELECT
S1.SUM_YM
,S1.USER_SEQ
,SUM(IFNULL(S1.SND_CNT,0) + IFNULL(S2.FBACK_CNT,0)) AS SND_CNT
,SUM(IFNULL(S1.SUCC_CNT,0) + IFNULL(S2.FBACK_SUCC_CNT,0)) AS SUCC_CNT
,ROUND((SUM(IFNULL(S1.SUCC_CNT,0) + IFNULL(S2.FBACK_SUCC_CNT,0)) / SUM(IFNULL(S1.SND_CNT,0) + IFNULL(S2.FBACK_CNT,0)) * 100), 2) AS SUCC_RT
FROM
(SELECT
SUM_YM
,USER_SEQ
,SUM(SND_CNT) AS SND_CNT
,SUM(SUCC_CNT) AS SUCC_CNT
FROM
${HUBEZ_COMMON}.EZ_CUST_MSTAT
WHERE 1=1
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
AND SND_CH_CD = 'SMS'
GROUP BY SUM_YM, USER_SEQ) S1
LEFT OUTER JOIN
(SELECT
SUM_YM
,USER_SEQ
,SUM(FBACK_CNT) AS FBACK_CNT
,SUM(FBACK_SUCC_CNT) AS FBACK_SUCC_CNT
FROM
${HUBEZ_COMMON}.EZ_CUST_MSTAT
WHERE 1=1
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
AND SND_CH_CD = 'ALIMTALK'
AND RPLCSND_CH_CD = 'SMS'
GROUP BY SUM_YM, USER_SEQ) S2
ON S1.SUM_YM = S2.SUM_YM
AND S1.USER_SEQ = S2.USER_SEQ
GROUP BY S1.SUM_YM, S1.USER_SEQ ) S,
(SELECT
S1.SUM_YM
,S1.USER_SEQ
,SUM(IFNULL(S1.SND_CNT,0) + IFNULL(S2.FBACK_CNT,0)) AS SND_CNT
,SUM(IFNULL(S1.SUCC_CNT,0) + IFNULL(S2.FBACK_SUCC_CNT,0)) AS SUCC_CNT
,ROUND((SUM(IFNULL(S1.SUCC_CNT,0) + IFNULL(S2.FBACK_SUCC_CNT,0)) / SUM(IFNULL(S1.SND_CNT,0) + IFNULL(S2.FBACK_CNT,0)) * 100), 2) AS SUCC_RT
FROM
(SELECT
SUM_YM
,USER_SEQ
,SUM(SND_CNT) AS SND_CNT
,SUM(SUCC_CNT) AS SUCC_CNT
FROM
${HUBEZ_COMMON}.EZ_CUST_MSTAT
WHERE 1=1
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
AND SND_CH_CD = 'LMS'
GROUP BY SUM_YM, USER_SEQ) S1
LEFT OUTER JOIN
(SELECT
SUM_YM
,USER_SEQ
,SUM(FBACK_CNT) AS FBACK_CNT
,SUM(FBACK_SUCC_CNT) AS FBACK_SUCC_CNT
FROM
${HUBEZ_COMMON}.EZ_CUST_MSTAT
WHERE 1=1
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
AND SND_CH_CD = 'ALIMTALK'
AND RPLCSND_CH_CD = 'LMS'
GROUP BY SUM_YM, USER_SEQ) S2
ON S1.SUM_YM = S2.SUM_YM
AND S1.USER_SEQ = S2.USER_SEQ
GROUP BY S1.SUM_YM, S1.USER_SEQ ) L,
( SELECT
S1.SUM_YM
,S1.USER_SEQ
,SUM(IFNULL(S1.SND_CNT,0) + IFNULL(S2.FBACK_CNT,0)) AS SND_CNT
,SUM(IFNULL(S1.SUCC_CNT,0) + IFNULL(S2.FBACK_SUCC_CNT,0)) AS SUCC_CNT
,ROUND((SUM(IFNULL(S1.SUCC_CNT,0) + IFNULL(S2.FBACK_SUCC_CNT,0)) / SUM(IFNULL(S1.SND_CNT,0) + IFNULL(S2.FBACK_CNT,0)) * 100), 2) AS SUCC_RT
FROM
(SELECT
SUM_YM
,USER_SEQ
,SUM(SND_CNT) AS SND_CNT
,SUM(SUCC_CNT) AS SUCC_CNT
FROM
${HUBEZ_COMMON}.EZ_CUST_MSTAT
WHERE 1=1
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
AND SND_CH_CD = 'MMS'
GROUP BY SUM_YM, USER_SEQ) S1
LEFT OUTER JOIN
(SELECT
SUM_YM
,USER_SEQ
,SUM(FBACK_CNT) AS FBACK_CNT
,SUM(FBACK_SUCC_CNT) AS FBACK_SUCC_CNT
FROM
${HUBEZ_COMMON}.EZ_CUST_MSTAT
WHERE 1=1
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
AND SND_CH_CD = 'ALIMTALK'
AND RPLCSND_CH_CD = 'MMS'
GROUP BY SUM_YM, USER_SEQ) S2
ON S1.SUM_YM = S2.SUM_YM
AND S1.USER_SEQ = S2.USER_SEQ
GROUP BY S1.SUM_YM, S1.USER_SEQ ) M,
( SELECT
SUM_YM
,USER_SEQ
,SUM(IFNULL(SND_CNT,0)) AS SND_CNT
,SUM(IFNULL(SUCC_CNT,0)) AS SUCC_CNT
,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100),2) AS SUCC_RT
FROM
${HUBEZ_COMMON}.EZ_CUST_MSTAT
WHERE 1=1
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
AND SND_CH_CD = 'ALIMTALK'
GROUP BY SUM_YM, USER_SEQ ) A
WHERE 1=1
AND ecm.SUM_YM = S.SUM_YM
AND ecm.SUM_YM = L.SUM_YM
AND ecm.SUM_YM = M.SUM_YM
AND ecm.SUM_YM = A.SUM_YM
AND ecm.USER_SEQ = S.USER_SEQ
AND ecm.USER_SEQ = L.USER_SEQ
AND ecm.USER_SEQ = M.USER_SEQ
AND ecm.USER_SEQ = A.USER_SEQ
<if test="custNm != null and custNm != ''">
AND ecm.CUST_NM LIKE CONCAT('%',#{custNm},'%')
</if>
<if test="bizrno != null and bizrno != ''">
AND ecm.BIZRNO LIKE CONCAT('%',#{bizrno},'%')
</if>
ORDER BY ecm.SUM_YM, ecm.USER_SEQ DESC
LIMIT #{page}, #{pagePerRows}
</select>
<select id="selectCustDstatListTotalCnt" parameterType="kr.co.uplus.ez.api.stats.dto.BsnmDayListReqDto" resultType="int">
SELECT SELECT
SND_CNT COUNT(*) AS TOTALCNT
, SUCC_CNT
, SUCC_RT
FROM FROM
hubez_common.EZ_CUST_MSTAT (SELECT
WHERE SUM_YMD
SND_CH_CD = 'SMS') AS S ,USER_SEQ
JOIN ( ,CUST_NM
SELECT ,BIZRNO
SND_CNT ,SUM(IFNULL(SND_CNT,0) + IFNULL(FBACK_CNT,0)) AS SND_CNT
, SUCC_CNT ,SUM(IFNULL(SUCC_CNT,0) + IFNULL(FBACK_SUCC_CNT,0)) AS SUCC_CNT
, SUCC_RT ,ROUND((SUM(IFNULL(SUCC_CNT,0) + IFNULL(FBACK_SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0) + IFNULL(FBACK_CNT,0)) * 100), 2) AS SUCC_RT
FROM FROM
hubez_common.EZ_CUST_MSTAT ${HUBEZ_COMMON}.EZ_CUST_DSTAT
WHERE WHERE 1=1
SND_CH_CD = 'MMS') AS M AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
JOIN ( <if test="custNm != null and custNm != ''">
SELECT AND CUST_NM LIKE CONCAT('%',#{custNm},'%')
SND_CNT </if>
, SUCC_CNT <if test="bizrno != null and bizrno != ''">
, SUCC_RT AND BIZRNO LIKE CONCAT('%',#{bizrno},'%')
FROM </if>
hubez_common.EZ_CUST_MSTAT GROUP BY SUM_YMD, USER_SEQ) A
WHERE
SND_CH_CD = 'LMS') AS L
JOIN (
SELECT
SND_CNT
, SUCC_CNT
, SUCC_RT
FROM
hubez_common.EZ_CUST_MSTAT
WHERE
SND_CH_CD = 'RCS') AS R
WHERE 1 = 1
AND DATE_FORMAT(ecm.SUM_YM, '%Y%m') BETWEEN #{startMon} AND #{endMon}
# AND ecm.CUST_NM LIKE ''
# AND ecm.BIZRNO = #{bizrno}
ORDER BY ecm.SUM_YM DESC
</select> </select>
<select id="selectCustDstatList" parameterType="kr.co.uplus.ez.api.stats.dto.BsnmDayListReqDto" resultType="kr.co.uplus.ez.api.stats.dto.BsnmDayList"> <select id="selectCustDstatList" parameterType="kr.co.uplus.ez.api.stats.dto.BsnmDayListReqDto" resultType="kr.co.uplus.ez.api.stats.dto.BsnmDayList">
SELECT SELECT
ecd.SUM_YMD DATE_FORMAT(ecd.SUM_YMD, '%Y-%m-%d') AS SUM_YMD
-- ,ecd.CUST_NM ,ecd.CUST_NM
-- ,ecd.BIZRNO ,ecd.BIZRNO
, ecd.SND_CNT , ecd.SND_CNT
, ecd.SUCC_CNT , ecd.SUCC_CNT
, ecd.SUCC_RT , ecd.SUCC_RT
@@ -209,49 +543,153 @@
, M.SND_CNT AS SND_CNT_M , M.SND_CNT AS SND_CNT_M
, M.SUCC_CNT AS SUCC_CNT_M , M.SUCC_CNT AS SUCC_CNT_M
, M.SUCC_RT AS SUCC_RT_M , M.SUCC_RT AS SUCC_RT_M
, R.SND_CNT AS SND_CNT_R , A.SND_CNT AS SND_CNT_R
, R.SUCC_CNT AS SUCC_CNT_R , A.SUCC_CNT AS SUCC_CNT_R
, R.SUCC_RT AS SUCC_RT_R , A.SUCC_RT AS SUCC_RT_R
FROM FROM
hubez_common.EZ_CUST_DSTAT ecd (SELECT
JOIN ( SUM_YMD
SELECT ,USER_SEQ
SND_CNT ,CUST_NM
, SUCC_CNT ,BIZRNO
, SUCC_RT ,SUM(IFNULL(SND_CNT,0) + IFNULL(FBACK_CNT,0)) AS SND_CNT
,SUM(IFNULL(SUCC_CNT,0) + IFNULL(FBACK_SUCC_CNT,0)) AS SUCC_CNT
,ROUND((SUM(IFNULL(SUCC_CNT,0) + IFNULL(FBACK_SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0) + IFNULL(FBACK_CNT,0)) * 100), 2) AS SUCC_RT
FROM FROM
hubez_common.EZ_CUST_DSTAT ${HUBEZ_COMMON}.EZ_CUST_DSTAT
WHERE WHERE 1=1
SND_CH_CD = 'SMS') AS S AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
JOIN ( GROUP BY SUM_YMD, USER_SEQ) ecd,
SELECT (SELECT
SND_CNT S1.SUM_YMD
, SUCC_CNT ,S1.USER_SEQ
, SUCC_RT ,SUM(IFNULL(S1.SND_CNT,0) + IFNULL(S2.FBACK_CNT,0)) AS SND_CNT
,SUM(IFNULL(S1.SUCC_CNT,0) + IFNULL(S2.FBACK_SUCC_CNT,0)) AS SUCC_CNT
,ROUND((SUM(IFNULL(S1.SUCC_CNT,0) + IFNULL(S2.FBACK_SUCC_CNT,0)) / SUM(IFNULL(S1.SND_CNT,0) + IFNULL(S2.FBACK_CNT,0)) * 100), 2) AS SUCC_RT
FROM FROM
hubez_common.EZ_CUST_DSTAT (SELECT
WHERE SUM_YMD
SND_CH_CD = 'MMS') AS M ,USER_SEQ
JOIN ( ,SUM(SND_CNT) AS SND_CNT
SELECT ,SUM(SUCC_CNT) AS SUCC_CNT
SND_CNT
, SUCC_CNT
, SUCC_RT
FROM FROM
hubez_common.EZ_CUST_DSTAT ${HUBEZ_COMMON}.EZ_CUST_DSTAT
WHERE WHERE 1=1
SND_CH_CD = 'LMS') AS L AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
JOIN ( AND SND_CH_CD = 'SMS'
SELECT GROUP BY SUM_YMD, USER_SEQ) S1
SND_CNT LEFT OUTER JOIN
, SUCC_CNT (SELECT
, SUCC_RT SUM_YMD
,USER_SEQ
,SUM(FBACK_CNT) AS FBACK_CNT
,SUM(FBACK_SUCC_CNT) AS FBACK_SUCC_CNT
FROM FROM
hubez_common.EZ_CUST_DSTAT ${HUBEZ_COMMON}.EZ_CUST_DSTAT
WHERE WHERE 1=1
SND_CH_CD = 'RCS') AS R AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
WHERE AND SND_CH_CD = 'ALIMTALK'
DATE_FORMAT(ecd.SUM_YMD, '%Y%m%d') BETWEEN #{startDay} AND #{endDay} AND RPLCSND_CH_CD = 'SMS'
ORDER BY ecd.SUM_YMD DESC GROUP BY SUM_YMD, USER_SEQ) S2
ON S1.SUM_YMD = S2.SUM_YMD
AND S1.USER_SEQ = S2.USER_SEQ
GROUP BY S1.SUM_YMD, S1.USER_SEQ ) S,
(SELECT
S1.SUM_YMD
,S1.USER_SEQ
,SUM(IFNULL(S1.SND_CNT,0) + IFNULL(S2.FBACK_CNT,0)) AS SND_CNT
,SUM(IFNULL(S1.SUCC_CNT,0) + IFNULL(S2.FBACK_SUCC_CNT,0)) AS SUCC_CNT
,ROUND((SUM(IFNULL(S1.SUCC_CNT,0) + IFNULL(S2.FBACK_SUCC_CNT,0)) / SUM(IFNULL(S1.SND_CNT,0) + IFNULL(S2.FBACK_CNT,0)) * 100), 2) AS SUCC_RT
FROM
(SELECT
SUM_YMD
,USER_SEQ
,SUM(SND_CNT) AS SND_CNT
,SUM(SUCC_CNT) AS SUCC_CNT
FROM
${HUBEZ_COMMON}.EZ_CUST_DSTAT
WHERE 1=1
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
AND SND_CH_CD = 'LMS'
GROUP BY SUM_YMD, USER_SEQ) S1
LEFT OUTER JOIN
(SELECT
SUM_YMD
,USER_SEQ
,SUM(FBACK_CNT) AS FBACK_CNT
,SUM(FBACK_SUCC_CNT) AS FBACK_SUCC_CNT
FROM
${HUBEZ_COMMON}.EZ_CUST_DSTAT
WHERE 1=1
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
AND SND_CH_CD = 'ALIMTALK'
AND RPLCSND_CH_CD = 'LMS'
GROUP BY SUM_YMD, USER_SEQ) S2
ON S1.SUM_YMD = S2.SUM_YMD
AND S1.USER_SEQ = S2.USER_SEQ
GROUP BY S1.SUM_YMD, S1.USER_SEQ ) L,
( SELECT
S1.SUM_YMD
,S1.USER_SEQ
,SUM(IFNULL(S1.SND_CNT,0) + IFNULL(S2.FBACK_CNT,0)) AS SND_CNT
,SUM(IFNULL(S1.SUCC_CNT,0) + IFNULL(S2.FBACK_SUCC_CNT,0)) AS SUCC_CNT
,ROUND((SUM(IFNULL(S1.SUCC_CNT,0) + IFNULL(S2.FBACK_SUCC_CNT,0)) / SUM(IFNULL(S1.SND_CNT,0) + IFNULL(S2.FBACK_CNT,0)) * 100), 2) AS SUCC_RT
FROM
(SELECT
SUM_YMD
,USER_SEQ
,SUM(SND_CNT) AS SND_CNT
,SUM(SUCC_CNT) AS SUCC_CNT
FROM
${HUBEZ_COMMON}.EZ_CUST_DSTAT
WHERE 1=1
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
AND SND_CH_CD = 'MMS'
GROUP BY SUM_YMD, USER_SEQ) S1
LEFT OUTER JOIN
(SELECT
SUM_YMD
,USER_SEQ
,SUM(FBACK_CNT) AS FBACK_CNT
,SUM(FBACK_SUCC_CNT) AS FBACK_SUCC_CNT
FROM
${HUBEZ_COMMON}.EZ_CUST_DSTAT
WHERE 1=1
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
AND SND_CH_CD = 'ALIMTALK'
AND RPLCSND_CH_CD = 'MMS'
GROUP BY SUM_YMD, USER_SEQ) S2
ON S1.SUM_YMD = S2.SUM_YMD
AND S1.USER_SEQ = S2.USER_SEQ
GROUP BY S1.SUM_YMD, S1.USER_SEQ ) M,
( SELECT
SUM_YMD
,USER_SEQ
,SUM(IFNULL(SND_CNT,0)) AS SND_CNT
,SUM(IFNULL(SUCC_CNT,0)) AS SUCC_CNT
,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100),2) AS SUCC_RT
FROM
${HUBEZ_COMMON}.EZ_CUST_DSTAT
WHERE 1=1
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
AND SND_CH_CD = 'ALIMTALK'
GROUP BY SUM_YMD, USER_SEQ ) A
WHERE 1=1
AND ecd.SUM_YMD = S.SUM_YMD
AND ecd.SUM_YMD = L.SUM_YMD
AND ecd.SUM_YMD = M.SUM_YMD
AND ecd.SUM_YMD = A.SUM_YMD
AND ecd.USER_SEQ = S.USER_SEQ
AND ecd.USER_SEQ = L.USER_SEQ
AND ecd.USER_SEQ = M.USER_SEQ
AND ecd.USER_SEQ = A.USER_SEQ
<if test="custNm != null and custNm != ''">
AND ecd.CUST_NM LIKE CONCAT('%',#{custNm},'%')
</if>
<if test="bizrno != null and bizrno != ''">
AND ecd.BIZRNO LIKE CONCAT('%',#{bizrno},'%')
</if>
ORDER BY ecd.SUM_YMD, ecd.USER_SEQ DESC
LIMIT #{page}, #{pagePerRows}
</select> </select>
</mapper> </mapper>