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

PolymerBatching.cs 3.9 KiB

2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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
  11. {
  12. public enum GOODS_TYPE
  13. {
  14. NEITHER,
  15. COFFEE,
  16. ICECREAM,
  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. }