终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

123 lines
5.7 KiB

  1. using BPA.Helper;
  2. using Org.BouncyCastle.Asn1.X509;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace BPASmartClient.MorkF.Model
  9. {
  10. internal class MaterialCoordinate : Singleton<MaterialCoordinate>
  11. {
  12. public List<string> MLNumberList { get; set; } = new List<string>() { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16"
  13. , "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27" };
  14. public List<Coordinate> MLCoordinateList { get;set;} = new List<Coordinate>()
  15. { new Coordinate() { X = 34500, Y = 0 }, new Coordinate() { X = 34500, Y = 9000 } , new Coordinate() { X = 34500, Y = 0 } , //第1层
  16. new Coordinate(){ X = 34500,Y=0} , new Coordinate() { X = 34500, Y = 83000 }, new Coordinate(){ X = 34500,Y=0}, //第1层
  17. new Coordinate(){ X = 34500,Y=0} , new Coordinate() { X = 34500, Y = 0 }, new Coordinate(){ X = 34500,Y=0}, //第1层
  18. new Coordinate(){ X = 0,Y=0} , new Coordinate() { X = 0, Y = 0 }, new Coordinate(){ X = 0,Y=0}, //第2层
  19. new Coordinate(){ X = 0,Y=0} , new Coordinate() { X = 0, Y = 0 }, new Coordinate(){ X = 0,Y=0}, //第2层
  20. new Coordinate(){ X = 0,Y=0} , new Coordinate() { X = 0, Y = 0 }, new Coordinate(){ X = 0,Y=0}, //第2层
  21. new Coordinate(){ X = 0,Y=0} , new Coordinate() { X = 0, Y = 0 }, new Coordinate(){ X = 0,Y=0}, //第3层
  22. new Coordinate(){ X = 0,Y=0} , new Coordinate() { X = 0, Y = 0 }, new Coordinate(){ X = 0,Y=0}, //第3层
  23. new Coordinate(){ X = 0,Y=0} , new Coordinate() { X = 0, Y = 0 }, new Coordinate(){ X = 0,Y=0} //第3层
  24. };
  25. public MaterialCoordinate()
  26. {
  27. if(MLNumberList.Count == MLCoordinateList.Count && MLNumberList.Count == 27)
  28. {
  29. for(int i = 0;i<MLNumberList.Count;i++)
  30. {
  31. //判断是否已经有该值了
  32. if (!dicNoMaterialCoordinate.ContainsKey(MLNumberList[i]))
  33. {
  34. dicNoMaterialCoordinate.Add(MLNumberList[i], MLCoordinateList[i]);
  35. }
  36. }
  37. }
  38. //dicSpecificMaterialCoordinate.Add("MaterialHeight",new Coordinate() { X = 0,Y=0});
  39. //dicSpecificMaterialCoordinate.Add("Fry1", new Coordinate() { X = 0, Y = 0 });
  40. //dicSpecificMaterialCoordinate.Add("Fry2", new Coordinate() { X = 0, Y = 0 });
  41. }
  42. public Coordinate frying1 { get; set; } = new Coordinate() { X = 0, Y = 0 };
  43. public Coordinate frying2 { get; set; } = new Coordinate() { X = 0, Y = 0 };
  44. public Coordinate materialHeight { get; set; } = new Coordinate() { X = 0, Y = 0 };
  45. public int MaterialOneX { get; set; } = -1;
  46. public int MaterialTwoX { get; set; } = -1;
  47. public int MaterialThreeX { get; set; } = -1;
  48. public int distance_1 { get; set; } = 0;
  49. public int distance_2 { get; set; } = 0;
  50. public int distance_3 { get; set; } = 0;
  51. /// <summary>
  52. /// 更新键值对
  53. /// </summary>
  54. /// <param name="mlNumber"></param>
  55. /// <param name="coordinate"></param>
  56. /// <returns></returns>
  57. public bool UpdateMLCoordinateList(string mlNumber,Coordinate coordinate)
  58. {
  59. if(dicNoMaterialCoordinate.ContainsKey(mlNumber))
  60. {
  61. dicNoMaterialCoordinate[mlNumber] = coordinate;
  62. return true;
  63. }
  64. else
  65. {
  66. return false;
  67. }
  68. }
  69. /// <summary>
  70. /// 每个取菜点的编号与坐标字典
  71. /// </summary>
  72. public Dictionary<string, Coordinate> dicNoMaterialCoordinate { get; set; } = new Dictionary<string, Coordinate>();
  73. /// <summary>
  74. /// 每个取菜点的编号与坐标字典
  75. /// </summary>
  76. //public Dictionary<string, Coordinate> dicSpecificMaterialCoordinate { get; set; } = new Dictionary<string, Coordinate>();
  77. //{
  78. // {"A1",new Coordinate(){ X = 34500,Y=0} },
  79. // {"A2",new Coordinate(){ X = 34500,Y=9000} },
  80. // {"A3",new Coordinate(){ X = 34500,Y=0} },
  81. // {"B1",new Coordinate(){ X = 34500,Y=0} },
  82. // {"B2",new Coordinate(){ X = 34500,Y=83000} },
  83. // {"B3",new Coordinate(){ X = 34500,Y=0} },
  84. // {"C1",new Coordinate(){ X = 34500,Y=0} },
  85. // {"C2",new Coordinate(){ X = 34500,Y=0} },
  86. // {"C3",new Coordinate(){ X = 34500,Y=0} },
  87. // {"D1",new Coordinate(){ X = 0,Y=0} },
  88. // {"D2",new Coordinate(){ X = 0,Y=0} },
  89. // {"D3",new Coordinate(){ X = 0,Y=0} },
  90. // {"E1",new Coordinate(){ X = 0,Y=0} },
  91. // {"E2",new Coordinate(){ X = 0,Y=0} },
  92. // {"E3",new Coordinate(){ X = 0,Y=0} },
  93. // {"F1",new Coordinate(){ X = 0,Y=0} },
  94. // {"F2",new Coordinate(){ X = 0,Y=0} },
  95. // {"F3",new Coordinate(){ X = 0,Y=0} },
  96. // {"G1",new Coordinate(){ X = 0,Y=0} },
  97. // {"G2",new Coordinate(){ X = 0,Y=0} },
  98. // {"G3",new Coordinate(){ X = 0,Y=0} },
  99. // {"H1",new Coordinate(){ X = 0,Y=0} },
  100. // {"H2",new Coordinate(){ X = 0,Y=0} },
  101. // {"H3",new Coordinate(){ X = 0,Y=0} },
  102. // {"I1",new Coordinate(){ X = 0,Y=0} },
  103. // {"I2",new Coordinate(){ X = 0,Y=0} },
  104. // {"I3",new Coordinate(){ X = 0,Y=0} },
  105. // {"J1",new Coordinate(){ X = 0,Y=0} },
  106. // {"J2",new Coordinate(){ X = 0,Y=0} },
  107. // {"J3",new Coordinate(){ X = 0,Y=0} },
  108. //};
  109. }
  110. }