package cn.net.caoyao.cpzshandset.service.presenter.tools;

import android.content.Context;
import android.content.Intent;
import cn.net.caoyao.cpzshandset.common.config.HandsetVersionConstant;
import cn.net.caoyao.cpzshandset.db.dal.yth.YthInvoiceDal;
import cn.net.caoyao.cpzshandset.db.dal.yth.YthTruckInvoiceDal;
import cn.net.caoyao.cpzshandset.db.dal.ythImage.YthImageInvoiceDal;
import cn.net.caoyao.cpzshandset.db.dal.ythImage.YthImageTruckAddressDal;
import cn.net.caoyao.cpzshandset.db.dal.ythImage.YthImageTruckConsigneeDal;
import cn.net.caoyao.cpzshandset.db.dal.ythImage.YthImageTruckInvoiceDal;
import cn.net.caoyao.cpzshandset.db.dal.ythLogin.YthLoginInvoiceDal;
import cn.net.caoyao.cpzshandset.db.dal.ythLogin.YthLoginTruckAddressDal;
import cn.net.caoyao.cpzshandset.db.dal.ythLogin.YthLoginTruckConsigneeDal;
import cn.net.caoyao.cpzshandset.db.dal.ythLogin.YthLoginTruckInvoiceDal;
import cn.net.caoyao.cpzshandset.db.dal.ythPunit.YthPunitDriverInfoDal;
import cn.net.caoyao.cpzshandset.db.dal.ythPunit.YthPunitInvoiceDal;
import cn.net.caoyao.cpzshandset.db.dal.ythPunit.YthPunitOnlineTruckInvoiceDal;
import cn.net.caoyao.cpzshandset.db.dal.ythScaner.YthScannerDriverInfoDal;
import cn.net.caoyao.cpzshandset.db.dal.ythScaner.YthScannerInvoiceDal;
import cn.net.caoyao.cpzshandset.db.dal.ythScaner.YthScannerOnlineTruckInvoiceDal;
import cn.net.caoyao.cpzshandset.db.presenter.DriverInfoDal;
import cn.net.caoyao.cpzshandset.db.presenter.InvoiceDal;
import cn.net.caoyao.cpzshandset.db.presenter.OnlineTruckInvoiceDal;
import cn.net.caoyao.cpzshandset.db.presenter.TruckAddressDal;
import cn.net.caoyao.cpzshandset.db.presenter.TruckConsigneeDal;
import cn.net.caoyao.cpzshandset.db.presenter.TruckInvoiceDal;
import cn.net.caoyao.cpzshandset.service.presenter.OptionHisListStyleConstact;
import cn.net.caoyao.cpzshandset.service.presenter.ShipmentScannerConstact;
import cn.net.caoyao.cpzshandset.service.presenter.ShipmentSingleScannerConstact;
import cn.net.caoyao.cpzshandset.service.presenter.TruckInvoiceConfigConstact;
import cn.net.caoyao.cpzshandset.service.presenter.TruckInvoiceInputConfigConstact;
import cn.net.caoyao.cpzshandset.service.presenter.impl.shipment.truck.yth.YthTruckShipmentConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.shipment.truck.yth.YthTruckShipmentListPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.shipment.truck.yth.YthTruckShipmentSingleScannerPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.shipment.truck.ythImage.YthImageTruckShipmentInputConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.shipment.truck.ythImage.YthImageTruckShipmentListPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.shipment.truck.ythImage.YthImageTruckShipmentScannerPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.shipment.truck.ythLogin.YthLoginTruckShipmentInputConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.shipment.truck.ythLogin.YthLoginTruckShipmentListPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.shipment.truck.ythLogin.YthLoginTruckShipmentPalletScannerPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.shipment.truck.ythLogin.YthLoginTruckShipmentSingleScannerPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.shipment.truck.ythPunit.YthPunitTruckShipmentListPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.shipment.truck.ythPunit.YthPunitTruckShipmentScannerPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.shipment.truck.ythPunit.YthPunitTruckShipmentSubListPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.shipment.truck.ythScanner.YthScannerTruckShipmentListPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.shipment.truck.ythScanner.YthScannerTruckShipmentScannerPresenter;
public class TruckShipmentConfigCreateTools {

