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.service.presenter.OptionHisListStyleConstact;
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.back.chinatex.ChiantexBackWarehouseListPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.back.chinatex.ChinatexBackWarehouseConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.back.chinatex.ChinatexBackWarehouseSingleLSPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.back.common.CommonBackWarehouseConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.back.common.CommonBackWarehouseListPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.back.common.CommonBackWarehouseSingleLSPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.back.commonEgg.CommonEggBackWarehouseConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.back.commonEgg.CommonEggBackWarehouseListPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.back.commonEgg.CommonEggBackWarehouseSingleLSPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.back.commonfarmers.CommonFarmersBackWarehouseConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.back.commonfarmers.CommonFarmersBackWarehouseListPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.warehouse.back.commonfarmers.CommonFarmersBackWarehouseSingleLSPresenter;

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

		switch (handsetVersionMode) {
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE:
			// 通用版
			presenter = new CommonBackWarehouseListPresenter(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 ChiantexBackWarehouseListPresenter(hisView, context);
			break;
		case HandsetVersionConstant.HANDSET_UNIVERSAL_EGG_VERSION_MODE:
			// 通用鸡蛋版
			presenter = new CommonEggBackWarehouseListPresenter(hisView, context);
			break;
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE_FARMERS:
			// 通用版养殖户
			presenter = new CommonFarmersBackWarehouseListPresenter(hisView, context);
			break;	
		}
		return presenter;
	}
	
	/**
	 * 获取返库列表的presenter
	 * @param cacheG
	 * @param context
	 * @param hisView
	 * @param intent
	 * @return
	 */
	public WarehouseConfigConstact.Presenter createBackWarehouseConfigPresenter(int handsetVersionMode, Context context,
			WarehouseConfigConstact.View wView, Intent intent) {
		WarehouseConfigConstact.Presenter presenter = null;

		switch (handsetVersionMode) {
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE:
			// 通用版
			presenter = new CommonBackWarehouseConfigPresenter(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 ChinatexBackWarehouseConfigPresenter(wView, context,intent);
			break;
		case HandsetVersionConstant.HANDSET_UNIVERSAL_EGG_VERSION_MODE:
			// 通用鸡蛋版
			presenter = new CommonEggBackWarehouseConfigPresenter(wView, context,intent);
			break;
			
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE_FARMERS:
			// 通用版
			presenter = new CommonFarmersBackWarehouseConfigPresenter(wView, context,intent);
			break;	
		}
		return presenter;
	}
	
	/**
	 * 获取返库列表的presenter
	 * @param cacheG
	 * @param context
	 * @param hisView
	 * @param intent
	 * @return
	 */
	public SingleLabelScannerConstact.Presenter createBackWarehouseSingleLabelScannerPresenter(int handsetVersionMode, Context context,
			SingleLabelScannerConstact.View sView, Intent intent) {
		SingleLabelScannerConstact.Presenter presenter = null;

		switch (handsetVersionMode) {
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE:
			// 通用版
			presenter = new CommonBackWarehouseSingleLSPresenter(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 ChinatexBackWarehouseSingleLSPresenter(sView, context, intent);
			break;
		case HandsetVersionConstant.HANDSET_UNIVERSAL_EGG_VERSION_MODE:
			// 通用鸡蛋版
			presenter = new CommonEggBackWarehouseSingleLSPresenter(sView, context, intent);
			break;
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE_FARMERS:
			// 通用版养殖户
			presenter = new CommonFarmersBackWarehouseSingleLSPresenter(sView, context, intent);
		
			break;	
		}
		return presenter;
	}
}
