package cn.net.caoyao.cpzshandset.service.bll;

import java.util.List;

import android.content.Context;
import cn.net.caoyao.cpzshandset.bean.ShipmentProductBean;
import cn.net.caoyao.cpzshandset.db.dal.ythPunit.YthPunitShipmentProductDal;
import cn.net.caoyao.cpzshandset.db.presenter.ShipmentProductDal;
import cn.net.cpzslibs.prot.handset.bean.res.LogisticsProductInfo;

public class ShipmentProductBll{
	private ShipmentProductDal dal;
	public ShipmentProductBll(Context context) {
		dal = new YthPunitShipmentProductDal(context);
	}

	
	public void insertShipmentProductBean(LogisticsProductInfo b) {
		if(dal == null || b == null) return;
		dal.insertShipmentProductBean(b);
		
	}

	
	public void insertLogisticsProductList(List<LogisticsProductInfo> list,long order_id) {
		if(dal == null || list == null) return;
		dal.insertLogisticsProductList(list,order_id);
		
	}

	
	public ShipmentProductBean queryShipmentProductBeanById(long id) {
		if(dal == null) return null;
		return dal.queryShipmentProductBeanById(id);
	}

	
	public List<ShipmentProductBean> queryShipmentProductByDriverIdAndRepertoryId(long driver_id,long repertory_id) {
		if(dal == null) return null;
		return dal.queryShipmentProductByDriverIdAndRepertoryId(driver_id,repertory_id);
	}

	
	public void updateShipmentProductBeanStatusById(int status, int error_code, long id) {
		if(dal == null) return;
		dal.updateShipmentProductBeanStatusById(status, error_code, id);
		
	}

	
	public void deleteShipmentProductBeanById(ShipmentProductBean b) {
		if(dal == null) return;
		dal.deleteShipmentProductBeanById(b);
		
	}
	
	
}
