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

91 řádky
2.5 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace BPASmartClient.MorkTSingle
  7. {
  8. internal enum GOODS_TYPE
  9. {
  10. /// <summary>
  11. /// 未知
  12. /// </summary>
  13. NEITHER,
  14. /// <summary>
  15. /// 咖啡
  16. /// </summary>
  17. COFFEE,
  18. /// <summary>
  19. /// 果汁
  20. /// </summary>
  21. JUICE
  22. }
  23. internal enum BATCHING_CLASS
  24. {
  25. HOLDER,
  26. MAIN_MATERIAL,
  27. }
  28. internal class PolymerBatching
  29. {
  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. {"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. {"51", GOODS_TYPE.COFFEE},
  44. {"52", GOODS_TYPE.COFFEE},
  45. {"53", GOODS_TYPE.COFFEE},
  46. {"54", GOODS_TYPE.COFFEE},
  47. {"55", GOODS_TYPE.COFFEE},
  48. {"56", GOODS_TYPE.COFFEE},
  49. {"57", GOODS_TYPE.COFFEE},
  50. {"58", GOODS_TYPE.COFFEE},
  51. {"59", GOODS_TYPE.COFFEE},
  52. {"7", GOODS_TYPE.COFFEE},
  53. {"8", GOODS_TYPE.COFFEE},
  54. };
  55. public GOODS_TYPE GoodsType { get; set; }
  56. public BATCHING_CLASS BatchingClass { get; set; }
  57. private string loc;
  58. public string Loc
  59. {
  60. get { return loc; }
  61. set
  62. {
  63. loc = value;
  64. if (GOODS_TYPES.ContainsKey(loc))
  65. GoodsType = GOODS_TYPES[loc];
  66. switch (loc)
  67. {
  68. default:
  69. BatchingClass = BATCHING_CLASS.MAIN_MATERIAL;
  70. break;
  71. }
  72. }
  73. }
  74. internal static Dictionary<string, PolymerBatching> BuildAll()
  75. {
  76. Dictionary<string, PolymerBatching> temp = new Dictionary<string, PolymerBatching>();
  77. foreach (var item in GOODS_TYPES)
  78. {
  79. temp.Add(item.Key, new PolymerBatching() { Loc = item.Key });
  80. }
  81. return temp;
  82. }
  83. }
  84. }