package market.Mes.anneal.mapper;
import market.Mes.anneal.vo.PlnAnnealPlan;

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

import com.hnshituo.orm.GenericMapper;

public interface PlnAnnealPlanMapper extends GenericMapper<PlnAnnealPlan,Object> {

	@Update ("update PLN_ANNEAL_PLAN set status =#{plp.status} where an_plan_no=#{plp.an_plan_no}")
	void doUpdate(@Param("plp")PlnAnnealPlan plp);

	@Update ("update PLN_ANNEAL_PLAN set mat_quantity = nvl(mat_quantity,0) + #{mat_quantity} , mat_weight = nvl(mat_weight,0) + #{mat_weight} where an_plan_no=#{an_plan_no}")
	void doUpdatePlaned(PlnAnnealPlan plp);

	@Delete("delete from PLN_ANNEAL_PLAN t where t.an_plan_no = #{an_plan_no}")
	void doDeleteAnPlanNo(PlnAnnealPlan pp);

	@Update(" update PLN_ANNEAL_PLAN set plan_seq = #{param1.plan_seq} where an_plan_no = #{param1.an_plan_no} and plan_seq = #{param2}")
	int doUpdateSeq(PlnAnnealPlan pln, Integer i);
}
