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

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