林豪 左 1 年之前
父节点
当前提交
e3a58a0f6d
共有 33 个文件被更改,包括 176 次插入476 次删除
  1. 28 25
      WCS.Core/DataBlock.cs
  2. 13 23
      WCS.Core/Device.cs
  3. 15 4
      WCS.Core/Extentions.cs
  4. 32 21
      WCS.Core/Ltc.cs
  5. 15 34
      WCS.Core/PLC.cs
  6. 4 3
      WCS.Core/PlcItem.cs
  7. 9 7
      WCS.Core/ProtocolProxyBase.cs
  8. 18 13
      WCS.Core/System.cs
  9. 24 44
      WCS.Core/World.cs
  10. 0 2
      业务工程/分拣库/WCS.WorkEngineering/Systems/AgvSystems.cs
  11. 4 12
      业务工程/分拣库/WCS.WorkEngineering/Systems/NoInteractionSystems.cs
  12. 0 2
      业务工程/分拣库/WCS.WorkEngineering/Systems/RGVSystems.cs
  13. 0 2
      业务工程/分拣库/WCS.WorkEngineering/Systems/SrmSystems.cs
  14. 1 1
      业务工程/分拣库/WCS.WorkEngineering/Systems/UpLoadSystems.cs
  15. 1 1
      业务工程/分拣库/WCS.WorkEngineering/Systems/一楼叠盘机入库.cs
  16. 1 1
      业务工程/分拣库/WCS.WorkEngineering/Systems/一楼扫码入库.cs
  17. 1 1
      业务工程/分拣库/WCS.WorkEngineering/Systems/二楼拆盘机自动补空托盘组.cs
  18. 0 226
      业务工程/分拣库/WCS.WorkEngineering/Systems/分拣主线/分线计算09.cs
  19. 0 33
      业务工程/分拣库/WCS.WorkEngineering/Systems/分拣主线/湿拉满轮帘线芯股第一次扫码.cs
  20. 1 2
      业务工程/分拣库/WCS.WorkEngineering/Systems/分拣主线/满轮主线预写入目标地址.cs
  21. 0 2
      业务工程/分拣库/WCS.WorkEngineering/Systems/分拣支线/桁架分流点.cs
  22. 0 2
      业务工程/分拣库/WCS.WorkEngineering/Systems/分拣支线/环形库分流点.cs
  23. 1 1
      业务工程/分拣库/WCS.WorkEngineering/Systems/机台叫料生成AGV任务.cs
  24. 1 1
      业务工程/分拣库/WCS.WorkEngineering/Systems/桁架码垛/二次码垛任务到RGV取货位处理.cs
  25. 1 1
      业务工程/分拣库/WCS.WorkEngineering/Systems/桁架码垛/创建二次码垛出库任务.cs
  26. 0 2
      业务工程/分拣库/WCS.WorkEngineering/Systems/桁架码垛/桁架.cs
  27. 1 1
      业务工程/分拣库/WCS.WorkEngineering/Systems/桁架码垛/桁架码垛区补空托盘任务生成.cs
  28. 1 1
      业务工程/分拣库/WCS.WorkEngineering/Systems/桁架码垛/桁架码垛工位任务结束处理.cs
  29. 0 2
      业务工程/分拣库/WCS.WorkEngineering/Systems/桁架码垛/桁架缓存放行点.cs
  30. 0 2
      业务工程/分拣库/WCS.WorkEngineering/Systems/环形库/机械臂cs.cs
  31. 1 1
      业务工程/分拣库/WCS.WorkEngineering/Systems/环形库/环形库码垛结束.cs
  32. 1 1
      业务工程/分拣库/WCS.WorkEngineering/Systems/码垛区域生成空托盘任务.cs
  33. 2 2
      业务工程/分拣库/WCS.WorkEngineering/Worlds/MainWorld.cs

+ 28 - 25
WCS.Core/DataBlock.cs

@@ -1,4 +1,5 @@
 using System.Collections;
+using System.Net.NetworkInformation;
 using System.Reflection;
 using System.Runtime.InteropServices;
 
@@ -14,7 +15,8 @@ namespace WCS.Core
 
         public ushort Start { get; private set; }
         public ushort Length { get; private set; }
-        public bool failed { get; private set; }
+        public World World { get; private set; }
+        public bool Failed { get; private set; }
         private byte[] Data = new byte[0];
         private int id = 0;
 
@@ -23,48 +25,48 @@ namespace WCS.Core
             return id.ToString();
         }
 
-        public DataBlock(DBInfo ent) : base(ent)
+        public DataBlock(DBInfo ent,World world) : base(ent)
         {
+            this.World= world;
             DBList.Add(this);
             id = DBList.Count;
         }
 
-        private DateTime faildTime = DateTime.MinValue;
+        DateTime faildTime = DateTime.MinValue;
 
         public void RefreshData()
