admin_chrg 등록

This commit is contained in:
2023-03-24 17:28:43 +09:00
parent 6fa5c4d20b
commit 01a265c17d
12 changed files with 199 additions and 108 deletions

View File

@@ -12,8 +12,9 @@
<th>유저 ID</th> <th>유저 ID</th>
<td> <td>
<div class="input_search"> <div class="input_search">
<input class="search-box" type="text" placeholder="아이디 입력" disabled v-model="searchText1" /> <input class="search-box" type="text" placeholder="아이디 입력" v-model="userId" />
<button type="button" class="button grey" @click="searchIdPop">조회</button> <!-- <input class="search-box" type="text" placeholder="아이디 입력" disabled v-model="searchText1" /> -->
<!-- <button type="button" class="button grey" @click="searchIdPop">조회</button> -->
</div> </div>
</td> </td>
@@ -21,7 +22,7 @@
<tr> <tr>
<th>충전월</th> <th>충전월</th>
<td> <td>
<div class="input_box cal"> <div class="input_box cal" style="width:60%">
<div class="term"> <div class="term">
<span class="custom_input icon_date"> <span class="custom_input icon_date">
<vuejs-datepicker <vuejs-datepicker
@@ -66,11 +67,11 @@
v-model="nmineeDivCd" v-model="nmineeDivCd"
@change="changeNmineDiv($event)" @change="changeNmineDiv($event)"
/> />
<label for="popup_radio5"></label> <label for="popup_radio5">소멸금액</label>
<input <input
type="number" type="number"
placeholder="소멸 충전 금액 입력" placeholder="소멸 충전 금액 입력"
v-model="chrgAmt" v-model="chrgAmtE"
/> />
<input <input
type="radio" type="radio"
@@ -80,13 +81,13 @@
v-model="nmineeDivCd" v-model="nmineeDivCd"
@change="changeNmineDiv($event)" @change="changeNmineDiv($event)"
/> />
<label for="popup_radio6"></label> <label for="popup_radio6">이월금액</label>
<input <input
class="search-box" class="search-box"
type="number" type="number"
placeholder="이월 충전 금액 입력" placeholder="이월 충전 금액 입력"
disabled disabled
v-model="chrgAmt" v-model="chrgAmtC"
/> />
</div> </div>
</td> </td>
@@ -94,7 +95,7 @@
</tbody> </tbody>
</table> </table>
<div class="popup-btn2"> <div class="popup-btn2">
<button class="btn-pcolor" @click="saveChrg">저장</button> <button class="btn-pcolor" @click="saveChrg()">저장</button>
<button class="btn-default" @click="insertChrgClose()">취소</button> <button class="btn-default" @click="insertChrgClose()">취소</button>
</div> </div>
<user-list-pop ref="userListPop" :send-data="childData" @event-data="setChildData" /> <user-list-pop ref="userListPop" :send-data="childData" @event-data="setChildData" />
@@ -105,6 +106,8 @@
<script> <script>
import UserListPop from './UserListPop.vue'; import UserListPop from './UserListPop.vue';
import moment from 'moment'; import moment from 'moment';
import custMgtApi from "../service/custMgtApi";
export default { export default {
name: 'insertChrgModal', name: 'insertChrgModal',
@@ -115,7 +118,6 @@ export default {
data() { data() {
return { return {
childData: 20, childData: 20,
searchText1: '',
ko: vdp_translation_ko.js, ko: vdp_translation_ko.js,
// 달력 데이터 // 달력 데이터
@@ -134,7 +136,14 @@ export default {
bizrAuthYn: '', bizrAuthYn: '',
nmineeDivCd: '01', nmineeDivCd: '01',
chrgAmt: '' chrgAmtE: '',
chrgAmtC: '',
userId: '',
custNm: '',
bRegNo: '',
bizrAuthYn : '',
custSeq : '',
} }
}, },
@@ -168,7 +177,7 @@ export default {
this.$refs.userListPop.UserListPopOpen(); this.$refs.userListPop.UserListPopOpen();
}, },
setChildData(data) { setChildData(data) {
this.adminId = data.adminId; this.userId = data.userId;
this.custNm = this.fromHtmlEntities(data.custNm); this.custNm = this.fromHtmlEntities(data.custNm);
this.bRegNo = data.bregNo; this.bRegNo = data.bregNo;
this.bizrAuthYn = data.bizrAuthYn; this.bizrAuthYn = data.bizrAuthYn;
@@ -255,7 +264,40 @@ export default {
this.endDate = initEndDate; this.endDate = initEndDate;
}, },
saveChrg(){ saveChrg(){
// this.saveChrg = [];
// this.saveChrg.push({
// userId: this.userId,
// strtYm: this.strtYm,
// endYm: this.endDate,
// chrgAmt: this.chrgAmt,
// })
// let startDate2 = this.startDate.toString()
console.log("this.userId: ", this.userId)
console.log("this.startDate: ", this.startDate)
console.log("this.endDate: ", this.endDate)
console.log("this.chrgAmtE: ", this.chrgAmtE)
// startDate2 = startDate2.replace(/{{/g, '')
// console.log("chstartDate",chstartDate)
let param = {
userId : this.userId,
strtYm : this.startDate,
endYm : this.endDate,
chrgAmt : this.chrgAmtE,
}
custMgtApi
.insertChrg(param)
.then((respose)=> {
var result = respose.data;
if (result.success) {
alert("충전금이 등록되었습니다.");
} else {
alert("오류가 발생하였습니다");
}
})
}, },
}, },
}; };

