사용 요금 내역 후불제 화면 수정 중

This commit is contained in:
rosewiper 2023-12-28 16:10:20 +09:00
parent 16d5689697
commit 96b32204f4
6 changed files with 258 additions and 18 deletions

View File

@ -127,8 +127,16 @@ public interface MjonPayService {
// 사용금액 - 카카오 추가 // 사용금액 - 카카오 추가
List<MjonPayVO> selectUsedCashWithKakaoTotCnt(MjonPayVO mjonPayVO) throws Exception; List<MjonPayVO> selectUsedCashWithKakaoTotCnt(MjonPayVO mjonPayVO) throws Exception;
List<MjonPayVO> selectCashInfoList(String userId) throws Exception; List<MjonPayVO> selectCashInfoList(String userId) throws Exception;
List<MjonPayVO> selectPointInfoList(String userId) throws Exception; List<MjonPayVO> selectPointInfoList(String userId) throws Exception;
//누적 사용금액 조회 (캐시 테이블에서 현재까지 사용된 금액 합산 - 캐시 테이블에서 "-" 사용된 금액만 합산)
public String selectTotalSumCashForAfterPay(String userId) throws Exception;
//누적 사용 포인트 조회 (포인트 테이블에서 현재까지 사용된 포인트 합산 - 회원 포인트 정보 업데이트시 사용되는 쿼리 이용)
public String selectTotalSumPointForAfterPay(String userId) throws Exception;
//누적 납부금액 조회 (후불회원이 사용금액을 납부한 금액 합산 - 미납 금액 제외한 합산 금액)
public String selectTotSumPaymentAfterPay(String userId) throws Exception;
} }

View File

@ -302,4 +302,56 @@ public class MjonPayDAO extends EgovAbstractDAO {
} }
//누적 사용금액 조회 (캐시 테이블에서 현재까지 사용된 금액 합산 - 캐시 테이블에서 "-" 사용된 금액만 합산)
public String selectTotalSumCashForAfterPay(String userId) throws Exception{
String result = "";
try {
result = (String) select("mjonPayDAO.selectTotalSumCashForAfterPay", userId);
} catch (Exception e) {
System.out.println("selectTotalSumCashForAfterPay DAO Error!!! " + e);
}
return result;
}
//누적 사용 포인트 조회 (포인트 테이블에서 현재까지 사용된 포인트 합산 - 회원 포인트 정보 업데이트시 사용되는 쿼리 이용)
public String selectTotalSumPointForAfterPay(String userId) throws Exception{
String result = "";
try {
result = (String) select("mjonPayDAO.selectTotalSumPointForAfterPay", userId);
} catch (Exception e) {
System.out.println("selectTotalSumPointForAfterPay DAO Error!!! " + e);
}
return result;
}
//누적 납부금액 조회 (후불회원이 사용금액을 납부한 금액 합산 - 미납 금액 제외한 합산 금액)
public String selectTotSumPaymentAfterPay(String userId) throws Exception{
String result = "";
try {
result = (String) select("mjonPayDAO.selectTotSumPaymentAfterPay", userId);
} catch (Exception e) {
System.out.println("selectTotSumPaymentAfterPay DAO Error!!! " + e);
}
return result;
}
} }

View File

@ -2743,6 +2743,59 @@ public class MjonPayServiceImpl extends EgovAbstractServiceImpl implements MjonP
return mjonPayDAO.selectPointInfoList(userId); return mjonPayDAO.selectPointInfoList(userId);
} }
//누적 사용금액 조회 (캐시 테이블에서 현재까지 사용된 금액 합산 - 캐시 테이블에서 "-" 사용된 금액만 합산)
@Override
public String selectTotalSumCashForAfterPay(String userId) throws Exception{
String result = "";
try {
result = mjonPayDAO.selectTotalSumCashForAfterPay(userId);
} catch (Exception e) {
System.out.println("selectTotalSumCashForAfterPay Service Imple Error!!! " + e);
}
return result;
}
//누적 사용 포인트 조회 (포인트 테이블에서 현재까지 사용된 포인트 합산 - 회원 포인트 정보 업데이트시 사용되는 쿼리 이용)
@Override
public String selectTotalSumPointForAfterPay(String userId) throws Exception{
String result = "";
try {
result = mjonPayDAO.selectTotalSumPointForAfterPay(userId);
} catch (Exception e) {
System.out.println("selectTotalSumPointForAfterPay Service Imple Error!!! " + e);
}
return result;
}
//누적 납부금액 조회 (후불회원이 사용금액을 납부한 금액 합산 - 미납 금액 제외한 합산 금액)
@Override
public String selectTotSumPaymentAfterPay(String userId) throws Exception{
String result = "";
try {
result = mjonPayDAO.selectTotSumPaymentAfterPay(userId);
} catch (Exception e) {
System.out.println("selectTotSumPaymentAfterPay Service Imple Error!!! " + e);
}
return result;
}
} }

