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.ShipmentScannerConstact;
import cn.net.caoyao.cpzshandset.service.presenter.TrainInvoiceConfigConstact;
import cn.net.caoyao.cpzshandset.service.presenter.impl.shipment.train.YthTrainInvoiceConfigPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.shipment.train.YthTrainShipmentListPresenter;
import cn.net.caoyao.cpzshandset.service.presenter.impl.shipment.train.YthTrainShipmentScannerPresenter;

public class TrainShipmentConfigCreateTools {

	/**
	 * 获取火车发运单列表的presenter
	 * @param cacheG
	 * @param context
	 * @param hisView
	 * @param intent
	 * @return
	 */
	public OptionHisListStyleConstact.Presenter createTrainShipmentListPresenter(int handsetVersionMode, Context context,
			OptionHisListStyleConstact.View hisView, Intent intent) {
		OptionHisListStyleConstact.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 YthTrainShipmentListPresenter(hisView, context);
			break;
		}
		return presenter;
	}
	
	/**
	 * 获取火车发运单列表的presenter
	 * @param cacheG
	 * @param context
	 * @param hisView
	 * @param intent
	 * @return
	 */
	public ShipmentScannerConstact.Presenter createTrainShipmentScannerPresenter(int handsetVersionMode, Context context,
			ShipmentScannerConstact.View sView, Intent intent) {
		ShipmentScannerConstact.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 YthTrainShipmentScannerPresenter(sView, context,intent);
			break;
		}
		return presenter;
	}
	
	/**
	 * 获取火车发运单列表的presenter
	 * @param cacheG
	 * @param context
	 * @param hisView
	 * @param intent
	 * @return
	 */
	public TrainInvoiceConfigConstact.Presenter createTrainConfigPresenter(int handsetVersionMode, Context context,
			TrainInvoiceConfigConstact.View configView, Intent intent) {
		TrainInvoiceConfigConstact.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 YthTrainInvoiceConfigPresenter(configView, context, intent);
			break;
		}
		return presenter;
	}
}
