You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

155 lines
4.9 KiB

  1. using HBLConsole.Communication;
  2. //using HBLDevice.ICChip;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace HBLConsole.MORKJC
  9. {
  10. internal enum GOODS_TYPE
  11. {
  12. /// <summary>
  13. /// 未知
  14. /// </summary>
  15. NEITHER,
  16. /// <summary>
  17. /// 咖啡
  18. /// </summary>
  19. COFFEE,
  20. /// <summary>
  21. /// 果汁
  22. /// </summary>
  23. JUICE,
  24. /// <summary>
  25. /// 茶水
  26. /// </summary>
  27. TEA,
  28. /// <summary>
  29. /// 水
  30. /// </summary>
  31. WATER,
  32. /// <summary>
  33. /// 杯子
  34. /// </summary>
  35. CUP
  36. }
  37. internal enum BATCHING_CLASS
  38. {
  39. HOLDER,
  40. MAIN_MATERIAL,
  41. }
  42. internal class PolymerBatching
  43. {
  44. internal const string Juicer_MAIN_BATCHIN1_LOC = "52";
  45. internal const string Juicer_MAIN_BATCHIN2_LOC = "53";
  46. internal const string Juicer_MAIN_BATCHIN3_LOC = "54";
  47. internal const string Juicer_MAIN_BATCHIN4_LOC = "55";
  48. //internal const string Juicer_MAIN_BATCHIN5_LOC = "56";
  49. //internal const string Juicer_MAIN_BATCHIN6_LOC = "57";
  50. //internal const string Juicer_MAIN_BATCHIN7_LOC = "58";
  51. //internal const string Juicer_MAIN_BATCHIN8_LOC = "59";
  52. internal const string COFFEE_HOLDER_LOC = "30";
  53. internal const string TEA_HOLDER_LOC = "51";
  54. public static Dictionary<string, GOODS_TYPE> GOODS_TYPES = new Dictionary<string, GOODS_TYPE>() {
  55. {"1", GOODS_TYPE.COFFEE},
  56. {"2", GOODS_TYPE.COFFEE},
  57. {"3", GOODS_TYPE.COFFEE},
  58. {"4", GOODS_TYPE.COFFEE},
  59. {"5", GOODS_TYPE.COFFEE},
  60. {"6", GOODS_TYPE.COFFEE},
  61. {"7", GOODS_TYPE.COFFEE},
  62. {"8", GOODS_TYPE.COFFEE},
  63. {"9", GOODS_TYPE.COFFEE},
  64. {"10",GOODS_TYPE.COFFEE},
  65. {"11",GOODS_TYPE.COFFEE},
  66. {"12",GOODS_TYPE.COFFEE},
  67. {"13",GOODS_TYPE.COFFEE},
  68. {"14",GOODS_TYPE.COFFEE},
  69. {"15",GOODS_TYPE.COFFEE},
  70. {"16",GOODS_TYPE.COFFEE},
  71. {"17",GOODS_TYPE.COFFEE},
  72. {"18",GOODS_TYPE.COFFEE},
  73. {"19",GOODS_TYPE.COFFEE},
  74. {"20",GOODS_TYPE.COFFEE},
  75. {"21",GOODS_TYPE.COFFEE},
  76. {"22",GOODS_TYPE.COFFEE},
  77. {"23",GOODS_TYPE.COFFEE},
  78. {"24",GOODS_TYPE.COFFEE},
  79. {"25",GOODS_TYPE.COFFEE},
  80. { COFFEE_HOLDER_LOC,GOODS_TYPE.CUP},
  81. {"56",GOODS_TYPE.TEA },
  82. {Juicer_MAIN_BATCHIN1_LOC,GOODS_TYPE.JUICE},
  83. {Juicer_MAIN_BATCHIN2_LOC,GOODS_TYPE.JUICE},
  84. {Juicer_MAIN_BATCHIN3_LOC,GOODS_TYPE.JUICE},
  85. {Juicer_MAIN_BATCHIN4_LOC,GOODS_TYPE.JUICE},
  86. {"61",GOODS_TYPE.WATER},
  87. //{Juicer_MAIN_BATCHIN5_LOC,GOODS_TYPE.JUICE},
  88. //{Juicer_MAIN_BATCHIN6_LOC,GOODS_TYPE.JUICE},
  89. //{Juicer_MAIN_BATCHIN7_LOC,GOODS_TYPE.JUICE},
  90. //{Juicer_MAIN_BATCHIN8_LOC,GOODS_TYPE.JUICE},
  91. };
  92. public GOODS_TYPE GoodsType { get; set; }
  93. public BATCHING_CLASS BatchingClass { get; set; }
  94. private string loc;
  95. public string Loc
  96. {
  97. get { return loc; }
  98. set
  99. {
  100. loc = value;
  101. if (GOODS_TYPES.ContainsKey(loc))
  102. GoodsType = GOODS_TYPES[loc];
  103. switch (loc)
  104. {
  105. case COFFEE_HOLDER_LOC:
  106. case TEA_HOLDER_LOC:
  107. BatchingClass = BATCHING_CLASS.HOLDER;
  108. break;
  109. default:
  110. BatchingClass = BATCHING_CLASS.MAIN_MATERIAL;
  111. break;
  112. }
  113. }
  114. }
  115. internal static Dictionary<string, PolymerBatching> BuildAll()
  116. {
  117. Dictionary<string, PolymerBatching> temp = new Dictionary<string, PolymerBatching>();
  118. foreach (var item in GOODS_TYPES)
  119. {
  120. temp.Add(item.Key, new PolymerBatching() { Loc = item.Key });
  121. }
  122. return temp;
  123. }
  124. //internal static IC_SE GetIceCreamSE(string loc, out string sence)
  125. //{
  126. // switch (loc)
  127. // {
  128. // case Juicer_MAIN_BATCHIN1_LOC:
  129. // sence = JaKaHelper.SENCE_接果汁1;
  130. // return IC_SE.SE_1;
  131. // case Juicer_MAIN_BATCHIN2_LOC:
  132. // sence = JaKaHelper.SENCE_接果汁2;
  133. // return IC_SE.SE_2;
  134. // case Juicer_MAIN_BATCHIN3_LOC:
  135. // sence = JaKaHelper.SENCE_接果汁3;
  136. // return IC_SE.SE_3;
  137. // default:
  138. // sence = JaKaHelper.SENCE_接果汁1;
  139. // return IC_SE.SE_1;
  140. // }
  141. //}
  142. }
  143. }