桁架.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. using ServiceCenter.Extensions;
  2. using ServiceCenter.Logs;
  3. using ServiceCenter.SqlSugars;
  4. using System.ComponentModel;
  5. using WCS.Core;
  6. using WCS.Entity;
  7. using WCS.WorkEngineering.Extensions;
  8. using WCS.WorkEngineering.Protocol.Station;
  9. using WCS.WorkEngineering.Protocol.Truss;
  10. using WCS.WorkEngineering.Worlds;
  11. using DeviceFlags = WCS.WorkEngineering.Extensions.DeviceFlags;
  12. namespace WCS.WorkEngineering.Systems
  13. {
  14. /// <summary>
  15. /// 桁架
  16. /// </summary>
  17. [BelongTo(typeof(MainWorld))]
  18. [Description("桁架")]
  19. public class 桁架 : DeviceSystem<Truss>
  20. {
  21. protected override bool ParallelDo => true;
  22. protected override bool SaveLogsToFile => true;
  23. /// <summary>
  24. /// 取货点设备集合
  25. /// </summary>
  26. private readonly Dictionary<Device<IStation524, IStation523>, List<Device<IStation524, IStation523>>> _pickUpDevices = new();
  27. public override void Do(Truss obj)
  28. {
  29. if (obj.Data.VoucherNo != obj.Data2.VoucherNo) throw new KnownException($"凭证号不一致,DB520:{obj.Data.VoucherNo}-DB521:{obj.Data2.VoucherNo}", LogLevelEnum.High);
  30. if (obj.Data2.CmdType == 1)
  31. {
  32. SqlSugarHelper.Do(_db =>
  33. {
  34. var db = _db.Default;
  35. List<int> ids = new List<int>() { obj.Data2.PalletizingRowId1, obj.Data2.PalletizingRowId2 };
  36. var palletizingRow = db.Queryable<WCS_PalletizingRow>().Includes(x => x.CacheLine, c => c.Locations).Includes(x => x.Locs).Where(x => ids.Contains(x.Id)).ToList();
  37. //更新行数据
  38. foreach (var pr in palletizingRow)
  39. {
  40. var cacheLine = db.Queryable<WCS_CacheLine>().Includes(x => x.Locations).Single(x => x.Id == pr.CacheLine.Id);
  41. //先更新对应的位信息
  42. try
  43. {
  44. foreach (var loc in pr.Locs)
  45. {
  46. //var cacheLoc = cacheLine.Locations.Single(x => x.XYNo == loc.XYNo);
  47. //cacheLoc = db.Queryable<WCS_CacheLineLoc>().Single(x => x.Id == cacheLoc.Id);
  48. //loc.TaskId = cacheLoc.TaskId;
  49. loc.Finish = true;
  50. db.Updateable(loc).ExecuteCommand();
  51. //db.Deleteable(cacheLoc);s
  52. }
  53. }
  54. catch (Exception a)
  55. {
  56. Console.WriteLine(a);
  57. throw;
  58. }
  59. pr.Finish = true;
  60. db.Updateable(pr).ExecuteCommand();
  61. db.Deleteable(cacheLine).ExecuteCommand();
  62. }
  63. //更新层数据
  64. var layerId = palletizingRow.FirstOrDefault().PalletizingLayerId;
  65. var layer = db.Queryable<WCS_PalletizingLayer>().Includes(x => x.Rows).Single(x => x.Id == layerId);
  66. if (layer.Rows.All(x => x.Finish))
  67. {
  68. layer.Finish = true;
  69. db.Updateable(layer).ExecuteCommand();
  70. }
  71. });
  72. obj.Data.CmdType = 1;
  73. }
  74. if (obj.Data2.CmdType == 0) obj.Data.CmdType = 0;
  75. if (obj.Data2.CmdType != 0 || obj.Data2.CmdType != 0) return;
  76. if (obj.Data2.Status != TrussStatus.Idle) return;
  77. //查找所有的可用开始搬运的线体
  78. var pickUpDevices = _pickUpDevices.Where(x => x.Key.Data2.Status1.HasFlag(StationStatus1.IsLock)).ToList();
  79. List<WCS_PalletizingRow> palletizingRowList = null;
  80. WCS_Palletizing palletizing = null;
  81. SqlSugarHelper.Do(_db =>
  82. {
  83. var db = _db.Default;
  84. //找到有还有层没结束的码垛记录信息,有对应托盘
  85. var palletizingLsit = db.Queryable<WCS_Palletizing>().Includes(x => x.Layers, r => r.Rows, l => l.Locs)
  86. .Where(x => x.Layers.Any(l => !l.Finish) && x.PalletizingStation != null).ToList();
  87. //可用码垛信息记录中对应的托盘任务已经结束了//TODO:暂时默认托盘搬运任务已经结束
  88. //筛选出目标位置有光电的码垛记录信息
  89. var devCode = palletizingLsit.Select(x => x.PalletizingStation);
  90. var devList = Device.All.Where(x => devCode.Contains(x.Code)).Select(x => new Device<IStation520, IStation521, IStation523>(x, World)).ToList();
  91. devList = devList.Where(x => x.Data3.Status.HasFlag(StationStatus.PH_Status)).ToList();
  92. devCode = devList.Select(x => x.Entity.Code);
  93. palletizingLsit = palletizingLsit.Where(x => devCode.Contains(x.PalletizingStation)).ToList(); //可以放货的目标托盘
  94. //可以取货的码垛信息
  95. var pickUpCode = _pickUpDevices.Select(x => x.Key.Entity.Code);
  96. palletizingLsit = palletizingLsit.Where(x => x.Layers
  97. .Where(w => !w.Finish)
  98. .SelectMany(w => w.Rows)
  99. .Where(v => !v.Finish).Any(w => pickUpCode.Contains(w.LineCode))).ToList();
  100. var palletizingInfo = palletizingLsit.FirstOrDefault();
  101. if (palletizingInfo == null) return;
  102. //筛选出已经预锁的行
  103. var palletizingRow = palletizingInfo.Layers.SelectMany(x => x.Rows).Where(x => x is { Finish: false, IsEmpty: false, LineCode: not null }).Where(x => pickUpDevices.Select(p => p.Key.Entity.Code).Contains(x.LineCode)).OrderBy(x => x.RowNo).Take(2).ToList();
  104. if (palletizingRow.Count == 2 && palletizingRow[0].LineCode == palletizingRow[1].LineCode) palletizingRow = palletizingRow!.Take(1).ToList();
  105. if (palletizingRow.Count == 2 && palletizingRow[0].RowNo + 1 != palletizingRow[1].RowNo) palletizingRow = palletizingRow!.Take(1).ToList();
  106. palletizingRowList = palletizingRow;
  107. palletizing = palletizingInfo;
  108. });
  109. if (palletizingRowList == null) return;
  110. if (!palletizingRowList.Any()) return;
  111. for (var i = 0; i < palletizingRowList.Count; i++)
  112. {
  113. var palletizingRow = palletizingRowList[i];
  114. var locs = palletizingRow.Locs.OrderBy(x => x.XYNo.ToInt()).ToArray();
  115. var devs = pickUpDevices.FirstOrDefault(x => x.Key.Entity.Code == palletizingRow.LineCode).Value
  116. .OrderBy(x => x.Entity.Code).ToArray();
  117. switch (i)
  118. {
  119. case 0:
  120. obj.Data.DestPosition_1 = palletizingRow.LineCode!.ToShort();
  121. obj.Data.TargetPallte1 = palletizing.PalletizingStation!.ToShort();
  122. obj.Data.Task1_1 = devs[0].Data.TaskNumber;
  123. obj.Data.Dest1_1 = locs[0].XYNo.ToShort();
  124. obj.Data.Task1_2 = devs[1].Data.TaskNumber;
  125. obj.Data.Dest1_2 = locs[1].XYNo.ToShort();
  126. obj.Data.Task1_3 = devs[2].Data.TaskNumber;
  127. obj.Data.Dest1_3 = locs[2].XYNo.ToShort();
  128. obj.Data.Task1_4 = devs[3].Data.TaskNumber;
  129. obj.Data.Dest1_4 = locs[3].XYNo.ToShort();
  130. obj.Data.Task1_5 = devs[4].Data.TaskNumber;
  131. obj.Data.Dest1_5 = locs[4].XYNo.ToShort();
  132. obj.Data.TaskSum1 = palletizingRow.QtyMaxCount.ToShort();
  133. obj.Data.PalletizingRowId1 = palletizingRow.Id;
  134. break;
  135. case 1:
  136. obj.Data.DestPosition_2 = palletizingRow.LineCode!.ToShort();
  137. obj.Data.TargetPallte2 = palletizing.PalletizingStation!.ToShort();
  138. obj.Data.Task2_1 = devs[0].Data.TaskNumber;
  139. obj.Data.Dest2_1 = locs[0].XYNo.ToShort();
  140. obj.Data.Task2_2 = devs[1].Data.TaskNumber;
  141. obj.Data.Dest2_2 = locs[1].XYNo.ToShort();
  142. obj.Data.Task2_3 = devs[2].Data.TaskNumber;
  143. obj.Data.Dest2_3 = locs[2].XYNo.ToShort();
  144. obj.Data.Task2_4 = devs[3].Data.TaskNumber;
  145. obj.Data.Dest2_4 = locs[3].XYNo.ToShort();
  146. obj.Data.Task2_5 = devs[4].Data.TaskNumber;
  147. obj.Data.Dest2_5 = locs[4].XYNo.ToShort();
  148. obj.Data.TaskSum2 = palletizingRow.QtyMaxCount.ToShort();
  149. obj.Data.PalletizingRowId2 = palletizingRow.Id;
  150. break;
  151. }
  152. }
  153. if (palletizingRowList.Count == 1)
  154. {
  155. obj.Data.DestPosition_2 = 0;
  156. obj.Data.TargetPallte2 = 0;
  157. obj.Data.Task2_1 = 0;
  158. obj.Data.Dest2_1 = 0;
  159. obj.Data.Task2_2 = 0;
  160. obj.Data.Dest2_2 = 0;
  161. obj.Data.Task2_3 = 0;
  162. obj.Data.Dest2_3 = 0;
  163. obj.Data.Task2_4 = 0;
  164. obj.Data.Dest2_4 = 0;
  165. obj.Data.Task2_5 = 0;
  166. obj.Data.Dest2_5 = 0;
  167. obj.Data.TaskSum2 = 0;
  168. obj.Data.PalletizingRowId2 = 0;
  169. }
  170. obj.Data.VoucherNo++;
  171. }
  172. public override bool Select(Device dev)
  173. {
  174. return dev.HasFlag(Extensions.DeviceFlags.桁架);
  175. }
  176. public 桁架()
  177. {
  178. var trussList = Device.All.Where(x => x.HasFlag(DeviceFlags.桁架));
  179. foreach (var truss in trussList)
  180. {
  181. switch (truss.Code)
  182. {
  183. case "Truss1":
  184. _pickUpDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "461"), World), Device.All.Where(x => x.Code is "461" or "462" or "463" or "464" or "465").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  185. _pickUpDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "475"), World), Device.All.Where(x => x.Code is "475" or "476" or "477" or "478" or "479").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  186. _pickUpDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "489"), World), Device.All.Where(x => x.Code is "490" or "491" or "492" or "493" or "489").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  187. _pickUpDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "503"), World), Device.All.Where(x => x.Code is "503" or "504" or "505" or "506" or "507").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  188. _pickUpDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "517"), World), Device.All.Where(x => x.Code is "517" or "518" or "519" or "520" or "521").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  189. _pickUpDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "531"), World), Device.All.Where(x => x.Code is "532" or "533" or "534" or "535" or "531").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  190. _pickUpDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "545"), World), Device.All.Where(x => x.Code is "546" or "547" or "548" or "549" or "545").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  191. _pickUpDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "559"), World), Device.All.Where(x => x.Code is "559" or "560" or "561" or "562" or "563").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  192. _pickUpDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "573"), World), Device.All.Where(x => x.Code is "573" or "574" or "575" or "576" or "577").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  193. _pickUpDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "586"), World), Device.All.Where(x => x.Code is "586" or "587" or "588" or "589" or "590").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  194. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  195. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  196. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  197. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  198. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  199. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  200. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  201. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  202. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  203. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  204. break;
  205. case "Truss2":
  206. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  207. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  208. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  209. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  210. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  211. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  212. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  213. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  214. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  215. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  216. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  217. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  218. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  219. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  220. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  221. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  222. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  223. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  224. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  225. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  226. break;
  227. case "Truss3":
  228. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  229. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  230. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  231. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  232. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  233. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  234. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  235. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  236. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  237. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  238. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  239. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  240. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  241. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  242. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  243. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  244. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  245. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  246. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  247. //_pickUpDevices.Add(Device.All.First(x => x.Code == ""), Device.All.Where(x => x.Code is "" or "" or "" or "" or "").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  248. break;
  249. }
  250. }
  251. }
  252. }
  253. }