|
- using HBLConsole.Communication;
- using HBLDevice.ICChip;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace HBLConsole.MORKIC
- {
- internal enum GOODS_TYPE
- {
- NEITHER,
- COFFEE,
- ICECREAM,
- }
-
- internal enum BATCHING_CLASS
- {
- HOLDER,
- MAIN_MATERIAL,
- }
-
- internal class PolymerBatching
- {
- internal const string ICE_MAIN_BATCHIN1_LOC = "52";
- internal const string ICE_MAIN_BATCHIN2_LOC = "53";
- internal const string ICE_MAIN_BATCHIN3_LOC = "54";
- internal const string COFFEE_HOLDER_LOC = "30";
- internal const string ICE_HOLDER_LOC = "51";
- public static Dictionary<string, GOODS_TYPE> GOODS_TYPES = new Dictionary<string, GOODS_TYPE>() {
- {"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},
- {"30",GOODS_TYPE.COFFEE},
- {"51",GOODS_TYPE.ICECREAM},
- {ICE_MAIN_BATCHIN1_LOC,GOODS_TYPE.ICECREAM},
- {ICE_MAIN_BATCHIN2_LOC,GOODS_TYPE.ICECREAM},
- {ICE_MAIN_BATCHIN3_LOC,GOODS_TYPE.ICECREAM},
- };
-
- 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 ICE_HOLDER_LOC:
- BatchingClass = BATCHING_CLASS.HOLDER;
- break;
- default:
- BatchingClass = BATCHING_CLASS.MAIN_MATERIAL;
- break;
- }
- }
- }
-
- internal static Dictionary<string, PolymerBatching> BuildAll()
- {
- Dictionary<string, PolymerBatching> temp = new Dictionary<string, PolymerBatching>();
- 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 int sence)
- {
- switch (loc)
- {
- case ICE_MAIN_BATCHIN1_LOC:
- sence = LebaiHelper.SENCE_接冰淇淋1;
- return IC_SE.SE_1;
- case ICE_MAIN_BATCHIN2_LOC:
- sence = LebaiHelper.SENCE_接冰淇淋3;
- return IC_SE.SE_3;
- case ICE_MAIN_BATCHIN3_LOC:
- sence = LebaiHelper.SENCE_接冰淇淋2;
- return IC_SE.SE_2;
- default:
- sence = LebaiHelper.SENCE_接冰淇淋2;
- return IC_SE.SE_2;
- }
- }
- }
- }
|