로그인 및 메인 화면 수정 변경

This commit is contained in:
kimre
2022-07-10 20:53:26 +09:00
parent b2ff509948
commit fb40f49f09
61 changed files with 3660 additions and 1174 deletions

View File

@@ -4,7 +4,7 @@
<!-- 선택한 메뉴 li.is-current -->
<li v-for="child in menuList" :key="child.menuNo" :class="child.classNm">
<div class="menu_btn" ></div>
<a href="javascript:void(0);" class="menu_target" @click="actionMenu" :data-menu-no="child.menuNo">{{child.menuNm}}</a>
<a class="menu_target" @click="actionMenu" :data-menu-no="child.menuNo">{{child.menuNm}}</a>
<div class="sub_menu_wrap">
<ul class="sub_menu" v-if="child.children.length > 0">
<li v-for="child2 in child.children" :key="child2.menuNo">

View File

@@ -220,8 +220,6 @@ export default {
AdminNmPop,
},
created(){
this.$store.commit("login/isLogin", true);
this.$store.commit("login/isAuthChk", true);
console.log(this.$route.params.userSeq);
this.loginId = this.$route.params.loginId;
this.getExcelHeader();

View File

@@ -230,13 +230,14 @@ export default {
vuejsDatepicker,
},
created(){
this.$store.commit("login/isLogin", true);
this.$store.commit("login/isAuthChk", true);
this.setCodeData();
this.getExcelHeader();
this.setPeriodDay(0);
this.grid.params.subsSttusCd = '';
},
destroyed() {
this.grid.params.subsSttusCd = '';
},
mounted() {

View File

@@ -0,0 +1,34 @@
import httpClient from '@/common/http-client';
import calcListExcelHeader from './mock/calcExcelHeader.json';
// 공통 코드.
const getCommCode = (params) => {
return httpClient.post('/api/v1/bo/comm/getCode', params, { withCredentials: false });
}
// 엑셀다운로드 목록 조회
const calcListExcel = (params) => {
return httpClient.post('/api/v1/bo/calculate/calcListExcel', params);
}
const getExcelHeader = category => {
// 엑셀에 출력할 Header 정보를 Mockup 데이터로 관리한다.
return new Promise(function(resolve, reject) {
let header = [];
switch (category) {
case 'CALC':
header = calcListExcelHeader.header;
break;
default:
header = '';
break;
}
resolve(header);
});
};
export default {
getCommCode,
getExcelHeader,
calcListExcel,
}

View File

@@ -0,0 +1,80 @@
{
"header": [
[
{
"key": "useYm",
"name": "날짜",
"rowspan": 2
},
{
"key": "custNm",
"name": "고객사명",
"rowspan": 2
},
{
"key": "bizrno",
"name": "사업자번호",
"rowspan": 2
},
{
"key": "prodNm",
"name": "요금제",
"rowspan": 2
},
{
"key": "startAmt",
"name": "시작금액",
"rowspan": 2
},
{
"key": "useAmt",
"name": "사용금액",
"rowspan": 2
},
{
"key": "cfwdAmt",
"name": "이월금액",
"rowspan": 2
},
{
"key": "mrtUseAmt",
"name": "종량금액",
"rowspan": 2
},
{
"key": "extncAmt",
"name": "소멸금액",
"rowspan": 2
},
{
"key": "billingAmt",
"name": "청구금액",
"rowspan": 2
},
{
"name": "채널별 발송 건수",
"colspan": 5
}
],
[{
"key": "totalSndCnt",
"name": "전체"
},
{
"key": "smsSndCnt",
"name": "SMS"
},
{
"key": "lmsSndCnt",
"name": "LMS"
},
{
"key": "mmsSndCnt",
"name": "MMS"
},
{
"key": "atlkSndCnt",
"name": "알림톡"
}]
]
}

View File

@@ -63,7 +63,7 @@
</div>
</div>
<div class="button_group">
<button type="button" class="button blue download">엑셀 다운로드</button>
<button type="button" class="button blue download" @click="excelDown();">엑셀 다운로드</button>
</div>
</div>
@@ -93,15 +93,14 @@
<script>
import customGrid from '@/components/CustomGrid';
//import { utils_mixin, chkPattern2 } from '../service/mixins';
import moment from "moment";
import xlsx from '@/common/excel';
import lodash from 'lodash';
import commonModal from "@/components/modal/commonModal";
import calcMgtApi from "@/modules/calculate/service/calcMgtApi";
export default {
name: 'calcList',
//mixins: [utils_mixin, chkPattern2],
data() {
return {
// 달력 데이터
@@ -121,7 +120,7 @@ export default {
list:[],
totalCnt: '',
pageType: 'SUBS',
pageType: 'CALC',
// 테이블 리스트 데이터
perPageCnt: 50,
@@ -256,6 +255,7 @@ export default {
created(){
this.setPeriodDay(0);
this.gridParamSet();
this.getExcelHeader();
},
destroyed() {
@@ -397,7 +397,60 @@ export default {
}
console.log("gridParamSet()-startMonth : "+ this.grid.params.startMonth);
},
getExcelHeader() {
// 헤더를 mockup으로 관리한다.
calcMgtApi.getExcelHeader(this.pageType).then(res => {
this.excelHeader = res;
});
},
async excelDown() {
if (this.$refs.table.getData().length <= 0) {
this.row.title = '정산이력';
this.row.msg1 = '조회된 데이터가 없습니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
let today = moment().format('YYYYMMDDHHmmss');
const saveFileName = `정산이력_${today}.xlsx`;
const data = await this.getExcelDataDown();
let options = {
header: this.excelHeader,
dataOrder: 'header'
};
// console.log(data);
xlsx.export(data.list, saveFileName, options).then(() => {});
},
async getExcelDataDown() {
try {
let response;
// params: {
// startMonth: '',
// endMonth: '',
// },
// const params = {
// startDt: this.grid.params.startDt,
// endDt: this.grid.params.endDt,
// searchType1: this.grid.params.searchType1,
// searchType2: this.grid.params.searchType2,
// searchType3: this.grid.params.searchType3,
// searchText1: this.grid.params.searchText1
// };
response = await calcMgtApi.calcListExcel(this.grid.params);
const result = response.data;
if (result != null && result.retCode == "0000") {
return result.data;
}else{
return false;
}
} catch (err) {
return false;
}
},
}
};
</script>

View File

@@ -1,26 +1,22 @@
<template>
<div>
<div class="dimmed modal26" @click="ModalClose();"></div>
<div class="popup-wrap modal26">
<div class="popup modal26">
<div class="pop-head">
<div class="pop-head modal26">
<h3 class="pop-tit">관리자명 조회</h3>
</div>
<div class="pop-cont-detail input_box">
<!-- <div class="pop-cont-detail">-->
<div class="pop-cont-detail">
<label>ID</label>
<div class="input_search">
<input class="search-box" type="text" placeholder="아이디 입력" v-model.trim="madangId" ref="madangId">
<button type="button" class="button grey" @click="searchMadangId()">조회</button>
<button type="button" class="button btn-p2color" @click="searchMadangId()">조회</button>
</div>
</div>
<div class="pop-btn2">
<div class="popup-btn2">
<button class="btn-pcolor">확인</button>
<button class="btn-default" @click="ModalClose();">취소</button>
</div>
</div>
<search-id-popup ref="searchIdPopModal"> </search-id-popup>
<common-modal ref="commmonModal"></common-modal>

View File

@@ -2,8 +2,7 @@
<div>
<div class="dimmed modal25" onClick="ModalClose();"></div>
<div class="popup-wrap modal25">
<!-- 이월금액 상세내역 -->
<div class="popup modal25 popup_form price">
<div class="pop-head">
<h3 class="pop-tit">이월금액 상세내역</h3>
@@ -13,7 +12,6 @@
<p>최근 3개월 내역을 확인할 있습니다.</p>
</div>
</div>
<form autocomplete="off">
<table class="table-r">
<thead>
<tr>
@@ -37,16 +35,12 @@
</tr>
</tbody>
</table>
</form>
<div class="pop-btn2">
<button class="btn-default" @click="carryOverListPopClose();">닫기</button>
<div class="popup-btn2">
<button class="btn-pcolor download" @click="excelDown();">엑셀 다운로드</button>
<button class="btn-default" @click="carryOverListPopClose();">닫기</button>
</div>
</div>
<common-modal ref="commmonModal"></common-modal>
</div>
</div>
</template>
@@ -137,8 +131,8 @@ export default {
}
</script>
<style>
.popup-btn-wrap {width: 500px; margin: auto; padding: 100px 0;}
.popup-btn-wrap button {width: 100%; margin-bottom: 10px; height: 50px; border-radius: 5px; box-shadow: none; border: 1px solid #000; }
.popup-btn-wrap button:hover {background: #000; color: #fff;}
</style>
<!--<style>-->
<!-- .popup-btn-wrap {width: 500px; margin: auto; padding: 100px 0;}-->
<!-- .popup-btn-wrap button {width: 100%; margin-bottom: 10px; height: 50px; border-radius: 5px; box-shadow: none; border: 1px solid #000; }-->
<!-- .popup-btn-wrap button:hover {background: #000; color: #fff;}-->
<!--</style>-->

View File

@@ -1,6 +1,6 @@
<template>
<MainSlot ref="mainSlot">
<template #list="slotProps">
<template>
<div class="info">
<div class="count">사용자ID 정보
<p>( 최대 100개까지 등록 가능 )</p>

View File

@@ -70,7 +70,8 @@ import custMgtApi from "../service/custMgtApi.js";
import { utils_mixin, chkPattern2 } from '../service/mixins';
import ValidationConfirmPop from '../components/ValidationConfirmPop.vue';
import lodash from "lodash";
import commonModal from "@/components/modal/commonModal";
//import commonModal from "@/components/modal/commonModal";
import commonModal from "../components/commonModal";
export default {
name: "memberModifyPop",
@@ -194,23 +195,23 @@ export default {
if(this.isNull(this.userPwd2)){
this.row.title = '청약고객관리';
this.row.msg1 = '비밀번호 확인을 입력해 주세요.';
this.row.focusTaget = '2';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._pwd2.focus();
return false;
}
if(!lodash.isEqual(this.userPwd1, this.userPwd2)){
this.row.title = '청약고객관리';
this.row.msg1 = '비밀번호가 일치하지 않습니다.';
this.row.focusTaget = '2';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._pwd2.focus();
return false;
}
const pwdLen = this.bytes(this.userPwd1);
if(!(pwdLen >= 8 && pwdLen <= 16)){
this.row.title = '청약고객관리';
this.row.msg1 = '비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.';
this.row.focusTaget = '1';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._pwd1.focus();
return false;
}
const pEng = /[A-Za-z]/g; // 영문자
@@ -219,8 +220,8 @@ export default {
if(!(pEng.test(this.userPwd1) && pNum.test(this.userPwd1) && pSpc.test(this.userPwd1))) {
this.row.title = '청약고객관리';
this.row.msg1 = '비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.';
this.row.focusTaget = '1';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._pwd1.focus();
return false;
}
@@ -233,43 +234,45 @@ export default {
}
}
if(this.isNull(this.userPwd1) && !this.isNull(this.userPwd2)){
this.row.title = '청약고객관리';
this.row.msg1 = '비밀번호를 입력해 주세요.';
this.row.focusTaget = '1';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
if(this.isNull(this.userNm)){
this.row.title = '청약고객관리';
this.row.msg1 = '이름을 입력해 주세요.';
this.row.focusTaget = '3';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._userNm.focus();
return false;
}
if(this.isNull(this.email)){
this.row.title = '청약고객관리';
this.row.msg1 = '이메일을 입력해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._email.focus();
return false;
}
const email = this.email;
if(!this.isNull(email) && !lodash.isEqual(email,'@') && !this.emailCheck(email)){
// alert("이메일 형식이 잘못되었습니다. 확인해 주세요");
// this.$refs._email.focus();
this.$refs.validationConfirmPopModal.validationEmailOpen();
return false;
}
if(this.isNull(this.mdn)){
this.row.title = '청약고객관리';
this.row.msg1 = '휴대폰번호를 입력해주세요.';
this.row.focusTaget = '4';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._phone.focus();
return false;
}
const hp = this.mdn;
if(!this.isNull(hp) && !this.isMobile(hp)){
//alert("휴대폰 번호 형식이 잘못되었습니다. 확인해 주세요");
//this.$refs._phone.focus();
this.$refs.validationConfirmPopModal.validationPhonenumberOpen();
return false;
}
if(this.isNull(this.email)){
this.row.title = '청약고객관리';
this.row.msg1 = '이메일을 입력해주세요.';
this.row.focusTaget = '5';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
const email = this.email;
if(!this.isNull(email) && !lodash.isEqual(email,'@') && !this.emailCheck(email)){
this.$refs.validationConfirmPopModal.validationEmailOpen();
return false;
}
@@ -283,13 +286,24 @@ export default {
return true;
},
checkPhoneFocus(){
//this.mdn = '';
this.$refs._phone.focus();
},
checkEmailFocus(){
//this.email = '';
this.$refs._email.focus();
},
checkFocus(){
if(this.row.focusTaget === '1'){
this.$refs._pwd1.focus();
} else if(this.row.focusTaget === '2'){
this.$refs._pwd2.focus();
} else if(this.row.focusTaget === '3'){
this.$refs._userNm.focus();
} else if(this.row.focusTaget === '4'){
this.$refs._phone.focus();
} else if(this.row.focusTaget === '5'){
this.$refs._email.focus();
}
},
}
}

View File

@@ -61,7 +61,8 @@ import custMgtApi from "../service/custMgtApi.js";
import { utils_mixin, chkPattern2 } from '../service/mixins';
import ValidationConfirmPop from '../components/ValidationConfirmPop.vue';
import lodash from "lodash";
import commonModal from "@/components/modal/commonModal";
//import commonModal from "@/components/modal/commonModal";
import commonModal from "../components/commonModal";
export default {
name: "memberRegPop",
@@ -82,7 +83,7 @@ export default {
//props: ['sendData'],
created(){
// this.setAuthData();
// this.formReset();
this.formReset();
},
data(){
return{
@@ -93,7 +94,7 @@ export default {
mdn:'',
email:'',
auth:'',
stat: "",
stat: "01",
userId:"",
userNm:"",
code:"",
@@ -156,7 +157,7 @@ export default {
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
//this.formReset();
this.formReset();
},
toComplete(){
this.row.serviceId = this.adminId;
@@ -169,11 +170,11 @@ export default {
this.authType = response.data.data.list;
});
},
// formReset(){
// var targetAdminId = this.adminId;
// Object.assign(this.$data, this.$options.data());
// this.adminId = targetAdminId;
// },
formReset(){
var targetAdminId = this.adminId;
Object.assign(this.$data, this.$options.data());
this.adminId = targetAdminId;
},
doValidate(){
if(this.userTotalCnt >= 100){
// 사용자등록제한_최대100개까지
@@ -182,48 +183,46 @@ export default {
}
if(this.isNull(this.userId)){
this.$refs._userId.focus();
this.row.title = '청약고객관리';
this.row.msg1 = 'ID를 입력해 주세요.';
this.row.focusTaget = '1';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._userId.focus();
return false;
}
if(this.isNull(this.userNm)){
this.row.title = '청약고객관리';
this.row.msg1 = '이름을 입력해 주세요.';
this.row.focusTaget = '2';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._userNm.focus();
return false;
}
if(this.isNull(this.email)){
this.row.title = '청약고객관리';
this.row.msg1 = '이메일을 입력해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._email.focus();
return false;
}
const email = this.email;
if(!this.isNull(email) && !lodash.isEqual(email,'@') && !this.emailCheck(email)){
this.$refs.validationConfirmPopModal.validationEmailOpen();
return false;
}
if(this.isNull(this.mdn)){
this.row.title = '청약고객관리';
this.row.msg1 = '휴대폰번호를 입력해주세요.';
this.row.focusTaget = '3';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._phone.focus();
return false;
}
const hp = this.mdn;
if(!this.isNull(hp) && !this.isMobile(hp)){
this.row.focusTaget = '3';
this.$refs.validationConfirmPopModal.validationPhonenumberOpen();
return false;
}
if(this.isNull(this.email)){
this.row.title = '청약고객관리';
this.row.msg1 = '이메일을 입력해주세요.';
this.row.focusTaget = '4';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
const email = this.email;
if(!this.isNull(email) && !lodash.isEqual(email,'@') && !this.emailCheck(email)){
this.$refs.validationConfirmPopModal.validationEmailOpen();
return false;
}
@@ -236,19 +235,26 @@ export default {
return true;
},
checkFocus(){
if(this.row.focusTaget === '1'){
this.$refs._userId.focus();
} else if(this.row.focusTaget === '2'){
this.$refs._userNm.focus();
} else if(this.row.focusTaget === '3'){
this.$refs._phone.focus();
} else if(this.row.focusTaget === '4'){
this.$refs._email.focus();
}
},
checkPhoneFocus(){
//this.mdn = '';
this.$refs._phone.focus();
},
checkEmailFocus(){
//this.email = '';
this.$refs._email.focus();
},
checkIdDupFocus(){
//this.email = '';
this.$refs._userId.focus();
},
}
}
</script>

View File

@@ -4,7 +4,6 @@
<!-- s: 팝업 -->
<!-- 관리자명 조회 실패시 -->
<div class="dimmed modal27" @click="searchIdFailModalClose();"></div>
<div class="popup-wrap modal27">
<div class="popup modal27">
<div class="pop-head">
<h3 class="pop-tit">관리자명 조회</h3>
@@ -12,15 +11,13 @@
<div class="pop-cont">
<p>입력하신 마당 ID를 조회할 없습니다.</p>
</div>
<div class="pop-btn1">
<div class="popup-btn1">
<button class="btn-pcolor" @click="searchIdFailModalClose();">확인</button>
</div>
</div>
</div>
<!-- 관리자 ID 조회 -->
<div class="dimmed modal28" @click="searchIdModalCancelClose();"></div>
<div class="popup-wrap modal28">
<div class="popup modal28">
<div class="pop-head">
<h3 class="pop-tit">관리자 ID 조회</h3>
@@ -35,7 +32,7 @@
<li>이름 : {{name}}</li>
<li>대리점명 : {{agencyNm}}</li>
</ul>
<div class="pop-btn2">
<div class="popup-btn2">
<button class="btn-pcolor" @click="searchIdModalOkClose();">확인</button>
<button class="btn-default" @click="searchIdModalCancelClose();">취소</button>
</div>

View File

@@ -434,8 +434,8 @@ export default {
}
</script>
<style>
<!-- <style>
.popup-btn-wrap {width: 500px; margin: auto; padding: 100px 0;}
.popup-btn-wrap button {width: 100%; margin-bottom: 10px; height: 50px; border-radius: 5px; box-shadow: none; border: 1px solid #000; }
.popup-btn-wrap button:hover {background: #000; color: #fff;}
</style>
</style> -->

View File

@@ -0,0 +1,188 @@
<template>
<!-- <div class="wrap bg-wrap"> -->
<div>
<div class="dimmed alertModal" @click="alertModalCancel();"></div>
<div class="popup-wrap alertModal">
<!-- 로그인실패: 확인 -->
<div class="popup alertModal">
<div class="pop-head">
<h3 class="pop-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-btn1">
<button class="btn-pcolor" @click="alertModalClose();">확인</button>
</div>
</div>
</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>{{ 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="confirmModalClose();">확인</button>
<button class="btn-default" @click="confirmModalCancel();">취소</button>
</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>
</template>
<script>
export default {
name: "confirm",
data(){
return{
row:{},
title:'',
msg1: '',
msg2: '',
msg3: '',
msg4: '',
targetFocus: '',
}
},
methods :{
alertModalOpen(props){
console.log('>>>>>>>>>> alertModalOpen');
console.log(props.msg1);
this.title = props.title;
this.msg1 = props.msg1;
this.msg2 = props.msg2;
this.msg3 = props.msg3;
this.msg4 = props.msg4;
var dimmed = document.getElementsByClassName('alertModal');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'block';
}
},
alertModalClose(){
var dimmed = document.getElementsByClassName('alertModal');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
this.$parent.checkFocus();
},
alertModalCancel(){
var dimmed = document.getElementsByClassName('alertModal');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
this.$parent.checkFocus();
},
// 모달 오픈
confirmModalOpen(props){
var dimmed = document.getElementsByClassName('confirm');
for(var i = 0; i < dimmed.length; i++){
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.msg1 = props.msg1;
this.msg2 = props.msg2;
this.msg3 = props.msg3;
this.msg4 = props.msg4;
},
// 모달 끄기(ok)
confirmModalClose(){
var dimmed = document.getElementsByClassName('confirm');
for(var i = 0; i < dimmed.length; i++){
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.$parent.confirmCalbackFnc(this.row);
},
// 모달 끄기(취소)
confirmModalCancel(){
var dimmed = document.getElementsByClassName('confirm');
for(var i = 0; i < dimmed.length; i++){
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.$parent.confirmCalbackFnc(this.row);
},
}
}
</script>
<!--
<style>
.popup-btn-wrap {width: 500px; margin: auto; padding: 100px 0;}
.popup-btn-wrap button {width: 100%; margin-bottom: 10px; height: 50px; border-radius: 5px; box-shadow: none; border: 1px solid #000; }
.popup-btn-wrap button:hover {background: #000; color: #fff;}
</style> -->

View File

@@ -2,7 +2,7 @@
"header": [
[
{
"key": "date",
"key": "lmtYm",
"name": "날짜"
},
{

View File

@@ -26,7 +26,7 @@
"name": "상태"
},
{
"key": "",
"key": "channel",
"name": "유치채널"
},
{

View File

@@ -0,0 +1,188 @@
<template>
<!-- <div class="wrap bg-wrap"> -->
<div>
<div class="dimmed modal01" @click="alertModalCancel();"></div>
<div class="popup-wrap modal01">
<!-- 로그인실패: 확인 -->
<div class="popup modal01">
<div class="pop-head">
<h3 class="pop-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-btn1">
<button class="btn-pcolor" @click="alertModalClose();">확인</button>
</div>
</div>
</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>{{ 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="confirmModalClose();">확인</button>
<button class="btn-default" @click="confirmModalCancel();">취소</button>
</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>
</template>
<script>
export default {
name: "confirm",
data(){
return{
row:{},
title:'',
msg1: '',
msg2: '',
msg3: '',
msg4: '',
callFnc:'',
}
},
methods :{
alertModalOpen(props){
var dimmed = document.getElementsByClassName('modal01');
for(var i = 0; i < dimmed.length; i++){
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;
this.callFnc = props.callFnc;
console.log(props)
},
alertModalClose(){
var dimmed = document.getElementsByClassName('modal01');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
console.log(this.callFnc)
if(this.callFnc !== ''){
this.$parent.alertCalbackFnc(this.callFnc);
}
},
alertModalCancel(){
var dimmed = document.getElementsByClassName('modal01');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
},
// 모달 오픈
confirmModalOpen(props){
var dimmed = document.getElementsByClassName('confirm');
for(var i = 0; i < dimmed.length; i++){
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.msg1 = props.msg1;
this.msg2 = props.msg2;
this.msg3 = props.msg3;
this.msg4 = props.msg4;
},
// 모달 끄기(ok)
confirmModalClose(){
var dimmed = document.getElementsByClassName('confirm');
for(var i = 0; i < dimmed.length; i++){
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.$parent.confirmCalbackFnc(this.row);
},
// 모달 끄기(취소)
confirmModalCancel(){
var dimmed = document.getElementsByClassName('confirm');
for(var i = 0; i < dimmed.length; i++){
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.$parent.confirmCalbackFnc(this.row);
},
}
}
</script>
<style>
.popup-btn-wrap {width: 500px; margin: auto; padding: 100px 0;}
.popup-btn-wrap button {width: 100%; margin-bottom: 10px; height: 50px; border-radius: 5px; box-shadow: none; border: 1px solid #000; }
.popup-btn-wrap button:hover {background: #000; color: #fff;}
</style>

View File

@@ -1,258 +1,353 @@
var commonPwdView = {
data: function() {
return {
err_msg: null,
message: {
oldPw: '', newPw: '',
import lodash from "lodash";
const utils_mixin = {
methods:{
/** * 이메일 형식 체크 * * @param 데이터 */
emailCheck(email,rtnArrYn) {
if(this.isNull(rtnArrYn)){
rtnArrYn='N';
}
// var regExp = /(^[A-Za-z0-9_\.\-]+)@([A-Za-z0-9\-]+\.[A-Za-z0-9\-]+)/;
var regExp = /^([0-9a-zA-Z_\.\-]([-_.]?[0-9a-zA-Z_\.\-])*)@([0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*.[a-zA-Z]{2,3}$)/i;//이메일 정규식
if(regExp.test(email) == false) {
// 이메일 형식이 알파벳+숫자@알파벳+숫자.알파벳+숫자 형식이 아닐경우
if(rtnArrYn == 'Y'){
return email;
}
return false;
}else{
var myArray = regExp.exec(email);
if(rtnArrYn == 'Y'){
return myArray;
}
return true;
}
},
param: {
userId: null,
/** * 전화번호 포맷으로 변환 * * @param 데이터 */
formatPhone(phoneNum,fmt,rtnArrYn) {
if(this.isNull(fmt)){
fmt='';
}
if(this.isNull(rtnArrYn)){
fmt='N';
}
if(this.isPhone(phoneNum)) {
var rtnNum;
var regExp =/(02)([0-9]{3,4})([0-9]{4})$/;
var myArray;
if(regExp.test(phoneNum)){
myArray = regExp.exec(phoneNum);
rtnNum = myArray[1]+fmt + myArray[2]+fmt+myArray[3];
if(rtnArrYn == 'Y'){
return myArray;
}
return rtnNum;
} else {
regExp =/(0[3-9]{1}[0-9]{1})([0-9]{3,4})([0-9]{4})$/;
if(regExp.test(phoneNum)){
myArray = regExp.exec(phoneNum);
rtnNum = myArray[1]+fmt+myArray[2]+fmt+myArray[3];
if(rtnArrYn == 'Y'){
return myArray;
}
return rtnNum;
} else {
return phoneNum;
}
}
} else {
return phoneNum;
}
},
oldPw: '', newPw: '',
/** * 핸드폰번호 포맷으로 변환 * * @param 데이터 */
formatMobile(phoneNum,fmt,rtnArrYn) {
if(this.isNull(fmt)){
fmt='';
}
if(this.isNull(rtnArrYn)){
fmt='N';
}
if(this.isMobile(phoneNum)) {
var rtnNum;
var regExp =/(01[016789])([0-9]{3,4})([0-9]{4})$/;
var myArray;
if(regExp.test(phoneNum)){
myArray = regExp.exec(phoneNum);
rtnNum = myArray[1]+fmt+myArray[2]+fmt+myArray[3];
if(rtnArrYn == 'Y'){
return myArray;
}
return rtnNum;
} else {
return phoneNum;
}
} else {
return phoneNum;
}
},
/** * 전화번호 형식 체크 * * @param 데이터 */
isPhone(phoneNum) {
var regExp =/(02)([0-9]{3,4})([0-9]{4})$/;
if(regExp.test(phoneNum)){
return true;
} else {
regExp =/(0[3-9]{1}[0-9]{1})([0-9]{3,4})([0-9]{4})$/;
if(regExp.test(phoneNum)){
return true;
} else {
return false;
}
}
},
/** * 핸드폰번호 형식 체크 * * @param 데이터 */
isMobile(phoneNum) {
var regExp =/(01[016789])([0-9]{3,4})([0-9]{4})$/;
var myArray;
if(regExp.test(phoneNum)){
myArray = regExp.exec(phoneNum);
return true;
} else {
return false;
}
},
isMobile2(phoneNum) {
var regExp =/(1[016789])([0-9]{3,4})([0-9]{4})$/;
var myArray;
if(regExp.test(phoneNum)){
myArray = regExp.exec(phoneNum);
return true;
} else {
return false;
}
},
isNull(obj){
if(lodash.isNil(obj) || lodash.trim(obj) == ''){
return true;
}
return false;
},
getParent(name){
let p = this.$parent;
while(typeof p !== 'undefined'){
if(p.$options.name == name) {
return p;
}else {
p = p.$parent;
}
}
return false;
},
getJsonObj(str){
return JSON.parse(JSON.stringify(str));
},
}
};
var chkPattern2 = {
data: function () {
return {
}
},
methods: {
verifyNewPw: function (evt) {
var valid = this.checkPassword(evt.target.value);
if (valid) {
this.err_msg = '';
selSesStorage(keyLike){
if(this.isNull(keyLike)){
return null;
}
this.message.newPw = this.err_msg;
if(sessionStorage.length > 0){
let keyList = [];
for(let i=0;i<sessionStorage.length;i++){
const keyNm = sessionStorage.key(i);
if(keyNm.indexOf(keyLike) > -1){
keyList.push({name : keyNm, value : sessionStorage.getItem(keyNm)});
}
}
if(keyList.length > 0){
return keyList;
}
return null;
}
return null;
},
verifyCfmPwd: function() {
this.message.cfmPw = '';
if (this.newPw != this.cfmPw) {
this.message.cfmPw = this.cfmPwdFailMsg();
return false;
delSesStorage(keyList){
if(this.isNull(keyList)){
return null;
}
if(keyList.length > 0){
keyList.map((o) => (sessionStorage.removeItem(o.name)));
return true;
}
}
};
var validation = {
methods: {
checkId: function (id) {
if (id == null || id.trim() == "") {
this.err_msg = "아이디를 입력해 주세요.";
return false;
}
if (id.length < 8 || id.length > 16) {
this.err_msg = "아이디는 영문, 숫자를 이용하여 4자리 이상 15자리 이하이어야 합니다.";
return false;
}
if (!id.match(/^[0-9a-zA-Z]+$/)) {
this.err_msg = "아이디는 영문, 숫자를 이용하여야 합니다.";
return false;
}
return true;
},
checkPassword: function (pw) {
if (pw == null || pw.trim() == "") {
this.err_msg = "비밀번호를 입력해 주세요.";
return false;
}
if (typeof this.param.userId != "undefined") {
if (pw.indexOf(this.param.userId) >= 0) {
this.err_msg = "아이디가 포함된 문자열은 사용할 수 없습니다.";
setGridMouseDownActive(){
const ele = document.querySelector(`div.tui-grid-container.tui-grid-show-lside-area`);
if(window.getEventListeners(ele).mousedown){
ele.removeEventListener('mousedown',window.getEventListeners(ele).mousedown[0].listener);
}
},
restrictChars : function($event,regExp,hanYn){
if(this.isNull(hanYn)){
hanYn='N';
}
if(hanYn === 'N' && $event.type === 'keydown'){
if($event.keyCode === 229){
$event.preventDefault();
return false;
}
}
for (var i = 0; i < pw.length; i++) {
var ch1 = pw.charAt(i);
var ch2 = pw.charAt(i + 1);
var ch3 = pw.charAt(i + 2);
var ch4 = pw.charAt(i + 3);
if (ch1 == ch2 && ch2 == ch3 && ch3 == ch4) {
//console.log(ch1 + "" + ch2 + "" + ch3 + ch4 + " is equality");
this.err_msg = "연속적인 숫자 또는 문자열은 사용할 수 없습니다.";
return false;
}
if (ch1.charCodeAt(0) - ch2.charCodeAt(0) == 1 && ch2.charCodeAt(0) - ch3.charCodeAt(0) == 1 && ch3.charCodeAt(0) - ch4.charCodeAt(0) == 1) {
//console.log(ch1 + "" + ch2 + "" + ch3 + ch4 + " is continuity");
this.err_msg = "연속적인 숫자 또는 문자열은 사용할 수 없습니다.";
return false;
}
if (ch1.charCodeAt(0) - ch2.charCodeAt(0) == -1 && ch2.charCodeAt(0) - ch3.charCodeAt(0) == -1 && ch3.charCodeAt(0) - ch4.charCodeAt(0) == -1) {
//console.log(ch1 + "" + ch2 + "" + ch3 + ch4 + " is continuity");
this.err_msg = "연속적인 숫자 또는 문자열은 사용할 수 없습니다.";
if($event.type === 'keypress'){
//한글 처리 불가
if(regExp.test(String.fromCharCode($event.charCode))) {
return true;
}else{
$event.preventDefault();
return false;
}
}
if (typeof this.param.phone != "undefined" && this.param.phone != null) {
var phone = this.param.phone;
phone = phone.substring(3, phone.length); // 앞 3자리 제거
if(hanYn === 'N' && ( $event.type === 'keyup' || $event.type === 'input' || $event.type === 'change' || $event.type === 'blur')){
$event.target.value = $event.target.value.replace(/[ㄱ-ㅎㅏ-ㅣ가-힣]/g,'');
$event.preventDefault();
return false;
}
return true;
},
setLenth: function (e, len) {
this.cut(e, len);
},
onlyCustom: function (e,strRegExp,hanYn) {
var regExp_g = new RegExp(strRegExp,'g');
this.cut(e);
return this.restrictChars(e,regExp_g,hanYn);
},
onlyCommon: function(strRegExp, e, len, isEventCall, hanYn) {
var regExp_g = new RegExp(strRegExp,'g');
if(isEventCall === 'N'){
if(!this.cut(e, len, isEventCall)){
return false;
}
if(!regExp_g.test(e.value)){
return false;
}
return true;
}
this.cut(e, len);
return this.restrictChars(e,regExp_g,hanYn);
},
onlyNum: function (e, len, isEventCall) {
var strRegExp = '^[0-9]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyEng: function (e, len, isEventCall) {
var strRegExp = '^[A-Za-z]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyLowerEng: function (e, len, isEventCall) {
var strRegExp = '^[a-z]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyUpperEng: function (e, len, isEventCall) {
var strRegExp = '^[A-Z]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyEmail: function (e, len, isEventCall) {
var strRegExp = '^[a-zA-Z0-9_\.\-@._-]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyName: function (e, len, isEventCall) {
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y');
},
onlyTitle: function (e, len, isEventCall) {
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y');
},
onlyText: function (e, len, isEventCall) {
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9_-]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y');
},
onlyPassword: function (e, len, isEventCall) {
var strRegExp = '^[A-Za-z0-9!@#$%^&*]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyId: function (e, len, isEventCall) {
var strRegExp = '^[A-Za-z0-9_\.\-]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyIp: function (e, len, isEventCall) {
var strRegExp = '^[0-9,.*]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyRoleNm_Space: function (e, len, isEventCall) {
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y');
},
onlyRoleId_UnderBar: function (e, len, isEventCall) {
var strRegExp = '^[a-zA-Z0-9_]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
cut: function (ele, len, isValidChk) {
let e=ele;
if (typeof ele.target != "undefined") {
e=ele.target;
}
let max = this.isNull(len) ? e.attributes.maxlength.value : len;
let str = e.value;
var last = phone.substring(phone.length - 4, phone.length); // 뒤 4자리 추출
var middle = phone.substring(0, phone.length - 4); // 뒤 4자리 제거 == 국번
if (this.bytes(str) > max) {
if(this.isNull(isValidChk)){
e.value = this.cutBytes(str, max);
}
return false;
}
return true;
},
cutBytes: function (str, len) {
while(1 === 1){
if(this.bytes(str) <= len){
return str;
}
str = str.slice(0,-1);
}
},
bytes: function (str) {
var length = ((s,b,i,c) => {
// for(b=i=0;c=s.charCodeAt(i++);b+=c>>11?3:c>>7?2:1); // 한글 3바이트
// for(b=i=0;c=s.charCodeAt(i++);b+=c>>11?2:c>>7?1:1); //한글 2바이트
b=0,i=0;
while(1 === 1){
c = s.charCodeAt(i++);
if (isNaN(c)) {
break;
}
b += c >> 11 ? 2 : c >> 7 ? 1 : 1;
}
return b
})(str);
return length;
},
checkPhone: function(str) {
str = str.replace(/[-\s]+/g, '');
if (str.charAt(0)!="0"){
str = "0"+str;
}
if (str.length<10||str.length>12){return "";}
if (isNaN(str)){return ""; }
if (str.substr(0,2)!="01" && str.substr(0,3)!="070" && str.substr(0,4)!="0505" && str.substr(0,4)!="0503"){return ""; }
return str;
if (pw.indexOf(middle) >= 0 || pw.indexOf(last) >= 0) {
this.err_msg = "휴대폰번호가 포함된 문자열은 사용할 수 없습니다.";
return false
}
}
if (pw.length >= 10) {
if (pw.match(/^(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[!@#$%^&*])([a-zA-Z0-9!@#$%^&*]+)$/)) {
return true;
} else if (!pw.match(/^(?=.*[0-9])(?=.*[a-zA-Z])([a-zA-Z0-9]+)$/)
&& !pw.match(/^(?=.*[0-9])(?=.*[!@#$%^&*])([0-9!@#$%^&*]+)$/)
&& !pw.match(/^(?=.*[a-zA-Z])(?=.*[!@#$%^&*])([a-zA-Z!@#$%^&*]+)$/)) {
this.err_msg = "영문, 숫자, 특수문자 중 2가지 이상 조합하여 10자리 이상 또는 3가지 이상 조합하여 8자리 이상이어야 합니다.";
return false;
}
} else if (pw.length >= 8) {
if (!pw.match(/^(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[!@#$%^&*])([a-zA-Z0-9!@#$%^&*]+)$/)) {
this.err_msg = "영문, 숫자, 특수문자 중 2가지 이상 조합하여 10자리 이상 또는 3가지 이상 조합하여 8자리 이상이어야 합니다.";
return false;
}
} else {
this.err_msg = "영문, 숫자, 특수문자 중 2가지 이상 조합하여 10자리 이상 또는 3가지 이상 조합하여 8자리 이상이어야 합니다.";
return false;
}
return true;
},
checkName: function (name) {
if (name == null || name.trim() == "") {
this.err_msg = "이름을 입력해 주세요.";
return false;
}
return true;
},
checkDeptNm: function (dept) {
if (dept == null || dept.trim() == "") {
this.err_msg = "부서명을 입력해 주세요.";
return false;
}
return true;
},
checkPhone: function (phone) {
if (phone == null || phone.trim() == "") {
this.err_msg = "휴대폰번호를 입력해 주세요.";
return false;
}
if (phone.length < 10) {
this.err_msg = "휴대폰번호를 정확히 입력해 주세요.";
return false;
}
return true;
},
checkEmail: function (email) {
if (email == null || email.trim() == "") {
this.err_msg = "이메일을 입력해 주세요.";
return false;
}
// eslint-disable-next-line
if (!email.match(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)) {
this.err_msg = "이메일을 정확히 입력해 주세요.";
return false;
}
return true;
},
checkIp: function (param) {
if ((param.ip1 == null || param.ip1 == "") && (param.ip2 == null || param.ip2 == "") && (param.ip3 == null || param.ip3 == "") && (param.ip4 == null || param.ip4 == "")) {
this.err_msg = "접근허용 IP를 입력해 주세요.";
return false;
}
if ((param.ip1 == null || param.ip1 == "")
|| (param.ip2 == null || param.ip2 == "")
|| (param.ip3 == null || param.ip3 == "")
|| (param.ip4 == null || param.ip4 == "")) {
this.err_msg = "IP 주소를 정확히 입력해 주세요.";
return false;
}
return true;
},
checkIpEach: function (ip, msg) {
if (ip == null || ip == "") {
this.err_msg = typeof msg != "undefined" ? msg : "접근허용 IP를 입력해 주세요.";
return false;
}
if (!ip.match(/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/)) {
this.err_msg = "IP 주소를 정확히 입력해 주세요.";
return false;
}
return true;
},
checkIpWithAsterisk: function (ip, msg) {
if (ip == null || ip == "") {
this.err_msg = typeof msg != "undefined" ? msg : "접근허용 IP를 입력해 주세요.";
return false;
}
// 3레벨 이후 * 허용... 2레벨 이후 시 {2,3} 1레벨 이후시 {1,3} 필요 시 구문 추가
if (!ip.match(/^((((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}\*))$/)) {
this.err_msg = "IP 주소를 정확히 입력해 주세요.";
return false;
}
return true;
},
checkRole: function (role) {
if (role == null || role == "") {
this.err_msg = "권한을 선택해 주세요.";
return false;
}
return true;
},
//리스크관리
checkSpamCliId: function (comnId, spamCliId) {
if (comnId == "N") {
if (spamCliId == null || spamCliId.trim() == "") {
this.err_msg = "SMID를 입력해 주세요.";
return false;
}
}
return true;
},
checkReqType: function (reqType) {
if (reqType == null || reqType.trim() == "") {
this.err_msg = "요청자를 선택해 주세요.";
return false;
}
return true;
},
checkSpamType: function (spamType) {
if (spamType == null || spamType.trim() == "") {
this.err_msg = "차단사유를 선택해 주세요.";
return false;
}
return true;
},
checkSpamContents: function (blockType) {
var str = "";
for (var k in this.callBacks) {
str = this.callBacks[k].spamContent;
if (blockType == "CLB") {
if (str == null || str.trim() == "") {
this.err_msg = "발신번호를 입력해 주세요.";
return false;
} else {
if (this.bytes(str) < 8) {
this.err_msg = "발신번호가 8자리 미만입니다.";
return false;
}
if (this.bytes(str) > 11) {
this.err_msg = "발신번호가 11자리 초과입니다.";
return false;
}
}
} else {
if (str == null || str.trim() == "") {
this.err_msg = "차단메시지를 입력해 주세요.";
return false;
}
}
}
return true;
}
}
};
export { commonPwdView, validation };
};
export { utils_mixin, chkPattern2 };

View File

@@ -0,0 +1,373 @@
import lodash from "lodash";
import moment from "moment";
import '@/modules/mgt/components/eventlisteners.js';
const filter_mixin = {
filters: {
_yyyy_mm_dd(val){
if(lodash.isNil(val) || lodash.trim(val) == '') return '';
const orgin = val;
if(orgin.length < 8) {
return orgin;
}
if(!Number(orgin)) return orgin;
const date = orgin.substring(0,8);
if(moment(date).isValid()){
return moment(date).format('YYYY[-]MM[-]DD');
}
return orgin;
}
},
}
const utils_mixin = {
methods:{
/** * 이메일 형식 체크 * * @param 데이터 */
emailCheck(email,rtnArrYn) {
if(this.isNull(rtnArrYn)){
rtnArrYn='N';
}
// var regExp = /(^[A-Za-z0-9_\.\-]+)@([A-Za-z0-9\-]+\.[A-Za-z0-9\-]+)/;
var regExp = /^([0-9a-zA-Z_\.\-]([-_.]?[0-9a-zA-Z_\.\-])*)@([0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*.[a-zA-Z]{2,3}$)/i;//이메일 정규식
if(regExp.test(email) == false) {
// 이메일 형식이 알파벳+숫자@알파벳+숫자.알파벳+숫자 형식이 아닐경우
if(rtnArrYn == 'Y'){
return email;
}
return false;
}else{
var myArray = regExp.exec(email);
if(rtnArrYn == 'Y'){
return myArray;
}
return true;
}
},
/** * 전화번호 포맷으로 변환 * * @param 데이터 */
formatPhone(phoneNum,fmt,rtnArrYn) {
if(this.isNull(fmt)){
fmt='';
}
if(this.isNull(rtnArrYn)){
fmt='N';
}
if(this.isPhone(phoneNum)) {
var rtnNum;
var regExp =/(02)([0-9]{3,4})([0-9]{4})$/;
var myArray;
if(regExp.test(phoneNum)){
myArray = regExp.exec(phoneNum);
rtnNum = myArray[1]+fmt + myArray[2]+fmt+myArray[3];
if(rtnArrYn == 'Y'){
return myArray;
}
return rtnNum;
} else {
regExp =/(0[3-9]{1}[0-9]{1})([0-9]{3,4})([0-9]{4})$/;
if(regExp.test(phoneNum)){
myArray = regExp.exec(phoneNum);
rtnNum = myArray[1]+fmt+myArray[2]+fmt+myArray[3];
if(rtnArrYn == 'Y'){
return myArray;
}
return rtnNum;
} else {
return phoneNum;
}
}
} else {
return phoneNum;
}
},
/** * 핸드폰번호 포맷으로 변환 * * @param 데이터 */
formatMobile(phoneNum,fmt,rtnArrYn) {
if(this.isNull(fmt)){
fmt='';
}
if(this.isNull(rtnArrYn)){
fmt='N';
}
if(this.isMobile(phoneNum)) {
var rtnNum;
var regExp =/(01[016789])([0-9]{3,4})([0-9]{4})$/;
var myArray;
if(regExp.test(phoneNum)){
myArray = regExp.exec(phoneNum);
rtnNum = myArray[1]+fmt+myArray[2]+fmt+myArray[3];
if(rtnArrYn == 'Y'){
return myArray;
}
return rtnNum;
} else {
return phoneNum;
}
} else {
return phoneNum;
}
},
/** * 전화번호 형식 체크 * * @param 데이터 */
isPhone(phoneNum) {
var regExp =/(02)([0-9]{3,4})([0-9]{4})$/;
if(regExp.test(phoneNum)){
return true;
} else {
regExp =/(0[3-9]{1}[0-9]{1})([0-9]{3,4})([0-9]{4})$/;
if(regExp.test(phoneNum)){
return true;
} else {
return false;
}
}
},
/** * 핸드폰번호 형식 체크 * * @param 데이터 */
isMobile(phoneNum) {
var regExp =/(01[016789])([0-9]{3,4})([0-9]{4})$/;
var myArray;
if(regExp.test(phoneNum)){
myArray = regExp.exec(phoneNum);
return true;
} else {
return false;
}
},
isMobile2(phoneNum) {
var regExp =/(1[016789])([0-9]{3,4})([0-9]{4})$/;
var myArray;
if(regExp.test(phoneNum)){
myArray = regExp.exec(phoneNum);
return true;
} else {
return false;
}
},
isNull(obj){
if(lodash.isNil(obj) || lodash.trim(obj) == ''){
return true;
}
return false;
},
getParent(name){
let p = this.$parent;
while(typeof p !== 'undefined'){
if(p.$options.name == name) {
return p;
}else {
p = p.$parent;
}
}
return false;
},
getJsonObj(str){
return JSON.parse(JSON.stringify(str));
},
}
};
var chkPattern2 = {
data: function () {
return {
}
},
methods: {
selSesStorage(keyLike){
if(this.isNull(keyLike)){
return null;
}
if(sessionStorage.length > 0){
let keyList = [];
for(let i=0;i<sessionStorage.length;i++){
const keyNm = sessionStorage.key(i);
if(keyNm.indexOf(keyLike) > -1){
keyList.push({name : keyNm, value : sessionStorage.getItem(keyNm)});
}
}
if(keyList.length > 0){
return keyList;
}
return null;
}
return null;
},
delSesStorage(keyList){
if(this.isNull(keyList)){
return null;
}
if(keyList.length > 0){
keyList.map((o) => (sessionStorage.removeItem(o.name)));
return true;
}
},
setGridMouseDownActive(){
const ele = document.querySelector(`div.tui-grid-container.tui-grid-show-lside-area`);
if(window.getEventListeners(ele).mousedown){
ele.removeEventListener('mousedown',window.getEventListeners(ele).mousedown[0].listener);
}
},
restrictChars : function($event,regExp,hanYn){
if(this.isNull(hanYn)){
hanYn='N';
}
if(hanYn === 'N' && $event.type === 'keydown'){
if($event.keyCode === 229){
$event.preventDefault();
return false;
}
}
if($event.type === 'keypress'){
//한글 처리 불가
if(regExp.test(String.fromCharCode($event.charCode))) {
return true;
}else{
$event.preventDefault();
return false;
}
}
if(hanYn === 'N' && ( $event.type === 'keyup' || $event.type === 'input' || $event.type === 'change' || $event.type === 'blur')){
$event.target.value = $event.target.value.replace(/[ㄱ-ㅎㅏ-ㅣ가-힣]/g,'');
$event.preventDefault();
return false;
}
return true;
},
setLenth: function (e, len) {
this.cut(e, len);
},
onlyCustom: function (e,strRegExp,hanYn) {
var regExp_g = new RegExp(strRegExp,'g');
this.cut(e);
return this.restrictChars(e,regExp_g,hanYn);
},
onlyCommon: function(strRegExp, e, len, isEventCall, hanYn) {
var regExp_g = new RegExp(strRegExp,'g');
if(isEventCall === 'N'){
if(!this.cut(e, len, isEventCall)){
return false;
}
if(!regExp_g.test(e.value)){
return false;
}
return true;
}
this.cut(e, len);
return this.restrictChars(e,regExp_g,hanYn);
},
onlyNum: function (e, len, isEventCall) {
var strRegExp = '^[0-9]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyEng: function (e, len, isEventCall) {
var strRegExp = '^[A-Za-z]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyLowerEng: function (e, len, isEventCall) {
var strRegExp = '^[a-z]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyUpperEng: function (e, len, isEventCall) {
var strRegExp = '^[A-Z]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyEmail: function (e, len, isEventCall) {
var strRegExp = '^[a-zA-Z0-9_\.\-@._-]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyName: function (e, len, isEventCall) {
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y');
},
onlyTitle: function (e, len, isEventCall) {
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y');
},
onlyText: function (e, len, isEventCall) {
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9_-]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y');
},
onlyPassword: function (e, len, isEventCall) {
var strRegExp = '^[A-Za-z0-9!@#$%^&*]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyId: function (e, len, isEventCall) {
var strRegExp = '^[A-Za-z0-9_\.\-]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyIp: function (e, len, isEventCall) {
var strRegExp = '^[0-9,.*]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyRoleNm_Space: function (e, len, isEventCall) {
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y');
},
onlyRoleId_UnderBar: function (e, len, isEventCall) {
var strRegExp = '^[a-zA-Z0-9_]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
cut: function (ele, len, isValidChk) {
let e=ele;
if (typeof ele.target != "undefined") {
e=ele.target;
}
let max = this.isNull(len) ? e.attributes.maxlength.value : len;
let str = e.value;
if (this.bytes(str) > max) {
if(this.isNull(isValidChk)){
e.value = this.cutBytes(str, max);
}
return false;
}
return true;
},
cutBytes: function (str, len) {
while(1 === 1){
if(this.bytes(str) <= len){
return str;
}
str = str.slice(0,-1);
}
},
bytes: function (str) {
var length = ((s,b,i,c) => {
// for(b=i=0;c=s.charCodeAt(i++);b+=c>>11?3:c>>7?2:1); // 한글 3바이트
// for(b=i=0;c=s.charCodeAt(i++);b+=c>>11?2:c>>7?1:1); //한글 2바이트
b=0,i=0;
while(1 === 1){
c = s.charCodeAt(i++);
if (isNaN(c)) {
break;
}
b += c >> 11 ? 2 : c >> 7 ? 1 : 1;
}
return b
})(str);
return length;
},
checkPhone: function(str) {
str = str.replace(/[-\s]+/g, '');
if (str.charAt(0)!="0"){
str = "0"+str;
}
if (str.length<10||str.length>12){return "";}
if (isNaN(str)){return ""; }
if (str.substr(0,2)!="01" && str.substr(0,3)!="070" && str.substr(0,4)!="0505" && str.substr(0,4)!="0503"){return ""; }
return str;
},
}
};
export { utils_mixin, chkPattern2, filter_mixin };

View File

@@ -46,11 +46,13 @@
import { mapGetters } from 'vuex';
import api from '../service/api';
import tokenSvc from '@/common/token-service';
import { utils_mixin, chkPattern2 } from '../service/mixins';
import LoginPopup from '@/components/LoginPopup.vue'
import commonModal from "@/components/modal/commonModal";
export default {
name: 'Params',
mixins: [utils_mixin, chkPattern2],
props: {
userId: {
type: String,
@@ -63,7 +65,7 @@ export default {
errors: [],
mdn: '',
confirmNum: '',
userId: '',
// userId: '',
isAuthNum: false,
isLogin: false,
isAuth: false,
@@ -141,13 +143,16 @@ export default {
vm.$router.push({ path: '/'});
return;
}
if (vm.mdn == null || vm.mdn.trim() == "" || vm.mdn.length < 11 || !vm.mdn){
// vm.ModalOpen('modal06');
this.row.title = '휴대폰번호 확인';
this.row.msg1 = '휴대폰번호를 확인해 주세요.';
const hp = this.mdn;
if(!this.isNull(hp) && !this.isMobile(hp)){
this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '휴대폰 번호 형식이 잘못되었습니다. 확인해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._phone.focus();
return false;
}
var params = {
"oprtrId": userId,
"hpNo": this.mdn,
@@ -163,8 +168,6 @@ export default {
this.row.title = '인증번호 발송';
this.row.msg1 = '인증번호를 발송하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
// vm.ModalOpen('modal07');
// console.log('시간 3:00 카운트 하기');
this.isAuthNum = true;
}else if (!this.timer) {
this.timerStop(this.timer);
@@ -172,9 +175,6 @@ export default {
this.row.title = '인증번호 발송';
this.row.msg1 = '인증번호를 발송하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
// vm.ModalOpen('modal06');
// 실패 -> 실패 코드에 따라 실패 팝업 보여주기
//인증시간 초과 후 “시간초과!” 문구로 변경
}
} catch(err) {
this.row.title = '로그인';

View File

@@ -31,7 +31,7 @@
import api from '../service/api';
import LoginPopup from '@/components/LoginPopup.vue';
import tokenSvc from '@/common/token-service';
import commonModal from "@/components/modal/commonModal";
import commonModal from "../components/commonModal";
export default {
data: function() {
@@ -45,7 +45,7 @@ export default {
},
created() {
// 로그인 페이지 진입시
if(!!tokenSvc.getToken()){
if(tokenSvc.getToken()){
this.$store.commit("login/isLogin", true);
this.$store.commit("login/isAuthChk", true);
this.$router.push({ path: '/' });
@@ -130,11 +130,14 @@ export default {
} else if(rsp.retCode == '4004') { // ID/PWD 불일치
this.row.title = '비밀번호 오류';
this.row.msg1 = '비밀번호를 확인해주세요.';
this.$refs.commonModal.alertModalOpen(this.row);
} else if(rsp.retCode == '4005') { // ID/PWD 불일치 횟수초과로 계정 잠김 4005
this.row.title = '로그인 실패';
this.row.msg1 = '로그인 5회 실패하였습니다.';
this.row.msg2 = '비밀번호 초기화 후 비밀번호를 변경해 주세요.';
this.row.callFnc = 'resetPassword'
console.log(this.row)
this.$refs.commonModal.alertModalOpen(this.row);
} else if(rsp.retCode == '4006') {
// msg = '비밀번호를 변경하신지 90일이 지났습니다.\n비밀번호 변경 화면으로 이동합니다.';
@@ -172,6 +175,11 @@ export default {
ModalOpen: function(target){
this.$refs.LoginPopup.ModalOpen(target);
},
alertCalbackFnc(callFnc){
if(callFnc === 'resetPassword'){
this.$router.push({ name: 'resetPassword',params: {}});
}
},
} //method 끝
};

View File

@@ -1,42 +1,35 @@
<template>
<div class="wrap bg-wrap">
<!-- s: 패스워드초기화 -->
<div>
<div class="login-box pw-reset">
<div class="logo"></div>
<div class="wbox">
<h3 class="title">비밀번호 초기화</h3>
<!-- <form action=""> -->
<div class="login-form">
<div>
<input type="text" placeholder="아이디를 입력하세요" v-model="userId"></div>
<div class="button_group">
<ul class="login-form">
<li><input type="text" placeholder="아이디를 입력하세요" v-model="userId"></li>
<li>
<button class="btn-pcolor" @click="ajaxReset">비밀번호 초기화 문자 발송하기</button>
<button class="btn-default" @click="clickMenu('/login')">취소</button>
</div>
</div>
<!-- </form> -->
</li>
</ul>
<div class="login-notice">
<div>
<ul>
<li>초기화된 비밀번호는 등록된 휴대폰 문자메시지로 발송됩니다.</li>
<li>휴대폰 번호 변경 관리자로 문의해주세요.</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<common-modal ref="commonModal"></common-modal>
<login-popup ref="LoginPopup"> </login-popup>
</div>
</div>
</template>
<script>
import api from '../service/api';
import LoginPopup from '@/components/LoginPopup.vue';
import commonModal from "@/components/modal/commonModal";
import commonModal from "../components/commonModal";
export default {
name: 'resetPassword',
@@ -48,7 +41,7 @@ export default {
}
},
created() {
this.$store.commit("login/isLogin", false);
this.$store.commit("login/isLogin", true);
this.$store.commit("login/isAuthChk", false);
},
components: {
@@ -85,33 +78,30 @@ export default {
console.log("RESULT_CODE : "+rsp.retCode);
if(rsp.retCode == '0000'){
// vm.$store.commit("login/isLogin", true);
//vm.$store.commit("login/isAuthChk", true);
this.row.title = '비밀번호 초기화';
this.row.msg1 = '해당 아이디에 저장되어 있는 핸드폰번호로';
this.row.msg2 = '비밀번호 초기화 문자가 발송되었습니다.';
this.row.callFnc = 'login'
vm.$store.commit("login/isLogin", false);
vm.$store.commit("login/isAuthChk", false);
this.$refs.commonModal.alertModalOpen(this.row);
// vm.ModalOpen('modal12');
//vm.$router.push({ path : 'view/login'});
// console.log(this.row)
} else if(rsp.retCode == '4003') {
this.row.title = '비밀번호 초기화';
this.row.msg1 = '등록되지 않은 아이디입니다.';
this.row.msg2 = '아이디를 다시 확인하세요.';
this.$refs.commonModal.alertModalOpen(this.row);
// vm.ModalOpen('modal13');
}
// document.getElementsByClassName('modal12')[0].getElementsByClassName('btn-pcolor')[0].addEventListener('click',() => {
// vm.$router.push({path: '/login'});
} catch(err) {
//alert("실패 하였습니다.");
console.log(err)
this.row.title = '비밀번호 초기화';
this.row.msg1 = '실패 하였습니다.';
this.$refs.commonModal.alertModalOpen(this.row);
return false;
}
}
,
},
clickMenu(link) {
this.$router.push({path: link});
},
@@ -119,6 +109,11 @@ export default {
ModalOpen: function(target){
this.$refs.LoginPopup.ModalOpen(target);
},
alertCalbackFnc(callFnc){
if(callFnc === 'login'){
this.$router.push({ name: 'login',params: {}});
}
},
}
}
</script>

View File

@@ -1,25 +1,19 @@
<template>
<div class="wrap bg-wrap">
<!-- s: 비밀번호변경 -->
<div id="cpf" class="login-box pw-change">
<div>
<div class="login-box pw-change">
<div class="logo"></div>
<div class="wbox">
<h3 class="title">비밀번호 변경</h3>
<p class="desc">임시비밀번호로 로그인할 경우 비밀번호를 변경 <br>서비스 이용이 가능합니다.</p>
<form @submit.prevent="changedPwd">
<ul class="pw-form">
<div><input id="oldPw" type="password" placeholder="기존 비밀번호를 입력하세요" v-model="oldPw" ref="oldPw"></div>
<div>
<input id="newPw" type="password" placeholder="새로운 비밀번호를 입력하세요" required minlength="8" maxlength="16" v-model.trim="newPw" ref="_newPw">
</div>
<div><input type="password" placeholder="새로운 비밀번호를 다시 한 번 입력하세요" required minlength="8" maxlength="16" v-model.trim="newPw2" ref="_newPw2"></div>
<div><button class="btn-pcolor" @click="changedPwd()">비밀번호 변경하기</button></div>
<li><input type="password" placeholder="기존 비밀번호를 입력하세요" v-model="oldPw" ref="oldPw"></li>
<li><input type="password" placeholder="새로운 비밀번호를 입력하세요" required minlength="8" maxlength="16" v-model.trim="newPw" ref="_newPw"></li>
<li><input type="password" placeholder="새로운 비밀번호를 다시 한 번 입력하세요" required minlength="8" maxlength="16" v-model.trim="newPw2" ref="_newPw2"></li>
<li><button class="btn-pcolor" @click="changedPwd()">비밀번호 변경하기</button></li>
</ul>
</form>
</div>
</div>
<common-modal ref="commonModal"></common-modal>
<login-popup ref="LoginPopup"> </login-popup>
</div>
@@ -29,10 +23,9 @@
import lodash from "lodash";
import api from '../service/api';
import { mapGetters } from 'vuex';
import LoginPopup from '@/components/LoginPopup.vue';
import tokenSvc from '@/common/token-service';
import { commonPwdView, validation } from '../service/mixins';
import commonModal from "@/components/modal/commonModal";
import commonModal from "../components/commonModal";
export default {
mixins: [commonPwdView, validation],
@@ -48,15 +41,8 @@ export default {
},
created: function() {
if(!!tokenSvc.getToken()){
this.$store.commit("login/isLogin", true);
this.$store.commit("login/isAuthChk", true);
this.$router.push({ path: '/' });
}else{
// if(!this.getLogin){
// this.$router.push({ path: '/login' });
// }
}
this.$store.commit("login/isAuthChk", false);
},
mounted() {
// this.$refs.chkSaveId.checked = true;
@@ -91,7 +77,6 @@ export default {
},
components: {
LoginPopup : LoginPopup,
commonModal,
},
@@ -148,7 +133,7 @@ export default {
},
//비밀번호 유효성 체크
changedPwd: function() {
async changedPwd() {
if(this.doPwdValidate()){
var vm = this;
@@ -159,11 +144,10 @@ export default {
"oldPw": this.oldPw,
"newPw": this.newPw
}
api.updatePassword(params).then(function(response) {
var rsp = response.data;
// var pofo = document.getElementById('oldPw');
try {
const response = await api.updatePassword(params)
const rsp = response.data;
console.log("RESULT_CODE : "+rsp.retCode);
if(rsp.retCode == '0000') {
// vm.chgChkUserId();
this.row.title = '비밀번호 변경';
@@ -188,11 +172,50 @@ export default {
} else if(rsp.retCode == '4003') {
this.row.title = '아이디 오류';
this.row.msg1 = '등록되지 않은 아이디입니다.';
this.row.msg1 = '아이디를 다시 확인하세요';
this.$refs.commonModal.alertModalOpen(this.row);
}
});
} catch(err) {
//alert("실패 하였습니다.");
console.log(err)
this.row.title = '비밀번호 초기화';
this.row.msg1 = '실패 하였습니다.';
this.$refs.commonModal.alertModalOpen(this.row);
return false;
}
// api.updatePassword(params).then(function(response) {
// var rsp = response.data;
// // var pofo = document.getElementById('oldPw');
//
// if(rsp.retCode == '0000') {
// // vm.chgChkUserId();
// this.row.title = '비밀번호 변경';
// this.row.msg1 = '비밀번호가 정상적으로 변경되었습니다.';
// this.row.msg2 = '변경된 비밀번호로 다시 로그인 해주세요.';
// this.$refs.commonModal.alertModalOpen(this.row);
// // if(vm.ModalOpen('modal16')){
// vm.$router.push({ path: '/login' });
// // }
// } else if(rsp.retCode == '4016') {
// this.row.title = '비밀번호 변경';
// this.row.msg1 = '비밀번호를 확인해주세요.';
// this.$refs.commonModal.alertModalOpen(this.row);
// // vm.ModalOpen('modal14')
// } else if(rsp.retCode == '4017') {
// this.row.title = '비밀번호 오류';
// this.row.msg1 = '비밀번호를 사용할 수 없습니다.';
// this.row.msg2 = '비밀번호는 영문/숫자/특수기호를 혼합하여';
// this.row.msg3 = '8~16자리로 설정해주세요.';
// this.$refs.commonModal.alertModalOpen(this.row);
// // vm.ModalOpen('modal15')
// } else if(rsp.retCode == '4003') {
// this.row.title = '아이디 오류';
// this.row.msg1 = '등록되지 않은 아이디입니다.';
// this.row.msg1 = '아이디를 다시 확인하세요';
// this.$refs.commonModal.alertModalOpen(this.row);
//
// }
// });
}
},
@@ -211,7 +234,7 @@ export default {
return length;
},
ModalOpen: function(target){
this.$refs.LoginPopup.ModalOpen(target);
// this.$refs.LoginPopup.ModalOpen(target);
// this.$refs.oldPw.focus(target);
}
}

View File

@@ -17,12 +17,12 @@
<label for="blckRsnCd" class="label">차단사유</label>
<select name="" id="blckRsnCd" v-model="grid.params.blckRsnCd" @keyup="search">
<option value="" selected>전체</option>
<option value="">일반</option>
<option value="">대출</option>
<option value="">의약품</option>
<option value="">도박</option>
<option value="">스미싱</option>
<option value="">기타</option>
<option value="01">일반</option>
<option value="02">대출</option>
<option value="03">의약품</option>
<option value="04">도박</option>
<option value="05">스미싱</option>
<option value="06">기타</option>
</select>
</div>
</div>
@@ -31,22 +31,22 @@
<label for="right" class="label">차단여부</label>
<select name="" id="" v-model="grid.params.blckYn">
<option value="" selected>전체</option>
<option value="">차단</option>
<option value="">해제</option>
<option value="Y">차단</option>
<option value="N">해제</option>
</select>
</div>
<div class="select_box">
<label for="right" class="label">발송타입</label>
<select name="" id="" v-model="grid.params.sndblckTpCd">
<option value="" selected>전체</option>
<option value="">공용</option>
<option value="">문자</option>
<option value="">RCS</option>
<option value="01">공용</option>
<option value="02">문자</option>
<option value="03">RCS</option>
</select>
</div>
<div class="input_box">
<label for="right" class="label">발신번호</label>
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model="grid.params.blcksndrno">
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model="grid.params.blckSndrno">
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div>
@@ -171,7 +171,7 @@ export default {
blckYn: '',
sndblckTpCd: '',
sndblckTpNm: '',
blcksndrno: ''
blckSndrno: ''
},
excelHeader: []
}

View File

@@ -25,7 +25,7 @@
</div>
</form>
<div class="info">
<div class="count"> <span> {{ totalItems }} </span>
<div class="count"> <span> {{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }} </span>
<div class="select_box NumberSe">
<select name="" id="" v-model="perPageCnt" @change="changePerPage()">
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{ option.text }}</option>

View File

@@ -0,0 +1,103 @@
{
"header": [
[
{
"key": "sumYmd",
"name": "날짜",
"rowspan": 2
},
{
"key": "custNm",
"name": "고객사명",
"rowspan": 2
},
{
"key": "bizrno",
"name": "사업자번호",
"rowspan": 2
},
{
"name": "전체",
"colspan": 3
},
{
"name": "SMS",
"colspan": 3
},
{
"name": "LMS",
"colspan": 3
},
{
"name": "MMS",
"colspan": 3
},
{
"name": "알림톡",
"colspan": 3
}
],
[
{
"key": "sndCnt",
"name": "발송건수"
},
{
"key": "succCnt",
"name": "성공건수"
},
{
"key": "succRt",
"name": "성공률(%)"
},
{
"key": "sndCntS",
"name": "발송건수"
},
{
"key": "succCntS",
"name": "성공건수"
},
{
"key": "succRtS",
"name": "성공률(%)"
},
{
"key": "sndCntL",
"name": "발송건수"
},
{
"key": "succCntL",
"name": "성공건수"
},
{
"key": "succRtL",
"name": "성공률(%)"
},
{
"key": "sndCntM",
"name": "발송건수"
},
{
"key": "succCntM",
"name": "성공건수"
},
{
"key": "succRtM",
"name": "성공률(%)"
},
{
"key": "sndCntR",
"name": "발송건수"
},
{
"key": "succCntR",
"name": "성공건수"
},
{
"key": "succRtR",
"name": "성공률(%)"
}
]
]
}

View File

@@ -0,0 +1,103 @@
{
"header": [
[
{
"key": "sumYm",
"name": "날짜",
"rowspan": 2
},
{
"key": "custNm",
"name": "고객사명",
"rowspan": 2
},
{
"key": "bizrno",
"name": "사업자번호",
"rowspan": 2
},
{
"name": "전체",
"colspan": 3
},
{
"name": "SMS",
"colspan": 3
},
{
"name": "LMS",
"colspan": 3
},
{
"name": "MMS",
"colspan": 3
},
{
"name": "알림톡",
"colspan": 3
}
],
[
{
"key": "sndCnt",
"name": "발송건수"
},
{
"key": "succCnt",
"name": "성공건수"
},
{
"key": "succRt",
"name": "성공률(%)"
},
{
"key": "sndCntS",
"name": "발송건수"
},
{
"key": "succCntS",
"name": "성공건수"
},
{
"key": "succRtS",
"name": "성공률(%)"
},
{
"key": "sndCntL",
"name": "발송건수"
},
{
"key": "succCntL",
"name": "성공건수"
},
{
"key": "succRtL",
"name": "성공률(%)"
},
{
"key": "sndCntM",
"name": "발송건수"
},
{
"key": "succCntM",
"name": "성공건수"
},
{
"key": "succRtM",
"name": "성공률(%)"
},
{
"key": "sndCntR",
"name": "발송건수"
},
{
"key": "succCntR",
"name": "성공건수"
},
{
"key": "succRtR",
"name": "성공률(%)"
}
]
]
}

View File

@@ -0,0 +1,93 @@
{
"header": [
[
{
"key": "sumYmd",
"name": "날짜",
"rowspan": 2
},
{
"name": "전체",
"colspan": 3
},
{
"name": "SMS",
"colspan": 3
},
{
"name": "LMS",
"colspan": 3
},
{
"name": "MMS",
"colspan": 3
},
{
"name": "알림톡",
"colspan": 3
}
],
[
{
"key": "sndCnt",
"name": "발송건수"
},
{
"key": "succCnt",
"name": "성공건수"
},
{
"key": "succRt",
"name": "성공률(%)"
},
{
"key": "sndCntS",
"name": "발송건수"
},
{
"key": "succCntS",
"name": "성공건수"
},
{
"key": "succRtS",
"name": "성공률(%)"
},
{
"key": "sndCntL",
"name": "발송건수"
},
{
"key": "succCntL",
"name": "성공건수"
},
{
"key": "succRtL",
"name": "성공률(%)"
},
{
"key": "sndCntM",
"name": "발송건수"
},
{
"key": "succCntM",
"name": "성공건수"
},
{
"key": "succRtM",
"name": "성공률(%)"
},
{
"key": "sndCntR",
"name": "발송건수"
},
{
"key": "succCntR",
"name": "성공건수"
},
{
"key": "succRtR",
"name": "성공률(%)"
}
]
]
}

View File

@@ -0,0 +1,93 @@
{
"header": [
[
{
"key": "sumYm",
"name": "날짜",
"rowspan": 2
},
{
"name": "전체",
"colspan": 3
},
{
"name": "SMS",
"colspan": 3
},
{
"name": "LMS",
"colspan": 3
},
{
"name": "MMS",
"colspan": 3
},
{
"name": "알림톡",
"colspan": 3
}
],
[
{
"key": "sndCnt",
"name": "발송건수"
},
{
"key": "succCnt",
"name": "성공건수"
},
{
"key": "succRt",
"name": "성공률(%)"
},
{
"key": "sndCntS",
"name": "발송건수"
},
{
"key": "succCntS",
"name": "성공건수"
},
{
"key": "succRtS",
"name": "성공률(%)"
},
{
"key": "sndCntL",
"name": "발송건수"
},
{
"key": "succCntL",
"name": "성공건수"
},
{
"key": "succRtL",
"name": "성공률(%)"
},
{
"key": "sndCntM",
"name": "발송건수"
},
{
"key": "succCntM",
"name": "성공건수"
},
{
"key": "succRtM",
"name": "성공률(%)"
},
{
"key": "sndCntR",
"name": "발송건수"
},
{
"key": "succCntR",
"name": "성공건수"
},
{
"key": "succRtR",
"name": "성공률(%)"
}
]
]
}

View File

@@ -1,4 +1,8 @@
import httpClient from '@/common/http-client';
import dayExcelHeader from './mock/dayExcelHeader.json';
import monthExcelHeader from './mock/monthExcelHeader.json'
import bsnmDayExcelHeader from './mock/bsnmDayExcelHeader.json'
import bsnmMonthExcelHeader from './mock/bsnmMonthExcelHeader.json'
// HUBEZ_BO_API - 일별 통계 목록 조회.
const dayList = (params) => {
@@ -20,10 +24,46 @@ const bsnmMonthList = (params) => {
return httpClient.post('/api/v1/bo/stats/bsnmMonthList', params, { withCredentials: false });
}
const bsnmMonthListExcel = (params) => {
return httpClient.post('/api/v1/bo/stats/bsnmMonthListExcel', params);
}
const bsnmDayListExcel = (params) => {
return httpClient.post('/api/v1/bo/stats/bsnmDayListExcel', params);
}
const getExcelHeader = category => {
// 엑셀에 출력할 Header 정보를 Mockup 데이터로 관리한다.
return new Promise(function(resolve, reject) {
let header = [];
switch (category) {
case 'DAY':
header = dayExcelHeader.header;
break;
case 'MONTH':
header = monthExcelHeader.header;
break;
case 'BSNM_DAY':
header = bsnmDayExcelHeader.header;
break;
case 'BSNM_MONTH':
header = bsnmMonthExcelHeader.header;
break;
default:
header = '';
break;
}
resolve(header);
});
};
export default {
dayList,
monthList,
bsnmDayList,
bsnmMonthList,
getExcelHeader,
bsnmMonthListExcel,
bsnmDayListExcel,
}

View File

@@ -17,7 +17,7 @@
<div class="search_wrap">
<div class="input_box cal">
<label for="right" class="label txt">날짜</label>
<p> 최대 3개월까지 조회 가능합니다.</p>
<p> 최대 1개월까지 조회 가능합니다.</p>
<div class="term">
<!--
<input class="date" type="text" id="" placeholder="2022-10-12"/>
@@ -63,7 +63,7 @@
<div class="info">
<div class="count">집계결과</div>
<div class="button_group">
<button type="button" class="button blue download">엑셀 다운로드</button>
<button type="button" class="button blue download" @click="excelDown();">엑셀 다운로드</button>
</div>
</div>
@@ -116,7 +116,7 @@ export default {
list:[],
totalCnt: '',
pageType: 'SUBS',
pageType: 'BSNM_DAY',
// 테이블 리스트 데이터
perPageCnt: 50,
@@ -243,6 +243,8 @@ export default {
},
destroyed() {
this.grid.params.custNm='';
this.grid.params.bizrno='';
},
mounted() {
@@ -360,6 +362,53 @@ export default {
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
console.log("getCondition : "+ getCondition.perPage);
},
initSetStartDate(){
let initStartDate = new Date();
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) -2);
this.startDate = initStartDate;
console.log(moment(this.startDate).format('YYYY-MM-DD'));
},
async getExcelDataDown() {
try {
let response;
response = await statsApi.bsnmDayListExcel(this.grid.params);
const result = response.data;
if (result != null && result.retCode == "0000") {
return result.data;
}else{
return false;
}
} catch (err) {
return false;
}
}, // end of getExcelDataDown
async excelDown() {
if (this.$refs.table.getData().length <= 0) {
this.row.title = '사업자별 일별통계';
this.row.msg1 = '조회된 데이터가 없습니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
let today = moment().format('YYYYMMDDHHmmss');
const saveFileName = `사업자별 일별통계_${today}.xlsx`;
const data = await this.getExcelDataDown();
let options = {
header: this.excelHeader,
dataOrder: 'header'
};
// console.log(data);
xlsx.export(data.list, saveFileName, options).then(() => {});
},
getExcelHeader() {
// 헤더를 mockup으로 관리한다.
custMgtApi.getExcelHeader(this.pageType).then(res => {
this.excelHeader = res;
});
},
}
};
</script>

View File

@@ -67,7 +67,7 @@
<div class="info">
<div class="count">집계결과</div>
<div class="button_group">
<button type="button" class="button blue download">엑셀 다운로드</button>
<button type="button" class="button blue download" @click="monthExcelDown();">엑셀 다운로드</button>
</div>
</div>
@@ -119,7 +119,7 @@ export default {
list:[],
totalCnt: '',
pageType: 'SUBS',
pageType: 'BSNM_MONTH',
// 테이블 리스트 데이터
perPageCnt: 50,
@@ -248,9 +248,12 @@ export default {
},
created(){
this.setPeriodDay(0);
this.getExcelHeader();
},
destroyed() {
this.grid.params.custNm='';
this.grid.params.bizrno='';
},
mounted() {
@@ -310,9 +313,10 @@ export default {
setPeriodDay(day) {
this.periodDay = day;
this.endDate = new Date();
this.startDate = moment(this.endDate)
.subtract(day, 'day')
.toDate();
// this.startDate = moment(this.endDate)
// .subtract(day, 'day')
// .toDate();
this.initSetStartDate();
this.closeDate('start');
this.closeDate('end');
@@ -368,6 +372,54 @@ export default {
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
console.log("getCondition : "+ getCondition.perPage);
},
initSetStartDate(){
let initStartDate = new Date();
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) -3);
this.startDate = initStartDate;
console.log(moment(this.startDate).format('YYYY-MM-DD'));
},
getExcelHeader() {
// 헤더를 mockup으로 관리한다.
custMgtApi.getExcelHeader(this.pageType).then(res => {
this.excelHeader = res;
});
},
async getExcelDataDown() {
try {
let response;
response = await statsApi.bsnmMonthListExcel(this.grid.params);
const result = response.data;
console.log(result)
if (result != null && result.retCode == "0000") {
return result.data;
}else{
return false;
}
} catch (err) {
return false;
}
}, // end of getExcelDataDown
async monthExcelDown() {
if (this.$refs.table.getData().length <= 0) {
this.row.title = '사업자별 월별통계';
this.row.msg1 = '조회된 데이터가 없습니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
let today = moment().format('YYYYMMDDHHmmss');
const saveFileName = `사업자별 월별통계_${today}.xlsx`;
const data = await this.getExcelDataDown();
let options = {
header: this.excelHeader,
dataOrder: 'header'
};
console.log(data);
xlsx.export(data.list, saveFileName, options).then(() => {});
},
}
};
</script>

View File

@@ -46,7 +46,7 @@
<div class="info">
<div class="count">집계결과</div>
<div class="button_group">
<button type="button" class="button blue download">엑셀 다운로드</button>
<button type="button" class="button blue download" @click="excelDown();">엑셀 다운로드</button>
</div>
</div>
@@ -132,6 +132,8 @@ export default {
startDt:'',
endDt:'',
pageType:'DAY',
row: {},
list:[],
totalCnt: '',
@@ -146,6 +148,7 @@ export default {
// this.endDt = moment().format('YYYY-MM-DD');
this.setPeriodDay(0);
this.getDayList();
this.getExcelHeader();
},
destroyed() {
@@ -223,9 +226,10 @@ export default {
setPeriodDay(day) {
this.periodDay = day;
this.endDate = new Date();
this.startDate = moment(this.endDate)
.subtract(day, 'day')
.toDate();
// this.startDate = moment(this.endDate)
// .subtract(day, 'day')
// .toDate();
this.initSetStartDate();
this.closeDate('start');
this.closeDate('end');
@@ -265,7 +269,38 @@ export default {
return moment(date).format('YYYY-MM-DD');
}
},
initSetStartDate(){
let initStartDate = new Date();
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) -2);
this.startDate = initStartDate;
console.log(moment(this.startDate).format('YYYY-MM-DD'));
},
excelDown() {
if (this.list.length <= 0) {
this.row.title = '일별통계';
this.row.msg1 = '조회된 데이터가 없습니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
let today = moment().format('YYYYMMDDHHmmss');
const saveFileName = `일별통계_${today}.xlsx`;
let options = {
header: this.excelHeader,
dataOrder: 'header'
};
// console.log(data);
xlsx.export(this.list, saveFileName, options).then(() => {});
},
getExcelHeader() {
// 헤더를 mockup으로 관리한다.
statsApi.getExcelHeader(this.pageType).then(res => {
this.excelHeader = res;
});
},
}
};
</script>

View File

@@ -52,7 +52,7 @@
<div class="info">
<div class="count">집계결과</div>
<div class="button_group">
<button type="button" class="button blue download">엑셀 다운로드</button>
<button type="button" class="button blue download" @click="excelDown();">엑셀 다운로드</button>
</div>
</div>
@@ -199,9 +199,10 @@ export default {
setPeriodDay(day) {
this.periodDay = day;
this.endDate = new Date();
this.startDate = moment(this.endDate)
.subtract(day, 'day')
.toDate();
// this.startDate = moment(this.endDate)
// .subtract(day, 'day')
// .toDate();
this.initSetStartDate();
this.closeDate('start');
this.closeDate('end');
@@ -240,6 +241,37 @@ export default {
} else {
return moment(date).format('YYYY-MM-DD');
}
},
initSetStartDate(){
let initStartDate = new Date();
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) -3);
this.startDate = initStartDate;
console.log(moment(this.startDate).format('YYYY-MM-DD'));
},
excelDown() {
if (this.list.length <= 0) {
this.row.title = '월별통계';
this.row.msg1 = '조회된 데이터가 없습니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
let today = moment().format('YYYYMMDDHHmmss');
const saveFileName = `월별통계_${today}.xlsx`;
let options = {
header: this.excelHeader,
dataOrder: 'header'
};
// console.log(data);
xlsx.export(this.list, saveFileName, options).then(() => {});
},
getExcelHeader() {
// 헤더를 mockup으로 관리한다.
statsApi.getExcelHeader(this.pageType).then(res => {
this.excelHeader = res;
});
},
}
};

View File

@@ -0,0 +1,188 @@
<template>
<!-- <div class="wrap bg-wrap"> -->
<div>
<div class="dimmed alertModal" @click="alertModalCancel();"></div>
<div class="popup-wrap alertModal">
<!-- 로그인실패: 확인 -->
<div class="popup alertModal">
<div class="pop-head">
<h3 class="pop-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-btn1">
<button class="btn-pcolor" @click="alertModalClose();">확인</button>
</div>
</div>
</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>{{ 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="confirmModalClose();">확인</button>
<button class="btn-default" @click="confirmModalCancel();">취소</button>
</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>
</template>
<script>
export default {
name: "confirm",
data(){
return{
row:{},
title:'',
msg1: '',
msg2: '',
msg3: '',
msg4: '',
targetFocus: '',
}
},
methods :{
alertModalOpen(props){
console.log('>>>>>>>>>> alertModalOpen');
console.log(props.msg1);
this.title = props.title;
this.msg1 = props.msg1;
this.msg2 = props.msg2;
this.msg3 = props.msg3;
this.msg4 = props.msg4;
var dimmed = document.getElementsByClassName('alertModal');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'block';
}
},
alertModalClose(){
var dimmed = document.getElementsByClassName('alertModal');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
this.$parent.checkFocus();
},
alertModalCancel(){
var dimmed = document.getElementsByClassName('alertModal');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
this.$parent.checkFocus();
},
// 모달 오픈
confirmModalOpen(props){
var dimmed = document.getElementsByClassName('confirm');
for(var i = 0; i < dimmed.length; i++){
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.msg1 = props.msg1;
this.msg2 = props.msg2;
this.msg3 = props.msg3;
this.msg4 = props.msg4;
},
// 모달 끄기(ok)
confirmModalClose(){
var dimmed = document.getElementsByClassName('confirm');
for(var i = 0; i < dimmed.length; i++){
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.$parent.confirmCalbackFnc(this.row);
},
// 모달 끄기(취소)
confirmModalCancel(){
var dimmed = document.getElementsByClassName('confirm');
for(var i = 0; i < dimmed.length; i++){
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.$parent.confirmCalbackFnc(this.row);
},
}
}
</script>
<!--
<style>
.popup-btn-wrap {width: 500px; margin: auto; padding: 100px 0;}
.popup-btn-wrap button {width: 100%; margin-bottom: 10px; height: 50px; border-radius: 5px; box-shadow: none; border: 1px solid #000; }
.popup-btn-wrap button:hover {background: #000; color: #fff;}
</style> -->

View File

@@ -71,8 +71,6 @@
</td>
</tr>
</div>
</td>
<td class="check">
<p>서비스관리</p>
@@ -190,6 +188,7 @@
<button class="btn-pcolor" type="button" @click="authAddSave()">저장</button>
</div>
</div>
<common-modal ref="commmonModal"></common-modal>
</div>
</template>
@@ -197,6 +196,8 @@
import sysMgtApi from "../service/sysMgtApi.js";
import { utils_mixin, chkPattern2 } from '../service/mixins';
//import commonModal from "@/components/modal/commonModal";
import commonModal from "../components/commonModal";
export default {
name: 'authAdd',
@@ -215,6 +216,7 @@ export default {
};
},
components: {
commonModal,
},
created(){
//this.setCodeData();
@@ -230,38 +232,62 @@ export default {
// 필수 등록정보 체크
if(this.isNull(this.authNm)){
alert("권한명을 입력해 주세요");
this.$refs._authNm.focus();
this.row.title = '시스템관리';
this.row.msg1 = '권한명을 입력해 주세요.';
this.row.focusTaget = '1';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
if(this.isNull(this.authCd)){
alert('권한 코드를 입력해주세요.');
this.$refs._authCd.focus();
this.row.title = '시스템관리';
this.row.msg1 = '권한 코드를 입력해 주세요.';
this.row.focusTaget = '2';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
if(this.authCd.length > 5){
this.row.title = '시스템관리';
this.row.msg1 = '권한코드는 영문과 숫자포함 최대4자리까지 입력해주세요.';
this.row.focusTaget = '2';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
if(this.isNull(this.stat)){
alert('상태를 체크해주세요.');
this.row.title = '시스템관리';
this.row.msg1 = '상태를 체크해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
if(this.checkedAuthMenu.length == 0){
alert('메뉴 권한 체크를 해주세요.');
this.row.title = '시스템관리';
this.row.msg1 = '메뉴 권한 체크를 해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
return true;
},
authAddCancel() {
// 권한리스트 페이지로 이동
this.$router.push({ name: 'authList'});
},
async authAddSave(){
if(this.doValidate() && window.confirm('저장 하시겠습니까?')){
authAddSave(){
if(this.doValidate()){
this.row.title = '시스템관리';
this.row.msg1 = '권한 등록 저장하시겠습니까?';
this.row.focusTaget = '0';
this.$refs.commmonModal.confirmModalOpen(this.row);
return false;
}
},
async authInsert(){
var reqAuthMenuArr = this.checkedAuthMenu;
var listArr = [];
var dataMap = {};
@@ -275,6 +301,7 @@ export default {
listArr.push(dataMap);
}
this.row.authCd = this.authCd;
this.row.authNm = this.authNm;
this.row.authDesc = this.authDesc;
@@ -287,22 +314,50 @@ export default {
let response = await sysMgtApi.insertAuth(this.row);
const result = response.data;
if (result != null && result.retCode == "0000") {
alert('저장 하였습니다.');
//alert('저장 하였습니다.');
// 권한리스트 페이지 이동
this.$router.push({ name: 'authList'});
} else if(result.retCode == "4017"){
alert("권한코드가 이미 존재합니다.");
this.$refs._authCd.focus();
//alert("권한코드가 이미 존재합니다.");
//this.$refs._authCd.focus();
this.row.title = '시스템관리';
this.row.msg1 = '권한코드가 이미 존재합니다.';
this.row.focusTaget = '2';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
} else {
alert("실패 하였습니다.");
//alert("실패 하였습니다.");
this.row.title = '시스템관리';
this.row.msg1 = '실패 하였습니다.';
this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
} catch(err) {
alert("실패 하였습니다.");
//alert("실패 하였습니다.");
this.row.title = '시스템관리';
this.row.msg1 = '실패 하였습니다.';
this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
},
checkFocus(){
if(this.row.focusTaget === '1'){
this.$refs._authNm.focus();
} else if(this.row.focusTaget === '2'){
this.$refs._authCd.focus();
}
},
confirmCalbackFnc(props){
if(props.result){
this.authInsert();
}
}
},
computed: {
// 체크박스 전체선택 기능

View File

@@ -188,6 +188,7 @@
<button class="btn-pcolor" type="button" @click="authModifySave()">저장</button>
</div>
</div>
<common-modal ref="commmonModal"></common-modal>
</div>
</template>
@@ -195,6 +196,7 @@
import sysMgtApi from "../service/sysMgtApi.js";
import { utils_mixin, chkPattern2 } from '../service/mixins';
import commonModal from "../components/commonModal";
export default {
name: 'authModify',
@@ -219,6 +221,7 @@ export default {
}
},
components: {
commonModal,
},
created(){
//this.setCodeData();
@@ -235,24 +238,40 @@ export default {
// 필수 등록정보 체크
if(this.isNull(this.authNm)){
alert("권한명을 입력해 주세요");
this.$refs._authNm.focus();
this.row.title = '시스템관리';
this.row.msg1 = '권한명을 입력해 주세요.';
this.row.focusTaget = '1';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
if(this.isNull(this.authCd)){
alert('권한 코드를 입력해주세요.');
this.$refs._authCd.focus();
this.row.title = '시스템관리';
this.row.msg1 = '권한 코드를 입력해 주세요.';
this.row.focusTaget = '2';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
if(this.authCd.length > 5){
this.row.title = '시스템관리';
this.row.msg1 = '권한코드는 영문과 숫자포함 최대4자리까지 입력해주세요.';
this.row.focusTaget = '2';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
if(this.isNull(this.stat)){
alert('상태를 체크해주세요.');
this.row.title = '시스템관리';
this.row.msg1 = '상태를 체크해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
if(this.checkedAuthMenu.length == 0){
alert('메뉴 권한 체크를 해주세요.');
this.row.title = '시스템관리';
this.row.msg1 = '메뉴 권한 체크를 해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
@@ -294,15 +313,34 @@ export default {
}
} else {
alert("실패 하였습니다.");
//alert("실패 하였습니다.");
this.row.title = '시스템관리';
this.row.msg1 = '실패 하였습니다.';
this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
} catch(err) {
alert("처리 실패 하였습니다.");
//alert("처리 실패 하였습니다.");
this.row.title = '시스템관리';
this.row.msg1 = '실패 하였습니다.';
this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
},
async authModifySave(){
if(this.doValidate() && window.confirm('저장 하시겠습니까?')){
authModifySave(){
if(this.doValidate()){
this.row.title = '시스템관리';
this.row.msg1 = '권한 수정 저장하시겠습니까?';
this.row.focusTaget = '0';
this.$refs.commmonModal.confirmModalOpen(this.row);
return false;
}
},
async authUpdate(){
var reqAuthMenuArr = this.checkedAuthMenu;
var listArr = [];
var dataMap = {};
@@ -328,18 +366,40 @@ export default {
let response = await sysMgtApi.updateAuth(this.row);
const result = response.data;
if (result != null && result.retCode == "0000") {
alert('저장 하였습니다.');
//alert('저장 하였습니다.');
// 권한리스트 페이지 이동
this.$router.push({ name: 'authList'});
} else {
alert("실패 하였습니다.");
//alert("실패 하였습니다.");
this.row.title = '시스템관리';
this.row.msg1 = '실패 하였습니다.';
this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
} catch(err) {
alert("실패 하였습니다.");
//alert("실패 하였습니다.");
this.row.title = '시스템관리';
this.row.msg1 = '실패 하였습니다.';
this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
},
checkFocus(){
if(this.row.focusTaget === '1'){
this.$refs._authNm.focus();
} else if(this.row.focusTaget === '2'){
this.$refs._authCd.focus();
}
},
confirmCalbackFnc(props){
if(props.result){
this.authUpdate();
}
}
},
computed: {
// 체크박스 전체선택 기능

View File

@@ -5,28 +5,21 @@
*/
package kr.co.uplus.ez.api.calculate;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import kr.co.uplus.ez.api.calculate.dto.CalcListExcelReqDto;
import kr.co.uplus.ez.api.calculate.dto.CalcListExcelResDto;
import kr.co.uplus.ez.api.calculate.dto.CalcListReqDto;
import kr.co.uplus.ez.api.calculate.dto.CalcListResDto;
import kr.co.uplus.ez.api.stats.dto.BsnmMonthListResDto;
import kr.co.uplus.ez.common.components.ValidComponents;
import kr.co.uplus.ez.common.data.ApiResponseCode;
import kr.co.uplus.ez.common.data.ApiResponseMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
@RestController
@RequestMapping(value = "api/v1/bo/calculate")
@@ -41,9 +34,8 @@ public class CalculateController {
* date : 2022. 4. 25.
* auth : ckr
* desc : 정산 이력 목록 조회
* @param paramMap
* @param calcListReqDto
* @return
* @throws Exception
*/
@ApiOperation(value = "calcList", notes = "정산 이력 목록 조회")
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
@@ -60,13 +52,15 @@ public class CalculateController {
* date : 2022. 4. 25.
* auth : ckr
* desc : 정산 이력 목록 엑셀 다운로드
* @param paramMap
* @param calcListExcelReqDto
* @return
* @throws Exception
*/
@RequestMapping(value = "/calcListExcel" , method = {RequestMethod.POST})
@ResponseBody
public ApiResponseMessage calcListExcel(@RequestBody Map<String, Object> paramMap) throws Exception{
return calculateService.calcListExcel(paramMap);
public CalcListExcelResDto calcListExcel(@RequestBody @Valid CalcListExcelReqDto calcListExcelReqDto, BindingResult bindingResult){
if (validComponents.validParameter(bindingResult)) {
return new CalcListExcelResDto(ApiResponseCode.CM_PARAMETER_ERROR);
}
return calculateService.calcListExcel(calcListExcelReqDto);
}
}

View File

@@ -1,11 +1,11 @@
package kr.co.uplus.ez.api.calculate;
import java.util.List;
import kr.co.uplus.ez.api.calculate.dto.CalcList;
import kr.co.uplus.ez.api.calculate.dto.CalcListExcelReqDto;
import kr.co.uplus.ez.api.calculate.dto.CalcListReqDto;
import org.apache.ibatis.annotations.Mapper;
import kr.co.uplus.ez.api.calculate.dto.CalcList;
import kr.co.uplus.ez.api.calculate.dto.CalcListReqDto;
import java.util.List;
@Mapper
public interface CalculateMapper {
@@ -14,4 +14,6 @@ public interface CalculateMapper {
int selectCalculateListTotalCnt(CalcListReqDto calcListReqDto);
List<CalcList> selectCalculateExcelList(CalcListExcelReqDto calcListExcelReqDto);
}

View File

@@ -1,24 +1,15 @@
package kr.co.uplus.ez.api.calculate;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import kr.co.uplus.ez.api.calculate.dto.*;
import kr.co.uplus.ez.common.data.ApiResponseCode;
import kr.co.uplus.ez.common.data.Paging;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import kr.co.uplus.ez.api.calculate.dto.CalcList;
import kr.co.uplus.ez.api.calculate.dto.CalcListReqDto;
import kr.co.uplus.ez.api.calculate.dto.CalcListRes;
import kr.co.uplus.ez.api.calculate.dto.CalcListResDto;
import kr.co.uplus.ez.api.stats.dto.BsnmMonthList;
import kr.co.uplus.ez.api.stats.dto.BsnmMonthListRes;
import kr.co.uplus.ez.common.data.ApiResponseCode;
import kr.co.uplus.ez.common.data.ApiResponseMessage;
import kr.co.uplus.ez.common.data.Paging;
import java.util.ArrayList;
import java.util.List;
@Service
public class CalculateService {
@@ -35,7 +26,7 @@ public class CalculateService {
* date : 2022. 4. 25.
* auth : ckr
* desc : 정산 이력 목록 조회
* @param paramMap
* @param calcListReqDto
* @return
*/
public CalcListResDto calcList(CalcListReqDto calcListReqDto) {
@@ -77,40 +68,15 @@ public class CalculateService {
* date : 2022. 4. 25.
* auth : ckr
* desc : 정산 이력 목록 엑셀 다운로드
* @param paramMap
* @param calcListExcelReqDto
* @return
*/
public ApiResponseMessage calcListExcel(Map<String, Object> paramMap) {
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
Map<String, Object> dataObj = new HashMap<>();
List<Map<String,Object>> dataList = new ArrayList<>();
Map<String, Object> data = new HashMap<>();
data.put("totalCnt","999");
data.put("currentPage","1");
dataObj.put("paging", data);
for(int i=0; i<10; i++) {
data = new HashMap<>();
data.put("date", "2022-02");
data.put("custNm", "유플러스"+(i+1));
data.put("bRegNo", "22-81-39937");
data.put("plan", "요금제1(50000)");
data.put("startAmount", "50000");
data.put("useAmount", "100000");
data.put("carryOverAmount", "-");
data.put("unitAmount", "-");
data.put("extshAmount", "-");
data.put("requestAmount", "100000");
data.put("allSendingCnt", "84000000");
data.put("sms", "21000000");
data.put("lms", "21000000");
data.put("mms", "21000000");
data.put("notiTalk", "21000000");
dataList.add(data);
}
dataObj.put("list", dataList);
result.setData(dataObj);
return result;
public CalcListExcelResDto calcListExcel(CalcListExcelReqDto calcListExcelReqDto) {
CalculateMapper calcMapper = sqlSessionSlave.getMapper(CalculateMapper.class);
CalcListExcelRes calcListExcelRes = new CalcListExcelRes();
List<CalcList> calcLists = calcMapper.selectCalculateExcelList(calcListExcelReqDto);
calcListExcelRes.setList(calcLists);
return new CalcListExcelResDto(ApiResponseCode.SUCCESS, calcListExcelRes);
}
}

View File

@@ -0,0 +1,27 @@
package kr.co.uplus.ez.api.calculate.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class CalcListExcelReqDto implements Serializable {
@NotNull
@ApiModelProperty(example = "검색시작월", name = "검색시작월",dataType = "String")
private String startMonth;
@NotNull
@ApiModelProperty(example = "검색종료월", name = "검색종료월",dataType = "String")
private String endMonth;
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
private String custNm;
@ApiModelProperty(example = "사업자번호", name = "사업자번호", dataType = "String")
private String bizrno;
}

View File

@@ -0,0 +1,14 @@
package kr.co.uplus.ez.api.calculate.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@SuppressWarnings("serial")
@Data
public class CalcListExcelRes implements Serializable{
private List<CalcList> list;
}

View File

@@ -0,0 +1,33 @@
package kr.co.uplus.ez.api.calculate.dto;
import io.swagger.annotations.ApiModelProperty;
import kr.co.uplus.ez.common.data.ApiResponseCode;
import kr.co.uplus.ez.common.data.ResponseMessage;
import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class CalcListExcelResDto extends ResponseMessage implements Serializable{
@ApiModelProperty(example = "데이터")
private CalcListExcelRes data;
public CalcListExcelResDto() {
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
}
public CalcListExcelResDto(ApiResponseCode returnStr) {
this.retCode = returnStr.getResultCode();
this.retMsg = returnStr.getResultMsg();
}
public CalcListExcelResDto(ApiResponseCode returnStr, CalcListExcelRes data) {
this.retCode = returnStr.getResultCode();
this.retMsg = returnStr.getResultMsg();
this.data = data;
}
}

View File

@@ -5,33 +5,20 @@
*/
package kr.co.uplus.ez.api.stats;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import kr.co.uplus.ez.api.stats.dto.BsnmDayListReqDto;
import kr.co.uplus.ez.api.stats.dto.BsnmDayListResDto;
import kr.co.uplus.ez.api.stats.dto.BsnmMonthListReqDto;
import kr.co.uplus.ez.api.stats.dto.BsnmMonthListResDto;
import kr.co.uplus.ez.api.stats.dto.DayListReqDto;
import kr.co.uplus.ez.api.stats.dto.DayListResDto;
import kr.co.uplus.ez.api.stats.dto.MonthListReqDto;
import kr.co.uplus.ez.api.stats.dto.MonthListResDto;
import kr.co.uplus.ez.api.stats.dto.*;
import kr.co.uplus.ez.common.components.ValidComponents;
import kr.co.uplus.ez.common.data.ApiResponseCode;
import kr.co.uplus.ez.common.data.ApiResponseMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.util.Map;
@RestController
@RequestMapping(value = "api/v1/bo/stats")
@@ -129,14 +116,18 @@ public class StatsController {
* date : 2022. 4. 25.
* auth : ckr
* desc : 사업자 월별 통계 목록 엑셀 다운로드
* @param paramMap
* @param bsnmMonthListExcelReqDto
* @
*/
@Deprecated
@ApiOperation(value = "bsnmMonthListExcel", notes = "사업자 월별 통계 목록 엑셀 다운로드")
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
@RequestMapping(value = "/bsnmMonthListExcel" , method = {RequestMethod.POST})
@ResponseBody
public ApiResponseMessage bsnmMonthListExcel(@RequestBody Map<String, Object> paramMap) {
return statsService.bsnmMonthListExcel(paramMap);
public BsnmMonthListExcelResDto bsnmMonthListExcel(@RequestBody @Valid BsnmMonthListExcelReqDto bsnmMonthListExcelReqDto, BindingResult bindingResult) {
if (validComponents.validParameter(bindingResult)) {
return new BsnmMonthListExcelResDto(ApiResponseCode.CM_PARAMETER_ERROR);
}
return statsService.bsnmMonthListExcel(bsnmMonthListExcelReqDto);
}
/**
@@ -161,14 +152,18 @@ public class StatsController {
* date : 2022. 4. 25.
* auth : ckr
* desc : 사업자 일별 통계 목록 엑셀 다운로드
* @param paramMap
* @param bsnmDayListExcelReqDto
* @
*/
@Deprecated
@ApiOperation(value = "bsnmDayListExcel", notes = "사업자 일별 통계 목록 엑셀 다운로드")
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
@RequestMapping(value = "/bsnmDayListExcel" , method = {RequestMethod.POST})
@ResponseBody
public ApiResponseMessage bsnmDayListExcel(@RequestBody Map<String, Object> paramMap) {
return statsService.bsnmDayListExcel(paramMap);
public BsnmDayListExcelResDto bsnmDayListExcel(@RequestBody BsnmDayListExcelReqDto bsnmDayListExcelReqDto, BindingResult bindingResult) {
if (validComponents.validParameter(bindingResult)) {
return new BsnmDayListExcelResDto(ApiResponseCode.CM_PARAMETER_ERROR);
}
return statsService.bsnmDayListExcel(bsnmDayListExcelReqDto);
}
}

View File

@@ -19,4 +19,10 @@ public interface StatsMapper {
int selectCustMstatListTotalCnt(BsnmMonthListReqDto bsnmMonthListReqDto);
/** 일별통계 카운트 조회 */
int selectCustDstatListTotalCnt(BsnmDayListReqDto bsnmDayListReqDto);
/** 월별톨계 Excel 목록 조회 */
List<BsnmMonthList> selectCustMstatExcelList(BsnmMonthListExcelReqDto bsnmMonthListExcelReqDto);
/** 일별통계 Excel 목록 조회 */
List<BsnmDayList> selectCustDstatExcelList(BsnmDayListExcelReqDto bsnmDayListExcelReqDto);
}

View File

@@ -51,6 +51,7 @@ public class StatsService {
* @param paramMap
* @return
*/
@Deprecated
public ApiResponseMessage monthListExcel(Map<String, Object> paramMap) {
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
Map<String, Object> dataObj = new HashMap<>();
@@ -104,6 +105,7 @@ public class StatsService {
* @param paramMap
* @return
*/
@Deprecated
public ApiResponseMessage dayListExcel(Map<String, Object> paramMap) {
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
Map<String, Object> dataObj = new HashMap<>();
@@ -181,37 +183,18 @@ public class StatsService {
* date : 2022. 4. 25.
* auth : ckr
* desc : 사업자 월별 통계 목록 엑셀 다운로드
* @param paramMap
* @param bsnmMonthListExcelReqDto
* @return
*/
public ApiResponseMessage bsnmMonthListExcel(Map<String, Object> paramMap) {
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
Map<String, Object> dataObj = new HashMap<>();
List<Map<String,Object>> dataList = new ArrayList<>();
Map<String, Object> data = new HashMap<>();
public BsnmMonthListExcelResDto bsnmMonthListExcel(BsnmMonthListExcelReqDto bsnmMonthListExcelReqDto) {
StatsMapper statsMapper = sqlSessionSlave.getMapper(StatsMapper.class);
for(int i=1; i<=4; i++) {
data = new HashMap<>();
data.put("date", "2022-0"+i);
data.put("custNm", "유플러스");
data.put("bRegNo", "사업자번호");
data.put("allSendCnt", "40000000");
data.put("allSuccesCnt", "40000000(100%)");
data.put("smsSendCnt", "10000000");
data.put("smsSuccesCnt", "10000000(100%)");
data.put("lmsSendCnt", "10000000");
data.put("lmsSuccesCnt", "10000000(100%)");
data.put("mmsSendCnt", "10000000");
data.put("mmsSuccesCnt", "10000000(100%)");
data.put("notiTalkSendCnt", "10000000");
data.put("notiTalkSuccesCnt", "10000000(100%)");
List<BsnmMonthList> bsnmMonthLists = statsMapper.selectCustMstatExcelList(bsnmMonthListExcelReqDto);
dataList.add(data);
}
dataObj.put("list", dataList);
result.setData(dataObj);
BsnmMonthListExcelRes bsnmMonthListExcelRes = new BsnmMonthListExcelRes();
bsnmMonthListExcelRes.setList(bsnmMonthLists);
return result;
return new BsnmMonthListExcelResDto(ApiResponseCode.SUCCESS, bsnmMonthListExcelRes);
}
/**
@@ -262,37 +245,20 @@ public class StatsService {
* date : 2022. 4. 25.
* auth : ckr
* desc : 사업자 일별 통계 목록 엑셀 다운로드
* @param paramMap
* @param bsnmDayListExcelReqDto
* @return
*/
public ApiResponseMessage bsnmDayListExcel(Map<String, Object> paramMap) {
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
Map<String, Object> dataObj = new HashMap<>();
List<Map<String,Object>> dataList = new ArrayList<>();
Map<String, Object> data = new HashMap<>();
public BsnmDayListExcelResDto bsnmDayListExcel(BsnmDayListExcelReqDto bsnmDayListExcelReqDto) {
for(int i=1; i<=9; i++) {
data = new HashMap<>();
data.put("date", "2022-03-0"+i);
data.put("custNm", "유플러스");
data.put("bRegNo", "사업자번호");
data.put("allSendCnt", "40000000");
data.put("allSuccesCnt", "40000000(100%)");
data.put("smsSendCnt", "10000000");
data.put("smsSuccesCnt", "10000000(100%)");
data.put("lmsSendCnt", "10000000");
data.put("lmsSuccesCnt", "10000000(100%)");
data.put("mmsSendCnt", "10000000");
data.put("mmsSuccesCnt", "10000000(100%)");
data.put("notiTalkSendCnt", "10000000");
data.put("notiTalkSuccesCnt", "10000000(100%)");
StatsMapper statsMapper = sqlSessionSlave.getMapper(StatsMapper.class);
dataList.add(data);
}
dataObj.put("list", dataList);
result.setData(dataObj);
List<BsnmDayList> bsnmDayLists = statsMapper.selectCustDstatExcelList(bsnmDayListExcelReqDto);
return result;
BsnmDayListExcelRes bsnmDayListExcelRes = new BsnmDayListExcelRes();
bsnmDayListExcelRes.setList(bsnmDayLists);
return new BsnmDayListExcelResDto(ApiResponseCode.SUCCESS, bsnmDayListExcelRes);
}
}

View File

@@ -0,0 +1,27 @@
package kr.co.uplus.ez.api.stats.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class BsnmDayListExcelReqDto implements Serializable {
@NotNull
@ApiModelProperty(example = "조회시작일", name = "조회시작일", dataType = "String")
private String startDay;
@NotNull
@ApiModelProperty(example = "조회종료일", name = "조회종료일",dataType = "String")
private String endDay;
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
private String custNm;
@ApiModelProperty(example = "사업자등록번호", name = "사업자등록번호", dataType = "String")
private String bizrno;
}

View File

@@ -0,0 +1,13 @@
package kr.co.uplus.ez.api.stats.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@SuppressWarnings("serial")
@Data
public class BsnmDayListExcelRes implements Serializable{
private List<BsnmDayList> list;
}

View File

@@ -0,0 +1,33 @@
package kr.co.uplus.ez.api.stats.dto;
import io.swagger.annotations.ApiModelProperty;
import kr.co.uplus.ez.common.data.ApiResponseCode;
import kr.co.uplus.ez.common.data.ResponseMessage;
import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class BsnmDayListExcelResDto extends ResponseMessage implements Serializable{
@ApiModelProperty(example = "데이터")
private BsnmDayListExcelRes data;
public BsnmDayListExcelResDto() {
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
}
public BsnmDayListExcelResDto(ApiResponseCode returnStr) {
this.retCode = returnStr.getResultCode();
this.retMsg = returnStr.getResultMsg();
}
public BsnmDayListExcelResDto(ApiResponseCode returnStr, BsnmDayListExcelRes data) {
this.retCode = returnStr.getResultCode();
this.retMsg = returnStr.getResultMsg();
this.data = data;
}
}

View File

@@ -0,0 +1,27 @@
package kr.co.uplus.ez.api.stats.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class BsnmMonthListExcelReqDto implements Serializable {
@NotNull
@ApiModelProperty(example = "조회시작월", name = "조회시작월", dataType = "String")
private String startMon;
@NotNull
@ApiModelProperty(example = "조회종료월", name = "조회종료월",dataType = "String")
private String endMon;
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
private String custNm;
@ApiModelProperty(example = "사업자등록번호", name = "사업자등록번호", dataType = "String")
private String bizrno;
}

View File

@@ -0,0 +1,13 @@
package kr.co.uplus.ez.api.stats.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@SuppressWarnings("serial")
@Data
public class BsnmMonthListExcelRes implements Serializable{
private List<BsnmMonthList> list;
}

View File

@@ -0,0 +1,33 @@
package kr.co.uplus.ez.api.stats.dto;
import io.swagger.annotations.ApiModelProperty;
import kr.co.uplus.ez.common.data.ApiResponseCode;
import kr.co.uplus.ez.common.data.ResponseMessage;
import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class BsnmMonthListExcelResDto extends ResponseMessage implements Serializable{
@ApiModelProperty(example = "데이터")
private BsnmMonthListExcelRes data;
public BsnmMonthListExcelResDto() {
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
}
public BsnmMonthListExcelResDto(ApiResponseCode returnStr) {
this.retCode = returnStr.getResultCode();
this.retMsg = returnStr.getResultMsg();
}
public BsnmMonthListExcelResDto(ApiResponseCode returnStr, BsnmMonthListExcelRes data) {
this.retCode = returnStr.getResultCode();
this.retMsg = returnStr.getResultMsg();
this.data = data;
}
}

View File

@@ -1,103 +1,103 @@
package kr.co.uplus.ez.common.security;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import org.apache.commons.codec.binary.Base64;
/**
* key가 16byte(128bit)면 AES128로 동작한다.
* key가 32byte(256bit)면 AES256으로 동작한다.
*/
public class Aes256 {
private static final String ALGORITHM = "AES";
private static final String TRANSFORMATION = "AES/CBC/PKCS5Padding"; // algorithm/mode/padding
// private static final String TRANSFORMATION = "AES/ECB/PKCS5Padding"; // "AES"와 같다. ECB mode cannot use IV
public static byte[] encrypt(byte[] plainText, byte[] key) {
byte[] iv = new byte[16];
return encrypt(plainText, key, iv);
}
public static byte[] encrypt(byte[] plainText, byte[] key, byte[] iv) {
try {
Cipher c = Cipher.getInstance(TRANSFORMATION);
SecretKeySpec k = new SecretKeySpec(key, ALGORITHM);
IvParameterSpec ivSpec = new IvParameterSpec(iv);
c.init(Cipher.ENCRYPT_MODE, k, ivSpec);
return c.doFinal(plainText);
}
catch (Exception e) {
throw new RuntimeException(e);
}
}
public static String encryptBase64(String plainText, byte[] key) {
byte[] iv = new byte[16];
return encryptBase64(plainText, key, iv);
}
public static String encryptBase64(String plainText, byte[] key, byte[] iv) {
byte[] enc = encrypt(plainText.getBytes(), key, iv);
return new String(Base64.encodeBase64(enc));
}
public static byte[] decrypt(byte[] cipherText, byte[] key) {
byte[] iv = new byte[16];
return decrypt(cipherText, key, iv);
}
public static byte[] decrypt(byte[] cipherText, byte[] key, byte[] iv) {
try {
Cipher c = Cipher.getInstance(TRANSFORMATION);
SecretKeySpec k = new SecretKeySpec(key, ALGORITHM);
IvParameterSpec ivSpec = new IvParameterSpec(iv);
c.init(Cipher.DECRYPT_MODE, k, ivSpec);
return c.doFinal(cipherText);
}
catch (Exception e) {
throw new RuntimeException(e);
}
}
public static String decryptBase64(String b64CipherText, byte[] key) {
byte[] iv = new byte[16];
return decryptBase64(b64CipherText, key, iv);
}
public static String decryptBase64(String b64CipherText, byte[] key, byte[] iv) {
byte[] enc = Base64.decodeBase64(b64CipherText.getBytes());
return new String(decrypt(enc, key, iv));
}
public static String encryptNoIvBase64(String plainText, byte[] key) {
try {
Cipher c = Cipher.getInstance(ALGORITHM);
SecretKeySpec k = new SecretKeySpec(key, ALGORITHM);
c.init(Cipher.ENCRYPT_MODE, k); // ECB mode cannot use IV
byte[] enc = c.doFinal(plainText.getBytes());
return new String(Base64.encodeBase64(enc));
}
catch (Exception e) {
throw new RuntimeException(e);
}
}
public static String decryptNoIvBase64(String b64CipherText, byte[] key) {
try {
Cipher c = Cipher.getInstance(ALGORITHM);
SecretKeySpec k = new SecretKeySpec(key, ALGORITHM);
c.init(Cipher.DECRYPT_MODE, k); // ECB mode cannot use IV
byte[] enc = Base64.decodeBase64(b64CipherText.getBytes());
return new String(c.doFinal(enc));
}
catch (Exception e) {
throw new RuntimeException(e);
}
}
}
//package kr.co.uplus.ez.common.security;
//
//import javax.crypto.Cipher;
//import javax.crypto.spec.IvParameterSpec;
//import javax.crypto.spec.SecretKeySpec;
//
//import org.apache.commons.codec.binary.Base64;
//
///**
// * key가 16byte(128bit)면 AES128로 동작한다.
// * key가 32byte(256bit)면 AES256으로 동작한다.
// */
//public class Aes256 {
//
// private static final String ALGORITHM = "AES";
// private static final String TRANSFORMATION = "AES/CBC/PKCS5Padding"; // algorithm/mode/padding
//// private static final String TRANSFORMATION = "AES/ECB/PKCS5Padding"; // "AES"와 같다. ECB mode cannot use IV
//
// public static byte[] encrypt(byte[] plainText, byte[] key) {
// byte[] iv = new byte[16];
// return encrypt(plainText, key, iv);
// }
//
// public static byte[] encrypt(byte[] plainText, byte[] key, byte[] iv) {
// try {
// Cipher c = Cipher.getInstance(TRANSFORMATION);
// SecretKeySpec k = new SecretKeySpec(key, ALGORITHM);
// IvParameterSpec ivSpec = new IvParameterSpec(iv);
// c.init(Cipher.ENCRYPT_MODE, k, ivSpec);
// return c.doFinal(plainText);
// }
// catch (Exception e) {
// throw new RuntimeException(e);
// }
// }
//
// public static String encryptBase64(String plainText, byte[] key) {
// byte[] iv = new byte[16];
// return encryptBase64(plainText, key, iv);
// }
//
// public static String encryptBase64(String plainText, byte[] key, byte[] iv) {
// byte[] enc = encrypt(plainText.getBytes(), key, iv);
// return new String(Base64.encodeBase64(enc));
// }
//
//
// public static byte[] decrypt(byte[] cipherText, byte[] key) {
// byte[] iv = new byte[16];
// return decrypt(cipherText, key, iv);
// }
//
// public static byte[] decrypt(byte[] cipherText, byte[] key, byte[] iv) {
// try {
// Cipher c = Cipher.getInstance(TRANSFORMATION);
// SecretKeySpec k = new SecretKeySpec(key, ALGORITHM);
// IvParameterSpec ivSpec = new IvParameterSpec(iv);
// c.init(Cipher.DECRYPT_MODE, k, ivSpec);
// return c.doFinal(cipherText);
// }
// catch (Exception e) {
// throw new RuntimeException(e);
// }
// }
//
// public static String decryptBase64(String b64CipherText, byte[] key) {
// byte[] iv = new byte[16];
// return decryptBase64(b64CipherText, key, iv);
// }
//
// public static String decryptBase64(String b64CipherText, byte[] key, byte[] iv) {
// byte[] enc = Base64.decodeBase64(b64CipherText.getBytes());
// return new String(decrypt(enc, key, iv));
// }
//
//
// public static String encryptNoIvBase64(String plainText, byte[] key) {
// try {
// Cipher c = Cipher.getInstance(ALGORITHM);
// SecretKeySpec k = new SecretKeySpec(key, ALGORITHM);
// c.init(Cipher.ENCRYPT_MODE, k); // ECB mode cannot use IV
// byte[] enc = c.doFinal(plainText.getBytes());
// return new String(Base64.encodeBase64(enc));
// }
// catch (Exception e) {
// throw new RuntimeException(e);
// }
// }
//
// public static String decryptNoIvBase64(String b64CipherText, byte[] key) {
// try {
// Cipher c = Cipher.getInstance(ALGORITHM);
// SecretKeySpec k = new SecretKeySpec(key, ALGORITHM);
// c.init(Cipher.DECRYPT_MODE, k); // ECB mode cannot use IV
// byte[] enc = Base64.decodeBase64(b64CipherText.getBytes());
// return new String(c.doFinal(enc));
// }
// catch (Exception e) {
// throw new RuntimeException(e);
// }
// }
//
//}

View File

@@ -1,24 +1,17 @@
package kr.co.uplus.ez.common.utils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.DecoderException;
import org.apache.commons.codec.binary.Base64;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.io.File;
import java.io.UnsupportedEncodingException;
import java.math.BigInteger;
import java.nio.charset.StandardCharsets;
import java.security.InvalidKeyException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
import javax.crypto.Cipher;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import org.apache.commons.codec.DecoderException;
import org.apache.commons.codec.binary.Base64;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class EncryptionUtil {
@@ -221,117 +214,117 @@ public class EncryptionUtil {
return isHashCompare;
}
public byte[] aesEncryptEcb(String sKey, String sText) {
byte[] key = null;
byte[] text = null;
byte[] encrypted = null;
final int AES_KEY_SIZE_128 = 128;
// public byte[] aesEncryptEcb(String sKey, String sText) {
// byte[] key = null;
// byte[] text = null;
// byte[] encrypted = null;
// final int AES_KEY_SIZE_128 = 128;
//
// try {
// // UTF-8
// key = sKey.getBytes("UTF-8");
//
// // Key size (128bit, 16byte)
// key = Arrays.copyOf(key, AES_KEY_SIZE_128 / 8);
//
// // UTF-8
// text = sText.getBytes("UTF-8");
//
// // AES/EBC/PKCS5Padding
// Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
// cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, "AES"));
// encrypted = cipher.doFinal(text);
// } catch (Exception e) {
// encrypted = null;
// log.error("aesEncryptEcb exception. : {}", e.getMessage());
// }
try {
// UTF-8
key = sKey.getBytes("UTF-8");
// Key size (128bit, 16byte)
key = Arrays.copyOf(key, AES_KEY_SIZE_128 / 8);
// UTF-8
text = sText.getBytes("UTF-8");
// AES/EBC/PKCS5Padding
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, "AES"));
encrypted = cipher.doFinal(text);
} catch (Exception e) {
encrypted = null;
log.error("aesEncryptEcb exception. : {}", e.getMessage());
}
return encrypted;
}
// return encrypted;
// }
/*
* AES128 Decrypt
*/
public byte[] aesDecryptEcb(String sKey, byte[] encrypted) throws UnsupportedEncodingException {
byte[] key = null;
byte[] decrypted = null;
final int AES_KEY_SIZE_128 = 128;
try {
// UTF-8
key = sKey.getBytes("UTF-8");
// Key size 128 (128bit, 16byte)
key = Arrays.copyOf(key, AES_KEY_SIZE_128 / 8);
// AES/EBC/PKCS5Padding
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(key, "AES"));
decrypted = cipher.doFinal(encrypted);
} catch (Exception e) {
decrypted = null;
log.error("aesDecryptEcb exception. : {}", e.getMessage());
}
return decrypted;
}
// public byte[] aesDecryptEcb(String sKey, byte[] encrypted) throws UnsupportedEncodingException {
// byte[] key = null;
// byte[] decrypted = null;
// final int AES_KEY_SIZE_128 = 128;
//
// try {
// // UTF-8
// key = sKey.getBytes("UTF-8");
//
// // Key size 128 (128bit, 16byte)
// key = Arrays.copyOf(key, AES_KEY_SIZE_128 / 8);
//
// // AES/EBC/PKCS5Padding
// Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
// cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(key, "AES"));
// decrypted = cipher.doFinal(encrypted);
// } catch (Exception e) {
// decrypted = null;
// log.error("aesDecryptEcb exception. : {}", e.getMessage());
// }
// return decrypted;
// }
/*
* AES256 Encrypt
*/
public byte[] aes256EncryptEcb(String sKey, String sText) {
byte[] key = null;
byte[] text = null;
byte[] encrypted = null;
final int AES_KEY_SIZE_256 = 256;
try {
// UTF-8
key = sKey.getBytes("UTF-8");
// Key size (256bit, 16byte)
key = Arrays.copyOf(key, AES_KEY_SIZE_256 / 8);
// UTF-8
text = sText.getBytes("UTF-8");
// AES/EBC/PKCS5Padding
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, "AES"));
encrypted = cipher.doFinal(text);
} catch (Exception e) {
encrypted = null;
log.error("aes256EncryptEcb exception. : {}", e.getMessage());
}
return encrypted;
}
// public byte[] aes256EncryptEcb(String sKey, String sText) {
// byte[] key = null;
// byte[] text = null;
// byte[] encrypted = null;
// final int AES_KEY_SIZE_256 = 256;
//
// try {
// // UTF-8
// key = sKey.getBytes("UTF-8");
//
// // Key size (256bit, 16byte)
// key = Arrays.copyOf(key, AES_KEY_SIZE_256 / 8);
//
// // UTF-8
// text = sText.getBytes("UTF-8");
//
// // AES/EBC/PKCS5Padding
// Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
// cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, "AES"));
// encrypted = cipher.doFinal(text);
// } catch (Exception e) {
// encrypted = null;
// log.error("aes256EncryptEcb exception. : {}", e.getMessage());
// }
//
// return encrypted;
// }
/*
* AES256 Decrypt
*/
public byte[] aes256DecryptEcb(String sKey, byte[] encrypted) throws UnsupportedEncodingException {
byte[] key = null;
byte[] decrypted = null;
final int AES_KEY_SIZE_256 = 256;
try {
// UTF-8
key = sKey.getBytes("UTF-8");
// Key size (256bit, 16byte)
key = Arrays.copyOf(key, AES_KEY_SIZE_256 / 8);
// AES/EBC/PKCS5Padding
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(key, "AES"));
decrypted = cipher.doFinal(encrypted);
} catch (Exception e) {
decrypted = null;
log.error("aes256DecryptEcb exception. : {}", e.getMessage());
}
return decrypted;
}
// public byte[] aes256DecryptEcb(String sKey, byte[] encrypted) throws UnsupportedEncodingException {
// byte[] key = null;
// byte[] decrypted = null;
// final int AES_KEY_SIZE_256 = 256;
//
// try {
// // UTF-8
// key = sKey.getBytes("UTF-8");
//
// // Key size (256bit, 16byte)
// key = Arrays.copyOf(key, AES_KEY_SIZE_256 / 8);
//
// // AES/EBC/PKCS5Padding
// Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
// cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(key, "AES"));
// decrypted = cipher.doFinal(encrypted);
// } catch (Exception e) {
// decrypted = null;
// log.error("aes256DecryptEcb exception. : {}", e.getMessage());
// }
//
// return decrypted;
// }
public String toHexString(byte[] b) {
StringBuffer sb = new StringBuffer();

View File

@@ -1,29 +1,17 @@
package kr.co.uplus.ez.common.utils;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.zip.GZIPInputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.io.IOUtils;
import org.springframework.core.io.Resource;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.net.URLEncoder;
import java.util.Arrays;
import java.util.List;
public class FileIoUtils {
/**
* @return d:/Downloads/aaa.txt --> aaa.txt
@@ -205,7 +193,7 @@ public class FileIoUtils {
/**
* @param ext "."를 포함해야 정확한 결과를 얻는다.
* @param crext "."를 포함해야 정확한 결과를 얻는다.
*/
public static boolean isExtension(String fname, String... exts) {
if (fname == null) return false;
@@ -237,43 +225,43 @@ public class FileIoUtils {
}
}
public static List<File> unzip(File zip, String saveDir) throws Exception {
int bufSize = 1024 * 64;
List<File> files = new ArrayList<File>();
// public static List<File> unzip(File zip, String saveDir) throws Exception {
// int bufSize = 1024 * 64;
// List<File> files = new ArrayList<File>();
//
// ZipInputStream in = new ZipInputStream(new BufferedInputStream(new FileInputStream(zip), bufSize));
// ZipEntry entry = null;
//
// while ((entry = in.getNextEntry()) != null) {
// byte[] buffer = new byte[bufSize];
//
// File outfile = new File(saveDir, entry.getName());
// OutputStream out = new BufferedOutputStream(new FileOutputStream(outfile), bufSize);
//
// int size = 0;
// while ((size = in.read(buffer, 0, bufSize)) != -1) {
// out.write(buffer, 0, size);
// }
// out.flush();
// IOUtils.closeQuietly(out);
// files.add(outfile);
// }
//
// IOUtils.closeQuietly(in);
// return files;
// }
ZipInputStream in = new ZipInputStream(new BufferedInputStream(new FileInputStream(zip), bufSize));
ZipEntry entry = null;
while ((entry = in.getNextEntry()) != null) {
byte[] buffer = new byte[bufSize];
File outfile = new File(saveDir, entry.getName());
OutputStream out = new BufferedOutputStream(new FileOutputStream(outfile), bufSize);
int size = 0;
while ((size = in.read(buffer, 0, bufSize)) != -1) {
out.write(buffer, 0, size);
}
out.flush();
IOUtils.closeQuietly(out);
files.add(outfile);
}
IOUtils.closeQuietly(in);
return files;
}
public static File ungzip(File gzip, String saveDir) throws Exception {
String outName = getBaseName(gzip.getName());
File outfile = new File(saveDir, outName);
InputStream in = new GZIPInputStream(new FileInputStream(gzip));
OutputStream out = new FileOutputStream(outfile);
IOUtils.copy(in, out);
IOUtils.closeQuietly(in);
IOUtils.closeQuietly(out);
return outfile;
}
// public static File ungzip(File gzip, String saveDir) throws Exception {
// String outName = getBaseName(gzip.getName());
// File outfile = new File(saveDir, outName);
//
// InputStream in = new GZIPInputStream(new FileInputStream(gzip));
// OutputStream out = new FileOutputStream(outfile);
// IOUtils.copy(in, out);
//
// IOUtils.closeQuietly(in);
// IOUtils.closeQuietly(out);
// return outfile;
// }
}

View File

@@ -106,4 +106,75 @@
LIMIT #{page}, #{pagePerRows}
</select>
<select id="selectCalculateExcelList" parameterType="kr.co.uplus.ez.api.calculate.dto.CalcListReqDto" resultType="kr.co.uplus.ez.api.calculate.dto.CalcList">
SELECT
A.CUST_NM
,A.BIZRNO
,B.USE_YM
,B.PROD_NM
,B.PROD_AMT
,B.START_AMT
,B.USE_AMT
,B.CFWD_AMT
,B.MRT_USE_AMT
,B.EXTNC_AMT
,B.BILLING_AMT
,B.TOTAL_SND_CNT
,B.SMS_SND_CNT
,B.LMS_SND_CNT
,B.MMS_SND_CNT
,B.ATLK_SND_CNT
FROM
(SELECT
eci.CUST_NM
,eci.BIZRNO
,esi.SUBS_ID
FROM
${HUBEZ_COMMON}.EZ_SUBS_INFO esi
JOIN ${HUBEZ_COMMON}.EZ_CUST_INFO eci
ON esi.CUST_SEQ = eci.CUST_SEQ
WHERE 1=1
<if test="custNm != null and custNm != ''">
AND eci.CUST_NM LIKE CONCAT('%',#{custNm},'%')
</if>
<if test="bizrno != null and bizrno != ''">
AND eci.BIZRNO LIKE CONCAT('%',#{bizrno},'%')
</if>
) A
JOIN
(SELECT MAX(COLEC_TMS) AS COLEC_TMS
,DATE_FORMAT(eud.USE_YM, '%Y-%m') AS USE_YM
,eud.SUBS_ID AS SUBS_ID
,eud.PROD_NM AS PROD_NM
,ROUND(IFNULL(eud.PROD_AMT,0)) AS PROD_AMT
,ROUND(SUM(IFNULL(eud.FX_LMT_AMT,0) + IFNULL(eud.CFWD_AMT,0))) AS START_AMT -- 시작금액 : 정액한도금액+이월금액
,ROUND(SUM(IFNULL(eud.FX_USE_AMT,0) + IFNULL(eud.CFWD_USE_AMT,0) + IFNULL(eud.MRT_USE_AMT,0))) AS USE_AMT -- 사용금액 : 정액사용금액 + 이월사용금액 + 종량사용금액
,ROUND(IFNULL(eud.CFWD_AMT,0)) AS CFWD_AMT -- 이월금액
,ROUND(IFNULL(eud.MRT_USE_AMT,0)) AS MRT_USE_AMT -- 종량금액
,ROUND(IFNULL(eud.EXTNC_AMT,0)) AS EXTNC_AMT -- 소멸금액 : 소멸처리금액
,ROUND(IFNULL((SELECT IFNULL(t2.RAT_AMT,0)
FROM ${HUBEZ_ADMIN}.EZ_RAT_TXN t1
JOIN ${HUBEZ_ADMIN}.EZ_RATTXN_DTL t2
ON t1.RAT_YM = t2.RAT_YM
AND t1.RAT_TMS = t2.RAT_TMS
WHERE t1.USE_YM = eud.USE_YM
AND t1.COLEC_TMS = eud.COLEC_TMS
AND t2.SUBS_ID = eud.SUBS_ID ),0)) AS BILLING_AMT -- 청구금액 : 과금금액
,SUM(IFNULL(eud.SMS_USE_CNT,0) + IFNULL(eud.LMS_USE_CNT,0) + IFNULL(eud.MMS_USE_CNT,0) + IFNULL(eud.ATLK_USE_CNT,0)) AS TOTAL_SND_CNT
,IFNULL(eud.SMS_USE_CNT,0) AS SMS_SND_CNT
,IFNULL(eud.LMS_USE_CNT,0) AS LMS_SND_CNT
,IFNULL(eud.MMS_USE_CNT,0) AS MMS_SND_CNT
,IFNULL(eud.ATLK_USE_CNT,0) AS ATLK_SND_CNT
FROM ${HUBEZ_ADMIN}.EZ_UTXNCOLEC_DTL eud
WHERE 1=1
<![CDATA[
AND eud.USE_YM >= STR_TO_DATE(CONCAT(#{startMonth},'01'),'%Y%m%d')
AND eud.USE_YM < DATE_ADD(STR_TO_DATE(CONCAT(#{endMonth},'01'),'%Y%m%d'), INTERVAL 1 MONTH)
]]>
GROUP BY eud.USE_YM, eud.SUBS_ID) B
ON A.SUBS_ID = B.SUBS_ID
ORDER BY B.USE_YM DESC, B.SUBS_ID DESC
</select>
</mapper>

View File

@@ -109,8 +109,7 @@
WHERE 1 = 1
<include refid="subsListCondition"></include>
ORDER BY
esi.OPN_DT DESC
LIMIT 100) A,
esi.OPN_DT DESC) A,
( SELECT @ROWNUM := 0 ) AS R
</select>
<sql id="subsListCondition">

View File

@@ -52,7 +52,7 @@
<sql id="sndnoBlckCondition">
<if test="regId != null and regId != ''">
AND esb.BLCK_SNDRNO LIKE UPPER(CONCAT('%', #{regId}, '%'))
AND esb.REG_ID LIKE UPPER(CONCAT('%', #{regId}, '%'))
</if>
<if test="sndblckTpCd != null and sndblckTpCd != ''">
AND esb.SNDBLCK_TP_CD = #{sndblckTpCd}
@@ -142,6 +142,10 @@
SELECT
COUNT(*) AS TOTAL_CNT
FROM
(SELECT
esu.CUST_SEQ
,er.RCVBLCKNO
FROM
${HUBEZ_COMMON}.EZ_RCVBLCK_080 er
INNER JOIN ${HUBEZ_COMMON}.EZ_SVC_USER esu
ON
@@ -152,6 +156,7 @@
WHERE
1 = 1
<include refid="selectRcvblck080Condition"/>
GROUP BY esu.CUST_SEQ, er.RCVBLCKNO) A
</select>
<select id="selectRcvblck080List" parameterType="kr.co.uplus.ez.api.riskMgt.dto.ZezNumIntrcpListReqDto" resultType="kr.co.uplus.ez.api.riskMgt.dto.ZezNumIntrcpList">
@@ -184,6 +189,7 @@
ON esu.CUST_SEQ = eci.CUST_SEQ
WHERE 1 = 1
<include refid="selectRcvblck080Condition"/>
GROUP BY esu.CUST_SEQ, er.RCVBLCKNO
ORDER BY er.REG_DT DESC
LIMIT #{page}, #{pagePerRows}
) A, ( SELECT @ROWNUM := #{page} ) AS R

View File

@@ -101,6 +101,7 @@
ON
eci.CUST_SEQ = ess.CUST_SEQ
WHERE 1=1
AND esu.USER_SEQ = esu.PRNTS_USER_SEQ
<include refid="numberListCondition"></include>
</select>
@@ -161,6 +162,7 @@
ON
eci.CUST_SEQ = ess.CUST_SEQ
WHERE 1=1
AND esu.USER_SEQ = esu.PRNTS_USER_SEQ
<include refid="numberListCondition"></include>
ORDER BY ess.REG_DT DESC
LIMIT #{page}, #{pagePerRows}) A,

View File

@@ -501,6 +501,172 @@
LIMIT #{page}, #{pagePerRows}
</select>
<select id="selectCustMstatExcelList" parameterType="kr.co.uplus.ez.api.stats.dto.BsnmMonthListExcelReqDto" resultType="kr.co.uplus.ez.api.stats.dto.BsnmMonthList">
SELECT
DATE_FORMAT(ecm.SUM_YM, '%Y-%m') AS sumYm
,ecm.CUST_NM AS custNm
,ecm.BIZRNO AS bizrno
, 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
,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 STR_TO_DATE(CONCAT(#{startMon},'01'),'%Y%m%d') AND STR_TO_DATE(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 STR_TO_DATE(CONCAT(#{startMon},'01'),'%Y%m%d') AND STR_TO_DATE(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 STR_TO_DATE(CONCAT(#{startMon},'01'),'%Y%m%d') AND STR_TO_DATE(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 STR_TO_DATE(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 STR_TO_DATE(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 STR_TO_DATE(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 STR_TO_DATE(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 STR_TO_DATE(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 DESC, ecm.USER_SEQ DESC
</select>
<select id="selectCustDstatListTotalCnt" parameterType="kr.co.uplus.ez.api.stats.dto.BsnmDayListReqDto" resultType="int">
SELECT
COUNT(*) AS TOTALCNT
@@ -692,4 +858,170 @@
ORDER BY ecd.SUM_YMD DESC, ecd.USER_SEQ DESC
LIMIT #{page}, #{pagePerRows}
</select>
<select id="selectCustDstatExcelList" parameterType="kr.co.uplus.ez.api.stats.dto.BsnmDayListExcelReqDto" resultType="kr.co.uplus.ez.api.stats.dto.BsnmDayList">
SELECT
DATE_FORMAT(ecd.SUM_YMD, '%Y-%m-%d') AS SUM_YMD
,ecd.CUST_NM
,ecd.BIZRNO
, ecd.SND_CNT
, ecd.SUCC_CNT
, ecd.SUCC_RT
, S.SND_CNT AS SND_CNT_S
, S.SUCC_CNT AS SUCC_CNT_S
, S.SUCC_RT AS SUCC_RT_S
, L.SND_CNT AS SND_CNT_L
, L.SUCC_CNT AS SUCC_CNT_L
, L.SUCC_RT AS SUCC_RT_L
, M.SND_CNT AS SND_CNT_M
, M.SUCC_CNT AS SUCC_CNT_M
, M.SUCC_RT AS SUCC_RT_M
, A.SND_CNT AS SND_CNT_R
, A.SUCC_CNT AS SUCC_CNT_R
, A.SUCC_RT AS SUCC_RT_R
FROM
(SELECT
SUM_YMD
,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_DSTAT
WHERE 1=1
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
GROUP BY SUM_YMD, USER_SEQ) ecd,
(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 = 'SMS'
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 = 'SMS'
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 DESC, ecd.USER_SEQ DESC
</select>
</mapper>