林豪 左 2 years ago
parent
commit
3c23e8ed06

+ 1 - 0
ServiceCenter/ServiceCenter.csproj

@@ -23,6 +23,7 @@
     <PackageReference Include="WCS.Core" Version="1.0.2.1" />
     <PackageReference Include="WCS.Entity" Version="1.0.3.2" />
     <PackageReference Include="WCS.Entity.Protocol" Version="1.0.4.2" />
+    <PackageReference Include="wms.sqlsugar" Version="1.0.0.2" />
   </ItemGroup>
 
 </Project>

+ 5 - 1
WCS.WorkEngineering/Extensions/DeviceExtension.cs

@@ -256,7 +256,11 @@ namespace WCS.WorkEngineering.Extensions
         环形库分流点 = 1L << 31,
         桁架分流点 = 1L << 32,
         桁架缓存放行点 = 1L << 33,
-        桁架取货点 = 1L << 34
+        桁架取货点 = 1L << 34,
+        拆盘机09 = 1L << 35,
+        拆盘机非09 = 1L << 36,
+        码垛位09 = 1L << 37,
+        码垛位非09 = 1L << 38,
     }
 
     /// <summary>

+ 18 - 3
WCS.WorkEngineering/Extensions/TaskExtension.cs

@@ -1,5 +1,4 @@
-using Newtonsoft.Json;
-using ServiceCenter.Extensions;
+using ServiceCenter.Extensions;
 using ServiceCenter.Logs;
 using ServiceCenter.Redis;
 using ServiceCenter.SqlSugars;
@@ -40,6 +39,7 @@ namespace WCS.WorkEngineering.Extensions
                 Desc = desc,
                 AddWho = "WCS"
             }).SplitTable().ExecuteCommand();
+            task.updateRedisHash();
         }
 
         /// <summary>
@@ -138,6 +138,21 @@ namespace WCS.WorkEngineering.Extensions
             RedisHub.WMS.HMSet($"Hash:{task.ID}", task.ToDic());
         }
 
-        
+        #region 工字轮支线分流
+
+        ///// <summary>
+        /////  初始化码垛信息
+        ///// </summary>
+        //public static void InitStackStructure()
+        //{
+        //}
+
+        ////获取目标地址
+        //public static string GetNextAdd(this WCS_TaskInfo task)
+        //{
+        //    //先通过订单号获取对应的物料信息
+        //}
+
+        #endregion 工字轮支线分流
     }
 }

+ 1 - 1
WCS.WorkEngineering/Protocol/Station/IStation523.cs

@@ -8,7 +8,7 @@ namespace WCS.WorkEngineering.Protocol.Station
     /// <summary>
     /// 输送机状态读取协议
     /// </summary>
-    public interface IStation523 : Station523<StationAlarm, StationStatus, StationStatus>
+    public interface IStation523 : Station523<StationAlarm, StationStatus, StationStatus1>
     {
     }
 

+ 103 - 0
WCS.WorkEngineering/Protocol/Station/StationEnum.cs

@@ -137,6 +137,109 @@ namespace WCS.WorkEngineering.Protocol.Station
         UnassignedTask = 1 << 15,
     }
 
+    /// <summary>
+    /// 输送机状态
+    /// </summary>
+    [Flags]
+    public enum StationStatus1 : ushort
+    {
+        /// <summary>
+        /// 备用
+        /// </summary>
+        [Description("备用")]
+        RES1 = 1 << 0,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        [Description("备用")]
+        RES2 = 1 << 1,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        [Description("备用")]
+        RES3 = 1 << 2,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        [Description("备用")]
+        RES4 = 1 << 3,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        [Description("备用")]
+        RES5 = 1 << 4,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        [Description("备用")]
+        RES6 = 1 << 5,
+
+        /// <summary>
+        ///  备用
+        /// </summary>
+        [Description("备用")]
+        RES7 = 1 << 6,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        [Description("备用")]
+        RES8 = 1 << 7,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        [Description("备用")]
+        RES9 = 1 << 8,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        [Description("备用")]
+        RES10 = 1 << 9,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        [Description("备用")]
+        RES11 = 1 << 10,
+
+        /// <summary>
+        ///  备用
+        /// </summary>
+        [Description("备用")]
+        RES12 = 1 << 11,
+
+        /// <summary>
+        ///  备用
+        /// </summary>
+        [Description("备用")]
+        RES13 = 1 << 12,
+
+        /// <summary>
+        ///  拆盘机光电
+        /// </summary>
+        [Description("拆盘机光电")]
+        RES14 = 1 << 13,
+
+        /// <summary>
+        ///  备用
+        /// </summary>
+        [Description("备用")]
+        RES15 = 1 << 14,
+
+        /// <summary>
+        ///  备用
+        /// </summary>
+        [Description("备用")]
+        RES16 = 1 << 15,
+    }
+
     /// <summary>
     /// 外形故障
     /// </summary>