-        {
-            var isPing = false;
+        { 
             try
             {
-                if (failed && !Entity.PLCInfo.Ex().Ping)
+                var plc = Entity.PLCInfo.Ex(World);
+                if (Failed)
                 {
-                    isPing = true;
-                    if (Entity.PLCInfo.IP != "1") throw new Exception($"网络异常IP为{Entity.PLCInfo.IP}的设备PLC无法访问");
-                }
-
+                    if (!plc.Ping)
+                    {
+                        throw new Exception($"{Entity.PLCInfo.IP}无法访问");
+                    }
+                } 
                 Start = (ushort)ProxyList.Min(v => v.Info.Position);
                 var last = ProxyList.OrderBy(v => v.Info.Position).Last();
                 Length = (ushort)(last.Info.Position + last.BytesCount);
-
                 var data = new byte[0];
-                lock (Entity.PLCInfo.Ex())
+                lock (plc)
                 {
-                    data = Entity.PLCInfo.Ex().Accessor.ReadBytes(Entity.No, Start, (ushort)(Length - Start));
+                    data = plc.Accessor.ReadBytes(Entity.No, Start, (ushort)(Length - Start));
                 }
                 if (!Data.SequenceEqual(data))
                 {
                     Data = data;
                     DbChanged?.Invoke(Data);
                 }
-                failed = false;
+                Failed = false;
             }
             catch (Exception ex)
             {
-                failed = true;
-                if (isPing) throw new Exception($"{ex.Message}");
-                throw new Exception($"{ex.Message}:\r{ex.StackTrace}");
+                Failed = true; 
+                throw;
             }
-        }
+        } 
 
         public PlcItem<T> Regist<T>(ProtocolProxyBase proxy, string objid, string name, int start, byte arrLen = 1, byte strLen = 0)
         {
@@ -104,9 +106,10 @@ namespace WCS.Core
 
         private object Read(Type type, ref int bitStart, int strLength, int arrLength)
         {
-            if (failed)
+            if (Failed)
+            {
                 throw new Exception(this.Entity.No + "连接失败");
-
+            }
             if (type.IsArray)
             {
                 var t = type.GetElementType();
@@ -114,7 +117,7 @@ namespace WCS.Core
                 {
                     throw new Exception("只支持一维数组");
                 }
-                var arr = Array.CreateInstance(t, arrLength);
+                var arr = Array.CreateInstance(t, arrLength);   
 
                 for (int i = 0; i < arr.Length; i++)
                 {
@@ -444,11 +447,11 @@ namespace WCS.Core
 
         private void WriteBytes(ref int bitStart, byte[] data)
         {
-            lock (Entity.PLCInfo.Ex())
+            lock (Entity.PLCInfo.Ex(World))
             {
                 var start = GetByteStart(bitStart);
 
-                Entity.PLCInfo.Ex().Accessor.WriteBytes(Entity.No, start, data);
+                Entity.PLCInfo.Ex(World).Accessor.WriteBytes(Entity.No, start, data);
                 data.CopyTo(Data, start - Start);
                 bitStart += data.Length * 8;
             }
@@ -456,7 +459,7 @@ namespace WCS.Core
 
         private void WriteBit(ref int bitStart, bool flag)
         {
-            lock (Entity.PLCInfo.Ex())
+            lock (Entity.PLCInfo.Ex(World))
             {
                 var start = GetByteStart(bitStart);
                 var bitIndex = GetBitIndex(bitStart);
@@ -465,7 +468,7 @@ namespace WCS.Core
                 b = b.SetBit(bitIndex, flag);
                 var data = new byte[] { b };
 
-                Entity.PLCInfo.Ex().Accessor.WriteBytes(Entity.No, (ushort)start, data);
+                Entity.PLCInfo.Ex(World).Accessor.WriteBytes(Entity.No, (ushort)start, data);
                 data.CopyTo(Data, start - Start);
 
                 bitStart += 1;

+ 13 - 23
WCS.Core/Device.cs

@@ -45,7 +45,7 @@ namespace WCS.Core
             all[code] = this;
         }
 
-        private ConcurrentDictionary<Type, object> ProtocolObjs(World world)
+        public ConcurrentDictionary<Type, object> ProtocolObjs(World world)
         {
             if (!ProtocolObjsOfWorld.TryGetValue(world, out var pobjs))
             {
@@ -101,20 +101,6 @@ namespace WCS.Core
             return ProtocolObjs(world)[protocolType];
         }
 
-        //object Copy(object obj, Type type)
-        //{
-        //    var res = Activator.CreateInstance(type);
-        //    foreach (var p in type.GetProperties())
-        //    {
-        //        var p2 = obj.GetType().GetProperty(p.Name);
-        //        if (p2 != null && p2.PropertyType == p.PropertyType)
-        //        {
-        //            p.SetValue(res, p2.GetValue(obj));
-        //        }
-        //    }
-        //    return res;
-        //}
-
         public override string ToString()
         {
             return Code;
@@ -193,11 +179,17 @@ namespace WCS.Core
 
         public Dictionary<string, List<string>> Flags { get; private set; } = new Dictionary<string, List<string>>();
 
-        public void AddFlag(string key, string flag)
+        public Device AddFlag(string key, string flag)
         {
             if (!Flags.ContainsKey(key))
                 Flags[key] = new List<string>();
             Flags[key].Add(flag);
+            return this;
+        }
+
+        public void SetFlag(string flag)
+        {
+            SetFlag("Globals", flag);
         }
 
         public void SetFlag(string key, string flag)
@@ -224,19 +216,14 @@ namespace WCS.Core
             if (!Flags.ContainsKey(key))
                 return false;
             return Flags[key].Contains(flag);
-        }
-
-        public void AddFlag(string flag)
-        {
-            SetFlag("Globals", flag);
-        }
+        } 
 
         public bool HasFlag(string flag)
         {
             return HasFlag("Globals", flag);
         }
 
-        public void AddFlag<T>(T flag) where T : struct, Enum
+        public Device AddFlag<T>(T flag) where T : struct, Enum
         {
             var key = typeof(T).AssemblyQualifiedName;
             if (Flags.ContainsKey(key))
@@ -250,6 +237,7 @@ namespace WCS.Core
                 var str = flag.ToString();
                 SetFlag(key, str);
             }
+            return this;
         }
 
         public bool HasFlag<T>(T flag) where T : struct, Enum
@@ -264,10 +252,12 @@ namespace WCS.Core
 
     public class Device<T> : EntityEx<Device>
     {
+        public World World { get; private set; }
         public T Data { get; set; }
 
         public Device(Device device, World world) : base(device)
         {
+            this.World = world;
             Data = Entity.Protocol<T>(world);
         }
 

+ 15 - 4
WCS.Core/Extentions.cs

@@ -1,7 +1,13 @@
-using System.Collections.Concurrent;
+using System;
+using System.Collections;
+using System.Collections.Concurrent;
+using System.Collections.Generic;
 using System.ComponentModel;
+using System.Linq;
 using System.Linq.Expressions;
 using System.Reflection;
+using System.Text;
+using System.Threading.Tasks;
 
 namespace WCS.Core
 {
@@ -22,9 +28,9 @@ namespace WCS.Core
             }
         }
 
-        public static PLC Ex(this PLCInfo source)
+        public static PLC Ex(this PLCInfo source, World world)
         {
-            return GetEx<PLC>(source);
+            return GetExOfWorld<PLC>(source, world);
         }
 
         private static ConcurrentDictionary<World, ConcurrentDictionary<object, object>> ExObjsOfWorld = new ConcurrentDictionary<World, ConcurrentDictionary<object, object>>();
@@ -38,7 +44,7 @@ namespace WCS.Core
             }
             if (!objs.TryGetValue(source, out var obj))
             {
-                obj = Activator.CreateInstance(typeof(T), source);
+                obj = Activator.CreateInstance(typeof(T), source, world);
                 objs[source] = obj;
             }
             return (T)obj;
@@ -112,6 +118,11 @@ namespace WCS.Core
             t.GetProperty("Frame").SetValue(obj, farme);
             return obj;
         }
+
+        public static T Copy<T>(this object source)
+        {
+            return (T)source.Copy(typeof(T), DateTime.Now);
+        }
     }
 
     public static class BitExtension

+ 32 - 21
WCS.Core/Ltc.cs

@@ -1,24 +1,34 @@
-using System.Collections.Concurrent;
+using FreeRedis;
+using System;
+using System.Collections.Concurrent;
+using System.ComponentModel;
+using System.Linq.Expressions;
+using System.Threading;
+using System.Threading.Channels;
 
 namespace WCS.Core
 {
-    internal static class Ltc
-    {
-        private static ConcurrentDictionary<Thread, Channel> Channels = new ConcurrentDictionary<Thread, Channel>();
+    public static class Ltc
+    {  
+        private static ConcurrentDictionary<Thread, Channel> Channels = new ConcurrentDictionary<Thread, Channel>(); 
 
         public static void SetChannel(Channel channel)
         {
             Channels[Thread.CurrentThread] = channel;
+            //ClearChannel();
         }
 
         public static Channel GetChannel()
         {
-            Channels.TryGetValue(Thread.CurrentThread, out var channel);
-            return channel;
+            if (Channels.ContainsKey(Thread.CurrentThread))
+                return Channels[Thread.CurrentThread];
+            else
+                return null;
         }
 
         //static ConcurrentDictionary<Channel, List<LogInfo>> Msgs = new ConcurrentDictionary<Channel, List<LogInfo>>();
 
+
         //static void ClearChannel()
         //{
         //    if (Msgs.TryGetValue(GetChannel(), out var list))
@@ -36,7 +46,7 @@ namespace WCS.Core
         //    else
         //    {
         //        return "";
-        //    }
+        //    } 
         //}
 
         //public static List<LogInfo> GetLogInfo()
@@ -50,9 +60,9 @@ namespace WCS.Core
         //}
 
         //public static void Log(string msg,LogLevel level,ErrorType type)
-        //{
+        //{ 
         //    var channel = GetChannel();
-
+            
         //    if (!Msgs.TryGetValue(channel, out var list))
         //    {
         //        list = new List<LogInfo>();
@@ -60,16 +70,16 @@ namespace WCS.Core
         //    }
         //    list.Add(new LogInfo { Message = msg, Level = level, Type = type, Channel = channel });
         //}
-
+  
         //public static void Publish(World world)
-        //{
+        //{ 
         //    var channel = GetChannel();
         //    if (Msgs.TryGetValue(channel, out var list))
         //    {
-        //        var msg = string.Join('\n', list);
-        //        world.Ex().Publish(channel, msg);
-        //    }
-        //}
+        //        var msg = string.Join('\n', list); 
+        //        world.Ex().Publish(channel, msg); 
+        //    } 
+        //} 
 
         //private static string ResultString<T>(T obj)
         //{
@@ -102,7 +112,7 @@ namespace WCS.Core
         //        return res;
         //    }
         //    catch (Exception ex)
-        //    {
+        //    { 
         //        throw;
         //    }
         //    finally
@@ -129,7 +139,7 @@ namespace WCS.Core
         //        return res;
         //    }
         //    catch (Exception ex)
-        //    {
+        //    {  
         //        throw;
         //    }
         //    finally
@@ -149,7 +159,7 @@ namespace WCS.Core
         //        return res;
         //    }
         //    catch (Exception ex)
-        //    {
+        //    { 
         //        throw;
         //    }
         //    finally
@@ -169,7 +179,7 @@ namespace WCS.Core
         //        return res;
         //    }
         //    catch (Exception ex)
-        //    {
+        //    { 
         //        throw;
         //    }
         //    finally
@@ -200,6 +210,7 @@ namespace WCS.Core
         public string System = "";
         public string Item = "";
 
+
         public override string ToString()
         {
             return $"{World}-{Stage}-{System}-{Item}";
@@ -225,7 +236,7 @@ namespace WCS.Core
     //}
 
     //public class KnownException : Exception
-    //{
+    //{ 
     //    public LogLevel Level { get; set; }
 
     //    public KnownException(string msg, LogLevel level) : base(msg)
@@ -233,4 +244,4 @@ namespace WCS.Core
     //        this.Level = level;
     //    }
     //}
-}
+}

+ 15 - 34
WCS.Core/PLC.cs

@@ -1,13 +1,16 @@
-using System.Net.NetworkInformation;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net.NetworkInformation;
 using System.Text;
+using System.Threading.Tasks; 
 
 namespace WCS.Core
 {
     public class PLC : EntityEx<PLCInfo>
     {
         public bool Ping { get; private set; }
-
-        public PLC(PLCInfo ent) : base(ent)
+        public PLC(PLCInfo ent,World world) : base(ent)
         {
             if (Configs.PLCAccessorCreater != null)
             {
@@ -20,51 +23,29 @@ namespace WCS.Core
             {
                 while (true)
                 {
-                    Ping = ping();
+                    Ping=ping();
                     Task.Delay(1000);
                 }
             });
-        }
-
+        }      
         public IPLCAccessor Accessor { get; private set; }
 
-        private bool ping(int timeout = 100)
-        {
-            if (Entity.IP == "1") return false;
-            try
-            {
-                var objPingSender = new Ping();
-                var objPinOptions = new PingOptions
-                {
-                    DontFragment = true
-                };
-                const string data = "";
-                var buffer = Encoding.UTF8.GetBytes(data);
-                var objPinReply = objPingSender.Send(Entity.IP, timeout, buffer, objPinOptions);
-                var strInfo = objPinReply.Status.ToString();
-                return strInfo == "Success";
-            }
-            catch (Exception)
-            {
-                return false;
-            }
-
-            //var p = new Ping();
-            //var res = p.Send(Entity.IP, timeout);
-            //return res.Status == IPStatus.Success;
-            ////return true;
+        bool ping(int timeout = 100)
+        { 
+            var p = new Ping();
+            var res = p.Send(Entity.IP, timeout);
+            return res.Status == IPStatus.Success;
         }
+      
     }
 
     public interface IPLCAccessorCreater
     {
         IPLCAccessor Create(PLCInfo data);
     }
-
     public interface IPLCAccessor
     {
         void WriteBytes(ushort db, ushort address, byte[] data);
-
         byte[] ReadBytes(ushort db, ushort address, ushort length);
     }
-}
+}

+ 4 - 3
WCS.Core/PlcItem.cs

@@ -23,7 +23,7 @@ namespace WCS.Core
         /// <summary>
         /// 数据类型所占的字节数
         /// </summary>
-        public byte DataSize { get; private set; }
+        public int DataSize { get; private set; }
 
         public int DataSizeOfBits { get; private set; }
 
@@ -38,7 +38,7 @@ namespace WCS.Core
             this.ArrayLength = arrLen;
             this.StringLength = strLength;
 
-            DataSize = (byte)GetTypeLen(DataType);
+            DataSize = GetTypeLen(DataType);
 
             DataSizeOfBits = _getBitLen(DataType);
         }
@@ -54,7 +54,8 @@ namespace WCS.Core
 
         private int _getBitLen(Type type)
         {
-            if (type.IsArray) return _getBitLen(type.GetElementType()) * ArrayLength;
+            if (type.IsArray)
+                return _getBitLen(type.GetElementType()) * ArrayLength;
             if (type == typeof(bool)) return 1;
             if (type.IsEnum) return Marshal.SizeOf(type.GetEnumUnderlyingType()) * 8;
             if (type == typeof(string)) return (StringLength) * 8;

+ 9 - 7
WCS.Core/ProtocolProxyBase.cs

@@ -8,7 +8,7 @@ namespace WCS.Core
     {
         private string Id = Guid.NewGuid().ToString();
         public ProtocolInfo Info { get; private set; }
-        public ushort BytesCount { get; private set; }
+        public int BytesCount { get; private set; }
         public Dictionary<string, PlcItem> Items = new Dictionary<string, PlcItem>();
         public Type ProtocolType, ProtocolDataType;
         public Device Device { get; private set; }
@@ -18,7 +18,7 @@ namespace WCS.Core
 
         public ProtocolProxyBase(Device dev, ProtocolInfo info, Type protocolType, World world)
         {
-            this.World = world;
+            this.World= world;
             this.Frame = world.Frame;
             this.Device = dev;
             this.Info = info;
@@ -84,7 +84,6 @@ namespace WCS.Core
                 bitStart += item.DataSizeOfBits;
                 BytesCount += item.DataSize;
             }
-
             ProtocolDataType = ProtocolType.Assembly.GetTypes().Where(v => v.IsClass).First(v => v.GetInterface(ProtocolType.Name) != null && v != this.GetType());
         }
 
@@ -94,7 +93,8 @@ namespace WCS.Core
         {
             var pos = Info.Position - Db.Start;
             var bytes = data.Skip(pos).Take(BytesCount).ToArray();
-            if (Data.SequenceEqual(bytes)) return;
+            if (Data.SequenceEqual(bytes)) 
+                return;
             this.Frame = World.Frame;
             Data = bytes;
             DataChanged();
@@ -129,7 +129,8 @@ namespace WCS.Core
             var item = Items[propertyName] as PlcItem<T>;
             var res = item.Value;
             var channel = Ltc.GetChannel();
-            //if (channel != null && channel.System != "数据采集系统" && channel.System != "数据处理") this.World.OnInternalLog(channel, $"获取值:{Device.Code}.{ProtocolType.Name}.{propertyName}:{res}");
+            //if (channel != null)
+                //this.World.OnInternalLog(channel, $"获取{Device.Code}.{ProtocolType.Name}.{propertyName} 值:{res}");
             return res;
         }
 
@@ -138,9 +139,10 @@ namespace WCS.Core
             var item = Items[propertyName] as PlcItem<T>;
             item.Value = value;
             var channel = Ltc.GetChannel();
-            if (channel != null) this.World.OnInternalLog(channel, $"设置值:{Device.Code}.{ProtocolType.Name}.{propertyName} :{value}");
+            if (channel != null)
+                this.World.OnInternalLog(channel, $"设置{Device.Code}.{ProtocolType.Name}.{propertyName} 值:{value}");
             this.Frame = World.Frame;
-            DataChanged();
+            DataChanged(); 
         }
 
         #endregion

+ 18 - 13
WCS.Core/System.cs

@@ -28,12 +28,7 @@ namespace WCS.Core
         /// <summary>
         /// 对所有Objects并行循环执行Do
         /// </summary>
-        protected abstract bool ParallelDo { get; }
-
-        /// <summary>
-        /// 保存日志到文件
-        /// </summary>
-        protected abstract bool SaveLogsToFile { get; }
+        protected abstract bool ParallelDo { get; } 
 
         public SystemBase()
         {
@@ -116,15 +111,25 @@ namespace WCS.Core
                 if (t.IsGenericType) break;
                 t = t.BaseType;
             }
-
-            var types = t.GetGenericArguments();
-            var list = Device.All.Where(v => types.All(v.HasProtocol)).Where(Select).Select(v => Activator.CreateInstance(typeof(T), v, World)).OfType<T>().ToList();//此时才实例化Protocol
-
-            if (list.Count == 0)
+            if (t == typeof(EntityEx<Device>))
             {
-                //throw new Exception($"{this.GetType().Name}未匹配到任何Device");
+                var list = Device.All
+                   .Where(Select)
+                   .Select(v => Activator.CreateInstance(typeof(T), v)).OfType<T>().ToList();//此时才实例化Protocol 
+                return list;
+            }
+            else
+            {
+                var types = t.GetGenericArguments();
+                var list = Device.All.Where(v => types.All(v.HasProtocol))
+                    .Where(Select)
+                    .Select(v => Activator.CreateInstance(typeof(T), v, World)).OfType<T>().ToList();//此时才实例化Protocol
+                if (list.Count == 0)
+                {
+                    //throw new Exception($"{this.GetType().Name}未匹配到任何Device");
+                }
+                return list;
             }
-            return list;
         }
 
         /// <summary>

+ 24 - 44
WCS.Core/World.cs

@@ -2,11 +2,9 @@
 using System.Collections.Concurrent;
 using System.ComponentModel;
 using System.Diagnostics;
-using System.Net.Sockets;
 using System.Reflection;
 using System.Runtime.InteropServices;
 using System.Text.RegularExpressions;
-using System.Threading.Channels;
 
 namespace WCS.Core
 {
@@ -208,27 +206,28 @@ namespace WCS.Core
         private void Loop()
         {
             var sw = new Stopwatch();
-            while (true)
+            while (!Stoped)
             {
                 this.Frame = DateTime.Now;
                 WorkTimes wt = new WorkTimes();
                 wt.Key = $"{this.Description} 周期:{Interval}";
                 sw.Restart();
-                BeforeUpdate();
+                BeforeUpdate(wt.Items);
                 Update(wt.Items);
-                AfterUpdate(); ;
+                AfterUpdate(wt.Items);
                 sw.Stop();
                 var workTimes = (int)sw.ElapsedMilliseconds;
                 var ms = Interval - workTimes;
-
+                //sw.Start();
                 if (ms > 0)
                 {
                     Thread.Sleep(ms);//不要使用Task.Delay().Wait()
                 }
+                //sw.Stop();
+                //var total = sw.ElapsedMilliseconds;
                 wt.Total = workTimes;
                 FrameInfo(wt);
             }
-            // ReSharper disable once FunctionNeverReturns
         }
 
         public void Stop()
@@ -236,10 +235,6 @@ namespace WCS.Core
             Stoped = true;
         }
 
-        /// <summary>
-        ///  周期
-        /// </summary>
-        /// <param name="list"></param>
         private void Update(List<WorkTimes> list)
         {
             var wt = new WorkTimes();
@@ -262,17 +257,14 @@ namespace WCS.Core
 
         private void LoadPlcData(List<WorkTimes> list)
         {
-            var a = this.GetDataBlocks();
             Parallel.ForEach(this.GetDataBlocks(), db =>
             {
-                var b = GetType();
-                var a = b.GetCustomAttribute(typeof(DescriptionAttribute)) as DescriptionAttribute;
                 var channel = new Channel
                 {
-                    World = a.Description,
+                    World = GetType().Name,
                     Stage = "LoadPlcData",
                     System = "",
-                    Item = $"{db.Entity.PLCInfo.IP}"
+                    Item = $"{db.Entity.PLCInfo.IP}_{db.Entity.No}"
                 };
                 var sw = new Stopwatch();
                 sw.Start();
@@ -283,9 +275,6 @@ namespace WCS.Core
                 catch (Exception ex)
                 {
                     this.Ex().Publish(channel, ex.GetBaseException().Message);
-                    sw.Stop();
-                    list.AddSafe(new WorkTimes { Key = $"{db.Entity.PLCInfo.IP}/{db.Entity.No}", Total = sw.ElapsedMilliseconds });
-                    OnLog(channel, ex.Message);
                 }
                 sw.Stop();
                 list.AddSafe(new WorkTimes { Key = $"{db.Entity.PLCInfo.IP}/{db.Entity.No}", Total = sw.ElapsedMilliseconds });
@@ -326,17 +315,11 @@ namespace WCS.Core
             }
         }
 
-        /// <summary>
-        ///  周期前执行
-        /// </summary>
-        protected virtual void BeforeUpdate()
+        protected virtual void BeforeUpdate(List<WorkTimes> list)
         {
         }
 
-        /// <summary>
-        ///  周期后执行
-        /// </summary>
-        protected virtual void AfterUpdate()
+        protected virtual void AfterUpdate(List<WorkTimes> list)
         {
         }
 
@@ -363,23 +346,15 @@ namespace WCS.Core
             {
                 Console.ForegroundColor = ConsoleColor.Red;
             }
-
-            var msg = wt.GetInfo();
-
-            //if (wt.Total > 1500)
-            //{
-            //    var path = $"D:\\WCSLogs\\{DateTime.Now:yyyy-MM-dd}\\超时记录";
-            //    if (!Directory.Exists(path)) Directory.CreateDirectory(path);
-            //    File.AppendAllLines(Path.Combine(path, "周期超时记录.txt"), new[] { $"{DateTime.Now:yyyy-MM-dd hh:mm:ss:fffff}-----周期超时记录:{msg}" });
-            //}
-            Console.WriteLine(msg);
-
+            Console.WriteLine(wt.GetInfo());
             Console.ResetColor();
         }
 
         public void Log<T>(T log) where T : ILog
         {
-            OnLog(Ltc.GetChannel(), log);
+            var channel = Ltc.GetChannel();
+            if (channel != null)
+                OnLog(Ltc.GetChannel(), log);
         }
 
         protected internal abstract void OnError(Channel channel, Exception exception);
@@ -393,9 +368,12 @@ namespace WCS.Core
         internal void Publish()
         {
             var channel = Ltc.GetChannel();
-            var msgs = GetChannelMsg(channel);
-            var msg = string.Join("\n", msgs);
-            this.Ex().Publish(channel, msg);
+            if (channel != null)
+            {
+                var msgs = GetChannelMsg(channel);
+                var msg = string.Join("\n", msgs);
+                this.Ex().Publish(channel, msg);
+            }
         }
     }
 
@@ -427,7 +405,8 @@ namespace WCS.Core
 
         public void Publish(Channel channel, string msg)
         {
-            if ((DateTime.Now - SubTime).TotalSeconds > 20) return;
+            if ((DateTime.Now - SubTime).TotalSeconds > 20)
+                return;
             var flag = false;
 
             flag = ChannelList.Any(v =>
@@ -436,7 +415,8 @@ namespace WCS.Core
                 return b.Success;
             });
 
-            if (flag) Redis.Publish(channel.ToString(), msg);
+            if (flag)
+                Redis.Publish(channel.ToString(), msg);
         }
     }
 

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