	/**
	 * 获取火车发运单列表的presenter
	 * @param cacheG
	 * @param context
	 * @param hisView
	 * @param intent
	 * @return
	 */
	public OptionHisListStyleConstact.Presenter createTruckShipmentListPresenter(int handsetVersionMode, Context context,
			OptionHisListStyleConstact.View hisView, Intent intent) {
		OptionHisListStyleConstact.Presenter presenter = null;

		switch (handsetVersionMode) {
		case HandsetVersionConstant.HANDSET_YTH_VERSION_MODE:
			// 云天化
			presenter = new YthTruckShipmentListPresenter(hisView, context);
			break;
		case HandsetVersionConstant.HANDSET_YTH_IMAGE_VERSION_MODE:
			// 云天化
			presenter = new YthImageTruckShipmentListPresenter(hisView, context);
			break;
		case HandsetVersionConstant.HANDSET_YTH_LOGIN_SHIPMENT_VERSION_MODE:
			presenter = new YthLoginTruckShipmentListPresenter(hisView, context,intent);
			break;
		case HandsetVersionConstant.HANDSET_YTH_SCANNER_SHIPMENT_VERSION_MODE:
			
			presenter = new YthScannerTruckShipmentListPresenter(hisView, context, intent);
			break;
		case HandsetVersionConstant.HANDSET_YTH_SCANNER_SHIPMENT_PUNIT_VERSION_MODE:
			//云天化 扫码发货   货物版
			presenter = new YthPunitTruckShipmentListPresenter(hisView, context, intent);
			break;	
		}
		return presenter;
	}
	
	public OptionHisListStyleConstact.Presenter createTruckShipmentSubListPresenter(int handsetVersionMode, Context context,
			OptionHisListStyleConstact.View hisView, Intent intent) {
		OptionHisListStyleConstact.Presenter presenter = null;

		switch (handsetVersionMode) {
		case HandsetVersionConstant.HANDSET_YTH_SCANNER_SHIPMENT_PUNIT_VERSION_MODE:
			//云天化 扫码发货   货物版
			presenter = new YthPunitTruckShipmentSubListPresenter( context,hisView, intent);
			break;	
		}
		return presenter;
	}
	
	/**
	 * 获取火车发运单列表的presenter
	 * @param cacheG
	 * @param context
	 * @param hisView
	 * @param intent
	 * @return
	 */
	public TruckInvoiceConfigConstact.Presenter createTruckShipmentConfigPresenter(int handsetVersionMode, Context context,
			TruckInvoiceConfigConstact.View tView, Intent intent) {
		TruckInvoiceConfigConstact.Presenter presenter = null;

		switch (handsetVersionMode) {
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE:
			// 通用版
//			presenter = new CommonActivateListPresenter(context, hisView);
			break;
		case HandsetVersionConstant.HANDSET_RICE_VERSION_MODE:
			// 大米
			break;
		case HandsetVersionConstant.HANDSET_HOLOTHURIAN_VERSION_MODE:
			// 海参
			break;
		case HandsetVersionConstant.HANDSET_WINE_TERMINAL_VERSION_MODE:
			// 酒终端
			break;
		case HandsetVersionConstant.HANDSET_WINE_DEALER_VERSION_MODE:
			// 酒经销商
			break;
		case HandsetVersionConstant.HANDSET_FIRE_EXTINGUISHER_VERSION_MODE:
			// 灭火器
			break;
		case HandsetVersionConstant.HANDSET_AGRICULTURAL_PRODUCTS_VERSION_MODE:
			// 农产品
			break;
		case HandsetVersionConstant.HANDSET_SEED_VERSION_MODE:
			// 种子
			break;
		case HandsetVersionConstant.HANDSET_YTH_VERSION_MODE:
			// 云天化
			presenter = new YthTruckShipmentConfigPresenter(tView, context, intent);
			break;
		}
		return presenter;
	}
	