+ 1 - 1
WCS.WorkEngineering/Protocol/Station/WCS_Station523.cs

@@ -26,6 +26,6 @@ namespace WCS.WorkEngineering.Protocol.Station
 
         /// <inheritdoc/>
         [DataMember(Order = 4)]
-        public StationStatus Status1 { get; set; }
+        public StationStatus1 Status1 { get; set; }
     }
 }

+ 3 - 1
WCS.WorkEngineering/Systems/AgvSystems.cs

@@ -113,7 +113,9 @@ namespace WCS.WorkEngineering.Systems
                 //获取所有未结束的入库AGV任务
                 SqlSugarHelper.Do(db =>
                 {
-                    agvTaskInfos = db.Default.Queryable<WCS_AgvTaskInfo>().Where(v => v.Status < AGVTaskStatus.MissionCompleted && v.TaskType == AGVTaskType.EnterDepot).SplitTable(tabs => tabs.Take(2)).OrderBy(v => v.EditTime).ToList();
+                    agvTaskInfos = db.Default.Queryable<WCS_AgvTaskInfo>()
+                                             .Where(v => v.Status < AGVTaskStatus.MissionCompleted && v.TaskType == AGVTaskType.EnterDepot)
+                                             .SplitTable(tabs => tabs.Take(2)).OrderBy(v => v.EditTime).ToList();
                 });
 
                 if (agvTaskInfos.Any())

+ 5 - 0
WCS.WorkEngineering/Systems/NoInteractionSystems.cs

@@ -1,4 +1,5 @@
 using PlcSiemens.Core.Extension;
+using ServiceCenter.Extensions;
 using ServiceCenter.Logs;
 using ServiceCenter.Redis;
 using ServiceCenter.SqlSugars;