View File

@ -2624,7 +2624,7 @@ public class MjonPayController {
model.addAttribute("reservToList", reservToList); model.addAttribute("reservToList", reservToList);
} }
{ {// 선거 후보자 정보 조회
MjonCandidateVO mjonCandidateVO = new MjonCandidateVO(); MjonCandidateVO mjonCandidateVO = new MjonCandidateVO();
if("p".equals(mberManageVO.getDept())) { //개인회원 선거 후보자 정보 불러오기 if("p".equals(mberManageVO.getDept())) { //개인회원 선거 후보자 정보 불러오기
mjonCandidateVO = mjonCandidateService.selectCandidateDataInfo(userId); mjonCandidateVO = mjonCandidateService.selectCandidateDataInfo(userId);
@ -2635,6 +2635,62 @@ public class MjonPayController {
} }
model.addAttribute("mjonCandidateVO", mjonCandidateVO); model.addAttribute("mjonCandidateVO", mjonCandidateVO);
} }
{
/**
* 후불제 회원 관련 사용 요금 내역 정보 조회하기
* 20231228 우영두 추가
* 누적사용금액, 누적 납부금액, 당월 납부 예상금액 정보 조회
*
* */
//누적 사용금액 조회 (캐시 테이블에서 현재까지 사용된 금액 합산 - 캐시 테이블에서 "-" 사용된 금액만 합산)
String totSumCashAfterPay = mjonPayService.selectTotalSumCashForAfterPay(userId);
System.out.println(totSumCashAfterPay);
model.addAttribute("totSumCashAfterPay", totSumCashAfterPay);
//누적 사용 포인트 조회 (포인트 테이블에서 현재까지 사용된 포인트 합산 - 회원 포인트 정보 업데이트시 사용되는 쿼리 이용)
String totSumPointAfterPay = mjonPayService.selectTotalSumPointForAfterPay(userId);
System.out.println(totSumPointAfterPay);
model.addAttribute("totSumPointAfterPay", totSumPointAfterPay);
//누적 납부금액 조회 (후불회원이 사용금액을 납부한 금액 합산 - 미납 금액 제외한 합산 금액)
String totSumPaymentAfterPay = mjonPayService.selectTotSumPaymentAfterPay(userId);
System.out.println(totSumPaymentAfterPay);
model.addAttribute("totSumPaymentAfterPay", totSumPaymentAfterPay);
//누적 납부 포인트 조회 ( 누적 납부금액 합산에 대한 2% 포인트 정보 계산)
float p_i_re_point = 0;
JoinSettingVO sysJoinSetVO = mjonMsgDataService.selectJoinSettingInfo();
if (sysJoinSetVO != null) {
p_i_re_point = sysJoinSetVO.getPointPer();
}
int paymentPointAfterPay = Math.round((Float.parseFloat(totSumPaymentAfterPay) * p_i_re_point / 100));
System.out.println(paymentPointAfterPay);
model.addAttribute("sumPaymentPointAfterPay", paymentPointAfterPay);
//당월 납부 예상금액 (누적 사용금액 합산 - 누적 납부금액 합산 정보 계산)
float unPaymentAfterPay = Float.parseFloat(totSumCashAfterPay) - Float.parseFloat(totSumPaymentAfterPay);
System.out.println(unPaymentAfterPay);
model.addAttribute("unPaymentAfterPay", unPaymentAfterPay);
//당월 납부 예상 포인트 (당월 납부 예상 금액에 대한 2% 포인트 정보 계산)
int unPaymentPointAfterPay = Math.round((unPaymentAfterPay * p_i_re_point / 100));
System.out.println(unPaymentPointAfterPay);
model.addAttribute("unPaymentPointAfterPay", unPaymentPointAfterPay);
}
return "/web/pay/PayUserSWList"; return "/web/pay/PayUserSWList";
} }

View File

@ -2279,4 +2279,50 @@
</select> </select>
<select id="mjonPayDAO.selectTotalSumCashForAfterPay" parameterClass="String" resultClass="String">
SELECT NVL(B.CASH , 0) AS cash
FROM LETTNGNRLMBER A
LEFT JOIN
( SELECT SUM(CASH) AS cash , USER_ID FROM MJ_CASH A
GROUP BY A.USER_ID , A.DEL_FLAG
HAVING USER_ID = #userId# AND A.DEL_FLAG = 'N'
)
B ON A.MBER_ID = B.USER_ID
WHERE A.MBER_ID = #userId#
<!-- <![CDATA[
SELECT NVL(ABS(SUM(CASH)), 0) FROM MJ_CASH
WHERE USER_ID = #userId#
AND DEL_FLAG = 'N'
AND CASH < 0
]]> -->
</select>
<select id="mjonPayDAO.selectTotalSumPointForAfterPay" parameterClass="String" resultClass="String">
SELECT NVL(B.POINT , 0) AS point
FROM LETTNGNRLMBER A
LEFT JOIN
(
SELECT SUM(POINT) AS POINT , USER_ID FROM MJ_POINT A
GROUP BY A.USER_ID , A.DEL_FLAG
HAVING USER_ID = #userId# AND A.DEL_FLAG = 'N'
) B ON A.MBER_ID = B.USER_ID
WHERE A.MBER_ID = #userId#
</select>
<select id="mjonPayDAO.selectTotSumPaymentAfterPay" parameterClass="String" resultClass="String">
SELECT NVL(SUM(CASH), 0)
FROM MJ_PG
WHERE USER_ID = #userId#
AND PG_STATUS = 1
AND AFTER_PAY_YN = 'Y'
</select>
</sqlMap> </sqlMap>

