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

import android.content.Context;
import cn.net.caoyao.cpzshandset.common.config.HandsetVersionConstant;
import cn.net.caoyao.cpzshandset.db.dal.chinatex.ChinatexSingleLabelDal;
import cn.net.caoyao.cpzshandset.db.dal.common.CommonBatchLabelDal;
import cn.net.caoyao.cpzshandset.db.dal.common.CommonSingleLabelDal;
import cn.net.caoyao.cpzshandset.db.dal.commonEgg.CommonEggBatchLabelDal;
import cn.net.caoyao.cpzshandset.db.dal.commonEgg.CommonEggSingleLabelDal;
import cn.net.caoyao.cpzshandset.db.dal.commonfarmers.CommonFarmersBatchLabelDal;
import cn.net.caoyao.cpzshandset.db.dal.commonfarmers.CommonFarmersSingleLabelDal;
import cn.net.caoyao.cpzshandset.db.dal.counter.CounterSingleLabelDal;
import cn.net.caoyao.cpzshandset.db.dal.jinLiquor.JinLiquorSingleLabelDal;
import cn.net.caoyao.cpzshandset.db.dal.kia.KIABatchLabelDal;
import cn.net.caoyao.cpzshandset.db.dal.kia.KIASingleLabelDal;
import cn.net.caoyao.cpzshandset.db.dal.liqueur.LiqueurBatchLabelDal;
import cn.net.caoyao.cpzshandset.db.dal.liqueur.LiqueurSingleLabelDal;
import cn.net.caoyao.cpzshandset.db.dal.liqueurSFY.LiqueurSFYBatchLabelDal;
import cn.net.caoyao.cpzshandset.db.dal.liqueurSFY.LiqueurSFYSingleLabelDal;
import cn.net.caoyao.cpzshandset.db.dal.sheepEx.SheepExBatchLabelDal;
import cn.net.caoyao.cpzshandset.db.dal.sheepEx.SheepExSingleLabelDal;
import cn.net.caoyao.cpzshandset.db.dal.ythImage.YthImageSingleLabelDal;
import cn.net.caoyao.cpzshandset.db.presenter.BatchLabelDal;
import cn.net.caoyao.cpzshandset.db.presenter.SingleLabelDal;

public class LabelDalCreateTools {
	
	/**
	 * 获取激活相关的数据库dal
	 * @param handsetVersionMode
	 * @param context
	 * @return
	 */
	public SingleLabelDal createSingleLabelDal(int handsetVersionMode, Context context){
		SingleLabelDal dal = null;
		switch (handsetVersionMode) {
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE:
			// 通用版
			dal = new CommonSingleLabelDal(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_YTH_IMAGE_VERSION_MODE:
			//云天化图片版
			dal = new YthImageSingleLabelDal(context);
			break;
		case HandsetVersionConstant.HANDSET_CHINATEX_VERSION_MODE:
			//中纺
			dal = new ChinatexSingleLabelDal(context);
			break;
		case HandsetVersionConstant.HANDSET_SHEEP_EXCHANGE_CARGO:
			//羊老大   调货
			dal = new SheepExSingleLabelDal(context);
			break;
		case HandsetVersionConstant.HANDSET_LIQUEUR_VERSION_MODE:
			//白酒
			dal = new LiqueurSingleLabelDal(context);
			break;
		case HandsetVersionConstant.HANDSET_COUNTER_VERSION_MODE:
			//专柜终端
			dal = new CounterSingleLabelDal(context);
			break;
		case HandsetVersionConstant.HANDSET_UNIVERSAL_EGG_VERSION_MODE:
			// 通用鸡蛋版
			dal = new CommonEggSingleLabelDal(context);
			break;
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE_FARMERS:
			// 通用版
			dal = new CommonFarmersSingleLabelDal(context);
			break;
		case HandsetVersionConstant.HANDSET_LIQUEUR_SFY_VERSION_MODE:
			dal = new LiqueurSFYSingleLabelDal(context);
			break;
		case HandsetVersionConstant.HANDSET_JIN_LIQUOR_VERSION_MODE:
			//劲酒
			dal = new JinLiquorSingleLabelDal(context);
			break;
			
		case HandsetVersionConstant.HANDSET_KIA_PRODUCT_LINE_VERSION_MODE:
			// 起亚
			dal = new KIASingleLabelDal(context);
			break;	
		}
		return dal;
	}
	
	/**
	 * 获取激活相关的数据库dal
	 * @param handsetVersionMode
	 * @param context
	 * @return
	 */
	public BatchLabelDal createBatchLabelDal(int handsetVersionMode, Context context){
		BatchLabelDal dal = null;
		switch (handsetVersionMode) {
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE:
			// 通用版
			dal = new CommonBatchLabelDal(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_YTH_IMAGE_VERSION_MODE:
			//云天化图片版
//			dal = new YthImageSingleLabelDal(context);
			break;
		case HandsetVersionConstant.HANDSET_SHEEP_EXCHANGE_CARGO:
			//羊老大 调货
			dal = new SheepExBatchLabelDal(context);
			break;
		case HandsetVersionConstant.HANDSET_LIQUEUR_VERSION_MODE:
			dal = new LiqueurBatchLabelDal(context);
			break;
		case HandsetVersionConstant.HANDSET_UNIVERSAL_EGG_VERSION_MODE:
			// 通用鸡蛋版
			dal = new CommonEggBatchLabelDal(context);
		case HandsetVersionConstant.HANDSET_UNIVERSAL_VERSION_MODE_FARMERS:
			// 通用版养殖户
			dal = new CommonFarmersBatchLabelDal(context);
			break;
		case HandsetVersionConstant.HANDSET_LIQUEUR_SFY_VERSION_MODE:
			//世方御
			dal = new LiqueurSFYBatchLabelDal(context);
			break;
		case HandsetVersionConstant.HANDSET_KIA_PRODUCT_LINE_VERSION_MODE:
			// 起亚
			dal = new KIABatchLabelDal(context);
			break;	
		}
		return dal;
	}
}