	/**
	 * 获取火车发运单列表的presenter
	 * @param cacheG
	 * @param context
	 * @param hisView
	 * @param intent
	 * @return
	 */
	public TruckInvoiceInputConfigConstact.Presenter createTruckShipmentInputConfigPresenter(int handsetVersionMode, Context context,
			TruckInvoiceInputConfigConstact.View tView, Intent intent) {
		TruckInvoiceInputConfigConstact.Presenter presenter = null;

		switch (handsetVersionMode) {
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE:
			// 通用版
//			presenter = new CommonActivateListPresenter(context, hisView);
			break;
		case HandsetVersionConstant.HANDSET_RICE_VERSION_MODE:
			// 大米
			break;
		case HandsetVersionConstant.HANDSET_HOLOTHURIAN_VERSION_MODE:
			// 海参
			break;
		case HandsetVersionConstant.HANDSET_WINE_TERMINAL_VERSION_MODE:
			// 酒终端
			break;
		case HandsetVersionConstant.HANDSET_WINE_DEALER_VERSION_MODE:
			// 酒经销商
			break;
		case HandsetVersionConstant.HANDSET_FIRE_EXTINGUISHER_VERSION_MODE:
			// 灭火器
			break;
		case HandsetVersionConstant.HANDSET_AGRICULTURAL_PRODUCTS_VERSION_MODE:
			// 农产品
			break;
		case HandsetVersionConstant.HANDSET_SEED_VERSION_MODE:
			// 种子
			break;
		case HandsetVersionConstant.HANDSET_YTH_VERSION_MODE:
			// 云天化
//			presenter = new YthTruckShipmentConfigPresenter(tView, context, intent);
			break;
		case HandsetVersionConstant.HANDSET_YTH_IMAGE_VERSION_MODE:
			presenter = new YthImageTruckShipmentInputConfigPresenter(tView, context, intent);
			break;
		case HandsetVersionConstant.HANDSET_YTH_LOGIN_SHIPMENT_VERSION_MODE:
			presenter = new YthLoginTruckShipmentInputConfigPresenter(tView, context, intent);
			break;
		}
		return presenter;
	}
	
	/**
	 * 获取火车发运单列表的presenter
	 * @param cacheG
	 * @param context
	 * @param hisView
	 * @param intent
	 * @return
	 */
	public ShipmentScannerConstact.Presenter createTruckShipmentScannerPresenter(int handsetVersionMode, Context context,
			ShipmentScannerConstact.View tView, Intent intent) {
		ShipmentScannerConstact.Presenter presenter = null;

		switch (handsetVersionMode) {
		case HandsetVersionConstant.HANDSET_YTH_VERSION_MODE:
			// 云天化
			presenter = new YthTruckShipmentSingleScannerPresenter(tView, context, intent);
			break;
		case HandsetVersionConstant.HANDSET_YTH_LOGIN_SHIPMENT_VERSION_MODE:
			presenter = new YthLoginTruckShipmentPalletScannerPresenter(tView, context, intent);
			break;
		}
		return presenter;
	}
	
	/**
	 * 获取火车发运单列表的presenter
	 * @param cacheG
	 * @param context
	 * @param hisView
	 * @param intent
	 * @return
	 */
	public TruckConsigneeDal createTruckCondigneeDal(int handsetVersionMode, Context context) {
		TruckConsigneeDal dal = null;
		switch (handsetVersionMode) {
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE:
			// 通用版
//			presenter = new CommonActivateListPresenter(context, hisView);
			break;
		case HandsetVersionConstant.HANDSET_RICE_VERSION_MODE:
			// 大米
			break;
		case HandsetVersionConstant.HANDSET_HOLOTHURIAN_VERSION_MODE:
			// 海参
			break;
		case HandsetVersionConstant.HANDSET_WINE_TERMINAL_VERSION_MODE:
			// 酒终端
			break;
		case HandsetVersionConstant.HANDSET_WINE_DEALER_VERSION_MODE:
			// 酒经销商
			break;
		case HandsetVersionConstant.HANDSET_FIRE_EXTINGUISHER_VERSION_MODE:
			// 灭火器
			break;
		case HandsetVersionConstant.HANDSET_AGRICULTURAL_PRODUCTS_VERSION_MODE:
			// 农产品
			break;
		case HandsetVersionConstant.HANDSET_SEED_VERSION_MODE:
			// 种子
			break;
		case HandsetVersionConstant.HANDSET_YTH_VERSION_MODE:
			// 云天化
			break;
		case HandsetVersionConstant.HANDSET_YTH_IMAGE_VERSION_MODE:
			// 云天化
			dal = new YthImageTruckConsigneeDal(context);
			break;
		case HandsetVersionConstant.HANDSET_YTH_LOGIN_SHIPMENT_VERSION_MODE:
			dal = new YthLoginTruckConsigneeDal(context);
			break;
		}
		return dal;
	}
	
