mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-06 16:43:32 +09:00
Merge branch '20230314_cashcharge' into develop
This commit is contained in:
347
frontend/src/modules/custMgt/components/ChrgDetailPop.vue
Normal file
347
frontend/src/modules/custMgt/components/ChrgDetailPop.vue
Normal file
@@ -0,0 +1,347 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
<!-- s: 팝업 -->
|
||||
<div class="dimmed modal53"></div>
|
||||
<div class="popup-wrap modal53">
|
||||
|
||||
<!-- 발신번호 차단 수정 -->
|
||||
<div class="popup modal53 popup_form w700">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">충전금 상세</h3>
|
||||
</div>
|
||||
<form autocomplete="off">
|
||||
<table style="width: 100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>유저 ID</th>
|
||||
<td>
|
||||
<input type="text" placeholder="아이디 입력" v-model.trim="userId" disabled/>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>충전월</th>
|
||||
<td>
|
||||
<div class="input_box cal" style="width:60%">
|
||||
<div class="term">
|
||||
<span class="custom_input icon_date">
|
||||
<vuejs-datepicker
|
||||
:language="ko"
|
||||
:format="customFormatter"
|
||||
:disabled-dates="disabledSDate"
|
||||
:minimumView="sDateDiv"
|
||||
:maximumView="sDateDiv"
|
||||
v-model.trim="startDate"
|
||||
disabled
|
||||
@selected="selectedStartDate(0)"
|
||||
@closed="closeDate('start')"
|
||||
:picker-options="startDateOptions"
|
||||
></vuejs-datepicker>
|
||||
</span>
|
||||
~
|
||||
<span class="custom_input icon_date">
|
||||
<vuejs-datepicker
|
||||
:language="ko"
|
||||
:format="customFormatter"
|
||||
:disabled-dates="disabledEDate"
|
||||
:minimumView="sDateDiv"
|
||||
:maximumView="sDateDiv"
|
||||
v-model.trim="endDate"
|
||||
disabled
|
||||
@selected="selectedEndDate(0)"
|
||||
@closed="closeDate('end')"
|
||||
:picker-options="endDateOptions"
|
||||
></vuejs-datepicker>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-show="bizrAuthYn !== 'Y'">
|
||||
<th>충전금액</th>
|
||||
<td>
|
||||
<div class="input_add">
|
||||
<input
|
||||
type="radio"
|
||||
name="nmineeDivCd"
|
||||
value="E"
|
||||
id="popup_radio5"
|
||||
v-model="nmineeDivCd"
|
||||
@change="changeNmineDiv($event)"
|
||||
/>
|
||||
<label for="popup_radio5">소멸금액</label>
|
||||
<input
|
||||
type="number"
|
||||
placeholder="소멸 충전 금액 입력"
|
||||
disabled
|
||||
v-model.trim="chrgAmtE"
|
||||
/>
|
||||
<input
|
||||
type="radio"
|
||||
name="nmineeDivCd"
|
||||
value="C"
|
||||
id="popup_radio6"
|
||||
v-model="nmineeDivCd"
|
||||
@change="changeNmineDiv($event)"
|
||||
/>
|
||||
<label for="popup_radio6">이월금액</label>
|
||||
<input
|
||||
class="search-box"
|
||||
type="number"
|
||||
placeholder="이월 충전 금액 입력"
|
||||
disabled
|
||||
v-model.trim="chrgAmtC"
|
||||
/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<div class="popup-btn2 pop-btn3">
|
||||
<!-- <button class="btn-pcolor" @click="ChrgUpdate()">수정</button> -->
|
||||
|
||||
<button class="btn-p2color" @click="ChrgDelete()">삭제</button>
|
||||
<button class="btn-default" @click="ChrgDetailClose()">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
<validation-confirm-pop ref="ValidationConfirmPop"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import custMgtApi from '../service/custMgtApi';
|
||||
import moment from 'moment';
|
||||
import ValidationConfirmPop from './ValidationConfirmPop.vue';
|
||||
|
||||
export default {
|
||||
data(){
|
||||
return{
|
||||
ko: vdp_translation_ko.js,
|
||||
row: {},
|
||||
|
||||
periodDay: 7,
|
||||
sDateDiv: 'month',
|
||||
startDate: new Date(),
|
||||
endDate: new Date(),
|
||||
startDateOptions: {disabledDate: this.disabledStDate},
|
||||
endDateOptions: {disabledDate: this.disabledEdDate},
|
||||
startDt: '',
|
||||
endDt: '',
|
||||
startYear: '',
|
||||
startMonth: '',
|
||||
endYear: '',
|
||||
endMonth: '',
|
||||
|
||||
bizrAuthYn: '',
|
||||
nmineeDivCd: '',
|
||||
chrgAmtE: '',
|
||||
chrgAmtC: '',
|
||||
|
||||
userId: '',
|
||||
custNm: '',
|
||||
bRegNo: '',
|
||||
bizrAuthYn : '',
|
||||
custSeq : '',
|
||||
chrgSeq : '',
|
||||
useYn: '',
|
||||
chrgDiv:'',
|
||||
}
|
||||
},
|
||||
components: {
|
||||
vuejsDatepicker,
|
||||
ValidationConfirmPop,
|
||||
},
|
||||
created(){
|
||||
this.setPeriodDay(0);
|
||||
},
|
||||
methods :{
|
||||
// 모달 띄우기
|
||||
async ChrgDetailModalOpen(props){
|
||||
this.row.chrgSeq = props.chrgSeq;
|
||||
try {
|
||||
const response = await custMgtApi.chrgDetail(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.userId = result.data.userId;
|
||||
this.custNm = result.data.custNm;
|
||||
let sym =result.data.strtYm.slice(0,4)+"-"+result.data.strtYm.slice(4,6)
|
||||
this.startDate = sym;
|
||||
let eym =result.data.endYm.slice(0,4)+"-"+result.data.endYm.slice(4,6)
|
||||
this.endDate = eym;
|
||||
this.chrgSeq = result.data.chrgSeq;
|
||||
this.useYn = result.data.useYn;
|
||||
if (result.data.chrgDiv == 'E') {
|
||||
this.chrgAmtE = result.data.chrgAmt;
|
||||
this.nmineeDivCd= "E";
|
||||
this.chrgAmtC ='';
|
||||
}else {
|
||||
this.chrgAmtC = result.data.chrgAmt;
|
||||
this.nmineeDivCd= "C";
|
||||
this.chrgAmtE ='';
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
}
|
||||
var dimmed = document.getElementsByClassName('modal53');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
},
|
||||
|
||||
ChrgDetailClose(){
|
||||
var dimmed = document.getElementsByClassName('modal53');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
},
|
||||
//삭제버튼
|
||||
async ChrgDeleteModal(){
|
||||
|
||||
try {
|
||||
var parammap = {chrgSeq : this.chrgSeq}
|
||||
var list = [];
|
||||
list.push(parammap);
|
||||
var param = {list : list}
|
||||
// "list":[{"chrgSeq":"66"}]
|
||||
const response = await custMgtApi.deleteChrg(param);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.row.title = '충전금';
|
||||
this.row.msg1 = '삭제하였습니다.';
|
||||
this.$parent.alertInsert(this.row);
|
||||
this.toComplete();
|
||||
}
|
||||
} catch(err) {
|
||||
}
|
||||
},
|
||||
//수정버튼
|
||||
async ChrgUpdateModal(){
|
||||
try {
|
||||
const response = await custMgtApi.updateChrg(this.row);
|
||||
const result = response.data
|
||||
if (result != null && result.retCode == "0000"){
|
||||
this.row.title = '충전금';
|
||||
this.row.msg1 = '수정 하였습니다.';
|
||||
this.$parent.alertInsert(this.row);
|
||||
this.toComplete();
|
||||
}
|
||||
} catch(err) {
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
doValidate(){
|
||||
this.row.useYn=this.useYn
|
||||
this.row.userId =this.userId;
|
||||
this.row.custNm = this.custNm;
|
||||
this.row.strtYm = this.startDate;
|
||||
this.row.endYm = this.endDate;
|
||||
this.row.chrgSeq = this.chrgSeq;
|
||||
this.row.chrgAmt = this.chrgAmtE;
|
||||
|
||||
return true;
|
||||
},
|
||||
ChrgUpdate(){
|
||||
if (this.doValidate()) {
|
||||
this.$refs.ValidationConfirmPop.chrgconfirmUpdateOpen();
|
||||
}
|
||||
},
|
||||
ChrgDelete(){
|
||||
if(this.doValidate()){
|
||||
this.$refs.ValidationConfirmPop.chrgconfirmDeleteOpen();
|
||||
}
|
||||
},
|
||||
|
||||
toComplete(){
|
||||
this.$parent.$refs.table.reloadData();
|
||||
this.ChrgDetailClose();
|
||||
},
|
||||
|
||||
// 모달 끄기
|
||||
ModalClose(){
|
||||
var dimmed = document.getElementsByClassName('dimmed');
|
||||
dimmed[0].style.display = 'none';
|
||||
var wrap = document.getElementsByClassName('popup-wrap');
|
||||
wrap[0].style.display = 'none';
|
||||
var popup = document.getElementsByClassName('modal53');
|
||||
popup[0].style.display = 'none';
|
||||
},
|
||||
|
||||
//달력 셋팅
|
||||
setPeriodDay(day) {
|
||||
this.periodDay = day;
|
||||
this.endDate = new Date();
|
||||
this.initSetStartDate();
|
||||
this.initSetEndDate();
|
||||
this.closeDate('start');
|
||||
this.closeDate('end');
|
||||
},
|
||||
|
||||
selectedStartDate(day) {
|
||||
if (day != undefined && day != null) {
|
||||
this.periodDay = day;
|
||||
}
|
||||
if (this.startDate > this.endDate) {
|
||||
this.startDate = this.endDate;
|
||||
}
|
||||
},
|
||||
selectedEndDate(day) {
|
||||
if (day != undefined && day != null) {
|
||||
this.periodDay = day;
|
||||
}
|
||||
},
|
||||
closeDate(type) {
|
||||
if (type != undefined && type != null) {
|
||||
let initStartDate = new Date();
|
||||
let initEndDate = new Date();
|
||||
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) -1)
|
||||
initEndDate.setMonth(Number(moment(initEndDate).format('MM')) +100)
|
||||
|
||||
if (type == 'start') {
|
||||
this.disabledSDate = {to: initStartDate, from: new Date()};
|
||||
if (this.startDate !== initStartDate) {
|
||||
this.disabledEDate = {to: this.startDate, from: initEndDate};
|
||||
}
|
||||
} else if (type == 'end') {
|
||||
this.disabledEDate = {to: this.startDate, from: initEndDate};
|
||||
if (this.endDate !== initEndDate) {
|
||||
this.disabledSDate = {from: this.endDate};
|
||||
this.disabledSDate = {to: initStartDate, from: this.endDate};
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
customFormatter: function (date) {
|
||||
if (this.sDateDiv == 'month') {
|
||||
return moment(date).format('YYYY-MM');
|
||||
} else if (this.sDateDiv == 'year') {
|
||||
return moment(date).format('YYYY');
|
||||
} else {
|
||||
return moment(date).format('YYYY-MM-DD');
|
||||
}
|
||||
},
|
||||
gridParamSet() {
|
||||
this.grid.params = {
|
||||
startMonth: moment(this.startDate).format('YYYYMM'),
|
||||
endMonth: moment(this.endDate).format('YYYYMM'),
|
||||
}
|
||||
},
|
||||
initSetStartDate() {
|
||||
let initStartDate = new Date();
|
||||
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) -1);
|
||||
this.startDate = initStartDate;
|
||||
},
|
||||
initSetEndDate() {
|
||||
let initEndDate = new Date();
|
||||
initEndDate.setMonth(Number(moment(initEndDate).format('MM')) +1);
|
||||
this.endDate = initEndDate;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
320
frontend/src/modules/custMgt/components/InsertChrgModal.vue
Normal file
320
frontend/src/modules/custMgt/components/InsertChrgModal.vue
Normal file
@@ -0,0 +1,320 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="dimmed insertChrgModal" @click="insertChrgClose()"></div>
|
||||
<!-- 발신번호 등록 (타사업자)-->
|
||||
<div class="popup insertChrgModal popup_form register w700">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">충전금 등록</h3>
|
||||
</div>
|
||||
<table style="width: 100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>유저 ID</th>
|
||||
<td>
|
||||
<div class="input_search">
|
||||
<!-- <input class="search-box" type="text" placeholder="아이디 입력" v-model="userId" /> -->
|
||||
<input class="search-box" type="text" placeholder="아이디 입력" disabled v-model="userId" />
|
||||
<button type="button" class="button grey" @click="searchIdPop">조회</button>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>충전월</th>
|
||||
<td>
|
||||
<div class="input_box cal" style="width:60%">
|
||||
<div class="term">
|
||||
<span class="custom_input icon_date">
|
||||
<vuejs-datepicker
|
||||
:language="ko"
|
||||
:format="customFormatter"
|
||||
:disabled-dates="disabledSDate"
|
||||
:minimumView="sDateDiv"
|
||||
:maximumView="sDateDiv"
|
||||
v-model="startDate"
|
||||
@selected="selectedStartDate(0)"
|
||||
@closed="closeDate('start')"
|
||||
:picker-options="startDateOptions"
|
||||
></vuejs-datepicker>
|
||||
</span>
|
||||
~
|
||||
<span class="custom_input icon_date">
|
||||
<vuejs-datepicker
|
||||
:language="ko"
|
||||
:format="customFormatter"
|
||||
:disabled-dates="disabledEDate"
|
||||
:minimumView="sDateDiv"
|
||||
:maximumView="sDateDiv"
|
||||
v-model="endDate"
|
||||
@selected="selectedEndDate(0)"
|
||||
@closed="closeDate('end')"
|
||||
:picker-options="endDateOptions"
|
||||
></vuejs-datepicker>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr >
|
||||
<th>충전금액</th>
|
||||
<td>
|
||||
<div class="input_add">
|
||||
<input
|
||||
type="radio"
|
||||
name="nmineeDivCd"
|
||||
value="01"
|
||||
id="popup_radio5"
|
||||
v-model="nmineeDivCd"
|
||||
/>
|
||||
<label for="popup_radio5">소멸금액</label>
|
||||
<input
|
||||
type="number"
|
||||
placeholder="소멸 충전 금액 입력"
|
||||
v-model="chrgAmtE"
|
||||
v-bind:disabled ="nmineeDivCd=='02'"
|
||||
/>
|
||||
<input
|
||||
type="radio"
|
||||
name="nmineeDivCd"
|
||||
value="02"
|
||||
id="popup_radio6"
|
||||
v-model="nmineeDivCd"
|
||||
/>
|
||||
<label for="popup_radio6">이월금액</label>
|
||||
<input
|
||||
class="search-box"
|
||||
type="number"
|
||||
placeholder="이월 충전 금액 입력"
|
||||
v-model="chrgAmtC"
|
||||
v-bind:disabled ="nmineeDivCd=='01'"
|
||||
/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="saveChrg()">저장</button>
|
||||
<button class="btn-default" @click="insertChrgClose()">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
<user-list-pop ref="userListPop" :send-data="childData" @event-data="setChildData" />
|
||||
<common-modal ref="commonModal"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import UserListPop from './UserListPop.vue';
|
||||
import moment from 'moment';
|
||||
import custMgtApi from "../service/custMgtApi";
|
||||
import CommonModal from './commonModal.vue';
|
||||
|
||||
export default {
|
||||
name: 'insertChrgModal',
|
||||
|
||||
watch: {
|
||||
nmineeDivCd() {},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
childData: 20,
|
||||
ko: vdp_translation_ko.js,
|
||||
|
||||
// 달력 데이터
|
||||
periodDay: 7,
|
||||
sDateDiv: 'month',
|
||||
startDate: new Date(),
|
||||
endDate: new Date(),
|
||||
startDateOptions: {disabledDate: this.disabledStDate},
|
||||
endDateOptions: {disabledDate: this.disabledEdDate},
|
||||
startDt: '',
|
||||
endDt: '',
|
||||
startYear: '',
|
||||
startMonth: '',
|
||||
endYear: '',
|
||||
endMonth: '',
|
||||
|
||||
nmineeDivCd: '01',
|
||||
chrgAmtE: '0',
|
||||
chrgAmtC: '0',
|
||||
charDiv: '',
|
||||
userId: '',
|
||||
custNm: '',
|
||||
userSttusCd: '',
|
||||
custSeq : '',
|
||||
chrgSeq : '',
|
||||
userTpCd: '',
|
||||
userSeq: '',
|
||||
|
||||
row: {},
|
||||
|
||||
}
|
||||
},
|
||||
components: {
|
||||
vuejsDatepicker,
|
||||
UserListPop,
|
||||
CommonModal,
|
||||
},
|
||||
mounted(){
|
||||
// 달력 세팅
|
||||
let page = 1;
|
||||
},
|
||||
created() {
|
||||
this.setPeriodDay(0);
|
||||
},
|
||||
methods: {
|
||||
// 모달 띄우기
|
||||
insertChrgOpen() {
|
||||
var dimmed = document.getElementsByClassName('insertChrgModal');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
},
|
||||
// 모달 끄기
|
||||
insertChrgClose() {
|
||||
this.formReset();
|
||||
var dimmed = document.getElementsByClassName('insertChrgModal');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
},
|
||||
formReset() {
|
||||
Object.assign(this.$data, this.$options.data());
|
||||
},
|
||||
searchIdPop(){
|
||||
this.$refs.userListPop.UserListPopOpen();
|
||||
},
|
||||
setChildData(data) {
|
||||
this.userId = data.userId;
|
||||
this.custNm = data.custNm;;
|
||||
this.userSttusCd = data.userSttusCd;
|
||||
this.custSeq = data.custSeq;
|
||||
this.userTpCd = data.userTpCd;
|
||||
this.userSeq = data.userSeq;
|
||||
},
|
||||
|
||||
search: function (isKeep) {
|
||||
this.grid.params.startDt = moment(this.startDate).format('YYYYMM');
|
||||
this.grid.params.endDt = moment(this.endDate).format('YYYYMM');
|
||||
this.grid.params.searchType1 = this.searchType1;
|
||||
this.$refs.table.search(this.grid.params, isKeep);
|
||||
this.sendStoreData();
|
||||
},
|
||||
|
||||
//달력 셋팅
|
||||
setPeriodDay(day) {
|
||||
this.periodDay = day;
|
||||
this.endDate = new Date();
|
||||
this.initSetStartDate();
|
||||
this.initSetEndDate();
|
||||
this.closeDate('start');
|
||||
this.closeDate('end');
|
||||
},
|
||||
|
||||
selectedStartDate(day) {
|
||||
if (day != undefined && day != null) {
|
||||
this.periodDay = day;
|
||||
}
|
||||
if (this.startDate > this.endDate) {
|
||||
this.startDate = this.endDate;
|
||||
}
|
||||
},
|
||||
selectedEndDate(day) {
|
||||
if (day != undefined && day != null) {
|
||||
this.periodDay = day;
|
||||
}
|
||||
},
|
||||
closeDate(type) {
|
||||
if (type != undefined && type != null) {
|
||||
let initStartDate = new Date();
|
||||
let initEndDate = new Date();
|
||||
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) -1)
|
||||
initEndDate.setMonth(Number(moment(initEndDate).format('MM')) + 100)
|
||||
|
||||
|
||||
if (type == 'start') {
|
||||
this.disabledSDate = {to: initStartDate, from: new Date()};
|
||||
if (this.startDate !== initStartDate) {
|
||||
this.disabledEDate = {to: this.startDate, from: initEndDate};
|
||||
|
||||
}
|
||||
} else if (type == 'end') {
|
||||
this.disabledEDate = {to: this.startDate, from: initEndDate};
|
||||
if (this.endDate !== initEndDate) {
|
||||
this.disabledSDate = {from: this.endDate};
|
||||
this.disabledSDate = {to: initStartDate, from: this.endDate};
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
customFormatter: function (date) {
|
||||
if (this.sDateDiv == 'month') {
|
||||
return moment(date).format('YYYY-MM');
|
||||
} else if (this.sDateDiv == 'year') {
|
||||
return moment(date).format('YYYY');
|
||||
} else {
|
||||
return moment(date).format('YYYY-MM');
|
||||
}
|
||||
},
|
||||
gridParamSet() {
|
||||
this.grid.params = {
|
||||
startMonth: moment(this.startDate).format('YYYYMM'),
|
||||
endMonth: moment(this.endDate).format('YYYYMM'),
|
||||
}
|
||||
},
|
||||
initSetStartDate() {
|
||||
let initStartDate = new Date();
|
||||
initStartDate.setMonth(Number(moment(initStartDate).format('MM'))-1);
|
||||
this.startDate = initStartDate;
|
||||
},
|
||||
initSetEndDate() {
|
||||
let initEndDate = new Date();
|
||||
initEndDate.setMonth(Number(moment(initEndDate).format('MM')) +1);
|
||||
this.endDate = initEndDate;
|
||||
},
|
||||
saveChrg(){
|
||||
var chrgAmt =0;
|
||||
if (this.nmineeDivCd =='01') {
|
||||
this.chrgDiv = 'E';
|
||||
chrgAmt = this.chrgAmtE
|
||||
}else{
|
||||
this.chrgDiv='C';
|
||||
chrgAmt = this.chrgAmtC
|
||||
}
|
||||
|
||||
|
||||
if (chrgAmt<=0) {
|
||||
this.row.title = '경고';
|
||||
this.row.msg1 = '충전금을 입력해주세요.';
|
||||
this.$parent.alertInsert(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
let param = {
|
||||
userId : this.userId,
|
||||
strtYm : this.startDate,
|
||||
endYm : this.endDate,
|
||||
chrgDiv : this.chrgDiv,
|
||||
chrgAmt : chrgAmt,
|
||||
}
|
||||
|
||||
custMgtApi.insertChrg(param).then((respose)=> {
|
||||
var result = respose.data;
|
||||
if (result != null && result.retCode == "0000"){
|
||||
this.row.title = '충전금';
|
||||
this.row.msg1 = '등록 하였습니다.';
|
||||
this.$parent.alertInsert(this.row);
|
||||
this.toComplete();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toComplete(){
|
||||
this.$parent.$refs.table.reloadData();
|
||||
this.insertChrgClose();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
101
frontend/src/modules/custMgt/components/UserListPop.vue
Normal file
101
frontend/src/modules/custMgt/components/UserListPop.vue
Normal file
@@ -0,0 +1,101 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- 유저ID 조회 -->
|
||||
<div class="popup popup_form modal44 popup_inside">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">사용자ID 조회</h3>
|
||||
</div>
|
||||
<div class="pop-cont-detail input_box">
|
||||
<label>ID</label>
|
||||
<div class="input_search">
|
||||
<input class="search-box" type="text" value="" v-model="searchText1" maxlength="100">
|
||||
<button type="button" class="button btn-p2color" @click="memberDetail">조회</button>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table-c">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>고객사명</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, idx) in list">
|
||||
<td>{{ item.userId }}</td>
|
||||
<td><a href="javascript:void(0)" @click="setUserInfo(item)">{{ item.custNm }}</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-default" @click="UserListPopClose();">닫기</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import custMgtApi from '@/modules/custMgt/service/custMgtApi';
|
||||
export default {
|
||||
name: "userListPop",
|
||||
data(){
|
||||
return {
|
||||
row: {},
|
||||
searchText1: '',
|
||||
list:[],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
},
|
||||
props: ['sendData'],
|
||||
created(){
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods : {
|
||||
search: function(isKeep) {
|
||||
|
||||
|
||||
},
|
||||
|
||||
setUserInfo (props){
|
||||
this.$emit('event-data', props)
|
||||
this.UserListPopClose();
|
||||
},
|
||||
// 모달 띄우기
|
||||
UserListPopOpen(){
|
||||
this.formReset();
|
||||
var dimmed = document.getElementsByClassName('modal44');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
},
|
||||
// 모달 끄기
|
||||
UserListPopClose(){
|
||||
var dimmed = document.getElementsByClassName('modal44');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
},
|
||||
|
||||
async memberDetail(){
|
||||
try {
|
||||
this.row.searchText1 = this.searchText1
|
||||
if(this.row.searchText1 == ''){
|
||||
return false;
|
||||
}
|
||||
const response = await custMgtApi.userList(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.list = result.data.list
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
},
|
||||
formReset(){
|
||||
Object.assign(this.$data, this.$options.data());
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -161,6 +161,41 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 충전금 상세 - 수정 -->
|
||||
<div class="dimmed chrgconfirm-update" @click="chrgconfirmUpdateClose();"></div>
|
||||
<div class="popup-wrap chrgconfirm-update">
|
||||
<div class="popup chrgconfirm-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="chrgconfirmUpdate();">확인</button>
|
||||
<button class="btn-default" @click="chrgconfirmUpdateClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 충전금 상세 삭제-->
|
||||
<div class="dimmed chrgconfirm-delete" @click="chrgconfirmDeleteClose();"></div>
|
||||
<div class="popup-wrap chrgconfirm-delete">
|
||||
<div class="popup chrgconfirm-delete">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">충전금 상세</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>해당 충전금을 리스트에서</p>
|
||||
<p>삭제하시겠습니까?</p>
|
||||
</div>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="chrgconfirmDelete();">확인</button>
|
||||
<button class="btn-default" @click="chrgconfirmDeleteClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -407,6 +442,58 @@ export default {
|
||||
// 부모 함수 호출.
|
||||
this.$parent.confirmCalbackFnc(this.row);
|
||||
},
|
||||
|
||||
//충전금 수정 확인 Open
|
||||
chrgconfirmUpdateOpen() {
|
||||
var dimmed = document.getElementsByClassName('chrgconfirm-update');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
|
||||
},
|
||||
//충전금 수정 확인
|
||||
chrgconfirmUpdate() {
|
||||
var dimmed = document.getElementsByClassName('chrgconfirm-update');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
this.$parent.ChrgUpdateModal();
|
||||
|
||||
},
|
||||
// 충전금 수정 Close
|
||||
chrgconfirmUpdateClose() {
|
||||
var dimmed = document.getElementsByClassName('chrgconfirm-update');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
// 충전금 삭제 Open
|
||||
chrgconfirmDeleteOpen() {
|
||||
var dimmed = document.getElementsByClassName('chrgconfirm-delete');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
},
|
||||
//충전금 삭제
|
||||
chrgconfirmDelete() {
|
||||
var dimmed = document.getElementsByClassName('chrgconfirm-delete');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
this.$parent.ChrgDeleteModal();
|
||||
},
|
||||
//충전금 삭제 Close
|
||||
chrgconfirmDeleteClose() {
|
||||
var dimmed = document.getElementsByClassName('chrgconfirm-delete');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,5 +1,6 @@
|
||||
import SubsList from '../views/SubsList'
|
||||
import MemberList from '../views/MemberList'
|
||||
import ChrgList from '../views/ChrgList'
|
||||
import SubsDetail from '../views/SubsDetail'
|
||||
import MemberDetail from '../views/MemberDetail'
|
||||
import MemberAdminDetail from '../views/MemberAdminDetail'
|
||||
@@ -18,6 +19,12 @@ export default [
|
||||
name: 'memberList',
|
||||
meta: { public: false }
|
||||
},
|
||||
{
|
||||
path: '/custMgt/chrgList',
|
||||
component: ChrgList,
|
||||
name: 'chrgList',
|
||||
meta: { public: false }
|
||||
},
|
||||
{
|
||||
path: '/custMgt/subsDetail',
|
||||
component: SubsDetail,
|
||||
|
||||
@@ -83,6 +83,37 @@ const deleteMemo = (params) => {
|
||||
return httpClient.post('/api/v1/bo/custMgt/deleteMemo', params);
|
||||
}
|
||||
|
||||
// 충전금 조회
|
||||
const chrgList = (params) => {
|
||||
return httpClient.post('/api/v1/bo/custMgt/chrgList', params);
|
||||
}
|
||||
|
||||
// 충전금 생성
|
||||
const insertChrg = (params) => {
|
||||
return httpClient.post('/api/v1/bo/custMgt/insertChrg', params);
|
||||
}
|
||||
|
||||
// 충전금 생성
|
||||
const chrgDetail = (params) => {
|
||||
return httpClient.post('/api/v1/bo/custMgt/chrgDetail', params);
|
||||
}
|
||||
|
||||
// 충전금 수정
|
||||
const updateChrg = (params) => {
|
||||
return httpClient.post('/api/v1/bo/custMgt/updateChrg', params);
|
||||
}
|
||||
|
||||
// 충전금 삭제
|
||||
const deleteChrg = (params) => {
|
||||
return httpClient.post('/api/v1/bo/custMgt/deleteChrg', params);
|
||||
}
|
||||
|
||||
// 유저 ID 조회
|
||||
const userList = (params) => {
|
||||
return httpClient.post('/api/v1/bo/custMgt/userList', params);
|
||||
}
|
||||
|
||||
|
||||
const getExcelHeader = category => {
|
||||
// 엑셀에 출력할 Header 정보를 Mockup 데이터로 관리한다.
|
||||
return new Promise(function(resolve, reject) {
|
||||
@@ -123,4 +154,10 @@ export default {
|
||||
deleteMemo,
|
||||
insertTestId,
|
||||
duplicateCheckUserId,
|
||||
chrgList,
|
||||
insertChrg,
|
||||
updateChrg,
|
||||
chrgDetail,
|
||||
deleteChrg,
|
||||
userList,
|
||||
}
|
||||
|
||||
413
frontend/src/modules/custMgt/views/ChrgList.vue
Normal file
413
frontend/src/modules/custMgt/views/ChrgList.vue
Normal file
@@ -0,0 +1,413 @@
|
||||
<template>
|
||||
|
||||
<div class="contents">
|
||||
<div class="contents_wrap">
|
||||
<div class="top_wrap">
|
||||
<h3 class="title">충전관리</h3>
|
||||
<p class="breadcrumb">고객관리 > 청약고객관리 > 충전관리</p>
|
||||
</div>
|
||||
|
||||
<div class="top_tab">
|
||||
<a href="javascript:void(0);" @click="toMove('subsList')">청약고객관리</a>
|
||||
<a href="javascript:void(0);" @click="toMove('memberList')">회원관리</a>
|
||||
<a href="javascript:void(0);" class="on">충전관리</a>
|
||||
</div>
|
||||
<div class="search_wrap">
|
||||
<div class="group">
|
||||
<div class="input_box cal">
|
||||
<label for="right" class="label">조회기간</label>
|
||||
<div class="term">
|
||||
<span class="custom_input icon_date">
|
||||
<vuejs-datepicker
|
||||
:language="ko"
|
||||
:format="customFormatter"
|
||||
:disabled-dates="disabledSDate"
|
||||
:minimumView="sDateDiv"
|
||||
:maximumView="sDateDiv"
|
||||
v-model="startDate"
|
||||
@selected="selectedStartDate(0)"
|
||||
@closed="closeDate('start')"
|
||||
:picker-options="startDateOptions"
|
||||
></vuejs-datepicker>
|
||||
</span>
|
||||
~
|
||||
<span class="custom_input icon_date">
|
||||
<vuejs-datepicker
|
||||
:language="ko"
|
||||
:format="customFormatter"
|
||||
:disabled-dates="disabledEDate"
|
||||
:minimumView="sDateDiv"
|
||||
:maximumView="sDateDiv"
|
||||
v-model="endDate"
|
||||
@selected="selectedEndDate(0)"
|
||||
@closed="closeDate('end')"
|
||||
:picker-options="endDateOptions"
|
||||
></vuejs-datepicker>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<div class="select_box">
|
||||
<label for="right" class="label">상세검색</label>
|
||||
<select name="" id="" v-model="searchType1" @keyup.enter="search">
|
||||
<option value="01" selected>고객사명</option>
|
||||
<option value="02">사업자번호</option>
|
||||
<option value="03">ID</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input_box">
|
||||
<input class="search-box" type="text" id="search" placeholder="검색어 입력" maxlength="100"
|
||||
v-model.trim="grid.params.searchText1" @keyup.enter="search"/>
|
||||
</div>
|
||||
<button type="button" class="button grey" @click="search">조회</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="count">총 <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span>건
|
||||
<div class="select_box NumberSe">
|
||||
<select name="" id="" v-model="perPageCnt" @change="changePerPage()">
|
||||
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">
|
||||
{{ option.text }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue add" @click="insertChrg()">등록</button>
|
||||
<button type="button" class="button white del" @click="deleteChrg()">삭제</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="table">
|
||||
<custom-grid
|
||||
ref="table"
|
||||
:totalItems="'totalItems'"
|
||||
:url="grid.url"
|
||||
:pagePerRows="grid.pagePerRows"
|
||||
:initialRequest="grid.initialRequest"
|
||||
:pagination="grid.pagination"
|
||||
:isCheckbox="grid.isCheckbox"
|
||||
:columns="grid.columns"
|
||||
:noDataStr="grid.noDataStr"
|
||||
:addCls="grid.addCls"
|
||||
:header="grid.headder"
|
||||
></custom-grid>
|
||||
</div>
|
||||
<insert-chrg-modal ref="insertChrgModal"></insert-chrg-modal>
|
||||
<chrg-detail-pop ref="chrgDetailPop" />
|
||||
<common-modal ref="commonModal" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import customGrid from '@/components/CustomGrid';
|
||||
import moment from 'moment';
|
||||
import InsertChrgModal from '../components/InsertChrgModal';
|
||||
import chrgDetailPop from '../components/ChrgDetailPop.vue';
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
import custMgtApi from '../service/custMgtApi';
|
||||
|
||||
class CustomATagRenderer {
|
||||
constructor(props) {
|
||||
this.props = props;
|
||||
const el = document.createElement('a');
|
||||
el.href = 'javascript:void(0);';
|
||||
el.className = 'btn_text';
|
||||
el.innerText = String(props.colValue);
|
||||
this.el = el;
|
||||
}
|
||||
|
||||
getElement() {
|
||||
return this.el;
|
||||
}
|
||||
|
||||
addEvent(selEl) {
|
||||
selEl.addEventListener('click', () => {
|
||||
const { callback } = this.props['cgrido' + this.props.colName].options;
|
||||
callback(this.props);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'chrgList',
|
||||
data() {
|
||||
return {
|
||||
// 달력 데이터
|
||||
ko: vdp_translation_ko.js,
|
||||
periodDay: 7,
|
||||
sDateDiv: 'month',
|
||||
startDate: new Date(),
|
||||
endDate: new Date(),
|
||||
startDateOptions: {disabledDate: this.disabledStDate},
|
||||
endDateOptions: {disabledDate: this.disabledEdDate},
|
||||
startDt: '',
|
||||
endDt: '',
|
||||
startYear: '',
|
||||
startMonth: '',
|
||||
endYear: '',
|
||||
endMonth: '',
|
||||
|
||||
row: {},
|
||||
searchType1: '01',
|
||||
chrgSeq : '',
|
||||
useYn: '',
|
||||
|
||||
// 테이블 리스트 데이터
|
||||
perPageCnt: 50,
|
||||
options: [
|
||||
{text: '20', value: 20},
|
||||
{text: '50', value: 50},
|
||||
{text: '100', value: 100}
|
||||
],
|
||||
totalItems: 0,
|
||||
grid:{
|
||||
url: '/api/v1/bo/custMgt/chrgList',
|
||||
pagePerRows: 50,
|
||||
pagination: true,
|
||||
isCheckbox: true, // true:첫번째 컬럼 앞에 체크박스 생성 / false:체크박스 제거
|
||||
initialRequest: false,
|
||||
addCls: 'box_OFvis',
|
||||
|
||||
columns:[
|
||||
{name: 'no', header: 'No', align: 'center', width: 60},
|
||||
{
|
||||
name: 'custNm', header: '고객사명', align: 'center', width: 130,
|
||||
renderer: {type: CustomATagRenderer, options: {callback: this.inDetailPop}}
|
||||
},
|
||||
{name: 'userId', header: '고객명', align: 'center', width: 130},
|
||||
{name: 'chrgDiv', header: '충전구분', align: 'center', width: 130},
|
||||
{name: 'chrgDate', header: '기간', align: 'center', width: 130},
|
||||
{name: 'chrgAmt', header: '충전금액', align: 'center', width: 130},
|
||||
],
|
||||
noDataStr: '검색 결과가 없습니다.',
|
||||
params: {
|
||||
searchType1: '',
|
||||
searchText1: '',
|
||||
startMonth: '',
|
||||
endMonth: '',
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
components: {
|
||||
customGrid: customGrid,
|
||||
vuejsDatepicker,
|
||||
InsertChrgModal,
|
||||
chrgDetailPop,
|
||||
commonModal,
|
||||
},
|
||||
created() {
|
||||
this.setPeriodDay(0);
|
||||
},
|
||||
destroyed() {
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: 1,
|
||||
perPage: 50,
|
||||
params: {
|
||||
searchType1: '',
|
||||
searchText1: '',
|
||||
startMonth: '',
|
||||
endMonth: '',
|
||||
},
|
||||
});
|
||||
},
|
||||
mounted() {
|
||||
|
||||
// 달력 세팅
|
||||
let page = 1;
|
||||
|
||||
// 페이지 정보 및 검색 조건
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
|
||||
// store에 저장된 페이지 정보 및 검색 조건을 불러오기
|
||||
let isKeep = false;
|
||||
this.grid.pagePerRows = 50;
|
||||
page = 1;
|
||||
this.search(isKeep);
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
const getP = this.$refs.table.getPagination();
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
params: this.grid.params,
|
||||
});
|
||||
// 라우트 하기전 실행
|
||||
next();
|
||||
},
|
||||
|
||||
methods: {
|
||||
toMove(routeName) {
|
||||
this.$router.push({name: routeName, params: {page: 1, searchText: ''}});
|
||||
},
|
||||
|
||||
search: function (isKeep) {
|
||||
this.grid.params.startDt = moment(this.startDate).format('YYYYMM');
|
||||
this.grid.params.endDt = moment(this.endDate).format('YYYYMM');
|
||||
this.grid.params.searchType1 = this.searchType1;
|
||||
this.$refs.table.search(this.grid.params, isKeep);
|
||||
this.sendStoreData();
|
||||
|
||||
},
|
||||
|
||||
changePerPage: function () {
|
||||
// 페이지당 조회할 개수
|
||||
this.grid.pagePerRows = this.perPageCnt;
|
||||
this.search(true);
|
||||
},
|
||||
|
||||
sendStoreData: function () {
|
||||
const getP = this.$refs.table.getPagination();
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
params: this.grid.params
|
||||
});
|
||||
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
},
|
||||
|
||||
inDetailPop(props){
|
||||
this.$refs.chrgDetailPop.ChrgDetailModalOpen(props);
|
||||
},
|
||||
|
||||
//달력 셋팅
|
||||
setPeriodDay(day) {
|
||||
this.periodDay = day;
|
||||
this.endDate = new Date();
|
||||
this.initSetStartDate();
|
||||
this.initSetEndDate();
|
||||
this.closeDate('start');
|
||||
this.closeDate('end');
|
||||
},
|
||||
|
||||
selectedStartDate(day) {
|
||||
if (day != undefined && day != null) {
|
||||
this.periodDay = day;
|
||||
}
|
||||
if (this.startDate > this.endDate) {
|
||||
this.startDate = this.endDate;
|
||||
}
|
||||
},
|
||||
selectedEndDate(day) {
|
||||
if (day != undefined && day != null) {
|
||||
this.periodDay = day;
|
||||
}
|
||||
},
|
||||
closeDate(type) {
|
||||
if (type != undefined && type != null) {
|
||||
let initStartDate = new Date();
|
||||
let initEndDate = new Date();
|
||||
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) -100)
|
||||
initEndDate.setMonth(Number(moment(initEndDate).format('MM')) + 100)
|
||||
|
||||
|
||||
if (type == 'start') {
|
||||
this.disabledSDate = {to: initStartDate, from: new Date()};
|
||||
if (this.startDate !== initStartDate) {
|
||||
this.disabledEDate = {to: this.startDate, from: initEndDate};
|
||||
|
||||
}
|
||||
} else if (type == 'end') {
|
||||
this.disabledEDate = {to: this.startDate, from: initEndDate};
|
||||
if (this.endDate !== initEndDate) {
|
||||
this.disabledSDate = {from: this.endDate};
|
||||
this.disabledSDate = {to: initStartDate, from: this.endDate};
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
customFormatter: function (date) {
|
||||
if (this.sDateDiv == 'month') {
|
||||
return moment(date).format('YYYY-MM');
|
||||
} else if (this.sDateDiv == 'year') {
|
||||
return moment(date).format('YYYY');
|
||||
} else {
|
||||
return moment(date).format('YYYY-MM');
|
||||
}
|
||||
},
|
||||
gridParamSet() {
|
||||
this.grid.params = {
|
||||
startMonth: moment(this.startDate).format('YYYYMM'),
|
||||
endMonth: moment(this.endDate).format('YYYYMM'),
|
||||
}
|
||||
},
|
||||
initSetStartDate() {
|
||||
let initStartDate = new Date();
|
||||
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) -1);
|
||||
this.startDate = initStartDate;
|
||||
},
|
||||
initSetEndDate() {
|
||||
let initEndDate = new Date();
|
||||
initEndDate.setMonth(Number(moment(initEndDate).format('MM')) );
|
||||
this.endDate = initEndDate;
|
||||
},
|
||||
|
||||
insertChrg () {
|
||||
this.$refs.insertChrgModal.insertChrgOpen();
|
||||
},
|
||||
deleteChrg(){
|
||||
if (this.doValidate()) {
|
||||
this.row.title = '충전금 관리';
|
||||
this.row.msg1 = '삭제 하시겠습니까?';
|
||||
this.$refs.commonModal.confirmModalOpen2(this.row);
|
||||
}
|
||||
},
|
||||
|
||||
async chrgdelete() {
|
||||
try {
|
||||
let respose = await custMgtApi.deleteChrg(this.row);
|
||||
|
||||
const result = respose.data;
|
||||
if (result != null && result.retCode == '0000') {
|
||||
this.$refs.table.reloadData();
|
||||
return;
|
||||
} else {
|
||||
this.row.title = '충전금 관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
}
|
||||
} catch (error) {
|
||||
this.row.title = '충전금 관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
},
|
||||
|
||||
alertInsert(props) {
|
||||
this.$refs.commonModal.alertModalOpen(props);
|
||||
},
|
||||
|
||||
doValidate() {
|
||||
//로우데이터 삭제하도록 수정
|
||||
// this.totalItems==1
|
||||
// if (this.totalItems == 0) {
|
||||
// this.row.title = '충전금 관리';
|
||||
// this.row.msg1 = '검색 결과가 없습니다.';
|
||||
// this.$refs.commonModal.alertModalOpen(this.row);
|
||||
// return false;
|
||||
// }
|
||||
var chkList = this.$refs.table.checkedElementDatas();
|
||||
if (chkList.length == 0) {
|
||||
this.row.title = '충전금 관리';
|
||||
this.row.msg1 = '삭제대상을 체크를 해주세요.';
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
const param = chkList.map((row) => ({ chrgSeq: row.chrgSeq }));
|
||||
this.row.list = param;
|
||||
return true;
|
||||
},
|
||||
confirmCalbackFnc(props) {
|
||||
if (props.result) {
|
||||
this.chrgdelete();
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -10,6 +10,7 @@
|
||||
<div class="top_tab">
|
||||
<a href="javascript:void(0);" @click="toMove('subsList')">청약고객관리</a>
|
||||
<a href="javascript:void(0);" class="on">회원관리</a>
|
||||
<a href="javascript:void(0);" @click="toMove('chrgList')">충전관리</a>
|
||||
</div>
|
||||
|
||||
<!-- <div class="search_form">-->
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<div class="top_tab">
|
||||
<a href="javascript:void(0);" class="on">청약고객관리</a>
|
||||
<a href="javascript:void(0);" @click="toMove('memberList')">회원관리</a>
|
||||
<a href="javascript:void(0);" @click="toMove('chrgList')">충전관리</a>
|
||||
</div>
|
||||
|
||||
<!-- <div class="search_form">-->
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<th style="width: 10%">긴급여부</th>
|
||||
<td>
|
||||
<div class="select_box">
|
||||
<select name="" id="right" v-model="emgYn" style="min-width: 150px">
|
||||
<select name="" id="right" v-model="emgYn" style="min-width: 150px" v-bind:disabled="ctgCd=='06'">
|
||||
<option value="Y">긴급</option>
|
||||
<option value="N">일반</option>
|
||||
</select>
|
||||
@@ -49,6 +49,35 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-show="ctgCd=='06'">
|
||||
<th style="width: 10%">노출기간</th>
|
||||
<td colspan="5">
|
||||
<div class="input_box cal">
|
||||
<div class="term">
|
||||
<span class="custom_input icon_date">
|
||||
<vuejs-datepicker
|
||||
:language="ko"
|
||||
:format="customFormatter"
|
||||
:disabled-dates="disabledSDate"
|
||||
v-model="startDate"
|
||||
@selected="selectedStartDate(0)"
|
||||
@closed="closeDate('start')"
|
||||
></vuejs-datepicker> </span
|
||||
>~
|
||||
<span class="custom_input icon_date">
|
||||
<vuejs-datepicker
|
||||
:language="ko"
|
||||
:format="customFormatter"
|
||||
:disabled-dates="disabledEDate"
|
||||
v-model="endDate"
|
||||
@selected="selectedEndDate(0)"
|
||||
@closed="closeDate('end')"
|
||||
></vuejs-datepicker>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 10%">제목</th>
|
||||
<td colspan="5">
|
||||
@@ -113,25 +142,34 @@
|
||||
</template>
|
||||
<script>
|
||||
import { VueEditor } from 'vue2-editor';
|
||||
import api from '@/service/api';
|
||||
import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
import moment from 'moment';
|
||||
import homeMgtApi from '../service/homeMgtApi';
|
||||
import ValidationConfirmPopup from './ValidationConfirmPopup.vue';
|
||||
import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
|
||||
|
||||
export default {
|
||||
name: 'NoticePop',
|
||||
mixins: [utils_mixin, chkPattern2],
|
||||
components: {
|
||||
VueEditor,
|
||||
ValidationConfirmPopup,
|
||||
vuejsDatepicker
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
props: {},
|
||||
row: {},
|
||||
rsnType: [],
|
||||
tpType: [],
|
||||
// 공지사항
|
||||
title: '',
|
||||
ntSbst: '', //
|
||||
emgYn: 'N',
|
||||
useYn: 'Y',
|
||||
ko: vdp_translation_ko.js,
|
||||
startDate: new Date(),
|
||||
endDate: new Date(),
|
||||
disabledSDate : {},
|
||||
disabledEDate : {},
|
||||
ctgCd: 'null',
|
||||
updateFileList: [], // 업로드한 이미지 파일
|
||||
ctgCdOption: [
|
||||
@@ -141,29 +179,16 @@ export default {
|
||||
{ code: '03', codeNm: '정책/약관' },
|
||||
{ code: '04', codeNm: '오류/장애' },
|
||||
{ code: '05', codeNm: '이벤트' },
|
||||
{ code: '06', codeNm: '팝업공지' },
|
||||
],
|
||||
// 공지사항
|
||||
LINE_FEED: 10, // '\n',
|
||||
maxByte: 2000,
|
||||
|
||||
// params: {
|
||||
// 'blckSndrno' : ''
|
||||
// ,'ctgCd' : '01'
|
||||
// ,'blckRsnCd' : '02'
|
||||
// ,'meno' : ''
|
||||
// }
|
||||
};
|
||||
},
|
||||
create() {
|
||||
//this.setCodeDate();
|
||||
this.formReset();
|
||||
},
|
||||
mounted() {
|
||||
//this.ctgCd = '01'
|
||||
},
|
||||
components: {
|
||||
VueEditor,
|
||||
ValidationConfirmPopup,
|
||||
},
|
||||
methods: {
|
||||
handleImageAdded(file, Editor, cursorLocation, resetUploader) {
|
||||
@@ -189,7 +214,8 @@ export default {
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
this.setCodeDate();
|
||||
this.formReset();
|
||||
this.setPeriodDay(0);
|
||||
},
|
||||
// 모달 끄기
|
||||
ModalClose() {
|
||||
@@ -205,17 +231,6 @@ export default {
|
||||
this.$parent.$refs.table.reloadData();
|
||||
this.ModalClose();
|
||||
},
|
||||
|
||||
setCodeDate() {
|
||||
// 발송타입
|
||||
api.commCode({ grpCd: 'SNDBLCK_TP_CD' }).then((response) => {
|
||||
this.tpType = response.data.data.list;
|
||||
});
|
||||
api.commCode({ grpCd: 'SNDBLCK_RSN_CD' }).then((response) => {
|
||||
this.rsnType = response.data.data.list;
|
||||
});
|
||||
},
|
||||
|
||||
doValidate() {
|
||||
if (this.isNull(this.ctgCd) || this.ctgCd === 'null') {
|
||||
this.row.title = '공지사항 등록';
|
||||
@@ -239,14 +254,7 @@ export default {
|
||||
this.$refs.ValidationConfirmPopup.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
/* const hp = this.blckSndrno;
|
||||
if (!this.isNull(hp) && !this.isSendnum(hp)) {
|
||||
this.row.title = '공지사항';
|
||||
this.row.msg1 = '발신번호 형식이 잘못되었습니다. 확인 해주세요.';
|
||||
this.$parent.alertInsert(this.row);
|
||||
this.$refs._blckSndrno.focus();
|
||||
return false;
|
||||
} */
|
||||
|
||||
this.row.ctgCd = this.ctgCd;
|
||||
return true;
|
||||
},
|
||||
@@ -306,6 +314,8 @@ export default {
|
||||
emgYn: this.emgYn,
|
||||
useYn: this.useYn,
|
||||
ctgCd: this.ctgCd,
|
||||
ntStrtDt: moment(this.startDate).format('YYYYMMDD'),
|
||||
ntEndDt: moment(this.endDate).format('YYYYMMDD'),
|
||||
regr: this.$store.getters['login/userNm'],
|
||||
regId: this.$store.getters['login/userId'],
|
||||
chgId: this.$store.getters['login/userId'],
|
||||
@@ -313,16 +323,11 @@ export default {
|
||||
|
||||
fd.append('key', new Blob([JSON.stringify(params)], { type: 'application/json' }));
|
||||
|
||||
/* for (var pair of fd.entries()) {
|
||||
console.log(pair[0] + ' : ' + pair[1]);
|
||||
} */
|
||||
|
||||
homeMgtApi.insertNotice(fd).then((response) => {
|
||||
if (response.data.retCode == '0000') {
|
||||
this.row.title = '공지사항 등록';
|
||||
this.row.msg1 = '등록이 완료되었습니다.';
|
||||
this.row.type = 'complete';
|
||||
//this.$refs.ValidationConfirmPopup.alertModalOpen(this.row);
|
||||
this.toComplete();
|
||||
} else {
|
||||
this.row.title = '공지사항 등록 실패';
|
||||
@@ -347,27 +352,6 @@ export default {
|
||||
onFileChange(event) {
|
||||
const files = event.target.files || event.dataTransfer.files;
|
||||
if (!files.length) return;
|
||||
/* if (files.length > 3) {
|
||||
confirm.fnAlert(
|
||||
// "이미지 첨부 기준 안내",
|
||||
'',
|
||||
'<li>최대 3장 첨부할 수 있습니다.</li>',
|
||||
'info'
|
||||
);
|
||||
this.imageAddTitle = '이미지는 최대 3장까지 첨부할 수 있습니다.';
|
||||
//confirm.fnAlert("알림", "첨부파일은 최대 3개까지 가능합니다.", "alert");
|
||||
return;
|
||||
} else if (this.updateFileList.length + files.length > 3) {
|
||||
confirm.fnAlert(
|
||||
// "이미지 첨부 기준 안내",
|
||||
'',
|
||||
'<li>최대 3장 첨부할 수 있습니다.</li>',
|
||||
'info'
|
||||
);
|
||||
this.imageAddTitle = '이미지는 최대 3장까지 첨부할 수 있습니다.';
|
||||
// confirm.fnAlert("알림", "첨부파일은 최대 3개까지 가능합니다.", "alert");
|
||||
return;
|
||||
} */
|
||||
this.addFiles(files);
|
||||
},
|
||||
async addFiles(files) {
|
||||
@@ -377,48 +361,6 @@ export default {
|
||||
files[i].status = 'update';
|
||||
files[i].index = this.updateFileList.length;
|
||||
this.updateFileList.push(files[i]);
|
||||
|
||||
/* if (!(files[i].name.indexOf('jpg') > -1 || files[i].name.indexOf('jpeg') > -1)) {
|
||||
confirm.fnAlert('', '<li>jpg파일 형식만 첨부할 수 있습니다.</li>', 'info');
|
||||
this.imageAddTitle = 'jpg파일 형식만 첨부할 수 있습니다.';
|
||||
continue;
|
||||
} else if (files[i].size > 300000) {
|
||||
confirm.fnAlert(
|
||||
// "이미지 첨부 기준 안내",
|
||||
'',
|
||||
'<li>전체 크기 합계가 300KB 이하여야 합니다.</li>',
|
||||
'info'
|
||||
);
|
||||
this.imageAddTitle = '전체 크기 합계가 300KB 이하여야 합니다.';
|
||||
//confirm.fnAlert("이미지 사이즈 초과", "300KB이하 이미지만 등록 가능합니다.", "alert");
|
||||
continue;
|
||||
} else if (files[i].size + this.totalFileSize > 300000) {
|
||||
confirm.fnAlert(
|
||||
// "이미지 첨부 기준 안내",
|
||||
'',
|
||||
'<li>전체 크기 합계가 300KB 이하여야 합니다.</li>',
|
||||
'info'
|
||||
);
|
||||
this.imageAddTitle = '전체 크기 합계가 300KB 이하여야 합니다.';
|
||||
//confirm.fnAlert("이미지 사이즈 초과", "전체 합계 300KB이하 이미지만 등록 가능합니다.", "alert");
|
||||
continue;
|
||||
} else if (this.getImageSize(src) === false) {
|
||||
confirm.fnAlert(
|
||||
// "이미지 첨부 기준 안내",
|
||||
'',
|
||||
'<li>1,500(가로)x1,440(세로)px 이하 크기만 첨부할 수 있습니다.</li>',
|
||||
'info'
|
||||
);
|
||||
this.imageAddTitle = '1,500(가로)x1,440(세로)px 이하 크기만 첨부할 수 있습니다.';
|
||||
//confirm.fnAlert("이미지 크기 초과", "1500 * 1440 이하 이미지만 등록 가능합니다.", "alert");
|
||||
continue;
|
||||
} else {
|
||||
files[i].status = 'update';
|
||||
files[i].index = this.updateFileList.length;
|
||||
this.updateFileList.push(files[i]);
|
||||
confirm.fnAlert('', '이미지가 정상적으로 추가 되었습니다.', 'alert');
|
||||
this.imageAddTitle = '';
|
||||
} */
|
||||
}
|
||||
this.$refs.imageUploader.value = ''; // 이미지 중복 가능하도록 input 초기화
|
||||
},
|
||||
@@ -451,6 +393,40 @@ export default {
|
||||
popupHandleRemove(index) {
|
||||
this.updateFileList.splice(index, 1);
|
||||
},
|
||||
setPeriodDay(day) {
|
||||
this.periodDay = day;
|
||||
this.startDate = new Date();
|
||||
this.endDate = moment(new Date()).add(7, 'days').toDate();
|
||||
this.closeDate('start');
|
||||
this.closeDate('end');
|
||||
},
|
||||
selectedStartDate(day) {
|
||||
if (day != undefined && day != null) {
|
||||
this.periodDay = day;
|
||||
}
|
||||
if (this.startDate > this.endDate) {
|
||||
this.startDate = this.endDate;
|
||||
}
|
||||
},
|
||||
selectedEndDate(day) {
|
||||
if (day != undefined && day != null) {
|
||||
this.periodDay = day;
|
||||
}
|
||||
},
|
||||
closeDate(type) {
|
||||
if (type != undefined && type != null) {
|
||||
if (type == 'start') {
|
||||
this.disabledSDate = { to: new Date(), from: this.endDate };
|
||||
this.disabledEDate = { to: this.startDate};
|
||||
} else if (type == 'end') {
|
||||
this.disabledSDate = { to: new Date(), from: this.endDate };
|
||||
this.disabledEDate = { to: this.startDate };
|
||||
}
|
||||
}
|
||||
},
|
||||
customFormatter: function (date) {
|
||||
return moment(date).format('YYYY-MM-DD');
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<th style="width: 10%">긴급여부</th>
|
||||
<td>
|
||||
<div class="select_box">
|
||||
<select name="" id="right" v-model="emgYn" style="min-width: 150px">
|
||||
<select name="" id="right" v-model="emgYn" style="min-width: 150px" v-bind:disabled="ctgCd=='06'">
|
||||
<option value="Y">긴급</option>
|
||||
<option value="N">일반</option>
|
||||
</select>
|
||||
@@ -49,6 +49,35 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-show="ctgCd=='06'">
|
||||
<th style="width: 10%">노출기간</th>
|
||||
<td colspan="5">
|
||||
<div class="input_box cal">
|
||||
<div class="term">
|
||||
<span class="custom_input icon_date">
|
||||
<vuejs-datepicker
|
||||
:language="ko"
|
||||
:format="customFormatter"
|
||||
:disabled-dates="disabledSDate"
|
||||
v-model="startDate"
|
||||
@selected="selectedStartDate(0)"
|
||||
@closed="closeDate('start')"
|
||||
></vuejs-datepicker> </span
|
||||
>~
|
||||
<span class="custom_input icon_date">
|
||||
<vuejs-datepicker
|
||||
:language="ko"
|
||||
:format="customFormatter"
|
||||
:disabled-dates="disabledEDate"
|
||||
v-model="endDate"
|
||||
@selected="selectedEndDate(0)"
|
||||
@closed="closeDate('end')"
|
||||
></vuejs-datepicker>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 10%">제목</th>
|
||||
<td colspan="5">
|
||||
@@ -118,22 +147,31 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import api from '@/service/api';
|
||||
import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
import homeMgtApi from '../service/homeMgtApi';
|
||||
import ValidationConfirmPopup from './ValidationConfirmPopup.vue';
|
||||
import { VueEditor } from 'vue2-editor';
|
||||
import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
import moment from 'moment';
|
||||
|
||||
export default {
|
||||
name: 'NoticeUpdatePop',
|
||||
mixins: [utils_mixin, chkPattern2],
|
||||
components: {
|
||||
VueEditor,
|
||||
ValidationConfirmPopup,
|
||||
vuejsDatepicker
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
props: {},
|
||||
row: {},
|
||||
rsnType: [],
|
||||
tpType: [],
|
||||
|
||||
ko: vdp_translation_ko.js,
|
||||
startDate: '',
|
||||
endDate: '',
|
||||
disabledSDate : {},
|
||||
disabledEDate : {},
|
||||
// 공지사항
|
||||
ntNo: '',
|
||||
title: '',
|
||||
@@ -154,29 +192,16 @@ export default {
|
||||
{ code: '03', codeNm: '정책/약관' },
|
||||
{ code: '04', codeNm: '오류/장애' },
|
||||
{ code: '05', codeNm: '이벤트' },
|
||||
{ code: '06', codeNm: '팝업공지' }
|
||||
],
|
||||
// 공지사항
|
||||
LINE_FEED: 10, // '\n',
|
||||
maxByte: 2000,
|
||||
|
||||
// params: {
|
||||
// 'blckSndrno' : ''
|
||||
// ,'ctgCd' : '01'
|
||||
// ,'blckRsnCd' : '02'
|
||||
// ,'meno' : ''
|
||||
// }
|
||||
};
|
||||
},
|
||||
create() {
|
||||
//this.setCodeDate();
|
||||
this.formReset();
|
||||
},
|
||||
mounted() {
|
||||
//this.ctgCd = '01'
|
||||
},
|
||||
components: {
|
||||
VueEditor,
|
||||
ValidationConfirmPopup,
|
||||
},
|
||||
methods: {
|
||||
handleImageAdded(file, Editor, cursorLocation, resetUploader) {
|
||||
@@ -202,7 +227,7 @@ export default {
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
this.setCodeDate();
|
||||
this.formReset();
|
||||
if (props) {
|
||||
this.ntNo = props.ntNo;
|
||||
this.title = props.title;
|
||||
@@ -215,6 +240,20 @@ export default {
|
||||
this.fileTitle = props.fileTitle && props.fileTitle.split(',');
|
||||
this.fileNo = props.fileNo && props.fileNo.split(',');
|
||||
this.fileCount = props.fileCount;
|
||||
//팝업 공지가 아닐경우 현재 날짜 셋팅
|
||||
console.log(props.ctgCd);
|
||||
console.log(props.ntStrtDt);
|
||||
console.log(props.ntEndDt);
|
||||
|
||||
if(props.ctgCd != "06"){
|
||||
this.startDate = new Date();
|
||||
this.endDate = moment(new Date()).add(7, 'days').toDate();
|
||||
}else{
|
||||
this.startDate = moment(props.ntStrtDt).toDate();
|
||||
this.endDate = moment(props.ntEndDt).toDate();
|
||||
}
|
||||
this.closeDate('start');
|
||||
this.closeDate('end');
|
||||
}
|
||||
|
||||
for (let i = 0; i < this.fileCount; i++) {
|
||||
@@ -241,17 +280,6 @@ export default {
|
||||
this.$parent.$refs.table.reloadData();
|
||||
this.ModalClose();
|
||||
},
|
||||
|
||||
setCodeDate() {
|
||||
// 발송타입
|
||||
api.commCode({ grpCd: 'SNDBLCK_TP_CD' }).then((response) => {
|
||||
this.tpType = response.data.data.list;
|
||||
});
|
||||
api.commCode({ grpCd: 'SNDBLCK_RSN_CD' }).then((response) => {
|
||||
this.rsnType = response.data.data.list;
|
||||
});
|
||||
},
|
||||
|
||||
doValidate() {
|
||||
if (this.isNull(this.ctgCd) || this.ctgCd === 'null') {
|
||||
this.row.title = '공지사항 등록';
|
||||
@@ -275,14 +303,6 @@ export default {
|
||||
this.$refs.ValidationConfirmPopup.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
/* const hp = this.blckSndrno;
|
||||
if (!this.isNull(hp) && !this.isSendnum(hp)) {
|
||||
this.row.title = '공지사항';
|
||||
this.row.msg1 = '발신번호 형식이 잘못되었습니다. 확인 해주세요.';
|
||||
this.$parent.alertInsert(this.row);
|
||||
this.$refs._blckSndrno.focus();
|
||||
return false;
|
||||
} */
|
||||
this.row.ctgCd = this.ctgCd;
|
||||
return true;
|
||||
},
|
||||
@@ -347,6 +367,8 @@ export default {
|
||||
ntSbst: this.ntSbst,
|
||||
emgYn: this.emgYn,
|
||||
useYn: this.useYn,
|
||||
ntStrtDt: moment(this.startDate).format('YYYYMMDD'),
|
||||
ntEndDt: moment(this.endDate).format('YYYYMMDD'),
|
||||
ctgCd: this.ctgCd,
|
||||
chgId: this.$store.getters['login/userId'],
|
||||
legacyFiles: legacyFiles.join(),
|
||||
@@ -355,16 +377,11 @@ export default {
|
||||
|
||||
fd.append('key', new Blob([JSON.stringify(params)], { type: 'application/json' }));
|
||||
|
||||
/* for (var pair of fd.entries()) {
|
||||
console.log(pair[0] + ' : ' + pair[1]);
|
||||
} */
|
||||
|
||||
homeMgtApi.updateNotice(fd).then((response) => {
|
||||
if (response.data.retCode == '0000') {
|
||||
this.row.title = '공지사항 수정';
|
||||
this.row.msg1 = '수정이 완료되었습니다.';
|
||||
this.row.type = 'update';
|
||||
//this.$refs.ValidationConfirmPopup.alertModalOpen(this.row);
|
||||
this.toComplete();
|
||||
} else {
|
||||
this.row.title = '공지사항 수정 실패';
|
||||
@@ -388,27 +405,6 @@ export default {
|
||||
onFileChange(event) {
|
||||
const files = event.target.files || event.dataTransfer.files;
|
||||
if (!files.length) return;
|
||||
/* if (files.length > 3) {
|
||||
confirm.fnAlert(
|
||||
// "이미지 첨부 기준 안내",
|
||||
'',
|
||||
'<li>최대 3장 첨부할 수 있습니다.</li>',
|
||||
'info'
|
||||
);
|
||||
this.imageAddTitle = '이미지는 최대 3장까지 첨부할 수 있습니다.';
|
||||
//confirm.fnAlert("알림", "첨부파일은 최대 3개까지 가능합니다.", "alert");
|
||||
return;
|
||||
} else if (this.updateFileList.length + files.length > 3) {
|
||||
confirm.fnAlert(
|
||||
// "이미지 첨부 기준 안내",
|
||||
'',
|
||||
'<li>최대 3장 첨부할 수 있습니다.</li>',
|
||||
'info'
|
||||
);
|
||||
this.imageAddTitle = '이미지는 최대 3장까지 첨부할 수 있습니다.';
|
||||
// confirm.fnAlert("알림", "첨부파일은 최대 3개까지 가능합니다.", "alert");
|
||||
return;
|
||||
} */
|
||||
this.addFiles(files);
|
||||
},
|
||||
async addFiles(files) {
|
||||
@@ -416,48 +412,6 @@ export default {
|
||||
const src = await this.readFiles(files[i]);
|
||||
files[i].src = src;
|
||||
this.updateFileList.push(files[i]);
|
||||
|
||||
/* if (!(files[i].name.indexOf('jpg') > -1 || files[i].name.indexOf('jpeg') > -1)) {
|
||||
confirm.fnAlert('', '<li>jpg파일 형식만 첨부할 수 있습니다.</li>', 'info');
|
||||
this.imageAddTitle = 'jpg파일 형식만 첨부할 수 있습니다.';
|
||||
continue;
|
||||
} else if (files[i].size > 300000) {
|
||||
confirm.fnAlert(
|
||||
// "이미지 첨부 기준 안내",
|
||||
'',
|
||||
'<li>전체 크기 합계가 300KB 이하여야 합니다.</li>',
|
||||
'info'
|
||||
);
|
||||
this.imageAddTitle = '전체 크기 합계가 300KB 이하여야 합니다.';
|
||||
//confirm.fnAlert("이미지 사이즈 초과", "300KB이하 이미지만 등록 가능합니다.", "alert");
|
||||
continue;
|
||||
} else if (files[i].size + this.totalFileSize > 300000) {
|
||||
confirm.fnAlert(
|
||||
// "이미지 첨부 기준 안내",
|
||||
'',
|
||||
'<li>전체 크기 합계가 300KB 이하여야 합니다.</li>',
|
||||
'info'
|
||||
);
|
||||
this.imageAddTitle = '전체 크기 합계가 300KB 이하여야 합니다.';
|
||||
//confirm.fnAlert("이미지 사이즈 초과", "전체 합계 300KB이하 이미지만 등록 가능합니다.", "alert");
|
||||
continue;
|
||||
} else if (this.getImageSize(src) === false) {
|
||||
confirm.fnAlert(
|
||||
// "이미지 첨부 기준 안내",
|
||||
'',
|
||||
'<li>1,500(가로)x1,440(세로)px 이하 크기만 첨부할 수 있습니다.</li>',
|
||||
'info'
|
||||
);
|
||||
this.imageAddTitle = '1,500(가로)x1,440(세로)px 이하 크기만 첨부할 수 있습니다.';
|
||||
//confirm.fnAlert("이미지 크기 초과", "1500 * 1440 이하 이미지만 등록 가능합니다.", "alert");
|
||||
continue;
|
||||
} else {
|
||||
files[i].status = 'update';
|
||||
files[i].index = this.updateFileList.length;
|
||||
this.updateFileList.push(files[i]);
|
||||
confirm.fnAlert('', '이미지가 정상적으로 추가 되었습니다.', 'alert');
|
||||
this.imageAddTitle = '';
|
||||
} */
|
||||
}
|
||||
console.log(this.updateFileList);
|
||||
this.$refs.imageUploader.value = ''; // 이미지 중복 가능하도록 input 초기화
|
||||
@@ -499,6 +453,40 @@ export default {
|
||||
this.row.fileNm = fileName;
|
||||
homeMgtApi.fileDownload(this.row);
|
||||
},
|
||||
setPeriodDay(day) {
|
||||
this.periodDay = day;
|
||||
this.startDate = new Date();
|
||||
this.endDate = moment(new Date()).add(7, 'days').toDate();
|
||||
this.closeDate('start');
|
||||
this.closeDate('end');
|
||||
},
|
||||
selectedStartDate(day) {
|
||||
if (day != undefined && day != null) {
|
||||
this.periodDay = day;
|
||||
}
|
||||
if (this.startDate > this.endDate) {
|
||||
this.startDate = this.endDate;
|
||||
}
|
||||
},
|
||||
selectedEndDate(day) {
|
||||
if (day != undefined && day != null) {
|
||||
this.periodDay = day;
|
||||
}
|
||||
},
|
||||
closeDate(type) {
|
||||
if (type != undefined && type != null) {
|
||||
if (type == 'start') {
|
||||
this.disabledSDate = { to: new Date(), from: this.endDate };
|
||||
this.disabledEDate = { to: this.startDate};
|
||||
} else if (type == 'end') {
|
||||
this.disabledSDate = { to: new Date(), from: this.endDate };
|
||||
this.disabledEDate = { to: this.startDate };
|
||||
}
|
||||
}
|
||||
},
|
||||
customFormatter: function (date) {
|
||||
return moment(date).format('YYYY-MM-DD');
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<option value="03">정책/약관</option>
|
||||
<option value="04">오류/장애</option>
|
||||
<option value="05">이벤트</option>
|
||||
<option value="06">팝업공지</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input_box id">
|
||||
@@ -173,21 +174,10 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// this.fnSelectNoticeList();
|
||||
//let page = 1;
|
||||
// 페이지 정보 및 검색 조건
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
|
||||
// store에 저장된 페이지 정보 및 검색 조건을 불러오기
|
||||
let isKeep = false;
|
||||
/*
|
||||
if (getCondition) {
|
||||
this.grid.pagePerRows = getCondition.perPage;
|
||||
this.grid.params = getCondition.params;
|
||||
// page = getCondition.page;
|
||||
//isKeep = true;
|
||||
}
|
||||
*/
|
||||
this.grid.pagePerRows = 50;
|
||||
this.search(isKeep);
|
||||
},
|
||||
@@ -214,7 +204,6 @@ export default {
|
||||
this.$refs.NoticePop.ModalOpen();
|
||||
},
|
||||
noticeDetail(props) {
|
||||
//console.log(props);
|
||||
this.$refs.NoticeUpdatePop.ModalOpen(props);
|
||||
},
|
||||
search: function (isKeep) {
|
||||
@@ -230,8 +219,6 @@ export default {
|
||||
perPage: this.perPageCnt,
|
||||
params: this.grid.params,
|
||||
});
|
||||
|
||||
//const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
},
|
||||
changePerPage: function () {
|
||||
// 페이지당 조회할 개수
|
||||
@@ -246,16 +233,12 @@ export default {
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
//const param = chkList.map((row)=>({regReqNo:row.regReqNo} ));
|
||||
const param = chkList.map((row) => ({ ntNo: row.ntNo }));
|
||||
this.row.list = param;
|
||||
|
||||
this.row.title = '공지사항 관리';
|
||||
this.row.msg1 = '삭제 하시겠습니까?';
|
||||
this.$refs.commmonModal.confirmModalOpen2(this.row);
|
||||
|
||||
console.log(typeof this.row.list[0].ntNo);
|
||||
//this.$refs.commmonModal.confirmModalOpen2(this.row);
|
||||
},
|
||||
confirmCalbackFnc(props) {
|
||||
if (props.result) {
|
||||
|
||||
@@ -105,7 +105,8 @@ router.beforeEach((to, from, next) => {
|
||||
nextUrl == '/custMgt/memberList' ||
|
||||
nextUrl == '/custMgt/memberDetail' ||
|
||||
nextUrl == '/custMgt/subsDetail' ||
|
||||
nextUrl == '/custMgt/memberAdminDetail'
|
||||
nextUrl == '/custMgt/memberAdminDetail' ||
|
||||
nextUrl == '/custMgt/chrgList'
|
||||
) {
|
||||
for (var i = 0; i < menuUrls.length; i++) {
|
||||
if (menuUrls[i] == '/custMgt/subsList') {
|
||||
|
||||
@@ -29,10 +29,18 @@ import kr.co.uplus.ez.api.custMgt.dto.AllMemoListReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.AllMemoListResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.CarryOverListReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.CarryOverListResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.ChrgDetailReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.ChrgDetailResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.ChrgListReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.ChrgListResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.DeleteChrgReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.DeleteChrgResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.DeleteMemoReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.DeleteMemoResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.DeleteUserReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.DeleteUserResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.InsertChrgReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.InsertChrgResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.InsertMassUserReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.InsertMassUserResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.InsertTestIdReqDto;
|
||||
@@ -55,11 +63,20 @@ import kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoTotalReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoTotalResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateChrgReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateChrgResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateUserReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateUserResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UserListReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UserListResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UserLmtListExcelReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UserLmtListExcelResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UserLmtListReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UserLmtListResDto;
|
||||
import kr.co.uplus.ez.common.components.ValidComponents;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseMessage;
|
||||
import lombok.val;
|
||||
|
||||
/**
|
||||
* 고객관리 Controller.
|
||||
@@ -476,5 +493,179 @@ public class CustMgtController {
|
||||
}
|
||||
return custService.duplicateCheckUserId(insertUserReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2023. 3. 15.
|
||||
* auth : won
|
||||
* desc : 충전관리 목록 조회
|
||||
* @param ChrgListReqDto
|
||||
* @return ChrgListResDto
|
||||
* @
|
||||
*/
|
||||
@ApiOperation(value="chrgList", notes = "충전관리 목록 조회")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
|
||||
})
|
||||
@RequestMapping(value="/chrgList", method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ChrgListResDto chrgList(@RequestBody @Valid ChrgListReqDto chrgListReqDto, BindingResult bindingResult) {
|
||||
if(validComponents.validParameter(bindingResult)) {
|
||||
return new ChrgListResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
return custService.chrgList(chrgListReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2023. 3. 15.
|
||||
* auth : won
|
||||
* desc : 충전관리 상세 조회
|
||||
* @param ChrgDetailReqDto
|
||||
* @return ChrgDetailResDto
|
||||
* @
|
||||
*/
|
||||
@ApiOperation(value="chrgDetail", notes = "충전관리 목록 조회")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
|
||||
})
|
||||
@RequestMapping(value="/chrgDetail", method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ChrgDetailResDto chrgDetail(@RequestBody @Valid ChrgDetailReqDto chrgDetailReqDto, BindingResult bindingResult) {
|
||||
if(validComponents.validParameter(bindingResult)) {
|
||||
return new ChrgDetailResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
return custService.chrgDetail(chrgDetailReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 유저ID 목록 조회
|
||||
* @param adminListReqDto
|
||||
*/
|
||||
@ApiOperation(value = "/userList", notes = "관리자ID 목록 조회")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "userList", method = { RequestMethod.POST })
|
||||
@ResponseBody
|
||||
public UserListResDto userList(@RequestBody @Valid UserListReqDto userListReqDto, BindingResult bindingResult) {
|
||||
|
||||
if (validComponents.validParameter(bindingResult)) {
|
||||
return new UserListResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
|
||||
return custService.userList(userListReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2023. 3. 15.
|
||||
* auth : won
|
||||
* desc : 충전관리 등록
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @
|
||||
*/
|
||||
@ApiOperation(value="insertChrg", notes = "충전관리 등록")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
|
||||
})
|
||||
@RequestMapping(value="/insertChrg", method= {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public InsertChrgResDto insertChrg (@RequestBody @Valid InsertChrgReqDto insertChrgReqDto, BindingResult bindingResult) {
|
||||
if(validComponents.validParameter(bindingResult)) {
|
||||
return new InsertChrgResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
return custService.InsertChrg(insertChrgReqDto);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* date : 2023. 3. 15.
|
||||
* auth : won
|
||||
* desc : 충전관리 수정
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="updateChrg", notes = "충전관리 수정")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
|
||||
})
|
||||
@RequestMapping(value="/updateChrg", method= {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public UpdateChrgResDto updateChrg(@RequestBody @Valid UpdateChrgReqDto updateChrgReqDto, BindingResult bindingResult) {
|
||||
if(validComponents.validParameter(bindingResult)) {
|
||||
return new UpdateChrgResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
return custService.UpdateChrg(updateChrgReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2023. 3. 15.
|
||||
* auth : won
|
||||
* desc : 충전관리 삭제
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="deleteChrg", notes = "충전관리 수정")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
|
||||
})
|
||||
@RequestMapping(value="/deleteChrg", method= {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public DeleteChrgResDto deleteChrg(@RequestBody @Valid DeleteChrgReqDto deleteChrgReqDto, BindingResult bindingResult) {
|
||||
|
||||
logger.debug("deleteChrgReqDto={}",deleteChrgReqDto.getList());
|
||||
logger.debug("deleteChrgReqDto={}",deleteChrgReqDto.getList().get(0));
|
||||
|
||||
if(validComponents.validParameter(bindingResult)) {
|
||||
return new DeleteChrgResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
return custService.DeleteChrg(deleteChrgReqDto);
|
||||
}
|
||||
|
||||
|
||||
/*2023-03-07 add request 부분
|
||||
*
|
||||
* date : 2023. 1. 1.
|
||||
* auth : won
|
||||
* desc : 요금제 구매 내역 목록 조회
|
||||
* @param UserLmtListReqDto
|
||||
* @return UserLmtListRestDto
|
||||
* @
|
||||
|
||||
@ApiOperation(value = "BLNCList", notes = "요금제 구매 내역 목록 조회")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
|
||||
})
|
||||
@RequestMapping(value = "/BLNCList" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public UserLmtListResDto BLNCList(@RequestBody @Valid UserLmtListReqDto userLmtListReqDto, BindingResult bindingResult) {
|
||||
if(validComponents.validParameter(bindingResult)) {
|
||||
return new UserLmtListResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
return custService.BLNCList(userLmtListReqDto);
|
||||
}
|
||||
|
||||
|
||||
* date : 2023. 1. 1.
|
||||
* auth : won
|
||||
* desc : 요금제 구매 내역 정보 목록 엑셀 다운로드
|
||||
*
|
||||
* @param userLmtListExcelReqDto
|
||||
* @return UserLmtListExcelResDto
|
||||
* @
|
||||
|
||||
@ApiOperation(value = "BLNCListExcel", notes = "청약 고객 정보 목록 엑셀 다운로드")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
|
||||
})
|
||||
@RequestMapping(value = "/BLNCListExcel" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public UserLmtListExcelResDto BLNCListExcel(@RequestBody @Valid UserLmtListExcelReqDto userLmtListExcelReqDto, BindingResult bindingResult) {
|
||||
|
||||
if(validComponents.validParameter(bindingResult)) {
|
||||
return new UserLmtListExcelResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
|
||||
return custService.userLmtListExcel(userLmtListExcelReqDto);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package kr.co.uplus.ez.api.custMgt;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.*;
|
||||
import kr.co.uplus.ez.common.data.ImUser;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -106,4 +105,42 @@ public interface CustMgtMapper {
|
||||
/** 결합할인여부 수정*/
|
||||
int updateBindDcYn(SubsDetail subDetail);
|
||||
|
||||
/** 청구정보 카운트 조회.*/
|
||||
int selectUserLmtListTotalCnt(UserLmtListReqDto userLmtListReqDto);
|
||||
|
||||
/** 충전관리 카운트 조회.*/
|
||||
int cntChrgList(ChrgListReqDto chrgListReqDto);
|
||||
/**충전관리 목록 조회*/
|
||||
List<ChrgList> selectChrgList(ChrgListReqDto chrgListReqDto);
|
||||
/** 충전관리 상세 조회 */
|
||||
ChrgDetail selectChrgDetail(ChrgDetailReqDto chrgDetailReqDto);
|
||||
/**유저ID 카운트 조회*/
|
||||
int selectuserTotalCnt(UserListReqDto userListReqDto);
|
||||
/**유저ID 목록 조회*/
|
||||
List<UserinInfo> selectUserList(UserListReqDto userListReqDto);
|
||||
/**이용자 충전번호 */
|
||||
String getChrgSeq();
|
||||
|
||||
/**충전관리 등록 */
|
||||
int insertChrgInfo(ChrgInfo chrgInfo);
|
||||
/**충전관리 수정 */
|
||||
void updateChrg(UpdateChrgReqDto updateChrgReqDto);
|
||||
/**충전관리 수정후 등록 */
|
||||
void addChrg(ChrgInfo chrgInfo);
|
||||
/**충전관리 삭제 */
|
||||
void deleteChrg(DeleteChrgReqDto deleteChrgReqDto);
|
||||
int updateChrgAmt(ChrgAmtDto chrgAmtDto);
|
||||
|
||||
SvcUserInfo selectUserInfo(String register);
|
||||
public String selectSequence(String seqKey);
|
||||
public String selectNotiSeq(); //알림이련seq
|
||||
void insertWebMsgCli(WebMsgCliDto params);
|
||||
void insertNotiHst(NotiHistDto params);
|
||||
|
||||
|
||||
//2023-03-07 add request 부분
|
||||
// /** 요금제 구매 내역 정보 목록 조회.*/
|
||||
// List<UserLmtList> selectBLNCLists(UserLmtListReqDto userLmtListReqDto);
|
||||
// /** 요금제 구매 내역 정보 엑셀 목록 조회.*/
|
||||
// List<UserLmtList> selectBLNCListsExcel(UserLmtListExcelReqDto userLmtListExcelReqDto);
|
||||
}
|
||||
|
||||
@@ -3,8 +3,11 @@ package kr.co.uplus.ez.api.custMgt;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.*;
|
||||
import kr.co.uplus.ez.common.components.HubeasyApiComponents;
|
||||
import kr.co.uplus.ez.common.data.*;
|
||||
import kr.co.uplus.ez.common.utils.CommonUtils;
|
||||
import kr.co.uplus.ez.common.utils.DateUtil;
|
||||
import kr.co.uplus.ez.common.utils.DateUtils;
|
||||
import kr.co.uplus.ez.common.utils.EncryptionUtil;
|
||||
import kr.co.uplus.ez.common.utils.TextUtils;
|
||||
import org.apache.commons.lang3.RandomStringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.mybatis.spring.SqlSessionTemplate;
|
||||
@@ -19,12 +22,17 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
@Service
|
||||
public class CustMgtService {
|
||||
|
||||
@@ -113,6 +121,10 @@ public class CustMgtService {
|
||||
|
||||
@Value("${mail.templeteCode:E0005}")
|
||||
private String templeteCode;
|
||||
|
||||
public static final String YEAR_MONTH_DAY = "yyyyMMdd";
|
||||
public static final String WEB_REQ_ID = "WEB_REQ_ID";
|
||||
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25. auth : ckr desc : 청약 고객 정보 목록 조회
|
||||
@@ -995,4 +1007,378 @@ public class CustMgtService {
|
||||
|
||||
return new InsertUserResDto(ApiResponseCode.SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2023. 3. 15.
|
||||
* auth : won
|
||||
* desc : 충전관리 목록 조회
|
||||
* @param ChrgListReqDto
|
||||
* @return ChrgListResDto
|
||||
*/
|
||||
public ChrgListResDto chrgList(ChrgListReqDto chrgListReqDto) {
|
||||
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
|
||||
|
||||
String nowPage = String.valueOf(chrgListReqDto.getPage());
|
||||
int totalCnt = custMgtMapper.cntChrgList(chrgListReqDto);
|
||||
logger.debug("getStartDt={}",chrgListReqDto.getStartDt());
|
||||
if (totalCnt == 0) {
|
||||
|
||||
ChrgListRes chrgListRes = new ChrgListRes();
|
||||
chrgListRes.setList(new ArrayList<>());
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
chrgListRes.setPaging(paging);
|
||||
|
||||
return new ChrgListResDto(ApiResponseCode.CM_NOT_FOUND, chrgListRes);
|
||||
}
|
||||
|
||||
int page = chrgListReqDto.getPage();
|
||||
int pagePerRows = chrgListReqDto.getPagePerRows();
|
||||
page = (page - 1) * pagePerRows;
|
||||
chrgListReqDto.setPage(page);
|
||||
|
||||
// Date now = new Date();
|
||||
// String chrgYm = DateUtils.dateToStr(now, "yyyyMM");
|
||||
|
||||
|
||||
List<ChrgList> chrgList= custMgtMapper.selectChrgList(chrgListReqDto);
|
||||
|
||||
|
||||
|
||||
for (int i = 0; i < chrgList.size(); i++) {
|
||||
String startDt = chrgList.get(i).getStrtYm();
|
||||
String endDt = chrgList.get(i).getEndYm();
|
||||
|
||||
chrgList.get(i).setChrgDate(startDt + "~" +endDt);
|
||||
}
|
||||
|
||||
ChrgListRes chrgListRes = new ChrgListRes();
|
||||
chrgListRes.setList(chrgList);
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
chrgListRes.setPaging(paging);
|
||||
|
||||
return new ChrgListResDto(ApiResponseCode.SUCCESS, chrgListRes);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2023. 3. 15.
|
||||
* auth : won
|
||||
* desc : 충전관리 상세 조회
|
||||
* @param ChrgDetailReqDto
|
||||
* @return ChrgDetailResDto
|
||||
*/
|
||||
public ChrgDetailResDto chrgDetail(@Valid ChrgDetailReqDto chrgDetailReqDto) {
|
||||
CustMgtMapper custMgtMapper = sqlSessionSlave.getMapper(CustMgtMapper.class);
|
||||
|
||||
ChrgDetail chrgDetail = custMgtMapper.selectChrgDetail(chrgDetailReqDto);
|
||||
|
||||
if (chrgDetail == null) {
|
||||
return new ChrgDetailResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
|
||||
// 성공 응답.
|
||||
return new ChrgDetailResDto(ApiResponseCode.SUCCESS, chrgDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* * date : 2023. 3. 15.
|
||||
* * auth : won
|
||||
* * desc : 충전관리 등록
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@Transactional(value="db1TransactionManager")
|
||||
public InsertChrgResDto InsertChrg(@Valid InsertChrgReqDto insertChrgReqDto){
|
||||
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
|
||||
|
||||
int resultcnt = 0;
|
||||
|
||||
// 1. 사용자 유무 확인
|
||||
int getUserIdCount = custMgtMapper.getUserIdCount(insertChrgReqDto.getUserId());
|
||||
|
||||
if (getUserIdCount < 1) {
|
||||
return new InsertChrgResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
|
||||
// 3. 충전 정보 등록
|
||||
String chrgSeq = custMgtMapper.getChrgSeq();
|
||||
SvcUserInfo userInfo = custMgtMapper.selectUserInfo(insertChrgReqDto.getUserId());
|
||||
Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
|
||||
UserDetails userDetails = (UserDetails) principal;
|
||||
String regId = userDetails.getUsername();
|
||||
|
||||
logger.debug("insertChrgReqDto= {}", insertChrgReqDto);
|
||||
|
||||
ChrgInfo chrgInfo = new ChrgInfo();
|
||||
chrgInfo.setChrgSeq(chrgSeq);
|
||||
chrgInfo.setUserSeq(userInfo.getUserSeq());
|
||||
chrgInfo.setChrgDiv(insertChrgReqDto.getChrgDiv());
|
||||
String StrYm = insertChrgReqDto.getStrtYm().replace("-", "").substring(0, 6);
|
||||
chrgInfo.setStrtYm(StrYm);
|
||||
String EndYm = insertChrgReqDto.getEndYm().replace("-", "").substring(0, 6);
|
||||
chrgInfo.setEndYm(EndYm);
|
||||
chrgInfo.setChrgAmt(insertChrgReqDto.getChrgAmt());
|
||||
chrgInfo.setRegId(regId); //로그인 ID
|
||||
chrgInfo.setChgId(regId); //로그인 ID
|
||||
|
||||
resultcnt = custMgtMapper.insertChrgInfo(chrgInfo);
|
||||
|
||||
Date now = new Date();
|
||||
String presentYm = DateUtils.dateToStr(now, "yyyyMM");
|
||||
ChrgAmtDto chrgAmtDto = new ChrgAmtDto();
|
||||
|
||||
if (presentYm.equals(StrYm)) {
|
||||
|
||||
if ("E".equals(insertChrgReqDto.getChrgDiv())) {
|
||||
//소멸 충전금 업데이트
|
||||
chrgAmtDto.setUserSeq(userInfo.getUserSeq());
|
||||
chrgAmtDto.setLmtYm(chrgInfo.getStrtYm());
|
||||
chrgAmtDto.setExtcChrgAmt(chrgInfo.getChrgAmt());
|
||||
chrgAmtDto.setCfwdChrgAmt("0");
|
||||
|
||||
}else if ("C".equals(insertChrgReqDto.getChrgDiv())) {
|
||||
//이월 충전금 업데이트
|
||||
chrgAmtDto.setUserSeq(userInfo.getUserSeq());
|
||||
chrgAmtDto.setLmtYm(chrgInfo.getStrtYm());
|
||||
chrgAmtDto.setCfwdChrgAmt(chrgInfo.getChrgAmt());
|
||||
chrgAmtDto.setExtcChrgAmt("0");
|
||||
}
|
||||
if(resultcnt > 0) {
|
||||
resultcnt = custMgtMapper.updateChrgAmt(chrgAmtDto);
|
||||
}else {
|
||||
logger.error("충전금 등록 오류");
|
||||
}
|
||||
|
||||
//update성공시
|
||||
if (resultcnt>0) {
|
||||
String prefix = getCurrentDate(YEAR_MONTH_DAY);
|
||||
String webReqId = "";
|
||||
|
||||
// 1. webReqId 채번
|
||||
webReqId = prefix + custMgtMapper.selectSequence(WEB_REQ_ID);
|
||||
BigDecimal chargeAmt= BigDecimal.ZERO;
|
||||
BigDecimal zero = BigDecimal.ZERO;
|
||||
|
||||
//충전 금액 조회
|
||||
chargeAmt = new BigDecimal(chrgInfo.getChrgAmt());
|
||||
//알림문자 발송테이블 insert
|
||||
WebMsgCliDto ezMsgDto = new WebMsgCliDto();
|
||||
ezMsgDto.setTableName("EZ_MSG_REAL");
|
||||
ezMsgDto.setTrafficType("real");
|
||||
String clientKey = generateClientKey("R", 10);
|
||||
ezMsgDto.setClientKey(clientKey);
|
||||
ezMsgDto.setReqProduct("LMS");
|
||||
ezMsgDto.setMsgStatus("ready");
|
||||
ezMsgDto.setCallbackNumber("15445992");
|
||||
ezMsgDto.setPhone(userInfo.getHpNo());
|
||||
ezMsgDto.setWebReqId(webReqId);
|
||||
ezMsgDto.setOrderId("2");
|
||||
|
||||
String msg = "[LG U+메시지허브이지]\n이번 달 이벤트 충전 금액이 충전 되었습니다.\n*충전 금액 : "+chargeAmt+"원";
|
||||
ezMsgDto.setMsg(msg);
|
||||
|
||||
custMgtMapper.insertWebMsgCli(ezMsgDto);
|
||||
logger.info("충전 알림 등록 : [{}]", ezMsgDto.toString());
|
||||
|
||||
//알림 이력 insert
|
||||
NotiHistDto notihist = new NotiHistDto();
|
||||
String notiSeq = custMgtMapper.selectNotiSeq();
|
||||
notihist.setUserSeq(userInfo.getUserSeq());
|
||||
notihist.setNotiSeq(notiSeq);
|
||||
notihist.setNotiMsg(msg);
|
||||
notihist.setWebReqId(webReqId);
|
||||
|
||||
custMgtMapper.insertNotiHst(notihist);
|
||||
logger.info("충전 알림 이력 등록 : [{}]", ezMsgDto.toString());
|
||||
}else{
|
||||
logger.error("충전금 한도 업데이트 오류");
|
||||
}
|
||||
}
|
||||
return new InsertChrgResDto(ApiResponseCode.SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2023. 3. 15.
|
||||
* auth : won
|
||||
* desc : 충전관리 수정
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
public UpdateChrgResDto UpdateChrg(@Valid UpdateChrgReqDto updateChrgReqDto) {
|
||||
|
||||
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
|
||||
|
||||
// 1. 사용여부 update
|
||||
custMgtMapper.updateChrg(updateChrgReqDto);
|
||||
|
||||
// 2. 새 정보 insert
|
||||
String chrgSeq = custMgtMapper.getChrgSeq();
|
||||
SvcUserInfo userInfo = custMgtMapper.selectUserInfo(updateChrgReqDto.getUserId());
|
||||
Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
|
||||
UserDetails userDetails = (UserDetails) principal;
|
||||
String regId = userDetails.getUsername();
|
||||
|
||||
logger.debug("updateChrgReqDto= {}", updateChrgReqDto);
|
||||
|
||||
ChrgInfo chrgInfo = new ChrgInfo();
|
||||
chrgInfo.setChrgSeq(chrgSeq);
|
||||
chrgInfo.setUserSeq(userInfo.getUserSeq());
|
||||
chrgInfo.setChrgDiv(updateChrgReqDto.getChrdDiv());
|
||||
String StrYm = updateChrgReqDto.getStrtYm().replace("-", "").substring(0, 6);
|
||||
chrgInfo.setStrtYm(StrYm);
|
||||
String EndYm = updateChrgReqDto.getEndYm().replace("-", "").substring(0, 6);
|
||||
chrgInfo.setEndYm(EndYm);
|
||||
chrgInfo.setChrgAmt(updateChrgReqDto.getChrgAmt());
|
||||
chrgInfo.setRegId(regId); //로그인 ID
|
||||
chrgInfo.setChgId(regId); //로그인 ID
|
||||
|
||||
custMgtMapper.addChrg(chrgInfo);
|
||||
|
||||
return new UpdateChrgResDto(ApiResponseCode.SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2023. 3. 15.
|
||||
* auth : won
|
||||
* desc : 충전관리 삭제
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
public DeleteChrgResDto DeleteChrg(@Valid DeleteChrgReqDto deleteChrgReqDto) {
|
||||
|
||||
logger.debug("deleteChrgReqDto={}",deleteChrgReqDto);
|
||||
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
|
||||
custMgtMapper.deleteChrg(deleteChrgReqDto);
|
||||
return new DeleteChrgResDto(ApiResponseCode.SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 유저ID 목록 조회
|
||||
* @param userListReqDto
|
||||
* @return
|
||||
*/
|
||||
public UserListResDto userList(UserListReqDto userListReqDto) {
|
||||
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
|
||||
int totalCnt = custMgtMapper.selectuserTotalCnt(userListReqDto);
|
||||
|
||||
if(totalCnt == 0) {
|
||||
UserListRes userListRes = new UserListRes();
|
||||
userListRes.setList(new ArrayList<>());
|
||||
return new UserListResDto(ApiResponseCode.CM_NOT_FOUND, userListRes);
|
||||
}
|
||||
|
||||
List<UserinInfo> userinInfo = custMgtMapper.selectUserList(userListReqDto);
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
|
||||
UserListRes userListRes = new UserListRes();
|
||||
userListRes.setList(userinInfo);
|
||||
|
||||
return new UserListResDto(ApiResponseCode.SUCCESS, userListRes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 날짜 형식을 받아서 오늘 날짜를 해당 형식으로 반환
|
||||
*
|
||||
* @param format
|
||||
* @return
|
||||
*/
|
||||
public String getCurrentDate(String format) {
|
||||
Date date = Calendar.getInstance().getTime();
|
||||
DateFormat dateFormat = new SimpleDateFormat(format);
|
||||
return dateFormat.format(date);
|
||||
}
|
||||
|
||||
/**
|
||||
* clientKey 생성
|
||||
*
|
||||
* @param rsvtType
|
||||
* @return
|
||||
*/
|
||||
public String generateClientKey(String lineTpCdKey, int length) {
|
||||
String prefix = DateUtil.getCurrentDate("yyyyMMddHHmmss") + lineTpCdKey;
|
||||
String clientKey = "";
|
||||
|
||||
clientKey = CommonUtils.getCommonId(prefix, length);
|
||||
|
||||
return clientKey;
|
||||
}
|
||||
|
||||
/* 2023-03-07 add request 부분
|
||||
* date : 2023. 1. 1.
|
||||
* auth : won
|
||||
* desc : 요금제 구매 내역 목록 조회
|
||||
* @param UserLmtListReqDto
|
||||
* @return UserLmtListRestDto
|
||||
* @
|
||||
|
||||
public UserLmtListResDto BLNCList(UserLmtListReqDto userLmtListReqDto) {
|
||||
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
|
||||
|
||||
String nowPage = String.valueOf(userLmtListReqDto.getPage());
|
||||
int totalCnt = custMgtMapper.selectUserLmtListTotalCnt(userLmtListReqDto);
|
||||
if (totalCnt==0) {
|
||||
UserLmtListRes userLmtListRes = new UserLmtListRes();
|
||||
userLmtListRes.setList(new ArrayList<>());
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
userLmtListRes.setPaging(paging);
|
||||
|
||||
return new UserLmtListResDto(ApiResponseCode.CM_NOT_FOUND, userLmtListRes);
|
||||
}
|
||||
|
||||
int page = userLmtListReqDto.getPage();
|
||||
int pagePerRows = userLmtListReqDto.getPagePerRows();
|
||||
page = (page-1) * pagePerRows;
|
||||
userLmtListReqDto.setPage(page);
|
||||
|
||||
//리스트 조회
|
||||
List<UserLmtList> userlmtlist = custMgtMapper.selectBLNCLists(userLmtListReqDto);
|
||||
|
||||
UserLmtListRes userLmtListRes = new UserLmtListRes();
|
||||
userLmtListRes.setList(userlmtlist);
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
userLmtListRes.setPaging(paging);
|
||||
|
||||
return new UserLmtListResDto(ApiResponseCode.SUCCESS, userLmtListRes);
|
||||
}
|
||||
|
||||
*
|
||||
* date : 2023. 1. 1.
|
||||
* auth : won
|
||||
* desc : 요금제 구매 내역 정보 목록 엑셀 다운로드
|
||||
*
|
||||
* @param userLmtListExcelReqDto
|
||||
* @return UserLmtListExcelResDto
|
||||
|
||||
public UserLmtListExcelResDto userLmtListExcel(@Valid UserLmtListExcelReqDto userLmtListExcelReqDto) {
|
||||
|
||||
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
|
||||
|
||||
UserLmtListRes userLmtListRes = new UserLmtListRes();
|
||||
//리스트 조회
|
||||
List<UserLmtList> userLmtLists = custMgtMapper.selectBLNCListsExcel(userLmtListExcelReqDto);
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setTotalCnt(String.valueOf(userLmtLists.size()));
|
||||
userLmtListRes.setPaging(paging);
|
||||
userLmtListRes.setList(userLmtLists);
|
||||
|
||||
return new UserLmtListExcelResDto(ApiResponseCode.SUCCESS,userLmtListRes);
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
25
src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgAmtDto.java
Normal file
25
src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgAmtDto.java
Normal 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 ChrgAmtDto implements Serializable{
|
||||
|
||||
/** 충전 SEQUENCE */
|
||||
private String chrgSeq;
|
||||
/** 유저 SEQUENCE */
|
||||
private String userSeq;
|
||||
/** 한도년월 */
|
||||
private String lmtYm;
|
||||
/** 충전 시작년월 */
|
||||
private String strtYm;
|
||||
/** 충전구분 */
|
||||
private String chrgDiv;
|
||||
/** 소멸 충전금 */
|
||||
private String extcChrgAmt;
|
||||
/** 이월 충전금 */
|
||||
private String cfwdChrgAmt;
|
||||
}
|
||||
15
src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgDelete.java
Normal file
15
src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgDelete.java
Normal file
@@ -0,0 +1,15 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ChrgDelete implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "사용여부", name = "사용여부", dataType = "String")
|
||||
private String useYn;
|
||||
@ApiModelProperty(example = "충전seq", name = "충전seq", dataType = "String")
|
||||
private String chrgSeq;
|
||||
}
|
||||
30
src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgDetail.java
Normal file
30
src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgDetail.java
Normal file
@@ -0,0 +1,30 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class ChrgDetail implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
|
||||
private String custNm;
|
||||
@ApiModelProperty(example = "고객명", name = "고객명", dataType = "String")
|
||||
private String userId;
|
||||
@ApiModelProperty(example = "충전구분", name = "충전구분", dataType = "String")
|
||||
private String chrgDiv;
|
||||
@ApiModelProperty(example = "충전시작일", name = "충전시작일", dataType = "String")
|
||||
private String strtYm;
|
||||
@ApiModelProperty(example = "충전종료일", name = "충전종료일", dataType = "String")
|
||||
private String endYm;
|
||||
@ApiModelProperty(example = "충전금액", name = "충전금액", dataType = "String")
|
||||
private String chrgAmt;
|
||||
@ApiModelProperty(example = "사용여부", name = "사용여부", dataType = "String")
|
||||
private String useYn;
|
||||
@ApiModelProperty(example = "사업자명", name = "사업자명", dataType = "String")
|
||||
private String bizrNo;
|
||||
@ApiModelProperty(example = "충전seq", name = "충전seq", dataType = "String")
|
||||
private String chrgSeq;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class ChrgDetailReqDto implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "충전seq", name = "충전seq", dataType = "String")
|
||||
private String chrgSeq;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class ChrgDetailResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "데이터")
|
||||
private ChrgDetail data;
|
||||
|
||||
public ChrgDetailResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public ChrgDetailResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public ChrgDetailResDto(ApiResponseCode returnStr, ChrgDetail data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
}
|
||||
33
src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgInfo.java
Normal file
33
src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgInfo.java
Normal 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 ChrgInfo implements Serializable{
|
||||
|
||||
/** 충전 SEQUENCE */
|
||||
private String chrgSeq;
|
||||
/** 유저 SEQUENCE */
|
||||
private String userSeq;
|
||||
/** 충전구분 */
|
||||
private String chrgDiv;
|
||||
/** 충전 시작년월 */
|
||||
private String strtYm;
|
||||
/** 충전 종료년월 */
|
||||
private String endYm;
|
||||
/** 충전금액 */
|
||||
private String chrgAmt;
|
||||
/** 사용여부 */
|
||||
private String useYn;
|
||||
/** 등록_ID . */
|
||||
private String regId;
|
||||
/** 등록_일시 . */
|
||||
private String regDt;
|
||||
/** 변경_ID . */
|
||||
private String chgId;
|
||||
/** 변경_일시 . */
|
||||
private String chgDt;
|
||||
}
|
||||
34
src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgList.java
Normal file
34
src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgList.java
Normal file
@@ -0,0 +1,34 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class ChrgList implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "리스트 번호", name = "리스트 번호", dataType = "Integer")
|
||||
private Integer no;
|
||||
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
|
||||
private String custNm;
|
||||
@ApiModelProperty(example = "고객명", name = "고객명", dataType = "String")
|
||||
private String userId;
|
||||
@ApiModelProperty(example = "충전구분", name = "충전구분", dataType = "String")
|
||||
private String chrgDiv;
|
||||
@ApiModelProperty(example = "충전시작일", name = "충전시작일", dataType = "String")
|
||||
private String strtYm;
|
||||
@ApiModelProperty(example = "충전종료일", name = "충전종료일", dataType = "String")
|
||||
private String endYm;
|
||||
@ApiModelProperty(example = "충전금액", name = "충전금액", dataType = "String")
|
||||
private String chrgAmt;
|
||||
@ApiModelProperty(example = "사용여부", name = "사용여부", dataType = "String")
|
||||
private String useYn;
|
||||
@ApiModelProperty(example = "사업자명", name = "사업자명", dataType = "String")
|
||||
private String bizrNo;
|
||||
@ApiModelProperty(example = "충전기간", name = "충전기간", dataType = "String")
|
||||
private String chrgDate;
|
||||
@ApiModelProperty(example = "충전seq", name = "충전seq", dataType = "String")
|
||||
private String chrgSeq;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class ChrgListReqDto implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "조회 시작 날짜", name = "조회 시작 날짜", notes = "YYYYMM", dataType = "String")
|
||||
private String startDt;
|
||||
@ApiModelProperty(example = "조회 종료 날짜", name = "조회 종료 날짜", notes = "YYYYMM", dataType = "String")
|
||||
private String endDt;
|
||||
@ApiModelProperty(example = "상세검색", name = "상세검색", notes = "항목 : 고객사명(01)/가입번호(02)/서비스ID(03)", dataType = "String")
|
||||
private String searchType1;
|
||||
@ApiModelProperty(example = "검색어 (입력항목)", name = "검색어 (입력항목)", dataType = "String")
|
||||
private String searchText1;
|
||||
@ApiModelProperty(example = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "String")
|
||||
private int pagePerRows;
|
||||
@ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "String")
|
||||
private int page;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import kr.co.uplus.ez.common.data.Paging;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class ChrgListRes implements Serializable{
|
||||
|
||||
private Paging paging;
|
||||
private List<ChrgList> list;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class ChrgListResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
private ChrgListRes data;
|
||||
|
||||
public ChrgListResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public ChrgListResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public ChrgListResDto(ApiResponseCode returnStr, ChrgListRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class DeleteChrgReqDto implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "사용여부", name = "사용여부", dataType = "String")
|
||||
private String useYn;
|
||||
@ApiModelProperty(example = "충전seq", name = "충전seq", dataType = "String")
|
||||
private String chrgSeq;
|
||||
|
||||
private List<ChrgDelete> list;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class DeleteChrgResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
private Object data;
|
||||
|
||||
public DeleteChrgResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public DeleteChrgResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public DeleteChrgResDto(ApiResponseCode returnStr, Object data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class InsertChrgReqDto implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "관리자 ID", name = "관리자 ID", dataType = "String")
|
||||
private String adminId;
|
||||
@ApiModelProperty(example = "리스트 번호", name = "리스트 번호", dataType = "Integer")
|
||||
private Integer no;
|
||||
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
|
||||
private String custNm;
|
||||
@ApiModelProperty(example = "고객명", name = "고객명", dataType = "String")
|
||||
private String userId;
|
||||
@ApiModelProperty(example = "충전구분", name = "충전구분", dataType = "String")
|
||||
private String chrgDiv;
|
||||
@ApiModelProperty(example = "충전시작일", name = "충전시작일", dataType = "String")
|
||||
private String strtYm;
|
||||
@ApiModelProperty(example = "충전종료일", name = "충전종료일", dataType = "String")
|
||||
private String endYm;
|
||||
@ApiModelProperty(example = "충전금액", name = "충전금액", dataType = "String")
|
||||
private String chrgAmt;
|
||||
@ApiModelProperty(example = "사용여부", name = "사용여부", dataType = "String")
|
||||
private String useYn;
|
||||
@ApiModelProperty(example = "사업자명", name = "사업자명", dataType = "String")
|
||||
private String bizrNo;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class InsertChrgResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
private InsertChrgResDto data;
|
||||
|
||||
public InsertChrgResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public InsertChrgResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public InsertChrgResDto(ApiResponseCode returnStr, InsertChrgResDto data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class NotiHistDto implements Serializable {
|
||||
private String sndYmd; //알림일자
|
||||
private String userSeq; //유저seq
|
||||
private String notiDiv; //알림구분
|
||||
private String notiSeq; //알림seq
|
||||
private String notiMsg; //알림 메세지
|
||||
private String webReqId;//알림전송id
|
||||
private String regDt; //알림등록일자
|
||||
|
||||
/** 부모 유저 일련번호 */
|
||||
private String prntsUserSeq;
|
||||
|
||||
/** 등록 일 시 */
|
||||
private String regId;
|
||||
|
||||
/** 핸드폰 번호 */
|
||||
private String hpNo;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class TargetSubsInfoDto implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "청약ID", name = "청약ID", dataType = "String")
|
||||
private String subsId;
|
||||
@ApiModelProperty(example = "청약한 관리자ID userSeq", name = "청약한 관리자ID userSeq", dataType = "String")
|
||||
private String userSeq;
|
||||
@ApiModelProperty(example = "개통일시", name = "개통일시", dataType = "String")
|
||||
private String opnDt;
|
||||
@ApiModelProperty(example = "한도생성월", name = "한도생성월", dataType = "String")
|
||||
private String limitYm;
|
||||
@ApiModelProperty(example = "이월처리기간(월)", name = "이월처리기간(월)", dataType = "String")
|
||||
private String cFwdTermMonth;
|
||||
@ApiModelProperty(example = "청약상태", name = "청약상태", dataType = "String")
|
||||
private String subsSttusCd;
|
||||
@ApiModelProperty(example = "사용자 전화번호", name = "사용자 전화번호", dataType = "String")
|
||||
private String hpNo;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class UpdateChrgReqDto implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
|
||||
private String custNm;
|
||||
@ApiModelProperty(example = "고객명", name = "고객명", dataType = "String")
|
||||
private String userId;
|
||||
@ApiModelProperty(example = "충전구분", name = "충전구분", dataType = "String")
|
||||
private String chrdDiv;
|
||||
@ApiModelProperty(example = "충전시작일", name = "충전시작일", dataType = "String")
|
||||
private String strtYm;
|
||||
@ApiModelProperty(example = "충전종료일", name = "충전종료일", dataType = "String")
|
||||
private String endYm;
|
||||
@ApiModelProperty(example = "충전금액", name = "충전금액", dataType = "String")
|
||||
private String chrgAmt;
|
||||
@ApiModelProperty(example = "사용여부", name = "사용여부", dataType = "String")
|
||||
private String useYn;
|
||||
@ApiModelProperty(example = "사업자명", name = "사업자명", dataType = "String")
|
||||
private String bizrNo;
|
||||
@ApiModelProperty(example = "충전seq", name = "충전seq", dataType = "String")
|
||||
private String chrgSeq;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class UpdateChrgResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
private Object data;
|
||||
|
||||
public UpdateChrgResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public UpdateChrgResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public UpdateChrgResDto(ApiResponseCode returnStr, Object data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class UserListReqDto implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "검색어", name = "검색어", dataType = "String")
|
||||
private String searchText1;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class UserListRes {
|
||||
|
||||
List<UserinInfo> list;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class UserListResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
// 데이터.
|
||||
private UserListRes data;
|
||||
|
||||
public UserListResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public UserListResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public UserListResDto(ApiResponseCode returnStr, UserListRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class UserLmtList implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "리스트 번호", name = "리스트 번호", dataType = "Integer")
|
||||
private Integer no;
|
||||
@ApiModelProperty(example = "이용자일련번호", name = "이용자일련번호", dataType = "String")
|
||||
private String userSeq;
|
||||
@ApiModelProperty(example = "한도년월", name = "한도년월", dataType = "String")
|
||||
private String lmtYm;
|
||||
@ApiModelProperty(example = "요금제확보금액", name = "요금제확보금액", dataType = "String")
|
||||
private String fxlmtamt;
|
||||
@ApiModelProperty(example = "이월금액", name = "이월금액", dataType = "String")
|
||||
private String cfwdAmt;
|
||||
@ApiModelProperty(example = "총사용금액", name = "총사용금액", dataType = "String")
|
||||
private String totalamt;
|
||||
@ApiModelProperty(example = "당월사용금액", name = "당월사용금액", dataType = "String")
|
||||
private String ymuseamt;
|
||||
@ApiModelProperty(example = "잔액", name = "잔액", dataType = "String")
|
||||
private String ymblnc;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class UserLmtListExcelReqDto implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "조회 시작 날짜", name = "조회 시작 날짜", notes = "YYYYMMDD", dataType = "String")
|
||||
private String startDt;
|
||||
@ApiModelProperty(example = "조회 종료 날짜", name = "조회 종료 날짜", notes = "YYYYMMDD", dataType = "String")
|
||||
private String endDt;
|
||||
@ApiModelProperty(example = "청약 상태", name = "청약 상태", notes = "항목 : 전체(Default)/사용(01)/미납중지(02)/일시중지(03)/해지(04)", dataType = "String")
|
||||
private String searchType1;
|
||||
@ApiModelProperty(example = "유치채널", name = "유치채널", notes = "항목 : 전체(Default)/고객 셀프가입(01)/대리점(02)/고객센터(03)/직접영업(04)", dataType = "String")
|
||||
private String searchType2;
|
||||
@ApiModelProperty(example = "상세검색", name = "상세검색", notes = "항목 : 고객사명(01)/가입번호(02)/서비스ID(03)", dataType = "String")
|
||||
private String searchType3;
|
||||
@ApiModelProperty(example = "검색어 (입력항목)", name = "검색어 (입력항목)", dataType = "String")
|
||||
private String searchText1;
|
||||
@ApiModelProperty(example = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "String")
|
||||
private int pagePerRows;
|
||||
@ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "String")
|
||||
private int page;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
|
||||
public class UserLmtListExcelResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
private UserLmtListRes data;
|
||||
|
||||
public UserLmtListExcelResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public UserLmtListExcelResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public UserLmtListExcelResDto(ApiResponseCode returnStr, UserLmtListRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class UserLmtListReqDto implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "조회 시작 날짜", name = "조회 시작 날짜", notes = "YYYYMMDD", dataType = "String")
|
||||
private String startDt;
|
||||
@ApiModelProperty(example = "조회 종료 날짜", name = "조회 종료 날짜", notes = "YYYYMMDD", dataType = "String")
|
||||
private String endDt;
|
||||
@ApiModelProperty(example = "청약 상태", name = "청약 상태", notes = "항목 : 전체(Default)/사용(01)/미납중지(02)/일시중지(03)/해지(04)", dataType = "String")
|
||||
private String searchType1;
|
||||
@ApiModelProperty(example = "유치채널", name = "유치채널", notes = "항목 : 전체(Default)/고객 셀프가입(01)/대리점(02)/고객센터(03)/직접영업(04)", dataType = "String")
|
||||
private String searchType2;
|
||||
@ApiModelProperty(example = "상세검색", name = "상세검색", notes = "항목 : 고객사명(01)/가입번호(02)/서비스ID(03)", dataType = "String")
|
||||
private String searchType3;
|
||||
@ApiModelProperty(example = "검색어 (입력항목)", name = "검색어 (입력항목)", dataType = "String")
|
||||
private String searchText1;
|
||||
@ApiModelProperty(example = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "String")
|
||||
private int pagePerRows;
|
||||
@ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "String")
|
||||
private int page;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import kr.co.uplus.ez.common.data.Paging;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class UserLmtListRes implements Serializable{
|
||||
|
||||
private List<UserLmtList> list;
|
||||
private Paging paging;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class UserLmtListResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
private UserLmtListRes data;
|
||||
|
||||
public UserLmtListResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public UserLmtListResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public UserLmtListResDto(ApiResponseCode returnStr, UserLmtListRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
}
|
||||
23
src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserinInfo.java
Normal file
23
src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserinInfo.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class UserinInfo implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "고객명", name = "고객명", dataType = "String")
|
||||
private String userId;
|
||||
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
|
||||
private String custNm;
|
||||
@ApiModelProperty(example = "유저seq", name = "유저seq", dataType = "String")
|
||||
private String userSeq;
|
||||
@ApiModelProperty(example = "이용자 상태 코드", name = "이용자 상태 코드", dataType = "String")
|
||||
private String userSttusCd;
|
||||
@ApiModelProperty(example = "이용자 유형 코드", name = "이용자 유형 코드", dataType = "String")
|
||||
private String userTpCd;
|
||||
|
||||
}
|
||||
162
src/main/java/kr/co/uplus/ez/api/custMgt/dto/WebMsgCliDto.java
Normal file
162
src/main/java/kr/co/uplus/ez/api/custMgt/dto/WebMsgCliDto.java
Normal file
@@ -0,0 +1,162 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class WebMsgCliDto implements Serializable{
|
||||
|
||||
/** 테이블명 */
|
||||
private String tableName;
|
||||
|
||||
/** DB insert시 App에서 생성해서 만듦. format example : datetime + bsiness name + random string */
|
||||
private String clientKey;
|
||||
|
||||
/** 문자 : SMS, LMS, MMS, 글로벌SMS : SMS_GLOBAL, RCS : RCS, 카카오톡 : KKO_NOTI (알림톡), KKO_FRIEND (친구톡) */
|
||||
private String reqProduct;
|
||||
|
||||
/** 메시지 유형 ( 기본값 normal ), real : 실시간 보장 중요한 메시지, normal : 일반, ad : 마케팅, 광고 */
|
||||
private String trafficType;
|
||||
|
||||
/** req : 발송 대기, sent : 발송완료, complete : 결과 수신 완료, pre-send : select 완료, pre-image : 이미지 등록 작업 중 */
|
||||
private String msgStatus;
|
||||
|
||||
/** 고객 요청 시간, 미래시간일 경우 예약 */
|
||||
private String reqDate;
|
||||
|
||||
/** 메시지허브에서 사용하는 템플릿 키 */
|
||||
private String templateCode;
|
||||
|
||||
/** 동보 발송 묶음 단위, Agent에서 발송 시 multi_key가 동일한 메시지는 묶어서 발송하여 발송 효율을 높입니다. */
|
||||
private String sendGroupKey;
|
||||
|
||||
/** 문자, RCS 일 때 필수 입력, 발신번호(*특수부가사업자의 경우 필수 아님) */
|
||||
private String callbackNumber;
|
||||
|
||||
/** KISA 최초발신사업자 구분 코드, 직접고객은 config에 있는 값으로 사용, 재판매고객은 건별 입력으로 사용 */
|
||||
private String msgBizKey;
|
||||
|
||||
/** 태그, 이벤트, 캠페인 등을 분류하기 위한 용도로 사용 */
|
||||
private String tag;
|
||||
|
||||
/** 부서코드, 부서별 빌링이 필요한 경우만 사용 */
|
||||
private String deptCode;
|
||||
|
||||
/** 메시지 내용 (text) */
|
||||
private String msg;
|
||||
|
||||
/** 수신번호 */
|
||||
private String phone;
|
||||
|
||||
/** 가변 데이터 */
|
||||
private String mergeData;
|
||||
|
||||
/** 제목, 대상상품 : LMS/MMS/RCS/PUSH */
|
||||
private String title;
|
||||
|
||||
/** MMS 파일 절대 경로, ","로 구분되어 N개를 입력할 수 있다. */
|
||||
private String fileList;
|
||||
|
||||
/** 상품, SMS/LMS/MMS 만 가능 */
|
||||
private String fbProduct;
|
||||
|
||||
/** fallback 제목 */
|
||||
private String fbTitle;
|
||||
|
||||
/** fallback 메시지 */
|
||||
private String fbMsg;
|
||||
|
||||
/** 파일 아이디 단일파일 제공, fallback MMS는 이미지 사전 등록 방식만 제공함 */
|
||||
private String fbFileId;
|
||||
|
||||
/** 메시지베이스 ID */
|
||||
private String rcsMsgbaseId;
|
||||
|
||||
/** RCS 메시지 유형, info : 정보성 메시지, ad : 광고성 메시지 */
|
||||
private String rcsHeader;
|
||||
|
||||
/** 무료수신거부 번호 (header의 값이 광고성일 때 footer 값을 포함하지 않고 발송하면 실패 처리) */
|
||||
private String rcsFooter;
|
||||
|
||||
/** 사용자의 복사/공유 허용여부, 기본값 Y, Y : 허용, N : 미허용 */
|
||||
private String rcsCopyAllowed;
|
||||
|
||||
/** 발송 타임아웃 옵션 : 옵션의 시간 만큼 발송을 시도 또는 결과 대기함, 1 : 72시간, 2 :30초 */
|
||||
private String rcsExpiryOption;
|
||||
|
||||
/*
|
||||
* 대행사 ID, 메시지허브와 직접 계약한 고객은 사용하지 않음,
|
||||
* 재판매 사업자의 경우 RCS 브랜드 사업자와 RCS 발송 계약을 맺은 1차 대행사의 id를 넣어야 함
|
||||
*/
|
||||
private String rcsAgencyId;
|
||||
|
||||
/** RCS 버튼 Object array */
|
||||
private String rcsButton;
|
||||
|
||||
/** 카카오톡 발신 프로필키 */
|
||||
private String kakaoSenderKey;
|
||||
|
||||
/** 알림톡, 친구톡 템플릿 키 */
|
||||
private String kakaoTemplateKey;
|
||||
|
||||
/** 카카오 버튼 Object array(LMKakaoButton) */
|
||||
private String kakaoButton;
|
||||
|
||||
/** 친구톡 와이드 이미지 여부(Y/N) */
|
||||
private String kakaoImageWideYn;
|
||||
|
||||
/** 친구톡 이미지(이미지 URL) */
|
||||
private String kakaoImageUrl;
|
||||
|
||||
/** 친구톡 이미지(이미지 링크) */
|
||||
private String kakaoImageLink;
|
||||
|
||||
/** kakao 파일 아이디 */
|
||||
private String kakaoFileId;
|
||||
|
||||
/** 광고 표기 여부(Y/N) */
|
||||
private String kakaoAdFlag;
|
||||
|
||||
/** 앱 아이디 */
|
||||
private String pushAppId;
|
||||
|
||||
/** PUSH 공급자, FCM : 구글, APNS : 애플 */
|
||||
private String pushProvider;
|
||||
|
||||
/** 앱 사용자 시 사용되는 아이디 */
|
||||
private String pushAppUserId;
|
||||
|
||||
/** 발송 시간, Agent가 메시지허브로 발송 한 시간 */
|
||||
private String sentDate;
|
||||
|
||||
/** 성공한 상품 종류, SMS, LMS, MMS, RCS_XXX, KKO_XXX, PUSH */
|
||||
private String doneProduct;
|
||||
|
||||
/** 단말 전달 시간 or 실패 최종 시간 */
|
||||
private String doneDate;
|
||||
|
||||
/** 처리 결과 코드, 10000 : 성공 */
|
||||
private String doneCode;
|
||||
|
||||
/** 처리 결과 상세 */
|
||||
private String doneCodeDesc;
|
||||
|
||||
/** 대체 발송 처리 상세. json array */
|
||||
private String doneFbDetail;
|
||||
|
||||
/** 이통사 정보, 발송이 성공이고 채널이 문자, RCS 인 경우만 업데이트 됨 */
|
||||
private String doneTelco;
|
||||
|
||||
/** 웹요청ID */
|
||||
private String webReqId;
|
||||
|
||||
/* 승인오더ID */
|
||||
private String orderId;
|
||||
|
||||
private String tmpltSbst;
|
||||
private String tmpltTpCd;
|
||||
private String etcInfo;
|
||||
private String adMsg;
|
||||
}
|
||||
@@ -101,6 +101,7 @@ public class HomeMgtService {
|
||||
homeMgtMapper.insertNotice(insertNoticeReqDto);
|
||||
NT_NO = homeMgtMapper.insertNoticeNtNo();
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
return new InsertNoticeResDto(ApiResponseCode.CM_DB_QUERY_ERR);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,12 @@ public class InsertNoticeReqDto implements Serializable {
|
||||
@ApiModelProperty(example = "사용 여부", name = "사용 여부", dataType = "String")
|
||||
private String useYn;
|
||||
|
||||
@ApiModelProperty(example = "시작일자", name = "시작일자", dataType = "Int")
|
||||
private String ntStrtDt;
|
||||
|
||||
@ApiModelProperty(example = "종료일자", name = "종료일자", dataType = "Int")
|
||||
private String ntEndDt;
|
||||
|
||||
@ApiModelProperty(example = "등록 ID", name = "등록 ID", dataType = "String")
|
||||
private String regId;
|
||||
|
||||
|
||||
@@ -41,6 +41,12 @@ public class NoticeDto implements Serializable {
|
||||
@ApiModelProperty(example = "조회수", name = "조회수", dataType = "Int")
|
||||
private String retvCnt;
|
||||
|
||||
@ApiModelProperty(example = "시작일자", name = "시작일자", dataType = "Int")
|
||||
private String ntStrtDt;
|
||||
|
||||
@ApiModelProperty(example = "종료일자", name = "종료일자", dataType = "Int")
|
||||
private String ntEndDt;
|
||||
|
||||
@ApiModelProperty(example = "등록 ID", name = "등록 ID", dataType = "String")
|
||||
private String regId;
|
||||
|
||||
|
||||
@@ -32,6 +32,12 @@ public class NoticeListReqDto implements Serializable {
|
||||
@ApiModelProperty(example = "사용 여부", name = "사용 여부", dataType = "String")
|
||||
private String useYn;
|
||||
|
||||
@ApiModelProperty(example = "시작일자", name = "시작일자", dataType = "Int")
|
||||
private String ntStrtDt;
|
||||
|
||||
@ApiModelProperty(example = "종료일자", name = "종료일자", dataType = "Int")
|
||||
private String ntEndDt;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "페이지당 조회할 목록 수",notes = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "int")
|
||||
private int pagePerRows;
|
||||
|
||||
@@ -33,6 +33,12 @@ public class UpdateNoticeReqDto implements Serializable {
|
||||
@ApiModelProperty(example = "변경 ID", name = "변경 ID", dataType = "String")
|
||||
private String chgId;
|
||||
|
||||
@ApiModelProperty(example = "시작일자", name = "시작일자", dataType = "Int")
|
||||
private String ntStrtDt;
|
||||
|
||||
@ApiModelProperty(example = "종료일자", name = "종료일자", dataType = "Int")
|
||||
private String ntEndDt;
|
||||
|
||||
@ApiModelProperty(example = "업로드된 파일", name = "업로드된 파일", dataType = "String")
|
||||
private String legacyFiles;
|
||||
|
||||
|
||||
477
src/main/java/kr/co/uplus/ez/common/utils/CommonUtils.java
Normal file
477
src/main/java/kr/co/uplus/ez/common/utils/CommonUtils.java
Normal file
@@ -0,0 +1,477 @@
|
||||
package kr.co.uplus.ez.common.utils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.lang.reflect.Array;
|
||||
import java.text.DateFormat;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.apache.commons.lang3.RandomStringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.json.simple.JSONArray;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
public class CommonUtils {
|
||||
/*============================ 문자열관련 Util ============================*/
|
||||
/**
|
||||
* 문자열이 null일 경우 기본값으로 반환하는 메소드
|
||||
*
|
||||
* @param String string : 검사할 문자열
|
||||
* @param String defaultValue : 기본값
|
||||
* @return String : 반환값
|
||||
* @throws Exception : 반환 중 예외 발생시
|
||||
*/
|
||||
public static String nvl(String string, String defaultValue) throws Exception{
|
||||
return getString(string, defaultValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* 문자열이 널일경우 ""으로 반환하는 메소드
|
||||
*
|
||||
* @param String string : 검사할 문자열
|
||||
* @return String : 결과값
|
||||
*/
|
||||
public static String nvl(String string){
|
||||
return getString(string);
|
||||
}
|
||||
|
||||
/**
|
||||
* Object를 받아 문자열 값으로 리턴함.
|
||||
* @param obj
|
||||
* @return
|
||||
*/
|
||||
public static String getString(Object obj) {
|
||||
return getString(obj,"");
|
||||
}
|
||||
|
||||
/**
|
||||
* Object를 받아 문자열 값으로 리턴함, 없을경우 DefaultValue 리턴.
|
||||
* @param obj
|
||||
* @param defaultValue
|
||||
* @return
|
||||
*/
|
||||
public static String getString(Object obj, String defaultValue) {
|
||||
String value = "" + obj;
|
||||
try {
|
||||
if(obj == null) {
|
||||
value = defaultValue;
|
||||
} else {
|
||||
if(value.equals("null") || value.length() == 0) {
|
||||
value = defaultValue;
|
||||
}
|
||||
}
|
||||
} catch(Exception e){
|
||||
value = defaultValue;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 기능 : 에러대신 Zero String을 리턴하는 substring 함수 <BR>
|
||||
* (예) getSubstring("1234",4,2) --> "" <BR>
|
||||
* @param String str string source
|
||||
* @param int start substring 시작위치
|
||||
* @param int length substring 길이
|
||||
* @return String
|
||||
*/
|
||||
public static String getSubstring(String str, int start, int len){
|
||||
String result = null;
|
||||
int slen = 0;
|
||||
|
||||
try{
|
||||
str = nvl(str);
|
||||
slen = str.length();
|
||||
|
||||
if((slen < 1) || (start < 0) || (len < 1)){
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
if((slen - 1) < start){
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
if(slen >= (start + len)){
|
||||
slen = start+len;
|
||||
}
|
||||
|
||||
result = str.substring(start, slen);
|
||||
}
|
||||
catch(Exception e){
|
||||
result = "";
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 숫자나 문자열ㅇ르 Int형 문자로 변환
|
||||
* @param object
|
||||
* @return
|
||||
*/
|
||||
public static String getIntString(Object object) {
|
||||
String returnString = "";
|
||||
if(object==null) return returnString;
|
||||
returnString = String.valueOf(object);
|
||||
if("".equals(returnString)) return returnString;
|
||||
try {
|
||||
Double doubleValue = Double.valueOf(returnString);
|
||||
DecimalFormat df = new DecimalFormat( "#,###" );
|
||||
return df.format(doubleValue);
|
||||
} catch(Exception e) {
|
||||
returnString = String.valueOf(object);
|
||||
}
|
||||
return returnString;
|
||||
}
|
||||
|
||||
/**
|
||||
* 숫자나 문자열ㅇ르 Int형 문자로 변환
|
||||
* @param object
|
||||
* @return
|
||||
*/
|
||||
public static String getIntString(Object object, String str) {
|
||||
String returnString = "";
|
||||
if(object==null) return str;
|
||||
returnString = String.valueOf(object);
|
||||
if(returnString == "") return returnString;
|
||||
try {
|
||||
Double doubleValue = Double.valueOf(returnString);
|
||||
DecimalFormat df = new DecimalFormat( "#,###" );
|
||||
return df.format(doubleValue);
|
||||
} catch(Exception e) {
|
||||
returnString = String.valueOf(object);
|
||||
}
|
||||
return returnString;
|
||||
}
|
||||
|
||||
/**
|
||||
* 숫자나 문자열ㅇ르 Int형 문자로 변환 (소숫점 2자리)
|
||||
* @param object
|
||||
* @return
|
||||
*/
|
||||
public static String getDoubleString(Object object) {
|
||||
String returnString = "";
|
||||
if(object==null) return returnString;
|
||||
returnString = String.valueOf(object);
|
||||
if(returnString == "") return returnString;
|
||||
try {
|
||||
Double doubleValue = Double.valueOf(returnString);
|
||||
DecimalFormat df = new DecimalFormat( "#,###.##" );
|
||||
return df.format(doubleValue);
|
||||
} catch(Exception e) {
|
||||
returnString = String.valueOf(object);
|
||||
}
|
||||
return returnString;
|
||||
}
|
||||
|
||||
/**
|
||||
* 숫자나 문자열ㅇ르 Int형 문자로 변환 (소숫점 2자리)
|
||||
* @param object
|
||||
* @return
|
||||
*/
|
||||
public static String getDoubleString(Object object, String str) {
|
||||
String returnString = "";
|
||||
if(object==null) return str;
|
||||
returnString = String.valueOf(object);
|
||||
if(returnString == "") return returnString;
|
||||
try {
|
||||
Double doubleValue = Double.valueOf(returnString);
|
||||
DecimalFormat df = new DecimalFormat( "#,###.##" );
|
||||
return df.format(doubleValue);
|
||||
} catch(Exception e) {
|
||||
//
|
||||
returnString = String.valueOf(object);
|
||||
}
|
||||
return returnString;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* String UnEscape 처리
|
||||
*
|
||||
* @param src
|
||||
* @return
|
||||
*/
|
||||
public static String unescape(String src) {
|
||||
StringBuffer tmp = new StringBuffer();
|
||||
tmp.ensureCapacity(src.length());
|
||||
int lastPos = 0, pos = 0;
|
||||
char ch;
|
||||
while (lastPos < src.length()) {
|
||||
pos = src.indexOf("%", lastPos);
|
||||
if (pos == lastPos) {
|
||||
if (src.charAt(pos + 1) == 'u') {
|
||||
ch = (char) Integer.parseInt(src
|
||||
.substring(pos + 2, pos + 6), 16);
|
||||
tmp.append(ch);
|
||||
lastPos = pos + 6;
|
||||
} else {
|
||||
ch = (char) Integer.parseInt(src
|
||||
.substring(pos + 1, pos + 3), 16);
|
||||
tmp.append(ch);
|
||||
lastPos = pos + 3;
|
||||
}
|
||||
} else {
|
||||
if (pos == -1) {
|
||||
tmp.append(src.substring(lastPos));
|
||||
lastPos = src.length();
|
||||
} else {
|
||||
tmp.append(src.substring(lastPos, pos));
|
||||
lastPos = pos;
|
||||
}
|
||||
}
|
||||
}
|
||||
return tmp.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Object -> int
|
||||
*/
|
||||
public static int getInt (Object quan) throws Exception{
|
||||
String strValue = getString(quan);
|
||||
int value = 0;
|
||||
try{
|
||||
value = Integer.valueOf(strValue);
|
||||
}catch(Exception e){
|
||||
}
|
||||
return value;
|
||||
}
|
||||
/*============================ 문자열관련 Util 끝 ============================*/
|
||||
|
||||
/**
|
||||
* 공통ID 생성(템플릿ID, 프로젝트ID, 사용자ID 등등)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getCommonId(String prefix, int len) {
|
||||
// 공통 ID 접미사
|
||||
String suffix = randomGeneration(len);
|
||||
|
||||
// 공통 ID
|
||||
String commonId = prefix + suffix;
|
||||
|
||||
return commonId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 난수 생성(매개변수로 난수길이 세팅)
|
||||
*
|
||||
* @param len
|
||||
* @return
|
||||
*/
|
||||
public static String randomGeneration(int len) {
|
||||
String randomStr = RandomStringUtils.randomAlphanumeric(len);
|
||||
return randomStr;
|
||||
}
|
||||
|
||||
/**
|
||||
* 빈 object인지 확인
|
||||
* @param obj
|
||||
* @return
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public static Boolean isEmptyObject(Object obj) {
|
||||
if (obj instanceof String) return obj == null || "".equals(obj.toString().trim());
|
||||
else if (obj instanceof List) return obj == null || ((List) obj).isEmpty();
|
||||
else if (obj instanceof Map) return obj == null || ((Map) obj).isEmpty();
|
||||
else if (obj instanceof Object[]) return obj == null || Array.getLength(obj) == 0;
|
||||
else return obj == null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 비어있지 않은 object인지 확인
|
||||
* @param obj
|
||||
* @return
|
||||
*/
|
||||
public static Boolean isNotEmptyObject(Object obj) {
|
||||
return !isEmptyObject(obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* map에 key값에 매핑되는 value가 있는지 확인(빈값 true)
|
||||
* @param tMap
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
public static Boolean isEmptyValue(Map<String, Object> tMap, String key) {
|
||||
if(!tMap.containsKey(key) || isEmptyObject(tMap.get(key))) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* map에 key값에 매핑되는 value가 없으면 빈값 있으면 해당값을 String으로 return
|
||||
* @param tMap
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
public static String getStrValue(Map<String, Object> tMap, String key) {
|
||||
if(isEmptyValue(tMap, key)) return StringUtils.EMPTY;
|
||||
else return getString(tMap.get(key));
|
||||
}
|
||||
|
||||
/**
|
||||
* 시분초 + 쓰는곳 해서 ID 만들어주는것
|
||||
* @param targetStr - 3글자 이상 하면 varchar(18) 이상 됨
|
||||
* @return
|
||||
*/
|
||||
public static String generationSringToHex(String targetStr) {
|
||||
|
||||
String now = new SimpleDateFormat("HHmmss").format(System.currentTimeMillis()) + targetStr;
|
||||
String result = "";
|
||||
for (int i = 0; i < now.length(); i++) {
|
||||
result += String.format("%02X", (int) now.charAt(i));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 로그인 아이디 마스킹 처리
|
||||
*/
|
||||
public static String setMaskingLoginId(String loginId){
|
||||
String maskingLoginId = loginId;
|
||||
int length = maskingLoginId.length();
|
||||
length = length-2;
|
||||
maskingLoginId = maskingLoginId.replaceAll("(?=.{"+length+"}).", "*"); //<2F><><EFBFBD>ڸ<EFBFBD> 3<><33> <20><><EFBFBD><EFBFBD>ŷ
|
||||
return maskingLoginId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 이름 마스킹 처리
|
||||
*/
|
||||
public static String setMaskingUserNm(String userNm){
|
||||
String firstName = "";
|
||||
String midName = "";
|
||||
String lastName = "";
|
||||
if(!isAlpha(userNm) && !isKorean(userNm)) {
|
||||
firstName = userNm;
|
||||
} else {
|
||||
if(!isAlpha(userNm)) {
|
||||
firstName = userNm.substring(0, 1);
|
||||
midName = userNm.substring(1, 2);
|
||||
lastName = userNm.substring(2, userNm.length());
|
||||
} else {
|
||||
firstName = userNm.substring(0, 2);
|
||||
midName = userNm.substring(2, userNm.length()-2);
|
||||
lastName = userNm.substring(userNm.length()-2, userNm.length());
|
||||
}
|
||||
|
||||
}
|
||||
String masking = "";
|
||||
for(int i = 0; i < midName.length(); i++) {
|
||||
masking += "*";
|
||||
}
|
||||
String rtnUserNm = firstName + masking + lastName;
|
||||
return rtnUserNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* 영어이름인지 확인
|
||||
*/
|
||||
public static boolean isAlpha(String userNm){
|
||||
boolean isAlpha = Pattern.matches("^[a-zA-Z]*$", userNm.subSequence(0, 1));
|
||||
return isAlpha;
|
||||
}
|
||||
|
||||
/**
|
||||
* 한글이름인지 확인
|
||||
*/
|
||||
public static boolean isKorean(String userNm){
|
||||
boolean isKorean = Pattern.matches("^[<5B><>-<2D>R]*$", userNm.subSequence(0, 1));
|
||||
return isKorean;
|
||||
}
|
||||
|
||||
/**
|
||||
* convert List to JSONArray
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
public static JSONArray convertListToJsonArray(List<Map<String, Object>> list) {
|
||||
JSONArray jsonArr = new JSONArray();
|
||||
for(Map<String, Object> map : list) {
|
||||
jsonArr.add(convertMapToJson(map));
|
||||
}
|
||||
return jsonArr;
|
||||
}
|
||||
|
||||
/**
|
||||
* convert Map to JSONObject
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
public static JSONObject convertMapToJson(Map<String, Object> map) {
|
||||
JSONObject jsonObj = new JSONObject();
|
||||
for(Map.Entry<String, Object> entry : map.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
Object value = entry.getValue();
|
||||
jsonObj.put(key, value);
|
||||
}
|
||||
return jsonObj;
|
||||
}
|
||||
|
||||
/**
|
||||
* 세션 생성
|
||||
* @param req
|
||||
* @param attrib
|
||||
* @param ser
|
||||
*/
|
||||
public static void addToSession(HttpServletRequest req, String attrib, Serializable ser) {
|
||||
HttpSession sess = req.getSession(true);
|
||||
sess.setAttribute(attrib, sess);
|
||||
}
|
||||
|
||||
|
||||
// 핸드폰번호 유효성 체크
|
||||
public static boolean isHpNumber(String value) {
|
||||
String regExp = "^01(?:0|1|[6-9])[.-]?(\\d{3}|\\d{4})[.-]?(\\d{4})$";
|
||||
return value.matches(regExp);
|
||||
}
|
||||
|
||||
// 중복제거 메소드, key는 제거할 맵 대상
|
||||
public static List<Map<String, Object>> distinctArray(List<Map<String, Object>> target, Object key){
|
||||
if(target != null){
|
||||
target = target.stream().filter(distinctByKey(o-> o.get(key))).collect(Collectors.toList());
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
// 중복 제거를 위한 함수
|
||||
public static <T> Predicate<T> distinctByKey(Function<? super T,Object> keyExtractor) {
|
||||
Map<Object,Boolean> seen = new ConcurrentHashMap<>();
|
||||
return t -> seen.putIfAbsent(keyExtractor.apply(t), Boolean.TRUE) == null;
|
||||
}
|
||||
|
||||
// 검색 조건 날짜 배열에 넣어서 리턴해주는 함수
|
||||
public static String[] dateArrReturn(String startDate, String endDate) throws Exception{
|
||||
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
Date strDate = dateFormat.parse(startDate);
|
||||
Date edDate = dateFormat.parse(endDate);
|
||||
|
||||
long diffSec = (edDate.getTime() - strDate.getTime()) / 1000;
|
||||
int diffDays = (int) diffSec / (24 * 60 * 60);
|
||||
|
||||
String[] dateArr = new String[diffDays + 1];
|
||||
|
||||
for(int i=0; i<=diffDays; i++) {
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTime(strDate);
|
||||
cal.add(Calendar.DATE, i);
|
||||
String dateStr = dateFormat.format(cal.getTime());
|
||||
dateArr[i] = dateStr;
|
||||
}
|
||||
|
||||
return dateArr;
|
||||
}
|
||||
|
||||
}
|
||||
159
src/main/java/kr/co/uplus/ez/common/utils/DateUtil.java
Normal file
159
src/main/java/kr/co/uplus/ez/common/utils/DateUtil.java
Normal file
@@ -0,0 +1,159 @@
|
||||
package kr.co.uplus.ez.common.utils;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
public class DateUtil {
|
||||
|
||||
/**
|
||||
* 날짜 형식을 받아서 오늘 날짜를 해당 형식으로 반환
|
||||
*
|
||||
* @param format
|
||||
* @return
|
||||
*/
|
||||
public static String getCurrentDate(String format) {
|
||||
Date date = Calendar.getInstance().getTime();
|
||||
DateFormat dateFormat = new SimpleDateFormat(format);
|
||||
return dateFormat.format(date);
|
||||
}
|
||||
|
||||
/**
|
||||
* 현재날짜의 분을 첫째자리 반올림하여 리턴
|
||||
* @return
|
||||
*/
|
||||
public static String getCurrentRoundMin() {
|
||||
int min = LocalDateTime.now().getMinute();
|
||||
min = (int) (Math.round((double)min/10)*10);
|
||||
return StringUtils.leftPad(String.valueOf(min), 2, '0');
|
||||
}
|
||||
|
||||
/**
|
||||
* 현재 시스템 날짜를 "yyyy-MM-dd" 형식으로 String 형으로 반환
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public static String getCurrentDate() {
|
||||
return getCustomDay("", 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 현재 시스템 시간을 "HHmmss" 형식으로 String 형으로 반환
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public static String getCurrentTime() {
|
||||
Timestamp wdate = null;
|
||||
String sDate = null;
|
||||
String temp = null;
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
long currentTimeMillis = System.currentTimeMillis();
|
||||
|
||||
wdate = new Timestamp(currentTimeMillis);
|
||||
sDate = wdate.toString();
|
||||
|
||||
stringBuffer.append(sDate.substring(11, 13));
|
||||
stringBuffer.append(sDate.substring(14, 16));
|
||||
stringBuffer.append(sDate.substring(17, 19));
|
||||
|
||||
temp = stringBuffer.toString();
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
/**
|
||||
* 현재 시스템 날짜 시간을 "yyyy-MM-dd HH24:mm:ss" 형식으로 반환
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public static String getCurrentDateTime() {
|
||||
Timestamp timestamp = null;
|
||||
String timestampString = null;
|
||||
long currentTimeMillis = 0;
|
||||
|
||||
currentTimeMillis = System.currentTimeMillis();
|
||||
|
||||
timestamp = new Timestamp(currentTimeMillis);
|
||||
|
||||
timestampString = timestamp.toString();
|
||||
timestampString = timestampString.substring(0, 19);
|
||||
|
||||
return timestampString;
|
||||
}
|
||||
|
||||
/**
|
||||
* 현재 일자 기준으로 이전 일자를 찾아 리턴한다.
|
||||
*
|
||||
* @param int
|
||||
* @return String
|
||||
*/
|
||||
public static String getCustomDay(String mode, int addDay) {
|
||||
Calendar dt = Calendar.getInstance();
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
if (addDay == 0) {
|
||||
return df.format(dt.getTime());
|
||||
} else {
|
||||
if (mode.equals("MONTH")) {
|
||||
dt.add(Calendar.MONTH, addDay);
|
||||
|
||||
return df.format(dt.getTime());
|
||||
} else if (mode.equals("YEAR")) {
|
||||
dt.add(Calendar.YEAR, addDay);
|
||||
|
||||
return df.format(dt.getTime());
|
||||
} else {
|
||||
dt.add(Calendar.DATE, addDay);
|
||||
|
||||
return df.format(dt.getTime());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 특일 일자 기준으로 말일을 확인
|
||||
*
|
||||
* @param String
|
||||
* @return String
|
||||
**/
|
||||
public static String getCustomLastDay(String CallDay) {
|
||||
int Year = Integer.valueOf(CallDay.substring(0, 4));
|
||||
int Month = Integer.valueOf(CallDay.substring(5, 7)) - 1;
|
||||
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
calendar.set(Year, Month, 1);
|
||||
|
||||
int DayOfMonth = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
|
||||
|
||||
calendar.set(Year, Month, DayOfMonth);
|
||||
|
||||
return df.format(calendar.getTime());
|
||||
}
|
||||
|
||||
/**
|
||||
* 현재일 기준으로 특정일까지 일수 차이를 리턴
|
||||
* @param targetDate
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static long diffDays(Date targetDate) throws Exception {
|
||||
Calendar getToday = Calendar.getInstance();
|
||||
getToday.setTime(new Date());
|
||||
|
||||
Calendar cmpDate = Calendar.getInstance();
|
||||
cmpDate.setTime(targetDate);
|
||||
|
||||
long diffSec = (cmpDate.getTimeInMillis() - getToday.getTimeInMillis()) / 1000;
|
||||
long diffDays = diffSec / (24*60*60);
|
||||
|
||||
return diffDays;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1143,4 +1143,517 @@
|
||||
WHERE
|
||||
ENTR_NO = #{entrNo}
|
||||
</update>
|
||||
|
||||
<select id="cntChrgList" parameterType="kr.co.uplus.ez.api.custMgt.dto.ChrgListReqDto" resultType="int">
|
||||
SELECT
|
||||
|
||||
COUNT(*) AS TOTALCNT
|
||||
|
||||
FROM hubez_admin.EZ_CHARGE_MNG ecm
|
||||
INNER JOIN hubez_common.EZ_SVC_USER esu ON esu.USER_SEQ = ecm.USER_SEQ
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci ON eci.CUST_SEQ = esu.CUST_SEQ
|
||||
INNER JOIN hubez_common.EZ_SUBS_INFO esi ON esi.USER_SEQ = ecm.USER_SEQ
|
||||
WHERE 1 = 1
|
||||
AND ecm.USE_YN ='Y'
|
||||
AND esi.SUBS_STTUS_CD ='02'
|
||||
AND (#{startDt} BETWEEN ecm.STRT_YM AND ecm.END_YM
|
||||
OR #{endDt} BETWEEN ecm.STRT_YM AND ecm.END_YM
|
||||
OR ecm.STRT_YM BETWEEN #{startDt} AND #{endDt}
|
||||
OR ecm.END_YM BETWEEN #{startDt} AND #{endDt})
|
||||
<if test="searchType1 != null and searchType1 != ''">
|
||||
<if test="searchType1 == '01' and searchText1 != null and searchText1 != ''">
|
||||
AND UPPER(eci.CUST_NM) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
<if test="searchType1 == '02' and searchText1 != null and searchText1 != ''">
|
||||
AND UPPER(eci.BIZRNO) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
<if test="searchType1 == '03' and searchText1 != null and searchText1 != ''">
|
||||
AND UPPER(esu.USER_ID) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
</if>
|
||||
ORDER BY ecm.CHRG_SEQ DESC
|
||||
</select>
|
||||
|
||||
<!-- 충전관리 목록 조회 -->
|
||||
<select id="selectChrgList" parameterType="kr.co.uplus.ez.api.custMgt.dto.ChrgListReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.ChrgList">
|
||||
SELECT
|
||||
@ROWNUM := @ROWNUM + 1 AS NO
|
||||
,A.*
|
||||
FROM (
|
||||
SELECT
|
||||
eci.CUST_NM
|
||||
, esu.USER_ID
|
||||
, ecm.CHRG_DIV
|
||||
, ecm.STRT_YM
|
||||
, ecm.END_YM
|
||||
, ecm.CHRG_AMT
|
||||
, ecm.USE_YN
|
||||
, eci.BIZRNO
|
||||
, ecm.CHRG_SEQ
|
||||
|
||||
FROM hubez_admin.EZ_CHARGE_MNG ecm
|
||||
INNER JOIN hubez_common.EZ_SVC_USER esu ON esu.USER_SEQ = ecm.USER_SEQ
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci ON eci.CUST_SEQ = esu.CUST_SEQ
|
||||
INNER JOIN hubez_common.EZ_SUBS_INFO esi ON esi.USER_SEQ = ecm.USER_SEQ
|
||||
WHERE 1 = 1
|
||||
AND ecm.USE_YN ='Y'
|
||||
AND esi.SUBS_STTUS_CD ='02'
|
||||
AND (#{startDt} BETWEEN ecm.STRT_YM AND ecm.END_YM
|
||||
OR #{endDt} BETWEEN ecm.STRT_YM AND ecm.END_YM
|
||||
OR ecm.STRT_YM BETWEEN #{startDt} AND #{endDt}
|
||||
OR ecm.END_YM BETWEEN #{startDt} AND #{endDt})
|
||||
<if test="searchType1 != null and searchType1 != ''">
|
||||
<if test="searchType1 == '01' and searchText1 != null and searchText1 != ''">
|
||||
AND UPPER(eci.CUST_NM) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
<if test="searchType1 == '02' and searchText1 != null and searchText1 != ''">
|
||||
AND UPPER(eci.BIZRNO) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
<if test="searchType1 == '03' and searchText1 != null and searchText1 != ''">
|
||||
AND UPPER(esu.USER_ID) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
</if>
|
||||
ORDER BY ecm.CHRG_SEQ DESC
|
||||
LIMIT #{page}, #{pagePerRows}) A, ( SELECT @ROWNUM := #{page} ) AS R
|
||||
</select>
|
||||
|
||||
<!-- 충전관리 상세 조회 -->
|
||||
<select id="selectChrgDetail" parameterType="kr.co.uplus.ez.api.custMgt.dto.ChrgDetailReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.ChrgDetail">
|
||||
SELECT
|
||||
eci.CUST_NM
|
||||
, esu.USER_ID
|
||||
, ecm.CHRG_DIV
|
||||
, ecm.STRT_YM
|
||||
, ecm.END_YM
|
||||
, ecm.CHRG_AMT
|
||||
, ecm.USE_YN
|
||||
, eci.BIZRNO
|
||||
, ecm.CHRG_SEQ
|
||||
FROM hubez_admin.EZ_CHARGE_MNG ecm
|
||||
INNER JOIN hubez_common.EZ_SVC_USER esu ON esu.USER_SEQ = ecm.USER_SEQ
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci ON eci.CUST_SEQ = esu.CUST_SEQ
|
||||
WHERE 1 = 1
|
||||
AND ecm.USE_YN ='Y'
|
||||
AND ecm.CHRG_SEQ = #{chrgSeq}
|
||||
ORDER BY ecm.CHRG_SEQ DESC
|
||||
</select>
|
||||
|
||||
<!-- 유저ID 카운트 조회 -->
|
||||
<select id="selectuserTotalCnt" parameterType="kr.co.uplus.ez.api.custMgt.dto.UserListReqDto" resultType="int">
|
||||
/* custMgt-mapper.xml(getChrgSeq) */
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM hubez_common.EZ_SVC_USER esu
|
||||
INNER JOIN hubez_common.EZ_SUBS_INFO esi ON esi.USER_SEQ = esu.USER_SEQ
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci ON eci.CUST_SEQ = esu.CUST_SEQ
|
||||
WHERE 1 = 1
|
||||
AND esu.USER_TP_CD ='01'
|
||||
AND esi.SUBS_STTUS_CD ='02'
|
||||
AND esu.USER_ID LIKE CONCAT('%' , #{searchText1}, '%')
|
||||
</select>
|
||||
|
||||
<!-- 유저ID 목록 조회 -->
|
||||
<select id="selectUserList" parameterType="kr.co.uplus.ez.api.custMgt.dto.UserListReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.UserinInfo">
|
||||
/* custMgt-mapper.xml(getChrgSeq) */
|
||||
SELECT
|
||||
esu.USER_ID
|
||||
, eci.CUST_NM
|
||||
, esu.USER_SEQ
|
||||
, esu.USER_STTUS_CD
|
||||
, esu.USER_TP_CD
|
||||
FROM hubez_common.EZ_SVC_USER esu
|
||||
INNER JOIN hubez_common.EZ_SUBS_INFO esi ON esi.USER_SEQ = esu.USER_SEQ
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci ON eci.CUST_SEQ = esu.CUST_SEQ
|
||||
WHERE 1 = 1
|
||||
AND esu.USER_TP_CD ='01'
|
||||
AND esi.SUBS_STTUS_CD ='02'
|
||||
AND esu.USER_ID LIKE CONCAT('%' , #{searchText1}, '%')
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 이용자 충전번호 조회(채번) -->
|
||||
<select id="getChrgSeq" resultType="String">
|
||||
/* custMgt-mapper.xml(getChrgSeq) */
|
||||
SELECT hubez_common.FUN_NEXT_SEQ('CHRG_SEQ')
|
||||
</select>
|
||||
|
||||
<!-- 충전관리 등록 -->
|
||||
<insert id="insertChrgInfo" parameterType="kr.co.uplus.ez.api.custMgt.dto.ChrgInfo">
|
||||
INSERT INTO hubez_admin.EZ_CHARGE_MNG (
|
||||
CHRG_SEQ
|
||||
, USER_SEQ
|
||||
, CHRG_DIV
|
||||
, STRT_YM
|
||||
, END_YM
|
||||
, CHRG_AMT
|
||||
, USE_YN
|
||||
, REG_ID
|
||||
, REG_DT
|
||||
, CHG_ID
|
||||
, CHG_DT
|
||||
) VALUES(
|
||||
#{chrgSeq}
|
||||
, #{userSeq}
|
||||
, #{chrgDiv}
|
||||
, #{strtYm}
|
||||
, #{endYm}
|
||||
, #{chrgAmt}
|
||||
, 'Y'
|
||||
, #{regId}
|
||||
, NOW()
|
||||
, #{regId}
|
||||
, NOW()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateChrgAmt" parameterType= "kr.co.uplus.ez.api.custMgt.dto.ChrgAmtDto">
|
||||
UPDATE
|
||||
hubez_admin.EZ_USER_LMT eul
|
||||
set
|
||||
eul.MRT_LMT_AMT = eul.MRT_LMT_AMT + #{extcChrgAmt}+ #{cfwdChrgAmt}
|
||||
,eul.EXTC_CHRG_AMT = eul.EXTC_CHRG_AMT + #{extcChrgAmt}
|
||||
,eul.EXTC_CHRG_BLNC = eul.EXTC_CHRG_BLNC + #{extcChrgAmt}
|
||||
,eul.CFWD_CHRG_AMT = eul.CFWD_CHRG_AMT+ #{cfwdChrgAmt}
|
||||
,eul.CFWD_CHRG_BLNC = eul.CFWD_CHRG_BLNC+ #{cfwdChrgAmt}
|
||||
WHERE eul.USER_SEQ = #{userSeq}
|
||||
AND eul.LMT_YM =#{lmtYm}
|
||||
|
||||
</update>
|
||||
|
||||
<update id="updateChrg" parameterType="kr.co.uplus.ez.api.custMgt.dto.ChrgInfo">
|
||||
UPDATE
|
||||
hubez_admin.EZ_CHARGE_MNG ecm
|
||||
set
|
||||
ecm.USE_YN ='N'
|
||||
WHERE ecm.CHRG_SEQ = #{chrgSeq}
|
||||
</update>
|
||||
|
||||
<insert id="addChrg" parameterType="kr.co.uplus.ez.api.custMgt.dto.ChrgInfo">
|
||||
INSERT INTO hubez_admin.EZ_CHARGE_MNG (
|
||||
CHRG_SEQ
|
||||
, USER_SEQ
|
||||
, CHRG_DIV
|
||||
, STRT_YM
|
||||
, END_YM
|
||||
, CHRG_AMT
|
||||
, USE_YN
|
||||
, REG_ID
|
||||
, REG_DT
|
||||
, CHG_ID
|
||||
, CHG_DT
|
||||
) VALUES(
|
||||
#{chrgSeq}
|
||||
, #{userSeq}
|
||||
, 'E'
|
||||
, #{strtYm}
|
||||
, #{endYm}
|
||||
, #{chrgAmt}
|
||||
, 'Y'
|
||||
, #{regId}
|
||||
, NOW()
|
||||
, #{regId}
|
||||
, NOW()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="deleteChrg" parameterType="kr.co.uplus.ez.api.custMgt.dto.DeleteChrgReqDto">
|
||||
UPDATE
|
||||
hubez_admin.EZ_CHARGE_MNG ecm
|
||||
set
|
||||
ecm.USE_YN ='N'
|
||||
WHERE ecm.CHRG_SEQ in
|
||||
<foreach collection="list" index="i" item="list" open="(" close=")" separator=",">
|
||||
#{list.chrgSeq}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 2023-03-07 add request 부분
|
||||
<select id="selectBLNCLists" parameterType="kr.co.uplus.ez.api.custMgt.dto.UserLmtListReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.UserLmtList" >
|
||||
/* custMgt-mapper.xml(selectBLNCLists) */
|
||||
SELECT
|
||||
@ROWNUM := @ROWNUM + 1 AS NO
|
||||
, eci.CUST_SEQ
|
||||
, eul.LMT_YM
|
||||
, eul.FX_LMT_AMT
|
||||
, eul.CFWD_AMT
|
||||
, eul.FX_LMT_AMT + eul.CFWD_AMT AS TOTAL_AMT
|
||||
, eul.SMS_USE_AMT + eul.MMS_USE_AMT + eul.LMS_USE_AMT + eul.MMS_USE_AMT AS YM_USE_AMT
|
||||
, CASE WHEN (eul.FX_LMT_AMT + eul.CFWD_AMT)-(eul.SMS_USE_AMT + eul.MMS_USE_AMT+ eul.LMS_USE_AMT + eul.MMS_USE_AMT) <![CDATA[<]]>0 THEN '-'
|
||||
ELSE (eul.FX_LMT_AMT + eul.CFWD_AMT)-(eul.SMS_USE_AMT + eul.MMS_USE_AMT + eul.LMS_USE_AMT + eul.MMS_USE_AMT)
|
||||
END AS YM_BLNC
|
||||
FROM hubez_admin.EZ_USER_LMT eul
|
||||
INNER JOIN hubez_common.EZ_SUBS_INFO esi on eul.USER_SEQ = esi.USER_SEQ
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci on esi.CUST_SEQ =eci.CUST_SEQ
|
||||
LEFT JOIN hubez_imdb.EZ_IM_USER eiu on eiu.LOGIN_ID = esi.ATTRCTOR_ID
|
||||
WHERE 1 = 1
|
||||
<if test="startDt != null and startDt != ''">
|
||||
AND eul.REG_DT <![CDATA[ >= ]]> STR_TO_DATE(concat(REPLACE(#{startDt}, '-', '' ),'000000') , '%Y%m%d%H%i%s')
|
||||
</if>
|
||||
<if test="endDt != null and endDt != ''">
|
||||
AND esi.SUBS_STTUS_CD <![CDATA[ <= ]]> STR_TO_DATE(concat(REPLACE(#{endDt}, '-', '' ),'235959'), '%Y%m%d%H%i%s')
|
||||
</if>
|
||||
<if test="searchType1 != null and searchType1 != ''">
|
||||
AND esi.SUBS_STTUS_CD = #{searchType1}
|
||||
</if>
|
||||
<if test="searchType2 != null and searchType2 != ''">
|
||||
<if test="searchType2 == '01'">
|
||||
AND eiu.EX_PROVUSERTYPE is null
|
||||
</if>
|
||||
<if test="searchType2 == '02' ">
|
||||
AND eiu.EX_PROVUSERTYPE = 'DEALER'
|
||||
</if>
|
||||
<if test="searchType2 == '03' ">
|
||||
AND eiu.EX_PROVUSERTYPE in ( 'CCS-CS1'
|
||||
, 'CCS-CB1'
|
||||
, 'CCS-CB2'
|
||||
, 'CCS-CJ'
|
||||
, 'CCS-LS2'
|
||||
, 'CCS-LS3'
|
||||
, 'CCS-M'
|
||||
, 'CCS-MJ'
|
||||
, 'CCS-P'
|
||||
, 'CCS-P2'
|
||||
, 'CCS-D'
|
||||
, 'CCS-G'
|
||||
, 'CCS-S')
|
||||
</if>
|
||||
<if test="searchType2 == '04' ">
|
||||
AND eiu.EX_PROVUSERTYPE not in ( 'CCS-CS1'
|
||||
, 'CCS-CB1'
|
||||
, 'CCS-CB2'
|
||||
, 'CCS-CJ'
|
||||
, 'CCS-LS2'
|
||||
, 'CCS-LS3'
|
||||
, 'CCS-M'
|
||||
, 'CCS-MJ'
|
||||
, 'CCS-P'
|
||||
, 'CCS-P2'
|
||||
, 'CCS-D'
|
||||
, 'CCS-G'
|
||||
, 'CCS-S', 'DEALER')
|
||||
</if>
|
||||
</if>
|
||||
<if test="searchType3 != null and searchType3 != ''">
|
||||
<if test="searchType3 == '01' and searchText1 != null and searchText1 != ''">
|
||||
AND UPPER(esi.ENTR_NO) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
<if test="searchType3 == '02' and searchText1 != null and searchText1 != ''">
|
||||
AND UPPER(eci.BIZRNO) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
</if>
|
||||
ORDER BY eci.CUST_SEQ DESC
|
||||
</select>
|
||||
|
||||
<select id="selectBLNCListsExcel" parameterType="kr.co.uplus.ez.api.custMgt.dto.UserLmtListReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.UserLmtList">
|
||||
SELECT
|
||||
@ROWNUM := @ROWNUM + 1 AS NO
|
||||
, eci.CUST_SEQ
|
||||
, eul.LMT_YM
|
||||
, eul.FX_LMT_AMT
|
||||
, eul.CFWD_AMT
|
||||
, eul.FX_LMT_AMT + eul.CFWD_AMT AS TOTAL_AMT
|
||||
, eul.SMS_USE_AMT + eul.MMS_USE_AMT + eul.LMS_USE_AMT + eul.MMS_USE_AMT AS YM_USE_AMT
|
||||
, CASE WHEN (eul.FX_LMT_AMT + eul.CFWD_AMT)-(eul.SMS_USE_AMT + eul.MMS_USE_AMT+ eul.LMS_USE_AMT + eul.MMS_USE_AMT) <![CDATA[<]]>0 THEN '-'
|
||||
ELSE (eul.FX_LMT_AMT + eul.CFWD_AMT)-(eul.SMS_USE_AMT + eul.MMS_USE_AMT + eul.LMS_USE_AMT + eul.MMS_USE_AMT)
|
||||
END AS YM_BLNC
|
||||
FROM hubez_admin.EZ_USER_LMT eul
|
||||
INNER JOIN hubez_common.EZ_SUBS_INFO esi on eul.USER_SEQ = esi.USER_SEQ
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci on esi.CUST_SEQ =eci.CUST_SEQ
|
||||
LEFT JOIN hubez_imdb.EZ_IM_USER eiu on eiu.LOGIN_ID = esi.ATTRCTOR_ID
|
||||
WHERE 1 = 1
|
||||
<if test="startDt != null and startDt != ''">
|
||||
AND eul.REG_DT <![CDATA[ >= ]]> STR_TO_DATE(concat(REPLACE(#{startDt}, '-', '' ),'000000') , '%Y%m%d%H%i%s')
|
||||
</if>
|
||||
<if test="endDt != null and endDt != ''">
|
||||
AND esi.SUBS_STTUS_CD <![CDATA[ <= ]]> STR_TO_DATE(concat(REPLACE(#{endDt}, '-', '' ),'235959'), '%Y%m%d%H%i%s')
|
||||
</if>
|
||||
<if test="searchType1 != null and searchType1 != ''">
|
||||
AND esi.SUBS_STTUS_CD = #{searchType1}
|
||||
</if>
|
||||
<if test="searchType2 != null and searchType2 != ''">
|
||||
<if test="searchType2 == '01'">
|
||||
AND eiu.EX_PROVUSERTYPE is null
|
||||
</if>
|
||||
<if test="searchType2 == '02' ">
|
||||
AND eiu.EX_PROVUSERTYPE = 'DEALER'
|
||||
</if>
|
||||
<if test="searchType2 == '03' ">
|
||||
AND eiu.EX_PROVUSERTYPE in ( 'CCS-CS1'
|
||||
, 'CCS-CB1'
|
||||
, 'CCS-CB2'
|
||||
, 'CCS-CJ'
|
||||
, 'CCS-LS2'
|
||||
, 'CCS-LS3'
|
||||
, 'CCS-M'
|
||||
, 'CCS-MJ'
|
||||
, 'CCS-P'
|
||||
, 'CCS-P2'
|
||||
, 'CCS-D'
|
||||
, 'CCS-G'
|
||||
, 'CCS-S')
|
||||
</if>
|
||||
<if test="searchType2 == '04' ">
|
||||
AND eiu.EX_PROVUSERTYPE not in ( 'CCS-CS1'
|
||||
, 'CCS-CB1'
|
||||
, 'CCS-CB2'
|
||||
, 'CCS-CJ'
|
||||
, 'CCS-LS2'
|
||||
, 'CCS-LS3'
|
||||
, 'CCS-M'
|
||||
, 'CCS-MJ'
|
||||
, 'CCS-P'
|
||||
, 'CCS-P2'
|
||||
, 'CCS-D'
|
||||
, 'CCS-G'
|
||||
, 'CCS-S', 'DEALER')
|
||||
</if>
|
||||
</if>
|
||||
<if test="searchType3 != null and searchType3 != ''">
|
||||
<if test="searchType3 == '01' and searchText1 != null and searchText1 != ''">
|
||||
AND UPPER(esi.ENTR_NO) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
<if test="searchType3 == '02' and searchText1 != null and searchText1 != ''">
|
||||
AND UPPER(eci.BIZRNO) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
</if>
|
||||
ORDER BY eci.CUST_SEQ DESC
|
||||
</select>
|
||||
-->
|
||||
<select id="selectUserInfo" parameterType="String" resultType="kr.co.uplus.ez.api.custMgt.dto.SvcUserInfo">
|
||||
/* custMgt-mapper.xml(selectUserInfo) */
|
||||
SELECT
|
||||
USER_SEQ, HP_NO
|
||||
FROM
|
||||
hubez_common.EZ_SVC_USER
|
||||
WHERE
|
||||
USER_ID = #{userId}
|
||||
</select>
|
||||
|
||||
<select id="selectSequence" parameterType="String" resultType="String">
|
||||
/* extCarryOverAmtNoti.selectSequence -- sequence 채번 일반 */
|
||||
SELECT hubez_common.FUN_NEXT_SEQ(#{seqKey})
|
||||
</select>
|
||||
|
||||
<select id="selectNotiSeq" resultType="String">
|
||||
/* extCarryOverAmtNoti.selectNotiSeq 노티 알림 시퀀스 채번 */
|
||||
SELECT hubez_common.FUN_NEXT_SEQ('NOTI_SEQ') AS notiSeq
|
||||
</select>
|
||||
|
||||
<insert id="insertWebMsgCli" parameterType="kr.co.uplus.ez.api.custMgt.dto.WebMsgCliDto">
|
||||
/* extCarryOverAmtNoti.insertWebMsgCli - 메시지 원장 등록 */
|
||||
INSERT INTO
|
||||
<if test="tableName == 'EZ_MSG_NORMAL'">
|
||||
hubez_send.EZ_MSG_NORMAL
|
||||
</if>
|
||||
<if test="tableName == 'EZ_MSG_REAL'">
|
||||
hubez_send.EZ_MSG_REAL
|
||||
</if>
|
||||
(
|
||||
CLIENT_KEY,
|
||||
REQ_PRODUCT,
|
||||
TRAFFIC_TYPE,
|
||||
MSG_STATUS,
|
||||
REQ_DATE,
|
||||
MSG_BIZ_KEY,
|
||||
TEMPLATE_CODE,
|
||||
SEND_GROUP_KEY,
|
||||
CALLBACK_NUMBER,
|
||||
DEPT_CODE,
|
||||
MSG,
|
||||
PHONE,
|
||||
MERGE_DATA,
|
||||
TITLE,
|
||||
FILE_LIST,
|
||||
FB_PRODUCT,
|
||||
FB_TITLE,
|
||||
FB_MSG,
|
||||
FB_FILE_ID,
|
||||
RCS_MSGBASE_ID,
|
||||
RCS_HEADER,
|
||||
RCS_FOOTER,
|
||||
RCS_COPY_ALLOWED,
|
||||
RCS_EXPIRY_OPTION,
|
||||
RCS_AGENCY_ID,
|
||||
RCS_BUTTON,
|
||||
KAKAO_SENDER_KEY,
|
||||
KAKAO_TEMPLATE_KEY,
|
||||
KAKAO_BUTTON,
|
||||
KAKAO_IMAGE_WIDE_YN,
|
||||
KAKAO_IMAGE_URL,
|
||||
KAKAO_IMAGE_LINK,
|
||||
PUSH_APP_ID,
|
||||
PUSH_PROVIDER,
|
||||
PUSH_APP_USER_ID,
|
||||
WEB_REQ_ID,
|
||||
ORDER_ID
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
#{clientKey},
|
||||
#{reqProduct},
|
||||
#{trafficType},
|
||||
#{msgStatus},
|
||||
NOW(),
|
||||
#{msgBizKey},
|
||||
#{templateCode},
|
||||
#{sendGroupKey},
|
||||
#{callbackNumber},
|
||||
#{deptCode},
|
||||
#{msg},
|
||||
#{phone},
|
||||
#{mergeData},
|
||||
'충전금액알림',
|
||||
#{fileList},
|
||||
#{fbProduct},
|
||||
#{fbTitle},
|
||||
#{fbMsg},
|
||||
#{fbFileId},
|
||||
#{rcsMsgbaseId},
|
||||
#{rcsHeader},
|
||||
#{rcsFooter},
|
||||
#{rcsCopyAllowed},
|
||||
#{rcsExpiryOption},
|
||||
#{rcsAgencyId},
|
||||
#{rcsButton},
|
||||
#{kakaoSenderKey},
|
||||
#{kakaoTemplateKey},
|
||||
#{kakaoButton},
|
||||
#{kakaoImageWideYn},
|
||||
#{kakaoImageUrl},
|
||||
#{kakaoImageLink},
|
||||
#{pushAppId},
|
||||
#{pushProvider},
|
||||
#{pushAppUserId},
|
||||
#{webReqId},
|
||||
#{orderId}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="insertNotiHst" parameterType="kr.co.uplus.ez.api.custMgt.dto.NotiHistDto">
|
||||
/* extCarryOverAmtNoti.insertNotiHst - 알림 이력 등록 */
|
||||
INSERT INTO hubez_common.EZ_NOTI_HIST
|
||||
(
|
||||
SND_YMD,
|
||||
USER_SEQ,
|
||||
NOTI_SEQ,
|
||||
NOTI_DIV,
|
||||
NOTI_MSG,
|
||||
WEB_REQ_ID,
|
||||
REG_DT
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
DATE_FORMAT(NOW(), '%Y%m%d'),
|
||||
#{userSeq},
|
||||
#{notiSeq},
|
||||
'04',
|
||||
#{notiMsg},
|
||||
#{webReqId},
|
||||
NOW()
|
||||
)
|
||||
</insert>
|
||||
</mapper>
|
||||
|
||||
@@ -25,18 +25,23 @@
|
||||
@ROWNUM := @ROWNUM + 1 AS NO,
|
||||
NT_NO,
|
||||
CTG_CD,
|
||||
(
|
||||
SELECT DTL_CD_NM
|
||||
FROM hubez_common.EZ_CD_DTL
|
||||
WHERE DTL_CD = N1.CTG_CD
|
||||
AND GRP_CD = 'NTBBS_CTG_CD' AND USE_YN = 'Y'
|
||||
) AS CTG_CD_NM,
|
||||
CASE WHEN CTG_CD = '06' THEN '팝업공지'
|
||||
ELSE
|
||||
(
|
||||
SELECT DTL_CD_NM
|
||||
FROM hubez_common.EZ_CD_DTL
|
||||
WHERE DTL_CD = N1.CTG_CD
|
||||
AND GRP_CD = 'NTBBS_CTG_CD' AND USE_YN = 'Y'
|
||||
)
|
||||
END AS CTG_CD_NM,
|
||||
TITLE,
|
||||
EMG_YN,
|
||||
NT_SBST,
|
||||
REGR,
|
||||
USE_YN,
|
||||
RETV_CNT,
|
||||
DATE_FORMAT(NT_STRT_DT, '%Y-%m-%d') AS ntStrtDt,
|
||||
DATE_FORMAT(NT_END_DT, '%Y-%m-%d') AS ntEndDt,
|
||||
REG_ID,
|
||||
DATE_FORMAT(REG_DT, '%Y-%m-%d') AS regDt,
|
||||
CHG_ID,
|
||||
@@ -110,7 +115,11 @@
|
||||
NT_SBST,
|
||||
REGR,
|
||||
USE_YN,
|
||||
RETV_CNT,
|
||||
RETV_CNT,
|
||||
<if test="ctgCd == '06'">
|
||||
NT_STRT_DT,
|
||||
NT_END_DT,
|
||||
</if>
|
||||
REG_ID,
|
||||
REG_DT,
|
||||
CHG_ID,
|
||||
@@ -123,6 +132,10 @@
|
||||
#{regr},
|
||||
#{useYn},
|
||||
0,
|
||||
<if test="ctgCd == '06'">
|
||||
#{ntStrtDt},
|
||||
#{ntEndDt},
|
||||
</if>
|
||||
#{regId},
|
||||
NOW(),
|
||||
#{chgId},
|
||||
@@ -181,6 +194,10 @@
|
||||
,USE_YN = #{useYn}
|
||||
,TITLE = #{title}
|
||||
,NT_SBST = #{ntSbst}
|
||||
<if test="ctgCd == '06'">
|
||||
,NT_STRT_DT = #{ntStrtDt}
|
||||
,NT_END_DT = #{ntEndDt}
|
||||
</if>
|
||||
,CHG_DT = NOW()
|
||||
,CHG_ID = #{chgId}
|
||||
WHERE
|
||||
|
||||
Reference in New Issue
Block a user