admin_chrg 유저ID 조회 수정

This commit is contained in:
2023-03-29 10:49:34 +09:00
parent 393f802915
commit c3421a81ab
12 changed files with 197 additions and 20 deletions

View File

@@ -12,9 +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="아이디 입력" v-model="userId" /> <!-- <input class="search-box" type="text" placeholder="아이디 입력" v-model="userId" /> -->
<!-- <input class="search-box" type="text" placeholder="아이디 입력" disabled v-model="searchText1" /> --> <input class="search-box" type="text" placeholder="아이디 입력" disabled v-model="userId" />
<!-- <button type="button" class="button grey" @click="searchIdPop">조회</button> --> <button type="button" class="button grey" @click="searchIdPop">조회</button>
</div> </div>
</td> </td>

View File

@@ -16,13 +16,13 @@
<thead> <thead>
<tr> <tr>
<th>ID</th> <th>ID</th>
<th>사업자등록번호</th> <th>고객사명</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="(item, idx) in list"> <tr v-for="(item, idx) in list">
<td>{{ item.userId }}</td> <td>{{ item.userId }}</td>
<td><a href="javascript:void(0)" @click="setUserInfo(item)">{{ item.bregNo }}</a></td> <td><a href="javascript:void(0)" @click="setUserInfo(item)">{{ item.custNm }}</a></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -53,8 +53,7 @@ export default {
}, },
methods : { methods : {
search (isKeep) {
},
setUserInfo (props){ setUserInfo (props){
this.$emit('event-data', props) this.$emit('event-data', props)
this.UserListPopClose(); this.UserListPopClose();
@@ -81,7 +80,7 @@ export default {
if(this.row.searchText1 == ''){ if(this.row.searchText1 == ''){
return false; return false;
} }
const response = await custMgtApi.memberDetail(this.row); const response = await custMgtApi.userList(this.row);
const result = response.data; const result = response.data;
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == "0000") {
this.list = result.data.list this.list = result.data.list

View File

@@ -108,6 +108,12 @@ const deleteChrg = (params) => {
return httpClient.post('/api/v1/bo/custMgt/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 => { const getExcelHeader = category => {
// 엑셀에 출력할 Header 정보를 Mockup 데이터로 관리한다. // 엑셀에 출력할 Header 정보를 Mockup 데이터로 관리한다.
return new Promise(function(resolve, reject) { return new Promise(function(resolve, reject) {
@@ -153,4 +159,5 @@ export default {
updateChrg, updateChrg,
chrgDetail, chrgDetail,
deleteChrg, deleteChrg,
userList,
} }

View File

@@ -302,8 +302,8 @@ export default {
if (type != undefined && type != null) { if (type != undefined && type != null) {
let initStartDate = new Date(); let initStartDate = new Date();
let initEndDate = new Date(); let initEndDate = new Date();
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) - 4) initStartDate.setMonth(Number(moment(initStartDate).format('MM')) -100)
initEndDate.setMonth(Number(moment(initEndDate).format('MM')) - 2) initEndDate.setMonth(Number(moment(initEndDate).format('MM')) + 100)
if (type == 'start') { if (type == 'start') {
@@ -327,7 +327,7 @@ export default {
} else if (this.sDateDiv == 'year') { } else if (this.sDateDiv == 'year') {
return moment(date).format('YYYY'); return moment(date).format('YYYY');
} else { } else {
return moment(date).format('YYYY-MM-DD'); return moment(date).format('YYYY-MM');
} }
}, },
gridParamSet() { gridParamSet() {
@@ -338,12 +338,12 @@ export default {
}, },
initSetStartDate() { initSetStartDate() {
let initStartDate = new Date(); let initStartDate = new Date();
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) - 4); initStartDate.setMonth(Number(moment(initStartDate).format('MM')) );
this.startDate = initStartDate; this.startDate = initStartDate;
}, },
initSetEndDate() { initSetEndDate() {
let initEndDate = new Date(); let initEndDate = new Date();
initEndDate.setMonth(Number(moment(initEndDate).format('MM')) - 2); initEndDate.setMonth(Number(moment(initEndDate).format('MM')) +1);
this.endDate = initEndDate; this.endDate = initEndDate;
}, },

View File

@@ -67,6 +67,8 @@ 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.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.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.UserLmtListExcelReqDto;
import kr.co.uplus.ez.api.custMgt.dto.UserLmtListExcelResDto; 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.UserLmtListReqDto;
@@ -534,6 +536,25 @@ public class CustMgtController {
return custService.chrgDetail(chrgDetailReqDto); 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. * date : 2023. 3. 15.
* auth : won * auth : won

View File

@@ -117,8 +117,13 @@ public interface CustMgtMapper {
List<ChrgList> selectChrgList(ChrgListReqDto chrgListReqDto); List<ChrgList> selectChrgList(ChrgListReqDto chrgListReqDto);
/** 충전관리 상세 조회 */ /** 충전관리 상세 조회 */
ChrgDetail selectChrgDetail(ChrgDetailReqDto chrgDetailReqDto); ChrgDetail selectChrgDetail(ChrgDetailReqDto chrgDetailReqDto);
/**유저ID 카운트 조회*/
int selectuserTotalCnt(UserListReqDto userListReqDto);
/**유저ID 목록 조회*/
List<UserinInfo> selectUserList(UserListReqDto userListReqDto);
/**이용자 충전번호 */ /**이용자 충전번호 */
String getChrgSeq(); String getChrgSeq();
/**충전관리 등록 */ /**충전관리 등록 */
void insertChrgInfo(ChrgInfo chrgInfo); void insertChrgInfo(ChrgInfo chrgInfo);
/**충전관리 수정 */ /**충전관리 수정 */
@@ -131,6 +136,7 @@ public interface CustMgtMapper {
//2023-03-07 add request 부분 //2023-03-07 add request 부분
// /** 요금제 구매 내역 정보 목록 조회.*/ // /** 요금제 구매 내역 정보 목록 조회.*/
// List<UserLmtList> selectBLNCLists(UserLmtListReqDto userLmtListReqDto); // List<UserLmtList> selectBLNCLists(UserLmtListReqDto userLmtListReqDto);

View File

@@ -22,7 +22,6 @@ 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;
@@ -1031,6 +1030,10 @@ public class CustMgtService {
page = (page - 1) * pagePerRows; page = (page - 1) * pagePerRows;
chrgListReqDto.setPage(page); chrgListReqDto.setPage(page);
// Date now = new Date();
// String chrgYm = DateUtils.dateToStr(now, "yyyyMM");
List<ChrgList> chrgList= custMgtMapper.selectChrgList(chrgListReqDto); List<ChrgList> chrgList= custMgtMapper.selectChrgList(chrgListReqDto);
@@ -1187,6 +1190,34 @@ public class CustMgtService {
return new DeleteChrgResDto(ApiResponseCode.SUCCESS); 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);
}
/* 2023-03-07 add request 부분 /* 2023-03-07 add request 부분

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}
}

View 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;
}

View File

@@ -1200,12 +1200,10 @@
WHERE 1 = 1 WHERE 1 = 1
AND ecm.USE_YN ='Y' AND ecm.USE_YN ='Y'
AND esi.SUBS_STTUS_CD ='02' AND esi.SUBS_STTUS_CD ='02'
<if test="startDt != null and startDt != ''"> AND (#{startDt} BETWEEN ecm.STRT_YM AND ecm.END_YM
AND (ecm.STRT_YM <![CDATA[ >= ]]> STR_TO_DATE(concat(REPLACE(#{startDt}, '-', '' ),'000000') , '%Y%m') OR #{endDt} BETWEEN ecm.STRT_YM AND ecm.END_YM
</if> OR ecm.STRT_YM BETWEEN #{startDt} AND #{endDt}
<if test="endDt != null and endDt != ''"> OR ecm.END_YM BETWEEN #{startDt} AND #{endDt})
OR ecm.END_YM <![CDATA[ <= ]]> STR_TO_DATE(concat(REPLACE(#{endDt}, '-', '' ),'235959'), '%Y%m'))
</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 != ''">
AND UPPER(eci.CUST_NM) LIKE UPPER(CONCAT('%', #{searchText1}, '%')) AND UPPER(eci.CUST_NM) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
@@ -1242,6 +1240,42 @@
ORDER BY ecm.CHRG_SEQ DESC ORDER BY ecm.CHRG_SEQ DESC
</select> </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"> <select id="getChrgSeq" resultType="String">
/* custMgt-mapper.xml(getChrgSeq) */ /* custMgt-mapper.xml(getChrgSeq) */