终端一体化运控平台
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

129 lines
4.1 KiB

  1. using BPASmartClient.Lebai;
  2. using BPASmartClient.LebaiRobot;
  3. using BPASmartClient.Model.单片机.Enum;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace BPASmartClient.MorkTHQ
  10. {
  11. public enum GOODS_TYPE
  12. {
  13. NEITHER,
  14. COFFEE,
  15. ICECREAM,
  16. JUICE
  17. }
  18. public enum BATCHING_CLASS
  19. {
  20. HOLDER,
  21. MAIN_MATERIAL,
  22. }
  23. public class PolymerBatching
  24. {
  25. internal const string ICE_MAIN_BATCHIN1_LOC = "52";
  26. internal const string ICE_MAIN_BATCHIN2_LOC = "53";
  27. internal const string ICE_MAIN_BATCHIN3_LOC = "54";
  28. //internal const string Juicer_MAIN_BATCHIN1_LOC = "52";
  29. //internal const string Juicer_MAIN_BATCHIN2_LOC = "53";
  30. //internal const string Juicer_MAIN_BATCHIN3_LOC = "54";
  31. //internal const string Juicer_MAIN_BATCHIN4_LOC = "55";
  32. internal const string COFFEE_HOLDER_LOC = "30";
  33. internal const string ICE_HOLDER_LOC = "51";
  34. public static Dictionary<string, GOODS_TYPE> GOODS_TYPES = new Dictionary<string, GOODS_TYPE>() {
  35. {"1", GOODS_TYPE.COFFEE},
  36. {"2", GOODS_TYPE.COFFEE},
  37. {"3", GOODS_TYPE.COFFEE},
  38. {"4", GOODS_TYPE.COFFEE},
  39. {"5", GOODS_TYPE.COFFEE},
  40. {"6", GOODS_TYPE.COFFEE},
  41. {"7", GOODS_TYPE.COFFEE},
  42. {"8", GOODS_TYPE.COFFEE},
  43. {"9", GOODS_TYPE.COFFEE},
  44. {"10",GOODS_TYPE.COFFEE},
  45. {"11",GOODS_TYPE.COFFEE},
  46. {"12",GOODS_TYPE.COFFEE},
  47. {"13",GOODS_TYPE.COFFEE},
  48. {"14",GOODS_TYPE.COFFEE},
  49. {"15",GOODS_TYPE.COFFEE},
  50. {"16",GOODS_TYPE.COFFEE},
  51. {"17",GOODS_TYPE.COFFEE},
  52. {"18",GOODS_TYPE.COFFEE},
  53. {"19",GOODS_TYPE.COFFEE},
  54. {"20",GOODS_TYPE.COFFEE},
  55. {"21",GOODS_TYPE.COFFEE},
  56. {"22",GOODS_TYPE.COFFEE},
  57. {"23",GOODS_TYPE.COFFEE},
  58. {"24",GOODS_TYPE.COFFEE},
  59. {"25",GOODS_TYPE.COFFEE},
  60. {"30",GOODS_TYPE.COFFEE},
  61. {"51",GOODS_TYPE.ICECREAM},
  62. {ICE_MAIN_BATCHIN1_LOC,GOODS_TYPE.ICECREAM},
  63. {ICE_MAIN_BATCHIN2_LOC,GOODS_TYPE.ICECREAM},
  64. {ICE_MAIN_BATCHIN3_LOC,GOODS_TYPE.ICECREAM},
  65. };
  66. public GOODS_TYPE GoodsType { get; set; }
  67. public BATCHING_CLASS BatchingClass { get; set; }
  68. private string loc;
  69. public string Loc
  70. {
  71. get { return loc; }
  72. set
  73. {
  74. loc = value;
  75. if (GOODS_TYPES.ContainsKey(loc))
  76. GoodsType = GOODS_TYPES[loc];
  77. switch (loc)
  78. {
  79. case COFFEE_HOLDER_LOC:
  80. case ICE_HOLDER_LOC:
  81. BatchingClass = BATCHING_CLASS.HOLDER;
  82. break;
  83. default:
  84. BatchingClass = BATCHING_CLASS.MAIN_MATERIAL;
  85. break;
  86. }
  87. }
  88. }
  89. internal static Dictionary<string, PolymerBatching> BuildAll()
  90. {
  91. Dictionary<string, PolymerBatching> temp = new Dictionary<string, PolymerBatching>();
  92. foreach (var item in GOODS_TYPES)
  93. {
  94. temp.Add(item.Key, new PolymerBatching() { Loc = item.Key });
  95. }
  96. return temp;
  97. }
  98. //internal static IC_SE GetIceCreamSE(string loc, out int sence)
  99. //{
  100. // switch (loc)
  101. // {
  102. // case ICE_MAIN_BATCHIN1_LOC:
  103. // sence = LebaiHelper.SENCE_接1号冰淇淋;
  104. // return IC_SE.SE_1;
  105. // case ICE_MAIN_BATCHIN2_LOC:
  106. // sence = LebaiHelper.SENCE_接2号冰淇淋;
  107. // return IC_SE.SE_2;
  108. // case ICE_MAIN_BATCHIN3_LOC:
  109. // sence = LebaiHelper.SENCE_接3号冰淇淋;
  110. // return IC_SE.SE_3;
  111. // default:
  112. // sence = LebaiHelper.SENCE_接1号冰淇淋;
  113. // return IC_SE.SE_1;
  114. // }
  115. //}
  116. }
  117. }