/***文档注释***********************************************
 * 作者               :                   龙文航
 * 创建日期      :                   2017.12.6
 * 描述               :                   物流管理-理货单管理
 * 注意事项      :                   无
 * 遗留BUG :                   无
 * 修改日期      :                   
 * 修改人员      :                   
 * 修改内容      :                   
***********************************************************/
package market.Lms.Logistics.mapper;

import java.util.HashMap;
import java.util.List;

import market.Lms.Logistics.vo.SpmTransportDetail;

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

import com.hnshituo.orm.GenericMapper;

@SuppressWarnings("rawtypes")
public interface SpmTransportDetailMapper extends GenericMapper<SpmTransportDetail,Object> {
	public List<SpmTransportDetail> doQueryWebBySQL(int beginindex,int endindex,String distrbuteno,String state);
	
	public List<SpmTransportDetail> doQueryWebBySQLbon(int beginindex,int endindex,String distrbuteno);
	
	public int doQueryWebBySQLCount(String distrbuteno, String state);
	
	public void doDelete(String distrbuteno);
	
	public SpmTransportDetail doFind(String coilno,String billno);
	
	public void doDeleteByNo(String coilno,String boxno);
	
	public int doSumUnloadCount(String distrbuteno,String deliveryno,String lineno);
	
	public String doSumUnloadFactWeight(String distrbuteno,String deliveryno,String lineno);
	
	public String doSumUnloadTheoryWeight(String distrbuteno,String deliveryno,String lineno);
	
	public void doDeleteUnload(String distrbuteno,String deliveryno,String lineno);
	
	public List<SpmTransportDetail> doFindByNo(String distrbuteno,String deliveryno,String lineno);
	
	public List<HashMap> getNo(String param);
	
	public void doUpdate(SpmTransportDetail std);
	
	public void doInsert(SpmTransportDetail std);
	
	public String getLineno(String deliveryno,String distrbuteno);
	
	public SpmTransportDetail GexXxXinXi(String outbillno);
	
	@Select("select * from  spm_transport_detail t where t.bill_no = #{bill_no} and t.objectno =  #{objectno}  and t.state = '0'")
	public List<SpmTransportDetail> doFindSpm(@Param("bill_no")String bill_no,@Param("objectno")String objectno);

	public List<HashMap> doSelect(String billNo);
	
	public List<SpmTransportDetail> doSelectB(String billNo);
	
	public List<SpmTransportDetail> doSelectBF(String billNo);
	
	public List<SpmTransportDetail> doSelectSpm(String billNo);

	public List<SpmTransportDetail> doQueryWebBySQL1(String distrbuteno);
	
	public List<SpmTransportDetail> doQueryWebBySQL1F(String distrbuteno);
	
	/*统计边丝件数*/
	public List<SpmTransportDetail> doCoutBSqty(String distrbuteno);
	
	public Double doQuerySumWgt_KZ(@Param("param")List<String> outbillnoList);
	
	@Update("update SPM_TRANSPORT_DETAIL set FACTWEIGHT=#{factWeight} where OBJECTNO=#{coilNo}")
	public void spmTDetailU (@Param("factWeight")double factWeight, @Param("coilNo")String coilNo);
}
