수정건 수정

This commit is contained in:
USER
2022-08-03 17:40:17 +09:00
parent abb5db5b97
commit 811986fa6d
24 changed files with 327 additions and 161 deletions

View File

@@ -7,7 +7,7 @@
</div>
<div class="table table_form">
<form action="" target="_blank" method="get" ref="form">
<form action="" target="_blank" method="post" ref="form">
<input type="hidden" name="svcUserId" id="svcUserId" v-model="svcUserId" />
<input type="hidden" name="ezSvcUserAuthKey" id="ezSvcUserAuthKey" v-model="ezSvcUserAuthKey" />
</form>

View File

@@ -136,10 +136,14 @@ export default {
created(){
if(this.$route.params.serviceId != null){
this.$store.commit('dataStore/updateUserId', this.$route.params.serviceId);
this.userId = this.$route.params.serviceId;
console.log('created : '+this.userId);
this.memberDetail(this.$route.params.serviceId);
}else{
var userId = this.$store.getters["dataStore/getUserId"];
this.memberDetail(userId);
var userId2 = this.$store.getters["dataStore/getUserId"];
this.userId = userId2;
console.log('created2 : '+this.userId);
this.memberDetail(this.userId);
}
},
destroyed() {
@@ -150,6 +154,7 @@ export default {
},
methods: {
async memberDetail(serviceId){
this.svcUserId = serviceId;
this.row.userId = serviceId;
try {
const response = await custMgtApi.memberDetail(this.row);
@@ -281,9 +286,11 @@ export default {
this.$refs._email.focus();
},
homeLogin(){
this.$refs.form.action = this.homePageUrl;
this.$refs.form.action = this.homePageUrl;
this.svcUserId = this.userId
this.$refs.form.submit()
console.log('--------');
console.log(this.svcUserId);
this.$refs.form.submit();
},
},
};

View File

@@ -45,7 +45,7 @@
<script>
import { mapGetters } from 'vuex';
import api from '../service/api';
import tokenSvc from '@/common/token-service';
// import tokenSvc from '@/common/token-service';
import { utils_mixin, chkPattern2 } from '../service/mixins';
import LoginPopup from '@/components/LoginPopup.vue'
import commonModal from "../components/commonModal";
@@ -83,6 +83,12 @@ export default {
,commonModal
},
created() {
const historyUrl = this.$router.options.history.state.back;
console.log(historyUrl);
console.log('>>>>1111>>>>'+this.getLogin);
if(!this.getLogin){
this.$router.push({ path: '/login' });
}
// if(!!tokenSvc.getToken()){
// this.$store.commit("login/isLogin", true);
// this.$store.commit("login/isAuthChk", true);
@@ -193,6 +199,14 @@ export default {
vm.$store.commit("login/isLogin", false);
vm.$store.commit("login/isAuthChk", false);
this.$refs.commmonModal.alertModalOpen(this.row);
}else if(rsp.retCode == '4022'){
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.commmonModal.alertModalOpen(this.row);
}else if (!this.timer) {
this.timerStop(this.timer);
this.timer = null;
@@ -362,7 +376,7 @@ export default {
if(callFnc === 'login'){
this.$router.push({ path: '/'});
}
},
},
}
};
</script>

View File

@@ -33,7 +33,7 @@
<script>
import api from '../service/api';
import LoginPopup from '@/components/LoginPopup.vue';
//import LoginPopup from '@/components/LoginPopup.vue';
import tokenSvc from '@/common/token-service';
import commonModal from "../components/commonModal";
@@ -128,8 +128,7 @@ export default {
vm.$store.commit("login/isLogin", true);
vm.$store.commit("login/savePwd", oprtrPw);
vm.$router.push({ name: 'loginAuth',params: {userId : oprtrId}});
} else if(rsp.retCode == '1001'){ // 비밀번호 변경
console.log('=-==-=-=-');
} else if(rsp.retCode == '1001'){ // 비밀번호 변경
console.log(this.userId);
vm.chgChkUserId();
this.$router.push({ name: 'updatePassword',params: {userId : this.userId}});
@@ -157,6 +156,7 @@ export default {
this.row.msg2 = '지났습니다. 비밀번호를 변경하여';
this.row.msg3 = '이용 부탁드립니다.';
this.row.callFnc = 'updatePassword'
//vm.$store.commit("login/isLogin", true);
this.$refs.commonModal.alertModalOpen(this.row);
} else if(rsp.retCode == '4007') {
this.row.title = '로그인 실패';
@@ -194,7 +194,8 @@ export default {
// this.$router.push({ name: 'updatePassword', params: {}}).catch(()=>{});
// this.$router.push({ name: 'updatePassword', params: {userId : this.userId} });
// this.$router.push({ path: '/view/login/updatePassword', params: {userId : this.userId}});
this.$store.commit("login/isLogin", true);
this.$store.commit("login/isAuthChk", false);
this.$router.push({ name: 'updatePassword',params: {userId : this.userId}});
}
},

View File

@@ -23,6 +23,7 @@
import lodash from "lodash";
import api from '../service/api';
import commonModal from "../components/commonModal";
import { mapGetters } from 'vuex';
export default {
name: 'updatePassword',
@@ -34,15 +35,31 @@ export default {
newPw2: '',
passwordValidFlag: true,
row: {},
isLogin: false,
}
},
created() {
this.$store.commit("login/isLogin", true);
this.$store.commit("login/isAuthChk", false);
console.log('>>>>'+this.getLogin);
if(!this.getLogin){
this.$router.push({ path: '/login' });
}
// this.$store.commit("login/isLogin", true);
// this.$store.commit("login/isAuthChk", false);
},
computed: {
...mapGetters({
getLogin: 'login/isLogin',
}),
},
watch: {
getLogin(data) {
if (data != null && data != '' && data == true) {
this.isLogin = true;
} else {
this.isLogin = false;
}
}
},
components: {
commonModal,
},

View File

@@ -487,8 +487,7 @@ export default {
const response = await sendNumMgtApi.insertNumber1(this.tenureFile, this.businessFile, this.communicationFile, this.adminId, this.custNm, this.bRegNo, this.nmineeDivCd, this.saveSendNums, this.bizrAuthYn, this.custSeq, this.bRegNo)
const result = response.data;
if (result != null && result.retCode == "0000") {
alert(499);
if (result != null && result.retCode == "0000") {
if(result.data.list != null && result.data.list.length > 0){
this.row.title = '발신번호 등록';
var failMsg = "";

View File

@@ -14,16 +14,14 @@
<tr>
<th>ID</th>
<td><input type="text" disabled v-model.trim="madangId" ref="_madangId2"></td>
</tr>
</tr>
<tr>
<th>비밀번호</th>
<td><input type="password" @keypress="onlyPassword" @input="onlyPassword" required minlength="8"
maxlength="16" ref="_pwd1" v-model.trim="userPwd1"></td>
</tr>
<tr>
<th>비밀번호 확인</th>
<td><input type="password" @keypress="onlyPassword" @input="onlyPassword" required minlength="8"
maxlength="16" ref="_pwd2" v-model.trim="userPwd2"></td>
<th>
비밀번호
</th>
<td>
<button class="button btn-p2color Ty02" @click.self.prevent="ajaxReset">비밀번호 초기화 문자 발송하기</button>
</td>
</tr>
<tr>
<th>이름</th>
@@ -125,6 +123,32 @@ export default {
// commonModal,
},
methods: {
async ajaxReset(){
var params =
{
"userId": this.madangId
}
try {
const response = await sysMgtApi.resetPassword(params)
const rsp = response.data;
console.log("RESULT_CODE : " + rsp.retCode);
if(rsp.retCode == '0000'){
this.row.title = '비밀번호 초기화';
this.row.msg1 = '등록된 휴대폰 번호로 초기화된 비밀번호가';
this.row.msg2 = '발송되었습니다.';
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
}
} catch(err){
console.log(err)
this.row.title = '비밀번호 초기화';
this.row.msg1 = '실패 하였습니다.';
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
},
doPwdValidate() {
if (this.isNull(this.userPwd2)) {
// alert("비밀번호 확인을 입력해 주세요.");

View File

@@ -1,24 +1,18 @@
<template>
<article id="content" class="content error_page">
<div class="error-wrap">
<div class="error-body">
<img src="@/assets/images/error_message_page.png">
<p class="header">페이지를 찾을 없습니다.</p>
<span class="message"> 페이지의 주소가 잘못 입력되었거나,<br>
변경 또는 삭제되어 요청하신 페이지를 찾을 없습니다. <br>
입력하신 주소가 정확한지 다시 한번 확인해 주시기 바랍니다.<br>
이용에 불편을 드려 죄송합니다.
</span>
<p class="error-btns">
<a href="#">이전 페이지로</a><a href="#">메인으로</a>
</p>
</div>
</div>
</article>
<div class="error-body">
<img src="@/assets/images/error_message_page.png">
<p class="header">페이지를 찾을 없습니다.</p>
<span class="message"> 페이지의 주소가 잘못 입력되었거나,<br>
변경 또는 삭제되어 요청하신 페이지를 찾을 없습니다. <br>
입력하신 주소가 정확한지 다시 한번 확인해 주시기 바랍니다.<br>
이용에 불편을 드려 죄송합니다.
</span>
<p class="error-btns">
<a href="#" @click="backGo()">이전 페이지로</a><a href="#" @click="goMain()">메인으로</a>
</p>
</div>
</template>
<script>
@@ -39,8 +33,15 @@
this.$store.commit("login/isErrorPage", false);
},
methods: {
// 이전 페이지
backGo() {
this.$store.commit("login/isErrorPage", false);
this.$router.go(-1);
},
// 메인 페이지
goMain(){
this.$store.commit("login/isErrorPage", false);
this.$router.push({ path: '/' });
}
}
};

View File

@@ -1,23 +1,17 @@
<template>
<article id="content" class="content error_page">
<div class="error-wrap">
<div class="error-body">
<img src="@/assets/images/error_message_system.png">
<p class="header">시스템 오류</p>
<span class="message">이용에 불편을 드려 죄송합니다.<br>
일시적인 오류가 발생하였습니다. <br>
잠시 이용하여 주시기 바랍니다.
</span>
<p class="error-btns">
<a href="#">이전 페이지로</a><a href="#">메인으로</a>
</p>
</div>
</div>
</article>
<div class="error-body">
<img src="@/assets/images/error_message_system.png">
<p class="header">시스템 오류</p>
<span class="message">이용에 불편을 드려 죄송합니다.<br>
일시적인 오류가 발생하였습니다. <br>
잠시 이용하여 주시기 바랍니다.
</span>
<p class="error-btns">
<a href="#" @click="backGo()">이전 페이지로</a><a href="#" @click="goMain()">메인으로</a>
</p>
</div>
</template>
<script>
@@ -38,8 +32,15 @@
this.$store.commit("login/isErrorPage", false);
},
methods: {
// 이전 페이지
backGo() {
this.$store.commit("login/isErrorPage", false);
this.$router.go(-1);
},
// 메인 페이지
goMain(){
this.$store.commit("login/isErrorPage", false);
this.$router.push({ path: '/' });
}
}
};

View File

@@ -1,10 +1,13 @@
<template>
<body>
<div class="wrap" v-bind:class="{'main_wrap': (isAuthChk), 'login-wrap': (!isLogin && !isAuthChk), 'bg-wrap': (isLogin && !isAuthChk) }" >
<div v-if="!isErrPage" class="wrap" v-bind:class="{'main_wrap': (isAuthChk), 'login-wrap': (!isLogin && !isAuthChk), 'bg-wrap': (isLogin && !isAuthChk) }" >
<hub-web-header v-if="isAuthChk == true"></hub-web-header>
<nav-bar v-if="isAuthChk == true"></nav-bar>
<router-view :key="$route.fullPath"></router-view>
<hub-web-footer v-if="isAuthChk == false"></hub-web-footer>
</div>
<div v-else class="error-wrap">
<router-view :key="$route.fullPath"></router-view>
</div>
</body>
</template>
@@ -21,6 +24,7 @@ import "../assets/css/layout.css";
import "../assets/css/contents.css";
import "../assets/css/common.css";
import "../assets/css/style.css";
import "../assets/css/error.css";
import { mapGetters } from 'vuex';
import tokenSvc from '@/common/token-service';
@@ -45,6 +49,7 @@ export default {
mounted() {
this.isLogin = this.$store.getters["login/isLogin"]
this.isAuthChk = this.$store.getters["login/isAuthChk"]
this.isErrPage = this.$store.getters["login/isErrorPage"]
}
,computed: {
...mapGetters({

View File

@@ -32,4 +32,6 @@ public interface LoginMapper {
int updateAdmUser(AuthUser authUser);
void insertSendMsg(SendMsgDto sendMsgDto);
public List<AuthNum> getAuthNumList(AuthNum authNum);
}

View File

@@ -17,6 +17,7 @@ import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
@Service
@@ -39,6 +40,15 @@ public class LoginService {
@Value("${sendMsg.tableNm}")
private String sendMsgTableName;
@Value("${authentication.searchTime.min-30: 30}")
private String searchTime30M;
@Value("${authentication.searchTime.min-01: 1}")
private String searchTime01M;
@Value("${authentication.cntLimit: 10}")
private int cntLimit;
/**
* 1차 로그인 인증
*
@@ -145,8 +155,51 @@ public class LoginService {
if (autchrFailCnt >= Const.MAX_AUTHNUM_FAIL) {
return new AuthNumResDto(ApiResponseCode.CE_AUTHNUM_LOCK);
}
/*------------------------ 인증요청 임계 체크 2022.08.01 --------------------------------------- */
// 인증 요청 시간에서 30분 데이터 가져오기
Date nowDate = new Date();
String now = DateUtils.dateToStr(nowDate, "yyyyMMddHHmmss");
AuthNum authParam = new AuthNum();
authParam.setRegDt(now);
authParam.setSttusCd(Const.AUTH_STTUS_CD_03);
authParam.setHpNo(user.getHpNo());
authParam.setSearchTime(searchTime30M);
List<AuthNum> authNumList = loginMapper.getAuthNumList(authParam);
if(authNumList != null && authNumList.size() > 0) { // 30분 이내에 lock 상태가 존재함
return new AuthNumResDto(ApiResponseCode.CE_AUTHNUM_STAT_LOCK);
}
authParam = new AuthNum();
authParam.setRegDt(now);
authParam.setSttusCd(Const.AUTH_STTUS_CD_01);
authParam.setHpNo(user.getHpNo());
authParam.setSearchTime(searchTime01M);
authNumList = null;
authNumList = loginMapper.getAuthNumList(authParam);
String authNum = TextUtils.randNumStr(6);
if(authNumList != null) {
if(authNumList.size() >= cntLimit) {
// 발송 요청 건수가 1분에 10개 이상
// 발행한 인증번호 DB에 저장
AuthNum anum = new AuthNum();
anum.setAuthTpCd(Const.AUTH_TP_CD);
anum.setSttusCd(Const.AUTH_STTUS_CD_03);
anum.setHpNo(user.getHpNo());
anum.setChrVal(authNum);
anum.setRegId(user.getOprtrId());
loginMapper.addAuthNum(anum);
return new AuthNumResDto(ApiResponseCode.CE_AUTHNUM_STAT_LOCK);
}
}
// 발행한 인증번호 DB에 저장
AuthNum anum = new AuthNum();

View File

@@ -18,4 +18,6 @@ public class AuthNum {
private String chgDt; // 변경 일시
private String oprtrId; // 어드민 ID
private Integer authchrFailCnt; // 인증 실패 카운트
private String searchTime; // 조회시간
}

View File

@@ -63,6 +63,8 @@ public enum ApiResponseCode {
,CE_SYSMGT_AUTHCODE_EXISTS_USER("4020", "해당 권한코드에 해당하는 어드민 사용자가 존재함.")
/** 이미 등록된 발신번호로 저장 불가. */
,CE_SENDMGT_DUPLICATE_SENDNUM("4021", "이미 등록된 발신번호로 저장 불가.")
/** 인증번호 발송 요청 임계값 초과 분당 10회 */
,CE_AUTHNUM_STAT_LOCK("4022", "인증요청 제한")
// 시스템
/** 알 수 없는 에러. */
,SE_UNKNOWN("9999", "알 수 없는 에러");

View File

@@ -14,6 +14,7 @@ public class Const {
public static final String AUTH_TP_CD = "01"; // 어드민 로그인
public static final String AUTH_STTUS_CD_01 = "01"; // 인증대기
public static final String AUTH_STTUS_CD_02 = "02"; // 인증완료
public static final String AUTH_STTUS_CD_03 = "03"; // 인증Lock
public static final String AUTH_CD_ADMIN = "1001";
public static final String AUTH_CD_AGENCY = "1002";

View File

@@ -1,7 +1,7 @@
spring:
datasource-db1:
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://dev-msghubez-db.cluster-chhh2ppdeksu.ap-northeast-2.rds.amazonaws.com:3306?serverTimezone=UTC&characterEncoding=UTF-8
jdbc-url: jdbc:mysql://dev-msghubez-db.cluster-chhh2ppdeksu.ap-northeast-2.rds.amazonaws.com:3306?serverTimezone=UTC&characterEncoding=UTF-8&autoReconnect=true
username: hubez_admin
password: ENC(KujgLXvYG1ZD0bT9ec6I3Ld/xV25JmyX)
hikari:
@@ -15,7 +15,7 @@ spring:
max-lifetime: 1800000
datasource-db2:
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://dev-msghubez-db.cluster-chhh2ppdeksu.ap-northeast-2.rds.amazonaws.com:3306?serverTimezone=UTC&characterEncoding=UTF-8
jdbc-url: jdbc:mysql://dev-msghubez-db.cluster-ro-chhh2ppdeksu.ap-northeast-2.rds.amazonaws.com:3306?serverTimezone=UTC&characterEncoding=UTF-8&autoReconnect=true
username: hubez_admin
password: ENC(KujgLXvYG1ZD0bT9ec6I3Ld/xV25JmyX)
hikari:
@@ -36,7 +36,11 @@ schedule:
authentication:
without:
id: superadminuser,jambler01,jambler02,jambler03,jambler04,jambler05,jambler06
searchTime:
min-30: "30"
min-01: "1"
cntLimit: 10
mail:
from: msghubez@lguplus.co.kr
templeteCode: E0005

View File

@@ -36,7 +36,11 @@ schedule:
authentication:
without:
id: jambler01,jambler02,jambler03,jambler04,jambler05,jambler06,superadminuser
searchTime:
min-30: "30"
min-01: "1"
cntLimit: 10
mail:
from: msghubez@lguplus.co.kr
templeteCode: E0005

View File

@@ -15,7 +15,7 @@ spring:
max-lifetime: 1800000
datasource-db2:
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://prd-msghubez-db.cluster-clgtyr2wjyos.ap-northeast-2.rds.amazonaws.com:3306?serverTimezone=UTC&characterEncoding=UTF-8
jdbc-url: jdbc:mysql://prd-msghubez-db.cluster-ro-clgtyr2wjyos.ap-northeast-2.rds.amazonaws.com:3306?serverTimezone=UTC&characterEncoding=UTF-8&autoReconnect=true
username: hubez_admin
password: ENC(KujgLXvYG1ZD0bT9ec6I3Ld/xV25JmyX)
hikari:
@@ -36,7 +36,10 @@ schedule:
authentication:
without:
id: superadminuser,hacktestadmin,jambler01,jambler02,jambler03,jambler04,jambler05,jambler06,dvtadmin01,dvtadmin02,dvtadmin03,dvtadmin04,dvtadmin05,dvtadmin06,dvtadmin07,dvtadmin08,dvtadmin09,dvtadmin10,dvtadmin11,dvtadmin12,dvtadmin13,dvtadmin14,dvtadmin15,dvtadmin16,dvtadmin17,dvtadmin18,dvtadmin19,dvtadmin20
searchTime:
min-30: "30"
min-01: "1"
cntLimit: 10
mail:
from: msghubez@lguplus.co.kr

View File

@@ -1,7 +1,7 @@
spring:
datasource-db1:
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://stg-msghubez-db.cluster-chhh2ppdeksu.ap-northeast-2.rds.amazonaws.com:3306?serverTimezone=UTC&characterEncoding=UTF-8
jdbc-url: jdbc:mysql://stg-msghubez-db.cluster-chhh2ppdeksu.ap-northeast-2.rds.amazonaws.com:3306?serverTimezone=UTC&characterEncoding=UTF-8&autoReconnect=true
username: hubez_admin
password: ENC(KujgLXvYG1ZD0bT9ec6I3Ld/xV25JmyX)
hikari:
@@ -15,7 +15,7 @@ spring:
max-lifetime: 1800000
datasource-db2:
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://stg-msghubez-db.cluster-chhh2ppdeksu.ap-northeast-2.rds.amazonaws.com:3306?serverTimezone=UTC&characterEncoding=UTF-8
jdbc-url: jdbc:mysql://stg-msghubez-db.cluster-ro-chhh2ppdeksu.ap-northeast-2.rds.amazonaws.com:3306?serverTimezone=UTC&characterEncoding=UTF-8&autoReconnect=true
username: hubez_admin
password: ENC(KujgLXvYG1ZD0bT9ec6I3Ld/xV25JmyX)
hikari:
@@ -36,7 +36,11 @@ schedule:
authentication:
without:
id: superadminuser,hacktestadmin,jambler01,jambler02,jambler03,jambler04,jambler05,jambler06
searchTime:
min-30: "30"
min-01: "1"
cntLimit: 10
mail:
from: msghubez@lguplus.co.kr
templeteCode: E0005

View File

@@ -214,6 +214,7 @@
<select id="selectSndCountList" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailReqDto"
resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetail">
/* attractMgt-mapper.xml(selectSndCountList) */
SELECT DATE_FORMAT(ecm.SUM_YM, '%Y-%m') AS sumYm
, ecm.SND_CNT
, ecm.SUCC_CNT
@@ -351,6 +352,7 @@
<select id="sendNumberListExcel" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailReqDto"
resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetail">
/* attractMgt-mapper.xml(sendNumberListExcel) */
SELECT DATE_FORMAT(ecm.SUM_YM, '%Y-%m') AS SUM_YM
, ecm.SND_CNT
, S.SND_CNT AS SND_CNT_S

View File

@@ -234,4 +234,39 @@
WHERE
OPRTR_ID = #{oprtrId}
</update>
<select id="getAuthNumList" parameterType="kr.co.uplus.ez.api.login.dto.AuthNum" resultType="kr.co.uplus.ez.api.login.dto.AuthNum">
/* login-mapper.xml(getAuthNumList) */
SELECT
T2.SEQ_NO
,T1.OPRTR_ID
,T1.AUTHCHR_FAIL_CNT
,T2.AUTH_TP_CD
,T2.STTUS_CD
,T2.HP_NO
,T2.CHR_VAL
,T2.EXP_DT
,T2.REG_DT
,T2.REG_ID
,T2.CHG_ID
,T2.CHG_DT
FROM hubez_admin.EZ_ADM_USER T1
LEFT JOIN hubez_common.EZ_AUTH_CHR T2
ON T1.OPRTR_ID = T2.REG_ID
AND T1.HP_NO = T2.HP_NO
WHERE 1=1
<if test="regDt != null and regDt != ''">
AND T2.REG_DT >= DATE_SUB(#{regDt}, INTERVAL #{searchTime} MINUTE)
</if>
<if test="hpNo != null and hpNo != ''">
AND T2.HP_NO = #{hpNo}
</if>
<if test="sttusCd != null and sttusCd != ''">
AND T2.STTUS_CD = #{sttusCd}
</if>
<if test="authTpCd != null and authTpCd != ''">
AND T2.AUTH_TP_CD = #{authTpCd}
</if>
</select>
</mapper>

View File

@@ -115,7 +115,7 @@
, 0 as FB_SUCC_CNT
FROM hubez_common.EZ_WEB_MSG
WHERE 1=1
AND CH_STR = 'SMS'
AND CH_STR = #{chStr}
<if test='reqType != null and reqType != ""'>
<if test='reqType eq "M"'>
<![CDATA[
@@ -141,7 +141,7 @@
, SUM(IFNULL(FB_SUCC_CNT,0)) AS FB_SUCC_CNT
FROM hubez_common.EZ_WEB_MSG
WHERE 1=1
AND FB_CH_STR = 'SMS'
AND FB_CH_STR = #{chStr}
<if test='reqType != null and reqType != ""'>
<if test='reqType eq "M"'>
<![CDATA[

View File

@@ -205,64 +205,49 @@
</sql>
<select id="selectMsgBlckwordListTotalCnt" parameterType="kr.co.uplus.ez.api.riskMgt.dto.MsgIntrcpListReqDto" resultType="int">
/* riskMgt-mapper.xml(selectMsgBlckwordListTotalCnt) */
SELECT
COUNT(*) AS TOTAL_CNT
FROM
hubez_common.EZ_MSG_BLCKWORD emb
LEFT OUTER JOIN hubez_common.EZ_BLCKWORD_DTL ebd
ON emb.SEQ_NO = ebd.SEQ_NO
/* riskMgt-mapper.xml(selectMsgBlckwordListTotalCnt) */
SELECT COUNT(*) AS TOTAL_CNT
FROM hubez_common.EZ_MSG_BLCKWORD emb
WHERE 1 = 1
<include refid="msgBlckwordListCondition"/>
</select>
<select id="selectMsgBlckwordList" parameterType="kr.co.uplus.ez.api.riskMgt.dto.MsgIntrcpListReqDto" resultType="kr.co.uplus.ez.api.riskMgt.dto.MsgIntrcpList">
/* riskMgt-mapper.xml(selectMsgBlckwordList) */
SELECT
@ROWNUM := @ROWNUM + 1 AS NO
, A.*
FROM
(
SELECT
emb.SEQ_NO
, ebd.WORD
, (SELECT
T2.DTL_CD_NM AS codeNm
FROM hubez_common.EZ_CD_GRP T1
LEFT JOIN hubez_common.EZ_CD_DTL T2
ON T1.GRP_CD = T2.GRP_CD
WHERE T1.GRP_CD = 'SNDBLCK_YN_CD'
AND T2.DTL_CD=emb.BLCK_YN) AS BLCK_YN
, DATE_FORMAT(emb.CHG_DT , '%Y-%m-%d') AS LAST_CHG_DT
,(
SELECT
DTL_CD_NM
FROM
hubez_common.EZ_CD_DTL
WHERE
GRP_CD = 'SNDBLCK_RSN_CD'
AND DTL_CD = emb.BLCK_RSN_CD) AS BLCK_RSN_CD
, emb.REG_ID
FROM
hubez_common.EZ_MSG_BLCKWORD emb
LEFT OUTER JOIN hubez_common.EZ_BLCKWORD_DTL ebd
ON emb.SEQ_NO = ebd.SEQ_NO
WHERE 1 = 1
<include refid="msgBlckwordListCondition"/>
ORDER BY emb.CHG_DT DESC
LIMIT #{page}, #{pagePerRows} ) A
,( SELECT @ROWNUM := #{page} ) AS R;
/* riskMgt-mapper.xml(selectMsgBlckwordList) */
select @ROWNUM := @ROWNUM + 1 AS NO
, A.SEQ_NO
, ( select case when char_length(GROUP_CONCAT(WORD)) > 12 then concat(substr(GROUP_CONCAT(WORD) , 1, 12),'...')
else GROUP_CONCAT(WORD)
end
from hubez_common.EZ_BLCKWORD_DTL
where SEQ_NO = A.SEQ_NO
) as WORD
, (select DTL_CD_NM from hubez_common.EZ_CD_DTL where GRP_CD = 'SNDBLCK_YN_CD' and DTL_CD = A.BLCK_YN ) as BLCK_YN
, DATE_FORMAT(A.CHG_DT , '%Y-%m-%d') AS LAST_CHG_DT
, (select DTL_CD_NM from hubez_common.EZ_CD_DTL where GRP_CD = 'SNDBLCK_RSN_CD' and DTL_CD = A.BLCK_RSN_CD ) as BLCK_RSN_CD
, A.REG_ID
from (
select emb.SEQ_NO
, emb.BLCK_YN
, emb.BLCK_RSN_CD
, emb.REG_ID
, emb.CHG_DT
from hubez_common.EZ_MSG_BLCKWORD emb
where 1 = 1
<include refid="msgBlckwordListCondition"/>
ORDER BY emb.CHG_DT DESC
LIMIT #{page}, #{pagePerRows} ) A ,( SELECT @ROWNUM := #{page} ) AS R
</select>
<sql id="msgBlckwordListCondition">
<sql id="msgBlckwordListCondition">
<if test="regId != null and regId != ''">
AND UPPER(emb.REG_ID) LIKE UPPER(CONCAT('%', #{regId}, '%'))
AND emb.REG_ID LIKE CONCAT('%', #{regId}, '%')
</if>
<if test="blckRsnCd != null and blckRsnCd != ''">
AND emb.BLCK_RSN_CD = #{blckRsnCd}
</if>
<if test="word != null and word != ''">
AND UPPER(ebd.WORD) LIKE UPPER(CONCAT('%', #{word}, '%'))
and emb.SEQ_NO in (select SEQ_NO from hubez_common.EZ_BLCKWORD_DTL where WORD like CONCAT('%', #{word}, '%'))
</if>
</sql>

View File

@@ -25,7 +25,7 @@
from (
SELECT SUM(IFNULL(SND_CNT,0)) AS T_SND_CNT
,SUM(IFNULL(SUCC_CNT,0)) AS T_SUCC_CNT
,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS T_SUCC_RT
,TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS T_SUCC_RT
, 0 as S_SND_CNT
, 0 as S_SUCC_CNT
, 0 as S_SUCC_RT
@@ -47,7 +47,7 @@
, 0 as T_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS S_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS S_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS S_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS S_SUCC_RT
, 0 as L_SND_CNT
, 0 as L_SUCC_CNT
, 0 as L_SUCC_RT
@@ -70,7 +70,7 @@
, 0 as S_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS L_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS L_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS L_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS L_SUCC_RT
, 0 as M_SND_CNT
, 0 as M_SUCC_CNT
, 0 as M_SUCC_RT
@@ -93,7 +93,7 @@
, 0 as L_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS M_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS M_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS M_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS M_SUCC_RT
, 0 as A_SND_CNT
, 0 as A_SUCC_CNT
, 0 as A_SUCC_RT
@@ -116,7 +116,7 @@
, 0 as M_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS A_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS A_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS A_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS A_SUCC_RT
FROM hubez_common.EZ_MON_STAT
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')
@@ -143,7 +143,7 @@
SELECT SUM_YM
, SUM(IFNULL(SND_CNT,0)) AS T_SND_CNT
,SUM(IFNULL(SUCC_CNT,0)) AS T_SUCC_CNT
,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS T_SUCC_RT
,TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS T_SUCC_RT
, 0 as S_SND_CNT
, 0 as S_SUCC_CNT
, 0 as S_SUCC_RT
@@ -167,7 +167,7 @@
, 0 as T_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS S_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS S_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS S_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS S_SUCC_RT
, 0 as L_SND_CNT
, 0 as L_SUCC_CNT
, 0 as L_SUCC_RT
@@ -192,7 +192,7 @@
, 0 as S_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS L_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS L_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS L_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS L_SUCC_RT
, 0 as M_SND_CNT
, 0 as M_SUCC_CNT
, 0 as M_SUCC_RT
@@ -217,7 +217,7 @@
, 0 as L_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS M_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS M_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS M_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS M_SUCC_RT
, 0 as A_SND_CNT
, 0 as A_SUCC_CNT
, 0 as A_SUCC_RT
@@ -242,7 +242,7 @@
, 0 as M_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS A_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS A_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS A_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS A_SUCC_RT
FROM hubez_common.EZ_MON_STAT
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')
@@ -273,7 +273,7 @@
from (
SELECT SUM(IFNULL(SND_CNT,0)) AS T_SND_CNT
,SUM(IFNULL(SUCC_CNT,0)) AS T_SUCC_CNT
,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS T_SUCC_RT
,TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS T_SUCC_RT
, 0 as S_SND_CNT
, 0 as S_SUCC_CNT
, 0 as S_SUCC_RT
@@ -318,7 +318,7 @@
, 0 as S_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS L_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS L_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS L_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS L_SUCC_RT
, 0 as M_SND_CNT
, 0 as M_SUCC_CNT
, 0 as M_SUCC_RT
@@ -341,7 +341,7 @@
, 0 as L_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS M_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS M_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS M_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS M_SUCC_RT
, 0 as A_SND_CNT
, 0 as A_SUCC_CNT
, 0 as A_SUCC_RT
@@ -364,7 +364,7 @@
, 0 as M_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS A_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS A_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS A_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS A_SUCC_RT
FROM hubez_common.EZ_DAY_STAT
WHERE 1=1
AND SUM_YMD BETWEEN STR_TO_DATE(#{startDay},'%Y%m%d') AND STR_TO_DATE(#{endDay},'%Y%m%d')
@@ -391,7 +391,7 @@
SELECT SUM_YMD
, SUM(IFNULL(SND_CNT,0)) AS T_SND_CNT
,SUM(IFNULL(SUCC_CNT,0)) AS T_SUCC_CNT
,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS T_SUCC_RT
,TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS T_SUCC_RT
, 0 as S_SND_CNT
, 0 as S_SUCC_CNT
, 0 as S_SUCC_RT
@@ -415,7 +415,7 @@
, 0 as T_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS S_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS S_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS S_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS S_SUCC_RT
, 0 as L_SND_CNT
, 0 as L_SUCC_CNT
, 0 as L_SUCC_RT
@@ -440,7 +440,7 @@
, 0 as S_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS L_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS L_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS L_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS L_SUCC_RT
, 0 as M_SND_CNT
, 0 as M_SUCC_CNT
, 0 as M_SUCC_RT
@@ -465,7 +465,7 @@
, 0 as L_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS M_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS M_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS M_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS M_SUCC_RT
, 0 as A_SND_CNT
, 0 as A_SUCC_CNT
, 0 as A_SUCC_RT
@@ -490,7 +490,7 @@
, 0 as M_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS A_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS A_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS A_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS A_SUCC_RT
FROM hubez_common.EZ_DAY_STAT
WHERE 1=1
AND SUM_YMD BETWEEN STR_TO_DATE(#{startDay},'%Y%m%d') AND STR_TO_DATE(#{endDay},'%Y%m%d')
@@ -521,7 +521,7 @@
, t1.BIZRNO AS bizrno
, (t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) AS sndCnt
, (t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) AS succCnt
, round((t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) / (t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR), 2) as succRt
, TRUNCATE((t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) / (t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) * 100, 2) as succRt
, t2.sndCntS
, t2.succCntS
, t2.succRtS
@@ -576,7 +576,7 @@
, case when sndChCd = 'SMS' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as smsSuccCnt
, case when sndChCd = 'SMS' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'SMS' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as smsSuccRt
, case when sndChCd = 'LMS' then SUM(SND_CNT) + SUM(FBACK_CNT)
@@ -585,7 +585,7 @@
, case when sndChCd = 'LMS' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as lmsSuccCnt
, case when sndChCd = 'LMS' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'LMS' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as lmsSuccRt
, case when sndChCd = 'MMS' then SUM(SND_CNT) + SUM(FBACK_CNT)
@@ -594,7 +594,7 @@
, case when sndChCd = 'MMS' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as mmsSuccCnt
, case when sndChCd = 'MMS' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'MMS' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as mmsSuccRt
, case when sndChCd = 'ALIMTALK' then SUM(SND_CNT) + SUM(FBACK_CNT)
@@ -603,7 +603,7 @@
, case when sndChCd = 'ALIMTALK' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as alimtSuccCnt
, case when sndChCd = 'ALIMTALK' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'ALIMTALK' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as alimtSuccRt
from (
@@ -674,7 +674,7 @@
, t1.BIZRNO AS bizrno
, (t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) AS sndCnt
, (t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) AS succCnt
, round((t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) / (t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR), 2) as succRt
, TRUNCATE((t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) / (t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) * 100, 2) as succRt
, t2.sndCntS
, t2.succCntS
, t2.succRtS
@@ -728,7 +728,7 @@
, case when sndChCd = 'SMS' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as smsSuccCnt
, case when sndChCd = 'SMS' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'SMS' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as smsSuccRt
, case when sndChCd = 'LMS' then SUM(SND_CNT) + SUM(FBACK_CNT)
@@ -737,7 +737,7 @@
, case when sndChCd = 'LMS' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as lmsSuccCnt
, case when sndChCd = 'LMS' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'LMS' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as lmsSuccRt
, case when sndChCd = 'MMS' then SUM(SND_CNT) + SUM(FBACK_CNT)
@@ -746,7 +746,7 @@
, case when sndChCd = 'MMS' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as mmsSuccCnt
, case when sndChCd = 'MMS' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'MMS' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as mmsSuccRt
, case when sndChCd = 'ALIMTALK' then SUM(SND_CNT) + SUM(FBACK_CNT)
@@ -755,7 +755,7 @@
, case when sndChCd = 'ALIMTALK' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as alimtSuccCnt
, case when sndChCd = 'ALIMTALK' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'ALIMTALK' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as alimtSuccRt
from (
@@ -846,7 +846,7 @@
, t1.BIZRNO AS BIZRNO
, (t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) AS SND_CNT
, (t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) AS SUCC_CNT
, round((t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) / (t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR), 2) as SUCC_RT
, TRUNCATE((t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) / (t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) * 100, 2) as SUCC_RT
, t2.sndCntS as SND_CNT_S
, t2.succCntS as SUCC_CNT_S
, t2.succRtS as SUCC_RT_S
@@ -901,7 +901,7 @@
, case when sndChCd = 'SMS' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as smsSuccCnt
, case when sndChCd = 'SMS' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'SMS' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as smsSuccRt
, case when sndChCd = 'LMS' then SUM(SND_CNT) + SUM(FBACK_CNT)
@@ -910,7 +910,7 @@
, case when sndChCd = 'LMS' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as lmsSuccCnt
, case when sndChCd = 'LMS' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'LMS' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as lmsSuccRt
, case when sndChCd = 'MMS' then SUM(SND_CNT) + SUM(FBACK_CNT)
@@ -919,7 +919,7 @@
, case when sndChCd = 'MMS' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as mmsSuccCnt
, case when sndChCd = 'MMS' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'MMS' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as mmsSuccRt
, case when sndChCd = 'ALIMTALK' then SUM(SND_CNT) + SUM(FBACK_CNT)
@@ -928,7 +928,7 @@
, case when sndChCd = 'ALIMTALK' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as alimtSuccCnt
, case when sndChCd = 'ALIMTALK' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'ALIMTALK' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as alimtSuccRt
from (
@@ -999,7 +999,7 @@
, t1.BIZRNO AS BIZRNO
, (t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) AS SND_CNT
, (t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) AS SUCC_CNT
, round((t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) / (t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR), 2) as SUCC_RT
, TRUNCATE((t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) / (t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) * 100, 2) as SUCC_RT
, t2.sndCntS as SND_CNT_S
, t2.succCntS as SUCC_CNT_S
, t2.succRtS as SUCC_RT_S
@@ -1053,7 +1053,7 @@
, case when sndChCd = 'SMS' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as smsSuccCnt
, case when sndChCd = 'SMS' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'SMS' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as smsSuccRt
, case when sndChCd = 'LMS' then SUM(SND_CNT) + SUM(FBACK_CNT)
@@ -1062,7 +1062,7 @@
, case when sndChCd = 'LMS' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as lmsSuccCnt
, case when sndChCd = 'LMS' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'LMS' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as lmsSuccRt
, case when sndChCd = 'MMS' then SUM(SND_CNT) + SUM(FBACK_CNT)
@@ -1071,7 +1071,7 @@
, case when sndChCd = 'MMS' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as mmsSuccCnt
, case when sndChCd = 'MMS' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'MMS' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as mmsSuccRt
, case when sndChCd = 'ALIMTALK' then SUM(SND_CNT) + SUM(FBACK_CNT)
@@ -1080,7 +1080,7 @@
, case when sndChCd = 'ALIMTALK' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as alimtSuccCnt
, case when sndChCd = 'ALIMTALK' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'ALIMTALK' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as alimtSuccRt
from (