이지우 - 결제관리 수정 작업

This commit is contained in:
JIWOO 2025-07-24 12:13:53 +09:00
parent 349f13ece7
commit 4839033257
12 changed files with 235 additions and 77 deletions

View File

@ -146,5 +146,8 @@ public interface MjonPayService {
Map<String, Object> payUserSWList(MjonPayVO mjonPayVO) throws Exception;
Map<String, Object> payUserSWListAjax(MjonMsgVO mjonMsgVO) throws Exception;
//거래명세서 상세 조회
MjonPayVO selectPayDetail(MjonPayVO mjonPayVO) throws Exception;
}

View File

@ -239,5 +239,11 @@ public class MjonPayVO extends ComDefaultVO{
private String totChgPay; // 간편결제분류
// 거래명세서 내용
private String bizNo; // 사업자등록번호
private String managerNm; // 담당자명
private String prePaymentYn; // 선불결제여부 N:후불제고객
private String dept; // 회원종류 p:개인 c:기업
}

View File

@ -353,5 +353,8 @@ public class MjonPayDAO extends EgovAbstractDAO {
return result;
}
public MjonPayVO selectPayDetail(MjonPayVO mjonPayVO) throws Exception{
return (MjonPayVO)select("mjonPayDAO.selectPayDetail", mjonPayVO);
}
}

View File

@ -2933,7 +2933,7 @@ public class MjonPayServiceImpl extends EgovAbstractServiceImpl implements MjonP
returnData.put("unPaymentPointAfterPay", unPaymentPointAfterPay);
returnData.put("negoPriceYn", negoPriceYn);
// 초기 날짜 셋팅
returnData.put("startDate", DateUtils.getDateMonthsAgo(12));
returnData.put("startDate", DateUtils.getDateMonthsAgo(1));
returnData.put("endDate", DateUtils.getCurrentDate());
@ -2969,5 +2969,9 @@ public class MjonPayServiceImpl extends EgovAbstractServiceImpl implements MjonP
return returnData;
}
@Override
public MjonPayVO selectPayDetail(MjonPayVO mjonPayVO) throws Exception {
return mjonPayDAO.selectPayDetail(mjonPayVO);
}
}

View File

