xu.lu 1 ano atrás
pai
commit
e774dffad2

+ 14 - 6
业务工程/分拣库/WCS.WorkEngineering/Systems/RGVSystems.cs

@@ -214,12 +214,20 @@ namespace WCS.WorkEngineering.Systems
                                 {
                                     if (destPosition.HasFlag(DeviceFlags.桁架码垛位))
                                     {
-                                        var dest = new Device<ITruss530>(destPosition!, World);
-                                        dest.Data.MaxQuantity = countQty;
-                                        dest.Data.Quantity = 0;
-                                        dest.Data.Type = shortCode;
-                                        dest.Data.VoucherNo++;
-                                        World.Log($"任务处理:写入码垛信息-码垛位[{dest.Entity.Code}]最大码垛数量[{dest.Data.MaxQuantity}]已码数量[{dest.Data.Quantity}]垛形[{dest.Data.Type}]凭证号[{dest.Data.VoucherNo}]");
+                                        var dest = new Device<ITruss530,ITruss531>(destPosition!, World);
+                                        if (dest.Data2.MaxQuantity == 0)
+                                        {
+                                            dest.Data.MaxQuantity = countQty;
+                                            dest.Data.Quantity = 0;
+                                            dest.Data.Type = shortCode;
+                                            dest.Data.VoucherNo++;
+                                            World.Log($"任务处理:写入码垛信息-码垛位[{dest.Entity.Code}]最大码垛数量[{dest.Data.MaxQuantity}]已码数量[{dest.Data.Quantity}]垛形[{dest.Data.Type}]凭证号[{dest.Data.VoucherNo}]");
+                                        }
+                                        else {
+                                            World.Log($"桁架垛型信息未清除,无法写入新垛型信息请检查确认,最大码垛数量[{dest.Data.MaxQuantity}]已码数量[{dest.Data.Quantity}]垛形[{dest.Data.Type}]凭证号[{dest.Data.VoucherNo}]",LogLevelEnum.Mid);
+                                            return;
+                                        }
+                                        
                                     }
                                     else if (destPosition.HasFlag(DeviceFlags.环形库码垛工位))
                                     {

+ 1 - 1
业务工程/分拣库/WCS.WorkEngineering/Systems/桁架码垛/桁架.cs

@@ -264,7 +264,7 @@ namespace WCS.WorkEngineering.Systems
                     })).OrderBy(x => x.AddTime).ToList();
                 if (!palletizingLsit.Any())
                 {
-                    World.Log($"没有可用取货点,码垛信息是否正常");
+                    World.Log($"{warehouseCode}没有可用取货点,码垛信息是否正常");
                     obj.Entity.SetFlag(warehouseCode, maxQuantity + 1); //当前侧无满足抓取条件的码垛信息直接进行切侧
                     return;
                 }

+ 1 - 1
业务工程/分拣库/WCS.WorkEngineering/Systems/环形库/环形库分配货位.cs

@@ -77,7 +77,7 @@ namespace WCS.WorkEngineering.Systems.环形库
                 var res = WmsApi.RingApplyStockInLoc(task.ID, task.Device, obj.Entity.Code, task.GoodsType);
                 if (res.ResCode != ResponseStatusCodeEnum.Sucess)
                 {
-                    World.Log(res.ResMsg);
+                    World.Log(res.ResMsg,ServiceCenter.Logs.LogLevelEnum.Mid);
                     return;
                 }
                 task.AddrTo = res.ResData.CellNo;

+ 62 - 44
业务工程/分拣库/WCS.WorkEngineering/WorkStart.cs

@@ -345,21 +345,28 @@ namespace WCS.WorkEngineering
 
                 #region 外检信息
 
-                List<ShapeInfo> shapeInfo = new List<ShapeInfo>
-            {
-                new ShapeInfo(new int[] { 2732,2532 }, "10.30.37.89"),
-            };
+            //    List<ShapeInfo> shapeInfo = new List<ShapeInfo>
+            //{
+            //    new ShapeInfo(new int[] { 2732,2532 }, "10.30.37.89"),
+            //};
 
