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

123 righe
3.8 KiB

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