|
|
@@ -541,30 +541,92 @@ public class TsfOrderService {
|
|
|
order.setFrontGb(TsfSession.getFrontGb());
|
|
|
Collection<Order> cartGoodsList = coreOrderService.getCartGoodsList(order);
|
|
|
|
|
|
- int orderDetailCurrPriceSum = 0;
|
|
|
- int orderDetailRealOrdAmtSum = 0;
|
|
|
- int cpn1DcAmtSum = 0;
|
|
|
- int tmtb1DcAmtSum = 0;
|
|
|
- int tmtb2DcAmtSum = 0;
|
|
|
- int goodsCpnDcAmtSum = 0;
|
|
|
- int cartCpnDcAmtSum = 0;
|
|
|
+ int orgGoodsSumAmt = 0;
|
|
|
+ int cpn1DcSumAmt = 0;
|
|
|
+ int tmtb1DcSumAmt = 0;
|
|
|
+ int tmtb2DcSumAmt = 0;
|
|
|
+ int goodsCpnDcSumAmt = 0;
|
|
|
+ int cartCpnDcSumAmt = 0;
|
|
|
+ int prePntDcSumAmt = 0;
|
|
|
+ int pntDcSumAmt = 0;
|
|
|
+ int gfcdUseSumAmt = 0;
|
|
|
+ int realOrdSumAmt = 0;
|
|
|
|
|
|
- int cartCurrPriceSum = 0;
|
|
|
- int cartRealOrdAmtSum = 0;
|
|
|
+ int cartOrgGoodsSumAmt = 0;
|
|
|
+ int cartRealOrdSumAmt = 0;
|
|
|
|
|
|
// 주문서화면 금액정보 체크
|
|
|
for (Order orderDetail : orderDetailList) {
|
|
|
- orderDetailCurrPriceSum = orderDetailCurrPriceSum + orderDetail.getCurrPrice();
|
|
|
- orderDetailRealOrdAmtSum = orderDetailRealOrdAmtSum + orderDetail.getRealOrdAmt();
|
|
|
+ orgGoodsSumAmt = orgGoodsSumAmt + orderDetail.getCurrPrice();
|
|
|
+ cpn1DcSumAmt = cpn1DcSumAmt + orderDetail.getCpn1DcAmt();
|
|
|
+ tmtb1DcSumAmt = tmtb1DcSumAmt + orderDetail.getTmtb1DcAmt();
|
|
|
+ tmtb2DcSumAmt = tmtb2DcSumAmt + orderDetail.getTmtb2DcAmt();
|
|
|
+ goodsCpnDcSumAmt = goodsCpnDcSumAmt + orderDetail.getGoodsCpnDcAmt();
|
|
|
+ cartCpnDcSumAmt = cartCpnDcSumAmt + orderDetail.getCartCpnDcAmt();
|
|
|
+ prePntDcSumAmt = prePntDcSumAmt + orderDetail.getPrePntDcAmt();
|
|
|
+ pntDcSumAmt = pntDcSumAmt + orderDetail.getPntDcAmt();
|
|
|
+ gfcdUseSumAmt = gfcdUseSumAmt + orderDetail.getGfcdUseAmt();
|
|
|
+ realOrdSumAmt = realOrdSumAmt + orderDetail.getRealOrdAmt();
|
|
|
}
|
|
|
|
|
|
+ if (orgGoodsSumAmt != order.getOrgGoodsSumAmt()) {
|
|
|
+ resultStr = "판매가 금액정보가 잘못 되었습니다.";
|
|
|
+ return resultStr;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (cpn1DcSumAmt != order.getCpn1DcSumAmt()) {
|
|
|
+ resultStr = "즉시할인 금액정보가 잘못 되었습니다.";
|
|
|
+ return resultStr;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (tmtb1DcSumAmt != order.getTmtb1DcSumAmt()) {
|
|
|
+ resultStr = "수량다다익선 할인 금액정보가 잘못 되었습니다.";
|
|
|
+ return resultStr;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (tmtb2DcSumAmt != order.getTmtb2DcSumAmt()) {
|
|
|
+ resultStr = "금액다다익선 할인 금액정보가 잘못 되었습니다.";
|
|
|
+ return resultStr;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (goodsCpnDcSumAmt != order.getGoodsCpnDcSumAmt()) {
|
|
|
+ resultStr = "상품쿠폰 할인 금액정보가 잘못 되었습니다.";
|
|
|
+ return resultStr;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (cartCpnDcSumAmt != order.getCartCpnDcSumAmt()) {
|
|
|
+ resultStr = "장바구니쿠폰 할인 금액정보가 잘못 되었습니다.";
|
|
|
+ return resultStr;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (prePntDcSumAmt != order.getPrePntDcSumAmt()) {
|
|
|
+ resultStr = "선포인트 할인 금액정보가 잘못 되었습니다.";
|
|
|
+ return resultStr;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (pntDcSumAmt != order.getPntDcSumAmt()) {
|
|
|
+ resultStr = "포인트 할인 금액정보가 잘못 되었습니다.";
|
|
|
+ return resultStr;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (gfcdUseSumAmt != order.getGfcdUseSumAmt()) {
|
|
|
+ resultStr = "상품권 사용 금액정보가 잘못 되었습니다.";
|
|
|
+ return resultStr;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (realOrdSumAmt != order.getRealOrdSumAmt()) {
|
|
|
+ resultStr = "실결제 금액정보가 잘못 되었습니다.";
|
|
|
+ return resultStr;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
// 장바구니 금액정보 체크
|
|
|
for (Order orderDetail : cartGoodsList) {
|
|
|
- cartCurrPriceSum = cartCurrPriceSum + orderDetail.getOrgCurrPrice();
|
|
|
+ cartOrgGoodsSumAmt = cartOrgGoodsSumAmt + orderDetail.getOrgCurrPrice();
|
|
|
}
|
|
|
|
|
|
// 판매가비교
|
|
|
- if (orderDetailCurrPriceSum != cartCurrPriceSum) {
|
|
|
+ if (orgGoodsSumAmt != cartOrgGoodsSumAmt) {
|
|
|
resultStr = "금액정보가 잘못 되었습니다.";
|
|
|
return resultStr;
|
|
|
}
|