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.chinatex.ChinatexWarehouseDal;
import cn.net.caoyao.cpzshandset.db.dal.common.CommonWarehouseDal;
import cn.net.caoyao.cpzshandset.db.dal.commonEgg.CommonEggWarehouseDal;
import cn.net.caoyao.cpzshandset.db.dal.commonfarmers.CommonFarmersWarehouseDal;
import cn.net.caoyao.cpzshandset.db.dal.liqueur.LiqueurWarehouseDal;
import cn.net.caoyao.cpzshandset.db.dal.liqueurSFY.LiqueurSFYWarehouseDal;
import cn.net.caoyao.cpzshandset.db.presenter.WarehouseDal;
import cn.net.caoyao.cpzshandset.service.presenter.OptionHisListStyleConstact;
import cn.net.caoyao.cpzshandset.service.presenter.SearchInputStyleConstact;
import cn.net.caoyao.cpzshandset.service.presenter.SingleLabelScannerConstact;
import cn.net.caoyao.cpzshandset.service.presenter.WarehouseConfigConstact;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.dealerOut.common.CommonDealerOutConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.out.chinatex.ChinatexOutWarehouseConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.out.chinatex.ChinatexOutWarehouseListPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.out.chinatex.ChinatexOutWarehouseSingleLSPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.out.common.CommonOutWarehouseConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.out.common.CommonOutWarehouseListPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.out.common.CommonOutWarehouseSingleLSPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.out.commonEgg.CommonEggOutWarehouseConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.out.commonEgg.CommonEggOutWarehouseListPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.out.commonEgg.CommonEggOutWarehouseSingleLSPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.out.commonfarmers.CommonFarmersOutWarehouseConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.out.commonfarmers.CommonFarmersOutWarehouseListPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.out.commonfarmers.CommonFarmersOutWarehouseSingleLSPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.out.jinLiquor.JinLiquorOutWarehouseConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.out.jinLiquor.JinLiquorOutWarehouseListPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.out.jinLiquor.JinLiquorOutWarehouseSingleLSPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.out.liqueur.LiqueurOutWarehouseConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.out.liqueur.LiqueurOutWarehouseListPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.out.liqueur.LiqueurOutWarehouseSingleLSPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.out.liqueurSFY.LiqueurSFYChoiceDealerPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.out.liqueurSFY.LiqueurSFYOutWarehouseConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.out.liqueurSFY.LiqueurSFYOutWarehouseListPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.out.liqueurSFY.LiqueurSFYOutWarehouseSingleLSPresenter;

public class OutWarehouseConfigCreateTools {
	/**
	 * 获取出库列表的presenter
	 * 
	 * @param cacheG
	 * @param context
	 * @param hisView
	 * @param intent
	 * @return
	 */
	public OptionHisListStyleConstact.Presenter createOutWarehouseListPresenter(int handsetVersionMode, Context context,
			OptionHisListStyleConstact.View hisView, Intent intent) {
		OptionHisListStyleConstact.Presenter presenter = null;

		switch (handsetVersionMode) {
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE:
			// 通用版
			presenter = new CommonOutWarehouseListPresenter(hisView, context);
			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_CHINATEX_VERSION_MODE:
			// 中 纺
			presenter = new ChinatexOutWarehouseListPresenter(hisView, context);
			break;
		case HandsetVersionConstant.HANDSET_LIQUEUR_VERSION_MODE:
			//白酒
			presenter = new LiqueurOutWarehouseListPresenter(hisView, context);
			break;
		case HandsetVersionConstant.HANDSET_UNIVERSAL_EGG_VERSION_MODE:
			// 通用鸡蛋版
			presenter = new CommonEggOutWarehouseListPresenter(hisView, context);
			break;
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE_FARMERS:
			// 通用版养殖户
			presenter = new CommonFarmersOutWarehouseListPresenter(hisView, context);
			break;	
		case HandsetVersionConstant.HANDSET_LIQUEUR_SFY_VERSION_MODE:
			//世方御
			presenter = new LiqueurSFYOutWarehouseListPresenter(hisView,context);
			break;
		case HandsetVersionConstant.HANDSET_JIN_LIQUOR_VERSION_MODE:
			//劲酒
			presenter = new JinLiquorOutWarehouseListPresenter(hisView, context, intent);
			break;
		}
		return presenter;
	}
	
	/**
	 * 获取出库列表的presenter
	 * 
	 * @param cacheG
	 * @param context
	 * @param hisView
	 * @param intent
	 * @return
	 */
	public WarehouseConfigConstact.Presenter createOutWarehouseConfigPresenter(int handsetVersionMode, Context context,
			WarehouseConfigConstact.View wView, Intent intent) {
		WarehouseConfigConstact.Presenter presenter = null;

		switch (handsetVersionMode) {
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE:
			// 通用版
			 presenter = new CommonOutWarehouseConfigPresenter(wView, context,intent);
			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_CHINATEX_VERSION_MODE:
			// 中纺
			presenter = new ChinatexOutWarehouseConfigPresenter(wView, context,intent);
			break;
		case HandsetVersionConstant.HANDSET_LIQUEUR_VERSION_MODE:
			//白酒
			presenter = new LiqueurOutWarehouseConfigPresenter(wView, context, intent);
			break;
		case HandsetVersionConstant.HANDSET_UNIVERSAL_EGG_VERSION_MODE:
			// 通用鸡蛋版
			 presenter = new CommonEggOutWarehouseConfigPresenter(wView, context,intent);
			break;
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE_FARMERS:
			// 通用版养殖户
			 presenter = new CommonFarmersOutWarehouseConfigPresenter(wView, context,intent);
			break;	
		case HandsetVersionConstant.HANDSET_LIQUEUR_SFY_VERSION_MODE:
			//世方御
			presenter = new LiqueurSFYOutWarehouseConfigPresenter(wView, context, intent);
			break;
		case HandsetVersionConstant.HANDSET_JIN_LIQUOR_VERSION_MODE:
			presenter = new JinLiquorOutWarehouseConfigPresenter(wView, context, intent);
			break;
		}
		return presenter;
	}
	