	/**
	 * 获取火车发运单列表的presenter
	 * @param cacheG
	 * @param context
	 * @param hisView
	 * @param intent
	 * @return
	 */
	public TruckAddressDal createTruckAddressDal(int handsetVersionMode, Context context) {
		TruckAddressDal dal = null;
		switch (handsetVersionMode) {
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE:
			// 通用版
//			presenter = new CommonActivateListPresenter(context, hisView);
			break;
		case HandsetVersionConstant.HANDSET_RICE_VERSION_MODE:
			// 大米
			break;
		case HandsetVersionConstant.HANDSET_HOLOTHURIAN_VERSION_MODE:
			// 海参
			break;
		case HandsetVersionConstant.HANDSET_WINE_TERMINAL_VERSION_MODE:
			// 酒终端
			break;
		case HandsetVersionConstant.HANDSET_WINE_DEALER_VERSION_MODE:
			// 酒经销商
			break;
		case HandsetVersionConstant.HANDSET_FIRE_EXTINGUISHER_VERSION_MODE:
			// 灭火器
			break;
		case HandsetVersionConstant.HANDSET_AGRICULTURAL_PRODUCTS_VERSION_MODE:
			// 农产品
			break;
		case HandsetVersionConstant.HANDSET_SEED_VERSION_MODE:
			// 种子
			break;
		case HandsetVersionConstant.HANDSET_YTH_VERSION_MODE:
			// 云天化
			break;
		case HandsetVersionConstant.HANDSET_YTH_IMAGE_VERSION_MODE:
			// 云天化
			dal = new YthImageTruckAddressDal(context);
			break;
		case HandsetVersionConstant.HANDSET_YTH_LOGIN_SHIPMENT_VERSION_MODE:
			dal = new YthLoginTruckAddressDal(context);
			break;
		case HandsetVersionConstant.HANDSET_YTH_SCANNER_SHIPMENT_VERSION_MODE:
//			dal = new YthScannerTruckAddressDal(context);
			break;
		}
		return dal;
	}
	
	/**
	 * 获取火车发运单列表的presenter
	 * @param cacheG
	 * @param context
	 * @param hisView
	 * @param intent
	 * @return
	 */
	public TruckInvoiceDal createTruckInvoiceDal(int handsetVersionMode, Context context) {
		TruckInvoiceDal dal = null;
		switch (handsetVersionMode) {
		case HandsetVersionConstant.HANDSET_YTH_VERSION_MODE:
			// 云天化
			dal = new YthTruckInvoiceDal(context);
			break;
		case HandsetVersionConstant.HANDSET_YTH_IMAGE_VERSION_MODE:
			// 云天化
			dal = new YthImageTruckInvoiceDal(context);
			break;
		case HandsetVersionConstant.HANDSET_YTH_LOGIN_SHIPMENT_VERSION_MODE:
			dal = new YthLoginTruckInvoiceDal(context);
			break;
		}
		return dal;
	}
	
	/**
	 * 获取火车发运单列表的presenter
	 * @param cacheG
	 * @param context
	 * @param hisView
	 * @param intent
	 * @return
	 */
	public DriverInfoDal createOnlineDriverDal(int handsetVersionMode, Context context) {
		DriverInfoDal dal = null;
		switch (handsetVersionMode) {
		case HandsetVersionConstant.HANDSET_YTH_SCANNER_SHIPMENT_VERSION_MODE:
			//扫码版发货
			dal = new YthScannerDriverInfoDal(context);
			break;
		case HandsetVersionConstant.HANDSET_YTH_SCANNER_SHIPMENT_PUNIT_VERSION_MODE:
			//扫码版发货  货物版
			dal = new YthPunitDriverInfoDal(context);
			break;
		}
		return dal;
	}
	
