TC 수정 반영

This commit is contained in:
kimre
2022-07-18 01:06:10 +09:00
parent e8328fef2c
commit 2bfa07c17f
30 changed files with 2446 additions and 2066 deletions

View File

@@ -96,7 +96,8 @@ httpClient.interceptors.response.use(
tokenSvc.removeToken();
window.top.location.href = '/login';
} else if (error.response.status == 418) {
tokenSvc.removeToken();
window.top.location.href = '/login';
}else if (error.response.status == 500) {
if (error.response.data != null && error.response.data.message == '511 NETWORK_AUTHENTICATION_REQUIRED') {
alert('웹템플릿 IP가 브랜드포털에 등록이 필요합니다. 기술지원에 문의해주세요.');

View File

@@ -19,11 +19,13 @@
</tr>
<tr>
<th>비밀번호</th>
<td><input type="password" @keypress="onlyPassword" @input="onlyPassword" required minlength="8" maxlength="16" ref="_pwd1" v-model.trim="userPwd1"></td>
<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>
<td><input type="password" @keypress="onlyPassword" @input="onlyPassword" required minlength="8"
maxlength="16" ref="_pwd2" v-model.trim="userPwd2"></td>
</tr>
<tr>
<th>이름</th>
@@ -58,7 +60,7 @@
</div>
<validation-confirm-pop ref="validationConfirmPopModal"></validation-confirm-pop>
<common-modal ref="commmonModal"></common-modal>
<validation-confirm-modalPop ref="validationConfirmModalPop"></validation-confirm-modalPop>
</div>
</div>
</template>
@@ -70,6 +72,7 @@ import { utils_mixin, chkPattern2 } from '../service/mixins';
import ValidationConfirmPop from '../components/ValidationConfirmPop.vue';
import lodash from "lodash";
import commonModal from "../components/commonModal";
import validationConfirmModalPop from "@/modules/custMgt/components/ValidationConfirmModalPop";
export default {
name: "memberModifyPop",
@@ -81,6 +84,7 @@ export default {
},
components: {
ValidationConfirmPop,
validationConfirmModalPop,
commonModal,
},
model: {
@@ -145,7 +149,7 @@ export default {
memberUpdateConfirm() {
// confirm 팝업 노출
if (this.doValidate()) {
this.$refs.validationConfirmPopModal.confirmUpdateOpen();
this.$refs.validationConfirmModalPop.confirmUpdateOpen();
}
},
//사용자ID 수정 처리
@@ -264,7 +268,10 @@ export default {
}
const hp = this.mdn;
if (!this.isNull(hp) && !this.isMobile(hp)) {
this.$refs.validationConfirmPopModal.validationPhonenumberOpen();
this.row.title = '청약고객관리';
this.row.msg1 = '휴대폰번호를 확인해 주세요.';
this.row.focusTaget = '4';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
@@ -277,7 +284,11 @@ export default {
}
const email = this.email;
if (!this.isNull(email) && !lodash.isEqual(email, '@') && !this.emailCheck(email)) {
this.$refs.validationConfirmPopModal.validationEmailOpen();
this.row.title = '청약고객관리';
this.row.msg1 = 'E-mail 형식에 맞지 않습니다.';
this.row.msg2 = '확인하여 다시 등록 부탁 드립니다.';
this.row.focusTaget = '5';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}

View File

@@ -49,8 +49,8 @@
</div>
</div>
</div>
<validation-confirm-pop ref="validationConfirmPopModal"></validation-confirm-pop>
<common-modal ref="commmonModal"></common-modal>
<validation-confirm-modalPop ref="validationConfirmModalPop"></validation-confirm-modalPop>
<!-- <common-modal ref="commmonModal"></common-modal>-->
</div>
</template>
@@ -58,9 +58,9 @@
import api from '@/service/api';
import custMgtApi from "../service/custMgtApi.js";
import {utils_mixin, chkPattern2} from '../service/mixins';
import ValidationConfirmPop from '../components/ValidationConfirmPop.vue';
import lodash from "lodash";
import commonModal from "../components/commonModal";
import validationConfirmModalPop from "@/modules/custMgt/components/ValidationConfirmModalPop";
// import commonModal from "../components/commonModal";
export default {
name: "memberRegPop",
@@ -71,8 +71,8 @@ export default {
}
},
components: {
ValidationConfirmPop,
commonModal,
validationConfirmModalPop,
// commonModal,
},
model: {
//prop: 'sendData',
@@ -101,7 +101,7 @@ export default {
},
methods: {
//사용자ID 생성 모달 Open
async memberInsertModalOpen(props) {
memberInsertModalOpen(props) {
this.adminId = props.adminId;
this.userTotalCnt = props.userTotalCnt;
@@ -115,15 +115,11 @@ export default {
memberInsertConfirm() {
// confirm 팝업 노출
if (this.doValidate()) {
this.$refs.validationConfirmPopModal.confirmInsertOpen();
this.$refs.validationConfirmModalPop.confirmInsertOpen()
}
},
doMemberInsert(){
console.log("aaaaaaaa")
},
//사용자ID 수정 처리
async memberInsert() {
console.log(123123)
this.row.adminId = this.adminId;
this.row.userId = this.userId;
this.row.userNm = this.userNm;
@@ -137,7 +133,7 @@ export default {
if (result != null && result.retCode == "0000") {
this.row.title = '청약고객관리';
this.row.msg1 = '사용자 생성 완료하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
this.toComplete();
} else if (result != null && result.retCode == "4018") {
// 이미 사용중인 ID
@@ -145,12 +141,12 @@ export default {
} else {
this.row.title = '청약고객관리';
this.row.msg1 = '실패 하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
}
} catch (err) {
this.row.title = '청약고객관리';
this.row.msg1 = '실패 하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
}
},
//사용자ID 생성 모달 Close
@@ -181,7 +177,7 @@ export default {
console.log(this.userTotalCnt)
if (this.userTotalCnt >= 100) {
// 사용자등록제한_최대100개까지
this.$refs.validationConfirmPopModal.validationMaxlimitOpen();
this.$parent.$refs.validationConfirmPopModal.validationMaxlimitOpen();
return false;
}
@@ -190,7 +186,7 @@ export default {
this.row.title = '청약고객관리';
this.row.msg1 = 'ID를 입력해 주세요.';
this.row.focusTaget = '1';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
// 청약 ID 길이 체크 6~16
@@ -200,7 +196,7 @@ export default {
this.row.msg1 = 'ID 형식에 맞지 않습니다.';
this.row.msg2 = '확인하여 다시 등록 부탁 드립니다.';
this.row.focusTaget = '1';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
@@ -208,7 +204,7 @@ export default {
this.row.title = '청약고객관리';
this.row.msg1 = '이름을 입력해 주세요.';
this.row.focusTaget = '2';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
@@ -216,7 +212,7 @@ export default {
this.row.title = '청약고객관리';
this.row.msg1 = '휴대폰번호를 입력해주세요.';
this.row.focusTaget = '3';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
const hp = this.mdn;
@@ -227,7 +223,7 @@ export default {
this.row.msg1 = '휴대폰번호 형식에 맞지 않습니다.';
this.row.msg2 = '확인하여 다시 등록 부탁 드립니다.';
this.row.focusTaget = '3';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
@@ -235,7 +231,7 @@ export default {
this.row.title = '청약고객관리';
this.row.msg1 = '이메일을 입력해주세요.';
this.row.focusTaget = '4';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
const email = this.email;
@@ -245,14 +241,14 @@ export default {
this.row.msg1 = 'E-mail 형식에 맞지 않습니다.';
this.row.msg2 = '확인하여 다시 등록 부탁 드립니다.';
this.row.focusTaget = '4';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
if (this.isNull(this.stat)) {
this.row.title = '청약고객관리';
this.row.msg1 = '상태를 선택 해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
return false;
}

View File

@@ -0,0 +1,366 @@
<template>
<!-- <div class="wrap bg-wrap"> -->
<div>
<!-- 사용자 등록 - 최초 등록 -->
<div class="dimmed confirm-insert" @click="confirmInsertClose();"></div>
<div class="popup-wrap confirm-insert">
<div class="popup confirm-insert">
<div class="pop-head">
<h3 class="pop-tit">사용자 등록111111</h3>
</div>
<div class="pop-cont">
<p>해당 사용자를 등록하고 인증 메일을</p>
<p>발송하시겠습니까?</p>
<p>사용을 위해서는 등록된 이메일 인증 </p>
<p>서비스 이용이 가능합니다.</p>
</div>
<div class="popup-btn2">
<button class="btn-pcolor" @click="confirmInsert();">확인</button>
<button class="btn-default" @click="confirmInsertClose();">취소</button>
</div>
</div>
</div>
<!-- 사용자 수정 확인 -->
<div class="dimmed confirm-update" @click="confirmUpdateClose();"></div>
<div class="popup-wrap confirm-update">
<div class="popup confirm-update">
<div class="pop-head">
<h3 class="pop-tit">사용자 수정 확인</h3>
</div>
<div class="pop-cont">
<p>변경된 내용을 저장하시겠습니까?</p>
</div>
<div class="popup-btn2">
<button class="btn-pcolor" @click="confirmUpdate();">확인</button>
<button class="btn-default" @click="confirmUpdateClose();">취소</button>
</div>
</div>
</div>
<!-- 사용자 등록 - 이메일 형식 체크 -->
<div class="dimmed validation-email" @click="validationEmailClose();"></div>
<div class="popup-wrap validation-email">
<div class="popup validation-email ">
<div class="pop-head">
<h3 class="pop-tit">사용자 등록</h3>
</div>
<div class="pop-cont">
<p>E-mail 형식에 맞지 않습니다.</p>
<p>확인하여 다시 등록 부탁 드립니다.</p>
</div>
<div class="popup-btn1">
<button class="btn-pcolor" @click="validationEmailClose();">확인</button>
</div>
</div>
</div>
<!-- 사용자 등록 - 아이디 중복 체크 -->
<div class="dimmed validation-id-duplicate" @click="validationIdDuplicateClose();"></div>
<div class="popup-wrap validation-id-duplicate">
<div class="popup validation-id-duplicate">
<div class="pop-head">
<h3 class="pop-tit">사용자 등록</h3>
</div>
<div class="pop-cont">
<p>중복된 아이디가 있습니다.</p>
<p>아이디를 다시 확인하여 등록 부탁드립니다.</p>
</div>
<div class="pop-btn1">
<button class="btn-pcolor" @click="validationIdDuplicateClose();">확인</button>
</div>
</div>
</div>
<!-- 사용자 ID 생성 파일 업로드 - 성공 -->
<div class="dimmed success-fileupload" @click="successFileuploadClose();"></div>
<div class="popup-wrap success-fileupload">
<div class="popup success-fileupload">
<div class="pop-head">
<h3 class="pop-tit">사용자 ID 생성 파일 업로드</h3>
</div>
<div class="pop-cont">
<p>정상 업로드 되었습니다.</p>
</div>
<div class="popup-btn1">
<button class="btn-pcolor" @click="successFileuploadClose();">확인</button>
</div>
</div>
</div>
<div class="dimmed fail-fileupload" @click="failFileuploadClose();"></div>
<div class="popup-wrap fail-fileupload">
<!-- 사용자 ID 생성 파일 업로드 -->
<div class="popup fail-fileupload">
<div class="pop-head">
<h3 class="pop-tit">사용자 ID 생성 파일 업로드</h3>
</div>
<div class="pop-cont">
<p>파일 업로드 오류가 발생하여 정상건만</p>
<p>업로드 완료하였습니다.</p>
</div>
<ul class="pop-cont-detail">
<li> <span class="number">{{ totalCnt }}</span> ( 정상 <span class="number blue">{{ successCnt }}</span> 오류
<span class="number red">{{ failCnt }}</span> )
</li>
</ul>
<div class="pop-cont bottom">
<p>오류 건은 확인 재등록 부탁 드립니다.</p>
</div>
<div class="popup-btn2">
<button class="btn-pcolor" @click="failFileuploadOk();">확인</button>
<!-- <button class="btn-default" @click="failFileuploadClose();">취소</button>-->
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "validationConfirmPop",
data() {
return {
row: {},
title: '',
msg: '',
failCnt: 0,
successCnt: 0,
totalCnt: 0,
}
},
methods: {
//사용자등록 - 최초등록 Open
confirmInsertOpen() {
var dimmed = document.getElementsByClassName('confirm-insert');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'block';
}
},
//사용자등록 - 최초등록
confirmInsert() {
var dimmed = document.getElementsByClassName('confirm-insert');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
}
console.log("this.$parent.memberInsert() ~~~~~~")
this.$parent.memberInsert();
},
//사용자등록 - 최초등록 Close
confirmInsertClose() {
var dimmed = document.getElementsByClassName('confirm-insert');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
}
},
// 사용자 삭제 Open
confirmDeleteOpen() {
var dimmed = document.getElementsByClassName('confirm-delete');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'block';
}
},
//사용자 삭제
confirmDelete() {
var dimmed = document.getElementsByClassName('confirm-delete');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
}
},
//사용자 삭제 Close
confirmDeleteClose() {
var dimmed = document.getElementsByClassName('confirm-delete');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
}
},
//사용자 수정 확인 Open
confirmUpdateOpen() {
var dimmed = document.getElementsByClassName('confirm-update');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'block';
}
},
//사용자 수정 확인
confirmUpdate() {
var dimmed = document.getElementsByClassName('confirm-update');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
}
this.$parent.memberUpdate();
},
// 사용자 수정 Close
confirmUpdateClose() {
var dimmed = document.getElementsByClassName('confirm-update');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
}
},
//사용자 수정(청약고객-sub) 확인 Open
confirmUpdateSubOpen() {
var dimmed = document.getElementsByClassName('confirm-update-sub');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'block';
}
},
//사용자 수정(청약고객-sub) 확인
confirmUpdateSub() {
var dimmed = document.getElementsByClassName('confirm-update-sub');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
}
this.$parent.updateAdminInfo();
},
// 사용자 수정(청약고객-sub) Close
confirmUpdateSubClose() {
var dimmed = document.getElementsByClassName('confirm-update-sub');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
}
},
// 이메일 형식 체크 Open
validationEmailOpen() {
var dimmed = document.getElementsByClassName('validation-email');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'block';
}
},
// 이메일 형식 체크 Close
validationEmailClose() {
var dimmed = document.getElementsByClassName('validation-email');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
}
this.$parent.checkEmailFocus();
},
// 아이디 중복 체크 Open
validationIdDuplicateOpen() {
var dimmed = document.getElementsByClassName('validation-id-duplicate');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'block';
}
},
// 아이디 중복 체크 Close
validationIdDuplicateClose() {
var dimmed = document.getElementsByClassName('validation-id-duplicate');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
}
this.$parent.checkIdDupFocus();
},
// 최대 등록 제한 Open
validationMaxlimitOpen() {
var dimmed = document.getElementsByClassName('validation-maxlimit');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'block';
}
},
// 최대 등록 제한 Close
validationMaxlimitClose() {
var dimmed = document.getElementsByClassName('validation-maxlimit');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
}
},
// 휴대폰번호 형식 체크 Open
validationPhonenumberOpen() {
var dimmed = document.getElementsByClassName('valication-phonenumber');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'block';
}
},
// 휴대폰번호 형식 체크 Close
validationPhonenumberClose() {
var dimmed = document.getElementsByClassName('valication-phonenumber');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
}
this.$parent.checkPhoneFocus();
},
// 사용자 ID 생성 파일 업로드 - 성공 Open
successFileuploadOpen() {
var dimmed = document.getElementsByClassName('success-fileupload');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'block';
}
},
// 사용자 ID 생성 파일 업로드 - 성공 Close
successFileuploadClose() {
var dimmed = document.getElementsByClassName('success-fileupload');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
}
// 목록페이지 이동
this.$parent.toComplete();
},
// 정상완료 후 목록페이지 이동
toComplete() {
this.row.searchType1 = '';
this.row.searchType2 = '';
this.row.searchType3 = '';
this.row.searchText1 = '';
this.row.startDt = '';
this.row.endDt = '';
this.row.page = 1;
this.$router.push({name: 'subsList', params: this.row});
},
// 사용자 ID 생성 파일 업로드 - 성공 Open
failFileuploadOpen(props) {
var dimmed = document.getElementsByClassName('fail-fileupload');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'block';
}
this.totalCnt = props.totalCnt
this.successCnt = props.successCnt
this.failCnt = props.failCnt
},
failFileuploadOk() {
var dimmed = document.getElementsByClassName('fail-fileupload');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
}
this.row.result = true;
// 부모 함수 호출.
this.$parent.failFileuploadOk(this.row);
},
// 사용자 ID 생성 파일 업로드 - 성공 Close
failFileuploadClose() {
var dimmed = document.getElementsByClassName('fail-fileupload');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
}
},
// 모달 오픈
confirmModalOpen(props) {
var dimmed = document.getElementsByClassName('confirm');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'block';
}
this.title = props.title;
this.msg = props.msg;
},
// 모달 끄기(ok)
confirmModalClose() {
var dimmed = document.getElementsByClassName('confirm');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
}
this.row.result = true;
// 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row);
},
// 모달 끄기(취소)
confirmModalCancel() {
var dimmed = document.getElementsByClassName('confirm');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
}
this.row.result = false;
// 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row);
},
}
}
</script>

