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

import market.Qms.com.vo.ComMscQuoteBacklog;

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

import com.hnshituo.orm.GenericMapper;

public interface ComMscQuoteBacklogMapper extends GenericMapper<ComMscQuoteBacklog,Object> {

	@Select("select to_char(nvl(max(to_number(substr(a.msc_pline,-6))),0)+1,'fm099999') from  COM_MSC_QUOTE_BACKLOG a ")
	String GetMaxNo();

	List<ComMscQuoteBacklog> findByPage(String string, Integer pageSize, Integer pageIndex);

	@Update("update COM_MSC_QUOTE_BACKLOG  set DELIVERY_STATE_CODE=null where msc_pline=#{msc_pline}")
	void UpdateDelivery(@Param("msc_pline")String msc_pline);

	@Update("update COM_MSC_QUOTE_BACKLOG a set a.VALIDFLAG='0' where  a.msc_pline=#{msc_pline}")
	void UpdateZf(@Param("msc_pline")String msc_pline);

	@Update("update COM_MSC_QUOTE_BACKLOG a set a.VALIDFLAG='1' where  a.msc_pline=#{msc_pline}")
	void UpdateHf(@Param("msc_pline")String msc_pline);
}
