package com.style24.admin.biz.dao;

import java.util.Collection;

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


/**
 * 배송관리 Dao
 *
 * @author moon
 * @since 2020. 11. 05
 */
@ShopDs
public interface TsaDeliveryDao {

	
	/**
	 * 배송 목록 건수
	 *
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 02. 26
	 */
	int getDeliveryListCount(Delivery delivery);

	
	/**
	 * 배송 목록
	 *
	 * @param delivery - 배송정보
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2020. 11. 05
	 */
	Collection<Delivery> getDeliveryList(Delivery delivery);

	/**
	 * 주문상세 단품 목록
	 *
	 * @param delivery - 배송정보
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2021. 03. 05
	 */
	Collection<Delivery> getDelvDetailItemList(Delivery ordDtlNo);
	
	/**
	 * 주문상세 상태 값 변경
	 *
	 * @param delivery 
	 * @return int
	 * @author moon
	 * @since 2020. 11. 05
	 */
	int updateOrderDetailStat(Delivery delivery);
	
	/**
	 * 송장번호 변경
	 *
	 * @param delivery 
	 * @return int
	 * @author moon
	 * @since 2020. 11. 05
	 */
	int saveChangeInvoice(Delivery delivery);
	
	/**
	 * 송장번호 변경
	 *
	 * @param delivery 
	 * @return int
	 * @author moon
	 * @since 2021. 06. 08
	 */
	int updateOrderDtlInvoice(Delivery delivery);
	
	
	
	/**
	 * 주문 상태 값 변경
	 *
	 * @param delivery 
	 * @return int
	 * @author moon
	 * @since 2020. 11. 05
	 */
	int updateOrderStat(Delivery delivery);
	

	/**************************************************************************************/
	
	int createOrderDetailHst(Delivery delivery);
	
	/**
	 * 주문 상세
	 *
	 * @param ordDtlNo - 주문상세번호
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2020. 11. 05
	 */
	Collection<Delivery> getOrderDetail(Integer ordDtlNo);	
	

	

	
	
	/**
	 * 출고금지상품 목록
	 *
	 * @param delivery
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2020. 11. 05
	 */
	Collection<Delivery> getBangoodsList(Delivery delivery);	
	
	/**
	 * 출고금지상품 삭제
	 *
	 * @param delivery
	 * @author moon
	 * @since 2020. 11. 05
	 */
	void deleteBangoods(Delivery delivery);	
	
	/**
	 * 출고금지상품 등록 대상목록
	 *
	 * @param delivery
	 * @return Collection<TsaDelivery>
	 * @author moon
	 * @since 2020. 11. 05
	 */
	Collection<Delivery> getBangoodsRegistList(Delivery delivery);

	/**
	 * 출고금지상품 카운트
	 *
	 * @param delivery
	 * @return int
	 * @author moon
	 * @since 2020. 11. 06
	 */
	int getBangoodsListCnt(Delivery delivery);

	/**
	 * 출고금지상품 등록
	 *
	 * @param delivery
	 * @author moon
	 * @since 2020. 11. 06
	 */
	void createBangoods(Delivery delivery);
	
	/**
	 * 배송/회수지시 목록 건수
	 *
	 * @param goodsSearch
	 * @return
	 * @author moon
	 * @since 2021. 03. 12
	 */
	int getDeliveryWithdrawDirectiveListCount(Delivery delivery);
	
	/**
	 * 배송/회수지시 목록
	 *
	 * @param Delivery - 배송/회수지시 정보
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2021. 03. 12
	 */	
	Collection<Delivery> getDeliveryWithdrawDirectiveList(Delivery delivery);
	
	/**
	 * 출고처지정 목록 건수
	 *
	 * @param 
	 * @return
	 * @author moon
	 * @since 2021. 04. 19
	 */
	int getAssignListCount(Delivery delivery);
	
	/**
	 * 출고처지정 목록
	 *
	 * @param Delivery 
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2021. 04. 19
	 */
	Collection<Delivery> getAssignList(Delivery delivery);	
	
