package market.Mes.Pickle.Plan.mapper;
import market.Mes.Pickle.Plan.vo.PlnPicklePlan;

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 PlnPicklePlanMapper extends GenericMapper<PlnPicklePlan,Object> {

	@Update ("update PLN_PICKLE_PLAN set status =#{plp.status} where pc_plan_no=#{plp.pc_plan_no}")
	void doUpdate(@Param("plp")PlnPicklePlan plp);

	@Update ("update PLN_PICKLE_PLAN set mat_quantity = nvl(mat_quantity,0) + #{mat_quantity} , mat_weight = nvl(mat_weight,0) + #{mat_weight} where pc_plan_no=#{pc_plan_no}")
	void doUpdatePlaned(PlnPicklePlan plp);

	@Delete("delete from PLN_PICKLE_PLAN t where t.pc_plan_no = #{pc_plan_no}")
	void doDeletePcPlanNo(PlnPicklePlan pp);

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

	Integer doCount1(String v_mch_code, String material_no);
}