	/**
	 * 获取火车发运单列表的presenter
	 * @param cacheG
	 * @param context
	 * @param hisView
	 * @param intent
	 * @return
	 */
	public OnlineTruckInvoiceDal createOnlineOrderDal(int handsetVersionMode, Context context) {
		OnlineTruckInvoiceDal dal = null;
		switch (handsetVersionMode) {
		case HandsetVersionConstant.HANDSET_YTH_SCANNER_SHIPMENT_VERSION_MODE:
			//扫码版发货
			dal = new YthScannerOnlineTruckInvoiceDal(context);
			break;
		case HandsetVersionConstant.HANDSET_YTH_SCANNER_SHIPMENT_PUNIT_VERSION_MODE:
			//扫码版发货  货物版
			dal = new YthPunitOnlineTruckInvoiceDal(context);
			break;
		}
		return dal;
	}
	/**
	 * 获取火车发运单列表的presenter
	 * @param cacheG
	 * @param context
	 * @param hisView
	 * @param intent
	 * @return
	 */
	public InvoiceDal createInvoiceDal(int handsetVersionMode, Context context) {
		InvoiceDal dal = null;
		switch (handsetVersionMode) {
		case HandsetVersionConstant.HANDSET_YTH_VERSION_MODE:
			// 云天化
			dal = new YthInvoiceDal(context);
			break;
		case HandsetVersionConstant.HANDSET_YTH_IMAGE_VERSION_MODE:
			// 云天化
			dal = new YthImageInvoiceDal(context);
			break;
		case HandsetVersionConstant.HANDSET_YTH_LOGIN_SHIPMENT_VERSION_MODE:
			dal = new YthLoginInvoiceDal(context);
			break;
		case HandsetVersionConstant.HANDSET_YTH_SCANNER_SHIPMENT_VERSION_MODE:
			dal = new YthScannerInvoiceDal(context);
			break;
		case HandsetVersionConstant.HANDSET_YTH_SCANNER_SHIPMENT_PUNIT_VERSION_MODE:
			//发货单表 云天化扫码plus
			dal = new YthPunitInvoiceDal(context);
			break;
		}
		return dal;
	}
	
	/**
	 * 获取火车发运单列表的presenter
	 * @param cacheG
	 * @param context
	 * @param hisView
	 * @param intent
	 * @return
	 */
	public ShipmentSingleScannerConstact.Presenter createTruckShipmentSingleScannerPresenter(int handsetVersionMode, Context context,
			ShipmentSingleScannerConstact.View tView, Intent intent) {
		ShipmentSingleScannerConstact.Presenter presenter = null;

		switch (handsetVersionMode) {
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE:
			// 通用版
//			presenter = new CommonActivateListPresenter(context, hisView);
			break;
		case HandsetVersionConstant.HANDSET_RICE_VERSION_MODE:
			// 大米
			break;
		case HandsetVersionConstant.HANDSET_HOLOTHURIAN_VERSION_MODE:
			// 海参
			break;
		case HandsetVersionConstant.HANDSET_WINE_TERMINAL_VERSION_MODE:
			// 酒终端
			break;
		case HandsetVersionConstant.HANDSET_WINE_DEALER_VERSION_MODE:
			// 酒经销商
			break;
		case HandsetVersionConstant.HANDSET_FIRE_EXTINGUISHER_VERSION_MODE:
			// 灭火器
			break;
		case HandsetVersionConstant.HANDSET_AGRICULTURAL_PRODUCTS_VERSION_MODE:
			// 农产品
			break;
		case HandsetVersionConstant.HANDSET_SEED_VERSION_MODE:
			// 种子
			break;
		case HandsetVersionConstant.HANDSET_YTH_VERSION_MODE:
			// 云天化
//			presenter = new YthTruckShipmentScannerPresenter(tView, context, intent);
			break;
		case HandsetVersionConstant.HANDSET_YTH_IMAGE_VERSION_MODE:
			presenter = new YthImageTruckShipmentScannerPresenter(tView, context, intent);
			break;
		case HandsetVersionConstant.HANDSET_YTH_LOGIN_SHIPMENT_VERSION_MODE:
			presenter = new YthLoginTruckShipmentSingleScannerPresenter(tView, context, intent);
			break;
		case HandsetVersionConstant.HANDSET_YTH_SCANNER_SHIPMENT_VERSION_MODE:
			presenter = new YthScannerTruckShipmentScannerPresenter(tView, context, intent);
			break;
		case HandsetVersionConstant.HANDSET_YTH_SCANNER_SHIPMENT_PUNIT_VERSION_MODE:
			presenter = new YthPunitTruckShipmentScannerPresenter(tView, context, intent);
			break;	
		}
		return presenter;
	}
}
