package cn.net.caoyao.cpzshandset.db.presenter;

import java.util.List;

import android.database.Cursor;
import cn.net.caoyao.cpzshandset.bean.DriverInfoBean;
import cn.net.cpzslibs.prot.handset.bean.res.LogisticsDriverInfoBean;
import cn.net.cpzslibs.prot.handset.bean.res.YthDriverInfoBean;

public interface DriverInfoDal {
	
	int queryProductSubmitErrorByDriverIdAndRepId(DriverInfoBean b,long repertory_id);
	int queryProductSubmitErrorByDriverId(DriverInfoBean b);
	void insertLogisticsDriverInfo(LogisticsDriverInfoBean b);
	/**
	 * 插入司机信息列表
	 * @param beans
	 */
	void insertDriverInfoList(List<YthDriverInfoBean> beans);
	
	/**
	 * 插入单个司机信息
	 * @param b
	 */
	void insertDriverInfo(YthDriverInfoBean b);
	/**
	 * 查询所有的司机信息
	 * @return
	 */
	List<DriverInfoBean> queryAllDriverInfoDESC();
	
	/**
	 * 查询所有的司机信息
	 * @return
	 */
	List<DriverInfoBean> queryAllDriverInfoASC();
	/**
	 * 通过订单id查询司机信息
	 * @param orderId
	 * @return
	 */
	List<DriverInfoBean> queryDriverInfoByOrderId(long orderId);
	/**
	 * 根据司机id，查询司机信息
	 * @param id
	 * @return
	 */
	DriverInfoBean queryDriverInfoById(long id);
	
	/**
	 * 删除所有的司机信息
	 */
	void deleteAllDriverInfo();
	/**
	 * 通过订单id删除司机信息
	 * @param orderId
	 */
	void deleteDriverInfoByOrderId(long orderId);
	/**
	 * 通过司机id，删除司机信息
	 * @param id
	 */
	void deleteDriverInfoById(DriverInfoBean b);
	/**
	 * 通过订单id，统计司机信息的个数
	 * @param orderId
	 * @return
	 */
	int countDriverByOrderId(long orderId);
	
	void updateDriverStatusById(int error_code,int native_status,long id);
	
	DriverInfoBean getDriverInfo(Cursor c);
	boolean insertHasExist(long id);
	
	int queryLabelCountByDriverId(long driver_id);
	
	
	
	
}
