package market.Qms.qcm.mapper;
import java.util.List;

import market.Qms.qcm.vo.QcmJhySampleConsignDItem;

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

import com.hnshituo.orm.GenericMapper;

public interface QcmJhySampleConsignDItemMapper extends GenericMapper<QcmJhySampleConsignDItem,Object> {

	void doDeleteEntrustCom(String specimen_no);
	public List<QcmJhySampleConsignDItem> getConsignDItemSample(String spe);
	public List<QcmJhySampleConsignDItem>  getitemsample(String spe);
	List<QcmJhySampleConsignDItem> findByQuote(String heat_no, String specimen_no, String phy_code_m);

	List<QcmJhySampleConsignDItem> findByBatch(String batch_no, String specimen_no, String phy_code_m);
	List<QcmJhySampleConsignDItem> findBySec(String specimen_no);
	@Update("update QCM_JHY_SAMPLE_CONSIGN_D_ITEM set QUOTE_SPECIMEN_NO=#{quote_specimen_no},QUOTE_PHY_CODE_L=#{quote_phy_code_l},QUOTE_PHY_CODE_M=#{quote_phy_code_m},QUOTE_PHY_CODE_S=#{quote_phy_code_s},QUOTE_ITEM_CODE_D=#{quote_item_code_d},QUOTE_ITEM_CODE_T=#{quote_item_code_t},QUOTE_ITEM_CODE_S=#{quote_item_code_s} where SPECIMEN_NO=#{specimen_no} and SEQ=${seq}")
	void updateQuote(@Param("specimen_no") String specimen_no, @Param("seq") Long seq,
			@Param("quote_specimen_no") String quote_specimen_no, @Param("quote_phy_code_l") String quote_phy_code_l,
			@Param("quote_phy_code_m") String quote_phy_code_m, @Param("quote_phy_code_s") String quote_phy_code_s,
			@Param("quote_item_code_d") String quote_item_code_d, @Param("quote_item_code_s") String quote_item_code_s,
			@Param("quote_item_code_t") String quote_item_code_t);
	
	@Update("update QCM_JHY_SAMPLE_CONSIGN_D_ITEM set QUOTE_ITEM_CODE_D=null where SPECIMEN_NO=#{specimen_no} and SEQ=${seq}")
	void updateDNull(@Param("specimen_no")String specimen_no, @Param("seq")Long seq);
	
	@Update("update QCM_JHY_SAMPLE_CONSIGN_D_ITEM set QUOTE_ITEM_CODE_S=null where SPECIMEN_NO=#{specimen_no} and SEQ=${seq}")
	void updateSNull(@Param("specimen_no")String specimen_no, @Param("seq")Long seq);
	
	@Update("update QCM_JHY_SAMPLE_CONSIGN_D_ITEM set QUOTE_ITEM_CODE_T=null where SPECIMEN_NO=#{specimen_no} and SEQ=${seq}")
	void updatTNull(@Param("specimen_no")String specimen_no, @Param("seq")Long seq);
}
