fix : 구독서비스 결제 적용
This commit is contained in:
@@ -76,7 +76,8 @@ public class BOOrderService {
|
|||||||
LinkedHashMap setle = (LinkedHashMap) param.get("setle"); // 결제정보
|
LinkedHashMap setle = (LinkedHashMap) param.get("setle"); // 결제정보
|
||||||
List<LinkedHashMap> prsntList = (List<LinkedHashMap>) param.get("prsnt"); // 사은품 정보
|
List<LinkedHashMap> prsntList = (List<LinkedHashMap>) param.get("prsnt"); // 사은품 정보
|
||||||
|
|
||||||
if(param.containsKey("subsvcInnb")) {
|
Boolean subsvcAt = param.containsKey("subsvcInnb"); // 구독서비스 여부
|
||||||
|
if(subsvcAt) {
|
||||||
setle.put("subsvcInnb", param.get("subsvcInnb"));
|
setle.put("subsvcInnb", param.get("subsvcInnb"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -221,7 +222,7 @@ public class BOOrderService {
|
|||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// } else if ("03".equals(itemDlvyGroupDvCd)) { // 유료배송
|
// } else if ("03".equals(itemDlvyGroupDvCd)) { // 유료배송
|
||||||
if ("03".equals(itemDlvyGroupDvCd)) { // 유료배송
|
if ("03".equals(itemDlvyGroupDvCd) || subsvcAt) { // 유료배송
|
||||||
|
|
||||||
// 추가배송비 계산 (MUL)
|
// 추가배송비 계산 (MUL)
|
||||||
if (!StringUtils.isEmpty(itemDlvyAreaAditAt) && "Y".equals(itemDlvyAreaAditAt)) {
|
if (!StringUtils.isEmpty(itemDlvyAreaAditAt) && "Y".equals(itemDlvyAreaAditAt)) {
|
||||||
@@ -231,12 +232,12 @@ public class BOOrderService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 유료배송 + 수량 조건
|
// 유료배송 + 수량 조건
|
||||||
if ("Y".equals(itemCntCndUseAt) && itemCntCndAditAmt.compareTo(BigDecimal.ZERO) > 0) {
|
if (("Y".equals(itemCntCndUseAt) && itemCntCndAditAmt.compareTo(BigDecimal.ZERO) > 0) || subsvcAt) {
|
||||||
// 수량 조건 있을 경우
|
// 수량 조건 있을 경우
|
||||||
for (DataMap goodsMap : goodsByDlvyGroupList) {
|
for (DataMap goodsMap : goodsByDlvyGroupList) {
|
||||||
|
|
||||||
BigDecimal qy = new BigDecimal(String.valueOf(goodsMap.get("qy"))); // 수량
|
BigDecimal qy = new BigDecimal(String.valueOf(goodsMap.get("qy"))); // 수량
|
||||||
BigDecimal unitQy = qy.divide(itemCntCndAditAmt, 0, RoundingMode.CEILING); // 단위수량
|
BigDecimal unitQy = subsvcAt ? qy : qy.divide(itemCntCndAditAmt, 0, RoundingMode.CEILING); // 단위수량
|
||||||
BigDecimal goodsDscntAmt = new BigDecimal(String.valueOf(goodsMap.get("dscntAmt")));
|
BigDecimal goodsDscntAmt = new BigDecimal(String.valueOf(goodsMap.get("dscntAmt")));
|
||||||
BigInteger unitDscntAmt = BigInteger.valueOf(goodsDscntAmt.intValue());
|
BigInteger unitDscntAmt = BigInteger.valueOf(goodsDscntAmt.intValue());
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ private static final long serialVersionUID = 1L;
|
|||||||
/** 소비자가 */
|
/** 소비자가 */
|
||||||
private String cnsmrpric;
|
private String cnsmrpric;
|
||||||
/** 판매가 */
|
/** 판매가 */
|
||||||
private String slepric;
|
private Integer slepric;
|
||||||
/** 재고수량 */
|
/** 재고수량 */
|
||||||
private String invntryQy;
|
private String invntryQy;
|
||||||
/** 판매재고수량 */
|
/** 판매재고수량 */
|
||||||
@@ -143,10 +143,14 @@ private static final long serialVersionUID = 1L;
|
|||||||
private Integer subCnsmrpric;
|
private Integer subCnsmrpric;
|
||||||
/** 소비자가 (형식적용) */
|
/** 소비자가 (형식적용) */
|
||||||
private String cnsmrpricByFormat;
|
private String cnsmrpricByFormat;
|
||||||
/** 판매가 합계 (형식적용) */
|
/** 옵션주문단가 × 옵션주문수량 (형식적용) */
|
||||||
private String subSlepricByFormat;
|
private String subSlepricByFormat;
|
||||||
/** 판매가 합계 (형식적용) */
|
/** 옵션주문단가 × 옵션주문수량 */
|
||||||
private Integer subSlepric;
|
private Integer subSlepric;
|
||||||
|
/** 할인금액 */
|
||||||
|
private Integer dscntAmt;
|
||||||
|
/** 할인적용금액 */
|
||||||
|
private Integer dscntApplyAmt;
|
||||||
/** 판매가 합계 (형식적용) */
|
/** 판매가 합계 (형식적용) */
|
||||||
private String slepricByFormat;
|
private String slepricByFormat;
|
||||||
/** 상품이미지경로 */
|
/** 상품이미지경로 */
|
||||||
|
|||||||
@@ -795,7 +795,8 @@ public class OrdrController {
|
|||||||
BOSubsvcVO subsvcVO = new BOSubsvcVO();
|
BOSubsvcVO subsvcVO = new BOSubsvcVO();
|
||||||
subsvcVO.setSopmalCd((String) goodsOne.get("sopmalCd"));
|
subsvcVO.setSopmalCd((String) goodsOne.get("sopmalCd"));
|
||||||
subsvcVO.setSubsvcInnb(goodsOne.get("subsvcInnb").toString());
|
subsvcVO.setSubsvcInnb(goodsOne.get("subsvcInnb").toString());
|
||||||
subsvcVO.setQy(1);
|
subsvcVO.setQy((int) goodsOne.get("qy"));
|
||||||
|
subsvcVO.setMbrInnb((int) goodsOne.get("mbrInnb"));
|
||||||
|
|
||||||
paramData.remove("goodsList");
|
paramData.remove("goodsList");
|
||||||
paramData.put("goodsList", service.selectSubsvcGoodsList(subsvcVO));
|
paramData.put("goodsList", service.selectSubsvcGoodsList(subsvcVO));
|
||||||
|
|||||||
@@ -1501,6 +1501,7 @@
|
|||||||
AND GOR.USE_AT = 'Y'
|
AND GOR.USE_AT = 'Y'
|
||||||
AND GOR.REFUND_PROCS_STTUS_CD = '03' /*처리상태:환불완료*/) AS ORDER_RE_INNB
|
AND GOR.REFUND_PROCS_STTUS_CD = '03' /*처리상태:환불완료*/) AS ORDER_RE_INNB
|
||||||
, FO.SUBSVC_AT
|
, FO.SUBSVC_AT
|
||||||
|
, FO.SUBSVC_INNB
|
||||||
FROM GC_ORDER FO
|
FROM GC_ORDER FO
|
||||||
INNER JOIN (
|
INNER JOIN (
|
||||||
SELECT FOI.SOPMAL_CD
|
SELECT FOI.SOPMAL_CD
|
||||||
@@ -5649,6 +5650,8 @@
|
|||||||
, IFNULL(GGO.SLEPRIC, 0) * #{qy} AS SUB_SLEPRIC
|
, IFNULL(GGO.SLEPRIC, 0) * #{qy} AS SUB_SLEPRIC
|
||||||
, FORMAT(IFNULL(GGO.SLEPRIC, 0), 0) AS SLEPRIC_BY_FORMAT
|
, FORMAT(IFNULL(GGO.SLEPRIC, 0), 0) AS SLEPRIC_BY_FORMAT
|
||||||
, IFNULL(GGO.SLEPRIC, 0) AS SLEPRIC
|
, IFNULL(GGO.SLEPRIC, 0) AS SLEPRIC
|
||||||
|
, 0 AS DSCNT_AMT
|
||||||
|
, IFNULL(GGO.SLEPRIC, 0) * #{qy} AS DSCNT_APPLY_AMT
|
||||||
, CONCAT(GGO.OPTN1, IF(GGO.OPTN2 IS NULL , '', CONCAT('/', GGO.OPTN2))
|
, CONCAT(GGO.OPTN1, IF(GGO.OPTN2 IS NULL , '', CONCAT('/', GGO.OPTN2))
|
||||||
, IF(GGO.OPTN3 IS NULL , '', CONCAT('/', GGO.OPTN3))
|
, IF(GGO.OPTN3 IS NULL , '', CONCAT('/', GGO.OPTN3))
|
||||||
, IF(GGO.OPTN4 IS NULL , '', CONCAT('/', GGO.OPTN4))) AS OPTN
|
, IF(GGO.OPTN4 IS NULL , '', CONCAT('/', GGO.OPTN4))) AS OPTN
|
||||||
|
|||||||
@@ -703,11 +703,15 @@
|
|||||||
|
|
||||||
if (radioValue === 'Default') {
|
if (radioValue === 'Default') {
|
||||||
if ($(this).is(':checked')) {
|
if ($(this).is(':checked')) {
|
||||||
$('#recpntNm').val($('#mbrNm').val());
|
$('#recpntNm').val($('#mbrNm').val());
|
||||||
$('.recpntNm_ordrInfo_text').text($('#mbrNm').val());
|
$('.recpntNm_ordrInfo_text').text($('#mbrNm').val());
|
||||||
|
|
||||||
|
$('#recpntMbtlnb').val($('#mbtlnb').val());
|
||||||
|
$('.recpntMbtlnb_ordrInfo_text').text($('#mbtlnb').val());
|
||||||
|
|
||||||
|
$('#cstmclerCd').val($('#cstmclerCd').val());
|
||||||
|
$('.cstmclerCd_ordrInfo_text').text($('#cstmclerCd').val());
|
||||||
|
|
||||||
$('#recpntMbtlnb').val($('#mbtlnb').val());
|
|
||||||
$('.recpntMbtlnb_ordrInfo_text').text($('#mbtlnb').val());
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
let data = {
|
let data = {
|
||||||
@@ -726,6 +730,8 @@
|
|||||||
$('.recpntNm_ordrInfo_text').text($('#recpntNm').val());
|
$('.recpntNm_ordrInfo_text').text($('#recpntNm').val());
|
||||||
$('#recpntMbtlnb').val(parseJson.dftDlvylc.mbtlnb);
|
$('#recpntMbtlnb').val(parseJson.dftDlvylc.mbtlnb);
|
||||||
$('.recpntMbtlnb_ordrInfo_text').text($('#recpntMbtlnb').val());
|
$('.recpntMbtlnb_ordrInfo_text').text($('#recpntMbtlnb').val());
|
||||||
|
$('#cstmclerCd').val(parseJson.dftDlvylc.cstmclerCd);
|
||||||
|
$('.cstmclerCd_ordrInfo_text').text($('#cstmclerCd').val());
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -1503,6 +1509,12 @@
|
|||||||
html += ' <input type="text" name="recpntMbtlnb" oninput="fn_set_event(this, \'keyup\', fn_fmt_telno)" maxlength="13" class="new rqrd input-text number" title="휴대폰번호" placeholder="휴대폰번호 입력 (’-’ 없이)">';
|
html += ' <input type="text" name="recpntMbtlnb" oninput="fn_set_event(this, \'keyup\', fn_fmt_telno)" maxlength="13" class="new rqrd input-text number" title="휴대폰번호" placeholder="휴대폰번호 입력 (’-’ 없이)">';
|
||||||
html += ' </td>';
|
html += ' </td>';
|
||||||
html += ' </tr>';
|
html += ' </tr>';
|
||||||
|
html += ' <tr class="">';
|
||||||
|
html += ' <th> <span class="orderInfo__title">개인통관번호</span></th>';
|
||||||
|
html += ' <td>';
|
||||||
|
html += ' <input type="text" name="cstmclerCd" maxlength="13" class="m-input" title="개인통관번호" placeholder="P로 시작하는 13자리 부호를 입력하세요">';
|
||||||
|
html += ' </td>';
|
||||||
|
html += ' </tr>';
|
||||||
html += ' <!-- 신규 배송지 선택 시 End -->';
|
html += ' <!-- 신규 배송지 선택 시 End -->';
|
||||||
html += ' <tr>';
|
html += ' <tr>';
|
||||||
html += ' <th><span class="orderInfo__title">배송요청사항</span></th>';
|
html += ' <th><span class="orderInfo__title">배송요청사항</span></th>';
|
||||||
@@ -1766,6 +1778,8 @@
|
|||||||
|
|
||||||
$('.presentArea').hide();
|
$('.presentArea').hide();
|
||||||
$('.presentArea').find('input').prop('disabled', true);
|
$('.presentArea').find('input').prop('disabled', true);
|
||||||
|
$('.cstmclerArea').hide();
|
||||||
|
$('.cstmclerArea').find('input').prop('disabled', true);
|
||||||
$('.presentShowArea').show();
|
$('.presentShowArea').show();
|
||||||
$('.presentShowArea').find('input').prop('disabled', false);
|
$('.presentShowArea').find('input').prop('disabled', false);
|
||||||
|
|
||||||
@@ -1786,6 +1800,8 @@
|
|||||||
if (dlvylcDvCd === 'New') {
|
if (dlvylcDvCd === 'New') {
|
||||||
$('.presentArea').show();
|
$('.presentArea').show();
|
||||||
$('.presentArea').find('input').prop('disabled', false);
|
$('.presentArea').find('input').prop('disabled', false);
|
||||||
|
$('.cstmclerArea').show();
|
||||||
|
$('.cstmclerArea').find('input').prop('disabled', false);
|
||||||
$('.presentShowArea').hide();
|
$('.presentShowArea').hide();
|
||||||
$('.presentShowArea').find('input').prop('disabled', true);
|
$('.presentShowArea').find('input').prop('disabled', true);
|
||||||
}
|
}
|
||||||
@@ -1836,6 +1852,17 @@
|
|||||||
$(form).find('input[name="dlvylcAdresDtl"]').val(data.dtlAdres);
|
$(form).find('input[name="dlvylcAdresDtl"]').val(data.dtlAdres);
|
||||||
$(form).find('input[name="dlvylcAdres"]').val('01' === $(form).find('input[name="dlvylcAdresDvCd"]').val() ? $(form).find('input[name="dlvylcRnmAdres"]').val() : $(form).find('input[name="dlvylcLnbAdres"]').val());
|
$(form).find('input[name="dlvylcAdres"]').val('01' === $(form).find('input[name="dlvylcAdresDvCd"]').val() ? $(form).find('input[name="dlvylcRnmAdres"]').val() : $(form).find('input[name="dlvylcLnbAdres"]').val());
|
||||||
|
|
||||||
|
let dlvylcAreaCd = $(form).find('input[name="dlvylcAreaCd"]').val();
|
||||||
|
|
||||||
|
if('JP' === dlvylcAreaCd){
|
||||||
|
|
||||||
|
$('.cstmclerArea').hide();
|
||||||
|
$('.cstmclerArea').find('input').prop('disabled', true);
|
||||||
|
} else {
|
||||||
|
$('.cstmclerArea').show();
|
||||||
|
$('.cstmclerArea').find('input').prop('disabled', false);
|
||||||
|
}
|
||||||
|
|
||||||
// 배송지 정보 세팅 이후 결제예정금액 재계산
|
// 배송지 정보 세팅 이후 결제예정금액 재계산
|
||||||
fn_get_setle_amt();
|
fn_get_setle_amt();
|
||||||
}
|
}
|
||||||
@@ -2742,7 +2769,7 @@
|
|||||||
|
|
||||||
if (fn_is_empty(val)) {
|
if (fn_is_empty(val)) {
|
||||||
|
|
||||||
alert('개인통관번호를 입력해 주십시요');
|
alert('개인통관번호를 입력해 주십시오');
|
||||||
|
|
||||||
$('#dlvylcForm').find('input[name="' + name + '"]').focus();
|
$('#dlvylcForm').find('input[name="' + name + '"]').focus();
|
||||||
|
|
||||||
@@ -3626,6 +3653,28 @@
|
|||||||
<span class="orderInfo__text recpntMbtlnb_ordrInfo_text"><c:out value="${dftDlvylc.mbtlnb}"/></span>
|
<span class="orderInfo__text recpntMbtlnb_ordrInfo_text"><c:out value="${dftDlvylc.mbtlnb}"/></span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${dftDlvylc.dlvylcAreaCd eq 'KR'}">
|
||||||
|
<tr class="deliveryAddressDefault">
|
||||||
|
<th><span class="orderInfo__title">개인통관번호</span></th>
|
||||||
|
<td>
|
||||||
|
<input type="hidden" id="cstmclerCd" class="dft" value="<c:out value="${dftDlvylc.cstmclerCd}"/>">
|
||||||
|
<%-- <span class="orderInfo__text cstmclerCd_ordrInfo_text"><c:out value="${dftDlvylc.cstmclerCd}"/></span>--%>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${not empty dftDlvylc.cstmclerCd}">
|
||||||
|
<input type="text" name="cstmclerCd" maxlength="13" class="orderInfo__text cstmclerCd_ordrInfo_text" title="개인통관번호" value="<c:out value="${dftDlvylc.cstmclerCd}"/>" placeholder="배송지 관리에서 입력하세요.">
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<input type="text" name="cstmclerCd" maxlength="13" class="orderInfo__text cstmclerCd_ordrInfo_text" title="개인통관번호" value="<c:out value="${dftDlvylc.cstmclerCd}"/>" placeholder="배송지 관리에서 입력하세요." readonly>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</tr>
|
||||||
|
</td>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<input type="hidden" id="cstmclerCd" name="cstmclerCd" class="dft" value="<c:out value="${dftDlvylc.cstmclerCd}"/>">
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
<!-- 기본 배송지 선택 시 End -->
|
<!-- 기본 배송지 선택 시 End -->
|
||||||
<!-- 신규 배송지 선택 시 Start -->
|
<!-- 신규 배송지 선택 시 Start -->
|
||||||
<tr class="deliveryAddressNew" style="display:none;">
|
<tr class="deliveryAddressNew" style="display:none;">
|
||||||
@@ -3658,6 +3707,12 @@
|
|||||||
<input type="text" name="recpntMbtlnb" oninput="fn_set_event(this, 'keyup', fn_fmt_telno)" maxlength="13" class="new rqrd input-text number rqrd_gift" title="휴대폰번호" placeholder="휴대폰번호 입력 (’-’ 없이)" readonly>
|
<input type="text" name="recpntMbtlnb" oninput="fn_set_event(this, 'keyup', fn_fmt_telno)" maxlength="13" class="new rqrd input-text number rqrd_gift" title="휴대폰번호" placeholder="휴대폰번호 입력 (’-’ 없이)" readonly>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr class="deliveryAddressNew cstmclerArea" style="display:none;">
|
||||||
|
<th> <span class="orderInfo__title">개인통관번호</span></th>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="cstmclerCd" maxlength="13" class="new rqrd input-text rqrd_gift" title="개인통관번호" placeholder="배송지 관리에서 입력하세요." readonly>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<!-- 신규 배송지 선택 시 End -->
|
<!-- 신규 배송지 선택 시 End -->
|
||||||
<tr class="presentShowArea" style="display:none;">
|
<tr class="presentShowArea" style="display:none;">
|
||||||
<th> <span class="orderInfo__title">선물메세지</span></th>
|
<th> <span class="orderInfo__title">선물메세지</span></th>
|
||||||
@@ -3944,7 +3999,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<div class="infoBox">
|
<div class="infoBox">
|
||||||
<div class="infoBox__title">예상 적립혜택</div>
|
<div class="infoBox" id="saveMlg">예상 적립혜택</div>
|
||||||
<ul class="infoBox__list">
|
<ul class="infoBox__list">
|
||||||
<li> 구매 확정 시 <i id="accmlMlgAmtSapn"></i> 적립
|
<li> 구매 확정 시 <i id="accmlMlgAmtSapn"></i> 적립
|
||||||
<c:forEach var="ntc" items="${data.mlgAccmlNtcList}">
|
<c:forEach var="ntc" items="${data.mlgAccmlNtcList}">
|
||||||
|
|||||||
Reference in New Issue
Block a user