@ -4911,6 +4911,7 @@ public class MjonPayController {
String mberNm = ""; // 회사명
String managerNm = ""; // 담당자명
String moblphonNo = ""; // 연락처
String mberEmailAdres = ""; //이메일
MberManageVO mberManageVO = new MberManageVO();
mberManageVO = mjonMsgDataService.selectMberManageInfo(userId);
if (mberManageVO != null) {
@ -4919,17 +4920,22 @@ public class MjonPayController {
mberNm = mberManageVO.getMberNm();
managerNm = mberManageVO.getManagerNm();
moblphonNo = mberManageVO.getMoblphonNo();
mberEmailAdres = mberManageVO.getMberEmailAdres();
}
else {
mberNm = mberManageVO.getMberNm();
managerNm = mberManageVO.getMberNm();
moblphonNo = mberManageVO.getMoblphonNo();
mberEmailAdres = mberManageVO.getMberEmailAdres();
}
}
model.addAttribute("mberNm", mberNm);
model.addAttribute("managerNm", managerNm);
model.addAttribute("moblphonNo", moblphonNo);
model.addAttribute("bizNo", mberManageVO.getBizNo());
model.addAttribute("mberEmailAdres", mberEmailAdres);
model.addAttribute("dept", mberManageVO.getDept());
//부가세 포함 가격 정보 계산
double addTax = Math.round(totalSumPrice * 0.1);
@ -6047,7 +6053,39 @@ public class MjonPayController {
return "/uss/ion/pay/cashPointSendList";
}
/**
* * 거래명세서 팝업
* @param searchVO
* @param model
* @return "/web/member/pay/payInvoicePopupAjax.do"
* @throws Exception
*/
@RequestMapping(value= {"/web/member/pay/payInvoicePopupAjax.do"})
public String printInvoiceAjax(
@ModelAttribute("searchVO") MjonPayVO mjonPayVO
, RedirectAttributes redirectAttributes
, ModelMap model) throws Exception {
//로그인 권한정보 불러오기
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(loginVO == null) {
//redirectAttributes.addFlashAttribute("message", "문자온 서비스는 로그인 후 이용 가능합니다.");
return "redirect:/web/user/login/login.do";
}
mjonPayVO.setUserId(userId);
//결제 정보 불러오기
MjonPayVO result = mjonPayService.selectPayDetail(mjonPayVO);
model.addAttribute("result", result);
return "web/pay/payInvoicePrintPopup";
}
/**
* @param p_pattern
* @param p_mjonPayVO

View File

@ -2180,6 +2180,8 @@
, BLINE_CODE AS blineCode
, AT_SMISHING_YN AS atSmishingYn
, PRE_PAYMENT_YN AS prePaymentYn
, BIZ_NO AS bizNo
, MBER_EMAIL_ADRES AS mberEmailAdres
FROM LETTNGNRLMBER
WHERE MBER_ID = #userId#

View File

@ -100,6 +100,7 @@
, D.CODE_NM AS rcptTypeTxt
, E.CONFIRM_YN AS confirmYn
, E.RCPT_TYPE AS rcptType
, E.CONFIRM_DATE AS confirmDate
, IFNULL(MP.POINT, '0') AS point
, EMI.EVENT_PG_MOID AS eventMoid
, mber.SMISHING_YN AS smishingYn
@ -148,6 +149,7 @@
MOID
, CONFIRM_YN
, RCPT_TYPE
, CONFIRM_DATE
FROM
MJ_TAX
WHERE 1=1
@ -2355,4 +2357,26 @@
</select>
<select id="mjonPayDAO.selectPayDetail" parameterClass="mjonPayVO" resultClass="mjonPayVO">
SELECT
LM.BIZ_NO AS bizNo
, LM.MBER_NM AS mberNm
, LM.MANAGER_NM AS managerNm
, LM.MBTLNUM AS mbtlNum
, LM.MBER_EMAIL_ADRES AS email
, LM.PRE_PAYMENT_YN AS prePaymentYn
, LM.DEPT AS dept
, LM.USER_MONEY AS userMoney
, MP.REG_DATE AS regDate
, MP.AMT AS amt
, MP.CASH AS cash
FROM LETTNGNRLMBER LM
LEFT JOIN MJ_PG MP
ON MP.USER_ID = LM.MBER_ID
WHERE LM.MBER_ID = #userId#
AND MP.MOID = #moid#
</select>
</sqlMap>

View File

@ -68,22 +68,60 @@ function f_print(){
</colgroup>
<tbody>
<tr>
<th>수<span class="blank"></span>신</th>
<td>${mberNm}</td>
<th>등록번호</th>
<td>
<c:choose>
<c:when test="${dept eq'c'}">
<c:out value="${bizNo}"/>
</c:when>
<c:otherwise>
-
</c:otherwise>
</c:choose>
</td>
</tr>
<tr>
<th>참<span class="blank"></span>조</th>
<td>담당자 ${managerNm} 님</td>
<th>상<span class="blank"></span>호</th>
<td>
<c:choose>
<c:when test="${dept eq'c'}">
<c:out value="${mberNm}"/>
</c:when>
<c:otherwise>
-
</c:otherwise>
</c:choose>
</td>
</tr>
<tr>
<th>거래일자</th>
<td>${startDate}~${endDate}</td>
<th>성<span class="blank"></span>명</th>
<td>
<c:choose>
<c:when test="${dept eq'c'}">
<c:out value="${managerNm}"/>
</c:when>
<c:otherwise>
<c:out value="${mberName}"/>
</c:otherwise>
</c:choose>
</td>
</tr>
<tr>
<th>전화번호</th>
<td><c:out value="${moblphonNo}"/></td>
</tr>
<tr>
<th style="letter-spacing:-0.85px;">이&ensp;메&ensp;일</th>
<td><c:out value="${mberEmailAdres}"/></td>
</tr>
<tr>
<td colspan="2" style="text-align:center;"><span><c:if test="${dept eq'c'}">주식회사 </c:if><c:out value="${mberNm}"/></span>님의 사용내역(<c:out value="${startDate}"/>~<c:out value="${endDate}"/>)을 아래와 같이 확인합니다.</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cont2 clearfix">
<%-- <div class="cont2 clearfix">
<p>총 사용금액</p>
<c:choose>
<c:when test="${searchVO.addVatType eq 'N'}">
@ -93,7 +131,7 @@ function f_print(){
<p><span>${addTaxSumPrice}</span> 원(VAT 포함)</p>
</c:otherwise>
</c:choose>
</div>
</div> --%>
<div class="cont3">
<p>(단위 : 원, 건)</p>
<div class="est_table2_wrap">
@ -188,52 +226,14 @@ function f_print(){
</div>
</div>
<div class="cont4">
<table class="est_table">
<caption>공급가액, 총 결제금액에 대한 표</caption>
<colgroup>
<col style="width: 100px;">
<col style="width: auto;">
</colgroup>
<tbody>
<tr>
<th>공급가액</th>
<td><span>${supplySumPrice}</span></td>
</tr>
<c:choose>
<c:when test="${not empty resultList || not empty payUserSumFaxList}">
<c:choose>
<c:when test="${searchVO.addVatType eq 'N'}">
<tr class="total_price">
<th>총 사용금액</th>
<td><span>${totalSumPrice}</span></td>
</tr>
</c:when>
<c:otherwise>
<tr>
<th>세액(부가세)</th>
<td>${addTax}</td>
</tr>
<tr class="total_price">
<th>총 사용금액</th>
<td><span>${addTaxSumPrice}</span></td>
</tr>
</c:otherwise>
</c:choose>
</c:when>
<c:otherwise>
<c:if test="${ empty resultList && empty payUserSumFaxList}">
<tr>
<td colspan="5">
사용내역이 없습니다.
</td>
</tr>
</c:if>
</c:otherwise>
</c:choose>
</tbody>
</table>
<div class="cont2 clearfix">
<p>총 사용금액 <span>(VAT 별도)</span></p>
<p><span>
<fmt:formatNumber type="number" maxFractionDigits="3" value="${supplySumPrice}" var="commaPrice" />
<c:out value="${commaPrice}"/>
</span>원</p>
</div>
<div class="cont5">
<p><span>${year} 년&nbsp;&nbsp;<span>${month}</span> 월&nbsp;&nbsp;<span>${day}</span> 일</p>
<div>

View File

@ -141,21 +141,11 @@ function fnShowPointPrintPopup(){
}
//환불요청 내역 프린트 출력 팝업
function fnShowRefundPrintPopup(){
//날자 체크
if( $('#startDate').val() != '' && $('#endDate').val() != '' ){
var iChkBeginDe = Number($('#startDate').val().replaceAll("/", ""));
var iChkEndDe = Number($('#endDate').val().replaceAll("/", ""));
if(iChkBeginDe > iChkEndDe || iChkEndDe < iChkBeginDe ){
alert("기간설정의 시작일자는 종료일자 보다 클수 없습니다.");
return;
}
}
function fnShowRefundPrintPopup(moid){
//만들려는 팝업의 크기
var popup_wid = '840';
var popup_ht = '900';
var popup_wid = '790';
var popup_ht = '800';
var popup_left = (window.screen.width / 2) - (popup_wid / 2);
var popup_top =(window.screen.height / 2) - (popup_ht / 2);
@ -165,6 +155,23 @@ function fnShowRefundPrintPopup(){
$("#listForm").attr({"action":"/web/member/pay/PayPrintRefundListPopUpAjax.do", "method":"post"}).submit();
}
//거래명세서 팝업
function fnShowPayInvoicePrintPopup(moid){
//만들려는 팝업의 크기
var popup_wid = '790';
var popup_ht = '800';
var popup_left = (window.screen.width / 2) - (popup_wid / 2);
var popup_top =(window.screen.height / 2) - (popup_ht / 2);
document.invoiceForm.moid.value = moid;
$("#invoiceForm").attr("target","invoicePrint");
window.open('', 'invoicePrint', 'width='+ popup_wid +', height='+ popup_ht +', left=' + popup_left + ', top='+ popup_top +',scrollbars=1');
$("#invoiceForm").attr({"action":"/web/member/pay/payInvoicePopupAjax.do", "method":"post"}).submit();
}
</script>
<!-- content 영역 -->

View File

@ -423,6 +423,7 @@ function getMberGrdChk() {
<p class="accountinfo"><span>-입금은행:</span>우리은행<span>-입금계좌:</span>1005-904-154328<span>-받는사람:</span>주식회사 아이티앤</p>
</c:otherwise>
</c:choose>
※ 거래명세서는 세금계산서 발행일로부터 30일 이내에만 출력 가능합니다.
</div>
<div style="padding-top: 10px;">
<button type="button" class="level_btn" data-tooltip="level_check_popup01" id="levelIconBtn" style="display: none;">
@ -447,15 +448,13 @@ function getMberGrdChk() {
<div class="tb_wrap pay3_list">
<table class="tType4">
<colgroup>
<%-- <col style="width: 40px;"> --%>
<col style="width: 5%;">
<col style="width: 18%;">
<col style="width: 20%;">
<col style="width: 15%;">
<col style="width: 15%;">
<col style="width: 15%;">
<%-- <col style="width: 30%;"> --%>
<col style="width: 20%;">
<col style="width: 25%;">
</colgroup>
<thead>
<tr>
@ -506,7 +505,25 @@ function getMberGrdChk() {
<tbody>
<c:choose>
<c:when test="${not empty resultList}">
<!-- 오늘날짜 - 거래명세서 버튼 조건으로 사용 -->
<c:set var="now" value="<%=new java.util.Date()%>" />
<c:forEach var="result" items="${resultList}" varStatus="status">
<!-- 거래명세서 버튼 조건(250723)
1.전용계좌 or 즉시이체
2.세금계산서 발행 완료 이후 30일간 노출
3.발행 최대 횟수 2회 -->
<c:set var="invoiceYn" value="N"/>
<c:if test="${(result.payMethod eq 'BANK' or result.payMethod eq 'VBANK')
and (result.confirmYn eq 'Y' and result.rcptType eq '9')}">
<c:set var="confirmDateStr" value="${fn:substring(result.confirmDate,0,10)}" />
<fmt:parseDate value="${confirmDateStr}" pattern="yyyy-MM-dd" var="confirmDateObj" />
<c:set var="dayDiff" value="${(now.time - confirmDateObj.time) / (1000*60*60*24)}" />
<c:if test="${dayDiff <= 31}">
<c:set var="invoiceYn" value="Y"/>
</c:if>
</c:if>
<tr class="tType3_bd">
<%-- <td>
<label for="" class="label">한 줄 전체 선택</label> <input type="checkbox" name="eachChk">
@ -628,7 +645,7 @@ function getMberGrdChk() {
</c:if>
<!-- 발행완료 -->
<c:if test="${result.confirmYn eq 'Y'}">
<c:if test="${result.rcptType eq '9'}">
<c:if test="${result.rcptType eq '9' and invoiceYn eq 'N'}">
<p class="fwRg c_002c9a">세금계산서 발행완료</p>
</c:if>
<c:if test="${result.rcptType eq '1' || result.rcptType eq '2'}">
@ -694,7 +711,7 @@ function getMberGrdChk() {
</c:if>
<!-- 발행완료 -->
<c:if test="${result.confirmYn eq 'Y'}">
<c:if test="${result.rcptType eq '9'}">
<c:if test="${result.rcptType eq '9' and invoiceYn eq 'N'}">
<p class="fwRg c_002c9a">세금계산서 발행완료</p>
</c:if>
<c:if test="${result.rcptType eq '1' || result.rcptType eq '2'}">
@ -712,7 +729,13 @@ function getMberGrdChk() {
</c:if>
</c:if>
</c:otherwise>
</c:choose>
</c:choose>
<c:if test="${invoiceYn eq 'Y'}">
<!-- <button class="btnType btnType20 btn_use_status" onclick="window.open('/publish/transaction_statement.html','','width=790,height=800')">거래명세서</button> -->
<button class="btnType btnType20 btn_use_status" onclick="fnShowPayInvoicePrintPopup('<c:out value="${result.moid}"/>'); return false;">거래명세서</button>
</c:if>
</td>
</tr>
</c:forEach>
@ -1065,4 +1088,8 @@ function getMberGrdChk() {
</div>
</div>
</div>
<!-- 거래명세서 팝업 -->
<form id="invoiceForm" name="invoiceForm" method="post">
<input type="hidden" id="moid" name="moid" value=""/>
</form>
<!-- 등급 및 누적결제액 확인 팝업 data-tooltip:level_check_popup01 끝 -->

View File

@ -24,6 +24,9 @@ var lastfulstday = "";
var lastfuledday = "";
var thisfulstlday = "";
var thisfuledtlday = "";
var threefulstday = "";
var threefuledday = "";
$(document).ready(function(){
payUserListAjax(1);
var date = new Date() ;
@ -47,6 +50,21 @@ $(document).ready(function(){
thisYearStart = date.getFullYear() + "/01/01" ;
thisYearEnd = date.getFullYear() + "/12/31" ;
//시작일 3개월 / 종료일 현재 조회
var threeMonthAgo = new Date(date);
threeMonthAgo.setMonth(threeMonthAgo.getMonth() - 3);
threeMonthAgo.setDate(threeMonthAgo.getDate() + 1); //하루 더하기
threefulstday = threeMonthAgo.getFullYear() + "/";
threefulstday += (threeMonthAgo.getMonth() + 1) < 10 ? "0" + (threeMonthAgo.getMonth() + 1) : (threeMonthAgo.getMonth() + 1) + "";
threefulstday += "/";
threefulstday += threeMonthAgo.getDate() < 10 ? "0" + threeMonthAgo.getDate() : threeMonthAgo.getDate();
threefuledday = date.getFullYear() + "/";
threefuledday += (date.getMonth() + 1) < 10 ? "0" + (date.getMonth() + 1) : (date.getMonth() + 1) + "";
threefuledday += "/";
threefuledday += date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
$(document).on('change','#pageUnitS', function(){
setPageUnit($(this).val());
@ -72,6 +90,9 @@ function payUserListAjax(pageNo){
return;
};
if(!fn_G_limitDateChk("startDate", 3)){
return;
};
document.listForm.pageIndex.value = pageNo;
var sendData= $(document.listForm).serializeArray();
@ -519,9 +540,9 @@ function fnRevDetailPop03(msgGroupId){
<span class="dateEtc">~</span>
<input type="text" class="endDate inp calendar" title="검색 종료일" id="endDate" name="endDate" value="${endDate }" data-datecontrol="true">
</div>
<button type="button" onclick="setCalVal(thisYearStart,'startDate');setCalVal( thisYearEnd,'endDate'); return false;" class="btnType btnType19">이번년도</button>
<button type="button" onclick="setCalVal(lastfulstday,'startDate');setCalVal( lastfuledday,'endDate'); return false;" class="btnType btnType19">전월</button>
<button type="button" onclick="setCalVal(thisfulstlday,'startDate');setCalVal( thisfuledtlday,'endDate'); return false;" class="btnType btnType19">당월</button>
<button type="button" onclick="setCalVal(threefulstday,'startDate');setCalVal( threefuledday,'endDate'); return false;" class="btnType btnType19">3개월</button>
<button type="button" class="btnType6" onclick="payUserListAjax(1); return false;">조회</button>
<span class="reqTxt4">
<span class="vMiddle">*</span> 조회기간의 사용내역만 보여집니다.

View File

@ -112,3 +112,26 @@ function getDateStr(myDate){
return ( year + '/' + month + '/' + day );
}
/**
* 검색 날짜관련 ID로 검색 시작일 최대 기한을 제한 function
* @param {String} a 검색 시작 ID
* @param {String} b 최대 기한
* @returns {Boolean} a날짜와 현재 날짜를 비교해서 b월 이상이면 false 이하면 true
*/
function fn_G_limitDateChk(startId, limitMonth) {
// 시작일자 가져오기
var startDate = document.getElementById(startId).value;
// 날짜 형식으로 변환 및 현재 날짜 설정
var start = new Date(startDate);
var today = new Date();
var maxDate = new Date(today);
maxDate.setMonth(maxDate.getMonth() - limitMonth);
if(start < maxDate){
alert("검색 시작일자를 최근 3개월 이내로 입력해주세요.");
return false;
}
return true;
}