终端一体化运控平台
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

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