mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-06 17:27:58 +09:00
admin_chrg 페이징/ 삭제 수정
This commit is contained in:
@@ -188,8 +188,14 @@ export default {
|
||||
},
|
||||
//삭제버튼
|
||||
async ChrgDeleteModal(){
|
||||
|
||||
try {
|
||||
const response = await custMgtApi.deleteChrg(this.row);
|
||||
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 = '충전금';
|
||||
|
||||
@@ -174,7 +174,6 @@ export default {
|
||||
addCls: 'box_OFvis',
|
||||
|
||||
columns:[
|
||||
{name: 'chrgSeq', header: 'chrgSeq', align: 'center', width: 60},
|
||||
{name: 'no', header: 'No', align: 'center', width: 60},
|
||||
{
|
||||
name: 'custNm', header: '고객사명', align: 'center', width: 130,
|
||||
@@ -355,14 +354,14 @@ export default {
|
||||
if (this.doValidate()) {
|
||||
this.row.title = '충전금 관리';
|
||||
this.row.msg1 = '삭제 하시겠습니까?';
|
||||
console.log("row.list", this.row.list)
|
||||
// console.log("row.list", this.row.list)
|
||||
this.$refs.commonModal.confirmModalOpen2(this.row);
|
||||
}
|
||||
},
|
||||
|
||||
async chrgdelete() {
|
||||
try {
|
||||
console.log("this.row",this.row)
|
||||
// console.log("this.row",this.row)
|
||||
let respose = await custMgtApi.deleteChrg(this.row);
|
||||
|
||||
const result = respose.data;
|
||||
@@ -403,9 +402,9 @@ export default {
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
console.log("row.chrgSeq",this.row.chrgSeq)
|
||||
// console.log("row.chrgSeq",this.row.chrgSeq)
|
||||
const param = chkList.map((row) => ({ chrgSeq: row.chrgSeq }));
|
||||
console.log("param",param)
|
||||
// console.log("param",param)
|
||||
// console.log("chrgSeq",chrgSeq)
|
||||
this.row.list = param;
|
||||
return true;
|
||||
|
||||
@@ -111,6 +111,8 @@ public interface CustMgtMapper {
|
||||
/** 청구정보 카운트 조회.*/
|
||||
int selectUserLmtListTotalCnt(UserLmtListReqDto userLmtListReqDto);
|
||||
|
||||
/** 충전관리 카운트 조회.*/
|
||||
int cntChrgList(ChrgListReqDto chrgListReqDto);
|
||||
/**충전관리 목록 조회*/
|
||||
List<ChrgList> selectChrgList(ChrgListReqDto chrgListReqDto);
|
||||
/** 충전관리 상세 조회 */
|
||||
|
||||
@@ -1010,32 +1010,46 @@ public class CustMgtService {
|
||||
public ChrgListResDto chrgList(ChrgListReqDto chrgListReqDto) {
|
||||
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
|
||||
|
||||
String nowPage = String.valueOf(chrgListReqDto.getPage());
|
||||
int totalCnt = custMgtMapper.cntChrgList(chrgListReqDto);
|
||||
|
||||
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);
|
||||
|
||||
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.setList(chrgList);
|
||||
logger.debug("chrgList={}",chrgList);
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
chrgListRes.setPaging(paging);
|
||||
|
||||
return new ChrgListResDto(ApiResponseCode.SUCCESS, chrgListRes);
|
||||
}
|
||||
|
||||
|
||||
@@ -1144,25 +1144,18 @@
|
||||
ENTR_NO = #{entrNo}
|
||||
</update>
|
||||
|
||||
<!-- 충전관리 목록 조회 -->
|
||||
<select id="selectChrgList" parameterType="kr.co.uplus.ez.api.custMgt.dto.ChrgListReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.ChrgList">
|
||||
<select id="cntChrgList" parameterType="kr.co.uplus.ez.api.custMgt.dto.ChrgListReqDto" resultType="int">
|
||||
SELECT
|
||||
@ROWNUM := @ROWNUM + 1 AS NO
|
||||
, 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
|
||||
|
||||
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'
|
||||
<if test="startDt != null and startDt != ''">
|
||||
AND (ecm.STRT_YM <![CDATA[ >= ]]> STR_TO_DATE(concat(REPLACE(#{startDt}, '-', '' ),'000000') , '%Y%m')
|
||||
</if>
|
||||
@@ -1183,6 +1176,51 @@
|
||||
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'
|
||||
<if test="startDt != null and startDt != ''">
|
||||
AND (ecm.STRT_YM <![CDATA[ >= ]]> STR_TO_DATE(concat(REPLACE(#{startDt}, '-', '' ),'000000') , '%Y%m')
|
||||
</if>
|
||||
<if test="endDt != null 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 == '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
|
||||
|
||||
Reference in New Issue
Block a user