View File

@@ -18,26 +18,6 @@
</div>
</div>
<!-- 사용자 등록 - 최초 등록 -->
<div class="dimmed confirm-insert" @click="confirmInsertClose();"></div>
<div class="popup-wrap confirm-insert">
<div class="popup confirm-insert">
<div class="pop-head">
<h3 class="pop-tit">사용자 등록</h3>
</div>
<div class="pop-cont">
<p>해당 사용자를 등록하고 인증 메일을</p>
<p>발송하시겠습니까?</p>
<p>사용을 위해서는 등록된 이메일 인증 </p>
<p>서비스 이용이 가능합니다.</p>
</div>
<div class="popup-btn2">
<button class="btn-pcolor" @click="confirmInsert();">확인</button>
<button class="btn-default" @click="confirmInsertClose();">취소</button>
</div>
</div>
</div>
<!-- 사용자 등록 - 이메일 형식 체크 -->
<div class="dimmed validation-email" @click="validationEmailClose();"></div>
<div class="popup-wrap validation-email">
@@ -121,22 +101,6 @@
</div>
</div>
<!-- 사용자 수정 확인 -->
<div class="dimmed confirm-update" @click="confirmUpdateClose();"></div>
<div class="popup-wrap confirm-update">
<div class="popup confirm-update">
<div class="pop-head">
<h3 class="pop-tit">사용자 수정 확인</h3>
</div>
<div class="pop-cont">
<p>변경된 내용을 저장하시겠습니까?</p>
</div>
<div class="popup-btn2">
<button class="btn-pcolor" @click="confirmUpdate();">확인</button>
<button class="btn-default" @click="confirmUpdateClose();">취소</button>
</div>
</div>
</div>
<!-- 사용자 수정(청약고객:sub) 확인 -->
<div class="dimmed confirm-update-sub" @click="confirmUpdateSubClose();"></div>

