Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 

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