From 96b32204f4853426e5d3f75dc04bce6a0be3d0c2 Mon Sep 17 00:00:00 2001 From: rosewiper Date: Thu, 28 Dec 2023 16:10:20 +0900 Subject: [PATCH] =?UTF-8?q?=EC=82=AC=EC=9A=A9=20=EC=9A=94=EA=B8=88=20?= =?UTF-8?q?=EB=82=B4=EC=97=AD=20=ED=9B=84=EB=B6=88=EC=A0=9C=20=ED=99=94?= =?UTF-8?q?=EB=A9=B4=20=EC=88=98=EC=A0=95=20=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../let/mjo/pay/service/MjonPayService.java | 10 +++- .../let/mjo/pay/service/impl/MjonPayDAO.java | 52 +++++++++++++++++ .../pay/service/impl/MjonPayServiceImpl.java | 53 +++++++++++++++++ .../let/mjo/pay/web/MjonPayController.java | 58 ++++++++++++++++++- .../sqlmap/let/pay/MjonPay_SQL_mysql.xml | 46 +++++++++++++++ .../WEB-INF/jsp/web/pay/PayUserSWList.jsp | 57 +++++++++++++----- 6 files changed, 258 insertions(+), 18 deletions(-) diff --git a/src/main/java/itn/let/mjo/pay/service/MjonPayService.java b/src/main/java/itn/let/mjo/pay/service/MjonPayService.java index cce02bc6..6e498bfa 100644 --- a/src/main/java/itn/let/mjo/pay/service/MjonPayService.java +++ b/src/main/java/itn/let/mjo/pay/service/MjonPayService.java @@ -127,8 +127,16 @@ public interface MjonPayService { //총 사용금액 - 카카오 추가 List selectUsedCashWithKakaoTotCnt(MjonPayVO mjonPayVO) throws Exception; - List selectCashInfoList(String userId) throws Exception; List 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; } diff --git a/src/main/java/itn/let/mjo/pay/service/impl/MjonPayDAO.java b/src/main/java/itn/let/mjo/pay/service/impl/MjonPayDAO.java index ed872913..b7e49b1f 100644 --- a/src/main/java/itn/let/mjo/pay/service/impl/MjonPayDAO.java +++ b/src/main/java/itn/let/mjo/pay/service/impl/MjonPayDAO.java @@ -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; + + } + } diff --git a/src/main/java/itn/let/mjo/pay/service/impl/MjonPayServiceImpl.java b/src/main/java/itn/let/mjo/pay/service/impl/MjonPayServiceImpl.java index 1c870c2c..252dd2b6 100644 --- a/src/main/java/itn/let/mjo/pay/service/impl/MjonPayServiceImpl.java +++ b/src/main/java/itn/let/mjo/pay/service/impl/MjonPayServiceImpl.java @@ -2743,6 +2743,59 @@ public class MjonPayServiceImpl extends EgovAbstractServiceImpl implements MjonP 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; + + } } diff --git a/src/main/java/itn/let/mjo/pay/web/MjonPayController.java b/src/main/java/itn/let/mjo/pay/web/MjonPayController.java index 6c392cd1..62a6312d 100644 --- a/src/main/java/itn/let/mjo/pay/web/MjonPayController.java +++ b/src/main/java/itn/let/mjo/pay/web/MjonPayController.java @@ -2624,7 +2624,7 @@ public class MjonPayController { model.addAttribute("reservToList", reservToList); } - { + {// 선거 후보자 정보 조회 MjonCandidateVO mjonCandidateVO = new MjonCandidateVO(); if("p".equals(mberManageVO.getDept())) { //개인회원 선거 후보자 정보 불러오기 mjonCandidateVO = mjonCandidateService.selectCandidateDataInfo(userId); @@ -2635,6 +2635,62 @@ public class MjonPayController { } 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"; } diff --git a/src/main/resources/egovframework/sqlmap/let/pay/MjonPay_SQL_mysql.xml b/src/main/resources/egovframework/sqlmap/let/pay/MjonPay_SQL_mysql.xml index e80b4936..82bca4e4 100644 --- a/src/main/resources/egovframework/sqlmap/let/pay/MjonPay_SQL_mysql.xml +++ b/src/main/resources/egovframework/sqlmap/let/pay/MjonPay_SQL_mysql.xml @@ -2279,4 +2279,50 @@ + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/web/pay/PayUserSWList.jsp b/src/main/webapp/WEB-INF/jsp/web/pay/PayUserSWList.jsp index a1366714..1d4e9abe 100644 --- a/src/main/webapp/WEB-INF/jsp/web/pay/PayUserSWList.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/pay/PayUserSWList.jsp @@ -203,9 +203,9 @@ function fnRevDetailPop03(msgGroupId){

요금 사용내역

-
- - + + +

충전금액 @@ -285,39 +285,66 @@ function fnRevDetailPop03(msgGroupId){

-
- +
+ + +

(VAT 별도)

+

누적 사용금액

캐시

-

120

+

+ + + 원 +

포인트

-

120

+

+ + + 원 +

누적 납부금액

캐시

-

120

+

+ + + 원 +

포인트

-

120

+

+ + + 원 +

당월 납부 예상금액

캐시

-

120

+

+ + + 원 +

포인트

-

120

+

+ + + 원 +

@@ -339,11 +366,9 @@ function fnRevDetailPop03(msgGroupId){

-
- - - - + + +

발송내역