View File

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

View File

@@ -194,13 +194,13 @@ export default {
}
}
},
{name: 'custNm', header: '고객사명', align: 'center', width: 130},
{name: 'regNo', header: '가입번호', align: 'center', width: 130},
{name: 'regDt', header: '가입일', align: 'center', width: 130, cls: 'td_line'},
{name: 'stat', header: '상태', align: 'center', width: 130},
{name: 'channel', header: '유치채널', align: 'center', width: 130},
{name: 'plan', header: '요금제', align: 'center', width: 130},
{name: 'carryOver', header: '이월누적금액', align: 'center', width: 130}
{name: 'custNm', header: '고객사명', align: 'center', width: '4%'},
{name: 'regNo', header: '가입번호', align: 'center', width: '12%'},
{name: 'regDt', header: '가입일', align: 'center', width: '12%', cls: 'td_line'},
{name: 'stat', header: '상태', align: 'center', width: '12%'},
{name: 'channel', header: '유치채널', align: 'center', width: '12%'},
{name: 'plan', header: '요금제', align: 'center', width: '12%'},
{name: 'carryOver', header: '이월누적금액', align: 'center', width: '12%'}
],
noDataStr: '검색 결과가 없습니다.',
params: {

View File

@@ -21,7 +21,7 @@
<th>발송타입</th>
<td v-if="code === null || code === ''">
<div v:class="select_box">
<select name="" id="right" v-model.trim="sndblckTpCd" ref="sndblckTpCd" @keyup.enter="search">
<select name="" id="right" v-model.trim="sndblckTpCd" ref="sndblckTpCd">
<option v-for="(option, i) in tpType" :value="option.code" v-bind:key="i">
{{ option.codeNm }}
</option>
@@ -145,6 +145,11 @@ export default {
this.row.title = '발신번호 차단';
this.row.msg1 = '성공 하였습니다.';
this.$parent.alertInsert(this.row);
}else if (result != null && result.retCode == "4018") {
this.row.title = '발신번호 차단';
this.row.msg1 = '이미등록된 발신번호입니다.';
this.$parent.alertInsert(this.row);
return false;
}
this.toComplete();
} catch (err) {
@@ -217,7 +222,7 @@ export default {
const character = characters[i]
const decimal = character.charCodeAt(0)
const byte = this.getByteLength(decimal) // 글자 한 개가 몇 바이트 길이인지 구해주기
// console.log(byte)
// 현재까지의 바이트 길이와 더해 최대 바이트 길이를 넘지 않으면
if (totalByte + byte <= maxByte) {
totalByte += byte // 바이트 길이 값을 더해 현재까지의 총 바이트 길이 값을 구함
@@ -226,7 +231,6 @@ export default {
break // for 루프 종료
}
}
return validText
},

View File

@@ -14,7 +14,7 @@
<tr>
<th>차단문구</th>
<td class="input_add">
<input v-model="word" ref="_word" maxlength="50">
<input v-model="word" ref="_word" maxlength="10" @input="msgLimitByte()">
<button type="button" class="button white add" @click="doAdd" ></button>
</td>
</tr>
@@ -53,7 +53,8 @@
</tr>
<tr>
<th>메모</th>
<td class="sender"><textarea class="memo_text" v-model.trim="memo" ref="memo"></textarea></td>
<td class="sender"><textarea class="memo_text" v-model.trim="memo" ref="memo" maxlength="2000"
@input="memoLimitByte()"></textarea></td>
</tr>
</tbody>
@@ -82,15 +83,9 @@ export default {
return {
row: {},
// msgBlckword: {
// word:'',
// },
msgBlckwordList: [
// { word : '스팸'},
],
msgBlckwordList: [],
rsnType: [],
tpType: [],
// seqNo: '', // 일련번호
word: '', // 차단문구
blckSndrno: '',
sndblckTpCd: '',
@@ -101,6 +96,7 @@ export default {
regId: '',
regDt: '',
memo: '', // 메모
maxByte: 2000,
}
},
@@ -139,9 +135,15 @@ export default {
},
async doInsert() {
// if(this.doValidate() && window.confirm('등록 하시겠습니까?')){
this.row.blckRsnCd = this.blckRsnCd;
this.row.blckContCd = this.blckContCd;
this.row.memo = this.memo;
this.row.blckYn = this.blckYn;
this.row.list = this.msgBlckwordList
console.log(this.row)
// return false;
try {
const response = await riskMgtApi.msgIntrcpList(this.row);
const response = await riskMgtApi.msgInsertIntrcp(this.row);
const result = response.data;
if (result != null && result.retCode == "0000") {
this.row.title = '메세지 차단';
@@ -165,14 +167,7 @@ export default {
this.$refs._word.focus();
return false;
}
this.row.blckRsnCd = this.blckRsnCd;
this.row.blckContCd = this.blckContCd;
this.row.memo = this.memo;
this.row.blckYn = this.blckYn;
this.row.list = this.msgBlckwordList
return true;
},
toComplete() {
@@ -210,8 +205,46 @@ export default {
if (this.doValidate()) {
this.$refs.ValidationConfirmPopup.msgConfirmInsertOpen();
}
}
},
// 바이트길이 구하기
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
},
memoLimitByte() {
this.memo = this.getLimitedByteText(this.memo, this.maxByte);
}, //END 바이트길이 구하기
msgLimitByte(){
this.word = this.getLimitedByteText(this.word, 10);
}
}

View File

@@ -18,7 +18,7 @@ const deleteIntrcp = (params) => {
return httpClient.post('/api/v1/bo/riskMgt/sendNum/deleteIntrcp', params, { withCredentials: false });
}
const msgIntrcpList = (params) => {
const msgInsertIntrcp = (params) => {
return httpClient.post('/api/v1/bo/riskMgt/msg/insertIntrcp', params, { withCredentials: false });
}
@@ -39,7 +39,7 @@ export default {
intrcpDetail,
insertIntrcp,
deleteIntrcp,
msgIntrcpList,
msgInsertIntrcp,
msgIntrcpDetail,
deleteMsgIntrcp,
updateMsgIntrcp

View File

@@ -21,7 +21,7 @@
</thead>
<tbody>
<tr v-for="(item, idx) in list">
<td>{{ item.custNm }}</td>
<td>{{ item.adminId }}</td>
<td><a href="javascript:void(0)" @click="setAdminInfo(item)">{{ item.bregNo }}</a></td>
</tr>
</tbody>

View File

@@ -125,7 +125,7 @@
</div>
<admin-list-pop ref="admnListPop" :send-data="childData" @event-data="setChildData"/>
<common-modal ref="commmonModal2"></common-modal>
<!-- <common-modal ref="commmonModal2"></common-modal>-->
</div>
</div>
</template>
@@ -133,7 +133,7 @@
<script>
import AdminListPop from "@/modules/sendNumMgt/components/AdminListPop";
import {utils_mixin, chkPattern2} from '../service/mixins';
import commonModal from "@/components/modal/commonModal";
// import commonModal from "@/components/modal/commonModal";
import sendNumMgtApi from "@/modules/sendNumMgt/service/sendNumMgtApi";
export default {
@@ -171,7 +171,7 @@ export default {
},
components: {
AdminListPop,
commonModal,
// commonModal,
},
model: {
prop: 'sendData',
@@ -421,8 +421,6 @@ export default {
this.otherBusinessFile = null;
},
async saveSendNum() {
this.saveSendNums = []
this.saveSendNums.push({
sendNm: this.sendNm,
@@ -437,9 +435,7 @@ export default {
})
)
}
this.doValidate();
// console.log(this.custSeq)
console.log(this.$data)
if(this.doValidate()){
if (this.bizrAuthYn !== 'Y') {
if (this.nmineeDivCd === '01') {
// 사업자
@@ -467,29 +463,86 @@ export default {
this.toComplete()
}
}
}
},
doValidate() {
if (this.isNull(this.adminId) || this.isNull(this.custNm) || this.isNull(this.bRegNo)) {
this.row.title = '발신번호 등록';
this.row.msg1 = '관리자ID를 조회 해주세요.';
this.getParent('NumberList').commonModalOpen(this.row)
// this.$refs.commmonModal2.alertModalOpen(this.row);
// this.getParent('NumberList').commonModalOpen(this.row)
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
if (this.isNull(this.sendNm) || this.isNull(this.sendNum)) {
this.row.title = '발신번호 등록';
this.row.msg1 = '발신번호명/발신번호를 입력해 주세요.';
this.$refs.commmonModal2.alertModalOpen(this.row);
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
// if(this.isNull(this.adminId)){
// this.row.title = '발신번호 등록';
// this.row.msg1 = '관리자ID를 조회 해주세요..';
// this.$refs.commmonModal.alertModalOpen(this.row);
// return false;
// }
if(this.nmineeDivCd == '01'){
if(this.communicationFile == null){
this.row.title = '발신번호 등록';
this.row.msg1 = '통신서비스 이용증명원 파일을 업로드 하세요.';
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
return false
}
if(this.tenureFile == null){
this.row.title = '발신번호 등록';
this.row.msg1 = '재직증명서 파일을 업로드 하세요.';
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
return false
}
if(this.businessFile == null){
this.row.title = '발신번호 등록';
this.row.msg1 = '사업자등록증 파일을 업로드 하세요.';
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
return false
}
}else{
if(this.trustFile == null){
this.row.title = '발신번호 등록';
this.row.msg1 = '위임-수임관계 확인 서류 파일을 업로드 하세요.';
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
return false
}
if(this.warrantFile == null){
this.row.title = '발신번호 등록';
this.row.msg1 = '위임장 파일을 업로드 하세요.';
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
return false
}
if(this.deputyFile == null){
this.row.title = '발신번호 등록';
this.row.msg1 = '대리인 신분증 사본 인증 파일을 업로드 하세요.';
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
return false
}
if(this.communicationFile == null){
this.row.title = '발신번호 등록';
this.row.msg1 = '통신서비스 이용증명원 파일을 업로드 하세요.';
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
return false
}
if(this.tenureFile == null){
this.row.title = '발신번호 등록';
this.row.msg1 = '재직증명서 파일을 업로드 하세요.';
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
return false
}
if(this.otherBusinessFile == null){
this.row.title = '발신번호 등록';
this.row.msg1 = '사업자등록증 파일을 업로드 하세요.';
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
return false
}
if(this.businessFile == null){
this.row.title = '발신번호 등록';
this.row.msg1 = '사업자등록증 파일을 업로드 하세요.';
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
return false
}
}
return true;
},
toComplete() {
this.getParent('numberList').$refs.table.reloadData();

View File

@@ -87,7 +87,7 @@ const insertNumber2 = (trustFile, warrantFile, deputyFile, tenureFile, otherBusi
row.custNm = custNm
row.bRegNo = bRegNo
row.nmineeDivCd = nmineeDivCd
row.numberInputs = numberInputs
row.list = numberInputs
row.bizrAuthYn = bizrAuthYn
row.custSeq = custSeq

View File

@@ -52,7 +52,7 @@
<div class="info">
<div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span>
<div class="select_box NumberSe">
<select name="" id="perPage" v-model="perPageCnt" @keyup.enter="search">
<select name="" id="perPage" v-model="perPageCnt" @change="changePerPage()">
<option value="20">20</option>
<option value="50">50</option>
<option value="100">100</option>
@@ -93,7 +93,6 @@ import customGrid from '@/components/CustomGrid';
import commonModal from "@/components/modal/commonModal";
import NumberRegPop from '../components/NumberRegPop';
import NumberDetailPop from "@/modules/sendNumMgt/components/NumberDetailPop";
// import sendNumMgtApi from "@/modules/sysMgt/service/sendNumMgtApi";
import sendNumMgtApi from '../service/sendNumMgtApi';
@@ -128,17 +127,16 @@ export default {
statType: [],
cate2Code: "",
totalItems: 0,
searchType5: '',
searchType4: 'regNo',
searchType3: '',
searchType2: '',
searchType1: '',
isFirst:true,
// 테이블 리스트 데이터
perPageCnt: 50,
grid: {
url: '/api/v1/bo/sendNumMgt/numberList',
perPage: 20,
pagePerRows: 50,
pagination: true,
isCheckbox: true,
initialRequest: false,
@@ -185,7 +183,6 @@ export default {
searchType2: '',
searchType3: '',
searchType4: '',
searchType5: '',
searchText1: '',
pagePerRows: '',
page: ''
@@ -201,7 +198,8 @@ export default {
commonModal,
},
created() {
// const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
// this.grid.pagePerRows = 50
this.isFirst=true
},
destroyed() {
this.$store.commit('searchcondition/updateSearchCondition', {
@@ -212,9 +210,7 @@ export default {
searchType2: '',
searchType3: '',
searchType4: '',
searchText1: '',
pagePerRows: '',
page: ''
searchText1: ''
}
});
},
@@ -222,6 +218,8 @@ export default {
let page = 1;
// 페이지 정보 및 검색 조건
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
console.log('getCondition : ' + getCondition);
// store에 저장된 페이지 정보 및 검색 조건을 불러오기
let isKeep = false;
if (getCondition) {
@@ -231,7 +229,6 @@ export default {
isKeep = true;
}
this.search(isKeep);
},
methods: {
search: function (isKeep) {
@@ -240,10 +237,13 @@ export default {
this.grid.params.searchType2 = this.searchType2
this.grid.params.searchType3 = this.searchType3
this.grid.params.searchType4 = this.searchType4
this.grid.params.searchType5 = this.searchType5
this.grid.pagePerRows = this.perPageCnt
console.log(this.$data)
if(this.isFirst){
this.grid.pagePerRows = 50
}
this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData();
this.isFirst=false
},
sendStoreData: function () {
const getP = this.$refs.table.getPagination();
@@ -254,7 +254,7 @@ export default {
params: this.grid.params
});
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
// const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
},
numberRegPopOpen: function () {
this.$refs.numberRegPop.numberRegPopopen();
@@ -321,18 +321,21 @@ export default {
this.numberDelete();
}
},
changePerPage: function () { // 페이지당 조회할 개수
this.grid.pagePerRows = this.perPageCnt;
},
// beforeRouteLeave(to, from, next) {
//
// const getP = this.$refs.table.getPagination();
// console.log("==========getP : " + getP._currentPage);
// this.$store.commit('searchcondition/updateSearchCondition', {
// page: getP._currentPage,
// perPage: this.perPageCnt,
// params: this.grid.params
// });
// // 라우트 하기전 실행
// next();
// }
},
beforeRouteLeave(to, from, next) {
const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP._currentPage);
this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage,
perPage: this.perPageCnt,
params: this.grid.params
});
// 라우트 하기전 실행
next();
}
};
</script>

View File

@@ -35,7 +35,7 @@
<div class="info">
<div class="count"> <span> {{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }} </span>
<div class="select_box NumberSe">
<select name="" id="perpage" v-model="perPageCnt" @keyup.enter="search">
<select name="" id="perpage" v-model="perPageCnt" @change="changePerPage()">
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{
option.text
}}
@@ -79,7 +79,7 @@ export default {
searchType1: '',
searchType2: 'custNm',
// 테이블 리스트 데이터
perPageCnt: 20,
perPageCnt: 50,
options: [
{text: '20', value: 20},
{text: '50', value: 50},
@@ -87,7 +87,7 @@ export default {
],
grid: {
url: '/api/v1/bo/sendNumMgt/profileList',
perPage: 20,
pagePerRows: 50,
pagination: true,
isCheckbox: false,
initialRequest: false,
@@ -105,13 +105,13 @@ export default {
],
columns: [
{name: 'no', header: 'NO', align: 'center', width: 50},
{name: 'custNm', header: '고객사명', align: 'center', width: 200},
{name: 'bregNo', header: '사업자번호', align: 'center', width: 100},
{name: 'sendProfile', header: '발신프로필', align: 'center', width: 100},
{name: 'sendProfileKey', header: '발신프로필key', align: 'center', width: 100},
{name: 'stat', header: '상태', width: 100, cls: 'td_line'},
{name: 'regDt', header: '등록일', align: 'center', width: 150},
{name: 'no', header: 'NO', align: 'center', width: '5%'},
{name: 'custNm', header: '고객사명', align: 'center', width: '15%'},
{name: 'bregNo', header: '사업자번호', align: 'center', width: '15%'},
{name: 'sendProfile', header: '발신프로필', align: 'center', width: '15%'},
{name: 'sendProfileKey', header: '발신프로필key', align: 'center', width: '20%'},
{name: 'stat', header: '상태', width: '15%', cls: 'td_line'},
{name: 'regDt', header: '등록일', align: 'center', width: '15%'},
],
noDataStr: '검색 결과가 없습니다.',
params: {
@@ -139,14 +139,16 @@ export default {
},
created() {
},
mounted() {
let page = 1;
// 페이지 정보 및 검색 조건
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
console.log('getCondition : ' + getCondition);
// store에 저장된 페이지 정보 및 검색 조건을 불러오기
let isKeep = false;
if (getCondition) {
this.grid.pagePerRows = 50;
this.grid.pagePerRows = getCondition.perPage;
this.grid.params = getCondition.params;
page = getCondition.page;
isKeep = true;
@@ -155,17 +157,14 @@ export default {
},
methods: {
search: function (isKeep) {
console.log(this.grid.params);
this.grid.params.searchType1 = this.searchType1
this.grid.params.searchType2 = this.searchType2
// perPageCnt
this.grid.pagePerRows = this.perPageCnt;
this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData();
},
sendStoreData: function () {
const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP);
console.log("==========getP : " + getP._currentPage);
this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage,
perPage: this.perPageCnt,

View File

@@ -353,6 +353,10 @@ export default {
this.row.msg1 = '저장 하였습니다.';
this.$refs.commmonSysModal.alertSysModalOpen(this.row);
this.toComplete();
}else if (result != null && result.retCode == "4018") {
this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '이미 사용중인 아이디입니다.';
this.$refs.commmonSysModal.alertSysModalOpen(this.row);
}
} catch (err) {
this.row.title = '관리자/유치채널 관리';

View File

@@ -123,6 +123,11 @@ export default {
if (result != null && result.retCode == "0000") {
this.getAuthList();
return;
}else if(result != null && result.retCode == "4020"){
this.row = {}
this.row.title = '권한 관리';
this.row.msg1 = '해당 권한에 매핑된 사용자가 있습니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
} else {
this.row = {}
this.row.title = '권한 관리';

View File

@@ -106,6 +106,11 @@ public class RiskMgtService {
RiskMgtMapper riskMgtMapper = sqlSessionMaster.getMapper(RiskMgtMapper.class);
SendNumIntrcpDetail sendNumIntrcpDetail = riskMgtMapper.selectSndrnoBlckDetail(insertIntrcpReqDto.getBlckSndrno());
if(sendNumIntrcpDetail != null){
return new SendNumInsertIntrcpResDto(ApiResponseCode.CE_DUPLICATE_ID);
}
try {
insertIntrcpReqDto.setBlckYn(Const.COMM_YES);
// regId 들고오기

View File

@@ -12,13 +12,17 @@ import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
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.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
@Service
public class SendNumMgtService {
@@ -46,28 +50,30 @@ public class SendNumMgtService {
int totalCnt = sendNumMgtMapper.selectProfileTotalCnt(profileListReqDto);
if(totalCnt == 0) {
ProfileListRes profileListRes = new ProfileListRes();
profileListRes.setList(new ArrayList<>());
Paging paging = new Paging();
paging.setPage(nowPage);
paging.setTotalCnt(String.valueOf(totalCnt));
ProfileListRes profileListRes = new ProfileListRes();
profileListRes.setList(new ArrayList<>());
profileListRes.setPaging(paging);
return new ProfileListResDto(ApiResponseCode.CM_NOT_FOUND, profileListRes);
}
int page = profileListReqDto.getPage();
int pagePerRows = profileListReqDto.getPage();
int pagePerRows = profileListReqDto.getPagePerRows();
page = (page - 1) * pagePerRows;
profileListReqDto.setPage(page);
List<ProfileInfo> profileInfos = sendNumMgtMapper.selectProfileList(profileListReqDto);
ProfileListRes profileListRes = new ProfileListRes();
profileListRes.setList(profileInfos);
Paging paging = new Paging();
paging.setPage(nowPage);
paging.setTotalCnt(String.valueOf(totalCnt));
ProfileListRes profileListRes = new ProfileListRes();
profileListRes.setList(profileInfos);
profileListRes.setPaging(paging);
return new ProfileListResDto(ApiResponseCode.SUCCESS, profileListRes);
@@ -88,28 +94,30 @@ public class SendNumMgtService {
int totalCnt = sendNumMgtMapper.selectSendNumberTotalCnt(sendNumberListReqDto);
if(totalCnt == 0) {
SendNumberListRes sendNumberListRes = new SendNumberListRes();
sendNumberListRes.setList(new ArrayList<>());
Paging paging = new Paging();
paging.setPage(nowPage);
paging.setTotalCnt(String.valueOf(totalCnt));
SendNumberListRes sendNumberListRes = new SendNumberListRes();
sendNumberListRes.setList(new ArrayList<>());
sendNumberListRes.setPaging(paging);
return new SendNumberListResDto(ApiResponseCode.CM_NOT_FOUND, sendNumberListRes);
}
int page = sendNumberListReqDto.getPage();
int pagePerRows = sendNumberListReqDto.getPage();
int pagePerRows = sendNumberListReqDto.getPagePerRows();
page = (page - 1) * pagePerRows;
sendNumberListReqDto.setPage(page);
List<SendNumberInfo> sendNumberInfos = sendNumMgtMapper.selectSendNumberList(sendNumberListReqDto);
SendNumberListRes sendNumberListRes = new SendNumberListRes();
sendNumberListRes.setList(sendNumberInfos);
Paging paging = new Paging();
paging.setPage(nowPage);
paging.setTotalCnt(String.valueOf(totalCnt));
SendNumberListRes sendNumberListRes = new SendNumberListRes();
sendNumberListRes.setList(sendNumberInfos);
sendNumberListRes.setPaging(paging);
return new SendNumberListResDto(ApiResponseCode.SUCCESS, sendNumberListRes);
@@ -142,32 +150,36 @@ public class SendNumMgtService {
* @param insertNumberReqDto
* @return
*/
@Transactional(value="db1TransactionManager")
public InsertNumberResDto insertNumber(InsertNumberReqDto insertNumberReqDto, MultipartHttpServletRequest multipartRequest) {
SendNumMgtMapper sendNumMgtMapper = sqlSessionMaster.getMapper(SendNumMgtMapper.class);
String adminId = insertNumberReqDto.getAdminId();
Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
UserDetails userDetails = (UserDetails) principal;
String regId = userDetails.getUsername();
// 2. 중복 발신번호 체크를 위한 조회.
List<InsertNumber> sendNumbers = sendNumMgtMapper.selectSndrnoList(insertNumberReqDto);
List<InsertNumber> resSendNumbers = new ArrayList<>();
List<InsertNumber> dbSendNumbers = insertNumberReqDto.getList();
List<InsertNumber> allSendNumbers = insertNumberReqDto.getList();
if(insertNumberReqDto.getList().size() == sendNumbers.size()){
// 중복건... 오류
}
// 실패 항목 응답.
if(sendNumbers.size() > 0){
// 중복건의 대한 오류 응답.
resSendNumbers.addAll(sendNumbers);
allSendNumbers.addAll(sendNumbers);
}
dbSendNumbers = allSendNumbers.stream().distinct().collect(Collectors.toList());
// 1. 발신번호 SEQ 채번
String regReqNo = sendNumMgtMapper.selectRegReqNo();
String userSeq = sendNumMgtMapper.selectUserSeqByAdminId(adminId);
try {
insertNumberReqDto.setUserSeq(userSeq);
insertNumberReqDto.setReqCnt(insertNumberReqDto.getList().size());
insertNumberReqDto.setRegId(adminId);
insertNumberReqDto.setRegId(regId);
insertNumberReqDto.setRegReqNo(regReqNo);
// 2. 발신번호등록 테이블 저장. (EZ_SNDRNO_REG)
@@ -181,18 +193,7 @@ public class SendNumMgtService {
dir.mkdirs();
}
// 3. 발신번호 테이블 저장. (EZ_SVC_SNDRNO)
List<InsertNumber> reqSendNumbers = insertNumberReqDto.getList();
List<InsertNumber> dbSendNumbers = new ArrayList<>();
for(InsertNumber insertNumber: reqSendNumbers){
for(InsertNumber insertNumber1: resSendNumbers){
if(StringUtils.equals(insertNumber.getSendNum(), insertNumber1.getSendNum())){
reqSendNumbers.remove(insertNumber1);
}
}
}
for (InsertNumber dbInsertNumber : reqSendNumbers){
for (InsertNumber dbInsertNumber : dbSendNumbers){
dbInsertNumber.setCustSeq(insertNumberReqDto.getCustSeq());
dbInsertNumber.setRegReqNo(regReqNo);
dbInsertNumber.setNmineeDivCd(insertNumberReqDto.getNmineeDivCd());
@@ -202,7 +203,7 @@ public class SendNumMgtService {
}else{
dbInsertNumber.setNmineeDivCd(insertNumberReqDto.getNmineeDivCd());
}
dbInsertNumber.setRegId(adminId);
dbInsertNumber.setRegId(regId);
sendNumMgtMapper.insertNumberList(dbInsertNumber);
}
@@ -211,7 +212,6 @@ public class SendNumMgtService {
// 4. 발신번호 등록 서류 테이블 저장. (EZ_SNDRNO_DOC)
// DOC_NO 채번.
String regId = insertNumberReqDto.getRegId();
List<MultipartFile> multipartFiles = new ArrayList<>();
List<String> docTpCd = new ArrayList<>();
@@ -225,12 +225,13 @@ public class SendNumMgtService {
MultipartFile tenureFile = multipartRequest.getFile("tenureFile");
multipartFiles.add(tenureFile);
docTpCd.add(Const.SNDRNO_DOC_TP_CD_02);
// 사업자등록증 '06'
MultipartFile businessFile = multipartRequest.getFile("businessFile");
multipartFiles.add(businessFile);
docTpCd.add(Const.SNDRNO_DOC_TP_CD_06);
if(StringUtils.equals("02", insertNumberReqDto.getNmineeDivCd())){
if(StringUtils.equals(Const.SNDRNO_TP_CD_OTHER, insertNumberReqDto.getNmineeDivCd())){
// 위임-수임관계 확인 서류 '03'
MultipartFile trustFile = multipartRequest.getFile("trustFile");
multipartFiles.add(trustFile);
@@ -257,6 +258,8 @@ public class SendNumMgtService {
String fileNm = regReqNo + "_" + docTpCd.get(j).substring(1,2) + "_" + docTpCd.get(j) + "." + ext;
String titleNm = multipartFiles.get(j).getOriginalFilename();
long fileSize = multipartFiles.get(j).getSize();
// File Upload.
FileUtil.upload(multipartFiles.get(j), fileNm, path);
// 발신번호 등록 서류 테이블 저장 (EZ_SNDRNO_DOC).
@@ -277,9 +280,9 @@ public class SendNumMgtService {
}
InsertNumberRes insertNumberRes = new InsertNumberRes();
if(resSendNumbers.size() > 0){
if(sendNumbers.size() > 0){
// 발신번호 중복건 응답 처리.
insertNumberRes.setList(resSendNumbers);
insertNumberRes.setList(sendNumbers);
}
return new InsertNumberResDto(ApiResponseCode.SUCCESS, insertNumberRes);
@@ -354,28 +357,30 @@ public class SendNumMgtService {
int totalCnt = sendNumMgtMapper.selectSvcSndrnoListTotalCnt(sendNumberApprListReqDto);
if(totalCnt == 0) {
SendNumberApprListRes sendNumberApprListRes = new SendNumberApprListRes();
sendNumberApprListRes.setList(new ArrayList<>());
Paging paging = new Paging();
paging.setPage(nowPage);
paging.setTotalCnt(String.valueOf(totalCnt));
SendNumberApprListRes sendNumberApprListRes = new SendNumberApprListRes();
sendNumberApprListRes.setList(new ArrayList<>());
sendNumberApprListRes.setPaging(paging);
return new SendNumberApprListResDto(ApiResponseCode.CM_NOT_FOUND, sendNumberApprListRes);
}
int page = sendNumberApprListReqDto.getPage();
int pagePerRows = sendNumberApprListReqDto.getPage();
int pagePerRows = sendNumberApprListReqDto.getPagePerRows();
page = (page - 1) * pagePerRows;
sendNumberApprListReqDto.setPage(page);
List<SendNumberApprInfo> sendNumberApprInfos = sendNumMgtMapper.selectSvcSndrnoList(sendNumberApprListReqDto);
SendNumberApprListRes sendNumberApprListRes = new SendNumberApprListRes();
sendNumberApprListRes.setList(sendNumberApprInfos);
Paging paging = new Paging();
paging.setPage(nowPage);
paging.setTotalCnt(String.valueOf(totalCnt));
SendNumberApprListRes sendNumberApprListRes = new SendNumberApprListRes();
sendNumberApprListRes.setList(sendNumberApprInfos);
sendNumberApprListRes.setPaging(paging);
return new SendNumberApprListResDto(ApiResponseCode.SUCCESS, sendNumberApprListRes);

View File

@@ -1,27 +1,11 @@
package kr.co.uplus.ez.api.sysMgt;
import kr.co.uplus.ez.api.sysMgt.dto.*;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import kr.co.uplus.ez.api.sysMgt.dto.AdminDetail;
import kr.co.uplus.ez.api.sysMgt.dto.AdminDetailReqDto;
import kr.co.uplus.ez.api.sysMgt.dto.AdminInfo;
import kr.co.uplus.ez.api.sysMgt.dto.AdminListReqDto;
import kr.co.uplus.ez.api.sysMgt.dto.AuthDetail;
import kr.co.uplus.ez.api.sysMgt.dto.AuthDetailReqDto;
import kr.co.uplus.ez.api.sysMgt.dto.AuthInfo;
import kr.co.uplus.ez.api.sysMgt.dto.AuthMenu;
import kr.co.uplus.ez.api.sysMgt.dto.DeleteAdmin;
import kr.co.uplus.ez.api.sysMgt.dto.DeleteAuthReqDto;
import kr.co.uplus.ez.api.sysMgt.dto.InsertAdminReqDto;
import kr.co.uplus.ez.api.sysMgt.dto.InsertAuthReqDto;
import kr.co.uplus.ez.api.sysMgt.dto.SearchMadangId;
import kr.co.uplus.ez.api.sysMgt.dto.SearchMadangIdReqDto;
import kr.co.uplus.ez.api.sysMgt.dto.UpdateAdminReqDto;
import kr.co.uplus.ez.api.sysMgt.dto.UpdateAuthReqDto;
@Mapper
public interface SysMgtMapper {
@@ -58,4 +42,6 @@ public interface SysMgtMapper {
int deleteAuth(Map<String, Object> paramMap); // 권한 삭제
int deleteAuthMenu(Map<String, Object> paramMap); // 권한메뉴 삭제
int checkAdmin(Map<String, Object> paramMap);
}

View File

@@ -108,6 +108,15 @@ public class SysMgtService {
SysMgtMapper sysMgtMapper = sqlSessionMaster.getMapper(SysMgtMapper.class);
// 관리자 ID 중복체크.
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("searchType", "01");
paramMap.put("adminId", insertAdminReqDto.getMadangId());
int checkId = sysMgtMapper.checkAdmin(paramMap);
if(checkId > 0){
return new InsertAdminResDto(ApiResponseCode.CE_DUPLICATE_ID);
}
String encPw = EncryptionUtil.getCustomSHA512(insertAdminReqDto.getMadangId(), insertAdminReqDto.getAdminPw());
insertAdminReqDto.setAdminPw(encPw);
@@ -232,9 +241,14 @@ public class SysMgtService {
public DeleteAuthResDto deleteAuth(DeleteAuthReqDto deleteAuthReqDto) {
SysMgtMapper sysMgtMapper = sqlSessionMaster.getMapper(SysMgtMapper.class);
Map<String, Object> authParamMap = new HashMap<String, Object>();
Map<String, Object> authParamMap = new HashMap<String, Object>();
authParamMap.put("searchType", "02");
authParamMap.put("authCd", deleteAuthReqDto.getAuthCd());
int checkAdmin = sysMgtMapper.checkAdmin(authParamMap);
if(checkAdmin > 0){
return new DeleteAuthResDto(ApiResponseCode.CE_SYSMGT_AUTHCODE_EXISTS_USER);
}
try {
// 1.권한메뉴 삭제

View File

@@ -57,7 +57,8 @@ public enum ApiResponseCode {
,CE_DUPLICATE_ID("4018", "이미 사용중인 아이디 입니다.")
/** 발송한도금액이 정액한도금액보다 작습니다. */
,CE_SENDINGLIMT_ERROR("4019", "발송한도금액이 정액한도금액보다 작습니다.")
/** 해당 권한코드에 해당하는 어드민 사용자가 존재함. */
,CE_SYSMGT_AUTHCODE_EXISTS_USER("4020", "해당 권한코드에 해당하는 어드민 사용자가 존재함.")
// 시스템
/** 알 수 없는 에러. */
,SE_UNKNOWN("9999", "알 수 없는 에러");

View File

@@ -95,6 +95,9 @@ public class Const {
public static final String SNDRNO_DOC_TP_CD_06 = "06";
public static final String SNDRNO_DOC_TP_CD_07 = "07";
public static final String SNDRNO_TP_CD_SELF = "01";
public static final String SNDRNO_TP_CD_OTHER = "02";
public static final String INCH_DIV_CD_HOME = "01";
public static final String INCH_DIV_CD_ADM = "02";

View File

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

View File

@@ -330,7 +330,7 @@
) VALUES
<foreach collection="list" item="item" index="i"
separator=",">
(#{item.seqNo},#{item.seqNm}, #{item.word}, #{item.regId}, NOW() )
(#{item.seqNo}, #{item.word}, #{item.regId}, NOW() )
</foreach>
</insert>

View File

@@ -7,15 +7,12 @@
parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.ProfileListReqDto"
resultType="int">
/* sysMgt-mapper.xml(selectAdmUserTotalCnt) */
SELECT
COUNT(*)
FROM hubez_common.EZ_SVC_USER esu
INNER JOIN hubez_common.EZ_KKO_CHNL ekc
ON esu.USER_SEQ = ekc.USER_SEQ
AND ekc.MSGHB_STTUS_CD IN ('A','D')
INNER JOIN hubez_common.EZ_CUST_INFO eci
ON eci.CUST_SEQ = esu.CUST_SEQ
WHERE esu.USER_TP_CD ='01'
select count(*)
from hubez_common.EZ_KKO_CHNL ekc
inner join hubez_common.EZ_SVC_USER esu
on esu.USER_SEQ = ekc.USER_SEQ
inner join hubez_common.EZ_CUST_INFO eci
on eci.CUST_SEQ = esu.CUST_SEQ
<include refid="profileListCondition"></include>
</select>
@@ -24,8 +21,19 @@
resultType="kr.co.uplus.ez.api.sendNumMgt.dto.ProfileInfo">
/* sysMgt-mapper.xml(selectProfileList) */
SELECT
@ROWNUM := @ROWNUM + 1 AS NO,
A.*
@ROWNUM := @ROWNUM + 1 AS NO
, A.custNm
, bRegNo
, sendProfile
, sendProfileKey
, DORM_YN
, case when A.MSGHB_STTUS_CD = 'D' then '삭제'
when A.DORM_YN = 'Y' then '휴면'
when A.BLCK_YN = 'Y' then '미사용'
when A.MSGHB_STTUS_CD = 'A' then '사용'
else '미사용'
end as stat
, DATE_FORMAT(A.REG_DT, '%Y-%m-%d') AS regDt
FROM
(
select eci.CUST_NM as custNm
@@ -33,23 +41,18 @@
, ekc.CHNL_ID as sendProfile
, ekc.SNDRPROF_KEY as sendProfileKey
, ekc.DORM_YN
, case when ekc.DORM_YN = 'Y' then '휴면'
when ekc.MSGHB_STTUS_CD = 'A' then '사용'
when ekc.MSGHB_STTUS_CD = 'D' then '삭제'
else '미사용'
end as stat
, DATE_FORMAT(ekc.REG_DT, '%Y-%m-%d') AS regDt
from hubez_common.EZ_SVC_USER esu
inner join hubez_common.EZ_KKO_CHNL ekc
, ekc.MSGHB_STTUS_CD
, ekc.BLCK_YN
, ekc.REG_DT
from hubez_common.EZ_KKO_CHNL ekc
inner join hubez_common.EZ_SVC_USER esu
on esu.USER_SEQ = ekc.USER_SEQ
and ekc.MSGHB_STTUS_CD in ('A','D')
inner join hubez_common.EZ_CUST_INFO eci
on eci.CUST_SEQ = esu.CUST_SEQ
where esu.USER_TP_CD ='01'
<include refid="profileListCondition"></include>
ORDER BY ekc.REG_DT DESC
LIMIT #{page}, #{pagePerRows}) A,
( SELECT @ROWNUM := #{page} ) AS R
LIMIT #{page}, #{pagePerRows}
) A, ( SELECT @ROWNUM := #{page} ) AS R
</select>
<sql id="profileListCondition">
@@ -57,19 +60,21 @@
<if test="searchType1 != null and searchType1 != ''">
<choose>
<when test='searchType1 == "A"'> <!-- 상태 사용-->
AND MSGHB_STTUS_CD = 'A'
AND BLCK_YN = 'N'
AND DORM_YN = 'N'
AND ekc.MSGHB_STTUS_CD = 'A'
AND ekc.BLCK_YN = 'N'
AND ekc.DORM_YN = 'N'
</when>
<when test='searchType1 == "N"'> <!-- 상태 미사용-->
AND MSGHB_STTUS_CD = 'A'
AND (BLCK_YN = 'Y' OR DORM_YN = 'Y')
AND ekc.BLCK_YN = 'Y'
AND MSGHB_STTUS_CD != 'D'
AND ekc.DORM_YN != 'Y'
</when>
<when test='searchType1 == "D"'> <!-- 상태 삭제-->
AND MSGHB_STTUS_CD = 'D'
</when>
<when test='searchType1 == "H"'> <!-- 상태 휴면-->
AND DORM_YN = 'Y'
AND MSGHB_STTUS_CD != 'D'
</when>
</choose>
</if>
@@ -77,13 +82,13 @@
<if test='searchType2 != null and searchType2 != ""'>
<choose>
<when test='searchType2 == "custNm"'><!-- 검색조건 - 고객사명 -->
and UPPER(eci.CUST_NM) LIKE CONCAT('%' , UPPER(#{searchText1}), '%')
and eci.CUST_NM LIKE CONCAT('%' , #{searchText1}, '%')
</when>
<when test='searchType2 == "bregNo"'><!-- 검색조건 - 사업자번호 -->
and eci.BIZRNO = #{searchText1}
and eci.BIZRNO like CONCAT('%', #{searchText1}, '%')
</when>
<when test='searchType2 == "sendProfile"'><!-- 검색조건 - 발신프로필 -->
and ekc.CHNL_ID = #{searchText1}
and ekc.CHNL_ID like CONCAT('%', #{searchText1}, '%')
</when>
</choose>
</if>
@@ -91,19 +96,14 @@
</sql>
<select id="selectSendNumberTotalCnt" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberListReqDto" resultType="int">
/* sendNumMgt-mapper.xml(selectSendNumberTotalCnt) */
SELECT
COUNT(*)
FROM
hubez_common.EZ_CUST_INFO eci
INNER JOIN hubez_common.EZ_SVC_USER esu
ON
eci.CUST_SEQ = esu.CUST_SEQ
INNER JOIN hubez_common.EZ_SNDRNO_REG esr
ON
esr.USER_SEQ = esu.USER_SEQ
INNER JOIN hubez_common.EZ_SVC_SNDRNO ess
ON
esr.REG_REQ_NO = ess.REG_REQ_NO
SELECT count(*)
from hubez_common.EZ_SVC_SNDRNO ess
inner join hubez_common.EZ_SNDRNO_REG esr
on esr.REG_REQ_NO = ess.REG_REQ_NO
inner join hubez_common.EZ_SVC_USER esu
on esu.USER_SEQ = esr.USER_SEQ
inner join hubez_common.EZ_CUST_INFO eci
on eci.CUST_SEQ = esu.CUST_SEQ
WHERE 1=1
<include refid="numberListCondition"></include>
</select>
@@ -111,56 +111,43 @@
<select id="selectSendNumberList" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberListReqDto" resultType="kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberInfo">
/* sendNumMgt-mapper.xml(selectSendNumberList) */
SELECT
@ROWNUM := @ROWNUM + 1 AS NO,
A.*
@ROWNUM := @ROWNUM + 1 AS NO
, A.CUST_NM
, REG_REQ_NO
, A.USER_ID as ADMIN_ID
, A.RQTR_ID AS register
, A.BIZRNO AS bRegNo
, (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'NMINEE_DIV_CD' AND DTL_CD = A.NMINEE_DIV_CD) AS NMINEE_DIV_CD
, (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'INCH_DIV_CD' AND DTL_CD = A.INCH_DIV_CD) AS INCH_DIV_CD
, (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'SNDRNO_STTUS_CD' AND DTL_CD = A.STTUS_CD) AS sttusCd
, A.SNDRNO AS SNDRNO
, A.SEQ_NO
, DATE_FORMAT(A.REG_DT, '%Y-%m-%d') AS REG_DT
FROM
(
SELECT
eci.CUST_NM ,
esr.REG_REQ_NO,
(SELECT esu2.USER_ID FROM hubez_common.EZ_SVC_USER esu2 WHERE esu2.USER_SEQ = esu.PRNTS_USER_SEQ)AS ADMIN_ID,
esr.REG_ID AS register,
eci.BIZRNO AS bRegNo,
(SELECT
ecd.DTL_CD_NM
FROM
hubez_common.EZ_CD_DTL ecd
WHERE
ecd.GRP_CD = 'NMINEE_DIV_CD'
AND ecd.DTL_CD = ess.NMINEE_DIV_CD) AS NMINEE_DIV_CD,
(SELECT
ecd.DTL_CD_NM
FROM
hubez_common.EZ_CD_DTL ecd
WHERE
ecd.GRP_CD = 'INCH_DIV_CD'
AND ecd.DTL_CD = ess.INCH_DIV_CD) AS INCH_DIV_CD,
(SELECT
ecd.DTL_CD_NM
FROM
hubez_common.EZ_CD_DTL ecd
WHERE
ecd.GRP_CD = 'SNDRNO_STTUS_CD'
AND ecd.DTL_CD = ess.STTUS_CD) AS sttusCd,
ess.SNDRNO AS SNDRNO,
ess.SEQ_NO,
DATE_FORMAT(esr.REG_DT, '%Y-%m-%d') AS REG_DT
FROM
hubez_common.EZ_CUST_INFO eci
INNER JOIN hubez_common.EZ_SVC_USER esu
ON
eci.CUST_SEQ = esu.CUST_SEQ
INNER JOIN hubez_common.EZ_SNDRNO_REG esr
ON
esr.USER_SEQ = esu.USER_SEQ
INNER JOIN hubez_common.EZ_SVC_SNDRNO ess
ON
esr.REG_REQ_NO = ess.REG_REQ_NO
eci.CUST_NM
, esr.REG_REQ_NO
, esu.USER_ID
, esr.RQTR_ID
, eci.BIZRNO
, ess.NMINEE_DIV_CD
, ess.INCH_DIV_CD
, ess.STTUS_CD
, ess.SNDRNO
, ess.SEQ_NO
, esr.REG_DT
from hubez_common.EZ_SVC_SNDRNO ess
inner join hubez_common.EZ_SNDRNO_REG esr
on esr.REG_REQ_NO = ess.REG_REQ_NO
inner join hubez_common.EZ_SVC_USER esu
on esu.USER_SEQ = esr.USER_SEQ
inner join hubez_common.EZ_CUST_INFO eci
on eci.CUST_SEQ = esu.CUST_SEQ
WHERE 1=1
<include refid="numberListCondition"></include>
ORDER BY eci.BIZRNO
LIMIT #{page}, #{pagePerRows}) A,
( SELECT @ROWNUM := #{page} ) AS R
ORDER BY ess.REG_DT , ess.REG_REQ_NO DESC
LIMIT #{page}, #{pagePerRows}) A, ( SELECT @ROWNUM := #{page} ) AS R
</select>
<sql id="numberListCondition">
@@ -180,13 +167,13 @@
<if test='searchType4 != null and searchType4 != ""'>
<choose>
<when test='searchType4 == "bregNo"'><!-- 검색조건 - 사업자번호 -->
AND eci.BIZRNO = #{searchText1}
AND eci.BIZRNO like CONCAT('%', #{searchText1}, '%')
</when>
<when test='searchType4 == "regNo"'><!-- 검색조건 - 발신번호 -->
AND ess.SNDRNO = #{searchText1}
AND ess.SNDRNO like CONCAT('%', #{searchText1}, '%')
</when>
<when test='searchType4 == "custNm"'><!-- 검색조건 - 고객사명 -->
AND UPPER(eci.CUST_NM) LIKE CONCAT('%' , UPPER(#{searchText1}), '%')
AND eci.CUST_NM LIKE CONCAT('%' , #{searchText1}, '%')
</when>
</choose>
</if>
@@ -201,7 +188,8 @@
hubez_common.EZ_SVC_USER esu, hubez_common.EZ_CUST_INFO eci
WHERE
esu.CUST_SEQ = eci.CUST_SEQ
AND esu.USER_ID = #{searchText1}
AND esu.USER_TP_CD IN ('01', '03')
AND esu.USER_ID LIKE CONCAT('%' , #{searchText1}, '%')
</select>
<select id="selectAdminList" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.SendAdminListReqDto" resultType="kr.co.uplus.ez.api.sendNumMgt.dto.SendAdminInfo">
@@ -216,7 +204,8 @@
hubez_common.EZ_SVC_USER esu, hubez_common.EZ_CUST_INFO eci
WHERE
esu.CUST_SEQ = eci.CUST_SEQ
AND esu.USER_ID = #{searchText1}
AND esu.USER_TP_CD IN ('01', '03')
AND esu.USER_ID LIKE CONCAT('%' , #{searchText1}, '%')
</select>
<select id="selectUserSeqByAdminId" parameterType="String" resultType="String">

View File

@@ -68,10 +68,10 @@ SELECT
and UPPER(eci.CUST_NM) LIKE CONCAT('%' , UPPER(#{searchText1}) , '%')
</when>
<when test='searchType2 == "bizNo"'><!-- 검색조건 - 사업자번호 -->
and eci.BIZRNO = #{searchText1}
AND eci.BIZRNO like CONCAT('%', #{searchText1}, '%')
</when>
<when test='searchType2 == "authCd"'><!-- 검색조건 - 인증코드 -->
and esu.AUTHCD_080 = #{searchText1}
AND esu.AUTHCD_080 like CONCAT('%', #{searchText1}, '%')
</when>
</choose>
</if>

File diff suppressed because it is too large Load Diff

View File

@@ -323,6 +323,7 @@
<select id="selectAuthDetail"
parameterType="kr.co.uplus.ez.api.sysMgt.dto.AuthDetailReqDto"
resultType="kr.co.uplus.ez.api.sysMgt.dto.AuthDetail">
/* sysMgt-mapper.xml(selectAuthDetail) */
SELECT
AUT_CD AS authCd
,AUT_NM AS authNm
@@ -338,6 +339,7 @@
<select id="selectAuthMemuList"
parameterType="kr.co.uplus.ez.api.sysMgt.dto.AuthDetailReqDto"
resultType="kr.co.uplus.ez.api.sysMgt.dto.AuthMenu">
/* sysMgt-mapper.xml(selectAuthMemuList) */
SELECT
T2.MENU_NO AS menuNo
,T3.PRNTS_MENU_NO AS upperMenuNo
@@ -352,6 +354,23 @@
WHERE T2.AUT_CD = #{authCd}
</select>
<select id="checkAdmin" parameterType="hashMap" resultType="int">
/* sysMgt-mapper.xml(checkAdminId) */
SELECT
COUNT(*)
FROM
hubez_admin.EZ_ADM_USER eau
WHERE 1=1
<if test="searchType != null and searchType != ''">
<if test="searchType == '01' ">
AND OPRTR_ID = #{adminId}
</if>
<if test="searchType == '02' ">
AND AUT_CD = #{authCd}
</if>
</if>
</select>
</mapper>