终端一体化运控平台
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

PolymerBatching.cs 4.1 KiB

před 2 roky
před 2 roky
před 2 roky
před 2 roky
před 2 roky
před 2 roky
před 2 roky
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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.MorkTHQ
  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 Juicer_MAIN_BATCHIN1_LOC = "52";
  30. //internal const string Juicer_MAIN_BATCHIN2_LOC = "53";
  31. //internal const string Juicer_MAIN_BATCHIN3_LOC = "54";
  32. //internal const string Juicer_MAIN_BATCHIN4_LOC = "55";
  33. internal const string COFFEE_HOLDER_LOC = "30";
  34. internal const string ICE_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.ICECREAM},
  63. {ICE_MAIN_BATCHIN1_LOC,GOODS_TYPE.ICECREAM},
  64. {ICE_MAIN_BATCHIN2_LOC,GOODS_TYPE.ICECREAM},
  65. {ICE_MAIN_BATCHIN3_LOC,GOODS_TYPE.ICECREAM},
  66. };
  67. public GOODS_TYPE GoodsType { get; set; }
  68. public BATCHING_CLASS BatchingClass { get; set; }
  69. private string loc;
  70. public string Loc
  71. {
  72. get { return loc; }
  73. set
  74. {
  75. loc = value;
  76. if (GOODS_TYPES.ContainsKey(loc))
  77. GoodsType = GOODS_TYPES[loc];
  78. switch (loc)
  79. {
  80. case COFFEE_HOLDER_LOC:
  81. case ICE_HOLDER_LOC:
  82. BatchingClass = BATCHING_CLASS.HOLDER;
  83. break;
  84. default:
  85. BatchingClass = BATCHING_CLASS.MAIN_MATERIAL;
  86. break;
  87. }
  88. }
  89. }
  90. internal static Dictionary<string, PolymerBatching> BuildAll()
  91. {
  92. Dictionary<string, PolymerBatching> temp = new Dictionary<string, PolymerBatching>();
  93. foreach (var item in GOODS_TYPES)
  94. {
  95. temp.Add(item.Key, new PolymerBatching() { Loc = item.Key });
  96. }
  97. return temp;
  98. }
  99. //internal static IC_SE GetIceCreamSE(string loc, out int sence)
  100. //{
  101. // switch (loc)
  102. // {
  103. // case ICE_MAIN_BATCHIN1_LOC:
  104. // sence = LebaiHelper.SENCE_接1号冰淇淋;
  105. // return IC_SE.SE_1;
  106. // case ICE_MAIN_BATCHIN2_LOC:
  107. // sence = LebaiHelper.SENCE_接2号冰淇淋;
  108. // return IC_SE.SE_2;
  109. // case ICE_MAIN_BATCHIN3_LOC:
  110. // sence = LebaiHelper.SENCE_接3号冰淇淋;
  111. // return IC_SE.SE_3;
  112. // default:
  113. // sence = LebaiHelper.SENCE_接1号冰淇淋;
  114. // return IC_SE.SE_1;
  115. // }
  116. //}
  117. }
  118. }