桁架缓存放行点.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. using ServiceCenter.Extensions;
  2. using ServiceCenter.Logs;
  3. using ServiceCenter.SqlSugars;
  4. using SqlSugar;
  5. using System.ComponentModel;
  6. using WCS.Core;
  7. using WCS.Entity;
  8. using WCS.Entity.Protocol.Station;
  9. using WCS.WorkEngineering.Extensions;
  10. using WCS.WorkEngineering.Worlds;
  11. namespace WCS.WorkEngineering.Systems
  12. {
  13. /// <summary>
  14. /// 桁架缓存放行点
  15. /// </summary>
  16. [BelongTo(typeof(SortingPalletizingWorld))]
  17. [Description("桁架缓存放行点")]
  18. public class 桁架缓存放行点 : DeviceSystem<Device<IStation520, IStation521, IStation523>>
  19. {
  20. protected override bool ParallelDo => true;
  21. /// <summary>
  22. /// 取货点设备集合
  23. /// </summary>
  24. private readonly Dictionary<Device<IStation524, IStation523>, List<Device<IStation524, IStation523>>> _cacheDevices = new();
  25. public override void Do(Device<IStation520, IStation521, IStation523> obj)
  26. {
  27. if (obj.Data.VoucherNo != obj.Data2.VoucherNo)
  28. {
  29. World.Log($"凭证号不一致,DB520:{obj.Data.VoucherNo}-DB521:{obj.Data2.VoucherNo}");
  30. return;
  31. }
  32. if (obj.Data3.Status.HasFlag(StationStatus.Run))
  33. {
  34. World.Log("设备运行中");
  35. return;
  36. }
  37. if (obj.Data3.Status.HasFlag(StationStatus.PH_Status) && obj.Data2.Request == 0)
  38. {
  39. World.Log("有光电无请求");
  40. return;
  41. }
  42. if (!obj.Data3.Status.HasFlag(StationStatus.PH_Status) && obj.Data2.Request == 1)
  43. {
  44. World.Log("无光电有请求");
  45. return;
  46. }
  47. if (!obj.Data3.Status.HasFlag(StationStatus.OT_Status))
  48. {
  49. World.Log("站台货物信息与实际占用不一致");
  50. return;
  51. }
  52. if (!obj.Data3.Status.HasFlag(StationStatus.PH_Status))
  53. {
  54. World.Log("无光电");
  55. return;
  56. }
  57. if (obj.Data2.Request != 1)
  58. {
  59. World.Log("无请求");
  60. return;
  61. }
  62. var nextDev = new Device<IStation524, IStation523>(obj.Entity.Targets.FirstOrDefault()!, World);
  63. if (nextDev.Data2.Status1.HasFlag(StationStatus1.IsLock))
  64. {
  65. World.Log($"{nextDev.Entity.Code}桁架未取货完成,线体锁定中");
  66. return;
  67. }
  68. //获取当前缓存线信息对应设备号的下一个地址
  69. var devCode = Device.All.Single(x => x.Code == obj.Entity.Code).Targets.FirstOrDefault();
  70. var nextCode = obj.Entity.Targets.FirstOrDefault().Code.ToShort();
  71. #region 计算当前缓存线是否已全部分配任务
  72. SqlSugarHelper.Do(_db =>
  73. {
  74. var db = _db.Default;
  75. var cacheLine = db.Queryable<WCS_CacheLine>().Includes(x => x.Locations).Single(x => x.LocationNo == obj.Entity.Code.ToShort());
  76. //是否所有的位已全部分配位置
  77. if (cacheLine != null && cacheLine.Locations.All(x => x is { IsEmpty: false, InStock: true } || (x.AddTime < DateTime.Now.AddHours(-x.TimeOut))))
  78. {
  79. //判断下一个地址当前是否有对应的任务
  80. if (db.Queryable<WCS_CacheLine>().Any(x => x.LocationNo == nextCode && x.IsTruss == false)) return;
  81. //下一个地址没有光电
  82. var dev = new Device<IStation523>(Device.All.First(x => x.Code == nextCode.ToString()), World);
  83. if (dev.Data.Status.HasFlag(StationStatus.PH_Status)) return;
  84. //没有对应的任务,开始释放缓存
  85. cacheLine.InStock = true;
  86. cacheLine.LocationNo = devCode.Code.ToShort();
  87. cacheLine.EditTime = DateTime.Now;
  88. db.UpdateableRowLock(cacheLine).UpdateColumns(x => new { x.InStock, x.LocationNo, x.EditTime }).ExecuteCommand();
  89. }
  90. });
  91. #endregion 计算当前缓存线是否已全部分配任务
  92. WCS_TaskInfo task = null;
  93. short nextAdd = 0;
  94. int isSideNum = 0;
  95. SqlSugarHelper.Do(_db =>
  96. {
  97. var db = _db.Default;
  98. //先找到下一个地址对应的缓存信息
  99. var lineCache = db.Queryable<WCS_CacheLine>().Includes(x => x.Locations).Single(x => x.InStock == true && x.LocationNo == nextCode && x.Locations.Any(s => s.TaskId == obj.Data2.TaskNumber));
  100. if (lineCache == null)
  101. {
  102. World.Log($"缓存组{obj.Entity.Code}未分配完");
  103. return;
  104. }
  105. //检测实物数量与有货总数是否相等
  106. if (!lineCache.Put)
  107. {
  108. var qty = lineCache.Locations.Count(x => x is { IsEmpty: false, InStock: true });
  109. var devQty = _cacheDevices.FirstOrDefault(x => x.Key.Entity.Code == obj.Entity.Code).Value
  110. .Count(x => x.Data2.Status.HasFlag(StationStatus.PH_Status));
  111. if (qty != devQty && devQty < qty)
  112. {
  113. World.Log($"缓存组{obj.Entity.Code}工字轮未到齐");
  114. return;
  115. }
  116. lineCache.Put = true;
  117. db.UpdateableRowLock(lineCache).UpdateColumns(x => new { x.Put }).ExecuteCommand();
  118. //TODO:此处不绑定码垛信息的行
  119. }
  120. var taskInfo = db.Queryable<WCS_TaskInfo>().First(v => v.ID == obj.Data2.TaskNumber && v.Status == Entity.TaskStatus.FinishOfShunt) ?? throw new KnownException("未找到对应的WCS任务", LogLevelEnum.Mid);
  121. var location = lineCache.Locations.First(x => x.TaskId == taskInfo.ID);
  122. isSideNum = location.SideNum;
  123. taskInfo.Status = Entity.TaskStatus.ConveyorExecution;
  124. taskInfo.EditWho = "WCS";
  125. taskInfo.EditTime = DateTime.Now;
  126. db.UpdateableRowLock(taskInfo).UpdateColumns(x => new { x.EditWho, x.EditTime, x.Status }).ExecuteCommand();
  127. taskInfo.AddWCS_TASK_DTL(db, obj.Entity.Code, taskInfo.AddrNext, "桁架缓存放行");
  128. task = taskInfo;
  129. nextAdd = obj.Entity.Targets.FirstOrDefault().Code.ToShort();
  130. });
  131. if (task == null) return;
  132. obj.Data.TaskNumber = obj.Data2.TaskNumber;
  133. obj.Data.TaskNumber = obj.Data2.TaskNumber;
  134. obj.Data.GoodsStart = obj.Entity.Code.ToShort();
  135. obj.Data.GoodsStart = obj.Entity.Code.ToShort();
  136. obj.Data.GoodsEnd = nextAdd;
  137. obj.Data.GoodsEnd = nextAdd;
  138. if (isSideNum == 2)
  139. {
  140. obj.Data.CmdType = StationCmd.Res6;
  141. obj.Data.CmdType = StationCmd.Res6;
  142. }
  143. obj.Data.SetVoucherNo();
  144. }
  145. public override bool Select(Device dev)
  146. {
  147. return dev.HasFlag(Extensions.DeviceFlags.桁架缓存放行点);
  148. }
  149. public 桁架缓存放行点()
  150. {
  151. if (WorkStart.WareHouses.Contains("FJ1"))
  152. {
  153. //库一北
  154. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "466"), World), Device.All.Where(x => x.Code is "466" or "467" or "468" or "469" or "470").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  155. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "480"), World), Device.All.Where(x => x.Code is "480" or "481" or "482" or "483" or "484").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  156. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "494"), World), Device.All.Where(x => x.Code is "494" or "495" or "496" or "497" or "498").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  157. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "508"), World), Device.All.Where(x => x.Code is "508" or "509" or "510" or "511" or "512").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  158. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "522"), World), Device.All.Where(x => x.Code is "522" or "523" or "524" or "525" or "526").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  159. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "536"), World), Device.All.Where(x => x.Code is "536" or "537" or "538" or "539" or "540").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  160. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "550"), World), Device.All.Where(x => x.Code is "550" or "551" or "552" or "553" or "554").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  161. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "564"), World), Device.All.Where(x => x.Code is "564" or "565" or "566" or "567" or "568").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  162. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "578"), World), Device.All.Where(x => x.Code is "578" or "579" or "580" or "581" or "582").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  163. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "591"), World), Device.All.Where(x => x.Code is "591" or "592" or "593" or "594" or "595").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  164. //库一南
  165. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "666"), World), Device.All.Where(x => x.Code is "666" or "667" or "668" or "669" or "670").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  166. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "680"), World), Device.All.Where(x => x.Code is "680" or "681" or "682" or "683" or "684").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  167. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "694"), World), Device.All.Where(x => x.Code is "694" or "695" or "696" or "697" or "698").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  168. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "708"), World), Device.All.Where(x => x.Code is "708" or "709" or "710" or "711" or "712").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  169. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "722"), World), Device.All.Where(x => x.Code is "722" or "723" or "724" or "725" or "726").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  170. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "736"), World), Device.All.Where(x => x.Code is "736" or "737" or "738" or "739" or "740").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  171. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "750"), World), Device.All.Where(x => x.Code is "750" or "751" or "752" or "753" or "754").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  172. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "764"), World), Device.All.Where(x => x.Code is "764" or "765" or "766" or "767" or "768").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  173. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "778"), World), Device.All.Where(x => x.Code is "778" or "779" or "780" or "781" or "782").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  174. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "791"), World), Device.All.Where(x => x.Code is "791" or "792" or "793" or "794" or "795").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  175. }
  176. if (WorkStart.WareHouses.Contains("FJ2"))
  177. {
  178. //库二北
  179. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "866"), World), Device.All.Where(x => x.Code is "866" or "867" or "868" or "869" or "870").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  180. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "880"), World), Device.All.Where(x => x.Code is "880" or "881" or "882" or "883" or "884").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  181. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "894"), World), Device.All.Where(x => x.Code is "894" or "895" or "896" or "897" or "898").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  182. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "908"), World), Device.All.Where(x => x.Code is "908" or "909" or "910" or "911" or "912").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  183. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "922"), World), Device.All.Where(x => x.Code is "922" or "923" or "924" or "925" or "926").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  184. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "936"), World), Device.All.Where(x => x.Code is "936" or "937" or "938" or "939" or "940").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  185. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "950"), World), Device.All.Where(x => x.Code is "950" or "951" or "952" or "953" or "954").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  186. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "964"), World), Device.All.Where(x => x.Code is "964" or "965" or "966" or "967" or "968").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  187. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "978"), World), Device.All.Where(x => x.Code is "978" or "979" or "980" or "981" or "982").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  188. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "991"), World), Device.All.Where(x => x.Code is "991" or "992" or "993" or "994" or "995").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  189. //库二南
  190. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1066"), World), Device.All.Where(x => x.Code is "1066" or "1067" or "1068" or "1069" or "1070").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  191. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1080"), World), Device.All.Where(x => x.Code is "1080" or "1081" or "1082" or "1083" or "1084").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  192. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1094"), World), Device.All.Where(x => x.Code is "1094" or "1095" or "1096" or "1097" or "1098").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  193. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1108"), World), Device.All.Where(x => x.Code is "1108" or "1109" or "1110" or "1111" or "1112").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  194. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1122"), World), Device.All.Where(x => x.Code is "1122" or "1123" or "1124" or "1125" or "1126").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  195. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1136"), World), Device.All.Where(x => x.Code is "1136" or "1137" or "1138" or "1139" or "1140").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  196. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1150"), World), Device.All.Where(x => x.Code is "1150" or "1151" or "1152" or "1153" or "1154").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  197. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1164"), World), Device.All.Where(x => x.Code is "1164" or "1165" or "1166" or "1167" or "1168").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  198. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1178"), World), Device.All.Where(x => x.Code is "1178" or "1179" or "1180" or "1181" or "1182").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  199. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1191"), World), Device.All.Where(x => x.Code is "1191" or "1192" or "1193" or "1194" or "1195").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  200. }
  201. if (WorkStart.WareHouses.Contains("FJ3"))
  202. {
  203. //库三北
  204. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1266"), World), Device.All.Where(x => x.Code is "1266" or "1267" or "1268" or "1269" or "1270").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  205. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1280"), World), Device.All.Where(x => x.Code is "1280" or "1281" or "1282" or "1283" or "1284").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  206. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1294"), World), Device.All.Where(x => x.Code is "1294" or "1295" or "1296" or "1297" or "1298").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  207. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1308"), World), Device.All.Where(x => x.Code is "1308" or "1309" or "1310" or "1311" or "1312").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  208. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1322"), World), Device.All.Where(x => x.Code is "1322" or "1323" or "1324" or "1325" or "1326").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  209. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1336"), World), Device.All.Where(x => x.Code is "1336" or "1337" or "1338" or "1339" or "1340").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  210. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1350"), World), Device.All.Where(x => x.Code is "1350" or "1351" or "1352" or "1353" or "1354").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  211. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1364"), World), Device.All.Where(x => x.Code is "1364" or "1365" or "1366" or "1367" or "1368").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  212. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1378"), World), Device.All.Where(x => x.Code is "1378" or "1379" or "1380" or "1381" or "1382").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  213. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1391"), World), Device.All.Where(x => x.Code is "1391" or "1392" or "1393" or "1394" or "1395").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  214. //库三南
  215. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1466"), World), Device.All.Where(x => x.Code is "1466" or "1467" or "1468" or "1469" or "1470").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  216. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1480"), World), Device.All.Where(x => x.Code is "1480" or "1481" or "1482" or "1483" or "1484").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  217. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1494"), World), Device.All.Where(x => x.Code is "1494" or "1495" or "1496" or "1497" or "1498").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  218. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1508"), World), Device.All.Where(x => x.Code is "1508" or "1509" or "1510" or "1511" or "1512").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  219. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1522"), World), Device.All.Where(x => x.Code is "1522" or "1523" or "1524" or "1525" or "1526").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  220. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1536"), World), Device.All.Where(x => x.Code is "1536" or "1537" or "1538" or "1539" or "1540").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  221. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1550"), World), Device.All.Where(x => x.Code is "1550" or "1551" or "1552" or "1553" or "1554").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  222. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1564"), World), Device.All.Where(x => x.Code is "1564" or "1565" or "1566" or "1567" or "1568").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  223. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1578"), World), Device.All.Where(x => x.Code is "1578" or "1579" or "1580" or "1581" or "1582").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  224. _cacheDevices.Add(new Device<IStation524, IStation523>(Device.All.First(x => x.Code == "1591"), World), Device.All.Where(x => x.Code is "1591" or "1592" or "1593" or "1594" or "1595").Select(x => new Device<IStation524, IStation523>(x, World)).ToList());
  225. }
  226. }
  227. }
  228. }