-                foreach (var item in shapeInfo)
-                {
-                    for (int i = 0; i < item.DeviceNo.Length; i++)
-                    {
-                        var conv = Device.All.FirstOrDefault(x => x.Code == item.DeviceNo[i].ToString());
-                        conv.AddFlag(DeviceFlags.外检);
-                        int pos = i * 14;
-                        conv.AddProtocol<IStation91>(pos, 91, item.Ip);
-                    }
-                }
+                //foreach (var item in shapeInfo)
+                //{
+                //    for (int i = 0; i < item.DeviceNo.Length; i++)
+                //    {
+                //        var conv = Device.All.FirstOrDefault(x => x.Code == item.DeviceNo[i].ToString());
+                //        conv.AddFlag(DeviceFlags.外检);
+                //        int pos = i * 14;
+                //        conv.AddProtocol<IStation91>(pos, 91, item.Ip);
+                //    }
+                //}
+                var conv1 = Device.All.FirstOrDefault(x => x.Code == "2532");
+                conv1.AddFlag(DeviceFlags.外检);
+                conv1.AddProtocol<IStation91>(714, 91, "10.30.37.89");
+
+                var conv2 = Device.All.FirstOrDefault(x => x.Code == "2732");
+                conv2.AddFlag(DeviceFlags.外检);
+                conv2.AddProtocol<IStation91>(1274, 91, "10.30.37.89");
 
                 #endregion 外检信息
 
@@ -859,22 +866,28 @@ namespace WCS.WorkEngineering
 
                 #region 外检信息
 
-                List<ShapeInfo> shapeInfo = new List<ShapeInfo>
-                {
-                    new ShapeInfo(new int[] { 2932,3132 }, "10.30.37.97"),
-                };
-
-                foreach (var item in shapeInfo)
-                {
-                    for (int i = 0; i < item.DeviceNo.Length; i++)
-                    {
-                        var conv = Device.All.FirstOrDefault(x => x.Code == item.DeviceNo[i].ToString());
-                        conv.AddFlag(DeviceFlags.外检);
-                        int pos = i * 14;
-                        conv.AddProtocol<IStation91>(pos, 91, item.Ip);
-                    }
-                }
+                //List<ShapeInfo> shapeInfo = new List<ShapeInfo>
+                //{
+                //    new ShapeInfo(new int[] { 2932,3132 }, "10.30.37.97"),
+                //};
 
+                //foreach (var item in shapeInfo)
+                //{
+                //    for (int i = 0; i < item.DeviceNo.Length; i++)
+                //    {
+                //        var conv = Device.All.FirstOrDefault(x => x.Code == item.DeviceNo[i].ToString());
+                //        conv.AddFlag(DeviceFlags.外检);
+                //        int pos = i * 14;
+                //        conv.AddProtocol<IStation91>(pos, 91, item.Ip);
+                //    }
+                //}
+                var conv1 = Device.All.FirstOrDefault(x => x.Code == "2932");
+                conv1.AddFlag(DeviceFlags.外检);
+                conv1.AddProtocol<IStation91>(714, 91, "10.30.37.97");
+
+                var conv2 = Device.All.FirstOrDefault(x => x.Code == "3132");
+                conv2.AddFlag(DeviceFlags.外检);
+                conv2.AddProtocol<IStation91>(1274, 91, "10.30.37.97");
                 #endregion 外检信息
 
                 #endregion 初始化输送机相关信息
@@ -1375,22 +1388,27 @@ namespace WCS.WorkEngineering
 
                 #region 外检信息
 
-                List<ShapeInfo> shapeInfo = new List<ShapeInfo>
-            {
-                new ShapeInfo(new int[] { 3332,3532 }, "10.30.37.105")
-            };
-
-                foreach (var item in shapeInfo)
-                {
-                    for (int i = 0; i < item.DeviceNo.Length; i++)
-                    {
-                        var conv = Device.All.FirstOrDefault(x => x.Code == item.DeviceNo[i].ToString());
-                        conv.AddFlag(DeviceFlags.外检);
-                        int pos = i * 14;
-                        conv.AddProtocol<IStation91>(pos, 91, item.Ip);
-                    }
-                }
+            //    List<ShapeInfo> shapeInfo = new List<ShapeInfo>
+            //{
+            //    new ShapeInfo(new int[] { 3332,3532 }, "10.30.37.105")
+            //};
 
+                //foreach (var item in shapeInfo)
+                //{
+                //    for (int i = 0; i < item.DeviceNo.Length; i++)
+                //    {
+                //        var conv = Device.All.FirstOrDefault(x => x.Code == item.DeviceNo[i].ToString());
+                //        conv.AddFlag(DeviceFlags.外检);
+                //        int pos = i * 14;
+                //        conv.AddProtocol<IStation91>(pos, 91, item.Ip);
+                //    }
+                //}
+                var conv1 = Device.All.FirstOrDefault(x => x.Code == "3332");
+                conv1.AddFlag(DeviceFlags.外检);
+                conv1.AddProtocol<IStation91>(714, 91, "10.30.37.105");
+                var conv2 = Device.All.FirstOrDefault(x => x.Code == "3532");
+                conv2.AddFlag(DeviceFlags.外检);
+                conv2.AddProtocol<IStation91>(1274, 91, "10.30.37.105");
                 #endregion 外检信息
 
                 #endregion 初始化输送机相关信息