TC 수정건 적용 (디자인 및 기능)

This commit is contained in:
kimre
2022-07-18 19:34:34 +09:00
parent 2bfa07c17f
commit a6c6db6f22
40 changed files with 1783 additions and 1170 deletions

View File

@@ -560,8 +560,6 @@ header .user_wrap .user_info .logout {
margin-left: 10px; margin-left: 10px;
} }
/*******************20220715 퍼블 수정*******************/
.contents .input_box.cal input { .contents .input_box.cal input {
display: inline-block; display: inline-block;
width: 100%; width: 100%;
@@ -570,22 +568,19 @@ header .user_wrap .user_info .logout {
background-color:#fff; background-color:#fff;
} }
.contents .input_box.cal .term span:nth-of-type(1){ /*******************20220718 퍼블 수정*******************/
.contents .input_box.cal .term .icon_date:first-of-type{
margin-right: 4%; margin-right: 4%;
} }
.contents .input_box.cal .term span:nth-of-type(2){ .contents .input_box.cal .term .icon_date:nth-of-type(2){
margin-left: 4%; margin-left: 4%;
} }
/*******************************************/ /*******************************************/
/***** 20220715 퍼블 삭제
.contents .input_box.cal input + input{
margin-left: 5%;
} **/
.contents .input_box.cal.one{ .contents .input_box.cal.one{
width: 13.67%; width: 13.67%;
} }
@@ -604,11 +599,6 @@ header .user_wrap .user_info .logout {
align-items: center; align-items: center;
} }
/** 20220715 퍼블 삭제
.contents .input_box.cal .term input:nth-child(1){
margin-right: 4%;
} ***********/
.contents .input_box .search-box { .contents .input_box .search-box {
background: #fff url(../images/icon-search.png) no-repeat 6% center/14px auto; background: #fff url(../images/icon-search.png) no-repeat 6% center/14px auto;
padding-left: 43px; padding-left: 43px;
@@ -1582,11 +1572,25 @@ header .user_wrap .user_info .logout {
background: url(../images/icon-add-b.png) no-repeat center center; background: url(../images/icon-add-b.png) no-repeat center center;
} }
.popup.popup_form.register .input_add div:nth-child(2){ /********** 20220718 퍼블 수정 ************/
.popup.popup_form.register .input_add div+div{
width: 89%; width: 89%;
padding-top: 5px; padding-top: 5px;
} }
/********** 20220718 퍼블 추가 ************/
.popup.popup_inside{
max-height: 60vh;
}
.popup.popup_inside .pop-head{
left: 0px;
}
/****************************************/
.popup .button.white{ .popup .button.white{
background-color: #fff; background-color: #fff;
border-radius: 6px; border-radius: 6px;
@@ -1744,11 +1748,15 @@ header .user_wrap .user_info .logout {
align-items: flex-start; align-items: flex-start;
} }
.essential span{ /*******************20220718 퍼블 수정*******************/
/*color:#eb008b;*/
.essential label span{
color:#eb008b;
padding-right: 3px; padding-right: 3px;
} }
/**************************************/
textarea{ textarea{
resize: none; resize: none;
min-height: 100px; min-height: 100px;
@@ -1784,7 +1792,7 @@ textarea:focus{
.datepicker .datepicker-calender tr td:first-child a{color:#ff2e76;} .datepicker .datepicker-calender tr td:first-child a{color:#ff2e76;}
.datepicker .datepicker-head .datepicker-btn span{position: relative;} .datepicker .datepicker-head .datepicker-btn span{position: relative;}
.datepicker .datepicker-head .datepicker-prev span::after{position: absolute; left: 70px; top: 10px; content: ''; width: 10px; height: 10px; border-top: 2px solid #5f5f5f; border-right: 2px solid #5f5f5f; transform: rotate(225deg);} .datepicker .datepicker-head .datepicker-prev span::after{position: absolute; left: 70px; top: 10px; content: ''; width: 10px; height: 10px; border-top: 2px solid #5f5f5f; border-right: 2px solid #5f5f5f; transform: rotate(225deg);}
.datepicker .datepicker-head .datepicker-next span::after{position: absolute; left: 70px; top: 10px; content: ''; width: 10px; height: 10px; border-top: 2px solid #5f5f5f; border-right: 2px solid #5f5f5f; transform: rotate(45deg);} .datepicker .datepicker-head .datepicker-next span::after{position: absolute; left: 185px; top: 10px; content: ''; width: 10px; height: 10px; border-top: 2px solid #5f5f5f; border-right: 2px solid #5f5f5f; transform: rotate(45deg);}
.datepicker .datepicker-calender td:hover:not(.disabled){background-color: #efefef; border-radius: 50%;} .datepicker .datepicker-calender td:hover:not(.disabled){background-color: #efefef; border-radius: 50%;}
.datepicker .datepicker-calender td:hover a{color:#000;} .datepicker .datepicker-calender td:hover a{color:#000;}
.datepicker .datepicker-calender .today{background-color: #7c7c7c; border-radius: 50%;} .datepicker .datepicker-calender .today{background-color: #7c7c7c; border-radius: 50%;}

View File

@@ -60,6 +60,25 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 저장 - 중복된 발신번호 -->
<div class="dimmed sendNumFailMsg" @click="sendNumFailMsgClose();"></div>
<div class="popup-wrap sendNumFailMsg">
<div class="popup sendNumFailMsg">
<div class="pop-head">
<h3 class="pop-tit">중복된 발신번호</h3>
</div>
<div class="pop-cont">
<p>등록된 발신번호가 있습니다.</p>
<p v-html="failMsg"></p>
</div>
<div class="popup-btn2">
<button class="btn-pcolor" @click="sendNumFailMsgClose();">확인</button>
<!-- <button class="btn-default" @click="sendNumFailMsgCancel();">취소</button>-->
</div>
</div>
</div>
</div> </div>
</template> </template>
@@ -75,6 +94,7 @@ export default {
msg2: '', msg2: '',
msg3: '', msg3: '',
msg4: '', msg4: '',
failMsg:'',
} }
}, },
methods: { methods: {
@@ -171,12 +191,42 @@ export default {
// 부모 함수 호출. // 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row); this.$parent.confirmCalbackFnc(this.row);
}, },
sendNumFailMsgOpen(props){
this.failMsg = props.failMsg
var dimmed = document.getElementsByClassName('sendNumFailMsg');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'block';
}
},
sendNumFailMsgClose(){
var dimmed = document.getElementsByClassName('sendNumFailMsg');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
}
},
} }
} }
</script> </script>
<style> <style>
.popup-btn-wrap {width: 500px; margin: auto; padding: 100px 0;} .popup-btn-wrap {
.popup-btn-wrap button {width: 100%; margin-bottom: 10px; height: 50px; border-radius: 5px; box-shadow: none; border: 1px solid #000; } width: 500px;
.popup-btn-wrap button:hover {background: #000; color: #fff;} 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

@@ -30,11 +30,11 @@
"name": "이름" "name": "이름"
}, },
{ {
"key": "subsSttusCd", "key": "subsSttusNm",
"name": "상태" "name": "상태"
}, },
{ {
"key": "custTyCd", "key": "custTyNm",
"name": "구분" "name": "구분"
}, },
{ {

View File

@@ -38,6 +38,7 @@
</div> </div>
</div> </div>
<!-- <validationConfirm-modal ref="validationConfirmPop"></validationConfirm-modal>--> <!-- <validationConfirm-modal ref="validationConfirmPop"></validationConfirm-modal>-->
<common-modal ref="commmonModal"></common-modal>
</div> </div>
</div> </div>
</template> </template>
@@ -49,6 +50,7 @@ import {utils_mixin, chkPattern2} from '../service/mixins';
import xlsx from '@/common/excel'; import xlsx from '@/common/excel';
import moment from 'moment'; import moment from 'moment';
import XLSX from 'xlsx'; import XLSX from 'xlsx';
import commonModal from "../components/commonModal";
// import ValidationConfirmPop from "./ValidationConfirmPop"; // import ValidationConfirmPop from "./ValidationConfirmPop";
export default { export default {
@@ -65,10 +67,14 @@ export default {
nData: [], nData: [],
oData: [], oData: [],
totalItems: 0, totalItems: 0,
totalCnt: 0,
failCnt: 0,
insertRowCnt: 0
}; };
}, },
components: { components: {
// ValidationConfirmPop, // ValidationConfirmPop,
commonModal
}, },
created() { created() {
this.getExcelHeader(); this.getExcelHeader();
@@ -145,8 +151,32 @@ export default {
this.nData = []; this.nData = [];
this.oData = []; this.oData = [];
const file = event.target.files[0]; const file = event.target.files[0];
// 파일 개수 제한
if(file != null){
let element = document.getElementById('uploadFile');
while (element.firstChild) {
element.removeChild(element.firstChild);
}
}
console.log(file.name); console.log(file.name);
// 파일 이름 체크
var fileName = file.name;
var fileExpend = fileName .slice(fileName .indexOf(".") + 1).toLowerCase();
if(fileExpend != "xlsx"){
//alert("파일은 (xlsx) 형식만 등록 가능합니다.");
this.row.title = '파일 업로드';
this.row.msg1 = '샘플과 동일한 확장자가 아닙니다.';
this.row.msg1 = '다시 업로드 해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
// inner Html. // inner Html.
const button = document.createElement('button'); const button = document.createElement('button');
@@ -176,12 +206,14 @@ export default {
let workbook = XLSX.read(data, {type: 'binary'}); let workbook = XLSX.read(data, {type: 'binary'});
workbook.SheetNames.forEach((sheetName) => { workbook.SheetNames.forEach((sheetName) => {
const rowObj = XLSX.utils.sheet_to_json(workbook.Sheets[sheetName], {raw: true}); const rowObj = XLSX.utils.sheet_to_json(workbook.Sheets[sheetName], {raw: true});
console.log(rowObj);
tmpResult = rowObj; tmpResult = rowObj;
const limitCnt = 100; const limitCnt = 100;
const totalCnt = Number(this.totalItems) + rowObj.length; this.totalCnt = Number(this.totalItems) + rowObj.length;
this.insertRowCnt = rowObj.length;
if (totalCnt > limitCnt) { console.log('totalCnt : '+this.totalCnt +' limitCnt : '+limitCnt);
if (this.totalCnt > limitCnt) {
this.row.title = '청약고객관리'; this.row.title = '청약고객관리';
this.row.msg1 = '100건이상은 등록되지 않습니다.'; this.row.msg1 = '100건이상은 등록되지 않습니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
@@ -286,12 +318,12 @@ export default {
const result = response.data; const result = response.data;
console.log(result); console.log(result);
if (result != null && result.retCode == '0000') { if (result != null && result.retCode == '0000') {
this.totalCnt = result.data.totalCnt; //this.totalCnt = result.data.totalCnt;
this.successCnt = result.data.successCnt; this.successCnt = result.data.successCnt;
this.failCnt = result.data.failCnt; this.failCnt = Number(this.failCnt) + Number(result.data.failCnt);
if (result.data.failCnt > 0) { if (result.data.failCnt > 0) {
this.row.totalCnt = this.totalCnt this.row.totalCnt = this.insertRowCnt
this.row.successCnt = this.successCnt this.row.successCnt = this.successCnt
this.row.failCnt = this.failCnt this.row.failCnt = this.failCnt
this.$parent.$refs.validationConfirmPopModal.failFileuploadOpen(this.row); this.$parent.$refs.validationConfirmPopModal.failFileuploadOpen(this.row);
@@ -319,6 +351,14 @@ export default {
this.$parent.memberDetail(this.adminId); this.$parent.memberDetail(this.adminId);
} }
}, },
checkFocus() {
this.$refs.file.value = null;
let element = document.getElementById('uploadFile');
while (element.firstChild) {
element.removeChild(element.firstChild);
}
}
}, },
}; };
</script> </script>

View File

@@ -338,8 +338,8 @@ export default {
for (var i = 0; i < dimmed.length; i++) { for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none'; dimmed[i].style.display = 'none';
} }
// 목록페이지 이동 // 화면 리로드
this.$parent.toComplete(); this.$parent.successFileuploadOk();
}, },
// 정상완료 후 목록페이지 이동 // 정상완료 후 목록페이지 이동
toComplete() { toComplete() {

View File

@@ -439,6 +439,20 @@ export default {
this.memberDelete(); this.memberDelete();
} }
}, },
// 대량 등록후 확인 처리
failFileuploadOk(){
// 대량등록 팝업 닫기
this.$refs.memberBulkRegPop.excelPopClose();
// reroad
this.memberDetail(this.$route.params.serviceId);
}
,successFileuploadOk(){
// 대량등록 팝업 닫기
this.$refs.memberBulkRegPop.excelPopClose();
// reroad
this.memberDetail(this.$route.params.serviceId);
}
}, },
}; };

View File

@@ -73,7 +73,7 @@
</select> </select>
</div> </div>
<div class="input_box"> <div class="input_box">
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model="grid.params.searchText1" <input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model.trim="grid.params.searchText1"
maxlength="100" @keyup.enter="search"/> maxlength="100" @keyup.enter="search"/>
</div> </div>
<button type="button" class="button grey" @click="search">조회</button> <button type="button" class="button grey" @click="search">조회</button>

View File

@@ -123,10 +123,16 @@ export default {
if(rsp.retCode == '0000'){ if(rsp.retCode == '0000'){
var path = rsp.data.nextUrl; var path = rsp.data.nextUrl;
console.log(path); console.log(path);
console.log(rsp.data);
vm.chgChkUserId(); vm.chgChkUserId();
vm.$store.commit("login/isLogin", true); vm.$store.commit("login/isLogin", true);
vm.$store.commit("login/savePwd", oprtrPw); vm.$store.commit("login/savePwd", oprtrPw);
vm.$router.push({ name: 'loginAuth',params: {userId : oprtrId}}); vm.$router.push({ name: 'loginAuth',params: {userId : oprtrId}});
} else if(rsp.retCode == '1001'){ // 비밀번호 변경
console.log('=-==-=-=-');
console.log(this.userId);
vm.chgChkUserId();
this.$router.push({ name: 'updatePassword',params: {userId : this.userId}});
}else if(rsp.retCode == '4003') { // ID 조회 없음. }else if(rsp.retCode == '4003') { // ID 조회 없음.
this.row.title = '로그인 실패'; this.row.title = '로그인 실패';
this.row.msg1 = '등록되지 않은 아이디입니다.'; this.row.msg1 = '등록되지 않은 아이디입니다.';

View File

@@ -128,7 +128,7 @@ export default {
this.row.title = '비밀번호 변경'; this.row.title = '비밀번호 변경';
this.row.msg1 = '비밀번호가 정상적으로 변경되었습니다.'; this.row.msg1 = '비밀번호가 정상적으로 변경되었습니다.';
this.row.msg2 = '변경된 비밀번호로 다시 로그인 해주세요.'; this.row.msg2 = '변경된 비밀번호로 다시 로그인 해주세요.';
this.callFnc = 'login' this.row.callFnc = 'login'
this.$refs.commonModal.alertModalOpen(this.row); this.$refs.commonModal.alertModalOpen(this.row);
} else if(rsp.retCode == '4016') { } else if(rsp.retCode == '4016') {
this.row.title = '비밀번호 변경'; this.row.title = '비밀번호 변경';
@@ -176,6 +176,7 @@ export default {
this.$refs.oldPw.focus(target); this.$refs.oldPw.focus(target);
}, },
alertCalbackFnc(callFnc){ alertCalbackFnc(callFnc){
console.log(callFnc);
if(callFnc === 'login'){ if(callFnc === 'login'){
this.$router.push({ name: 'login',params: {}}); this.$router.push({ name: 'login',params: {}});
} }

View File

@@ -14,7 +14,7 @@
<tr> <tr>
<th>차단문구</th> <th>차단문구</th>
<td class="input_add"> <td class="input_add">
<input v-model="word" ref="_word"> <input v-model="word" ref="_word" maxlength="10" @input="msgLimitByte()">
<button type="button" class="button white add" @click="doAdd"></button> <button type="button" class="button white add" @click="doAdd"></button>
</td> </td>
</tr> </tr>
@@ -292,7 +292,40 @@ export default {
this.$refs.ValidationConfirmPopup.msgConfirmDeleteOpen(); this.$refs.ValidationConfirmPopup.msgConfirmDeleteOpen();
} }
}, },
// 바이트길이 구하기
getByteLength: function (decimal) {
return (decimal >> 7) || (this.LINE_FEED === decimal) ? 2 : 1
},
getByte: function (str) {
return str
.split('')
.map((s) => s.charCodeAt(0))
.reduce((prev, unicodeDecimalValue) => prev + this.getByteLength(unicodeDecimalValue), 0)
},
getLimitedByteText: function (inputText, maxByte) {
const characters = inputText.split('')
let validText = ''
let totalByte = 0
for (let i = 0; i < characters.length; i += 1) {
const character = characters[i]
const decimal = character.charCodeAt(0)
const byte = this.getByteLength(decimal) // 글자 한 개가 몇 바이트 길이인지 구해주기
// console.log(byte)
// 현재까지의 바이트 길이와 더해 최대 바이트 길이를 넘지 않으면
if (totalByte + byte <= maxByte) {
totalByte += byte // 바이트 길이 값을 더해 현재까지의 총 바이트 길이 값을 구함
validText += character // 글자를 더해 현재까지의 총 문자열 값을 구함
} else { // 최대 바이트 길이를 넘으면
break // for 루프 종료
}
}
return validText
},
msgLimitByte(){
this.word = this.getLimitedByteText(this.word, 10);
}
}, },

View File

@@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<!-- 관리자ID 조회 --> <!-- 관리자ID 조회 -->
<div class="popup popup_form modal44"> <div class="popup popup_form modal44 popup_inside">
<div class="pop-head"> <div class="pop-head">
<h3 class="pop-tit">관리자ID 조회</h3> <h3 class="pop-tit">관리자ID 조회</h3>
</div> </div>

View File

@@ -125,7 +125,6 @@
</div> </div>
<admin-list-pop ref="admnListPop" :send-data="childData" @event-data="setChildData"/> <admin-list-pop ref="admnListPop" :send-data="childData" @event-data="setChildData"/>
<!-- <common-modal ref="commmonModal2"></common-modal>-->
</div> </div>
</div> </div>
</template> </template>
@@ -133,7 +132,6 @@
<script> <script>
import AdminListPop from "@/modules/sendNumMgt/components/AdminListPop"; import AdminListPop from "@/modules/sendNumMgt/components/AdminListPop";
import {utils_mixin, chkPattern2} from '../service/mixins'; import {utils_mixin, chkPattern2} from '../service/mixins';
// import commonModal from "@/components/modal/commonModal";
import sendNumMgtApi from "@/modules/sendNumMgt/service/sendNumMgtApi"; import sendNumMgtApi from "@/modules/sendNumMgt/service/sendNumMgtApi";
export default { export default {
@@ -235,11 +233,34 @@ export default {
formReset() { formReset() {
Object.assign(this.$data, this.$options.data()); Object.assign(this.$data, this.$options.data());
}, },
fileExtCheck(file){
// 마지막 . 위치를 찾고 + 1 하여 확장자 명을 가져온다.
let fileExt = file.name.substring(
file.name.lastIndexOf(".") + 1
)
// 소문자로 변환
fileExt = fileExt.toLowerCase()
// 이미지 확장자 체크, jpg, png, pdf, tiff
if (["jpeg", "png", "pdf", "tiff"].includes(fileExt)) {
return true;
} else {
this.row.title = '발신번호 파일 업로드';
this.row.msg1 = '첨부파일을 확인해 주세요.';
this.row.msg2 = '파일형식 : jpg, png, pdf, tiff (최대5MB)';
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
return false
}
},
// 위임-수임 // 위임-수임
readTrustFile(event) { readTrustFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
console.log(file.name); console.log(file.name);
if(this.fileExtCheck(file)) {
if (file != null) {
this.delTrustFile(event);
}
// inner Html. // inner Html.
const button = document.createElement('button'); const button = document.createElement('button');
const text = document.createElement('p'); const text = document.createElement('p');
@@ -252,6 +273,7 @@ export default {
root.appendChild(text); root.appendChild(text);
root.appendChild(button); root.appendChild(button);
this.trustFile = file; this.trustFile = file;
}
}, },
delTrustFile(event) { delTrustFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
@@ -265,6 +287,10 @@ export default {
// 위임장 // 위임장
readWarrantFile(event) { readWarrantFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
if(this.fileExtCheck(file)) {
if (file != null) {
this.delWarrantFile(event);
}
// inner Html. // inner Html.
const button = document.createElement('button'); const button = document.createElement('button');
@@ -278,6 +304,7 @@ export default {
root.appendChild(text); root.appendChild(text);
root.appendChild(button); root.appendChild(button);
this.warrantFile = file; this.warrantFile = file;
}
}, },
delWarrantFile(event) { delWarrantFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
@@ -291,6 +318,10 @@ export default {
// 대리인 // 대리인
readDeputyFile(event) { readDeputyFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
if(this.fileExtCheck(file)) {
if (file != null) {
this.delDeputyFile(event);
}
// inner Html. // inner Html.
const button = document.createElement('button'); const button = document.createElement('button');
@@ -305,7 +336,7 @@ export default {
root.appendChild(button); root.appendChild(button);
this.deputyFile = file this.deputyFile = file
}
}, },
delDeputyFile(event) { delDeputyFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
@@ -319,6 +350,10 @@ export default {
// 재직 // 재직
readTenureFile(event) { readTenureFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
if(this.fileExtCheck(file)) {
if (file != null) {
this.delTenureFile(event);
}
// inner Html. // inner Html.
const button = document.createElement('button'); const button = document.createElement('button');
@@ -332,6 +367,7 @@ export default {
root.appendChild(text); root.appendChild(text);
root.appendChild(button); root.appendChild(button);
this.tenureFile = file; this.tenureFile = file;
}
}, },
delTenureFile(event) { delTenureFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
@@ -345,6 +381,10 @@ export default {
//사업자 등록증. //사업자 등록증.
readBusinessFile(event) { readBusinessFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
if(this.fileExtCheck(file)) {
if (file != null) {
this.delBusinessFile(event);
}
// inner Html. // inner Html.
const button = document.createElement('button'); const button = document.createElement('button');
@@ -358,6 +398,7 @@ export default {
root.appendChild(text); root.appendChild(text);
root.appendChild(button); root.appendChild(button);
this.businessFile = file; this.businessFile = file;
}
}, },
delBusinessFile(event) { delBusinessFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
@@ -371,6 +412,10 @@ export default {
//통신서비스 증명원 //통신서비스 증명원
readCommunicationFile(event) { readCommunicationFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
if(this.fileExtCheck(file)) {
if (file != null) {
this.delCommunicationFile(event);
}
// inner Html. // inner Html.
const button = document.createElement('button'); const button = document.createElement('button');
@@ -384,6 +429,7 @@ export default {
root.appendChild(text); root.appendChild(text);
root.appendChild(button); root.appendChild(button);
this.communicationFile = file; this.communicationFile = file;
}
}, },
delCommunicationFile(event) { delCommunicationFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
@@ -397,6 +443,10 @@ export default {
// 타사업자 등록증 // 타사업자 등록증
readOtherBusinessFile(event) { readOtherBusinessFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
if(this.fileExtCheck(file)) {
if (file != null) {
this.delOtherBusinessFile(event);
}
// inner Html. // inner Html.
const button = document.createElement('button'); const button = document.createElement('button');
@@ -410,6 +460,7 @@ export default {
root.appendChild(text); root.appendChild(text);
root.appendChild(button); root.appendChild(button);
this.otherBusinessFile = file; this.otherBusinessFile = file;
}
}, },
delOtherBusinessFile(event) { delOtherBusinessFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
@@ -439,28 +490,85 @@ export default {
if (this.bizrAuthYn !== 'Y') { if (this.bizrAuthYn !== 'Y') {
if (this.nmineeDivCd === '01') { if (this.nmineeDivCd === '01') {
// 사업자 // 사업자
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) 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; const result = response.data;
console.log(result) console.log(result)
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == "0000") {
if(result.data.list.length > 0){
this.row.title = '발신번호 등록';
var failMsg = "";
for(var i=0; i<result.data.list.length; i++){
failMsg += "[" + (i+1) + "] " + result.data.list[i].sendNum + "<br>"
}
this.row.failMsg = failMsg
this.$parent.$refs.commmonModal.sendNumFailMsgOpen(this.row);
}
this.toComplete() this.toComplete()
}else if(result != null && result.retCode == "4021") {
if(result.data.list.length > 0){
this.row.title = '발신번호 등록';
var failMsg = "";
for(var i=0; i<result.data.list.length; i++){
failMsg += "[" + (i+1) + "] " + result.data.list[i].sendNum + "<br>"
}
this.row.failMsg = failMsg
this.$parent.$refs.commmonModal.sendNumFailMsgOpen(this.row);
}
return false;
} }
} else if (this.nmineeDivCd === '02') { } else if (this.nmineeDivCd === '02') {
const response = await sendNumMgtApi.insertNumber2(this.trustFile, this.warrantFile, this.deputyFile, this.tenureFile, this.otherBusinessFile, this.businessFile, this.adminId, this.custNm, this.bRegNo, this.nmineeDivCd, this.saveSendNums, this.bizrAuthYn, this.custSeq) const response = await sendNumMgtApi.insertNumber2(this.trustFile, this.warrantFile, this.deputyFile, this.tenureFile, this.otherBusinessFile, this.businessFile, this.adminId, this.custNm, this.bRegNo, this.nmineeDivCd, this.saveSendNums, this.bizrAuthYn, this.custSeq, this.bRegNo)
const result = response.data; const result = response.data;
console.log(result) console.log(result)
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == "0000") {
if(result.data.list.length > 0){
this.row.title = '발신번호 등록';
var failMsg = "";
for(var i=0; i<result.data.list.length; i++){
failMsg += "[" + (i+1) + "] " + result.data.list[i].sendNum + "<br>"
}
this.row.failMsg = failMsg
this.$parent.$refs.commmonModal.sendNumFailMsgOpen(this.row);
}
this.toComplete() this.toComplete()
}else if(result != null && result.retCode == "4021") {
if(result.data.list.length > 0){
this.row.title = '발신번호 등록';
var failMsg = "";
for(var i=0; i<result.data.list.length; i++){
failMsg += "[" + (i+1) + "] " + result.data.list[i].sendNum + "<br>"
}
this.row.failMsg = failMsg
this.$parent.$refs.commmonModal.sendNumFailMsgOpen(this.row);
}
return false;
} }
} }
} else { } else {
const response = await sendNumMgtApi.insertNumber(this.adminId, this.custNm, this.bRegNo, this.nmineeDivCd, this.saveSendNums, this.bizrAuthYn, this.custSeq) const response = await sendNumMgtApi.insertNumber(this.adminId, this.custNm, this.bRegNo, this.nmineeDivCd, this.saveSendNums, this.bizrAuthYn, this.custSeq, this.bRegNo)
const result = response.data; const result = response.data;
console.log(result) console.log(result)
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == "0000") {
if(result.data.list.length > 0){
this.row.title = '발신번호 등록';
var failMsg = "";
for(var i=0; i<result.data.list.length; i++){
failMsg += "[" + (i+1) + "] " + result.data.list[i].sendNum + "<br>"
}
this.row.failMsg = failMsg
this.$parent.$refs.commmonModal.sendNumFailMsgOpen(this.row);
}
this.toComplete() this.toComplete()
}else if(result != null && result.retCode == "4021") {
var failMsg = "";
for(var i=0; i<result.data.list.length; i++){
failMsg += "[" + (i+1) + "] " + result.data.list[i].sendNum + "<br>"
}
this.row.failMsg = failMsg
this.$parent.$refs.commmonModal.sendNumFailMsgOpen(this.row);
return false;
} }
} }
} }
@@ -479,6 +587,7 @@ export default {
this.$parent.$refs.commmonModal.alertModalOpen(this.row); this.$parent.$refs.commmonModal.alertModalOpen(this.row);
return false; return false;
} }
if (this.bizrAuthYn !== 'Y') {
if (this.nmineeDivCd == '01') { if (this.nmineeDivCd == '01') {
if (this.communicationFile == null) { if (this.communicationFile == null) {
this.row.title = '발신번호 등록'; this.row.title = '발신번호 등록';
@@ -498,6 +607,7 @@ export default {
this.$parent.$refs.commmonModal.alertModalOpen(this.row); this.$parent.$refs.commmonModal.alertModalOpen(this.row);
return false return false
} }
} else { } else {
if (this.trustFile == null) { if (this.trustFile == null) {
this.row.title = '발신번호 등록'; this.row.title = '발신번호 등록';
@@ -542,6 +652,7 @@ export default {
return false return false
} }
} }
}
return true; return true;
}, },
toComplete() { toComplete() {

View File

@@ -27,7 +27,8 @@ const insertNumber = (adminId, custNm, bRegNo, nmineeDivCd, numberInputs, bizrAu
const row = {} const row = {}
row.adminId = adminId row.adminId = adminId
row.custNm = custNm row.custNm = custNm
row.bRegNo = bRegNo row.bregno = bRegNo
row.nmineeDivCd = nmineeDivCd
row.list = numberInputs row.list = numberInputs
row.bizrAuthYn = bizrAuthYn row.bizrAuthYn = bizrAuthYn
row.custSeq = custSeq row.custSeq = custSeq
@@ -54,7 +55,7 @@ const insertNumber1 = (tenureFile, businessFile, communicationFile, adminId, cus
const row = {} const row = {}
row.adminId = adminId row.adminId = adminId
row.custNm = custNm row.custNm = custNm
row.bRegNo = bRegNo row.bregno = bRegNo
row.nmineeDivCd = nmineeDivCd row.nmineeDivCd = nmineeDivCd
row.list = numberInputs row.list = numberInputs
row.bizrAuthYn = bizrAuthYn row.bizrAuthYn = bizrAuthYn
@@ -85,7 +86,7 @@ const insertNumber2 = (trustFile, warrantFile, deputyFile, tenureFile, otherBusi
const row = {} const row = {}
row.adminId = adminId row.adminId = adminId
row.custNm = custNm row.custNm = custNm
row.bRegNo = bRegNo row.bregno = bRegNo
row.nmineeDivCd = nmineeDivCd row.nmineeDivCd = nmineeDivCd
row.list = numberInputs row.list = numberInputs
row.bizrAuthYn = bizrAuthYn row.bizrAuthYn = bizrAuthYn

View File

@@ -174,8 +174,7 @@ const utils_mixin = {
var chkPattern2 = { var chkPattern2 = {
data: function () { data: function () {
return { return {}
}
}, },
methods: { methods: {
selSesStorage(keyLike) { selSesStorage(keyLike) {
@@ -362,9 +361,15 @@ var chkPattern2 = {
if (str.charAt(0) != "0") { if (str.charAt(0) != "0") {
str = "0" + str; str = "0" + str;
} }
if (str.length<10||str.length>12){return "";} if (str.length < 10 || str.length > 12) {
if (isNaN(str)){return ""; } return "";
if (str.substr(0,2)!="01" && str.substr(0,3)!="070" && str.substr(0,4)!="0505" && str.substr(0,4)!="0503"){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; return str;
}, },

View File

@@ -311,7 +311,12 @@ export default {
this.$refs.searchIdPopModal.searchIdFailPop(); this.$refs.searchIdPopModal.searchIdFailPop();
}, },
resetRegPop() { resetRegPop() {
this.formReset(); // this.formReset();
this.madangId = '';
this.userNm = '';
this.email = '';
this.mdn = '';
this.code = '';
this.$refs.madangId.focus(); this.$refs.madangId.focus();
}, },

View File

@@ -13,11 +13,11 @@
<tbody> <tbody>
<tr class="tr_input w30"> <tr class="tr_input w30">
<th>권한명</th> <th>권한명</th>
<td colspan="5"><input type="text" v-model.trim="authNm" ref="_authNm"></td> <td colspan="5"><input type="text" v-model.trim="authNm" ref="_authNm" maxlength="100"></td>
</tr> </tr>
<tr class="tr_input w75"> <tr class="tr_input w75">
<th>권한 코드</th> <th>권한 코드</th>
<td colspan="2"><input type="text" v-model.trim="authCd" ref="_authCd"></td> <td colspan="2"><input type="text" v-model.trim="authCd" ref="_authCd" maxlength="4"></td>
<th class="center">상태</th> <th class="center">상태</th>
<td class="td_radio" colspan="2"> <td class="td_radio" colspan="2">
<input type="radio" name="state" value="01" id="right_radio1" v-model="stat" checked> <input type="radio" name="state" value="01" id="right_radio1" v-model="stat" checked>
@@ -28,7 +28,7 @@
</tr> </tr>
<tr class="tr_input w100"> <tr class="tr_input w100">
<th>권한 설명</th> <th>권한 설명</th>
<td colspan="5"><input type="text" v-model="authDesc"></td> <td colspan="5"><input type="text" v-model.trim="authDesc" maxlength="100"></td>
</tr> </tr>
<tr class="tr_checkbox"> <tr class="tr_checkbox">
<td class="check" rowspan="2"> <td class="check" rowspan="2">
@@ -184,7 +184,6 @@
import sysMgtApi from "../service/sysMgtApi.js"; import sysMgtApi from "../service/sysMgtApi.js";
import {utils_mixin, chkPattern2} from '../service/mixins'; import {utils_mixin, chkPattern2} from '../service/mixins';
//import commonModal from "@/components/modal/commonModal";
import commonModal from "../components/commonModal"; import commonModal from "../components/commonModal";
export default { export default {
@@ -223,7 +222,8 @@ export default {
this.row.title = '시스템관리'; this.row.title = '시스템관리';
this.row.msg1 = '권한명을 입력해 주세요.'; this.row.msg1 = '권한명을 입력해 주세요.';
this.row.focusTaget = '1'; this.row.focusTaget = '1';
this.$refs.commmonModal.alertModalOpen(this.row); console.log(this.row)
this.$refs.commmonModal.alertSysModalOpen(this.row);
return false; return false;
} }
@@ -231,7 +231,7 @@ export default {
this.row.title = '시스템관리'; this.row.title = '시스템관리';
this.row.msg1 = '권한 코드를 입력해 주세요.'; this.row.msg1 = '권한 코드를 입력해 주세요.';
this.row.focusTaget = '2'; this.row.focusTaget = '2';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertSysModalOpen(this.row);
return false; return false;
} }
@@ -246,14 +246,14 @@ export default {
if (this.isNull(this.stat)) { if (this.isNull(this.stat)) {
this.row.title = '시스템관리'; this.row.title = '시스템관리';
this.row.msg1 = '상태를 체크해 주세요.'; this.row.msg1 = '상태를 체크해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertSysModalOpen(this.row);
return false; return false;
} }
if (this.checkedAuthMenu.length == 0) { if (this.checkedAuthMenu.length == 0) {
this.row.title = '시스템관리'; this.row.title = '시스템관리';
this.row.msg1 = '메뉴 권한 체크를 해주세요.'; this.row.msg1 = '메뉴 권한 체크를 해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertSysModalOpen(this.row);
return false; return false;
} }
@@ -312,7 +312,7 @@ export default {
this.row.title = '시스템관리'; this.row.title = '시스템관리';
this.row.msg1 = '권한코드가 이미 존재합니다.'; this.row.msg1 = '권한코드가 이미 존재합니다.';
this.row.focusTaget = '2'; this.row.focusTaget = '2';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertSysModalOpen(this.row);
return false; return false;
} else { } else {
@@ -320,7 +320,7 @@ export default {
this.row.title = '시스템관리'; this.row.title = '시스템관리';
this.row.msg1 = '실패 하였습니다.'; this.row.msg1 = '실패 하였습니다.';
this.row.focusTaget = '0'; this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertSysModalOpen(this.row);
return false; return false;
} }
@@ -329,7 +329,7 @@ export default {
this.row.title = '시스템관리'; this.row.title = '시스템관리';
this.row.msg1 = '실패 하였습니다.'; this.row.msg1 = '실패 하였습니다.';
this.row.focusTaget = '0'; this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertSysModalOpen(this.row);
return false; return false;
} }

View File

@@ -13,7 +13,7 @@
<tbody> <tbody>
<tr class="tr_input w30"> <tr class="tr_input w30">
<th>권한명</th> <th>권한명</th>
<td colspan="5"><input type="text" v-model.trim="authNm" ref="_authNm"></td> <td colspan="5"><input type="text" v-model.trim="authNm" ref="_authNm" maxlength="100"></td>
</tr> </tr>
<tr class="tr_input w75"> <tr class="tr_input w75">
<th>권한 코드</th> <th>권한 코드</th>
@@ -28,7 +28,7 @@
</tr> </tr>
<tr class="tr_input w100"> <tr class="tr_input w100">
<th>권한 설명</th> <th>권한 설명</th>
<td colspan="5"><input type="text" v-model="authDesc"></td> <td colspan="5"><input type="text" v-model="authDesc" maxlength="100"></td>
</tr> </tr>
<tr class="tr_checkbox"> <tr class="tr_checkbox">
<td class="check" rowspan="2"> <td class="check" rowspan="2">
@@ -229,7 +229,7 @@ export default {
this.row.title = '시스템관리'; this.row.title = '시스템관리';
this.row.msg1 = '권한명을 입력해 주세요.'; this.row.msg1 = '권한명을 입력해 주세요.';
this.row.focusTaget = '1'; this.row.focusTaget = '1';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertSysModalOpen(this.row);
return false; return false;
} }
@@ -237,7 +237,7 @@ export default {
this.row.title = '시스템관리'; this.row.title = '시스템관리';
this.row.msg1 = '권한 코드를 입력해 주세요.'; this.row.msg1 = '권한 코드를 입력해 주세요.';
this.row.focusTaget = '2'; this.row.focusTaget = '2';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertSysModalOpen(this.row);
return false; return false;
} }
@@ -245,21 +245,21 @@ export default {
this.row.title = '시스템관리'; this.row.title = '시스템관리';
this.row.msg1 = '권한코드는 영문과 숫자포함 최대4자리까지 입력해주세요.'; this.row.msg1 = '권한코드는 영문과 숫자포함 최대4자리까지 입력해주세요.';
this.row.focusTaget = '2'; this.row.focusTaget = '2';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertSysModalOpen(this.row);
return false; return false;
} }
if (this.isNull(this.stat)) { if (this.isNull(this.stat)) {
this.row.title = '시스템관리'; this.row.title = '시스템관리';
this.row.msg1 = '상태를 체크해 주세요.'; this.row.msg1 = '상태를 체크해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertSysModalOpen(this.row);
return false; return false;
} }
if (this.checkedAuthMenu.length == 0) { if (this.checkedAuthMenu.length == 0) {
this.row.title = '시스템관리'; this.row.title = '시스템관리';
this.row.msg1 = '메뉴 권한 체크를 해주세요.'; this.row.msg1 = '메뉴 권한 체크를 해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertSysModalOpen(this.row);
return false; return false;
} }
@@ -305,7 +305,7 @@ export default {
this.row.title = '시스템관리'; this.row.title = '시스템관리';
this.row.msg1 = '실패 하였습니다.'; this.row.msg1 = '실패 하였습니다.';
this.row.focusTaget = '0'; this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertSysModalOpen(this.row);
return false; return false;
} }
} catch (err) { } catch (err) {
@@ -313,7 +313,7 @@ export default {
this.row.title = '시스템관리'; this.row.title = '시스템관리';
this.row.msg1 = '실패 하였습니다.'; this.row.msg1 = '실패 하였습니다.';
this.row.focusTaget = '0'; this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertSysModalOpen(this.row);
return false; return false;
} }
@@ -362,7 +362,7 @@ export default {
this.row.title = '시스템관리'; this.row.title = '시스템관리';
this.row.msg1 = '실패 하였습니다.'; this.row.msg1 = '실패 하였습니다.';
this.row.focusTaget = '0'; this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertSysModalOpen(this.row);
return false; return false;
} }
@@ -371,7 +371,7 @@ export default {
this.row.title = '시스템관리'; this.row.title = '시스템관리';
this.row.msg1 = '실패 하였습니다.'; this.row.msg1 = '실패 하였습니다.';
this.row.focusTaget = '0'; this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertSysModalOpen(this.row);
return false; return false;
} }

View File

@@ -90,6 +90,15 @@ public class AttractMgtService {
public ChannelListExcelResDto channelListExcel(ChannelListExcelReqDto channelListExcelReqDto) { public ChannelListExcelResDto channelListExcel(ChannelListExcelReqDto channelListExcelReqDto) {
AttractMgtMapper attractMgtMapper = sqlSessionSlave.getMapper(AttractMgtMapper.class); AttractMgtMapper attractMgtMapper = sqlSessionSlave.getMapper(AttractMgtMapper.class);
Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
UserDetails userDetails = (UserDetails) principal;
String attrctorId = userDetails.getUsername();
ArrayList auth = (ArrayList) userDetails.getAuthorities();
if(StringUtils.equals(Const.AUTH_CD_AGENCY, auth.get(0).toString())){
channelListExcelReqDto.setAttrctorId(attrctorId);
}
List<ChannelInfo> channelInfos = attractMgtMapper.selectAttractExcelList(channelListExcelReqDto); List<ChannelInfo> channelInfos = attractMgtMapper.selectAttractExcelList(channelListExcelReqDto);
ChannelListExcelRes channelListExcelRes = new ChannelListExcelRes(); ChannelListExcelRes channelListExcelRes = new ChannelListExcelRes();
channelListExcelRes.setList(channelInfos); channelListExcelRes.setList(channelInfos);

View File

@@ -27,4 +27,6 @@ public class ChannelListExcelReqDto implements Serializable {
private String norgNm; private String norgNm;
@ApiModelProperty(example = "01", name = "고객유형", dataType = "String") @ApiModelProperty(example = "01", name = "고객유형", dataType = "String")
private String custTyCd; private String custTyCd;
@ApiModelProperty(name = "유치자ID", dataType = "String", hidden = true)
private String attrctorId;
} }

View File

@@ -88,4 +88,16 @@ public interface CustMgtMapper {
String getEntrNo(); String getEntrNo();
/** 청약 상태 이력 저장 */
int insertSbscstHst(SbscstHstDto sbscstHstDto);
/** 상품정보 조회 */
ProdInfo getProdAmt(String userSeq);
/** 한도 - 오더 채번 */
String getOrder();
/** 한도 - 오더 저장 */
int insertOrder(OrderDto orderDto);
/** 차감 상세 저장 */
int insertLmtdctDtl(LmtdctDtlDto lmtdctDtlDto);
/** 한도 초기화 저장 */
int insertUserLmt(UserLmtDto lmtdctDtlDto);
} }

View File

@@ -3,6 +3,7 @@ package kr.co.uplus.ez.api.custMgt;
import kr.co.uplus.ez.api.custMgt.dto.*; import kr.co.uplus.ez.api.custMgt.dto.*;
import kr.co.uplus.ez.common.components.HubeasyApiComponents; import kr.co.uplus.ez.common.components.HubeasyApiComponents;
import kr.co.uplus.ez.common.data.*; import kr.co.uplus.ez.common.data.*;
import kr.co.uplus.ez.common.utils.DateUtils;
import kr.co.uplus.ez.common.utils.EncryptionUtil; import kr.co.uplus.ez.common.utils.EncryptionUtil;
import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@@ -12,11 +13,14 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@@ -404,6 +408,10 @@ public class CustMgtService {
int checkCustInfo = custMgtMapper.selectCustInfoCount(brno); int checkCustInfo = custMgtMapper.selectCustInfoCount(brno);
String custSeq = custMgtMapper.getCustSeq(brno); String custSeq = custMgtMapper.getCustSeq(brno);
Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
UserDetails userDetails = (UserDetails) principal;
String regId = userDetails.getUsername();
if (checkCustInfo < 1) { if (checkCustInfo < 1) {
// 1-2. 사업자 번호로 미존재시 : 고객정보 등록. // 1-2. 사업자 번호로 미존재시 : 고객정보 등록.
CustInfo custInfo = new CustInfo(); CustInfo custInfo = new CustInfo();
@@ -417,8 +425,8 @@ public class CustMgtService {
custInfo.setZipcd(zipCd); custInfo.setZipcd(zipCd);
custInfo.setAddr1(badr); custInfo.setAddr1(badr);
custInfo.setAddr2(dadr); custInfo.setAddr2(dadr);
custInfo.setRegId(insertTestIdReqDto.getUserId()); custInfo.setRegId(regId);
custInfo.setChgId(insertTestIdReqDto.getUserId()); custInfo.setChgId(regId);
// 고객정보 등록. // 고객정보 등록.
custMgtMapper.insertCustInfo(custInfo); custMgtMapper.insertCustInfo(custInfo);
} }
@@ -439,9 +447,9 @@ public class CustMgtService {
svcUserInfo.setHpNo(insertTestIdReqDto.getMdn()); svcUserInfo.setHpNo(insertTestIdReqDto.getMdn());
svcUserInfo.setEmail(insertTestIdReqDto.getUserEmail()); svcUserInfo.setEmail(insertTestIdReqDto.getUserEmail());
svcUserInfo.setAuthcd080(custMgtMapper.getAuth080()); svcUserInfo.setAuthcd080(custMgtMapper.getAuth080());
svcUserInfo.setAutCd(Const.USER_AUTCD_USR); svcUserInfo.setAutCd(Const.USER_AUTCD_TESTER);
svcUserInfo.setRegId(insertTestIdReqDto.getUserId()); svcUserInfo.setRegId(regId);
svcUserInfo.setChgId(insertTestIdReqDto.getUserId()); svcUserInfo.setChgId(regId);
// 서비스 이용자 등록. // 서비스 이용자 등록.
custMgtMapper.insertSvcUserInfo(svcUserInfo); custMgtMapper.insertSvcUserInfo(svcUserInfo);
@@ -457,12 +465,71 @@ public class CustMgtService {
subsInfo.setSubsSttusCd(Const.SUBS_STTUS_CD_NORMAL); subsInfo.setSubsSttusCd(Const.SUBS_STTUS_CD_NORMAL);
subsInfo.setProdCd(prodCd); subsInfo.setProdCd(prodCd);
subsInfo.setBindDcYn(Const.COMM_NO); subsInfo.setBindDcYn(Const.COMM_NO);
subsInfo.setRegId(insertTestIdReqDto.getUserId()); subsInfo.setRegId(regId);
subsInfo.setChgId(insertTestIdReqDto.getUserId()); subsInfo.setChgId(regId);
// 청약정보 등록. // 청약정보 등록.
custMgtMapper.insertSubsInfo(subsInfo); custMgtMapper.insertSubsInfo(subsInfo);
// 청약상태_이력 테이블 개통 이력 insert
Date now = new Date();
String subsDt = DateUtils.dateToStr(now, "yyyyMMddHHmmss");
SbscstHstDto newSbscstHst = new SbscstHstDto();
newSbscstHst.setSubsId(subId); // 청약ID
newSbscstHst.setEfctStDt(subsDt); // 유효 종료 일시
newSbscstHst.setProdCd(prodCd); // 상품 코드
newSbscstHst.setSubsSttusCd(Const.SUBS_STTUS_CD_NORMAL); // 청약 상태 코드
newSbscstHst.setRegId(regId); // 변경 ID
// 청약 이력 등록
custMgtMapper.insertSbscstHst(newSbscstHst);
// 1. 한도 초기화
// 1-1. 상품금액 조회
ProdInfo prodInfo = new ProdInfo();
prodInfo = custMgtMapper.getProdAmt(userSeq);
String prodAmt = prodInfo.getProdAmt();
// 1-2. 오더 채번
String order = custMgtMapper.getOrder();
String orderCretDt = order.substring(0,12);
// 1-3. 오더 추가
OrderDto orderDto = new OrderDto();
orderDto.setOrderId(order);
orderDto.setOrderCretDt(orderCretDt);
orderDto.setOrderTyCd(Const.ORDER_TYPE_CD_03); // 한도초기화 하기 위한 주문 유형 코드 (01:발송차감, 02:차감결과처리, 03:한도초기화, 04:이월금소멸)
orderDto.setRegId(regId);
custMgtMapper.insertOrder(orderDto);
// 1-4. 차감 상세 INSERT
LmtdctDtlDto lmtdctDtlDto = new LmtdctDtlDto();
lmtdctDtlDto.setOrderCretDt(orderCretDt); // 오더 생성일시
lmtdctDtlDto.setUserSeq(userSeq); // 이용자 일련번호
String lmtYm = subsDt.substring(0,6);
lmtdctDtlDto.setLmtYm(lmtYm); // 한도 년월
lmtdctDtlDto.setUseYm(lmtYm); // 사용 년월
lmtdctDtlDto.setLmtTpCd(Const.LMTDCT_DTL_TYPE_CD_01); // 한도 유형 코드
lmtdctDtlDto.setDdctTpcd(Const.LMTDCT_DTL_DDCT_TYPE_CD_04); // 차감 유형 코드
lmtdctDtlDto.setDdctAmt(prodAmt); // 차감 금액
lmtdctDtlDto.setExeOrderId(order); // 실행 오더 ID
lmtdctDtlDto.setSnddctOrderId(order); // 발송 차감 오더 ID
lmtdctDtlDto.setRegId(regId); // 등록 ID
custMgtMapper.insertLmtdctDtl(lmtdctDtlDto);
// 1-5. 한도 INSERT
UserLmtDto userLmtDto = new UserLmtDto();
userLmtDto.setUserSeq(userSeq); // 이용자 일련번호
userLmtDto.setLmtYm(lmtYm); // 한도 년월
userLmtDto.setFxLmtAmt(prodAmt); // 정액 한도 금액
userLmtDto.setMrtLmtAmt(prodAmt); // 종량 한도 금액
userLmtDto.setFxBlnc(prodAmt); // 정액 잔액
userLmtDto.setRegId(regId); // 등록자ID
userLmtDto.setChgId(regId); // 변경자ID
custMgtMapper.insertUserLmt(userLmtDto);
return new InsertTestIdResDto(ApiResponseCode.SUCCESS); return new InsertTestIdResDto(ApiResponseCode.SUCCESS);
} }
@@ -746,14 +813,14 @@ public class CustMgtService {
logger.debug("[Email Send Request - templeteCode : {}]", mailReqMap.get("templeteCode")); logger.debug("[Email Send Request - templeteCode : {}]", mailReqMap.get("templeteCode"));
logger.debug("[Email Send Request - homeUrl : {}]", mailReqMap.get("homeUrl")); logger.debug("[Email Send Request - homeUrl : {}]", mailReqMap.get("homeUrl"));
mailResultMap = hubeasyApi.sendTemplateMailApi(mailReqMap); // mailResultMap = hubeasyApi.sendTemplateMailApi(mailReqMap);
//
if (mailResultMap != null) { // if (mailResultMap != null) {
logger.debug("[Email Send API RESULT : {}]", mailResultMap.get("API_RSLT")); // logger.debug("[Email Send API RESULT : {}]", mailResultMap.get("API_RSLT"));
if ("F".equals(mailResultMap.get("API_RSLT"))) { // if ("F".equals(mailResultMap.get("API_RSLT"))) {
logger.debug("[Email Send API ERROR : {}]", mailResultMap.get("API_RSLT_MSG")); // logger.debug("[Email Send API ERROR : {}]", mailResultMap.get("API_RSLT_MSG"));
} // }
} // }
logger.debug("############## [Email Send End] ###############"); logger.debug("############## [Email Send End] ###############");
} catch (Exception e) { } catch (Exception e) {
@@ -762,7 +829,8 @@ public class CustMgtService {
} }
// 요청건수. // 요청건수.
insertMassUserRes.setTotalCnt(String.valueOf(insertMassUsers.size())); // insertMassUserRes.setTotalCnt(String.valueOf(insertMassUsers.size()));
insertMassUserRes.setTotalCnt(String.valueOf(orgInsertMassUsers.size()));
// 성공건수. // 성공건수.
insertMassUserRes.setSuccessCnt(String.valueOf(successCnt)); insertMassUserRes.setSuccessCnt(String.valueOf(successCnt));
// 실패건수. // 실패건수.

View File

@@ -0,0 +1,25 @@
package kr.co.uplus.ez.api.custMgt.dto;
import java.io.Serializable;
import lombok.Data;
// 한도 차감 상세
@SuppressWarnings("serial")
@Data
public class LmtdctDtlDto implements Serializable{
private String seqNo; // 일련번호
private String orderCretDt; // Order 생성 일시
private String userSeq; // 이용자 일련번호
private String lmtYm; // 한도 년월
private String useYm; // 사용 년월
private String lmtTpCd; // 한도 유형 코드
private String ddctTpcd; // 차감 유형 코드
private String ddctAmt; // 차감 금액
private String exeOrderId; // 실행 OrderID
private String snddctOrderId; // 발송차감 OrderID
private String regId; // 등록 ID
private String regDt; // 등록 일시
}

View File

@@ -0,0 +1,16 @@
package kr.co.uplus.ez.api.custMgt.dto;
import java.io.Serializable;
import lombok.Data;
@SuppressWarnings("serial")
@Data
public class OrderDto implements Serializable{
private String orderId; // ORDER ID
private String orderCretDt; // ORDER 생성 일시
private String orderTyCd; // ORDER 유형 코드 (01:발송차감, 02:차감결과처리, 03:한도초기화, 04:이월금소멸)
private String regId; // 등록 ID
}

View File

@@ -0,0 +1,14 @@
package kr.co.uplus.ez.api.custMgt.dto;
import java.io.Serializable;
import lombok.Data;
@SuppressWarnings("serial")
@Data
public class ProdInfo implements Serializable{
private String prodCd;
private String prodNm;
private String prodAmt;
}

View File

@@ -0,0 +1,21 @@
package kr.co.uplus.ez.api.custMgt.dto;
import java.io.Serializable;
import lombok.Data;
@SuppressWarnings("serial")
@Data
public class SbscstHstDto implements Serializable {
private String subsId; // 청약ID
private String efctStDt; // 유효 시작 일시
private String efctFnsDt; // 유효 종료 일시
private String prodCd; // 상품 코드
private String subsSttusCd; // 청약 상태 코드
private String regId; // 등록 ID
private String regDt; // 등록 일시
private String chgId; // 변경 ID
private String chgDt; // 변경일시
}

View File

@@ -0,0 +1,33 @@
package kr.co.uplus.ez.api.custMgt.dto;
import java.io.Serializable;
import lombok.Data;
@SuppressWarnings("serial")
@Data
public class UserLmtDto implements Serializable{
private String userSeq; // 이용자 일련 번호
private String lmtYm; // 한도 년월
private String fxLmtAmt; // 정액 한도 금액
private String mrtLmtAmt; // 종량 한도 금액
private String cfwdAmt; // 이월 금액
private String extncAmt; // 소멸 처리 금액
private String cfwdRstrtBlnc; // 이월 복원 잔액
private String fxBlnc; // 정액 잔액
private String mrtUseAmt; // 종량 사용 금액
private String smsUseAmt; // sms 사용 금액
private String mmsUseAmt; // mms 사용 금액
private String lmsUseAmt; // lms 사용 금액
private String atlkUseAmt; // 알림톡 사용 금액
private String smsUseCnt; // sms 사용 건수
private String lmsUseCnt; // lms 사용 건수
private String mmsUseCnt; // mms 사용 건수
private String atlkUseCnt; // 알림톧 사용 건수
private String regId; // 등록 ID
private String regDt; // 등록 일시
private String chgId; // 변경 ID
private String chgDt; // 변경 일시
}

View File

@@ -89,6 +89,12 @@ public class LoginService {
loginMapper.setLoginInfo(user.getOprtrId()); loginMapper.setLoginInfo(user.getOprtrId());
} }
// 로그인 임시 비밀번호 여부
String tmpPwdYn = user.getTmpPwdYn();
if(tmpPwdYn.equals(Const.COMM_YES)) {
return new LoginResDto(ApiResponseCode.LOGIN_UPDATE_PWD, new LoginRes(SecurityConfig.LOGIN_UPDATE_PWD_URL));
}
return new LoginResDto(ApiResponseCode.SUCCESS, new LoginRes(SecurityConfig.LOGIN_SUCC_URL)); return new LoginResDto(ApiResponseCode.SUCCESS, new LoginRes(SecurityConfig.LOGIN_SUCC_URL));
} }
@@ -245,6 +251,7 @@ public class LoginService {
authUser.setPwd(EncryptionUtil.getCustomSHA512(resetPasswordReqDto.getUserId(), randomPw)); authUser.setPwd(EncryptionUtil.getCustomSHA512(resetPasswordReqDto.getUserId(), randomPw));
authUser.setPwdChgDt(Const.COMM_YES); authUser.setPwdChgDt(Const.COMM_YES);
authUser.setAuthchrFailCnt(0); authUser.setAuthchrFailCnt(0);
authUser.setLoginFailCnt(0);
int reslut = loginMapper.updateAdmUser(authUser); int reslut = loginMapper.updateAdmUser(authUser);
@@ -296,6 +303,7 @@ public class LoginService {
authUser.setPwd(newPw); authUser.setPwd(newPw);
authUser.setPwdChgDt(Const.COMM_YES); authUser.setPwdChgDt(Const.COMM_YES);
authUser.setAuthchrFailCnt(0); authUser.setAuthchrFailCnt(0);
authUser.setTmpPwdYn(Const.COMM_NO);
int reslut = loginMapper.updateAdmUser(authUser); int reslut = loginMapper.updateAdmUser(authUser);

View File

@@ -22,7 +22,6 @@ import org.springframework.web.multipart.MultipartHttpServletRequest;
import java.io.File; import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
@Service @Service
public class SendNumMgtService { public class SendNumMgtService {
@@ -161,17 +160,33 @@ public class SendNumMgtService {
String regId = userDetails.getUsername(); String regId = userDetails.getUsername();
// 2. 중복 발신번호 체크를 위한 조회. // 2. 중복 발신번호 체크를 위한 조회.
List<InsertNumber> sendNumbers = sendNumMgtMapper.selectSndrnoList(insertNumberReqDto); List<InsertNumber> dbSendNumbers = sendNumMgtMapper.selectSndrnoList(insertNumberReqDto);
List<InsertNumber> dbSendNumbers = insertNumberReqDto.getList(); List<InsertNumber> sendNumbers = insertNumberReqDto.getList();
List<InsertNumber> allSendNumbers = insertNumberReqDto.getList(); List<InsertNumber> allSendNumbers = insertNumberReqDto.getList();
List<InsertNumber> duplicateSendNumList = new ArrayList<>();
// 실패 항목 응답. for (int i=0; i<dbSendNumbers.size(); i++){
if(sendNumbers.size() > 0){ for (int j=0; j<sendNumbers.size(); j++){
allSendNumbers.addAll(sendNumbers); String dbSendNum = dbSendNumbers.get(i).getSendNum();
String getSendNum = sendNumbers.get(j).getSendNum();
if(StringUtils.equals(dbSendNum, getSendNum)){
// sendNumbers.remove(j);
allSendNumbers.remove(j);
InsertNumber insertNumber = new InsertNumber();
insertNumber.setSendNum(getSendNum);
duplicateSendNumList.add(insertNumber);
}
}
} }
dbSendNumbers = allSendNumbers.stream().distinct().collect(Collectors.toList()); if(allSendNumbers.size() == 0){
InsertNumberRes insertNumberRes = new InsertNumberRes();
if(duplicateSendNumList.size() > 0){
// 발신번호 중복건 응답 처리.
insertNumberRes.setList(duplicateSendNumList);
}
return new InsertNumberResDto(ApiResponseCode.CE_SENDMGT_DUPLICATE_SENDNUM, insertNumberRes);
}
// 1. 발신번호 SEQ 채번 // 1. 발신번호 SEQ 채번
String regReqNo = sendNumMgtMapper.selectRegReqNo(); String regReqNo = sendNumMgtMapper.selectRegReqNo();
@@ -193,7 +208,8 @@ public class SendNumMgtService {
dir.mkdirs(); dir.mkdirs();
} }
for (InsertNumber dbInsertNumber : dbSendNumbers){ for (InsertNumber dbInsertNumber : allSendNumbers){
if(StringUtils.isNotBlank(dbInsertNumber.getSendNum())){
dbInsertNumber.setCustSeq(insertNumberReqDto.getCustSeq()); dbInsertNumber.setCustSeq(insertNumberReqDto.getCustSeq());
dbInsertNumber.setRegReqNo(regReqNo); dbInsertNumber.setRegReqNo(regReqNo);
dbInsertNumber.setNmineeDivCd(insertNumberReqDto.getNmineeDivCd()); dbInsertNumber.setNmineeDivCd(insertNumberReqDto.getNmineeDivCd());
@@ -206,6 +222,7 @@ public class SendNumMgtService {
dbInsertNumber.setRegId(regId); dbInsertNumber.setRegId(regId);
sendNumMgtMapper.insertNumberList(dbInsertNumber); sendNumMgtMapper.insertNumberList(dbInsertNumber);
} }
}
// 사업자 인증이 안된 경우 파일업로드... // 사업자 인증이 안된 경우 파일업로드...
if(!StringUtils.equals(Const.COMM_YES, insertNumberReqDto.getBizrAuthYn())){ if(!StringUtils.equals(Const.COMM_YES, insertNumberReqDto.getBizrAuthYn())){
@@ -280,9 +297,9 @@ public class SendNumMgtService {
} }
InsertNumberRes insertNumberRes = new InsertNumberRes(); InsertNumberRes insertNumberRes = new InsertNumberRes();
if(sendNumbers.size() > 0){ if(duplicateSendNumList.size() > 0){
// 발신번호 중복건 응답 처리. // 발신번호 중복건 응답 처리.
insertNumberRes.setList(sendNumbers); insertNumberRes.setList(duplicateSendNumList);
} }
return new InsertNumberResDto(ApiResponseCode.SUCCESS, insertNumberRes); return new InsertNumberResDto(ApiResponseCode.SUCCESS, insertNumberRes);

View File

@@ -19,7 +19,7 @@ public class InsertNumberReqDto implements Serializable{
private String custNm; private String custNm;
@ApiModelProperty(example = "사업자번호", name = "사업자번호", dataType = "String") @ApiModelProperty(example = "사업자번호", name = "사업자번호", dataType = "String")
private String bRegNo; private String bregno;
@ApiModelProperty(example = "사업자인증여부", name = "사업자인증여부", dataType = "String") @ApiModelProperty(example = "사업자인증여부", name = "사업자인증여부", dataType = "String")
private String bizrAuthYn; private String bizrAuthYn;

View File

@@ -19,6 +19,8 @@ public enum ApiResponseCode {
,CM_DB_QUERY_ERR("1009", "데이터를 처리하는 동안 오류가 발생했습니다.") ,CM_DB_QUERY_ERR("1009", "데이터를 처리하는 동안 오류가 발생했습니다.")
// 어드민. // 어드민.
/** 비밀번호 변경. */
,LOGIN_UPDATE_PWD("1001", "비밀번호 변경")
/** 인증토큰 만료. */ /** 인증토큰 만료. */
,CE_AUTH_TOKEN_EXPIRE("4001", "인증토큰 만료") ,CE_AUTH_TOKEN_EXPIRE("4001", "인증토큰 만료")
/** Refresh 토큰 만료. */ /** Refresh 토큰 만료. */
@@ -59,6 +61,8 @@ public enum ApiResponseCode {
,CE_SENDINGLIMT_ERROR("4019", "발송한도금액이 정액한도금액보다 작습니다.") ,CE_SENDINGLIMT_ERROR("4019", "발송한도금액이 정액한도금액보다 작습니다.")
/** 해당 권한코드에 해당하는 어드민 사용자가 존재함. */ /** 해당 권한코드에 해당하는 어드민 사용자가 존재함. */
,CE_SYSMGT_AUTHCODE_EXISTS_USER("4020", "해당 권한코드에 해당하는 어드민 사용자가 존재함.") ,CE_SYSMGT_AUTHCODE_EXISTS_USER("4020", "해당 권한코드에 해당하는 어드민 사용자가 존재함.")
/** 이미 등록된 발신번호로 저장 불가. */
,CE_SENDMGT_DUPLICATE_SENDNUM("4021", "이미 등록된 발신번호로 저장 불가.")
// 시스템 // 시스템
/** 알 수 없는 에러. */ /** 알 수 없는 에러. */
,SE_UNKNOWN("9999", "알 수 없는 에러"); ,SE_UNKNOWN("9999", "알 수 없는 에러");

View File

@@ -72,6 +72,8 @@ public class Const {
public static final String USER_AUTCD_USR = "H001"; public static final String USER_AUTCD_USR = "H001";
/** 사용자 권한 (H003 비로그인).*/ /** 사용자 권한 (H003 비로그인).*/
public static final String USER_AUTCD_NO_LOGIN = "H003"; public static final String USER_AUTCD_NO_LOGIN = "H003";
/** 사용자 권한 (H004 테스트ID).*/
public static final String USER_AUTCD_TESTER = "H004";
// 가입 상태 코드(01:대기, 02:정상, 03:일시정지, 04:미납정지, 98:취소, 99:해지) // 가입 상태 코드(01:대기, 02:정상, 03:일시정지, 04:미납정지, 98:취소, 99:해지)
/** 가입 상태 코드(01:대기) */ /** 가입 상태 코드(01:대기) */
@@ -110,4 +112,13 @@ public class Const {
public static final String SNDRNO_STTUS_CD_APPR = "01"; public static final String SNDRNO_STTUS_CD_APPR = "01";
public static final String SNDRNO_STTUS_CD_COMPLETED = "02"; public static final String SNDRNO_STTUS_CD_COMPLETED = "02";
public static final String SNDRNO_STTUS_CD_REJECT = "03"; public static final String SNDRNO_STTUS_CD_REJECT = "03";
/** 한도초기화 하기 위한 주문 유형 코드 (01:발송차감, 02:차감결과처리, 03:한도초기화, 04:이월금소멸) */
public static final String ORDER_TYPE_CD_03 = "03";
/** 한도 차감 상세 - 한도유형 코드(01:정액, 02:종량) */
public static final String LMTDCT_DTL_TYPE_CD_01 = "01";
/** 한도 차감 상세 - 차감 유형 코드 (01:차감, 02:소멸, 03:복원, 04:충전) */
public static final String LMTDCT_DTL_DDCT_TYPE_CD_04 = "04";
} }

View File

@@ -34,6 +34,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
public static final String LOGIN_API_URL = "/api/v1/bo/login"; public static final String LOGIN_API_URL = "/api/v1/bo/login";
public static final String LOGIN_FAIL_URL = "/login?error=true"; public static final String LOGIN_FAIL_URL = "/login?error=true";
public static final String LOGIN_SUCC_URL = "/"; public static final String LOGIN_SUCC_URL = "/";
public static final String LOGIN_UPDATE_PWD_URL = "/view/login/updatePassword";
private static final String API_URL = "/api/**"; private static final String API_URL = "/api/**";
public static final String TEST_PERMIT_URL = "/api/**/**"; public static final String TEST_PERMIT_URL = "/api/**/**";
public static final String PUBLIC_API_URL = "/api/v1/bo/**"; // 내부에서 인증없이 호출하는 API public static final String PUBLIC_API_URL = "/api/v1/bo/**"; // 내부에서 인증없이 호출하는 API

View File

@@ -35,7 +35,7 @@ schedule:
# 2차인증 제외 ID목록. # 2차인증 제외 ID목록.
authentication: authentication:
without: without:
id: superadminuser,jambler01,jambler02,jambler03,jambler04,jambler05,jambler06 id: superadminuser,hacktestadmin,jambler01,jambler02,jambler03,jambler04,jambler05,jambler06
mail: mail:
from: msghubez@lguplus.co.kr from: msghubez@lguplus.co.kr

View File

@@ -35,7 +35,7 @@ schedule:
# 2차인증 제외 ID목록. # 2차인증 제외 ID목록.
authentication: authentication:
without: without:
id: superadminuser,jambler01,jambler02,jambler03,jambler04,jambler05,jambler06 id: superadminuser,hacktestadmin,jambler01,jambler02,jambler03,jambler04,jambler05,jambler06
mail: mail:
from: msghubez@lguplus.co.kr from: msghubez@lguplus.co.kr

View File

@@ -3,7 +3,8 @@
<mapper namespace="kr.co.uplus.ez.api.attractMgt.AttractMgtMapper"> <mapper namespace="kr.co.uplus.ez.api.attractMgt.AttractMgtMapper">
<select id="selectAttractListTotalCnt" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelListReqDto" resultType="int"> <select id="selectAttractListTotalCnt" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelListReqDto"
resultType="int">
/* attractMgt-mapper.xml(selectAttractListTotalCnt) */ /* attractMgt-mapper.xml(selectAttractListTotalCnt) */
SELECT SELECT
COUNT(*) AS totalCnt COUNT(*) AS totalCnt
@@ -21,7 +22,8 @@
<include refid="attractListCondition"/> <include refid="attractListCondition"/>
</select> </select>
<select id="selectAttractList" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelListReqDto" resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelInfo"> <select id="selectAttractList" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelListReqDto"
resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelInfo">
/* attractMgt-mapper.xml(selectAttractList) */ /* attractMgt-mapper.xml(selectAttractList) */
SELECT SELECT
@ROWNUM := @ROWNUM + 1 AS NO @ROWNUM := @ROWNUM + 1 AS NO
@@ -33,9 +35,11 @@
, A.BIZRNO , A.BIZRNO
, A.USER_NM , A.USER_NM
, A.SUBS_STTUS_CD , A.SUBS_STTUS_CD
, (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'SUBS_STTUS_CD' AND DTL_CD = A.SUBS_STTUS_CD) as SUBS_STTUS_NM , (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'SUBS_STTUS_CD' AND DTL_CD = A.SUBS_STTUS_CD) as
SUBS_STTUS_NM
, A.CUST_TY_CD , A.CUST_TY_CD
, (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'CUST_KD_CD' AND DTL_CD = A.CUST_TY_CD) as CUST_TY_NM , (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'CUST_KD_CD' AND DTL_CD = A.CUST_TY_CD) as
CUST_TY_NM
, ( , (
SELECT SELECT
sum(IFNULL(ecm.SND_CNT,0) + IFNULL(ecm.FBACK_CNT,0)) sum(IFNULL(ecm.SND_CNT,0) + IFNULL(ecm.FBACK_CNT,0))
@@ -74,7 +78,8 @@
) A , ( SELECT @ROWNUM := #{page} ) AS R ) A , ( SELECT @ROWNUM := #{page} ) AS R
</select> </select>
<select id="selectAttractExcelList" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelListExcelReqDto" resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelInfo"> <select id="selectAttractExcelList" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelListExcelReqDto"
resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelInfo">
/* attractMgt-mapper.xml(selectAttractExcelList) */ /* attractMgt-mapper.xml(selectAttractExcelList) */
SELECT SELECT
@ROWNUM := @ROWNUM + 1 AS NO @ROWNUM := @ROWNUM + 1 AS NO
@@ -85,8 +90,10 @@
, A.CUST_NM , A.CUST_NM
, A.BIZRNO , A.BIZRNO
, A.USER_NM , A.USER_NM
, (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'SUBS_STTUS_CD' AND DTL_CD = A.SUBS_STTUS_CD) as SUBS_STTUS_NM , (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'SUBS_STTUS_CD' AND DTL_CD = A.SUBS_STTUS_CD) as
, (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'CUST_KD_CD' AND DTL_CD = A.CUST_TY_CD) as CUST_TY_NM SUBS_STTUS_NM
, (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'CUST_KD_CD' AND DTL_CD = A.CUST_TY_CD) as
CUST_TY_NM
, ( , (
SELECT SELECT
sum(IFNULL(ecm.SND_CNT,0) + IFNULL(ecm.FBACK_CNT,0)) sum(IFNULL(ecm.SND_CNT,0) + IFNULL(ecm.FBACK_CNT,0))
@@ -136,10 +143,10 @@
AND eci.CUST_TY_CD = #{custTyCd} AND eci.CUST_TY_CD = #{custTyCd}
</if> </if>
<if test="loginId != null and loginId != ''"> <if test="loginId != null and loginId != ''">
AND eiu.LOGIN_ID = #{loginId} AND eiu.LOGIN_ID LIKE CONCAT('%', #{loginId}, '%')
</if> </if>
<if test="norgNm != null and norgNm != ''"> <if test="norgNm != null and norgNm != ''">
AND eig.NORG_NM = #{norgNm} AND eig.NORG_NM LIKE CONCAT('%', #{norgNm}, '%')
</if> </if>
<if test="searchType != null and searchType != ''"> <if test="searchType != null and searchType != ''">
<if test="searchType == '01' and searchText != null and searchText != ''"> <if test="searchType == '01' and searchText != null and searchText != ''">
@@ -157,13 +164,12 @@
</if> </if>
</sql> </sql>
<select id="selectAttractDetail" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailReqDto" resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailRes"> <select id="selectAttractDetail" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailReqDto"
resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailRes">
/* attractMgt-mapper.xml(selectAttractDetail) */ /* attractMgt-mapper.xml(selectAttractDetail) */
SELECT SELECT DATE_FORMAT(esi.SUBS_DT, '%Y-%m-%d') AS SUBS_DT
DATE_FORMAT(esi.SUBS_DT, '%Y-%m-%d') AS SUBS_DT
, esi.SUBS_STTUS_CD , esi.SUBS_STTUS_CD
,(SELECT , (SELECT T2.DTL_CD_NM AS codeNm
T2.DTL_CD_NM AS codeNm
FROM hubez_common.EZ_CD_GRP T1 FROM hubez_common.EZ_CD_GRP T1
LEFT JOIN hubez_common.EZ_CD_DTL T2 LEFT JOIN hubez_common.EZ_CD_DTL T2
ON T1.GRP_CD = T2.GRP_CD ON T1.GRP_CD = T2.GRP_CD
@@ -173,8 +179,7 @@
, esi.PROD_CD , esi.PROD_CD
, eci.REPR_NM , eci.REPR_NM
, eci.CUST_TY_CD , eci.CUST_TY_CD
,(SELECT , (SELECT T2.DTL_CD_NM AS codeNm
T2.DTL_CD_NM AS codeNm
FROM hubez_common.EZ_CD_GRP T1 FROM hubez_common.EZ_CD_GRP T1
LEFT JOIN hubez_common.EZ_CD_DTL T2 LEFT JOIN hubez_common.EZ_CD_DTL T2
ON T1.GRP_CD = T2.GRP_CD ON T1.GRP_CD = T2.GRP_CD
@@ -191,14 +196,10 @@
, esi.SUBSMNGR_NM AS ADMIN_NM , esi.SUBSMNGR_NM AS ADMIN_NM
, esu.USER_ID , esu.USER_ID
, ( , (
SELECT SELECT PROD_NM
PROD_NM FROM hubez_common.EZ_PROD_INFO
FROM WHERE PROD_CD = esi.PROD_CD) AS PLAN
hubez_common.EZ_PROD_INFO FROM hubez_common.EZ_SUBS_INFO esi
WHERE
PROD_CD = esi.PROD_CD) AS PLAN
FROM
hubez_common.EZ_SUBS_INFO esi
INNER JOIN hubez_common.EZ_CUST_INFO eci INNER JOIN hubez_common.EZ_CUST_INFO eci
ON eci.CUST_SEQ = esi.CUST_SEQ ON eci.CUST_SEQ = esi.CUST_SEQ
INNER JOIN hubez_common.EZ_SVC_USER esu INNER JOIN hubez_common.EZ_SVC_USER esu
@@ -211,9 +212,9 @@
AND esu.USER_SEQ = #{userSeq} AND esu.USER_SEQ = #{userSeq}
</select> </select>
<select id="selectSndCountList" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailReqDto" resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetail"> <select id="selectSndCountList" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailReqDto"
SELECT resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetail">
DATE_FORMAT(ecm.SUM_YM, '%Y-%m') AS sumYm SELECT DATE_FORMAT(ecm.SUM_YM, '%Y-%m') AS sumYm
, ecm.SND_CNT , ecm.SND_CNT
, ecm.SUCC_CNT , ecm.SUCC_CNT
, S.SND_CNT AS SND_CNT_S , S.SND_CNT AS SND_CNT_S
@@ -224,47 +225,38 @@
, M.SUCC_CNT AS SUCC_CNT_M , M.SUCC_CNT AS SUCC_CNT_M
, A.SND_CNT AS SND_CNT_A , A.SND_CNT AS SND_CNT_A
, A.SUCC_CNT AS SUCC_CNT_A , A.SUCC_CNT AS SUCC_CNT_A
FROM FROM (
( SELECT SUM_YM
SELECT
SUM_YM
, USER_SEQ , USER_SEQ
, SUM(IFNULL(SND_CNT, 0) + IFNULL(FBACK_CNT, 0)) AS SND_CNT , 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 , SUM(IFNULL(SUCC_CNT, 0) + IFNULL(FBACK_SUCC_CNT, 0)) AS SUCC_CNT
FROM FROM hubez_common.EZ_CUST_MSTAT
hubez_common.EZ_CUST_MSTAT
WHERE 1 = 1 WHERE 1 = 1
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH) AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
AND USER_SEQ = #{userSeq} AND USER_SEQ = #{userSeq}
GROUP BY SUM_YM, USER_SEQ GROUP BY SUM_YM, USER_SEQ
) ecm, ) ecm,
( (
SELECT SELECT S1.SUM_YM
S1.SUM_YM
, S1.USER_SEQ , S1.USER_SEQ
, SUM(IFNULL(S1.SND_CNT, 0) + IFNULL(S2.FBACK_CNT, 0)) AS SND_CNT , 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 , SUM(IFNULL(S1.SUCC_CNT, 0) + IFNULL(S2.FBACK_SUCC_CNT, 0)) AS SUCC_CNT
FROM FROM (SELECT SUM_YM
(SELECT
SUM_YM
, USER_SEQ , USER_SEQ
, SUM(SND_CNT) AS SND_CNT , SUM(SND_CNT) AS SND_CNT
, SUM(SUCC_CNT) AS SUCC_CNT , SUM(SUCC_CNT) AS SUCC_CNT
FROM FROM hubez_common.EZ_CUST_MSTAT
hubez_common.EZ_CUST_MSTAT
WHERE 1 = 1 WHERE 1 = 1
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH) AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
AND SND_CH_CD = 'SMS' AND SND_CH_CD = 'SMS'
AND USER_SEQ = #{userSeq} AND USER_SEQ = #{userSeq}
GROUP BY SUM_YM, USER_SEQ) S1 GROUP BY SUM_YM, USER_SEQ) S1
LEFT OUTER JOIN LEFT OUTER JOIN
(SELECT (SELECT SUM_YM
SUM_YM
, USER_SEQ , USER_SEQ
, SUM(FBACK_CNT) AS FBACK_CNT , SUM(FBACK_CNT) AS FBACK_CNT
, SUM(FBACK_SUCC_CNT) AS FBACK_SUCC_CNT , SUM(FBACK_SUCC_CNT) AS FBACK_SUCC_CNT
FROM FROM hubez_common.EZ_CUST_MSTAT
hubez_common.EZ_CUST_MSTAT
WHERE 1 = 1 WHERE 1 = 1
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH) AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
AND SND_CH_CD = 'ALIMTALK' AND SND_CH_CD = 'ALIMTALK'
@@ -275,32 +267,26 @@
AND S1.USER_SEQ = S2.USER_SEQ AND S1.USER_SEQ = S2.USER_SEQ
GROUP BY S1.SUM_YM, S1.USER_SEQ) S, GROUP BY S1.SUM_YM, S1.USER_SEQ) S,
( (
SELECT SELECT S1.SUM_YM
S1.SUM_YM
, S1.USER_SEQ , S1.USER_SEQ
, SUM(IFNULL(S1.SND_CNT, 0) + IFNULL(S2.FBACK_CNT, 0)) AS SND_CNT , 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 , SUM(IFNULL(S1.SUCC_CNT, 0) + IFNULL(S2.FBACK_SUCC_CNT, 0)) AS SUCC_CNT
FROM FROM (SELECT SUM_YM
(SELECT
SUM_YM
, USER_SEQ , USER_SEQ
, SUM(SND_CNT) AS SND_CNT , SUM(SND_CNT) AS SND_CNT
, SUM(SUCC_CNT) AS SUCC_CNT , SUM(SUCC_CNT) AS SUCC_CNT
FROM FROM hubez_common.EZ_CUST_MSTAT
hubez_common.EZ_CUST_MSTAT
WHERE 1 = 1 WHERE 1 = 1
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH) AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
AND SND_CH_CD = 'LMS' AND SND_CH_CD = 'LMS'
AND USER_SEQ = #{userSeq} AND USER_SEQ = #{userSeq}
GROUP BY SUM_YM, USER_SEQ) S1 GROUP BY SUM_YM, USER_SEQ) S1
LEFT OUTER JOIN LEFT OUTER JOIN
(SELECT (SELECT SUM_YM
SUM_YM
, USER_SEQ , USER_SEQ
, SUM(FBACK_CNT) AS FBACK_CNT , SUM(FBACK_CNT) AS FBACK_CNT
, SUM(FBACK_SUCC_CNT) AS FBACK_SUCC_CNT , SUM(FBACK_SUCC_CNT) AS FBACK_SUCC_CNT
FROM FROM hubez_common.EZ_CUST_MSTAT
hubez_common.EZ_CUST_MSTAT
WHERE 1 = 1 WHERE 1 = 1
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH) AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
AND SND_CH_CD = 'ALIMTALK' AND SND_CH_CD = 'ALIMTALK'
@@ -311,32 +297,26 @@
AND S1.USER_SEQ = S2.USER_SEQ AND S1.USER_SEQ = S2.USER_SEQ
GROUP BY S1.SUM_YM, S1.USER_SEQ) AS L, GROUP BY S1.SUM_YM, S1.USER_SEQ) AS L,
( (
SELECT SELECT S1.SUM_YM
S1.SUM_YM
, S1.USER_SEQ , S1.USER_SEQ
, SUM(IFNULL(S1.SND_CNT, 0) + IFNULL(S2.FBACK_CNT, 0)) AS SND_CNT , 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 , SUM(IFNULL(S1.SUCC_CNT, 0) + IFNULL(S2.FBACK_SUCC_CNT, 0)) AS SUCC_CNT
FROM FROM (SELECT SUM_YM
(SELECT
SUM_YM
, USER_SEQ , USER_SEQ
, SUM(SND_CNT) AS SND_CNT , SUM(SND_CNT) AS SND_CNT
, SUM(SUCC_CNT) AS SUCC_CNT , SUM(SUCC_CNT) AS SUCC_CNT
FROM FROM hubez_common.EZ_CUST_MSTAT
hubez_common.EZ_CUST_MSTAT
WHERE 1 = 1 WHERE 1 = 1
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH) AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
AND SND_CH_CD = 'MMS' AND SND_CH_CD = 'MMS'
AND USER_SEQ = #{userSeq} AND USER_SEQ = #{userSeq}
GROUP BY SUM_YM, USER_SEQ) S1 GROUP BY SUM_YM, USER_SEQ) S1
LEFT OUTER JOIN LEFT OUTER JOIN
(SELECT (SELECT SUM_YM
SUM_YM
, USER_SEQ , USER_SEQ
, SUM(FBACK_CNT) AS FBACK_CNT , SUM(FBACK_CNT) AS FBACK_CNT
, SUM(FBACK_SUCC_CNT) AS FBACK_SUCC_CNT , SUM(FBACK_SUCC_CNT) AS FBACK_SUCC_CNT
FROM FROM hubez_common.EZ_CUST_MSTAT
hubez_common.EZ_CUST_MSTAT
WHERE 1 = 1 WHERE 1 = 1
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH) AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
AND SND_CH_CD = 'ALIMTALK' AND SND_CH_CD = 'ALIMTALK'
@@ -347,13 +327,11 @@
AND S1.USER_SEQ = S2.USER_SEQ AND S1.USER_SEQ = S2.USER_SEQ
GROUP BY S1.SUM_YM, S1.USER_SEQ) AS M, GROUP BY S1.SUM_YM, S1.USER_SEQ) AS M,
( (
SELECT SELECT SUM_YM
SUM_YM
, USER_SEQ , USER_SEQ
, SUM(SND_CNT) AS SND_CNT , SUM(SND_CNT) AS SND_CNT
, SUM(SUCC_CNT) AS SUCC_CNT , SUM(SUCC_CNT) AS SUCC_CNT
FROM FROM hubez_common.EZ_CUST_MSTAT
hubez_common.EZ_CUST_MSTAT
WHERE 1 = 1 WHERE 1 = 1
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH) AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
AND SND_CH_CD = 'ALIMTALK' AND SND_CH_CD = 'ALIMTALK'
@@ -371,51 +349,42 @@
ORDER BY ecm.SUM_YM DESC ORDER BY ecm.SUM_YM DESC
</select> </select>
<select id="sendNumberListExcel" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailReqDto" resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetail"> <select id="sendNumberListExcel" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailReqDto"
SELECT resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetail">
DATE_FORMAT(ecm.SUM_YM, '%Y-%m') AS SUM_YM SELECT DATE_FORMAT(ecm.SUM_YM, '%Y-%m') AS SUM_YM
, ecm.SND_CNT , ecm.SND_CNT
, S.SND_CNT AS SND_CNT_S , S.SND_CNT AS SND_CNT_S
, L.SND_CNT AS SND_CNT_L , L.SND_CNT AS SND_CNT_L
, M.SND_CNT AS SND_CNT_M , M.SND_CNT AS SND_CNT_M
, A.SND_CNT AS SND_CNT_A , A.SND_CNT AS SND_CNT_A
FROM FROM (
( SELECT SUM_YM
SELECT
SUM_YM
, USER_SEQ , USER_SEQ
, SUM(IFNULL(SND_CNT, 0) + IFNULL(FBACK_CNT, 0)) AS SND_CNT , SUM(IFNULL(SND_CNT, 0) + IFNULL(FBACK_CNT, 0)) AS SND_CNT
FROM FROM hubez_common.EZ_CUST_MSTAT
hubez_common.EZ_CUST_MSTAT
WHERE 1 = 1 WHERE 1 = 1
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH) AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
AND USER_SEQ = #{userSeq} AND USER_SEQ = #{userSeq}
GROUP BY SUM_YM, USER_SEQ GROUP BY SUM_YM, USER_SEQ
) ecm, ) ecm,
( (
SELECT SELECT S1.SUM_YM
S1.SUM_YM
, S1.USER_SEQ , S1.USER_SEQ
, SUM(IFNULL(S1.SND_CNT, 0) + IFNULL(S2.FBACK_CNT, 0)) AS SND_CNT , SUM(IFNULL(S1.SND_CNT, 0) + IFNULL(S2.FBACK_CNT, 0)) AS SND_CNT
FROM FROM (SELECT SUM_YM
(SELECT
SUM_YM
, USER_SEQ , USER_SEQ
, SUM(SND_CNT) AS SND_CNT , SUM(SND_CNT) AS SND_CNT
FROM FROM hubez_common.EZ_CUST_MSTAT
hubez_common.EZ_CUST_MSTAT
WHERE 1 = 1 WHERE 1 = 1
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH) AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
AND SND_CH_CD = 'SMS' AND SND_CH_CD = 'SMS'
AND USER_SEQ = #{userSeq} AND USER_SEQ = #{userSeq}
GROUP BY SUM_YM, USER_SEQ) S1 GROUP BY SUM_YM, USER_SEQ) S1
LEFT OUTER JOIN LEFT OUTER JOIN
(SELECT (SELECT SUM_YM
SUM_YM
, USER_SEQ , USER_SEQ
, SUM(FBACK_CNT) AS FBACK_CNT , SUM(FBACK_CNT) AS FBACK_CNT
FROM FROM hubez_common.EZ_CUST_MSTAT
hubez_common.EZ_CUST_MSTAT
WHERE 1 = 1 WHERE 1 = 1
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH) AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
AND SND_CH_CD = 'ALIMTALK' AND SND_CH_CD = 'ALIMTALK'
@@ -426,29 +395,23 @@
AND S1.USER_SEQ = S2.USER_SEQ AND S1.USER_SEQ = S2.USER_SEQ
GROUP BY S1.SUM_YM, S1.USER_SEQ) S, GROUP BY S1.SUM_YM, S1.USER_SEQ) S,
( (
SELECT SELECT S1.SUM_YM
S1.SUM_YM
, S1.USER_SEQ , S1.USER_SEQ
, SUM(IFNULL(S1.SND_CNT, 0) + IFNULL(S2.FBACK_CNT, 0)) AS SND_CNT , SUM(IFNULL(S1.SND_CNT, 0) + IFNULL(S2.FBACK_CNT, 0)) AS SND_CNT
FROM FROM (SELECT SUM_YM
(SELECT
SUM_YM
, USER_SEQ , USER_SEQ
, SUM(SND_CNT) AS SND_CNT , SUM(SND_CNT) AS SND_CNT
FROM FROM hubez_common.EZ_CUST_MSTAT
hubez_common.EZ_CUST_MSTAT
WHERE 1 = 1 WHERE 1 = 1
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH) AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
AND SND_CH_CD = 'LMS' AND SND_CH_CD = 'LMS'
AND USER_SEQ = #{userSeq} AND USER_SEQ = #{userSeq}
GROUP BY SUM_YM, USER_SEQ) S1 GROUP BY SUM_YM, USER_SEQ) S1
LEFT OUTER JOIN LEFT OUTER JOIN
(SELECT (SELECT SUM_YM
SUM_YM
, USER_SEQ , USER_SEQ
, SUM(FBACK_CNT) AS FBACK_CNT , SUM(FBACK_CNT) AS FBACK_CNT
FROM FROM hubez_common.EZ_CUST_MSTAT
hubez_common.EZ_CUST_MSTAT
WHERE 1 = 1 WHERE 1 = 1
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH) AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
AND SND_CH_CD = 'ALIMTALK' AND SND_CH_CD = 'ALIMTALK'
@@ -459,29 +422,23 @@
AND S1.USER_SEQ = S2.USER_SEQ AND S1.USER_SEQ = S2.USER_SEQ
GROUP BY S1.SUM_YM, S1.USER_SEQ) AS L, GROUP BY S1.SUM_YM, S1.USER_SEQ) AS L,
( (
SELECT SELECT S1.SUM_YM
S1.SUM_YM
, S1.USER_SEQ , S1.USER_SEQ
, SUM(IFNULL(S1.SND_CNT, 0) + IFNULL(S2.FBACK_CNT, 0)) AS SND_CNT , SUM(IFNULL(S1.SND_CNT, 0) + IFNULL(S2.FBACK_CNT, 0)) AS SND_CNT
FROM FROM (SELECT SUM_YM
(SELECT
SUM_YM
, USER_SEQ , USER_SEQ
, SUM(SND_CNT) AS SND_CNT , SUM(SND_CNT) AS SND_CNT
FROM FROM hubez_common.EZ_CUST_MSTAT
hubez_common.EZ_CUST_MSTAT
WHERE 1 = 1 WHERE 1 = 1
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH) AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
AND SND_CH_CD = 'MMS' AND SND_CH_CD = 'MMS'
AND USER_SEQ = #{userSeq} AND USER_SEQ = #{userSeq}
GROUP BY SUM_YM, USER_SEQ) S1 GROUP BY SUM_YM, USER_SEQ) S1
LEFT OUTER JOIN LEFT OUTER JOIN
(SELECT (SELECT SUM_YM
SUM_YM
, USER_SEQ , USER_SEQ
, SUM(FBACK_CNT) AS FBACK_CNT , SUM(FBACK_CNT) AS FBACK_CNT
FROM FROM hubez_common.EZ_CUST_MSTAT
hubez_common.EZ_CUST_MSTAT
WHERE 1 = 1 WHERE 1 = 1
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH) AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
AND SND_CH_CD = 'ALIMTALK' AND SND_CH_CD = 'ALIMTALK'
@@ -492,12 +449,10 @@
AND S1.USER_SEQ = S2.USER_SEQ AND S1.USER_SEQ = S2.USER_SEQ
GROUP BY S1.SUM_YM, S1.USER_SEQ) AS M, GROUP BY S1.SUM_YM, S1.USER_SEQ) AS M,
( (
SELECT SELECT SUM_YM
SUM_YM
, USER_SEQ , USER_SEQ
, SUM(SND_CNT) AS SND_CNT , SUM(SND_CNT) AS SND_CNT
FROM FROM hubez_common.EZ_CUST_MSTAT
hubez_common.EZ_CUST_MSTAT
WHERE 1 = 1 WHERE 1 = 1
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH) AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
AND SND_CH_CD = 'ALIMTALK' AND SND_CH_CD = 'ALIMTALK'

View File

@@ -61,7 +61,7 @@
and UPPER(eci.CUST_NM) LIKE CONCAT('%' , UPPER(#{searchText1}) , '%') and UPPER(eci.CUST_NM) LIKE CONCAT('%' , UPPER(#{searchText1}) , '%')
</when> </when>
<when test='searchType2 == "bizNo"'><!-- 검색조건 - 사업자번호 --> <when test='searchType2 == "bizNo"'><!-- 검색조건 - 사업자번호 -->
AND eci.BIZRNO LIKE CONCAT('%', #{searchText}, '%') AND eci.BIZRNO LIKE CONCAT('%', #{searchText1}, '%')
</when> </when>
<when test='searchType2 == "tmpltNm"'><!-- 검색조건 - 인증코드 --> <when test='searchType2 == "tmpltNm"'><!-- 검색조건 - 인증코드 -->
and UPPER(eat.TMPLT_NM) LIKE CONCAT('%' , UPPER(#{searchText1}) , '%') and UPPER(eat.TMPLT_NM) LIKE CONCAT('%' , UPPER(#{searchText1}) , '%')

View File

@@ -545,7 +545,7 @@
AND UPPER(esu.USER_NM) LIKE UPPER(CONCAT('%', #{searchText1}, '%')) AND UPPER(esu.USER_NM) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
</if> </if>
<if test="searchType3 == '03' and searchText1 != null and searchText1 != ''"> <if test="searchType3 == '03' and searchText1 != null and searchText1 != ''">
AND esu.USER_SEQ = (SELECT PRNTS_USER_SEQ FROM hubez_common.EZ_SVC_USER WHERE USER_ID = #{searchText1} AND USER_TP_CD ='01') AND esu.USER_SEQ IN (SELECT PRNTS_USER_SEQ FROM hubez_common.EZ_SVC_USER WHERE USER_ID LIKE CONCAT('%', #{searchText1}, '%') AND USER_TP_CD ='01')
</if> </if>
</if> </if>
</sql> </sql>
@@ -952,4 +952,145 @@
SELECT CONCAT('TESTENTRN', LPAD(hubez_common.FUN_NEXT_SEQ('TEST_SUBS_SEQ'), 11, 0)) as ENTR_NO SELECT CONCAT('TESTENTRN', LPAD(hubez_common.FUN_NEXT_SEQ('TEST_SUBS_SEQ'), 11, 0)) as ENTR_NO
</select> </select>
<!-- 청약 상태 이력 저장 -->
<insert id="insertSbscstHst" parameterType="kr.co.uplus.ez.api.custMgt.dto.SbscstHstDto">
/* custMgt-mapper.xml(insertSbscstHst) */
INSERT INTO hubez_common.EZ_SBSCST_HST(
SUBS_ID
,EFCT_ST_DT
<if test="subsSttusCd != null and subsSttusCd != ''">
,EFCT_FNS_DT
</if>
,PROD_CD
,SUBS_STTUS_CD
,REG_ID
,REG_DT
,CHG_ID
,CHG_DT
)VALUES(
#{subsId}
, #{efctStDt}
<if test="subsSttusCd != null and subsSttusCd != ''">
, STR_TO_DATE('9999-12-31', '%Y-%m-%d')
</if>
, #{prodCd}
, #{subsSttusCd}
, #{regId}
, now()
, #{regId}
, now()
)
</insert>
<!-- 상품 정보 조회 -->
<select id="getProdAmt" parameterType="String" resultType="kr.co.uplus.ez.api.custMgt.dto.ProdInfo">
/* custMgt-mapper.xml(getProdAmt) */
SELECT EPI.PROD_AMT
FROM hubez_common.EZ_SUBS_INFO ESI
INNER JOIN hubez_common.EZ_PROD_INFO EPI
ON EPI.PROD_CD = ESI.PROD_CD
WHERE USER_SEQ = #{userSeq}
</select>
<!-- 주문 번호 채번 -->
<select id="getOrder" resultType="String">
/* custMgt-mapper.xml(getOrder) */
SELECT hubez_admin.FUN_GET_ORDER();
</select>
<!-- 오더 저장 -->
<insert id="insertOrder" parameterType="kr.co.uplus.ez.api.custMgt.dto.OrderDto">
/* custMgt-mapper.xml(insertOrder) */
INSERT INTO hubez_admin.EZ_ORDER(
ORDER_ID
,ORDER_CRET_DT
,ORDER_TY_CD
,REG_ID
)VALUES(
#{orderId}
, STR_TO_DATE(#{orderCretDt}, '%y%m%d%H%i%s')
, #{orderTyCd}
, #{regId}
)
</insert>
<!-- 차감 상세 저장 -->
<insert id="insertLmtdctDtl" parameterType="kr.co.uplus.ez.api.custMgt.dto.LmtdctDtlDto">
/* custMgt-mapper.xml(insertLmtdctDtl) */
INSERT INTO hubez_admin.EZ_LMTDCT_DTL(
ORDER_CRET_DT
,USER_SEQ
,LMT_YM
,USE_YM
,LMT_TP_CD
,DDCT_TP_CD
,DDCT_AMT
,EXE_ORDER_ID
,SNDDCT_ORDER_ID
,REG_ID
,REG_DT
)VALUES(
#{orderCretDt}
, #{userSeq}
, #{lmtYm}
, #{useYm}
, #{lmtTpCd}
, #{ddctTpcd}
, #{ddctAmt}
, #{exeOrderId}
, #{snddctOrderId}
, #{regId}
, now()
)
</insert>
<!-- 한도초기화 추가 -->
<insert id="insertUserLmt" parameterType="kr.co.uplus.ez.api.custMgt.dto.UserLmtDto">
/* custMgt-mapper.xml(insertUserLmt) */
INSERT INTO hubez_admin.EZ_USER_LMT(
USER_SEQ
,LMT_YM
,FX_LMT_AMT
,MRT_LMT_AMT
,CFWD_AMT
,EXTNC_AMT
,CFWD_RSTRT_BLNC
,FX_BLNC
,MRT_USE_AMT
,SMS_USE_AMT
,MMS_USE_AMT
,LMS_USE_AMT
,ATLK_USE_AMT
,SMS_USE_CNT
,LMS_USE_CNT
,MMS_USE_CNT
,ATLK_USE_CNT
,REG_ID
,REG_DT
,CHG_ID
,CHG_DT
)VALUES(
#{userSeq}
, #{lmtYm}
, #{fxLmtAmt}
, #{mrtLmtAmt}
, 0
, 0
, 0
, #{fxBlnc}
, 0
, 0
, 0
, 0
, 0
, 0
, 0
, 0
, 0
, #{regId}
,now()
, #{chgId}
,now()
)
</insert>
</mapper> </mapper>

View File

@@ -84,6 +84,7 @@
ELSE 'N' ELSE 'N'
END AS PW_CHANGE_CHECK END AS PW_CHANGE_CHECK
, T1.AUT_CD , T1.AUT_CD
, T1.TMP_PWD_YN
FROM FROM
hubez_admin.EZ_ADM_USER T1 hubez_admin.EZ_ADM_USER T1
LEFT JOIN hubez_imdb.EZ_IM_USER T2 ON T1.OPRTR_ID = T2.LOGIN_ID LEFT JOIN hubez_imdb.EZ_IM_USER T2 ON T1.OPRTR_ID = T2.LOGIN_ID
@@ -218,13 +219,13 @@
<if test="autCd != null and autCd != ''"> <if test="autCd != null and autCd != ''">
, AUT_CD = #{autCd} , AUT_CD = #{autCd}
</if> </if>
<if test="authchrFailCnt != null and authchrFailCnt != ''"> <if test="authchrFailCnt != null">
, AUTHCHR_FAIL_CNT = #{authchrFailCnt} , AUTHCHR_FAIL_CNT = #{authchrFailCnt}
</if> </if>
<if test="lastLoginDt != null and lastLoginDt != ''"> <if test="lastLoginDt != null and lastLoginDt != ''">
, LAST_LOGIN_DT = NOW() , LAST_LOGIN_DT = NOW()
</if> </if>
<if test="loginFailCnt != null and loginFailCnt != ''"> <if test="loginFailCnt != null">
, LOGIN_FAIL_CNT = #{loginFailCnt} , LOGIN_FAIL_CNT = #{loginFailCnt}
</if> </if>
<if test="pwdChgDt != null and pwdChgDt != ''"> <if test="pwdChgDt != null and pwdChgDt != ''">

View File

@@ -238,8 +238,10 @@
ess.SNDRNO AS sendNum ess.SNDRNO AS sendNum
FROM FROM
hubez_common.EZ_SVC_SNDRNO ess hubez_common.EZ_SVC_SNDRNO ess
WHERE INNER JOIN hubez_common.EZ_CUST_INFO eci
ess.CUST_SEQ = #{custSeq} ON
ess.CUST_SEQ = eci.CUST_SEQ
WHERE eci.BIZRNO = #{bregno}
AND ess.SNDRNO IN AND ess.SNDRNO IN
<foreach collection="list" item="item" index="i" open="(" separator="," close=")"> <foreach collection="list" item="item" index="i" open="(" separator="," close=")">
#{item.sendNum} #{item.sendNum}

View File

@@ -83,11 +83,10 @@
AND T1.STTUS_CD = #{searchType2} AND T1.STTUS_CD = #{searchType2}
</if> </if>
<if test="searchText1 != null and searchText1 != ''"> <if test="searchText1 != null and searchText1 != ''">
AND T1.OPRTR_ID = #{searchText1} AND T1.OPRTR_ID LIKE CONCAT('%', #{searchText1}, '%')
</if> </if>
<if test="searchText2 != null and searchText2 != ''"> <if test="searchText2 != null and searchText2 != ''">
AND UPPER(T1.OPRTR_NM) LIKE UPPER('%' + #{searchText2} + AND T1.OPRTR_NM LIKE CONCAT('%', #{searchText2}, '%')
'%')
</if> </if>
</sql> </sql>