View File

@ -203,9 +203,9 @@ function fnRevDetailPop03(msgGroupId){
<h2>요금 사용내역</h2> <h2>요금 사용내역</h2>
<button type="button" class="button info" onclick="infoPop('PayUserList');">사용안내</button> <button type="button" class="button info" onclick="infoPop('PayUserList');">사용안내</button>
</div> </div>
<div class="hisroy_price"> <c:choose>
<c:choose> <c:when test="${mberManageVO.prePaymentYn eq 'Y'}">
<c:when test="${mberManageVO.prePaymentYn eq 'Y'}"> <div class="hisroy_price">
<div class="hisroy_price_in"> <div class="hisroy_price_in">
<p> <p>
<i></i>충전금액 <i></i>충전금액
@ -285,39 +285,66 @@ function fnRevDetailPop03(msgGroupId){
</p> </p>
</div> </div>
</div> </div>
</c:when> </div>
<c:otherwise> </c:when>
<c:otherwise>
<p class="tRight c_666" style="margin: 0 0 10px 0">(VAT 별도)</p>
<div class="hisroy_price">
<div class="hisroy_defprice_in"> <div class="hisroy_defprice_in">
<p><i></i>누적 사용금액</p> <p><i></i>누적 사용금액</p>
<div class="clearfix"> <div class="clearfix">
<p>캐시</p> <p>캐시</p>
<p><span>120</span>원</p> <p>
<span>
<fmt:formatNumber value="${totSumCashAfterPay}" pattern="" />
</span>원
</p>
</div> </div>
<div class="clearfix"> <div class="clearfix">
<p>포인트</p> <p>포인트</p>
<p><span>120</span>원</p> <p>
<span>
<fmt:formatNumber value="${totSumPointAfterPay}" pattern="" />
</span>원
</p>
</div> </div>
</div> </div>
<div class="hisroy_defprice_in"> <div class="hisroy_defprice_in">
<p><i></i>누적 납부금액</p> <p><i></i>누적 납부금액</p>
<div class="clearfix"> <div class="clearfix">
<p>캐시</p> <p>캐시</p>
<p><span>120</span>원</p> <p>
<span>
<fmt:formatNumber value="${totSumPaymentAfterPay}" pattern="" />
</span>원
</p>
</div> </div>
<div class="clearfix"> <div class="clearfix">
<p>포인트</p> <p>포인트</p>
<p><span>120</span>원</p> <p>
<span>
<fmt:formatNumber value="${sumPaymentPointAfterPay}" pattern="" />
</span>원
</p>
</div> </div>
</div> </div>
<div class="hisroy_defprice_in"> <div class="hisroy_defprice_in">
<p><i></i>당월 납부 예상금액</p> <p><i></i>당월 납부 예상금액</p>
<div class="clearfix"> <div class="clearfix">
<p>캐시</p> <p>캐시</p>
<p><span>120</span>원</p> <p>
<span>
<fmt:formatNumber value="${unPaymentAfterPay}" pattern="" />
</span>원
</p>
</div> </div>
<div class="clearfix"> <div class="clearfix">
<p>포인트</p> <p>포인트</p>
<p><span>120</span>원</p> <p>
<span>
<fmt:formatNumber value="${unPaymentPointAfterPay}" pattern="" />
</span>원
</p>
</div> </div>
</div> </div>
<div class="hisroy_defprice_in"> <div class="hisroy_defprice_in">
@ -339,11 +366,9 @@ function fnRevDetailPop03(msgGroupId){
</p> </p>
</div> </div>
</div> </div>
</c:otherwise> </div>
</c:choose> </c:otherwise>
</div> </c:choose>
<div class="history_details"> <div class="history_details">
<p class="tType1_title"><img src="/publish/images/content/history_details_title.png" alt=""> 발송내역</p> <p class="tType1_title"><img src="/publish/images/content/history_details_title.png" alt=""> 발송내역</p>
<div class="details_wrap"> <div class="details_wrap">