package market.Mes.OrderManager.Plan.mapper;
import java.util.HashMap;
import java.util.List;

import market.Mes.OrderManager.Plan.vo.PlnProdorder;
import market.Mes.OrderManager.Plan.vo.PlnProdorderSum;

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

import com.hnshituo.orm.GenericMapper;

@SuppressWarnings("rawtypes")
public interface PlnProdorderMapper extends GenericMapper<PlnProdorder,Object> {
	void doDelete(String order_no);

	void doDeleteProdOderNo(String sId);

	List<PlnProdorderSum> doLengthwiseQueryWeb(PlnProdorder pp, String sWhere);

	List<PlnProdorder> doQueryOrderReceive(PlnProdorder order,
			String startTime, String endTime, String deStartTime,
			String deEndTime, int i, int j, String string);

	/**
	 * 查询生产订单  
	 * @param pp
	 * @param sWhere
	 * @return
	 */	
	List<HashMap> doQueryStatistics(PlnProdorder pp, String sWhere,int i, int j);
	long doQueryStatisticsCount(PlnProdorder object, String sWhere);
	
	
	int doQueryOrderReceiveCount(PlnProdorder order, String startTime,
			String endTime, String deStartTime, String deEndTime, String string);

	void doOrderIssuedCancel(PlnProdorder pu);

	List<PlnProdorder> doQueryOrderReceived(PlnProdorder object, String sWhere,
			int i, int j);

	long doQueryOrderReceivedCount(PlnProdorder object, String startTime);

	List<HashMap> doQueryWaitRelationOrder(PlnProdorder object,String sWhere);

	//订单进程跟踪查询
	List<HashMap> doQueryPlnStatistics2(PlnProdorder object, String sWhere);
	
	List<PlnProdorder> doQuery(PlnProdorder object, String sWhere, int i,int pageSize);

	long doQueryCount(PlnProdorder object, String sWhere);

	List<PlnProdorder> doQueryPrint(PlnProdorder pp);

	List<PlnProdorder> YdmCoilNoForPlnProdorder(String order_no);

	List<PlnProdorder> doCuttoLengthQueryWeb(PlnProdorder object, String sWhere);

	//  横剪 2018-06-21 查询计划模块已接收过的未排产的生产订单
	List<HashMap> doQueryUnscheduledProdorder(PlnProdorder object, String sWhere);

	// 制程产线确认
	void doUpdate(PlnProdorder pp);
	//  罩退 2018-09-19 查询计划模块已接收过的未排产的生产订单
	List<HashMap> doQueryAnnealProdorderInfo(PlnProdorder object, String sWhere);

	// 平整
	List<HashMap> doQuerySrProdorderInfo(PlnProdorder object, String sWhere);

	@Update("update pln_prodorder set finished_status = 2 where order_no = #{order_no}")
	void updateOrderStatus(String order_no);

	List<HashMap> doQueryRollingProdorderInfo(PlnProdorder object, String sWhere);

	//  酸洗 2019-04-23 查询计划模块已接收过的未排产的生产订单
	List<HashMap> doQueryPickleProdorderInfo(PlnProdorder object, String sWhere);

	List<HashMap> queOrdInfo(PlnProdorder object, String sWhere);

	//订单关闭与开启
	@Update("update pln_prodorder t set t.is_closed = #{is_closed} where t.prod_order_no = #{prod_order_no}")
	public void doUpdatePlnProdorderIsClosed(@Param("prod_order_no")String prod_order_no,@Param("is_closed")String is_closed);
	
	
	public List<HashMap> doQueryWaitGuaDan(PlnProdorder object, String condition);
	
	
}