	/**
	 * 출고처 수동지정 대상 조회
	 *
	 * @param ordDtlNo - 주문상세번호
	 * @return Delivery
	 * @author moon
	 * @since 2021. 04. 19
	 */
	Delivery getDeliveryAssignPopup(Integer ordDtlNo);
	
	
	
	
	
	
	/**
	 * 출고대상 주문상세아이템 조회 
	 *
	 * @param Delivery 
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2021. 04. 19
	 */
	Collection<Delivery> getOrdDtlNoItemList(Delivery delivery);		
	
	/**
	 * 출고처지정 임시 테이블 삭제 
	 *
	 * @param Delivery 
	 * @return 
	 * @author moon
	 * @since 2021. 04. 19
	 */
	void deleteTbDeliveryLocTmp(Delivery delivery);		
	
	
	/**
	 * 출고처지정 임시 테이블 등록(일반) 
	 *
	 * @param Delivery 
	 * @return 
	 * @author moon
	 * @since 2021. 04. 20
	 */
	void insertTbDeliveryLocTmp(Delivery delivery);		
	
	
	/**
	 * 출고처지정 임시 테이블 등록(세트) 
	 *
	 * @param Delivery 
	 * @return 
	 * @author moon
	 * @since 2021. 04. 20
	 */
	void insertTbDeliveryLocSetTmp(Delivery delivery);		
	
	
	/**
	 * 출고처 지정 임시테이블 세트상품갯수 max값 조회
	 * @param  
	 * @return int
	 * @author moon
	 * @since 2021. 04. 20
	 */
	int getDeliveryLocTmpGoodsSetMaxCnt(Delivery delivery);	
	
	/**
	 * 출고처지정 임시 테이블 수정 
	 * @param Delivery
	 * @return
	 * @author moon
	 * @since 2021. 04. 20
	 */	
	void updateTbDeliveryLocSetTmp(Delivery delivery);		
	
	/**
	 * 주문상세 출고처 지정대상 리스트
	 *
	 * @param Delivery 
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2021. 04. 20
	 */
	Collection<Delivery> getOrdDtlAssignLocList(Delivery delivery);		
	
	
	/**
	 * 출고처지정 등록
	 *
	 * @param Delivery
	 * @author moon
	 * @since 2021. 04. 20
	 */
	void createDeliveryAssign(Delivery delivery);	

	/**
	 * 출고처지정 이력 등록
	 *
	 * @param Delivery
	 * @author moon
	 * @since 2021. 04. 20
	 */
	void createDeliveryAssignHst(Delivery delivery);
	
	/**
	 * 주문상세 출고처 등록 
	 *
	 * @param Delivery
	 * @author moon
	 * @since 2021. 04. 20
	 */
	void updateOrdDtlDelvCd(Delivery delivery);
	
	/**
	 * 주문상세 아이템 목록 
	 *
	 * @param Delivery 
	 * @return Collection<Delivery>
	 * @author moon
	 * @since 2021. 04. 20
	 */
	Collection<Delivery> getOrdDtlItemList(Delivery delivery);		
	
	/**
	 * 출고지정 삭제
	 *
	 * @param Delivery
	 * @return void
	 * @throws 
	 * @author moon
	 * @since 2021. 04. 20
	 */
	void deleteTbDeliveryAssign(Delivery delivery);	
	
	/**
	 * 주문상세 출고처 지정 취소
	 *
	 * @param delivery
	 * @author moon
	 * @since 2021. 04. 20
	 */
	void cancelAssignDelvLoc(Delivery delivery);
	
	/**
	 * 교환배송미출고대상 목록
	 *
	 * @param Delivery 
	 * @return Collection<Delivery>
	 * @author jsh77b
	 * @since 2021. 06. 07
	 */
	Collection<Delivery> getExchangeDelvFailList(Delivery delivery);
	
	/**
	 * 수동 결품 
	 *
	 * @param delivery 
	 * @return int
	 * @author moon
	 * @since 2021. 06. 08
	 */
	int updateSoldOut(Delivery delivery);
	
}
