package market.Slm.DeliveryManagement.mapper;
import java.util.HashMap;
import java.util.List;

import market.Slm.DeliveryManagement.vo.SlmLadingBillDetail;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.hnshituo.orm.GenericMapper;

public interface SlmLadingBillDetailMapper extends GenericMapper<SlmLadingBillDetail,Object> {

	void doDelete(String detailNo);

	List<SlmLadingBillDetail> doQueryValid(SlmLadingBillDetail detail);
	
	List<SlmLadingBillDetail> findBillDetail(@Param("detail")SlmLadingBillDetail line_no);
	

	public String doQuarySolutionByCoilno(String coilno);
	
	public int doCountStorageByBillno(String billno,String storageattr);
	
	//提货单跟踪的导出功能 20200909 华pan
	@SuppressWarnings("rawtypes")
	public List<HashMap> doQuerySlbdForReport(String condition);
	
	@Select("delete from SLM_LADING_BILL_DETAIL where BILL_NO = #{billNo}")
	void doDeleteByBillNo (@Param("billNo") String billNo);
	
	@Select("select t.BILL_NO from SLM_LADING_BILL_DETAIL t left join SLM_LADING_BILL_HEAT sh on t.BILL_NO = sh.BILL_NO where t.COILNO = #{coilno} and nvl(sh.VALID_FLAG, '0') = '1' and nvl(sh.MEMO, 'a') != '一次结算'")
	String isCunZai(@Param("coilno") String coilno);
	
}
