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.
 
 

154 lines
4.8 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.MORKJC2
  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. //{Juicer_MAIN_BATCHIN5_LOC,GOODS_TYPE.JUICE},
  87. //{Juicer_MAIN_BATCHIN6_LOC,GOODS_TYPE.JUICE},
  88. //{Juicer_MAIN_BATCHIN7_LOC,GOODS_TYPE.JUICE},
  89. //{Juicer_MAIN_BATCHIN8_LOC,GOODS_TYPE.JUICE},
  90. };
  91. public GOODS_TYPE GoodsType { get; set; }
  92. public BATCHING_CLASS BatchingClass { get; set; }
  93. private string loc;
  94. public string Loc
  95. {
  96. get { return loc; }
  97. set
  98. {
  99. loc = value;
  100. if (GOODS_TYPES.ContainsKey(loc))
  101. GoodsType = GOODS_TYPES[loc];
  102. switch (loc)
  103. {
  104. case COFFEE_HOLDER_LOC:
  105. case TEA_HOLDER_LOC:
  106. BatchingClass = BATCHING_CLASS.HOLDER;
  107. break;
  108. default:
  109. BatchingClass = BATCHING_CLASS.MAIN_MATERIAL;
  110. break;
  111. }
  112. }
  113. }
  114. internal static Dictionary<string, PolymerBatching> BuildAll()
  115. {
  116. Dictionary<string, PolymerBatching> temp = new Dictionary<string, PolymerBatching>();
  117. foreach (var item in GOODS_TYPES)
  118. {
  119. temp.Add(item.Key, new PolymerBatching() { Loc = item.Key });
  120. }
  121. return temp;
  122. }
  123. //internal static IC_SE GetIceCreamSE(string loc, out string sence)
  124. //{
  125. // switch (loc)
  126. // {
  127. // case Juicer_MAIN_BATCHIN1_LOC:
  128. // sence = JaKaHelper.SENCE_接果汁1;
  129. // return IC_SE.SE_1;
  130. // case Juicer_MAIN_BATCHIN2_LOC:
  131. // sence = JaKaHelper.SENCE_接果汁2;
  132. // return IC_SE.SE_2;
  133. // case Juicer_MAIN_BATCHIN3_LOC:
  134. // sence = JaKaHelper.SENCE_接果汁3;
  135. // return IC_SE.SE_3;
  136. // default:
  137. // sence = JaKaHelper.SENCE_接果汁1;
  138. // return IC_SE.SE_1;
  139. // }
  140. //}
  141. }
  142. }