林豪 左 1 jaar geleden
bovenliggende
commit
76bb104fb1
19 gewijzigde bestanden met toevoegingen van 545 en 91 verwijderingen
  1. 1 1
      WCS.Core/DataBlock.cs
  2. 360 0
      业务工程/分拣库/WCS.Entity.Protocol/Truss/ITruss530.cs
  3. 3 3
      业务工程/分拣库/WCS.Entity.Protocol/Truss/TrussEnum.cs
  4. 60 62
      业务工程/分拣库/WCS.Entity.Protocol/Truss/WCS_Truss530.cs
  5. 2 1
      业务工程/分拣库/WCS.WorkEngineering/Systems/DataCollectionSysyem.cs
  6. 2 3
      业务工程/分拣库/WCS.WorkEngineering/Systems/RGVSystems.cs
  7. 1 1
      业务工程/分拣库/WCS.WorkEngineering/Systems/SrmSystems.cs
  8. 1 1
      业务工程/分拣库/WCS.WorkEngineering/Systems/一楼扫码入库.cs
  9. 2 2
      业务工程/分拣库/WCS.WorkEngineering/Systems/分拣主线/满轮主线预写入目标地址.cs
  10. 3 2
      业务工程/分拣库/WCS.WorkEngineering/Systems/分拣支线/环形库分流点.cs
  11. 2 2
      业务工程/分拣库/WCS.WorkEngineering/Systems/桁架码垛/桁架.cs
  12. 2 2
      业务工程/分拣库/WCS.WorkEngineering/Systems/桁架码垛/桁架码垛区补空托盘任务生成.cs
  13. 95 0
      业务工程/分拣库/WCS.WorkEngineering/Systems/桁架码垛/桁架码垛半托入库.cs
  14. 1 1
      业务工程/分拣库/WCS.WorkEngineering/Systems/桁架码垛/桁架码垛工位任务结束处理.cs
  15. 1 1
      业务工程/分拣库/WCS.WorkEngineering/Systems/桁架码垛/桁架缓存放行点.cs
  16. 2 2
      业务工程/分拣库/WCS.WorkEngineering/Systems/环形库/机械臂cs.cs
  17. 1 1
      业务工程/分拣库/WCS.WorkEngineering/Systems/环形库/环形库码垛区补空托盘任务生成.cs
  18. 1 1
      业务工程/分拣库/WCS.WorkEngineering/Systems/环形库/环形库码垛结束.cs
  19. 5 5
      业务工程/分拣库/WCS.WorkEngineering/WorkStart.cs

+ 1 - 1
WCS.Core/DataBlock.cs

@@ -55,7 +55,7 @@ namespace WCS.Core
                 if (!Data.SequenceEqual(data))
                 {
                     Data = data;
-                    DbChanged?.Invoke(Data);
+                    //DbChanged?.Invoke(Data);
                 }
                 failed = false;
             }

+ 360 - 0
业务工程/分拣库/WCS.Entity.Protocol/Truss/ITruss530.cs