	/**
	 * 获取出库列表的presenter
	 * 
	 * @param cacheG
	 * @param context
	 * @param hisView
	 * @param intent
	 * @return
	 */
	public WarehouseConfigConstact.Presenter createDealerOutConfigPresenter(int handsetVersionMode, Context context,
			WarehouseConfigConstact.View wView, Intent intent) {
		WarehouseConfigConstact.Presenter presenter = null;

		switch (handsetVersionMode) {
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE:
			// 通用版
			 presenter = new CommonDealerOutConfigPresenter(wView, context, intent);
			break;
		}
		return presenter;
	}
	
	/**
	 * 获取出库列表的presenter
	 * 
	 * @param cacheG
	 * @param context
	 * @param hisView
	 * @param intent
	 * @return
	 */
	public SingleLabelScannerConstact.Presenter createOutWarehouseSingleLabelScannerPresenter(int handsetVersionMode, Context context,
			SingleLabelScannerConstact.View sView, Intent intent) {
		SingleLabelScannerConstact.Presenter presenter = null;

		switch (handsetVersionMode) {
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE:
			// 通用版
			presenter = new CommonOutWarehouseSingleLSPresenter(sView, context, intent);
			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_CHINATEX_VERSION_MODE:		
			// 中纺
			presenter = new ChinatexOutWarehouseSingleLSPresenter(sView, context, intent);
			break;
		case HandsetVersionConstant.HANDSET_LIQUEUR_VERSION_MODE:
			presenter = new LiqueurOutWarehouseSingleLSPresenter(sView, context, intent);
			break;
		case HandsetVersionConstant.HANDSET_UNIVERSAL_EGG_VERSION_MODE:
			// 通用鸡蛋版
			presenter = new CommonEggOutWarehouseSingleLSPresenter(sView, context, intent);
			break;
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE_FARMERS:
			// 通用版养殖户
			presenter = new CommonFarmersOutWarehouseSingleLSPresenter(sView, context, intent);
			break;	
		case HandsetVersionConstant.HANDSET_LIQUEUR_SFY_VERSION_MODE:
			//世方御
			presenter = new LiqueurSFYOutWarehouseSingleLSPresenter(sView, context, intent);
			break;
		case HandsetVersionConstant.HANDSET_JIN_LIQUOR_VERSION_MODE:
			presenter = new JinLiquorOutWarehouseSingleLSPresenter(sView, context, intent);
			break;
		}
		return presenter;
	}
	
	/**
	 * 获取出库列表的presenter
	 * 
	 * @param cacheG
	 * @param context
	 * @param hisView
	 * @param intent
	 * @return
	 */
	public WarehouseDal createWarehouseDal(int handsetVersionMode, Context context) {
		WarehouseDal dal = null;

		switch (handsetVersionMode) {
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE:
			// 通用版
			dal = new CommonWarehouseDal(context);
			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_CHINATEX_VERSION_MODE:
			// 中纺
			dal = new ChinatexWarehouseDal(context);
			break;
		case HandsetVersionConstant.HANDSET_LIQUEUR_VERSION_MODE:
			dal = new LiqueurWarehouseDal(context);
			break;
		case HandsetVersionConstant.HANDSET_UNIVERSAL_EGG_VERSION_MODE:
			// 通用鸡蛋版
			dal = new CommonEggWarehouseDal(context);
			break;
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE_FARMERS:
			// 通用版 养殖户
			dal = new CommonFarmersWarehouseDal(context);
			break;	
		case HandsetVersionConstant.HANDSET_LIQUEUR_SFY_VERSION_MODE:
			dal = new LiqueurSFYWarehouseDal(context);
			break;
			
		}
		return dal;
	}
	
	/**
	 * 获取销售列表的presenter
	 * 
	 * @param cacheG
	 * @param context
	 * @param hisView
	 * @param intent
	 * @return
	 */
	public SearchInputStyleConstact.Presenter createDealerChoicePresenter(int handsetVersionMode, Context context,
			SearchInputStyleConstact.View sView, Intent intent) {
		SearchInputStyleConstact.Presenter presenter = null;

		switch (handsetVersionMode) {
		case HandsetVersionConstant.HANDSET_LIQUEUR_SFY_VERSION_MODE:
			//世方御
			presenter = new LiqueurSFYChoiceDealerPresenter(sView, context, intent);
			break;
		}
		return presenter;
	}
}
