终端一体化运控平台
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.

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