package com.style24.batch.biz.dao;
import java.util.Collection;

import com.style24.core.support.annotation.ShopDs;
import com.style24.persistence.domain.Delivery;
import com.style24.persistence.domain.OrderChange;

/**
 * 배송 Dao
 *
 * @author moon
 * @since 2020. 12. 08
 */
@ShopDs
public interface TsbDeliveryDao {

	/**
	 * 총알배송 권역정보 갱신
	 * @param 
	 * @return
	 * @author moon
	 * @since 2020. 12. 08
	 */
	void mergeDailyDeliveryZone(Delivery delivery);

	/**
	 * 총알배송 권역정보 갱신
	 * @param 
	 * @return
	 * @author moon
	 * @since 2020. 12. 08
	 */
	void deleteDailyDeliveryZone();
	
	/**
	 * 회수예외 등록 -H
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 03. 02
	 */
	void insertTbOrderRecallException(Delivery delivery);
	
	/**
	 * 회수예외 등록 -D
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 03. 02
	 */
	void insertTbOrderRecallExceptionItem(Delivery delivery);
	
	/**
	 * 회수예외 등록 -M
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 03. 02
	 */
	void insertTbOrderRecallExceptionMemo(Delivery delivery);
	
	/**
	 * 회수예외 처리결과 조회
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 03. 02
	 */
	Collection<Delivery> getWithdrawExcRsltList();

	/**
	 * 회수처리결과 전송여부 
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 03. 03
	 */
	void updateTbOrderRecallException(Delivery delivery);
		
	/**
	 * 출고예외 등록 -H
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 03. 08
	 */
	void insertTbOrderDeliveryException(Delivery delivery);
	
	/**
	 * 출고예외 등록 -D
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 03. 08
	 */
	void insertTbOrderDeliveryExceptionItem(Delivery delivery);	
	
	/**
	 * 품절 사은품 재고 0 업데이트 
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 05. 03
	 */
	void updateTbFreegiftValSoldout(Delivery delivery);	
	
	
	/**
	 * 출고결과 반영
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 03. 09
	 */
	int updateTbOrderDtlStat(Delivery delivery);
	
	/**
	 * 회수결과등록 -TB_WITHDRAW
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 03. 19
	 */
	void insertTbWithdraw(Delivery delivery);
	
	/**
	 * 회수결과상세등록 -TB_WITHDRAW_DETAIL
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 03. 19
	 */
	void insertTbWithdrawDetail(Delivery delivery);
		
	/**
	 * 주문정보 조회 
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 03. 23
	 */
	Delivery getOrderInfoList(Delivery delivery);
	
	/**
	 * 주문정보 조회 
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 03. 23
	 */
	Delivery getOrderInfoList2(Delivery delivery);	
	/**
	 * 주문변경 회수완료
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 03. 25
	 */
	void updateTbOrderChange(Delivery delivery);
	
	/**
	 * 주문변경상세 회수완료 
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 03. 25
	 */
	void updateTbOrderChangeDetail(Delivery delivery);	
	
	/**
	 * 회수결과  주문상세 상태값 변경 
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 03. 25
	 */
	void updateWdOrderDtlStat(Delivery delivery);		
	
	/**
	 * 교환대기 상태값변경 
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 03. 25
	 */
	int updateOrderExch(Delivery delivery);		
	
	/**
	 * 출고 송장번호 등록 
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 03. 27
	 */	
	void insertTbOrdDtlInvoice(Delivery delivery);	
	
	/**
	 * 주문상세번호 조회 
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 04. 26
	 */
	Delivery getOrdDtlno(Delivery delivery);
	
	/**
	 * 주문상세번호 조회 
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 04. 26
	 */
	Delivery getOrdDtlno2(Delivery delivery);
		
	
	
	/**
	 * 출고 상태값변경 
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 03. 27
	 */	
	int updateOrdDtlStat(Delivery delivery);	
		
	
	/**
	 * 매장 상품재고 초기화 
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 03. 28
	 */	
	void deleteShopStock();	
	
	/**
	 * 매장 상품재고 등록 
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 03. 28
	 */	
	void insertShopStock(Delivery delivery);
	
	/**
	 * 출고대상 주문번호 조회 
	 * @param 
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2021. 04. 05
	 */
	Collection<Delivery> getOrderNoList();
	