@@ -65,6 +66,10 @@ namespace WCS.WorkEngineering.Systems
                                     {
                                         if (task.SrmStation.IsNullOrEmpty()) //如果没有指定放货站台
                                         {
+                                            if (task.Device.IsNullOrEmpty())
+                                            {
+                                                task.Device = "SRM" + task.Tunnel.GetLastDigit();
+                                            }
                                             //获取堆垛机到目标地址的路径信息
                                             var path = DevicePath.GetPath(task.Device, task.AddrTo);
                                             task.SrmStation = path.Points[1].Code;

+ 6 - 27
WCS.WorkEngineering/Systems/一楼叠盘机入库.cs

@@ -30,32 +30,7 @@ namespace WCS.WorkEngineering.Systems
             WCS_TaskInfo task = null;//处理完成的任务
             try
             {
-                var device = "";
-                var barcode = "";
-
-                switch (obj.Entity.Code)
-                {
-                    case "2527":
-                        device = "SRM1";
-                        barcode = "TPA";
-                        break;
-
-                    case "2528":
-                        device = "SRM1";
-                        barcode = "TPA";
-                        break;
-
-                    case "2727":
-                        device = "SRM2";
-                        barcode = "TPA";
-                        break;
-
-                    case "2728":
-                        device = "SRM2";
-                        barcode = "TPA";
-                        break;
-                };
-
+                var barcode = "TPA";
                 SqlSugarHelper.Do(_db =>
                 {
                     var db = _db.Default;
@@ -63,10 +38,14 @@ namespace WCS.WorkEngineering.Systems
                     //验证是否有对应的任务
                     if (!db.Queryable<WCS_TaskInfo>().Any(v => v.BarCode == barcode))
                     {
+                        var palletType = PalletType.PalletNo09;
+                        if (obj.Entity.Code is "2527" or "2727") palletType = PalletType.Pallet09;
+
                         var res = WmsApi.OneFloorWorkerBuildEmptyPalletsStock(new OneFloorWorkerBuildEmptyPalletsStockRequest()
                         {
                             PalletCode = barcode,
                             StartLoc = obj.Entity.Code,
+                            PalletType = palletType,
                             Height = 2
                         });
                         if (res.ResCode == WebApi.Models.WMS.Response.ResponseStatusCodeEnum.Sucess) return;
@@ -92,7 +71,7 @@ namespace WCS.WorkEngineering.Systems
                         };
                         taskInfo.AddWCS_TASK_DTL(_db, obj.Entity.Code, "开始执行入库任务");
                         db.Updateable(taskInfo).ExecuteCommand();
-                        taskInfo.updateRedisHash();
+                        
                         task = taskInfo;
                     }
                     else return;

+ 1 - 0
WCS.WorkEngineering/Systems/主线分流点.cs

@@ -30,6 +30,7 @@ namespace WCS.WorkEngineering.Systems
 
             //获取条码
             var bcr = obj.Data4.BcrCode.Trim('\0').Trim();
+
             if (string.IsNullOrWhiteSpace(bcr))
             {
                 obj.Data.TaskNumber = 1;

+ 53 - 0
WCS.WorkEngineering/Systems/二楼拆盘机自动补空托盘组.cs

@@ -0,0 +1,53 @@
+using ServiceCenter.Extensions;
+using ServiceCenter.SqlSugars;
+using System.ComponentModel;
+using WCS.Core;
+using WCS.Entity;
+using WCS.WorkEngineering.Protocol.Station;
+using WCS.WorkEngineering.WebApi.Controllers;
+using WCS.WorkEngineering.WebApi.Models.WMS.Request;
+using WCS.WorkEngineering.Worlds;
+using DeviceFlags = WCS.WorkEngineering.Extensions.DeviceFlags;
+
+namespace WCS.WorkEngineering.Systems
+{
+    /// <summary>
+    ///  二楼拆盘机自动补空托盘组
+    /// </summary>
+    [BelongTo(typeof(MainWorld))]
+    [Description("二楼拆盘机自动补空托盘组")]
+    public class 二楼拆盘机自动补空托盘组 : DeviceSystem<Device<IStation520, IStation521, IStation523>>
+    {
+        protected override bool ParallelDo => true;
+
+        protected override bool SaveLogsToFile => true;
+
+        public override void Do(Device<IStation520, IStation521, IStation523> obj)
+        {
+            // 拆盘机没有光电
+            if (obj.Data3.Status1.HasFlag(StationStatus1.RES14)) return;
+            var tunnel = obj.Entity.Sources.Where(x => x.HasFlag(DeviceFlags.输送机))
+                                           .SelectMany(x => x.Sources) //堆垛机取货点设备
+                                           .Where(x => x.HasFlag(DeviceFlags.巷道))
+                                           .FirstOrDefault();
+            SqlSugarHelper.Do(_db =>
+            {
+                var db = _db.Default;
+
+                //验证是否有对应的任务
+                if (!db.Queryable<WCS_TaskInfo>().Any(v => v.AddrTo == obj.Entity.Code))
+                {
+                    var res = WmsApi.ApplyEmptyPalletGroupOutStorage(obj.Entity.Code, tunnel.Code.GetLastDigit(), obj.Entity.HasFlag(DeviceFlags.拆盘机09) ? PalletType.Pallet09 : PalletType.PalletNo09);
+                    if (res.ResCode == WebApi.Models.WMS.Response.ResponseStatusCodeEnum.Sucess) return;
+                }
+                else return;
+            });
+        }
+
+        public override bool Select(Device dev)
+        {
+            //return dev.Code == "1602";
+            return dev.HasFlag(DeviceFlags.拆盘机09) || dev.HasFlag(DeviceFlags.拆盘机非09);
+        }
+    }
+}

+ 11 - 11
WCS.WorkEngineering/WebApi/Controllers/AgvController.cs

@@ -106,7 +106,7 @@ namespace WCS.WorkEngineering.WebApi.Controllers
                         //}
                         SqlSugarHelper.Do(db =>
                         {
-                            var res = WmsApi.GetTunnelEmptyConCount();
+                            //var res = WmsApi.GetTunnelEmptyConCount();
 
                             var agvStations = db.Default.Queryable<WCS_AgvTaskInfo>().SplitTable(tabs => tabs.Take(2))
                                               .Where(v => v.Status < AGVTaskStatus.Complete3 && v.TaskType == AGVTaskType.CallForMaterial).Select(v => v.Station).ToList();
@@ -118,16 +118,16 @@ namespace WCS.WorkEngineering.WebApi.Controllers
                             //    return;
                             //}
 
-                            foreach (var item in res.ResDataList)
-                            {
-                                var station = Device.All.Where(v => v.Code == "TY" + item.Tunnel.ToString())
-                                                        .Select(v => v.Targets).SelectMany(v => v)
-                                                        .Where(v => v.HasProtocol(typeof(IStation520)))
-                                                        .Where(v => v.Code is "1012" or "1014" or "1016")
-                                                        .FirstOrDefault();
-                                item.Tunnel = station.ToInt();
-                            }
-                            var stationNo = res.ResDataList.OrderBy(v => v.Count).Select(v => v.Tunnel.ToString()).ToList();
+                            //foreach (var item in res.ResDataList)
+                            //{
+                            //    var station = Device.All.Where(v => v.Code == "TY" + item.Tunnel.ToString())
+                            //                            .Select(v => v.Targets).SelectMany(v => v)
+                            //                            .Where(v => v.HasProtocol(typeof(IStation520)))
+                            //                            .Where(v => v.Code is "1012" or "1014" or "1016")
+                            //                            .FirstOrDefault();
+                            //    item.Tunnel = station.ToInt();
+                            //}
+                            //var stationNo = res.ResDataList.OrderBy(v => v.Count).Select(v => v.Tunnel.ToString()).ToList();
                             //var dev = obj.MinBy(v => stationNo.IndexOf(v.Entity.Code));
                             //var task = db.Default.Queryable<WCS_TaskInfo>().First(v => v.ID == dev.Data.TaskNumber) ?? throw new Exception("无有效任务");
                             //var id = db.GetAGVTaskId();

+ 5 - 86
WCS.WorkEngineering/WebApi/Controllers/WmsApi.cs

@@ -3,7 +3,6 @@ using ServiceCenter.Extensions;
 using ServiceCenter.Logs;
 using ServiceCenter.Redis;
 using ServiceCenter.WebApi;
-using WCS.WorkEngineering.WebApi.Models.AGV.Response;
 using WCS.WorkEngineering.WebApi.Models.WCS.Response;
 using WCS.WorkEngineering.WebApi.Models.WMS.Request;
 using WCS.WorkEngineering.WebApi.Models.WMS.Response;
@@ -142,58 +141,21 @@ namespace WCS.WorkEngineering.WebApi.Controllers
             return res;
         }
 
-        /// <summary>
-        ///  一楼空工字轮申请出库
-        /// </summary>
-        /// <param name="outEndPostion">出库位置</param>
-        /// <returns></returns>
-        public static SRes ApplyStockOutTask(string outEndPostion) => ApplyStockOutTask(outEndPostion, 2);
-
         /// <summary>
         ///  申请出库任务
         /// </summary>
-        /// <param name="outEndPostion">出库位置</param>
-        /// <param name="outType">出库类型</param>
         /// <returns></returns>
         /// <exception cref="KnownException"></exception>
-        public static SRes ApplyStockOutTask(string outEndPostion, int outType)
+        public static SRes ApplyEmptyPalletGroupOutStorage(string addto, int tunnel, PalletType type)
         {
             var request = new ApplyStockOutTaskRequest
             {
-                OutEndPostion = outEndPostion,
-                OutType = outType,
-                WarehouseCode = wareHouseId,
+                Tunnel = tunnel,
+                FJPalletType = type,
+                AddTo = addto
             };
-            switch (outEndPostion)
-            {
-                case "1012":
-                    request.Tunnel = "1";
-                    break;
-
-                case "1014":
-                    request.Tunnel = "2";
-                    break;
 
-                case "1016":
-                    request.Tunnel = "3";
-                    break;
-            }
-            var res = APICaller.CallApi2<SRes>(WMSUrl + "/api/Hj/ApplyStockOutTask", request);
-            if (res.ResCode != ResponseStatusCodeEnum.Sucess)
-            {
-                throw new KnownException(res.ResMsg, LogLevelEnum.High);
-            }
-            return res;
-        }
-
-        /// <summary>
-        ///  获取各巷道剩余空轮数量
-        /// </summary>
-        /// <returns></returns>
-        /// <exception cref="KnownException"></exception>
-        public static SRes<GetTunnelEmptyConResponse> GetTunnelEmptyConCount()
-        {
-            var res = APICaller.CallApi2<SRes<GetTunnelEmptyConResponse>>(WMSUrl + "/api/Hj/GetTunnelEmptyConCount", new GetTunnelEmptyConCountRequest { });
+            var res = APICaller.CallApi2<SRes>(WMSUrl + "/api/fj/ApplyEmptyPalletGroupOutStorage", request);
             if (res.ResCode != ResponseStatusCodeEnum.Sucess)
             {
                 throw new KnownException(res.ResMsg, LogLevelEnum.High);
@@ -222,49 +184,6 @@ namespace WCS.WorkEngineering.WebApi.Controllers
             return res;
         }
 
-        /// <summary>
-        ///  二深位获取移库任务
-        /// </summary>
-        /// <param name="taskNo">任务</param>
-        /// <returns></returns>
-        /// <exception cref="KnownException"></exception>
-        public static SRes<AddWcsMoveTaskResponse> AddWcsMoveTask(int taskNo)
-        {
-            var res = APICaller.CallApi2<SRes<AddWcsMoveTaskResponse>>(WMSUrl + "/api/Hj/AddWcsMoveTask", new CompleteTaskRequest
-            {
-                TaskNum = taskNo,
-            });
-            if (res.ResCode != ResponseStatusCodeEnum.Sucess)
-            {
-                throw new KnownException(res.ResMsg, LogLevelEnum.High);
-            }
-            return res;
-        }
-
-        /// <summary>
-        /// 向WMS获取入库任务 一次单卷
-        /// </summary>
-        /// <param name="barcode">产品条码</param>
-        /// <param name="devCode">设备条码</param>
-        /// <param name="getTunnel"></param>
-        /// <returns></returns>
-        /// <exception cref="Exception"></exception>
-        public static I_WCS_GetInTaskResponse I_WCS_GetInTask(string barcode, string devCode, bool getTunnel = false)
-        {
-            var res = APICaller.CallApi<I_WCS_GetInTaskResponse>(WMSUrl + "/api/Task/I_WCS_GetInTask", new List<I_WCS_GetInTaskRequest>()
-            {
-                new I_WCS_GetInTaskRequest(){
-                     ContainerBarCode = barcode,
-                     WareHouseId = wareHouseId,
-                     EquipmentNo = devCode,
-                     Memo1 = getTunnel ? "1" : "" //1:分巷道  2:分货位
-                }
-            });
-            if (!res.ResType) throw new KnownException(res.ResMessage, LogLevelEnum.High);
-
-            return res;
-        }
-
         /// <summary>
         ///  处理任务验证接口
         /// </summary>

+ 7 - 27
WCS.WorkEngineering/WebApi/Models/WMS/Request/ApplyStockOutTaskRequest.cs

@@ -1,40 +1,20 @@
-using System.ComponentModel.DataAnnotations;
-
-namespace WCS.WorkEngineering.WebApi.Models.WMS.Request
+namespace WCS.WorkEngineering.WebApi.Models.WMS.Request
 {
     public class ApplyStockOutTaskRequest
     {
         /// <summary>
-        /// 出库位置
-        /// </summary>
-        [Required(ErrorMessage = "{0} 不可为空")]
-        public string OutEndPostion { get; set; }
-
-        /// <summary>
-        /// 出库类型(0.无效参数;1.物料出库;2.空托盘出库;3.空工字轮出库;)
-        /// </summary>
-        [Required(ErrorMessage = "{0} 不可为空")]
-        public int OutType { get; set; }
-
-        /// <summary>
-        /// 仓库编码
-        /// </summary>
-        [Required(ErrorMessage = "{0} 不可为空")]
-        public string WarehouseCode { get; set; }
-
-        /// <summary>
-        /// 巷道
+        ///  托盘类型
         /// </summary>
-        public string Tunnel { get; set; } = "";
+        public PalletType FJPalletType { get; set; }
 
         /// <summary>
-        /// 备用
+        ///  巷道
         /// </summary>
-        public string Memo1 { get; set; } = "";
+        public int Tunnel { get; set; }
 
         /// <summary>
-        /// 备用
+        ///  目标位置
         /// </summary>
-        public string Memo2 { get; set; } = "";
+        public string AddTo { get; set; }
     }
 }

+ 91 - 29
WCS.WorkEngineering/WorkStart.cs

@@ -40,9 +40,9 @@ namespace WCS.WorkEngineering
                 {
                     new Tuple<int, int>(1601, 1620),
                     new Tuple<int, int>(2501, 2540),
-
                     new Tuple<int, int>(2701, 2740),
-                })
+                    new Tuple<int, int>(1661, 1690),
+                }),
             };
 
             foreach (var item in tuples)
@@ -60,7 +60,10 @@ namespace WCS.WorkEngineering
                         conv.AddProtocol<IStation520>(db520, 520, item.Item1);
                         conv.AddProtocol<IStation521>(db521, 521, item.Item1);
                         conv.AddProtocol<IStation523>(db523, 523, item.Item1);
-
+                        if (i == 1661)
+                        {
+                            var a = 0;
+                        }
                         db520 = db520 + 14;
                         db521 = db521 + 16;
                         db523 = db523 + 12;
@@ -227,7 +230,7 @@ namespace WCS.WorkEngineering
 
             List<RGVSegmentInfo> RgvInfo = new List<RGVSegmentInfo>
             {
-                //new RGVSegmentInfo( 1, "10.30.37.113"),
+                new RGVSegmentInfo( 1, "10.30.37.113"),
                 //new RGVSegmentInfo( 2, "10.30.37.118"),
                 //new RGVSegmentInfo( 3, "10.30.37.123"),
                 //new RGVSegmentInfo( 4, "10.30.37.128"),
@@ -289,25 +292,80 @@ namespace WCS.WorkEngineering
 
             #region 配置路径信息
 
-            List<RouteInfo> routeInfos = new List<RouteInfo>
-            {
+            List<RouteInfo> routeInfos = new List<RouteInfo>();
+
+            #region 出库路线
+
+            #region 堆垛机的下一个地址 巷道
+
+            routeInfos.AddRange(new List<RouteInfo>() {
                 new RouteInfo("SRM1", new string[] { "TY1" }),
                 new RouteInfo("SRM2", new string[] { "TY2" }),
-                //巷道对应堆垛机 及 一楼出库点
-                new RouteInfo("TY1", new string[] { "SRM1","2532"}),
-                new RouteInfo("TY2", new string[] { "SRM2","2732" }),
-
-                //一楼入库点
-                new RouteInfo("2532", new string[] { "TY1" }),
-                new RouteInfo("2732", new string[] { "TY2" }),
-                new RouteInfo("2527", new string[] { "TY1" }),
-                new RouteInfo("2528", new string[] { "TY1" }),
-                new RouteInfo("2727", new string[] { "TY2" }),
-                new RouteInfo("2728", new string[] { "TY2" }),
-
-                //分流点路径配置
-                new RouteInfo("455", new string[] { "466", "480", "494", "508","522","536"}),
-            };
+            });
+
+            #endregion 堆垛机的下一个地址 巷道
+
+            #region 巷道的下一个地址 堆垛机放货点
+
+            routeInfos.AddRange(new List<RouteInfo>() {
+                  new RouteInfo("TY1", new string[] { "SRM1", "2532", "1601", "1605" }),
+                  new RouteInfo("TY2", new string[] { "SRM2", "2732" }),
+            });
+
+            #endregion 巷道的下一个地址 堆垛机放货点
+
+            #region 堆垛机放货点的下一个地址 拆盘机
+
+            routeInfos.AddRange(new List<RouteInfo>() {
+                   new RouteInfo("1601", new string[] { "1602" }),
+                   new RouteInfo("1605", new string[] { "1606" }),
+            });
+
+            #endregion 堆垛机放货点的下一个地址 拆盘机
+
+            #region 拆盘机的下一个地址 RGV
+
+            routeInfos.AddRange(new List<RouteInfo>() {
+                   new RouteInfo("1602", new string[] { "RGV1" }),
+                   new RouteInfo("1606", new string[] { "RGV1" })
+            });
+
+            #endregion 拆盘机的下一个地址 RGV
+
+            #region RGV的下一个地址 码垛工位
+
+            routeInfos.AddRange(new List<RouteInfo>() {
+                  new RouteInfo("RGV1", new string[] { "1662", "1663", "1664", "1665","1604", "1661", "1675", "1674", "1673", "1672", "1671", "1670", "1669", "1668", "1667", "1666" }),
+            });
+
+            #endregion RGV的下一个地址 码垛工位
+
+            #endregion 出库路线
+
+            #region 入库路线
+
+            #region 堆垛机取货点的下一个地址 巷道
+
+            routeInfos.AddRange(new List<RouteInfo>() {
+                   new RouteInfo("2532", new string[] { "TY1" }),
+                   new RouteInfo("2732", new string[] { "TY2" }),
+                   new RouteInfo("2527", new string[] { "TY1" }),
+                   new RouteInfo("2528", new string[] { "TY1" }),
+                   new RouteInfo("2727", new string[] { "TY2" }),
+                   new RouteInfo("2728", new string[] { "TY2" }),
+            });
+
+            #endregion 堆垛机取货点的下一个地址 巷道
+
+            #region 桁架分流点
+
+            routeInfos.AddRange(new List<RouteInfo>() {
+                new RouteInfo("455", new string[] { "466", "480", "494", "508", "522", "536" }),
+            });
+
+            #endregion 桁架分流点
+
+            #endregion 入库路线
 
             foreach (var item in routeInfos)
             {
@@ -327,19 +385,23 @@ namespace WCS.WorkEngineering
 
             Dictionary<DeviceFlags, List<string>> devices = new Dictionary<DeviceFlags, List<string>>
             {
-                //{ DeviceFlags.入库, new List<string>() { "2532", "2533", "2534", "2732", "2733", "2734" } },
-                //{ DeviceFlags.出库, new List<string>() { "2532", "2533", "2534", "2732", "2733", "2734" } },
-                //{ DeviceFlags.扫码, new List<string>() { "2532", "2732" } },
-                //{ DeviceFlags.一列堆垛机, new List<string>() { "SRM1"/*, "SRM3", "SRM5"*/} },
-                //{ DeviceFlags.二列堆垛机, new List<string>() { "SRM2"/*, "SRM4", "SRM6"*/ } },
-                //{ DeviceFlags.一楼扫码,new List<string>(){ "2532","2732"} },
-                //{ DeviceFlags.一楼叠盘机,new List<string>() { "2527","2528","2727","2728"} },
+                { DeviceFlags.入库, new List<string>() { "2532", "2533", "2534", "2732", "2733", "2734" } },
+                { DeviceFlags.出库, new List<string>() { "2532", "2533", "2534", "2732", "2733", "2734" } },
+                { DeviceFlags.扫码, new List<string>() { "2532", "2732" } },
+                { DeviceFlags.一列堆垛机, new List<string>() { "SRM1"/*, "SRM3", "SRM5"*/} },
+                { DeviceFlags.二列堆垛机, new List<string>() { "SRM2"/*, "SRM4", "SRM6"*/ } },
+                { DeviceFlags.一楼扫码,new List<string>(){ "2532","2732"} },
+                { DeviceFlags.一楼叠盘机,new List<string>() { "2527","2528","2727","2728"} },
                 { DeviceFlags.主线分流点,new List<string>() { "22","41","61"} },
                 { DeviceFlags.满轮主线第一次扫码,new List<string>() { "1"} },
                 { DeviceFlags.环形库分流点,new List<string>(){ "418"} },
                 { DeviceFlags.桁架分流点,new List<string>() { "455" } },
                 { DeviceFlags.桁架缓存放行点, new List<string>(){ "466", "480", "494", "508","522","536" } },
-                { DeviceFlags.桁架取货点, new List<string>(){ "461", "475", "489", "503","517","531" } }
+                { DeviceFlags.桁架取货点, new List<string>(){ "461", "475", "489", "503","517","531" } },
+                { DeviceFlags.拆盘机09, new List<string>(){ "1606" } },
+                { DeviceFlags.拆盘机非09, new List<string>(){ "1602" } },
+                //{ DeviceFlags.码垛位09, new List<string>(){  "461", "475", "489", "503","517","531", "461", "475", "489", "503", "517", "531" } },
+                //{ DeviceFlags.码垛位非09, new List<string>(){  } },
         };
 
             devices.ForEach(item =>