终端一体化运控平台
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

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