	/**
	 * 출고대상 주문상세번호 조회 
	 * @param  Delivery
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2021. 04. 05
	 */
	Collection<Delivery> getOrderDtlNoList(Delivery ordNoData);
		
	/**
	 * 출고대상 주문상세아이템 조회 
	 * @param  Delivery
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2021. 04. 05
	 */
	Collection<Delivery> getOrderDtlItemList(Delivery ordDtlNoData);
	
	/**
	 * 출고처 및 상품 제외 조회 
	 * @param  Delivery
	 * @return int
	 * @author moon
	 * @since 2021. 04. 05
	 */
	int getDeliveryAssignBanGoods(Delivery ordDtlNoData);
	
	/**
	 * 출고처지정 등록 
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 04. 05
	 */	
	void insertTbDeliveryAssign(Delivery delivery);
	
	/**
	 * 출고처지정HST 등록 
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 04. 05
	 */	
	void insertTbDeliveryAssignHst(Delivery delivery);
	
	/**
	 * 주문상세 출고처지정
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 04. 05
	 */	
	void updateTbOrderDtlAssign(Delivery delivery);
	
	/**
	 * 출고처 및 상품 제외 조회 (직송매장) 
	 * @param  Delivery
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2021. 04. 06
	 */
	Delivery getDeliveryAssignBanGoodsShop(Delivery delivery);
	
	/**
	 * 출고처지정 임시 테이블 삭제
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 04. 06
	 */	
	void deleteTbDeliveryLocTmp();	
	
	/**
	 * 출고처지정 임시 테이블 등록 
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 04. 06
	 */	
	void insertTbDeliveryLocTmp(Delivery delivery);	
	
	/**
	 * 출고처지정 임시 테이블 등록 
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 04. 07
	 */	
	void insertTbDeliveryLocSetTmp(Delivery delivery);

	
	/**
	 * 출고처 지정 임시테이블 조회(직송매장) 
	 * @param  
	 * @return Delivery
	 * @author moon
	 * @since 2021. 04. 06
	 */
	Delivery getDeliveryLocTmp(Delivery delivery);
	
	
	/**
	 * 출고처 지정 임시테이블 세트상품갯수 max값 조회
	 * @param  
	 * @return int
	 * @author moon
	 * @since 2021. 04. 07
	 */
	int getDeliveryLocTmpGoodsSetMaxCnt();
	
	/**
	 * 출고처지정 임시 테이블 수정 
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 04. 07
	 */	
	void updateTbDeliveryLocSetTmp(Delivery delivery);
	
	/**
	 * 출고처지정 임시 테이블 세트상품갯수 초기화
	 * @param 
	 * @return
	 * @author moon
	 * @since 2021. 04. 07
	 */	
	void updateTbDeliveryLocSetTmpInit();
	
	/**
	 *  WMS 출고요청 대상 주문번호 조회 
	 * @param  Delivery
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2021. 04. 07
	 */
	Collection<Delivery> getWmsDeliveryOrdNoList();
	
	/**
	 *  WMS 출고요청 대상 조회
	 * @param  Delivery
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2021. 04. 07
	 */
	Collection<Delivery> getWmsDeliveryList(Delivery ordNoData);
	
	/**
	 *  WMS 회수요청 대상 조회
	 * @param  
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2021. 04. 08
	 */
	Collection<Delivery> getWithdrawRequestList();
	
	/**
	 * 주문변경상세 상태값 변경
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 04. 08
	 */	
	int updateTbOrderChaneDetailStat(Delivery delivery);
	
	/**
	 * 주문변경상세  반운송장번호 업데이트 
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 04. 12
	 */	
	void updateTbOrderChaneInvoc(Delivery delivery);
	
	/**
	 * 주문변경회수상태 업데이트 
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 04. 12
	 */	
	void updateTbOrderChangeStat(Delivery delivery);		
	
	/**
	 * 주문변경상세상태 업데이트 
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 04. 12
	 */	
	int updateTbOrderChangeDtlStat(Delivery delivery);		
	
	/**
	 * 주문변경 주문상세번호 조회
	 * @param  Delivery
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2021. 04. 14
	 */
	Collection<Delivery> getOrdChgDtlNoList(Delivery delivery);
	