View File

@@ -34,7 +34,7 @@
</div> </div>
</template> </template>
<script> <script>
import custMgtApi from '../service/custMgtApi'; import custMgtApi from '@/modules/custMgt/service/custMgtApi';
export default { export default {
name: "userListPop", name: "userListPop",
data(){ data(){
@@ -53,11 +53,9 @@ export default {
}, },
methods : { methods : {
search: function(isKeep) { search (isKeep) {
}, },
setUserInfo: function(props){ setUserInfo (props){
this.$emit('event-data', props) this.$emit('event-data', props)
this.UserListPopClose(); this.UserListPopClose();
}, },

View File

@@ -83,10 +83,16 @@ const deleteMemo = (params) => {
return httpClient.post('/api/v1/bo/custMgt/deleteMemo', params); return httpClient.post('/api/v1/bo/custMgt/deleteMemo', params);
} }
// 충전금 조회
const chrgList = (params) => { const chrgList = (params) => {
return httpClient.post('/api/v1/bo/custMgt/chrgList', params); return httpClient.post('/api/v1/bo/custMgt/chrgList', params);
} }
// 충전금 생성
const insertChrg = (params) => {
return httpClient.post('/api/v1/bo/custMgt/insertChrg', params);
}
const getExcelHeader = category => { const getExcelHeader = category => {
// 엑셀에 출력할 Header 정보를 Mockup 데이터로 관리한다. // 엑셀에 출력할 Header 정보를 Mockup 데이터로 관리한다.
return new Promise(function(resolve, reject) { return new Promise(function(resolve, reject) {
@@ -128,4 +134,5 @@ export default {
insertTestId, insertTestId,
duplicateCheckUserId, duplicateCheckUserId,
chrgList, chrgList,
insertChrg,
} }

View File

@@ -494,8 +494,8 @@ public class CustMgtController {
* date : 2023. 3. 15. * date : 2023. 3. 15.
* auth : won * auth : won
* desc : 충전관리 목록 조회 * desc : 충전관리 목록 조회
* @param * @param ChrgListReqDto
* @return * @return ChrgListResDto
* @ * @
*/ */
@ApiOperation(value="chrgList", notes = "충전관리 목록 조회") @ApiOperation(value="chrgList", notes = "충전관리 목록 조회")
@@ -537,8 +537,8 @@ public class CustMgtController {
* date : 2023. 3. 15. * date : 2023. 3. 15.
* auth : won * auth : won
* desc : 충전관리 수정 * desc : 충전관리 수정
* @param UpdateChrgReqDto * @param paramMap
* @return UpdateChrgResDto * @return
*/ */
@ApiOperation(value="updateChrg", notes = "충전관리 수정") @ApiOperation(value="updateChrg", notes = "충전관리 수정")
@ApiResponses({ @ApiResponses({
@@ -557,8 +557,8 @@ public class CustMgtController {
* date : 2023. 3. 15. * date : 2023. 3. 15.
* auth : won * auth : won
* desc : 충전관리 삭제 * desc : 충전관리 삭제
* @param DeleteChrgReqDto * @param paramMap
* @return DeleteChrgResDto * @return
*/ */
@ApiOperation(value="deleteChrg", notes = "충전관리 수정") @ApiOperation(value="deleteChrg", notes = "충전관리 수정")
@ApiResponses({ @ApiResponses({

View File

@@ -22,6 +22,7 @@ import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@@ -1003,16 +1004,38 @@ public class CustMgtService {
* date : 2023. 3. 15. * date : 2023. 3. 15.
* auth : won * auth : won
* desc : 충전관리 목록 조회 * desc : 충전관리 목록 조회
* @param * @param ChrgListReqDto
* @return * @return ChrgListResDto
*/ */
public ChrgListResDto chrgList(ChrgListReqDto chrgListReqDto) { public ChrgListResDto chrgList(ChrgListReqDto chrgListReqDto) {
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class); CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
List<ChrgList> chrgList= custMgtMapper.selectChrgList(chrgListReqDto); List<ChrgList> chrgList= custMgtMapper.selectChrgList(chrgListReqDto);
//for문
//1. 시작일을 가져온다
//2. 종료일을 가져온다
//3. 기간이라는 변수에 담아준다(형태를 잡아야함)"시작일"add String "~" add"종료일"(리스트,
for (int i = 0; i < chrgList.size(); i++) {
String startDt = chrgList.get(i).getStrtYm();
String endDt = chrgList.get(i).getEndYm();
logger.debug("startDt={} ", startDt);
logger.debug("endDt={} ", endDt);
// String chrgDate = startDt + "~" +endDt ;
chrgList.get(i).setChrgDate(startDt + "~" +endDt);
// logger.debug("chrgDate={} ", chrgDate);
}
ChrgListRes chrgListRes = new ChrgListRes(); ChrgListRes chrgListRes = new ChrgListRes();
chrgListRes.setList(chrgList); chrgListRes.setList(chrgList);
logger.debug("chrgList={}",chrgList);
return new ChrgListResDto(ApiResponseCode.SUCCESS, chrgListRes); return new ChrgListResDto(ApiResponseCode.SUCCESS, chrgListRes);
} }
@@ -1021,46 +1044,52 @@ public class CustMgtService {
* * date : 2023. 3. 15. * * date : 2023. 3. 15.
* * auth : won * * auth : won
* * desc : 충전관리 등록 * * desc : 충전관리 등록
* @param insertChrgReqDto * @param paramMap
* @return * @return
*/ */
public InsertChrgResDto InsertChrg(@Valid InsertChrgReqDto insertChrgReqDto) { public InsertChrgResDto InsertChrg(@Valid InsertChrgReqDto insertChrgReqDto) {
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class); CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
// // 1. 사용자 유무 확인 // // 1. 사용자 유무 확인
// int getUserIdCount = custMgtMapper.getUserIdCount(insertChrgReqDto.getUserId()); int getUserIdCount = custMgtMapper.getUserIdCount(insertChrgReqDto.getUserId());
//
// if (getUserIdCount < 1) { if (getUserIdCount < 1) {
// return new InsertChrgResDto(ApiResponseCode.CM_NOT_FOUND); return new InsertChrgResDto(ApiResponseCode.CM_NOT_FOUND);
// } }
// 1. 사용자 유무 확인 // 1. 사용자 유무 확인
SvcUserInfo svcUserInfo = custMgtMapper.selectSvcUserInfo(insertChrgReqDto.getUserId()); // SvcUserInfo svcUserInfo = custMgtMapper.selectSvcUserInfo(insertChrgReqDto.getUserId());
//
// if (svcUserInfo == null) {
// return new InsertChrgResDto(ApiResponseCode.CM_NOT_FOUND);
// }
//
// // 2. 관리자 ID 존재 여부 체크.
// SvcUserInfo svcUserInfo = custMgtMapper.selectSvcUserInfo(insertChrgReqDto.getUserId());
//
// if (svcUserInfo == null) {
// return new InsertChrgResDto(ApiResponseCode.CM_NOT_FOUND);
// }
//
if (svcUserInfo == null) {
return new InsertChrgResDto(ApiResponseCode.CM_NOT_FOUND);
}
// 2. 관리자 ID 존재 여부 체크.
SvcUserInfo svcadmUserInfo = custMgtMapper.selectSvcUserInfo(insertChrgReqDto.getAdminId());
if (svcadmUserInfo == null) {
return new InsertChrgResDto(ApiResponseCode.CM_NOT_FOUND);
}
// 3. 충전 정보 등록 // 3. 충전 정보 등록
String chrgSeq = custMgtMapper.getChrgSeq(); String chrgSeq = custMgtMapper.getChrgSeq();
String userSeq = custMgtMapper.getUserSeq(); int userSeq = custMgtMapper.selectUserSeq(insertChrgReqDto.getUserId());
Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal(); Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
UserDetails userDetails = (UserDetails) principal; UserDetails userDetails = (UserDetails) principal;
String regId = userDetails.getUsername(); String regId = userDetails.getUsername();
logger.debug("insertChrgReqDto= {}", insertChrgReqDto);
ChrgInfo chrgInfo = new ChrgInfo(); ChrgInfo chrgInfo = new ChrgInfo();
chrgInfo.setChrgSeq(chrgSeq); chrgInfo.setChrgSeq(chrgSeq);
chrgInfo.setUserSeq(userSeq); chrgInfo.setUserSeq(userSeq);
chrgInfo.setChrgDiv(insertChrgReqDto.getChrdDiv()); chrgInfo.setChrgDiv(insertChrgReqDto.getChrdDiv());
chrgInfo.setStartDt(insertChrgReqDto.getStartDt()); String StrYm = insertChrgReqDto.getStrtYm().replace("-", "").substring(0, 6);
chrgInfo.setEndDt(insertChrgReqDto.getEndDt()); chrgInfo.setStrtYm(StrYm);
String EndYm = insertChrgReqDto.getEndYm().substring(0, 6);
chrgInfo.setEndYm(EndYm);
chrgInfo.setChrgAmt(insertChrgReqDto.getChrgAmt()); chrgInfo.setChrgAmt(insertChrgReqDto.getChrgAmt());
chrgInfo.setRegId(regId); //로그인 ID chrgInfo.setRegId(regId); //로그인 ID
chrgInfo.setChgId(regId); //로그인 ID chrgInfo.setChgId(regId); //로그인 ID
@@ -1074,8 +1103,8 @@ public class CustMgtService {
* date : 2023. 3. 15. * date : 2023. 3. 15.
* auth : won * auth : won
* desc : 충전관리 수정 * desc : 충전관리 수정
* @param UpdateChrgReqDto * @param paramMap
* @return UpdateChrgResDto * @return
*/ */
public UpdateChrgResDto UpdateChrg(@Valid UpdateChrgReqDto updateChrgReqDto) { public UpdateChrgResDto UpdateChrg(@Valid UpdateChrgReqDto updateChrgReqDto) {
@@ -1086,17 +1115,21 @@ public class CustMgtService {
// 2. 새 정보 insert // 2. 새 정보 insert
String chrgSeq = custMgtMapper.getChrgSeq(); String chrgSeq = custMgtMapper.getChrgSeq();
String userSeq = custMgtMapper.getUserSeq(); int userSeq = custMgtMapper.selectUserSeq(updateChrgReqDto.getUserId());
Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal(); Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
UserDetails userDetails = (UserDetails) principal; UserDetails userDetails = (UserDetails) principal;
String regId = userDetails.getUsername(); String regId = userDetails.getUsername();
logger.debug("insertChrgReqDto= {}", updateChrgReqDto);
ChrgInfo chrgInfo = new ChrgInfo(); ChrgInfo chrgInfo = new ChrgInfo();
chrgInfo.setChrgSeq(chrgSeq); chrgInfo.setChrgSeq(chrgSeq);
chrgInfo.setUserSeq(userSeq); chrgInfo.setUserSeq(userSeq);
chrgInfo.setChrgDiv(updateChrgReqDto.getChrdDiv()); chrgInfo.setChrgDiv(updateChrgReqDto.getChrdDiv());
chrgInfo.setStartDt(updateChrgReqDto.getStartDt()); String StrYm = updateChrgReqDto.getStrtYm().substring(0, 6);
chrgInfo.setEndDt(updateChrgReqDto.getEndDt()); chrgInfo.setStrtYm(StrYm);
String EndYm = updateChrgReqDto.getEndYm().substring(0, 6);
chrgInfo.setEndYm(EndYm);
chrgInfo.setChrgAmt(updateChrgReqDto.getChrgAmt()); chrgInfo.setChrgAmt(updateChrgReqDto.getChrgAmt());
chrgInfo.setRegId(regId); //로그인 ID chrgInfo.setRegId(regId); //로그인 ID
chrgInfo.setChgId(regId); //로그인 ID chrgInfo.setChgId(regId); //로그인 ID
@@ -1110,8 +1143,8 @@ public class CustMgtService {
* date : 2023. 3. 15. * date : 2023. 3. 15.
* auth : won * auth : won
* desc : 충전관리 삭제 * desc : 충전관리 삭제
* @param DeleteChrgReqDto * @param paramMap
* @return DeleteChrgResDto * @return
*/ */
public DeleteChrgResDto DeleteChrg(@Valid DeleteChrgReqDto deleteChrgReqDto) { public DeleteChrgResDto DeleteChrg(@Valid DeleteChrgReqDto deleteChrgReqDto) {
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class); CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);

View File

@@ -11,13 +11,13 @@ public class ChrgInfo implements Serializable{
/** 충전 SEQUENCE */ /** 충전 SEQUENCE */
private String chrgSeq; private String chrgSeq;
/** 유저 SEQUENCE */ /** 유저 SEQUENCE */
private String userSeq; private int userSeq;
/** 충전구분 */ /** 충전구분 */
private String chrgDiv; private String chrgDiv;
/** 충전 시작년월 */ /** 충전 시작년월 */
private String startDt; private String strtYm;
/** 충전 종료년월 */ /** 충전 종료년월 */
private String endDt; private String endYm;
/** 충전금액 */ /** 충전금액 */
private String chrgAmt; private String chrgAmt;
/** 사용여부 */ /** 사용여부 */

View File

@@ -15,15 +15,18 @@ public class ChrgList implements Serializable{
@ApiModelProperty(example = "고객명", name = "고객명", dataType = "String") @ApiModelProperty(example = "고객명", name = "고객명", dataType = "String")
private String userId; private String userId;
@ApiModelProperty(example = "충전구분", name = "충전구분", dataType = "String") @ApiModelProperty(example = "충전구분", name = "충전구분", dataType = "String")
private String chrdDiv; private String chrgDiv;
@ApiModelProperty(example = "충전시작일", name = "충전시작일", dataType = "String") @ApiModelProperty(example = "충전시작일", name = "충전시작일", dataType = "String")
private String startDt; private String strtYm;
@ApiModelProperty(example = "충전종료일", name = "충전종료일", dataType = "String") @ApiModelProperty(example = "충전종료일", name = "충전종료일", dataType = "String")
private String endDt; private String endYm;
@ApiModelProperty(example = "충전금액", name = "충전금액", dataType = "String") @ApiModelProperty(example = "충전금액", name = "충전금액", dataType = "String")
private String chrgAmt; private String chrgAmt;
@ApiModelProperty(example = "사용여부", name = "사용여부", dataType = "String") @ApiModelProperty(example = "사용여부", name = "사용여부", dataType = "String")
private String useYn; private String useYn;
@ApiModelProperty(example = "사업자명", name = "사업자명", dataType = "String") @ApiModelProperty(example = "사업자명", name = "사업자명", dataType = "String")
private String bizrNo; private String bizrNo;
@ApiModelProperty(example = "충전기간", name = "충전기간", dataType = "String")
private String chrgDate;
} }

View File

@@ -10,5 +10,6 @@ import lombok.Data;
@Data @Data
public class ChrgListRes implements Serializable{ public class ChrgListRes implements Serializable{
private Paging paging;
private List<ChrgList> list; private List<ChrgList> list;
} }

View File

@@ -21,9 +21,9 @@ public class InsertChrgReqDto implements Serializable{
@ApiModelProperty(example = "충전구분", name = "충전구분", dataType = "String") @ApiModelProperty(example = "충전구분", name = "충전구분", dataType = "String")
private String chrdDiv; private String chrdDiv;
@ApiModelProperty(example = "충전시작일", name = "충전시작일", dataType = "String") @ApiModelProperty(example = "충전시작일", name = "충전시작일", dataType = "String")
private String startDt; private String strtYm;
@ApiModelProperty(example = "충전종료일", name = "충전종료일", dataType = "String") @ApiModelProperty(example = "충전종료일", name = "충전종료일", dataType = "String")
private String endDt; private String endYm;
@ApiModelProperty(example = "충전금액", name = "충전금액", dataType = "String") @ApiModelProperty(example = "충전금액", name = "충전금액", dataType = "String")
private String chrgAmt; private String chrgAmt;
@ApiModelProperty(example = "사용여부", name = "사용여부", dataType = "String") @ApiModelProperty(example = "사용여부", name = "사용여부", dataType = "String")

View File

@@ -16,9 +16,9 @@ public class UpdateChrgReqDto implements Serializable{
@ApiModelProperty(example = "충전구분", name = "충전구분", dataType = "String") @ApiModelProperty(example = "충전구분", name = "충전구분", dataType = "String")
private String chrdDiv; private String chrdDiv;
@ApiModelProperty(example = "충전시작일", name = "충전시작일", dataType = "String") @ApiModelProperty(example = "충전시작일", name = "충전시작일", dataType = "String")
private String startDt; private String strtYm;
@ApiModelProperty(example = "충전종료일", name = "충전종료일", dataType = "String") @ApiModelProperty(example = "충전종료일", name = "충전종료일", dataType = "String")
private String endDt; private String endYm;
@ApiModelProperty(example = "충전금액", name = "충전금액", dataType = "String") @ApiModelProperty(example = "충전금액", name = "충전금액", dataType = "String")
private String chrgAmt; private String chrgAmt;
@ApiModelProperty(example = "사용여부", name = "사용여부", dataType = "String") @ApiModelProperty(example = "사용여부", name = "사용여부", dataType = "String")

View File

@@ -1145,7 +1145,11 @@
</update> </update>
<!-- 충전관리 목록 조회 --> <!-- 충전관리 목록 조회 -->
<select id="selectChrgList" parameterType="kr.co.uplus.ez.api.custMgt.dto.ChrgListReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.ChrgListResDto"> <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 SELECT
@ROWNUM := @ROWNUM + 1 AS NO @ROWNUM := @ROWNUM + 1 AS NO
, eci.CUST_NM , eci.CUST_NM
@@ -1158,14 +1162,15 @@
, eci.BIZRNO , eci.BIZRNO
FROM hubez_admin.EZ_CHARGE_MNG ecm 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_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_CUST_INFO eci ON eci.CUST_SEQ = esu.CUST_SEQ
WHERE ecm.USE_YN ='Y' AND 1 =1 WHERE 1 = 1
AND ecm.USE_YN ='Y'
<if test="startDt != null and startDt != ''"> <if test="startDt != null and startDt != ''">
AND esi.SUBS_DT <![CDATA[ >= ]]> STR_TO_DATE(concat(REPLACE(#{startDt}, '-', '' ),'000000') , '%Y%m%') AND ecm.STRT_YM <![CDATA[ >= ]]> STR_TO_DATE(concat(REPLACE(#{startDt}, '-', '' ),'000000') , '%Y%m')
</if> </if>
<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%') OR ecm.END_YM <![CDATA[ <= ]]> STR_TO_DATE(concat(REPLACE(#{endDt}, '-', '' ),'235959'), '%Y%m')
</if> </if>
<if test="searchType1 != null and searchType1 != ''"> <if test="searchType1 != null and searchType1 != ''">
<if test="searchType1 == '01' and searchText1 != null and searchText1 != ''"> <if test="searchType1 == '01' and searchText1 != null and searchText1 != ''">
@@ -1178,7 +1183,8 @@
AND UPPER(esu.USER_ID) LIKE UPPER(CONCAT('%', #{searchText1}, '%')) AND UPPER(esu.USER_ID) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
</if> </if>
</if> </if>
ORDER BY esu.USER_ID DESC ORDER BY esu.USER_ID DESC) A ,
( SELECT @ROWNUM := #{page} ) AS R
</select> </select>
<!-- 이용자 충전번호 조회(채번) --> <!-- 이용자 충전번호 조회(채번) -->
@@ -1186,8 +1192,9 @@
/* custMgt-mapper.xml(getChrgSeq) */ /* custMgt-mapper.xml(getChrgSeq) */
SELECT hubez_common.FUN_NEXT_SEQ('CHRG_SEQ') SELECT hubez_common.FUN_NEXT_SEQ('CHRG_SEQ')
</select> </select>
<!-- 충전관리 등록 --> <!-- 충전관리 등록 -->
<insert id="insertChrgInfo"> <insert id="insertChrgInfo" parameterType="kr.co.uplus.ez.api.custMgt.dto.ChrgInfo">
INSERT INTO hubez_admin.EZ_CHARGE_MNG ( INSERT INTO hubez_admin.EZ_CHARGE_MNG (
CHRG_SEQ CHRG_SEQ
, USER_SEQ , USER_SEQ
@@ -1200,14 +1207,14 @@
, REG_DT , REG_DT
, CHG_ID , CHG_ID
, CHG_DT , CHG_DT
)
) VALUES( ) VALUES(
#{chrgSeq} #{chrgSeq}
, #{userSeq} , #{userSeq}
, 'Y' , 'E'
, #{startDt} , #{strtYm}
, #{endDt} , #{endYm}
, #{chrgAmt} , #{chrgAmt}
, 'Y'
, #{regId} , #{regId}
, NOW() , NOW()
, #{regId} , #{regId}
@@ -1215,14 +1222,14 @@
) )
</insert> </insert>
<update id="updateChrg"> <update id="updateChrg" parameterType="kr.co.uplus.ez.api.custMgt.dto.ChrgInfo">
hubez_admin.EZ_CHARGE_MNG hubez_admin.EZ_CHARGE_MNG
set set
ecm.USE_YN ='N' ecm.USE_YN ='N'
WHERE USER_SEQ = (SELECT USER_SEQ FROM hubez_common.EZ_SVC_USER WHERE USER_ID = #{userId}) WHERE USER_SEQ = (SELECT USER_SEQ FROM hubez_common.EZ_SVC_USER WHERE USER_ID = #{userId})
</update> </update>
<insert id="addChrg"> <insert id="addChrg" parameterType="kr.co.uplus.ez.api.custMgt.dto.ChrgInfo">
INSERT INTO hubez_admin.EZ_CHARGE_MNG ( INSERT INTO hubez_admin.EZ_CHARGE_MNG (
CHRG_SEQ CHRG_SEQ
, USER_SEQ , USER_SEQ
@@ -1250,7 +1257,7 @@
) )
</insert> </insert>
<update id="deleteChrg"> <update id="deleteChrg" parameterType="kr.co.uplus.ez.api.custMgt.dto.ChrgInfo">
UPDATE UPDATE
hubez_admin.EZ_CHARGE_MNG hubez_admin.EZ_CHARGE_MNG
set set