@@ -22,8 +22,6 @@ namespace WCS.WorkEngineering.Systems
     {
         protected override bool ParallelDo => true;
 
-        protected override bool SaveLogsToFile => true;
-
         public AgvSystems()
         {
         }

+ 4 - 12
业务工程/分拣库/WCS.WorkEngineering/Systems/NoInteractionSystems.cs

@@ -19,17 +19,14 @@ namespace WCS.WorkEngineering.Systems
     /// </summary>
     [BelongTo(typeof(NoInteractionWorld))]
     [Description("无交互系统")]
-    public class NoInteractionSystems : DeviceSystem<Device<IStation520>>
+    public class NoInteractionSystems : SystemBase
     {
-        public NoInteractionSystems()
+        public override List<object> GetObjects()
         {
+            throw new NotImplementedException();
         }
 
-        protected override bool ParallelDo => true;
-
-        protected override bool SaveLogsToFile => true;
-
-        public override void Do(Device<IStation520> obj)
+        public override void Update(List<WorkTimes> list)
         {
             var taskInfos = new List<int>();
             var sqlSugar = new SqlSugarHelper();
@@ -229,10 +226,5 @@ namespace WCS.WorkEngineering.Systems
                 }
             }
         }
-
-        public override bool Select(Device dev)
-        {
-            return dev.Code == nameof(NoInteractionSystems);
-        }
     }
 }

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