	/**
	 * 배송추적 대상 조회     
	 * @param  
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2021. 04. 15
	 */
	Collection<Delivery> getDelvTrackingList();
	
	/**
	 * 주문 배송추적요청 완료 
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 04. 15
	 */	
	void updateSwtOrdInvcSendYn(Delivery delivery);	
	
	/**
	 * 회수 배송추적요청 완료 
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 04. 15
	 */	
	void updateSwtWdInvcSendYn(Delivery delivery);	
	
	/**
	 * 자동품절취소 대상 목록   (일반,예약)  
	 * @param  
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2021. 04. 26
	 */
	Collection<Delivery> getSoldoutOrderNoList();
	
	/**
	 * 자동품절취소 대상 주문상세목록     
	 * @param  
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2021. 04. 26
	 */
	Collection<Delivery> getSoldoutOrderDtlNoList(Delivery delivery);	
	
	/**
	 *  WMS 출고요청 대상 사은품 조회
	 * @param  Delivery
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2021. 04. 29
	 */
	Collection<Delivery> getWmsDeliveryGiftList(Delivery ordNoData);
	
	/**
	 * 품절대상 출고예외 주문 목록 조회   
	 * @param  
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2021. 05. 06
	 */
	Collection<Delivery> getSoldoutOrderExcNoList();
	
	/**
	 * 품절대상 출고예외 주문상세 목록 조회   
	 * @param  
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2021. 05. 06
	 */
	Collection<Delivery> getSoldoutOrderExcDtlNoList(Delivery delivery);		
	
	/**
	 * 품절대상 회수예외 주문 목록 조회   
	 * @param  
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2021. 05. 06
	 */
	Collection<Delivery> getSoldoutOrderRecallNoList();
	
	/**
	 * 품절대상 회수예외 주문상세 목록 조회   
	 * @param  
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2021. 05. 06
	 */
	Collection<Delivery> getSoldoutOrderRecallDtlNoList(Delivery delivery);		
	
	/**
	 * 출고예외 처리 완료    
	 * @param  Delivery
	 * @return 
	 * @author moon
	 * @since 2021. 05. 06
	 */
	void updateTbOrderDeliveryException(Delivery delivery);
	
	/**
	 * 회수예외 처리 완료    
	 * @param  Delivery
	 * @return 
	 * @author moon
	 * @since 2021. 05. 06
	 */
	void updateTbRecallException(Delivery delivery);
	
	/**
	 * 교환상품 출고예외등록 
	 * @param  Delivery
	 * @return 
	 * @author moon
	 * @since 2021. 06. 07
	 */
	void insertTbExchangeDelvFail(Delivery delivery);
	
	/**
	 * 자동 품절처리    
	 * @param  Delivery
	 * @return 
	 * @author moon
	 * @since 2021. 06. 08
	 */
	int updateSoldOut(Delivery delivery);
	
	/**
	 * 주문변경상세정보 조회
	 * @param  
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2021. 06. 14
	 */
	Collection<OrderChange> getOrderChangeDetailInfo(OrderChange delivery);
	
	/**
	 * 주문상세단품 SQ 조회
	 * @param  Delivery
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2021. 07. 02
	 */
	Collection<Delivery> getOrdDtlItemSq(Delivery ordNoData);
	
	/**
	 * 교환 출고예외 조회 
	 * @param  Delivery
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2021. 07. 07
	 */
	Collection<Delivery> getChgDelvExcList(Delivery ordNoData);	
	
	/**
	 * 교환 회수예외 조회 
	 * @param  Delivery
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2021. 07. 07
	 */
	Collection<Delivery> getChgRecallExcList(Delivery ordNoData);		
	
	/**
	 * 주문변경정보 조회 
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 07. 12
	 */
	Delivery getOrdchgSqInfo(Delivery delivery);
	
	/**
	 * 배송출발 알림문구 조회
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 07. 15
	 */
	Delivery getDeliveryStart(Delivery delivery);
		
	/**
	 * 회수시작 알림문구 조회
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 07. 15
	 */
	Delivery getWithdrawStart(Delivery delivery);
	
	/**
	 * 주문상세번호 조회 
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 08. 19
	 */
	Delivery getOrderDtlno(Delivery delivery);
}
