mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-06 23:18:19 +09:00
admin Chrglist 수정/삭제부분+ Vue
This commit is contained in:
@@ -83,6 +83,10 @@ const deleteMemo = (params) => {
|
|||||||
return httpClient.post('/api/v1/bo/custMgt/deleteMemo', params);
|
return httpClient.post('/api/v1/bo/custMgt/deleteMemo', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const chrgList = (params) => {
|
||||||
|
return httpClient.post('/api/v1/bo/custMgt/chrgList', params);
|
||||||
|
}
|
||||||
|
|
||||||
const getExcelHeader = category => {
|
const getExcelHeader = category => {
|
||||||
// 엑셀에 출력할 Header 정보를 Mockup 데이터로 관리한다.
|
// 엑셀에 출력할 Header 정보를 Mockup 데이터로 관리한다.
|
||||||
return new Promise(function(resolve, reject) {
|
return new Promise(function(resolve, reject) {
|
||||||
@@ -123,4 +127,5 @@ export default {
|
|||||||
deleteMemo,
|
deleteMemo,
|
||||||
insertTestId,
|
insertTestId,
|
||||||
duplicateCheckUserId,
|
duplicateCheckUserId,
|
||||||
|
chrgList,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,28 +7,162 @@
|
|||||||
<p class="breadcrumb">고객관리 > 청약고객관리 > 충전관리</p>
|
<p class="breadcrumb">고객관리 > 청약고객관리 > 충전관리</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="top_tab">
|
<div class="top_tab">
|
||||||
<a href="javascript:void(0);" @click="toMove('subsList')">청약고객관리</a>
|
<a href="javascript:void(0);" @click="toMove('subsList')">청약고객관리</a>
|
||||||
<a href="javascript:void(0);" @click="toMove('memberList')">회원관리</a>
|
<a href="javascript:void(0);" @click="toMove('memberList')">회원관리</a>
|
||||||
<a href="javascript:void(0);" class="on">충전관리</a>
|
<a href="javascript:void(0);" class="on">충전관리</a>
|
||||||
</div>
|
</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" >
|
||||||
|
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{
|
||||||
|
option.text
|
||||||
|
}}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import customGrid from '@/components/CustomGrid';
|
||||||
|
import api from '@/service/api.js';
|
||||||
|
import moment from 'moment';
|
||||||
|
import custMgtApi from '../service/custMgtApi.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'chrgList',
|
name: 'chrgList',
|
||||||
data() {
|
data() {
|
||||||
return {
|
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: '',
|
||||||
|
|
||||||
|
searchType1: '01',
|
||||||
|
|
||||||
|
// 테이블 리스트 데이터
|
||||||
|
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},
|
||||||
|
{name: 'userId', header: '고객명', align: 'center', width: 130},
|
||||||
|
{name: 'chrdDiv', header: '충전구분', align: 'center', width: 130},
|
||||||
|
{name: 'Date', header: '기간', align: 'center', width: 130},
|
||||||
|
{name: 'chrgAmt', header: '충전금액', align: 'center', width: 130},
|
||||||
|
],
|
||||||
|
noDataStr: '검색 결과가 없습니다.',
|
||||||
|
params: {
|
||||||
|
searchType1: '',
|
||||||
|
searchText1: '',
|
||||||
|
startMonth: '',
|
||||||
|
endMonth: '',
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
customGrid: customGrid,
|
||||||
|
vuejsDatepicker,
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.setPeriodDay(0);
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
|
|
||||||
@@ -41,6 +175,84 @@ export default {
|
|||||||
toMove(routeName) {
|
toMove(routeName) {
|
||||||
this.$router.push({name: routeName, params: {page: 1, searchText: ''}});
|
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;
|
||||||
|
},
|
||||||
|
|
||||||
|
//달력 셋팅
|
||||||
|
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')) - 4)
|
||||||
|
initEndDate.setMonth(Number(moment(initEndDate).format('MM')) - 2)
|
||||||
|
|
||||||
|
|
||||||
|
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: initStartDate, from: initEndDate};
|
||||||
|
if (this.endDate !== initEndDate) {
|
||||||
|
this.disabledSDate = {from: this.endDate};
|
||||||
|
this.disabledSDate = {to: initStartDate, from: initEndDate};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
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')) - 4);
|
||||||
|
this.startDate = initStartDate;
|
||||||
|
},
|
||||||
|
initSetEndDate() {
|
||||||
|
let initEndDate = new Date();
|
||||||
|
initEndDate.setMonth(Number(moment(initEndDate).format('MM')) - 2);
|
||||||
|
this.endDate = initEndDate;
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ 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.CarryOverListResDto;
|
||||||
import kr.co.uplus.ez.api.custMgt.dto.ChrgListReqDto;
|
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.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.DeleteMemoReqDto;
|
||||||
import kr.co.uplus.ez.api.custMgt.dto.DeleteMemoResDto;
|
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.DeleteUserReqDto;
|
||||||
@@ -59,6 +61,8 @@ 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.UpdateAdminInfoResDto;
|
||||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoTotalReqDto;
|
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.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.UpdateUserReqDto;
|
||||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateUserResDto;
|
import kr.co.uplus.ez.api.custMgt.dto.UpdateUserResDto;
|
||||||
import kr.co.uplus.ez.api.custMgt.dto.UserLmtListExcelReqDto;
|
import kr.co.uplus.ez.api.custMgt.dto.UserLmtListExcelReqDto;
|
||||||
@@ -68,6 +72,7 @@ import kr.co.uplus.ez.api.custMgt.dto.UserLmtListResDto;
|
|||||||
import kr.co.uplus.ez.common.components.ValidComponents;
|
import kr.co.uplus.ez.common.components.ValidComponents;
|
||||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||||
import kr.co.uplus.ez.common.data.ApiResponseMessage;
|
import kr.co.uplus.ez.common.data.ApiResponseMessage;
|
||||||
|
import lombok.val;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 고객관리 Controller.
|
* 고객관리 Controller.
|
||||||
@@ -528,6 +533,47 @@ public class CustMgtController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* date : 2023. 3. 15.
|
||||||
|
* auth : won
|
||||||
|
* desc : 충전관리 수정
|
||||||
|
* @param UpdateChrgReqDto
|
||||||
|
* @return UpdateChrgResDto
|
||||||
|
*/
|
||||||
|
@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 DeleteChrgReqDto
|
||||||
|
* @return DeleteChrgResDto
|
||||||
|
*/
|
||||||
|
@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) {
|
||||||
|
if(validComponents.validParameter(bindingResult)) {
|
||||||
|
return new DeleteChrgResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||||
|
}
|
||||||
|
return custService.DeleteChrg(deleteChrgReqDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*2023-03-07 add request 부분
|
/*2023-03-07 add request 부분
|
||||||
*
|
*
|
||||||
* date : 2023. 1. 1.
|
* date : 2023. 1. 1.
|
||||||
|
|||||||
@@ -117,7 +117,13 @@ public interface CustMgtMapper {
|
|||||||
/**이용자 충전번호 */
|
/**이용자 충전번호 */
|
||||||
String getChrgSeq();
|
String getChrgSeq();
|
||||||
/**충전관리 등록 */
|
/**충전관리 등록 */
|
||||||
void insertChrgInfo(InsertChrgReqDto insertChrgReqDto);
|
void insertChrgInfo(ChrgInfo chrgInfo);
|
||||||
|
/**충전관리 수정 */
|
||||||
|
void updateChrg(@Valid UpdateChrgReqDto updateChrgReqDto);
|
||||||
|
/**충전관리 수정후 등록 */
|
||||||
|
void addChrg(@Valid ChrgInfo chrgInfo);
|
||||||
|
/**충전관리 삭제 */
|
||||||
|
void deleteChrg(@Valid DeleteChrgReqDto deleteChrgReqDto);
|
||||||
|
|
||||||
|
|
||||||
//2023-03-07 add request 부분
|
//2023-03-07 add request 부분
|
||||||
|
|||||||
@@ -1026,18 +1026,15 @@ public class CustMgtService {
|
|||||||
*/
|
*/
|
||||||
public InsertChrgResDto InsertChrg(@Valid InsertChrgReqDto insertChrgReqDto) {
|
public InsertChrgResDto InsertChrg(@Valid InsertChrgReqDto insertChrgReqDto) {
|
||||||
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
|
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
|
||||||
Map<Object, Object> reqMap = new HashMap<Object,Object>();
|
|
||||||
|
|
||||||
String userId = insertChrgReqDto.getUserId();
|
|
||||||
|
|
||||||
// // 1. 사용자 유무 확인
|
// // 1. 사용자 유무 확인
|
||||||
// int getUserIdCount = custMgtMapper.getUserIdCount(insertChrgReqDto.getUserId());
|
// int getUserIdCount = custMgtMapper.getUserIdCount(insertChrgReqDto.getUserId());
|
||||||
//
|
//
|
||||||
// if (getUserIdCount < 1) {
|
// if (getUserIdCount < 1) {
|
||||||
// return new InsertChrgResDto(ApiResponseCode.CE_DUPLICATE_ID);
|
// return new InsertChrgResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// // 1. 사용자 유무 확인
|
// 1. 사용자 유무 확인
|
||||||
SvcUserInfo svcUserInfo = custMgtMapper.selectSvcUserInfo(insertChrgReqDto.getUserId());
|
SvcUserInfo svcUserInfo = custMgtMapper.selectSvcUserInfo(insertChrgReqDto.getUserId());
|
||||||
|
|
||||||
if (svcUserInfo == null) {
|
if (svcUserInfo == null) {
|
||||||
@@ -1068,10 +1065,59 @@ public class CustMgtService {
|
|||||||
chrgInfo.setRegId(regId); //로그인 ID
|
chrgInfo.setRegId(regId); //로그인 ID
|
||||||
chrgInfo.setChgId(regId); //로그인 ID
|
chrgInfo.setChgId(regId); //로그인 ID
|
||||||
|
|
||||||
custMgtMapper.insertChrgInfo(insertChrgReqDto);
|
custMgtMapper.insertChrgInfo(chrgInfo);
|
||||||
|
|
||||||
return new InsertChrgResDto(ApiResponseCode.SUCCESS);
|
return new InsertChrgResDto(ApiResponseCode.SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* date : 2023. 3. 15.
|
||||||
|
* auth : won
|
||||||
|
* desc : 충전관리 수정
|
||||||
|
* @param UpdateChrgReqDto
|
||||||
|
* @return UpdateChrgResDto
|
||||||
|
*/
|
||||||
|
public UpdateChrgResDto UpdateChrg(@Valid UpdateChrgReqDto updateChrgReqDto) {
|
||||||
|
|
||||||
|
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
|
||||||
|
|
||||||
|
// 1. 사용여부 update
|
||||||
|
custMgtMapper.updateChrg(updateChrgReqDto);
|
||||||
|
|
||||||
|
// 2. 새 정보 insert
|
||||||
|
String chrgSeq = custMgtMapper.getChrgSeq();
|
||||||
|
String userSeq = custMgtMapper.getUserSeq();
|
||||||
|
Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
|
||||||
|
UserDetails userDetails = (UserDetails) principal;
|
||||||
|
String regId = userDetails.getUsername();
|
||||||
|
|
||||||
|
ChrgInfo chrgInfo = new ChrgInfo();
|
||||||
|
chrgInfo.setChrgSeq(chrgSeq);
|
||||||
|
chrgInfo.setUserSeq(userSeq);
|
||||||
|
chrgInfo.setChrgDiv(updateChrgReqDto.getChrdDiv());
|
||||||
|
chrgInfo.setStartDt(updateChrgReqDto.getStartDt());
|
||||||
|
chrgInfo.setEndDt(updateChrgReqDto.getEndDt());
|
||||||
|
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 DeleteChrgReqDto
|
||||||
|
* @return DeleteChrgResDto
|
||||||
|
*/
|
||||||
|
public DeleteChrgResDto DeleteChrg(@Valid DeleteChrgReqDto deleteChrgReqDto) {
|
||||||
|
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
|
||||||
|
custMgtMapper.deleteChrg(deleteChrgReqDto);
|
||||||
|
return new DeleteChrgResDto(ApiResponseCode.SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
/* 2023-03-07 add request 부분
|
/* 2023-03-07 add request 부분
|
||||||
* date : 2023. 1. 1.
|
* date : 2023. 1. 1.
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public class ChrgListReqDto implements Serializable{
|
|||||||
@ApiModelProperty(example = "조회 종료 날짜", name = "조회 종료 날짜", notes = "YYYYMM", dataType = "String")
|
@ApiModelProperty(example = "조회 종료 날짜", name = "조회 종료 날짜", notes = "YYYYMM", dataType = "String")
|
||||||
private String endDt;
|
private String endDt;
|
||||||
@ApiModelProperty(example = "상세검색", name = "상세검색", notes = "항목 : 고객사명(01)/가입번호(02)/서비스ID(03)", dataType = "String")
|
@ApiModelProperty(example = "상세검색", name = "상세검색", notes = "항목 : 고객사명(01)/가입번호(02)/서비스ID(03)", dataType = "String")
|
||||||
private String searchType3;
|
private String searchType1;
|
||||||
@ApiModelProperty(example = "검색어 (입력항목)", name = "검색어 (입력항목)", dataType = "String")
|
@ApiModelProperty(example = "검색어 (입력항목)", name = "검색어 (입력항목)", dataType = "String")
|
||||||
private String searchText1;
|
private String searchText1;
|
||||||
@ApiModelProperty(example = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "String")
|
@ApiModelProperty(example = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "String")
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
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 DeleteChrgReqDto implements Serializable{
|
||||||
|
|
||||||
|
@ApiModelProperty(example = "사용여부", name = "사용여부", dataType = "String")
|
||||||
|
private String useYn;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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,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 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 startDt;
|
||||||
|
@ApiModelProperty(example = "충전종료일", name = "충전종료일", dataType = "String")
|
||||||
|
private String endDt;
|
||||||
|
@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,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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,6 +9,8 @@ import lombok.Data;
|
|||||||
@Data
|
@Data
|
||||||
public class UserLmtList implements Serializable {
|
public class UserLmtList implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty(example = "리스트 번호", name = "리스트 번호", dataType = "Integer")
|
||||||
|
private Integer no;
|
||||||
@ApiModelProperty(example = "이용자일련번호", name = "이용자일련번호", dataType = "String")
|
@ApiModelProperty(example = "이용자일련번호", name = "이용자일련번호", dataType = "String")
|
||||||
private String userSeq;
|
private String userSeq;
|
||||||
@ApiModelProperty(example = "한도년월", name = "한도년월", dataType = "String")
|
@ApiModelProperty(example = "한도년월", name = "한도년월", dataType = "String")
|
||||||
|
|||||||
@@ -1145,7 +1145,7 @@
|
|||||||
</update>
|
</update>
|
||||||
|
|
||||||
<!-- 충전관리 목록 조회 -->
|
<!-- 충전관리 목록 조회 -->
|
||||||
<select id="selectChrgList">
|
<select id="selectChrgList" parameterType="kr.co.uplus.ez.api.custMgt.dto.ChrgListReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.ChrgListResDto">
|
||||||
SELECT
|
SELECT
|
||||||
@ROWNUM := @ROWNUM + 1 AS NO
|
@ROWNUM := @ROWNUM + 1 AS NO
|
||||||
, eci.CUST_NM
|
, eci.CUST_NM
|
||||||
@@ -1167,14 +1167,14 @@
|
|||||||
<if test="endDt != null and endDt != ''">
|
<if test="endDt != null and endDt != ''">
|
||||||
AND esi.SUBS_DT <![CDATA[ <= ]]> STR_TO_DATE(concat(REPLACE(#{endDt}, '-', '' ),'235959'), '%Y%m%')
|
AND esi.SUBS_DT <![CDATA[ <= ]]> STR_TO_DATE(concat(REPLACE(#{endDt}, '-', '' ),'235959'), '%Y%m%')
|
||||||
</if>
|
</if>
|
||||||
<if test="searchType3 != null and searchType3 != ''">
|
<if test="searchType1 != null and searchType1 != ''">
|
||||||
<if test="searchType3 == '01' and searchText1 != null and searchText1 != ''">
|
<if test="searchType1 == '01' and searchText1 != null and searchText1 != ''">
|
||||||
AND UPPER(eci.CUST_NM) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
AND UPPER(eci.CUST_NM) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||||
</if>
|
</if>
|
||||||
<if test="searchType3 == '02' and searchText1 != null and searchText1 != ''">
|
<if test="searchType1 == '02' and searchText1 != null and searchText1 != ''">
|
||||||
AND UPPER(eci.BIZRNO) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
AND UPPER(eci.BIZRNO) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||||
</if>
|
</if>
|
||||||
<if test="searchType3 == '03' and searchText1 != null and searchText1 != ''">
|
<if test="searchType1 == '03' and searchText1 != null and searchText1 != ''">
|
||||||
AND UPPER(esu.USER_ID) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
AND UPPER(esu.USER_ID) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||||
</if>
|
</if>
|
||||||
</if>
|
</if>
|
||||||
@@ -1247,7 +1247,7 @@
|
|||||||
, NOW()
|
, NOW()
|
||||||
, #{regId}
|
, #{regId}
|
||||||
, NOW()
|
, NOW()
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="deleteChrg">
|
<update id="deleteChrg">
|
||||||
|
|||||||
Reference in New Issue
Block a user