@@ -28,8 +28,6 @@ namespace WCS.WorkEngineering.Systems
     {
         protected override bool ParallelDo => true;
 
-        protected override bool SaveLogsToFile => true;
-
         /// <summary>
         /// 取货点设备集合
         /// </summary>

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

@@ -53,8 +53,6 @@ namespace WCS.WorkEngineering.Systems
 
         protected override bool ParallelDo => true;
 
-        protected override bool SaveLogsToFile => true;
-
         public override void Do(SRM obj)
         {
             #region 处理完成任务

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

@@ -21,7 +21,7 @@ namespace WCS.WorkEngineering.Systems
     {
         protected override bool ParallelDo => true;
 
-        protected override bool SaveLogsToFile => true;
+        
 
         public override void Do(Device<IStation520> obj)
         {

+ 1 - 1
业务工程/分拣库/WCS.WorkEngineering/Systems/一楼叠盘机入库.cs

@@ -23,7 +23,7 @@ namespace WCS.WorkEngineering.Systems
     {
         protected override bool ParallelDo => true;
 
-        protected override bool SaveLogsToFile => true;
+        
 
         public override void Do(Device<IStation520, IStation521, IStation523> obj)
         {

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

@@ -24,7 +24,7 @@ namespace WCS.WorkEngineering.Systems
     {
         protected override bool ParallelDo => true;
 
-        protected override bool SaveLogsToFile => true;
+        
 
         public override void Do(Device<IStation520, IStation521, IStation523, IStation91, IBCR81> obj)
         {

+ 1 - 1
业务工程/分拣库/WCS.WorkEngineering/Systems/二楼拆盘机自动补空托盘组.cs

@@ -22,7 +22,7 @@ namespace WCS.WorkEngineering.Systems
     {
         protected override bool ParallelDo => true;
 
-        protected override bool SaveLogsToFile => true;
+        
 
         public override void Do(Device<IStation520, IStation521, IStation523> obj)
         {

+ 0 - 226
业务工程/分拣库/WCS.WorkEngineering/Systems/分拣主线/分线计算09.cs

@@ -1,226 +0,0 @@
-using System.ComponentModel;
-using WCS.Core;
-using WCS.Entity.Protocol.Station;
-
-namespace WCS.WorkEngineering.Systems
-{
-    /// <summary>
-    ///  分线计算09
-    /// </summary>
-    //[BelongTo(typeof(NoInteractionWorld))]
-    [Description("分线计算09")]
-    public class 分线计算09 : DeviceSystem<Device<IStation520>>
-    {
-        protected override bool ParallelDo => true;
-
-        protected override bool SaveLogsToFile => true;
-
-        public override void Do(Device<IStation520> obj)
-        {
-            //SqlSugarHelper.Do(_db =>
-            //{
-            //    //获取所有待执行的任务
-            //    var db = _db.Default;
-            //    var taskList = db.Queryable<WCS_TaskInfo>().Where(x => x.Status == TaskStatus.WaitingToExecute && x.Type == TaskType.SetPlate && x.AddrFrom == "Robot").Take(1).ToList();
-            //    //开始对任务进行处理
-            //    foreach (var taskInfo in taskList)
-            //    {
-            //        //TODO:暂时不来考虑动态计算可前往的目标
-            //        var nextAdd = taskInfo.WarehouseCode switch
-            //        {
-            //            "1N" => "455",
-            //            "1S" => "455",
-            //            "2N" => "455",
-            //            "2S" => "455",
-            //            "3N" => "455",
-            //            "3S" => "455",
-            //            _ => "0"
-            //        };
-            //        //获取这个地址的下一个地址集合
-            //        var cacheLineDevList = Device.All.First(x => x.Code == nextAdd).Targets.Where(x => x.HasFlag(DeviceFlags.桁架缓存放行点));
-            //        var cacheLineCodes = cacheLineDevList.Select(x => x.Code.ToShort());
-            //        var cacheLineList = db.Queryable<WCS_CacheLine>().Includes(x => x.Locations).ToList();
-
-            //        #region 跟据缓存信息寻找可以到达的缓存点
-
-            //        //找到当前任务可用的缓存线信息
-            //        var cacheLine = cacheLineList.Where(x => x.Locations.Any(l => l is { InStock: false, IsEmpty: false })).FirstOrDefault(x => cacheLineCodes.Contains(x.LocationNo) && x.MatCodeList.Contains(taskInfo.MatCode) && !x.InStock);
-
-            //        if (cacheLine != null)//这个任务可以直接去一条线体,不需要新建缓存信息
-            //        {
-            //            //找到这条线体中序号最小的一条位信息 非空置且无货
-            //            var cacheLoc = cacheLine.Locations.Where(x => x is { InStock: false, IsEmpty: false }).MinBy(x => x.XYNo);
-            //            if (cacheLoc != null)
-            //            {
-            //                cacheLoc = db.Queryable<WCS_CacheLineLoc>().Single(x => x.Id == cacheLoc.Id);
-            //                cacheLoc.InStock = true;
-            //                cacheLoc.TaskId = taskInfo.ID;
-            //                cacheLoc.EditTime = DateTime.Now;
-            //                db.Updateable(cacheLoc).ExecuteCommand();
-
-            //                //WCS任务相关信息
-            //                taskInfo.Status = TaskStatus.FinishOfShunt;
-            //                taskInfo.AddrNext = cacheLine.LocationNo.ToString();
-            //                taskInfo.EditWho = "WCS";
-            //                taskInfo.EditTime = DateTime.Now;
-            //                taskInfo.AddWCS_TASK_DTL(_db, obj.Entity.Code, taskInfo.AddrNext, $"完成分库计算,目标地址:{cacheLine.LocationNo}");
-            //                db.Updateable(taskInfo).ExecuteCommand();
-            //                taskInfo.UpdateRedisHash();
-            //                return;
-            //            }
-            //        }
-
-            //        #endregion 跟据缓存信息寻找可以到达的缓存点
-
-            //        #region 初始化一个信息的缓存信息
-
-            //        //找到所有当前轮子可以去的垛形
-            //        var palletizingList = db.Queryable<WCS_Palletizing>()
-            //            .Includes(x => x.Layers, r => r.Rows, l => l.Locs)
-            //            .Where(x => x.MatCodeList.Contains(taskInfo.MatCode) && !x.Finish).ToList().Where(x => x.Layers.SelectMany(x => x.Rows).Any(r => r.LineCode == null)).OrderBy(x => x.AddTime).ToList();
-            //        //如果没有对应的垛形信息就初始化一个垛形信息
-            //        if (palletizingList.Count <= 0)
-            //        {
-            //            taskInfo.InitStackStructure();
-            //            return;
-            //        }
-            //        foreach (var palletizing in palletizingList)
-            //        {
-            //            //TODO:当前不考虑不按顺序码垛的情况
-            //            //按码垛顺序找到一个最近的没有码垛成功的行,
-            //            //先找层:未空置、未结束 TODO:暂不考虑所有层全部结束,但是垛形信息未清除的情况
-            //            var palletizingLayer = palletizing.Layers
-            //                .Where(x => !x.IsEmpty)
-            //                .Where(x => !x.Finish)
-            //                .Where(x => x.MatCodeList.Contains(taskInfo.MatCode))
-            //                .Where(x => x.Rows.Any(r => r.CacheLineId == 0))
-            //                .MinBy(x => x.LayerNo);
-            //            //如果没有哪一层需要这个物料号,就初始化一个新的垛形信息
-            //            if (palletizingLayer == null)
-            //            {
-            //                taskInfo.InitStackStructure();
-            //                return;
-            //            }
-
-            //            //再找行:未空置、未结束
-            //            var palletizingRow = palletizingLayer.Rows.Where(x => x is { IsEmpty: false, Finish: false } && x.MatCodeList.Contains(taskInfo.MatCode) && x.CacheLineId == 0)
-            //                .MinBy(x => x.RowNo);
-            //            //如果没有哪一行需要这个物料号,就初始化一个新的垛形信息
-            //            if (palletizingRow == null)
-            //            {
-            //                taskInfo.InitStackStructure();
-            //                return;
-            //            }
-            //            //走到这一步就表示没有哪一段线体缓存了当前物料,需要选一段新的线体进行缓存
-
-            //            //TODO:暂时不处理就近分线的逻辑
-            //            //获取一个当前可以使用的分配锁
-            //            var devCode = cacheLineDevList.Select(x => x.Code.ToShort()).FirstOrDefault(x => !cacheLineList.Select(s => s.LocationNo).Contains(x));
-            //            if (devCode == 0)
-            //            {
-            //                World.Log($"无可用线体:{taskInfo.ID}");
-            //                return;
-            //            }
-
-            //            //开始初始化缓存位信息
-            //            cacheLine = new WCS_CacheLine()
-            //            {
-            //                LocationNo = devCode,
-            //                AddTime = DateTime.Now,
-            //                PalletizingRowId = palletizingRow.Id,
-            //                InStock = false,
-            //                Put = false,
-            //                MatCodeList = palletizingRow.MatCodeList
-            //            };
-
-            //            var res = db.Insertable(cacheLine).ExecuteReturnEntity();
-            //            palletizingRow = db.Queryable<WCS_PalletizingRow>().Includes(x => x.Locs).Single(x => x.Id == palletizingRow.Id);
-            //            palletizingRow.Locs = palletizingRow.Locs.OrderBy(x => x.XYNo).ToList();
-            //            palletizingRow.CacheLineId = res.Id;
-            //            palletizingRow.EditTime = DateTime.Now;
-            //            db.Updateable(palletizingRow).ExecuteCommand();
-
-            //            for (var i = 0; i < palletizingRow.Locs.Count; i++)
-            //            {
-            //                var loc = new WCS_CacheLineLoc()
-            //                {
-            //                    XYNo = palletizingRow.Locs[i].XYNo,
-            //                    InStock = i == 0,
-            //                    IsEmpty = palletizingRow.Locs[i].IsEmpty,
-            //                    MatCode = palletizingRow.Locs[i].MatCode,
-            //                    TaskId = i == 0 ? taskInfo.ID : 0,
-            //                    CacheLineId = res.Id
-            //                };
-            //                db.Insertable(loc).ExecuteCommand();
-            //            }
-
-            //            taskInfo.Status = TaskStatus.FinishOfShunt;
-            //            taskInfo.AddrNext = devCode.ToString();
-            //            taskInfo.EditWho = "WCS";
-            //            taskInfo.EditTime = DateTime.Now;
-            //            taskInfo.AddWCS_TASK_DTL(_db, obj.Entity.Code, taskInfo.AddrNext, $"完成分库计算,目标地址:{cacheLine.LocationNo}");
-            //            db.Updateable(taskInfo).ExecuteCommand();
-            //            taskInfo.UpdateRedisHash();
-            //            return;
-            //        }
-
-            //        #endregion 初始化一个信息的缓存信息
-            //    }
-            //});
-        }
-
-        public override bool Select(Device dev)
-        {
-            return dev.Code == nameof(分线计算09);
-        }
-    }
-
-    public class LineCache
-    {
-        /// <summary>
-        ///  位置
-        /// </summary>
-        public string Location { get; set; }
-
-        /// <summary>
-        /// 是否放行
-        /// </summary>
-        public bool IsPut { get; set; }
-
-        /// <summary>
-        ///  具体缓存信息
-        /// </summary>
-        public List<LineCacheInfo> LineInfos { get; set; }
-    }
-
-    /// <summary>
-    ///  线体缓存组员
-    /// </summary>
-    public class LineCacheInfo
-    {
-        /// <summary>
-        ///  序号
-        /// </summary>
-        public string Index { get; set; }
-
-        /// <summary>
-        /// 物料号
-        /// </summary>
-        public string MatCode { get; set; }
-
-        /// <summary>
-        ///  任务号
-        /// </summary>
-        public int TaskNumber { get; set; }
-
-        /// <summary>
-        ///  是否有货
-        /// </summary>
-        public bool InStock { get; set; }
-
-        /// <summary>
-        ///  是否空置
-        /// </summary>
-        public bool IsEmpty { get; set; }
-    }
-}

+ 0 - 33
业务工程/分拣库/WCS.WorkEngineering/Systems/分拣主线/湿拉满轮帘线芯股第一次扫码.cs

@@ -1,33 +0,0 @@
-using System.ComponentModel;
-using WCS.Core;
-using WCS.Entity.Protocol.BCR;
-using WCS.Entity.Protocol.Station;
-using WCS.WorkEngineering.Extensions;
-using DeviceFlags = WCS.WorkEngineering.Extensions.DeviceFlags;
-
-namespace WCS.WorkEngineering.Systems
-{
-    /// <summary>
-    ///  湿拉满轮帘线芯股第一次扫码
-    /// </summary>
-    //[BelongTo(typeof(SortingMainLineWorld))]
-    [Description("湿拉满轮帘线芯股第一次扫码")]
-    public class 湿拉满轮帘线芯股第一次扫码 : DeviceSystem<Device<IStation520, IStation521, IStation523, IBCR83>>
-    {
-        protected override bool ParallelDo => true;
-
-        protected override bool SaveLogsToFile => true;
-
-        public override void Do(Device<IStation520, IStation521, IStation523, IBCR83> obj)
-        {
-            var bcrCodeList = obj.Data4.GetBcrCodeList();
-            //获取当前站台对应的编码信息
-            //WmsApi.EnteMainLine(bcrCodeList, obj.Entity.Code);
-        }
-
-        public override bool Select(Device dev)
-        {
-            return dev.HasFlag(DeviceFlags.满轮主线第一次扫码);
-        }
-    }
-}

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

@@ -24,8 +24,6 @@ namespace WCS.WorkEngineering.Systems
     {
         protected override bool ParallelDo => true;
 
-        protected override bool SaveLogsToFile => true;
-
         public override void Do(Device<IStation523, IBCR83, IStation525> obj)
         {
             var devCode = obj.Entity.Code switch
@@ -36,6 +34,7 @@ namespace WCS.WorkEngineering.Systems
                 "118" => "122",
                 "138" => "141",
                 "158" => "161",
+                _ => throw new ArgumentOutOfRangeException()
             };
             var dev = new Device<IStation520>(Device.All.First(x => x.Code == devCode), World);
             dev.Data.Mode = StationMode.Automatic;

+ 0 - 2
业务工程/分拣库/WCS.WorkEngineering/Systems/分拣支线/桁架分流点.cs

@@ -27,8 +27,6 @@ namespace WCS.WorkEngineering.Systems
     {
         protected override bool ParallelDo => true;
 
-        protected override bool SaveLogsToFile => true;
-
         public override void Do(Device<IStation520, IStation521, IStation523> obj)
         {
             if (obj.Data.VoucherNo != obj.Data2.VoucherNo)

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

@@ -22,8 +22,6 @@ namespace WCS.WorkEngineering.Systems
     {
         protected override bool ParallelDo => true;
 
-        protected override bool SaveLogsToFile => true;
-
         public override void Do(Device<IStation520, IStation521, IStation523, IStation91> obj)
         {
             if (obj.Data.VoucherNo != obj.Data2.VoucherNo)

+ 1 - 1
业务工程/分拣库/WCS.WorkEngineering/Systems/机台叫料生成AGV任务.cs

@@ -20,7 +20,7 @@ namespace WCS.WorkEngineering.Systems
     {
         protected override bool ParallelDo => true;
 
-        protected override bool SaveLogsToFile => true;
+        
 
         public override void Do(Device<IStation520, IStation521, IStation523> obj)
         {

+ 1 - 1
业务工程/分拣库/WCS.WorkEngineering/Systems/桁架码垛/二次码垛任务到RGV取货位处理.cs

@@ -18,7 +18,7 @@ namespace WCS.WorkEngineering.Systems.桁架码垛
     public class 二次码垛任务到RGV取货位处理 : DeviceSystem<Device<IStation520, IStation521, IStation523>>
     {
         protected override bool ParallelDo => true;
-        protected override bool SaveLogsToFile => true;
+        
 
         public override void Do(Device<IStation520, IStation521, IStation523> obj)
         {

+ 1 - 1
业务工程/分拣库/WCS.WorkEngineering/Systems/桁架码垛/创建二次码垛出库任务.cs

@@ -17,7 +17,7 @@ namespace WCS.WorkEngineering.Systems.桁架码垛
     {
         protected override bool ParallelDo => true;
 
-        protected override bool SaveLogsToFile => true;
+        
 
         public override void Do(Device<IStation520> obj)
         {

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

@@ -25,8 +25,6 @@ namespace WCS.WorkEngineering.Systems
     {
         protected override bool ParallelDo => true;
 
-        protected override bool SaveLogsToFile => true;
-
         /// <summary>
         ///  取货点设备集合
         /// </summary>

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

@@ -20,7 +20,7 @@ namespace WCS.WorkEngineering.Systems
     {
         protected override bool ParallelDo => true;
 
-        protected override bool SaveLogsToFile => true;
+        
 
         public override void Do(Device<IStation520> obj)
         {

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

@@ -23,7 +23,7 @@ namespace WCS.WorkEngineering.Systems
     {
         protected override bool ParallelDo => true;
 
-        protected override bool SaveLogsToFile => true;
+        
 
         public override void Do(Device<IStation520, IStation521, IStation523, ITruss530, ITruss531> obj)
         {

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

@@ -19,8 +19,6 @@ namespace WCS.WorkEngineering.Systems
     {
         protected override bool ParallelDo => true;
 
-        protected override bool SaveLogsToFile => true;
-
         /// <summary>
         ///  取货点设备集合
         /// </summary>

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

@@ -26,8 +26,6 @@ namespace WCS.WorkEngineering.Systems
     {
         protected override bool ParallelDo => true;
 
-        protected override bool SaveLogsToFile => true;
-
         /// <summary>
         /// 取货点设备集合
         /// </summary>

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

@@ -25,7 +25,7 @@ namespace WCS.WorkEngineering.Systems.环形库
     {
         protected override bool ParallelDo => true;
 
-        protected override bool SaveLogsToFile => true;
+        
 
         public override void Do(Device<IStation520, IStation521, IStation523, IRobot530, IRobot531> obj)
         {

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

@@ -22,7 +22,7 @@ namespace WCS.WorkEngineering.Systems
     {
         protected override bool ParallelDo => true;
 
-        protected override bool SaveLogsToFile => true;
+        
 
         public override void Do(Device<IStation520> objDev)
         {

+ 2 - 2
业务工程/分拣库/WCS.WorkEngineering/Worlds/MainWorld.cs

@@ -36,7 +36,7 @@ namespace WCS.WorkEngineering.Worlds
         ///  更新前执行,重写改方法后请自行添加执行内容
         ///  执行内容:清空日志队列
         /// </summary>
-        protected override void BeforeUpdate()
+        protected override void BeforeUpdate(List<WorkTimes> list)
         {
             // 清空日志队列,确保日志队列中只会有当前周期日志
             Logs.Clear();
@@ -46,7 +46,7 @@ namespace WCS.WorkEngineering.Worlds
         /// 更新后执行,重写改方法后请自行添加执行内容
         /// 执行内容:清空日志队列
         /// </summary>
-        protected override void AfterUpdate()
+        protected override void AfterUpdate(List<WorkTimes> list)
         {
             //通过异步处理,加快周期速度
             Task.Run(() =>