فهرست منبع

Merge remote-tracking branch 'origin/develop' into card007

card007 4 سال پیش
والد
کامیت
004c64dab5

+ 10 - 0
src/main/java/com/style24/core/biz/dao/TscOrderDao.java

@@ -1059,6 +1059,16 @@ public interface TscOrderDao {
 	 * @since 2021. 10. 27
 	 */
 	int getDeliveryBanZipcode(Order order);
+	
+	/**
+	 * 2021.10.25 결제실패정보등록
+	 *
+	 * @param Order
+	 * @return
+	 * @author jsh77b
+	 * @since 2021. 10. 25
+	 */
+	int createPaymentFail(Order order);
 }
 
 

+ 2 - 2
src/main/java/com/style24/core/biz/service/TscOrderChangeService.java

@@ -5862,11 +5862,11 @@ public class TscOrderChangeService {
 				if ("W".equals(orderChange.getWdGb())) {
 					orderChangeDao.createAddDeliveryFeeCancelPart(orderChange);
 
-					// 추가배송비 취소 정보 설정
+					// 추가배송비 취소 정보 설정19938874
 					if (StringUtils.isNotBlank(pg.getPgTid())) {
 						pg.setPayStat(TscConstants.PaymentStat.PAYMENT_CANCEL.value());
 						pg.setPayGb(TscConstants.PaymentGb.DELIVERY.value());
-						pg.setModType("STSC");
+						pg.setModType("STPC");
 						pg.setModDesc("가맹점 취소 - 부분 취소");
 						pg.setIpAddress(orderChange.getIpAddress());
 						pg.setRegNo(orderChange.getUserNo());

+ 1 - 1
src/main/java/com/style24/core/biz/service/TscWmsService.java

@@ -104,7 +104,7 @@ public class TscWmsService {
 		wmsDelv.setSkuCode(skuCode);
 		wmsDelv.setWhCode(TscConstants.WH_CODE);
 
-		log.info("wmsDelv {}" + wmsDelv);
+		//log.info("wmsDelv {}" + wmsDelv);
 		wmsRtn = wmsDao.getRealStock(wmsDelv);
 
 		return wmsRtn;

+ 4 - 3
src/main/java/com/style24/persistence/domain/Customer.java

@@ -201,10 +201,11 @@ public class Customer extends TscBaseDomain {
 		if (StringUtils.isBlank(this.cellPhnno)) {
 			return;
 		}
-		if (this.cellPhnno.length() > 10) {
-			this.cellPhnno = this.cellPhnno.substring(0, 3) + "-" + this.cellPhnno.substring(3, 7) + "-" + this.cellPhnno.substring(7, 11);
+		String tempCellPhone = this.cellPhnno.replaceAll("-", "");
+		if (tempCellPhone.length() > 10) {
+			this.cellPhnno = tempCellPhone.substring(0, 3) + "-" + tempCellPhone.substring(3, 7) + "-" + tempCellPhone.substring(7, 11);
 		} else {
-			this.cellPhnno = this.cellPhnno.substring(0, 3) + "-" + this.cellPhnno.substring(3, 6) + "-" + this.cellPhnno.substring(6, 10);
+			this.cellPhnno = tempCellPhone.substring(0, 3) + "-" + tempCellPhone.substring(3, 6) + "-" + tempCellPhone.substring(6, 10);
 		}
 	}
 

+ 19 - 0
src/main/java/com/style24/persistence/domain/Erp.java

@@ -48,4 +48,23 @@ public class Erp implements Serializable {
 	private String brandCd;		// 브랜드코드
 	private String dtSale;		// 판매일자
 
+	// BOS-한세ERP매출반영 화면에서 사용
+	private String tpSale;		// 판매구분(1:판매, 2:환불)
+	private int qtSale;			// 판매수량
+	private int amAcsale;		// 실판매금액(수량 * 단가)
+	private String dsRemark;	// 비고
+	private String noIf;		// YYYYMMDDHH24MISS(14자리) + 요청순번(4자리)
+	private String cdSalebill;	// 판매전표번호(매출일자, 브랜드 단위)
+	private String dsError;		// 실패메시지
+	private String startDt;		// 시작일자
+	private String endDt;		// 종료일자
+	private String status;		// 상태(S:성공, F:실패)
+	private String erpCdStyle;	// ERP스타일코드
+	private String erpCdColor;	// ERP색상코드
+	private String erpCdSize;	// ERP사이즈코드
+	private String mappingYn;	// 매핑등록여부
+	private Integer regNo;		// 등록자번호
+	private String regDt;		// 등록일시
+	private Integer updNo;		// 수정자번호
+
 }

+ 8 - 6
src/main/java/com/style24/persistence/domain/ExtmallOrder.java

@@ -685,10 +685,11 @@ public class ExtmallOrder extends TscBaseDomain {
 	// 휴대폰 번호 대쉬 붙이기
 	public void setHypenCellPhone() {
 		if (StringUtils.isNotBlank(this.cellPhnno)) {
-			if (this.cellPhnno.length() > 10) {
-				this.cellPhnno = this.cellPhnno.substring(0, 3) + "-" + this.cellPhnno.substring(3, 7) + "-" + this.cellPhnno.substring(7, 11);
+			String tempCellPhone = this.cellPhnno.replaceAll("-","");
+			if (tempCellPhone.length() > 10) {
+				this.cellPhnno = tempCellPhone.substring(0, 3) + "-" + tempCellPhone.substring(3, 7) + "-" + tempCellPhone.substring(7, 11);
 			} else {
-				this.cellPhnno = this.cellPhnno.substring(0, 3) + "-" + this.cellPhnno.substring(3, 6) + "-" + this.cellPhnno.substring(6, 10);
+				this.cellPhnno = tempCellPhone.substring(0, 3) + "-" + tempCellPhone.substring(3, 6) + "-" + tempCellPhone.substring(6, 10);
 			}
 		}
 	}
@@ -696,10 +697,11 @@ public class ExtmallOrder extends TscBaseDomain {
 	// 휴대폰 번호 대쉬 붙이기
 	public void setHypenRecipPhone() {
 		if (StringUtils.isNotBlank(this.cellPhnno)) {
-			if (this.recipPhnno.length() > 10) {
-				this.recipPhnno = this.recipPhnno.substring(0, 3) + "-" + this.recipPhnno.substring(3, 7) + "-" + this.recipPhnno.substring(7, 11);
+			String tempRecipPhone = this.cellPhnno.replaceAll("-","");
+			if (tempRecipPhone.length() > 10) {
+				this.cellPhnno = tempRecipPhone.substring(0, 3) + "-" + tempRecipPhone.substring(3, 7) + "-" + tempRecipPhone.substring(7, 11);
 			} else {
-				this.recipPhnno = this.recipPhnno.substring(0, 3) + "-" + this.recipPhnno.substring(3, 6) + "-" + this.recipPhnno.substring(6, 10);
+				this.cellPhnno = tempRecipPhone.substring(0, 3) + "-" + tempRecipPhone.substring(3, 6) + "-" + tempRecipPhone.substring(6, 10);
 			}
 		}
 	}

+ 11 - 6
src/main/java/com/style24/persistence/domain/Order.java

@@ -680,10 +680,11 @@ public class Order extends TscBaseDomain {
 	// 휴대폰 번호 대쉬 붙이기
 	public void setHypenCellPhone() {
 		if (StringUtils.isNotBlank(this.cellPhnno)) {
-			if (this.cellPhnno.length() > 10) {
-				this.cellPhnno = this.cellPhnno.substring(0, 3) + "-" + this.cellPhnno.substring(3, 7) + "-" + this.cellPhnno.substring(7, 11);
+			String tempCellPhone = this.cellPhnno.replaceAll("-", "");
+			if (tempCellPhone.length() > 10) {
+				this.cellPhnno = tempCellPhone.substring(0, 3) + "-" + tempCellPhone.substring(3, 7) + "-" + tempCellPhone.substring(7, 11);
 			} else {
-				this.cellPhnno = this.cellPhnno.substring(0, 3) + "-" + this.cellPhnno.substring(3, 6) + "-" + this.cellPhnno.substring(6, 10);
+				this.cellPhnno = tempCellPhone.substring(0, 3) + "-" + tempCellPhone.substring(3, 6) + "-" + tempCellPhone.substring(6, 10);
 			}
 		}
 	}
@@ -691,10 +692,11 @@ public class Order extends TscBaseDomain {
 	// 휴대폰 번호 대쉬 붙이기
 	public void setHypenRecipPhone() {
 		if (StringUtils.isNotBlank(this.recipPhnno)) {
-			if (this.recipPhnno.length() > 10) {
-				this.recipPhnno = this.recipPhnno.substring(0, 3) + "-" + this.recipPhnno.substring(3, 7) + "-" + this.recipPhnno.substring(7, 11);
+			String tempRecipPhone = this.recipPhnno.replaceAll("-", "");
+			if (tempRecipPhone.length() > 10) {
+				this.recipPhnno = tempRecipPhone.substring(0, 3) + "-" + tempRecipPhone.substring(3, 7) + "-" + tempRecipPhone.substring(7, 11);
 			} else {
-				this.recipPhnno = this.recipPhnno.substring(0, 3) + "-" + this.recipPhnno.substring(3, 6) + "-" + this.recipPhnno.substring(6, 10);
+				this.recipPhnno = tempRecipPhone.substring(0, 3) + "-" + tempRecipPhone.substring(3, 6) + "-" + tempRecipPhone.substring(6, 10);
 			}
 		}
 	}
@@ -814,4 +816,7 @@ public class Order extends TscBaseDomain {
 	
 	private String cnclsmsSendYn;	// 취소문자발송여부(Y:제휴몰에서발송, N:자사몰에서발송)
 	
+	private int stepNo;				// 순서번호
+	private String errMsg;			// 오류메세지
+	
 }

+ 10 - 8
src/main/java/com/style24/persistence/domain/OrderChange.java

@@ -284,21 +284,23 @@ public class OrderChange extends TscBaseDomain {
 
 	// 휴대폰 번호 대쉬 붙이기
 	public void setHypenRecipPhone() {
-		if (StringUtils.isNotBlank(this.recipPhnno) && !this.recipPhnno.contains("-")) {
-			if (this.recipPhnno.length() > 10) {
-				this.recipPhnno = this.recipPhnno.substring(0, 3) + "-" + this.recipPhnno.substring(3, 7) + "-" + this.recipPhnno.substring(7, 11);
+		if (StringUtils.isNotBlank(this.recipPhnno)) {
+			String tempRecipPhone = this.recipPhnno.replaceAll("-", "");
+			if (tempRecipPhone.length() > 10) {
+				this.recipPhnno = tempRecipPhone.substring(0, 3) + "-" + tempRecipPhone.substring(3, 7) + "-" + tempRecipPhone.substring(7, 11);
 			} else {
-				this.recipPhnno = this.recipPhnno.substring(0, 3) + "-" + this.recipPhnno.substring(3, 6) + "-" + this.recipPhnno.substring(6, 10);
+				this.recipPhnno = tempRecipPhone.substring(0, 3) + "-" + tempRecipPhone.substring(3, 6) + "-" + tempRecipPhone.substring(6, 10);
 			}
 		}
 	}
 
 	public void setHypenChgerPhone() {
-		if (StringUtils.isNotBlank(this.chgerPhnno) && !this.chgerPhnno.contains("-")) {
-			if (this.chgerPhnno.length() > 10) {
-				this.chgerPhnno = this.chgerPhnno.substring(0, 3) + "-" + this.chgerPhnno.substring(3, 7) + "-" + this.chgerPhnno.substring(7, 11);
+		if (StringUtils.isNotBlank(this.chgerPhnno)) {
+			String tempChgerPhone = this.chgerPhnno.replaceAll("-", "");
+			if (tempChgerPhone.length() > 10) {
+				this.chgerPhnno = tempChgerPhone.substring(0, 3) + "-" + tempChgerPhone.substring(3, 7) + "-" + tempChgerPhone.substring(7, 11);
 			} else {
-				this.chgerPhnno = this.chgerPhnno.substring(0, 3) + "-" + this.chgerPhnno.substring(3, 6) + "-" + this.chgerPhnno.substring(6, 10);
+				this.chgerPhnno = tempChgerPhone.substring(0, 3) + "-" + tempChgerPhone.substring(3, 6) + "-" + tempChgerPhone.substring(6, 10);
 			}
 		}
 	}

+ 25 - 7
src/main/java/com/style24/persistence/mybatis/shop/TscOrder.xml

@@ -2865,7 +2865,7 @@
 			            ELSE 0
 			            END  SHOT_DELV_ABLE_YN
 			FROM   TB_ENVSET ENV
-			LEFT   OUTER JOIN TB_BIZDAY BIZ
+			LEFT   OUTER JOIN TB_BIZDAY2 BIZ
 			ON     1=1
 			AND    BIZ.BIZDAY = DATE_FORMAT(NOW(), '%Y%m%d')
 			WHERE  1=1
@@ -5681,12 +5681,10 @@
 		/* TscOrder.getCustPaymeans : 최근적용한결제정보 */
 		SELECT PAY_MEANS
 		     , PG_GB
-		FROM   TB_PAYMENT
+		FROM   TB_CUST_PG_GB
 		WHERE  1=1
-		AND    REG_NO = #{custNo}
-		AND    PAY_STAT = 'G016_30'
-		AND    PAY_GB = 'O'
-		ORDER  BY REG_DT DESC
+		AND    CUST_NO = #{custNo}
+		AND    DEL_YN = 'N'
 		LIMIT  1
 	</select>
 	
@@ -5726,7 +5724,7 @@
 	</insert>
 	
 	<!-- 자주쓰는결제정보수정 -->
-	<insert id="updateCustPgGb" parameterType="Order">
+	<update id="updateCustPgGb" parameterType="Order">
 		/* TscOrder.updateCustPgGb : 자주쓰는결제정보수정 */
 		UPDATE TB_CUST_PG_GB
 		SET    PG_GB = #{pgGb}
@@ -5735,6 +5733,26 @@
 		     , UPD_DT = NOW()
 		WHERE  1=1
 		AND    CUST_NO = #{custNo}
+	</update>
+	
+	<!-- 2021.10.25 결제실패정보등록 -->
+	<insert id="createPaymentFail" parameterType="Order">
+		/* TscOrder.createPaymentFail : 결제실패정보등록 */
+		INSERT INTO TB_PAYMENT_FAIL (
+			ORD_NO
+			, STEP_NO
+			, PG_GB
+			, ERR_MSG
+			, REG_NO
+			, REG_DT
+		) VALUES (
+			#{ordNo}
+			, #{stepNo}
+			, #{pgGb}
+			, #{errMsg}
+			, #{regNo}
+			, NOW()
+		)
 	</insert>
 
 	<!-- 출고금지지역 여부 조회 -->

+ 86 - 89
src/main/java/com/style24/persistence/mybatis/wms/TscWmsDelivery.xml

@@ -5,54 +5,45 @@
 	<!-- 실재고 조회 -->
 	<select id="getRealStock" parameterType="WmsDelivery" resultType="WmsDelivery" timeout="300">
 		/* TscWmsDelivery.getRealStock */
-		SELECT 
-			  'ST0001' AS STOCK_LOC
-			, A.PRODUCT_NO
-			, A.SKU_CODE
-			, MAX(A.LOC_QTY) - MAX(A.SLIP_CREATE_QTY) - MAX(A.CVS_QTY) - MAX(A.EOUT_CREATE_QTY)  - SUM(A.Qty) AS LOC_QTY
+		SELECT 'ST0001' AS STOCK_LOC
+		     , A.PRODUCT_NO
+		     , A.SKU_CODE
+		     , MAX(A.LOC_QTY) - MAX(A.SLIP_CREATE_QTY) - MAX(A.CVS_QTY) - MAX(A.EOUT_CREATE_QTY)  - SUM(A.Qty) AS LOC_QTY
 		  FROM (
-			SELECT  
-				  PRODUCT_NO
-				, SKU_CODE
-				, LOC_QTY
-				, 0  AS SLIP_CREATE_QTY
-				, 0  AS CVS_QTY
-				, 0  AS EOUT_CREATE_QTY
-				, 0  AS QTY 
-			  FROM istyle24_Wms.dbo.VW_Stock_By_LocCode
-			 WHERE PRODUCT_NO = #{productNo}
-			   AND SKU_CODE   = #{skuCode}
-			   AND WH_CODE    = #{whCode}
-			
-			UNION ALL 
-			
-			SELECT 
-				  PRODUCT_NO        
-				, SKU_CODE          
-				, 0                 AS LOC_QTY
-				, SLIP_CREATE_QTY   AS SLIP_CREATE_QTY
-				, CVS_QTY           AS CVS_QTY
-				, EOUT_CREATE_QTY   AS EOUT_CREATE_QTY
-				, 0 
+		    SELECT PRODUCT_NO
+		         , SKU_CODE
+		         , LOC_QTY
+		         , 0  AS SLIP_CREATE_QTY
+		         , 0  AS CVS_QTY
+		         , 0  AS EOUT_CREATE_QTY
+		         , 0  AS QTY 
+		      FROM istyle24_Wms.dbo.VW_Stock_By_LocCode
+		     WHERE PRODUCT_NO = #{productNo}
+		       AND SKU_CODE   = #{skuCode}
+		       AND WH_CODE    = #{whCode}
+			 UNION ALL 
+			SELECT PRODUCT_NO        
+				 , SKU_CODE          
+				 , 0                 AS LOC_QTY
+				 , SLIP_CREATE_QTY   AS SLIP_CREATE_QTY
+				 , CVS_QTY           AS CVS_QTY
+				 , EOUT_CREATE_QTY   AS EOUT_CREATE_QTY
+				 , 0 
 			  FROM istyle24_Wms.dbo.TLOST06M WITH (NOLOCK)
 			 WHERE PRODUCT_NO = #{productNo}
 			   AND SKU_CODE   = #{skuCode}
 			   AND WH_CODE    = #{whCode}
-		    
 			UNION ALL
-			
-			SELECT 
-				  ProductNo
-				, SKUCode
-				, 0  AS LOC_QTY
-				, 0  AS SLIP_CREATE_QTY
-				, 0  AS CVS_QTY
-				, 0  AS EOUT_CREATE_QTY
-			    , Qty
+			SELECT ProductNo
+				 , SKUCode
+				 , 0  AS LOC_QTY
+				 , 0  AS SLIP_CREATE_QTY
+				 , 0  AS CVS_QTY
+				 , 0  AS EOUT_CREATE_QTY
+			     , Qty
 			  FROM iSTYLE24_WmsIf.dbo.TB_IF_DELIFIX_QTY
 			 WHERE ProductNo = #{productNo}
 			   AND SKUCode   = #{skuCode}
-			   
 			) A GROUP BY A.PRODUCT_NO, A.SKU_CODE	
 	</select>
 	
@@ -67,8 +58,7 @@
 		       AND orderDtlNo = #{ordDtlNo}
 		 ]]>      
    </select>
-   
-   
+
 	<!-- WMS 주문번호상세 존재여부  -->
 	<select id="getWmsOrdDtlNoYn" parameterType="WmsDelivery" resultType="String">
 		/* TscWmsDelivery.getWmsOrdDtlNoYn */
@@ -93,17 +83,23 @@
 			WHERE OrderNo = #{ordNo}
 			  AND StatusCd !='60'
 	</update>
-	
-	      
+
 	<!-- WMS 배송상세 취소  -->
 	<update id="updateWmsIfDeliveryOrderItemCancel" parameterType="WmsDelivery">
 		/* TscWmsDelivery.updateWmsIfDeliveryOrderItemCancel */
-			UPDATE istyle24_Wmsif.dbo.TB_IF_DeliveryOrderItem  SET
-			  StatusCd = CASE WHEN (Qty - Cqty) = #{itemQty} THEN '60' ELSE StatusCd END 
-			, IsCancel = CASE WHEN (Qty - Cqty) = #{itemQty} THEN 1    ELSE IsCancel END 
-			, Cqty     = CASE WHEN (SELECT COUNT(*) FROM istyle24_Wmsif.dbo.TB_IF_RecallExceptionItem B WHERE B.OrderDtlNo = #{ordDtlNo} AND B.ProductNo = #{productNo} AND B.SKUCode = #{optCd}   AND B.ReasonCode IN ('08','10') ) > 0 THEN Cqty ELSE  Cqty + #{itemQty} END
-			, DateLastModified = GETDATE()
-			, ExceptionDesc = #{ExceptionDesc}
+			UPDATE istyle24_Wmsif.dbo.TB_IF_DeliveryOrderItem  
+			SET    StatusCd = CASE WHEN (Qty - Cqty) = #{itemQty} THEN '60' ELSE StatusCd END 
+			     , IsCancel = CASE WHEN (Qty - Cqty) = #{itemQty} THEN 1    ELSE IsCancel END 
+			     , Cqty     = CASE WHEN (SELECT COUNT(*) 
+			                             FROM   istyle24_Wmsif.dbo.TB_IF_RecallExceptionItem B 
+			                             WHERE  B.OrderDtlNo = #{ordDtlNo} 
+			                             AND    B.ProductNo = #{productNo} 
+			                             AND    B.SKUCode = #{optCd}   
+			                             AND    B.ReasonCode IN ('08','10') ) > 0 THEN Cqty 
+			                       ELSE Cqty + #{itemQty} 
+			                       END
+			     , DateLastModified = GETDATE()
+			     , ExceptionDesc = #{ExceptionDesc}
 			WHERE 1=1
 			  AND OrderDtlNo = #{ordDtlNo}
 			  AND ProductNo  = #{productNo}
@@ -114,62 +110,62 @@
 	<select id="getWmsAllCancelYn" parameterType="WmsDelivery" resultType="String">
 		/* TscWmsDelivery.getWmsAllCancelYn */
 	    <![CDATA[
-		SELECT CASE WHEN COUNT(*) > 0 THEN 'N' ELSE 'Y' END AS CHK_YN 
+		SELECT CASE WHEN COUNT(*) > 0 
+		            THEN 'N' 
+		            ELSE 'Y' 
+		            END AS CHK_YN 
 		  FROM istyle24_Wmsif.dbo.TB_IF_DeliveryOrder A,  
 		       istyle24_Wmsif.dbo.TB_IF_DeliveryOrderItem B
 		 WHERE A.DeliveryOrderNo = B.DeliveryOrderNo 
 		   AND A.OrderNo   = #{ordNo}
 		   AND B.StatusCd != '60'
-		   AND (B.GiftYn   != 'Y' OR B.GiftYn IS NULL )
+		   AND (B.GiftYn  != 'Y' OR B.GiftYn IS NULL )
 		 ]]>      
    </select>
    	
 	<!-- WMS 배송 사은품 취소  -->
 	<update id="updateWmsIfDeliveryOrderGiftCancel" parameterType="WmsDelivery">
 		/* TscWmsDelivery.updateWmsIfDeliveryOrderGiftCancel */
-		UPDATE istyle24_Wmsif.dbo.TB_IF_DeliveryOrderItem SET 
-			  StatusCd = '60'
-			, IsCancel = 1
-		WHERE DeliveryOrderNo = ( SELECT MAX(A.DeliveryOrderNo) AS DeliveryOrderNo
+		UPDATE istyle24_Wmsif.dbo.TB_IF_DeliveryOrderItem 
+		SET    StatusCd = '60'
+			 , IsCancel = 1
+		WHERE  DeliveryOrderNo = (SELECT MAX(A.DeliveryOrderNo) AS DeliveryOrderNo
 				                    FROM istyle24_Wmsif.dbo.TB_IF_DeliveryOrder A,  
 				                         istyle24_Wmsif.dbo.TB_IF_DeliveryOrderItem B
 				                   WHERE A.DeliveryOrderNo = B.DeliveryOrderNo 
 				                     AND A.OrderNo   = #{ordNo}
 				                     AND B.StatusCd != '60'
-				                     AND B.GiftYn    = 'Y' )
+				                     AND B.GiftYn    = 'Y')
 	</update>   	
 
 	<!-- 출고처지정 지연재고 삭제     -->
 	<delete id="deleteWmsTbIfDelifixQty" parameterType="WmsDelivery" >
 		/*TscWmsDelivery.deleteWmsTbIfDelifixQty*/
 		DELETE FROM iSTYLE24_WmsIf.dbo.TB_IF_DELIFIX_QTY 
-		WHERE OrderNo    = #{ordNo}
+		WHERE  OrderNo = #{ordNo}
 	</delete>
 	
 	<!-- 출고처지정 지연재고 변경  -->
 	<update id="updateWmsTbIfDelifixQty" parameterType="WmsDelivery">
 		/* TscWmsDelivery.updateWmsTbIfDelifixQty */
-		UPDATE iSTYLE24_WmsIf.dbo.TB_IF_DELIFIX_QTY SET
-			Qty = Qty - #{itemQty}
-		WHERE OrderNo    = #{ordNo}
-		  AND OrderDtlNo = #{ordDtlNo}
-		  AND SKUCode    = #{optCd} 
-		  AND ProductNo  = #{productNo}
+		UPDATE iSTYLE24_WmsIf.dbo.TB_IF_DELIFIX_QTY 
+		SET    Qty = Qty - #{itemQty}
+		WHERE  OrderNo    = #{ordNo}
+		  AND  OrderDtlNo = #{ordDtlNo}
+		  AND  SKUCode    = #{optCd} 
+		  AND  ProductNo  = #{productNo}
 	</update>
 	
 	<!-- WMS 회수지시 삭제  -->
 	<update id="updateWmsRecallCancel" parameterType="WmsDelivery">
 		/* TscWmsDelivery.updateWmsRecallCancel */
-		UPDATE iSTYLE24_WmsIf.dbo.TB_IF_RecallDelivery SET
-			  IsDeleted    = 1
-			, DateCreated  = GETDATE()
-		WHERE OrderExceptionNo  = #{ordChgSq}
-		  AND OrderNo           = #{ordNo}
-		  AND IsDeleted         = 0
+		UPDATE iSTYLE24_WmsIf.dbo.TB_IF_RecallDelivery 
+		SET    IsDeleted    = 1
+			 , DateCreated  = GETDATE()
+		WHERE  OrderExceptionNo  = #{ordChgSq}
+		  AND  OrderNo           = #{ordNo}
+		  AND  IsDeleted         = 0
 	</update>
-	
-	
-	
 
 	<!-- WMS 회수지시 여부 조회 -->
 	<select id="getWmsWithdrawRequestInfo" parameterType="WmsDelivery" resultType="WmsDelivery" timeout="300">
@@ -206,28 +202,28 @@
 	<!-- WMS 배송 주소변경  -->
 	<update id="updateWmsDeliveryChangeAddr" parameterType="Order">
 		/* TscWmsDelivery.updateWmsDeliveryChangeAddr */
-		UPDATE istyle24_Wmsif.dbo.TB_IF_DeliveryOrder  SET
-		  DeliveryPostalCode = #{recipZipcode}
-		, DeliveryAddr1      = #{recipBaseAddr}
-		, DeliveryAddr2      = #{recipDtlAddr}
-		, IsChangeAddress    = 1
-		, DeliveryMemo       = #{delvMemo}
-		WHERE OrderNo  = #{ordNo}
-		  AND IsCancel = 0
+		UPDATE istyle24_Wmsif.dbo.TB_IF_DeliveryOrder  
+		SET    DeliveryPostalCode = #{recipZipcode}
+		     , DeliveryAddr1      = #{recipBaseAddr}
+		     , DeliveryAddr2      = #{recipDtlAddr}
+		     , IsChangeAddress    = 1
+		     , DeliveryMemo       = #{delvMemo}
+		 WHERE OrderNo  = #{ordNo}
+		   AND IsCancel = 0
 	</update>
 
 	<!-- WMS 회수 주소변경  -->
 	<update id="updateWmsRecallChangeAddr" parameterType="Order">
 		/* TscWmsDelivery.updateWmsRecallChangeAddr */
-		UPDATE istyle24_Wmsif.dbo.TB_IF_RecallDelivery SET
-		  DeliveryPostalCode = #{chgerZipcode}
-		, DeliveryAddr1      = #{chgerBaseAddr}
-		, DeliveryAddr2      = #{chgerDtlAddr}
-		, chgerRtnMemo       = #{chgerRtnMemo}
-		, DateCSMemoUpdated  = GETDATE() 
-		WHERE OrderExceptionNo = #{ordChgSq}
-		  AND OrderNo   = #{ordNo}
-		  AND IsDeleted = 0
+		UPDATE istyle24_Wmsif.dbo.TB_IF_RecallDelivery 
+		SET    DeliveryPostalCode = #{chgerZipcode}
+		     , DeliveryAddr1      = #{chgerBaseAddr}
+		     , DeliveryAddr2      = #{chgerDtlAddr}
+		     , chgerRtnMemo       = #{chgerRtnMemo}
+		     , DateCSMemoUpdated  = GETDATE() 
+		 WHERE OrderExceptionNo = #{ordChgSq}
+		   AND OrderNo   = #{ordNo}
+		   AND IsDeleted = 0
 	</update>
 
 	<!-- WMS 배송메모 변경  -->
@@ -250,5 +246,6 @@
 		   AND OrderNo = #{ordNo}
 		   AND IsDeleted = 0
 	</update>
+	
 </mapper>