using HBLConsole.Communication;
//using HBLDevice.ICChip;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HBLConsole.MORKJC2
{
internal enum GOODS_TYPE
{
///
/// 未知
///
NEITHER,
///
/// 咖啡
///
COFFEE,
///
/// 果汁
///
JUICE,
///
/// 茶水
///
TEA,
///
/// 水
///
WATER,
///
/// 杯子
///
CUP
}
internal enum BATCHING_CLASS
{
HOLDER,
MAIN_MATERIAL,
}
internal class PolymerBatching
{
internal const string Juicer_MAIN_BATCHIN1_LOC = "52";
internal const string Juicer_MAIN_BATCHIN2_LOC = "53";
internal const string Juicer_MAIN_BATCHIN3_LOC = "54";
internal const string Juicer_MAIN_BATCHIN4_LOC = "55";
//internal const string Juicer_MAIN_BATCHIN5_LOC = "56";
//internal const string Juicer_MAIN_BATCHIN6_LOC = "57";
//internal const string Juicer_MAIN_BATCHIN7_LOC = "58";
//internal const string Juicer_MAIN_BATCHIN8_LOC = "59";
internal const string COFFEE_HOLDER_LOC = "30";
internal const string TEA_HOLDER_LOC = "51";
public static Dictionary GOODS_TYPES = new Dictionary() {
{"1", GOODS_TYPE.COFFEE},
{"2", GOODS_TYPE.COFFEE},
{"3", GOODS_TYPE.COFFEE},
{"4", GOODS_TYPE.COFFEE},
{"5", GOODS_TYPE.COFFEE},
{"6", GOODS_TYPE.COFFEE},
{"7", GOODS_TYPE.COFFEE},
{"8", GOODS_TYPE.COFFEE},
{"9", GOODS_TYPE.COFFEE},
{"10",GOODS_TYPE.COFFEE},
{"11",GOODS_TYPE.COFFEE},
{"12",GOODS_TYPE.COFFEE},
{"13",GOODS_TYPE.COFFEE},
{"14",GOODS_TYPE.COFFEE},
{"15",GOODS_TYPE.COFFEE},
{"16",GOODS_TYPE.COFFEE},
{"17",GOODS_TYPE.COFFEE},
{"18",GOODS_TYPE.COFFEE},
{"19",GOODS_TYPE.COFFEE},
{"20",GOODS_TYPE.COFFEE},
{"21",GOODS_TYPE.COFFEE},
{"22",GOODS_TYPE.COFFEE},
{"23",GOODS_TYPE.COFFEE},
{"24",GOODS_TYPE.COFFEE},
{"25",GOODS_TYPE.COFFEE},
{ COFFEE_HOLDER_LOC,GOODS_TYPE.CUP},
{"56",GOODS_TYPE.TEA },
{Juicer_MAIN_BATCHIN1_LOC,GOODS_TYPE.JUICE},
{Juicer_MAIN_BATCHIN2_LOC,GOODS_TYPE.JUICE},
{Juicer_MAIN_BATCHIN3_LOC,GOODS_TYPE.JUICE},
{Juicer_MAIN_BATCHIN4_LOC,GOODS_TYPE.JUICE},
//{Juicer_MAIN_BATCHIN5_LOC,GOODS_TYPE.JUICE},
//{Juicer_MAIN_BATCHIN6_LOC,GOODS_TYPE.JUICE},
//{Juicer_MAIN_BATCHIN7_LOC,GOODS_TYPE.JUICE},
//{Juicer_MAIN_BATCHIN8_LOC,GOODS_TYPE.JUICE},
};
public GOODS_TYPE GoodsType { get; set; }
public BATCHING_CLASS BatchingClass { get; set; }
private string loc;
public string Loc
{
get { return loc; }
set
{
loc = value;
if (GOODS_TYPES.ContainsKey(loc))
GoodsType = GOODS_TYPES[loc];
switch (loc)
{
case COFFEE_HOLDER_LOC:
case TEA_HOLDER_LOC:
BatchingClass = BATCHING_CLASS.HOLDER;
break;
default:
BatchingClass = BATCHING_CLASS.MAIN_MATERIAL;
break;
}
}
}
internal static Dictionary BuildAll()
{
Dictionary temp = new Dictionary();
foreach (var item in GOODS_TYPES)
{
temp.Add(item.Key, new PolymerBatching() { Loc = item.Key });
}
return temp;
}
//internal static IC_SE GetIceCreamSE(string loc, out string sence)
//{
// switch (loc)
// {
// case Juicer_MAIN_BATCHIN1_LOC:
// sence = JaKaHelper.SENCE_接果汁1;
// return IC_SE.SE_1;
// case Juicer_MAIN_BATCHIN2_LOC:
// sence = JaKaHelper.SENCE_接果汁2;
// return IC_SE.SE_2;
// case Juicer_MAIN_BATCHIN3_LOC:
// sence = JaKaHelper.SENCE_接果汁3;
// return IC_SE.SE_3;
// default:
// sence = JaKaHelper.SENCE_接果汁1;
// return IC_SE.SE_1;
// }
//}
}
}