@@ -7,6 +7,366 @@ namespace WCS.Entity.Protocol.Truss
     /// </summary>
     public interface ITruss530 : IProtocol
     {
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods0 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods1 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods2 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods3 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods4 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods5 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods6 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods7 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods8 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods9 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods10 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods11 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods12 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods13 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods14 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods15 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods16 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods17 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods18 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods19 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods20 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods21 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods22 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods23 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods24 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods25 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods26 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods27 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods28 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods29 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods30 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods31 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods32 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods33 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods34 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods35 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods36 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods37 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods38 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods39 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods40 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods41 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods42 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods43 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods44 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods45 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods46 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods47 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods48 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods49 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods50 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods51 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods52 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods53 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods54 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods55 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods56 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods57 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods58 { get; set; }
+
+        /// <summary>
+        ///  是否有货
+        /// </summary>
+        [Description("是否有货")]
+        public bool IsGoods59 { get; set; }
+
         /// <summary>
         ///  垛形
         /// </summary>

+ 3 - 3
业务工程/分拣库/WCS.Entity.Protocol/Truss/TrussEnum.cs

@@ -66,10 +66,10 @@ namespace WCS.Entity.Protocol.Truss
         End1 = 1 << 1,
 
         /// <summary>
-        /// 备用
+        /// 二次码垛
         /// </summary>
-        [Description("备用")]
-        RES8 = 1 << 2,
+        [Description("二次码垛")]
+        Two = 1 << 2,
 
         /// <summary>
         /// 备用

+ 60 - 62
业务工程/分拣库/WCS.Entity.Protocol/Truss/WCS_Truss530.cs

@@ -7,187 +7,185 @@ namespace WCS.Entity.Protocol.Truss
     [SugarTable("Truss530")]
     public class WCS_Truss530 : TDengineBaseEntity, ITruss530
     {
-
         [DataMember(Order = 0)]
-        public bool TaskNo1 { get; set; }
+        public bool IsGoods0 { get; set; }
 
         [DataMember(Order = 1)]
-        public bool TaskNo2 { get; set; }
+        public bool IsGoods1 { get; set; }
 
         [DataMember(Order = 2)]
-        public bool TaskNo3 { get; set; }
+        public bool IsGoods2 { get; set; }
 
         [DataMember(Order = 3)]
-        public bool TaskNo4 { get; set; }
+        public bool IsGoods3 { get; set; }
 
         [DataMember(Order = 4)]
-        public bool TaskNo5 { get; set; }
+        public bool IsGoods4 { get; set; }
 
         [DataMember(Order = 5)]
-        public bool TaskNo6 { get; set; }
+        public bool IsGoods5 { get; set; }
 
         [DataMember(Order = 6)]
-        public bool TaskNo7 { get; set; }
+        public bool IsGoods6 { get; set; }
 
         [DataMember(Order = 7)]
-        public bool TaskNo8 { get; set; }
+        public bool IsGoods7 { get; set; }
 
         [DataMember(Order = 8)]
-        public bool TaskNo9 { get; set; }
+        public bool IsGoods8 { get; set; }
 
         [DataMember(Order = 9)]
-        public bool TaskNo10 { get; set; }
+        public bool IsGoods9 { get; set; }
 
         [DataMember(Order = 10)]
-        public bool TaskNo11 { get; set; }
+        public bool IsGoods10 { get; set; }
 
         [DataMember(Order = 11)]
-        public bool TaskNo12 { get; set; }
+        public bool IsGoods11 { get; set; }
 
         [DataMember(Order = 12)]
-        public bool TaskNo13 { get; set; }
+        public bool IsGoods12 { get; set; }
 
         [DataMember(Order = 13)]
-        public bool TaskNo14 { get; set; }
+        public bool IsGoods13 { get; set; }
 
         [DataMember(Order = 14)]
-        public bool TaskNo15 { get; set; }
+        public bool IsGoods14 { get; set; }
 
         [DataMember(Order = 15)]
-        public bool TaskNo16 { get; set; }
+        public bool IsGoods15 { get; set; }
 
         [DataMember(Order = 16)]
-        public bool TaskNo17 { get; set; }
+        public bool IsGoods16 { get; set; }
 
         [DataMember(Order = 17)]
-        public bool TaskNo18 { get; set; }
+        public bool IsGoods17 { get; set; }
 
         [DataMember(Order = 18)]
-        public bool TaskNo19 { get; set; }
+        public bool IsGoods18 { get; set; }
 
         [DataMember(Order = 19)]
-        public bool TaskNo20 { get; set; }
+        public bool IsGoods19 { get; set; }
 
         [DataMember(Order = 20)]
-        public bool TaskNo21 { get; set; }
+        public bool IsGoods20 { get; set; }
 
         [DataMember(Order = 21)]
-        public bool TaskNo22 { get; set; }
+        public bool IsGoods21 { get; set; }
 
         [DataMember(Order = 22)]
-        public bool TaskNo23 { get; set; }
+        public bool IsGoods22 { get; set; }
 
         [DataMember(Order = 23)]
-        public bool TaskNo24 { get; set; }
+        public bool IsGoods23 { get; set; }
 
         [DataMember(Order = 24)]
-        public bool TaskNo25 { get; set; }
+        public bool IsGoods24 { get; set; }
 
         [DataMember(Order = 25)]
-        public bool TaskNo26 { get; set; }
+        public bool IsGoods25 { get; set; }
 
         [DataMember(Order = 26)]
-        public bool TaskNo27 { get; set; }
+        public bool IsGoods26 { get; set; }
 
         [DataMember(Order = 27)]
-        public bool TaskNo28 { get; set; }
+        public bool IsGoods27 { get; set; }
 
         [DataMember(Order = 28)]
-        public bool TaskNo29 { get; set; }
+        public bool IsGoods28 { get; set; }
 
         [DataMember(Order = 29)]
-        public bool TaskNo30 { get; set; }
+        public bool IsGoods29 { get; set; }
 
         [DataMember(Order = 30)]
-        public bool TaskNo31 { get; set; }
+        public bool IsGoods30 { get; set; }
 
         [DataMember(Order = 31)]
-        public bool TaskNo32 { get; set; }
+        public bool IsGoods31 { get; set; }
 
         [DataMember(Order = 32)]
-        public bool TaskNo33 { get; set; }
+        public bool IsGoods32 { get; set; }
 
         [DataMember(Order = 33)]
-        public bool TaskNo34 { get; set; }
+        public bool IsGoods33 { get; set; }
 
         [DataMember(Order = 34)]
-        public bool TaskNo35 { get; set; }
+        public bool IsGoods34 { get; set; }
 
         [DataMember(Order = 35)]
-        public bool TaskNo36 { get; set; }
+        public bool IsGoods35 { get; set; }
 
         [DataMember(Order = 36)]
-        public bool TaskNo37 { get; set; }
+        public bool IsGoods36 { get; set; }
 
         [DataMember(Order = 37)]
-        public bool TaskNo38 { get; set; }
+        public bool IsGoods37 { get; set; }
 
         [DataMember(Order = 38)]
-        public bool TaskNo39 { get; set; }
+        public bool IsGoods38 { get; set; }
 
         [DataMember(Order = 39)]
-        public bool TaskNo40 { get; set; }
+        public bool IsGoods39 { get; set; }
 
         [DataMember(Order = 40)]
-        public bool TaskNo41 { get; set; }
+        public bool IsGoods40 { get; set; }
 
         [DataMember(Order = 41)]
-        public bool TaskNo42 { get; set; }
+        public bool IsGoods41 { get; set; }
 
         [DataMember(Order = 42)]
-        public bool TaskNo43 { get; set; }
+        public bool IsGoods42 { get; set; }
 
         [DataMember(Order = 43)]
-        public bool TaskNo44 { get; set; }
+        public bool IsGoods43 { get; set; }
 
         [DataMember(Order = 44)]
-        public bool TaskNo45 { get; set; }
+        public bool IsGoods44 { get; set; }
 
         [DataMember(Order = 45)]
-        public bool TaskNo46 { get; set; }
+        public bool IsGoods45 { get; set; }
 
         [DataMember(Order = 46)]
-        public bool TaskNo47 { get; set; }
+        public bool IsGoods46 { get; set; }
 
         [DataMember(Order = 47)]
-        public bool TaskNo48 { get; set; }
+        public bool IsGoods47 { get; set; }
 
         [DataMember(Order = 48)]
-        public bool TaskNo49 { get; set; }
+        public bool IsGoods48 { get; set; }
 
         [DataMember(Order = 49)]
-        public bool TaskNo50 { get; set; }
+        public bool IsGoods49 { get; set; }
 
         [DataMember(Order = 50)]
-        public bool TaskNo51 { get; set; }
+        public bool IsGoods50 { get; set; }
 
         [DataMember(Order = 51)]
-        public bool TaskNo52 { get; set; }
+        public bool IsGoods51 { get; set; }
 
         [DataMember(Order = 52)]
-        public bool TaskNo53 { get; set; }
+        public bool IsGoods52 { get; set; }
 
         [DataMember(Order = 53)]
-        public bool TaskNo54 { get; set; }
+        public bool IsGoods53 { get; set; }
 
         [DataMember(Order = 54)]
-        public bool TaskNo55 { get; set; }
+        public bool IsGoods54 { get; set; }
 
         [DataMember(Order = 55)]
-        public bool TaskNo56 { get; set; }
+        public bool IsGoods55 { get; set; }
 
         [DataMember(Order = 56)]
-        public bool TaskNo57 { get; set; }
+        public bool IsGoods56 { get; set; }
 
         [DataMember(Order = 57)]
-        public bool TaskNo58 { get; set; }
+        public bool IsGoods57 { get; set; }
 
         [DataMember(Order = 58)]
-        public bool TaskNo59 { get; set; }
+        public bool IsGoods58 { get; set; }
 
         [DataMember(Order = 59)]
-        public bool TaskNo60 { get; set; }
-
+        public bool IsGoods59 { get; set; }
 
         [DataMember(Order = 60)]
         public short Type { get; set; }

+ 2 - 1
业务工程/分拣库/WCS.WorkEngineering/Systems/DataCollectionSysyem.cs

@@ -26,7 +26,7 @@ namespace WCS.WorkEngineering.Systems
         {
             var gs = Device.All.SelectMany(v => v.Protocols.Select(d => new { DB = $"{d.Value.DBInfo.No}:{d.Value.DBInfo.PLCInfo.IP}", d.Value.Position, TypeStr = d.Key, Dev = v }))
                 .GroupBy(v => v.DB);
-            foreach (var g in gs)
+            foreach (var g in gs.Where(x => !x.Key.Contains("10.30.37.211") && !x.Key.Contains("10.30.37.217") && !x.Key.Contains("10.30.37.223")))
             {
                 var min = g.OrderBy(v => v.Position).First();
                 var max = g.OrderByDescending(v => v.Position).First();
@@ -54,6 +54,7 @@ namespace WCS.WorkEngineering.Systems
 
         public override void Do(SRM obj)
         {
+            return;
             var sw = new Stopwatch();
             sw.Start();
             try

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

@@ -19,7 +19,7 @@ namespace WCS.WorkEngineering.Systems
     /// <summary>
     ///  Agv交互系统
     /// </summary>
-   // [BelongTo(typeof(RgvWorld))]
+    [BelongTo(typeof(RgvWorld))]
     [Description("RGV交互系统")]
     public class RGVSystems : DeviceSystem<Device<IRGV520, IRGV521, IBCR81>>
     {
@@ -130,7 +130,6 @@ namespace WCS.WorkEngineering.Systems
                                 startPosition.Data.GoodsEnd = 0;
                             }
 
-
                             //目标地址是码垛工位
                             if (isPalletizing)
                             {
@@ -275,7 +274,7 @@ namespace WCS.WorkEngineering.Systems
 
         public override bool Select(Device dev)
         {
-            return dev.Code is "RGV1" or "RGV2" or "RGV3" or "RGV4" or "RGV5" or "RGV6";
+            return dev.Code is /*"RGV1" or "RGV2" or*/ "RGV3" or "RGV4" or "RGV5" or "RGV6";
             //return dev.HasFlag(Extensions.DeviceFlags.RGV);
         }
     }

+ 1 - 1
业务工程/分拣库/WCS.WorkEngineering/Systems/SrmSystems.cs

@@ -372,7 +372,7 @@ namespace WCS.WorkEngineering.Systems
 
         public override bool Select(Device dev)
         {
-            return dev.Code is "SRM1" or "SRM2" or "SRM3" or "SRM4" or "SRM5" or "SRM6";
+            return dev.Code is /*"SRM1" or "SRM2" or*/ "SRM3" or "SRM4" or "SRM5" or "SRM6";
         }
     }
 }

+ 1 - 1
业务工程/分拣库/WCS.WorkEngineering/Systems/一楼扫码入库.cs

@@ -16,7 +16,7 @@ namespace WCS.WorkEngineering.Systems
     /// <summary>
     ///  一楼入库工位处理系统
     /// </summary>
-    //[BelongTo(typeof(MainWorld))]
+    [BelongTo(typeof(MainWorld))]
     [Description("一楼扫码入库")]
     public class 一楼扫码入库 : DeviceSystem<Device<IStation520, IStation521, IStation523, IStation91, IBCR81>>
     {

+ 2 - 2
业务工程/分拣库/WCS.WorkEngineering/Systems/分拣主线/满轮主线预写入目标地址.cs

@@ -18,7 +18,7 @@ namespace WCS.WorkEngineering.Systems
     /// <summary>
     ///  满轮主线预写入目标地址
     /// </summary>
-   // [BelongTo(typeof(SortingMainLineWorld))]
+    [BelongTo(typeof(SortingMainLineWorld))]
     [Description("满轮主线预写入目标地址")]
     public class 满轮主线预写入目标地址 : DeviceSystem<Device<IStation523, IBCR83, IStation525>>
     {
@@ -95,7 +95,7 @@ namespace WCS.WorkEngineering.Systems
 
         public override bool Select(Device dev)
         {
-            return dev.Code is "18" or "118" or "38" or "58" or "138" or "158";
+            return dev.Code is /*"18" or "118" or*/ "38" or "58" or "138" or "158";
         }
     }
 

+ 3 - 2
业务工程/分拣库/WCS.WorkEngineering/Systems/分拣支线/环形库分流点.cs

@@ -8,6 +8,7 @@ using WCS.Entity;
 using WCS.Entity.Protocol.Station;
 using WCS.WorkEngineering.Extensions;
 using WCS.WorkEngineering.WebApi.Controllers;
+using WCS.WorkEngineering.Worlds;
 using TaskStatus = WCS.Entity.TaskStatus;
 
 namespace WCS.WorkEngineering.Systems
@@ -15,7 +16,7 @@ namespace WCS.WorkEngineering.Systems
     /// <summary>
     ///  分流点
     /// </summary>
-    //[BelongTo(typeof(SortingBranchWorld))]
+    [BelongTo(typeof(SortingBranchWorld))]
     [Description("环形库分流点")]
     public class 环形库分流点 : DeviceSystem<Device<IStation520, IStation521, IStation523, IStation91>>
     {
@@ -133,7 +134,7 @@ namespace WCS.WorkEngineering.Systems
 
         public override bool Select(Device dev)
         {
-            return dev.Code is "418" or "618" or "818" or "1018" or "1218" or "1418";
+            return dev.Code is /*"418" or "618" or*/ "818" or "1018" or "1218" or "1418";
         }
 
         /// <summary>

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

@@ -15,7 +15,7 @@ namespace WCS.WorkEngineering.Systems
     /// <summary>
     ///  桁架
     /// </summary>
-    //[BelongTo(typeof(SortingPalletizingWorld))]
+    [BelongTo(typeof(SortingPalletizingWorld))]
     [Description("桁架")]
     public class 桁架 : DeviceSystem<Truss>
     {
@@ -314,7 +314,7 @@ namespace WCS.WorkEngineering.Systems
 
         public override bool Select(Device dev)
         {
-            return dev.Code is "Truss1" or "Truss2" or "Truss3";
+            return dev.Code is /*"Truss1" or*/ "Truss2" or "Truss3";
         }
 
         public 桁架()

+ 2 - 2
业务工程/分拣库/WCS.WorkEngineering/Systems/桁架码垛/桁架码垛区补空托盘任务生成.cs

@@ -14,7 +14,7 @@ namespace WCS.WorkEngineering.Systems
     /// <summary>
     ///  桁架码垛区补空托盘任务生成
     /// </summary>
-    //[BelongTo(typeof(SortingPalletizingWorld))]
+    [BelongTo(typeof(SortingPalletizingWorld))]
     [Description("桁架码垛区补空托盘任务生成")]
     public class 桁架码垛区补空托盘任务生成 : DeviceSystem<Device<IStation520>>
     {
@@ -29,7 +29,7 @@ namespace WCS.WorkEngineering.Systems
             {
                 var db = _db.Default;
                 //取一个时间最靠前的,没有绑定码垛工位的码垛记录
-                var palletizingInfo = db.Queryable<WCS_Palletizing>().OrderBy(x => x.AddTime).First(x => x.PalletizingStation == null && !x.Finish);
+                var palletizingInfo = db.Queryable<WCS_Palletizing>().OrderBy(x => x.AddTime).First(x => x.DeviceCode != "Truss1" && x.PalletizingStation == null && !x.Finish);
                 if (palletizingInfo == null) throw new Exception($"没有可用码垛信息");
                 var palleTask = db.Queryable<WCS_TaskInfo>().First(x => x.ID == palletizingInfo.TaskId && (x.Status == TaskStatus.FinishOfShunt || x.Status == TaskStatus.ConveyorExecution));
                 if (palleTask == null) throw new Exception($"未找到任务{palleTask.ID}");

+ 95 - 0
业务工程/分拣库/WCS.WorkEngineering/Systems/桁架码垛/桁架码垛半托入库.cs

@@ -0,0 +1,95 @@
+using ServiceCenter.Extensions;
+using ServiceCenter.Logs;
+using ServiceCenter.SqlSugars;
+using System.ComponentModel;
+using WCS.Core;
+using WCS.Entity;
+using WCS.Entity.Protocol.Station;
+using WCS.Entity.Protocol.Truss;
+using WCS.WorkEngineering.Extensions;
+using WCS.WorkEngineering.WebApi.Controllers;
+using WCS.WorkEngineering.Worlds;
+using DeviceFlags = WCS.WorkEngineering.Extensions.DeviceFlags;
+using TaskStatus = WCS.Entity.TaskStatus;
+
+namespace WCS.WorkEngineering.Systems.桁架码垛
+{
+    /// <summary>
+    ///  码垛工位处理
+    /// </summary>
+    [BelongTo(typeof(SortingPalletizingWorld))]
+    [Description("码垛工位任务结束处理09")]
+    public class 桁架码垛工位任务结束处理 : DeviceSystem<Device<IStation520, IStation521, IStation523, ITruss530, ITruss531>>
+    {
+        protected override bool ParallelDo => true;
+
+        protected override bool SaveLogsToFile => true;
+
+        public override void Do(Device<IStation520, IStation521, IStation523, ITruss530, ITruss531> obj)
+        {
+            if (!obj.Data5.CmdType.HasFlag(TrussCmdType.End)) obj.Data4.CmdType = 0;
+            if (!obj.Data3.Status.HasFlag(StationStatus.PH_Status)) return;
+            if (!obj.Data5.CmdType.HasFlag(TrussCmdType.End)) return;
+            if (!obj.Data5.CmdType.HasFlag(TrussCmdType.End1))
+            {
+                if (obj.Data5.MaxQuantity != obj.Data5.Quantity || obj.Data5.Quantity == 0 || obj.Data5.MaxQuantity == 0) return;
+            }
+            WCS_TaskInfo task = null;
+            //找到对应的码垛数据
+            SqlSugarHelper.Do(_db =>
+            {
+                var db = _db.Default;
+                var palletizing = db.Queryable<WCS_Palletizing>().Single(x => x.PalletizingStation == obj.Entity.Code && !x.Finish);
+
+                var TaskNoList = obj.Data5.GetTaskNoList().Where(x => x > 0).ToList();
+                var taskList = db.Queryable<WCS_TaskInfo>().Where(x => TaskNoList.Contains(x.ID)).ToList();
+                var taskCodes = taskList.Select(x => x.BarCode).ToList();
+                if (!obj.Data5.CmdType.HasFlag(TrussCmdType.End1))
+                {
+                    if (taskList.Count != TaskNoList.Count) throw new KnownException($"任务数量不一致!,请检查托盘任务信息", LogLevelEnum.Mid);
+                }
+                var taskInfo = db.Queryable<WCS_TaskInfo>().Single(x => x.BarCode == palletizing.PalleCode && x.Type == TaskType.EnterDepot && x.Status == TaskStatus.WaitingToExecute);
+                if (taskInfo == null)
+                {
+                    if (obj.Data5.CmdType.HasFlag(TrussCmdType.End1))
+                    {
+                        //开始绑盘
+                        WmsApi.BingPallet(palletizing.PalleCode, taskCodes, taskList.FirstOrDefault().WarehouseCode, obj.Entity.Code, true, "强制码垛结束");
+                    }
+                    else
+                    {
+                        //开始绑盘
+                        WmsApi.BingPallet(palletizing.PalleCode, taskCodes, taskList.FirstOrDefault().WarehouseCode, obj.Entity.Code);
+                    }
+                    return;
+                }
+                if (taskInfo.Status != TaskStatus.WaitingToExecute) return;
+
+                foreach (var item in taskList)
+                {
+                    item.Status = TaskStatus.Finish;
+                    item.EndTime = DateTime.Now;
+                    db.Updateable(item).ExecuteCommand();
+                    item.AddWCS_TASK_DTL(db, obj.Entity.Code, "任务结束");
+                }
+
+                palletizing.Finish = true;
+                db.Updateable(palletizing).ExecuteCommand();
+                taskInfo.Status = TaskStatus.ConveyorExecution;
+                db.Updateable(taskInfo).ExecuteCommand();
+                taskInfo.AddWCS_TASK_DTL(db, obj.Entity.Code, $"桁架码垛结束处理完成");
+                task = taskInfo;
+            });
+            if (task == null) return;
+            obj.Data.TaskNumber = task.ID;
+            obj.Data.GoodsStart = obj.Entity.Code.ToShort();
+            obj.Data.GoodsEnd = task.AddrNext.ToShort();
+            obj.Data4.CmdType = TrussCmdType.End;
+        }
+
+        public override bool Select(Device dev)
+        {
+            return dev.HasFlag(DeviceFlags.桁架码垛位);
+        }
+    }
+}

+ 1 - 1
业务工程/分拣库/WCS.WorkEngineering/Systems/桁架码垛/桁架码垛工位任务结束处理.cs

@@ -17,7 +17,7 @@ namespace WCS.WorkEngineering.Systems
     /// <summary>
     ///  码垛工位处理
     /// </summary>
-   // [BelongTo(typeof(SortingPalletizingWorld))]
+    [BelongTo(typeof(SortingPalletizingWorld))]
     [Description("码垛工位任务结束处理09")]
     public class 桁架码垛工位任务结束处理 : DeviceSystem<Device<IStation520, IStation521, IStation523, ITruss530, ITruss531>>
     {

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

@@ -13,7 +13,7 @@ namespace WCS.WorkEngineering.Systems
     /// <summary>
     ///  桁架缓存放行点
     /// </summary>
-    //[BelongTo(typeof(SortingPalletizingWorld))]
+    [BelongTo(typeof(SortingPalletizingWorld))]
     [Description("桁架缓存放行点")]
     public class 桁架缓存放行点 : DeviceSystem<Device<IStation520, IStation521, IStation523>>
     {

+ 2 - 2
业务工程/分拣库/WCS.WorkEngineering/Systems/环形库/机械臂cs.cs

@@ -17,7 +17,7 @@ namespace WCS.WorkEngineering.Systems
     /// <summary>
     ///   机械臂
     /// </summary>
-  //[BelongTo(typeof(RingWorld))]
+  [BelongTo(typeof(RingWorld))]
     [Description("机械臂")]
     public class 机械臂 : DeviceSystem<Device<IRobot520, IRobot521, IRobot522>>
     {
@@ -420,7 +420,7 @@ namespace WCS.WorkEngineering.Systems
 
         public override bool Select(Device dev)
         {
-            return dev.Code is "Robot1" or "Robot2" or "Robot3" or "Robot4" or "Robot5" or "Robot6";
+            return dev.Code is /*"Robot1" or "Robot2" or*/ "Robot3" or "Robot4" or "Robot5" or "Robot6";
         }
     }
 }

+ 1 - 1
业务工程/分拣库/WCS.WorkEngineering/Systems/环形库/环形库码垛区补空托盘任务生成.cs

@@ -15,7 +15,7 @@ namespace WCS.WorkEngineering.Systems
     /// <summary>
     ///  环形库码垛区补空托盘任务生成
     /// </summary>
-    //[BelongTo(typeof(RingWorld))]
+    [BelongTo(typeof(RingWorld))]
     [Description("环形库码垛区补空托盘任务生成")]
     public class 环形库码垛区补空托盘任务生成 : DeviceSystem<Device<IStation520, IStation521, IStation523>>
     {

+ 1 - 1
业务工程/分拣库/WCS.WorkEngineering/Systems/环形库/环形库码垛结束.cs

@@ -19,7 +19,7 @@ namespace WCS.WorkEngineering.Systems.环形库
     /// <summary>
     ///  环形库码垛结束
     /// </summary>
-   // [BelongTo(typeof(RingWorld))]
+    [BelongTo(typeof(RingWorld))]
     [Description("环形库码垛结束")]
     public class 环形库码垛结束 : DeviceSystem<Device<IStation520, IStation521, IStation523, IRobot530, IRobot531>>
     {

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

@@ -1072,12 +1072,12 @@ namespace WCS.WorkEngineering
                 { DeviceFlags.桁架09异常缓存放行点, new List<string>(){  /*"591",*/ "791" ,"991" , "1191" , "1391" , "1591" } },
                 { DeviceFlags.桁架18缓存放行点, new List<string>(){  /*"550", "564", "578",*/ "750", "764", "778" , "950", "964", "978" , "1150", "1164", "1178" , "1350", "1364", "1378" , "1450", "1464", "1478" } },
                 { DeviceFlags.桁架取货点, new List<string>(){ /*"461", "475", "489", "503","517","531", "545", "559", "573", "586",*/ "661", "675", "689", "703", "717", "731", "745", "759", "773", "786", "861", "875", "889", "903", "917", "931", "945", "959", "973", "986", "1061", "1075", "1089", "1103", "1117", "1131", "1145", "1159", "1173", "1186", "1261", "1275", "1289", "1303", "1317", "1331", "1345", "1359", "1373", "1386" , "1461", "1475", "1489", "1503", "1517", "1531", "1545", "1559", "1573", "1586" } },
-                { DeviceFlags.拆盘机09, new List<string>(){ /*"1606",*/"1616","1626","1636","1646","1656" } },
-                { DeviceFlags.拆盘机非09, new List<string>(){ /*"1602",*/"1612","1622","1632","1642","1652" } },
-                { DeviceFlags.桁架码垛位, new List<string>(){ "1670", "1671", "1672", "1673", "1674", "1675","1664","1662","1663","1665","1677","1678","1679","1680","1685","1686","1687","1688","1689","1690", "1692", "1693", "1694", "1695", "1700", "1701", "1702", "1703", "1704", "1705", "1707", "1708", "1709", "1710", "1715", "1716", "1717", "1718", "1719", "1720", "1722", "1723", "1724", "1725", "1730", "1731", "1732", "1733", "1734", "1735", "1737", "1738", "1739", "1740", "1745", "1746", "1747", "1748", "1749", "1750" } },
-                { DeviceFlags.环形库码垛工位, new List<string>(){ "1666", "1661", "1676", "1681", "1691", "1696", "1706", "1711", "1721", "1726", "1736", "1741" } },
+                { DeviceFlags.拆盘机09, new List<string>(){ /*"1606", "1616",*/"1626","1636","1646","1656" } },
+                { DeviceFlags.拆盘机非09, new List<string>(){ /*"1602", "1612",*/"1622","1632","1642","1652" } },
+                { DeviceFlags.桁架码垛位, new List<string>(){/* "1670", "1671", "1672", "1673", "1674", "1675","1664","1662","1663","1665","1677","1678","1679","1680","1685","1686","1687","1688","1689","1690",*/ "1692", "1693", "1694", "1695", "1700", "1701", "1702", "1703", "1704", "1705", "1707", "1708", "1709", "1710", "1715", "1716", "1717", "1718", "1719", "1720", "1722", "1723", "1724", "1725", "1730", "1731", "1732", "1733", "1734", "1735", "1737", "1738", "1739", "1740", "1745", "1746", "1747", "1748", "1749", "1750" } },
+                { DeviceFlags.环形库码垛工位, new List<string>(){ /*"1666", "1661", "1676", "1681",*/ "1691", "1696", "1706", "1711", "1721", "1726", "1736", "1741" } },
                 { DeviceFlags.AGV取货站台口, new List<string>(){ "2533", "2534", "2734","2733","2934","2933","3133","3134","3333","3334","3533","3534" } },
-                { DeviceFlags.Robot, new List<string>(){ "Robot1", "Robot2", "Robot3","Robot4" , "Robot5", "Robot6" } },
+                { DeviceFlags.Robot, new List<string>(){ /*"Robot1", "Robot2",*/ "Robot3","Robot4" , "Robot5", "Robot6" } },
         };
 
             Parallel.ForEach(devices, device =>