package com.style24.core.biz.dao;

import java.util.Collection;

import org.springframework.stereotype.Repository;

import com.style24.core.support.annotation.WmsDs;
import com.style24.persistence.domain.WmsDelivery;
import com.style24.persistence.domain.Order;

/**
 * Wms연동 Dao
 *
 * @author moon
 * @since 2021. 03. 15
 */
@WmsDs
@Repository
public interface TscWmsDao {
	
	/**
	 * WMS 실재고 조회
	 *
	 * @param WmsDelivery 
	 * @return WmsDelivery
	 * @author moon
	 * @since 2021. 03. 15
	 */
	WmsDelivery getRealStock(WmsDelivery wmsDelivery);
	
	/**
	 * WMS 주문취소여부 조회 
	 *
	 * @param WmsDelivery 
	 * @return String
	 * @author moon
	 * @since 2021. 03. 15
	 */
	String getCancelYn(WmsDelivery wmsDelivery);
	

	/**
	 * WMS 주문상세번호 유무 조회
	 *
	 * @param WmsDelivery 
	 * @return String
	 * @author moon
	 * @since 2021. 03. 17
	 */
	String getWmsOrdDtlNoYn(WmsDelivery wmsDelivery);
		
	/**
	 * WMS 주문 취소 
	 *
	 * @param WmsDelivery 
	 * @author moon
	 * @since 2021. 03. 17
	 */
	void updateWmsIfDeliveryOrderCancel(WmsDelivery wmsDelivery);
	
	/**
	 * WMS 주문상세 취소 
	 *
	 * @param WmsDelivery 
	 * @author moon
	 * @since 2021. 03. 17
	 */	
	void updateWmsIfDeliveryOrderItemCancel(WmsDelivery wmsDelivery);
	
	/**
	 * WMS 전체 취소 여부 
	 *
	 * @param WmsDelivery 
	 * @return String
	 * @author moon
	 * @since 2021. 03. 17
	 */
	String getWmsAllCancelYn(WmsDelivery wmsDelivery);	
	
	/**
	 * WMS 주문 사은품 취소 
	 *
	 * @param WmsDelivery 
	 * @author moon
	 * @since 2021. 03. 18
	 */		
	void updateWmsIfDeliveryOrderGiftCancel(WmsDelivery wmsDelivery);
	
	/**
	 * 출고처지정 지연재고 삭제
	 *
	 * @param WmsDelivery 
	 * @author moon
	 * @since 2021. 04. 27
	 */		
	void deleteWmsTbIfDelifixQty(WmsDelivery wmsDelivery);
	
	/**
	 * 출고처지정 지연재고 변경 
	 *
	 * @param WmsDelivery 
	 * @author moon
	 * @since 2021. 04. 27
	 */		
	void updateWmsTbIfDelifixQty(WmsDelivery wmsDelivery);
	
	/**
	 * WMS 회수지시 취소
	 *
	 * @param WmsDelivery 
	 * @author moon
	 * @since 2021. 06. 17
	 */	
	int updateWmsRecallCancel(WmsDelivery wmsDelivery);
	

	/**
	 * WMS 회수지시 여부 조회
	 * 
	 * @param WmsDelivery
	 * @return Collection<WmsDelivery>
	 * @author card007
	 * @since 2021. 06. 16
	 */
	Collection<WmsDelivery> getWmsWithdrawRequestInfo(WmsDelivery wmsDelivery);
	
	/**
	 * WMS 배송 주소변경
	 *
	 * @param WmsDelivery 
	 * @author moon
	 * @since 2021. 06. 30
	 */	
	int updateWmsDeliveryChangeAddr(Order order);
	
	/**
	 * WMS 회수 주소변경
	 *
	 * @param WmsDelivery 
	 * @author moon
	 * @since 2021. 06. 30
	 */	
	int updateWmsRecallChangeAddr(Order order);
	
}
