林豪 左 3 лет назад
Родитель
Сommit
87809541f9
36 измененных файлов с 138 добавлено и 133 удалено
  1. 1 3
      WCS.Core/BaseExtensions/ExceptionExtension.cs
  2. 3 3
      WCS.Core/BaseExtensions/TypeExtension.cs
  3. 5 5
      WCS.Core/DataTrans/DataBlock.cs
  4. 9 9
      WCS.Core/DataTrans/DataField.cs
  5. 25 25
      WCS.Core/DataTrans/Extentions.cs
  6. 3 2
      WCS.Core/DataTrans/ProtocolProxyBase.cs
  7. 2 2
      WCS.Core/DbHelper/DB.cs
  8. 1 5
      WCS.Core/DbHelper/DbContext.cs
  9. 3 3
      WCS.Core/DbHelper/DbLog.cs
  10. 1 1
      WCS.Core/DebugPublisher.cs
  11. 19 17
      WCS.Core/Device.cs
  12. 1 0
      WCS.Core/EntityEx.cs
  13. 1 2
      WCS.Core/IL/Generator.cs
  14. 6 5
      WCS.Core/IL/IProtocolProxy.cs
  15. 2 2
      WCS.Core/Log/InfoLog.cs
  16. 1 1
      WCS.Core/Log/LogConfigModel.cs
  17. 1 1
      WCS.Core/Log/LogHelper.cs
  18. 1 1
      WCS.Core/Log/LogType.cs
  19. 4 3
      WCS.Core/LogicHandler.cs
  20. 1 1
      WCS.Core/Properties/PublishProfiles/FolderProfile.pubxml
  21. 2 2
      WCS.Core/Redis/RedisHelper.cs
  22. 3 3
      WCS.Core/Virtual_PLC/PlcData.cs
  23. 4 4
      WCS.Core/WCS.Core.csproj
  24. 1 1
      WCS.Service/WCS.Service.csproj
  25. 6 5
      WCS.WorkEngineering/Extensions/DeviceExtension.cs
  26. 5 4
      WCS.WorkEngineering/Extensions/TaskExtension.cs
  27. 2 2
      WCS.WorkEngineering/Extensions/WCS_TaskExtensions.cs
  28. 4 4
      WCS.WorkEngineering/Handlers/DataClearHandler.cs
  29. 2 2
      WCS.WorkEngineering/Handlers/UploadHandler.cs
  30. 4 3
      WCS.WorkEngineering/Handlers/WorkHandler.cs
  31. 1 1
      WCS.WorkEngineering/Helpers/FinishTaskList.cs
  32. 3 3
      WCS.WorkEngineering/Helpers/LogHelper.cs
  33. 1 1
      WCS.WorkEngineering/Helpers/SystemConfigHelpers.cs
  34. 3 3
      WCS.WorkEngineering/Uploader.cs
  35. 3 0
      WCS.WorkEngineering/WCS.WorkEngineering.csproj
  36. 4 4
      WCS.WorkEngineering/Works/Station/一楼入库.cs

+ 1 - 3
WCS.Core/BaseExtensions/ExceptionExtension.cs

@@ -1,8 +1,6 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace WCS.BaseExtensions
+namespace WCS.Core.BaseExtensions
 {
     /// <summary>
     /// 警告异常

+ 3 - 3
WCS.Core/BaseExtensions/TypeExtension.cs

@@ -1,5 +1,4 @@
-using Log;
-using SqlSugar;
+using SqlSugar;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
@@ -7,8 +6,9 @@ using System.Data;
 using System.Linq;
 using System.Reflection;
 using System.Security.Cryptography;
+using WCS.Core.Log;
 
-namespace WCS.BaseExtensions
+namespace WCS.Core.BaseExtensions
 {
     /// <summary>
     ///

+ 5 - 5
WCS.Core/DataTrans/DataBlock.cs

@@ -1,14 +1,14 @@
-using DbHelper;
-using System;
+using System;
 using System.Collections;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Linq;
 using System.Reflection;
 using System.Runtime.InteropServices;
+using WCS.Core.DbHelper;
 using WCS.Entity;
 
-namespace WCS.Core
+namespace WCS.Core.DataTrans
 {
     public class DataBlock : EntityEx<WCS_DATABLOCK>
     {
@@ -106,7 +106,7 @@ namespace WCS.Core
         private object Read(Type type, ref int bitStart, int strLength, int arrLength)
         {
             if (failed)
-                throw new Exception(this.Entity.NAME + "连接失败");
+                throw new Exception(Entity.NAME + "连接失败");
 
             if (type.IsArray)
             {
@@ -450,7 +450,7 @@ namespace WCS.Core
                 b = b.SetBit(bitIndex, flag);
                 var data = new byte[] { b };
 
-                Entity.PLC.Ex().Accessor.WriteBytes((ushort)Entity.NO, (ushort)start, data);
+                Entity.PLC.Ex().Accessor.WriteBytes((ushort)Entity.NO, start, data);
                 data.CopyTo(Data, start);
 
                 bitStart += 1;

+ 9 - 9
WCS.Core/DataTrans/DataField.cs

@@ -4,7 +4,7 @@ using System.Linq;
 using System.Runtime.InteropServices;
 using System.Threading;
 
-namespace WCS.Core
+namespace WCS.Core.DataTrans
 {
     public delegate void ValueChangedHandler<T>(PlcItem<T> sender, T value);
 
@@ -32,14 +32,14 @@ namespace WCS.Core
 
         public PlcItem(string id, string name, DataBlock db, Type type, int start, byte arrLen = 1, byte strLength = 0)
         {
-            this.Id = id;
-            this.Name = name;
-            this.Db = db;
-            this.DataType = type;
+            Id = id;
+            Name = name;
+            Db = db;
+            DataType = type;
             //this.Db.DBChanged += Db_DBChanged;
-            this.Start = start;
-            this.ArrayLength = arrLen;
-            this.StringLength = strLength;
+            Start = start;
+            ArrayLength = arrLen;
+            StringLength = strLength;
 
             DataSize = (byte)GetTypeLen(DataType);
 
@@ -126,7 +126,7 @@ namespace WCS.Core
             {
                 try
                 {
-                    Db.Write<T>(Start, (T)value, StringLength, ArrayLength);
+                    Db.Write(Start, (T)value, StringLength, ArrayLength);
                     return;
                 }
                 catch

+ 25 - 25
WCS.Core/DataTrans/Extentions.cs

@@ -5,10 +5,10 @@ using System.Linq;
 using System.Reflection;
 using System.Runtime.InteropServices;
 using System.Text;
-using WCS.Core.DataTrans;
+using WCS.Core.IL;
 using WCS.Entity;
 
-namespace WCS.Core
+namespace WCS.Core.DataTrans
 {
     public static class Extentions
     {
@@ -80,7 +80,7 @@ namespace WCS.Core
                 {
                     if (!ToBytesMethods.TryGetValue(t, out mi))
                     {
-                        var ms = typeof(BitConverter).GetMethods(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static);
+                        var ms = typeof(BitConverter).GetMethods(BindingFlags.Public | BindingFlags.Static);
                         ms = ms.Where(v => v.Name == "GetBytes").ToArray();
                         mi = ms.FirstOrDefault(v => v.GetParameters()[0].ParameterType == t);
                         ToBytesMethods.Add(t, mi);
@@ -107,7 +107,7 @@ namespace WCS.Core
             {
                 foreach (var o in obj as Array)
                 {
-                    var data = GetData(o);
+                    var data = o.GetData();
                     st.Write(data, 0, data.Length);
                 }
             }
@@ -227,7 +227,7 @@ namespace WCS.Core
 
                 while (i < data.Length)
                 {
-                    var obj = GetObj(data.Skip(i).Take(datasize).ToArray(), t, datasize);
+                    var obj = data.Skip(i).Take(datasize).ToArray().GetObj(t, datasize);
                     lst.Add(obj);
                     i += datasize;
                 }
@@ -265,7 +265,7 @@ namespace WCS.Core
         /// <returns></returns>
         public static ushort SetBit(this ushort value, int position, bool flag)
         {
-            return SetBits(value, position, 1, flag ? (byte)1 : (byte)0);
+            return value.SetBits(position, 1, flag ? (byte)1 : (byte)0);
         }
 
         /// <summary>
@@ -280,7 +280,7 @@ namespace WCS.Core
         {
             if (length <= 0 || position >= 16) return value;
 
-            var mask = (2 << (length - 1)) - 1;
+            var mask = (2 << length - 1) - 1;
 
             value &= (ushort)~(mask << position);
             value |= (ushort)((bits & mask) << position);
@@ -296,7 +296,7 @@ namespace WCS.Core
         /// <returns></returns>
         public static bool GetBit(this ushort value, int position)
         {
-            return GetBits(value, position, 1) == 1;
+            return value.GetBits(position, 1) == 1;
         }
 
         /// <summary>
@@ -310,9 +310,9 @@ namespace WCS.Core
         {
             if (length <= 0 || position >= 16) return 0;
 
-            var mask = (2 << (length - 1)) - 1;
+            var mask = (2 << length - 1) - 1;
 
-            return (ushort)((value >> position) & mask);
+            return (ushort)(value >> position & mask);
         }
 
         #endregion ushort
@@ -330,7 +330,7 @@ namespace WCS.Core
         {
             if (position >= 8) return value;
 
-            var mask = (2 << (1 - 1)) - 1;
+            var mask = (2 << 1 - 1) - 1;
 
             value &= (byte)~(mask << position);
             value |= (byte)(((flag ? 1 : 0) & mask) << position);
@@ -348,9 +348,9 @@ namespace WCS.Core
         {
             if (position >= 8) return false;
 
-            var mask = (2 << (1 - 1)) - 1;
+            var mask = (2 << 1 - 1) - 1;
 
-            return (byte)((value >> position) & mask) == 1;
+            return (byte)(value >> position & mask) == 1;
         }
 
         #endregion byte
@@ -366,7 +366,7 @@ namespace WCS.Core
         /// <returns></returns>
         public static uint SetBit(this uint value, int position, bool flag)
         {
-            return SetBits(value, position, 1, flag ? (byte)1 : (byte)0);
+            return value.SetBits(position, 1, flag ? (byte)1 : (byte)0);
         }
 
         /// <summary>
@@ -381,7 +381,7 @@ namespace WCS.Core
         {
             if (length <= 0 || position >= 32) return value;
 
-            var mask = (2 << (length - 1)) - 1;
+            var mask = (2 << length - 1) - 1;
 
             value &= (uint)~(mask << position);
             value |= (uint)((bits & mask) << position);
@@ -397,7 +397,7 @@ namespace WCS.Core
         /// <returns></returns>
         public static bool GetBit(this uint value, int position)
         {
-            return GetBits(value, position, 1) == 1;
+            return value.GetBits(position, 1) == 1;
         }
 
         /// <summary>
@@ -411,9 +411,9 @@ namespace WCS.Core
         {
             if (length <= 0 || position >= 32) return 0;
 
-            var mask = (2 << (length - 1)) - 1;
+            var mask = (2 << length - 1) - 1;
 
-            return (uint)((value >> position) & mask);
+            return (uint)(value >> position & mask);
         }
 
         #endregion uint
@@ -429,7 +429,7 @@ namespace WCS.Core
         /// <returns></returns>
         public static ulong SetBit(this ulong value, int position, bool flag)
         {
-            return SetBits(value, position, 1, flag ? (byte)1 : (byte)0);
+            return value.SetBits(position, 1, flag ? (byte)1 : (byte)0);
         }
 
         /// <summary>
@@ -444,7 +444,7 @@ namespace WCS.Core
         {
             if (length <= 0 || position >= 64) return value;
 
-            var mask = (ulong)(2 << (length - 1)) - 1;
+            var mask = (ulong)(2 << length - 1) - 1;
 
             value &= ~(mask << position);
             value |= (bits & mask) << position;
@@ -460,7 +460,7 @@ namespace WCS.Core
         /// <returns></returns>
         public static bool GetBit(this ulong value, int position)
         {
-            return GetBits(value, position, 1) == 1;
+            return value.GetBits(position, 1) == 1;
         }
 
         /// <summary>
@@ -474,9 +474,9 @@ namespace WCS.Core
         {
             if (length <= 0 || position >= 64) return 0;
 
-            var mask = (ulong)(2 << (length - 1)) - 1;
+            var mask = (ulong)(2 << length - 1) - 1;
 
-            return (value >> position) & mask;
+            return value >> position & mask;
         }
 
         #endregion ulong
@@ -490,7 +490,7 @@ namespace WCS.Core
 
         public static T Data<T>(this WCS_DEVICEPROTOCOL obj)
         {
-            return (T)Data(obj);
+            return (T)obj.Data();
         }
 
         public static object Data(this WCS_DEVICEPROTOCOL obj)
@@ -499,7 +499,7 @@ namespace WCS.Core
             {
                 var type = typeof(Generator<,>);
                 type = type.MakeGenericType(obj.DB.GetProtocolType(), Configs.ProtocolProxyBaseType);
-                var m = type.GetMethod("Create", System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static);
+                var m = type.GetMethod("Create", BindingFlags.Public | BindingFlags.Static);
                 Datas[obj] = m.Invoke(null, new object[] { new object[] { obj.DEVICE.CODE.ToString(), obj.DB, (ushort)obj.POSITION, obj } });
             }
             return Datas[obj];

+ 3 - 2
WCS.Core/DataTrans/ProtocolProxyBase.cs

@@ -1,11 +1,12 @@
-using DbHelper;
-using System;
+using System;
 using System.Collections.Generic;
 using System.ComponentModel.DataAnnotations;
 using System.Linq;
 using System.Reflection;
 using System.Runtime.InteropServices;
 using System.Threading.Tasks;
+using WCS.Core.DbHelper;
+using WCS.Core.IL;
 using WCS.Entity;
 
 namespace WCS.Core.DataTrans

+ 2 - 2
WCS.Core/DbHelper/DB.cs

@@ -3,7 +3,7 @@ using System;
 using System.Collections.Generic;
 using System.Linq;
 
-namespace DbHelper
+namespace WCS.Core.DbHelper
 {
     /// <summary>
     /// DB,禁止跨上下文使用
@@ -109,7 +109,7 @@ namespace DbHelper
     {
         public ContextList(string key, SqlSugarScope client, ConnectionConfig connectionConfig)
         {
-            this.Key = key;
+            Key = key;
             Client = client;
             ConnectionConfig = connectionConfig;
         }

+ 1 - 5
WCS.Core/DbHelper/DbContext.cs

@@ -1,11 +1,7 @@
 using SqlSugar;
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 
-namespace DbHelper
+namespace WCS.Core.DbHelper
 {
     public class DbContext
     {

+ 3 - 3
WCS.Core/DbHelper/DbLog.cs

@@ -1,7 +1,7 @@
-using Log;
-using System.Collections.Generic;
+using System.Collections.Generic;
+using WCS.Core.Log;
 
-namespace DbHelper
+namespace WCS.Core.DbHelper
 {
     public class DbLog : ILogType
     {

+ 1 - 1
WCS.Core/DebugPublisher.cs

@@ -1,4 +1,4 @@
-using WCS.Redis;
+using WCS.Core.Redis;
 
 namespace WCS.Core
 {

+ 19 - 17
WCS.Core/Device.cs

@@ -1,27 +1,29 @@
 using System;
 using System.Linq;
-using WCS.Core;
 using WCS.Entity;
 
-public static class Device
+namespace WCS.Core
 {
-    #region 静态方法
-
-    public static WCS_DEVICE[] Where(Func<WCS_DEVICE, bool> func)
+    public static class Device
     {
-        var arr = LogicHandler.AllObjects.OfType<WCS_DEVICE>().Where(func).ToArray();
-        return arr;
-    }
+        #region 静态方法
 
-    public static WCS_DEVICE Find(string code)
-    {
-        return Where(v => v.CODE == code).Single();
-    }
+        public static WCS_DEVICE[] Where(Func<WCS_DEVICE, bool> func)
+        {
+            var arr = LogicHandler.AllObjects.OfType<WCS_DEVICE>().Where(func).ToArray();
+            return arr;
+        }
 
-    public static WCS_DEVICE[] Find(params string[] codes)
-    {
-        return Where(v => codes.Contains(v.CODE)).ToArray();
-    }
+        public static WCS_DEVICE Find(string code)
+        {
+            return Where(v => v.CODE == code).Single();
+        }
 
-    #endregion 静态方法
+        public static WCS_DEVICE[] Find(params string[] codes)
+        {
+            return Where(v => codes.Contains(v.CODE)).ToArray();
+        }
+
+        #endregion 静态方法
+    }
 }

+ 1 - 0
WCS.Core/EntityEx.cs

@@ -1,6 +1,7 @@
 using System;
 using System.Collections.Generic;
 using System.Linq;
+using WCS.Core.DataTrans;
 using WCS.Entity;
 
 namespace WCS.Core

+ 1 - 2
WCS.Core/IL/Generator.cs

@@ -1,10 +1,9 @@
 using System;
-using System.Collections.Generic;
 using System.Linq;
 using System.Reflection;
 using System.Reflection.Emit;
 
-namespace WCS.Core
+namespace WCS.Core.IL
 {
     /// <summary>
     /// 动态创建接口实例

+ 6 - 5
WCS.Core/IL/IProtocolProxy.cs

@@ -1,18 +1,19 @@
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 
-namespace WCS.Core
+namespace WCS.Core.IL
 {
     public interface IProtocolProxy
     {
         void Set<T>(string propertyName, T value);
+
         T Get<T>(string propertyName);
+
         T CallReturn<T>(string methodName, params object[] args);
+
         void CallVoid(string methodName, params object[] args);
+
         void AddEvent(string eventName, Delegate delgate);
+
         void RemoveEvent(string eventName, Delegate delgate);
     }
 }

+ 2 - 2
WCS.Core/Log/InfoLog.cs

@@ -1,6 +1,6 @@
 using System.Collections.Generic;
 
-namespace Log
+namespace WCS.Core.Log
 {
     /// <summary>
     /// 信息日志
@@ -37,7 +37,7 @@ namespace Log
         }
 
         /// <summary>
-        /// 系统执行信息 
+        /// 系统执行信息
         /// </summary>
         /// <param name="msg"></param>
         public static void INFO_INIT(string msg)

+ 1 - 1
WCS.Core/Log/LogConfigModel.cs

@@ -1,6 +1,6 @@
 using System.Collections.Generic;
 
-namespace Log
+namespace WCS.Core.Log
 {
     /// <summary>
     /// 日志配置实体对象

+ 1 - 1
WCS.Core/Log/LogHelper.cs

@@ -9,7 +9,7 @@ using System.Text;
 using System.Timers;
 using System.Xml;
 
-namespace Log
+namespace WCS.Core.Log
 {
     /// <summary>
     /// 日志帮助类

+ 1 - 1
WCS.Core/Log/LogType.cs

@@ -1,6 +1,6 @@
 using System.Collections.Generic;
 
-namespace Log
+namespace WCS.Core.Log
 {
     /// <summary>
     /// 日志类型接口

+ 4 - 3
WCS.Core/LogicHandler.cs

@@ -1,12 +1,13 @@
-using Log;
-using System;
+using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Diagnostics;
 using System.Linq;
 using System.Threading;
 using System.Threading.Tasks;
-using WCS.BaseExtensions;
+using WCS.Core.BaseExtensions;
+using WCS.Core.DataTrans;
+using WCS.Core.Log;
 using WCS.Entity;
 
 namespace WCS.Core

+ 1 - 1
WCS.Core/Properties/PublishProfiles/FolderProfile.pubxml

@@ -8,6 +8,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
     <Platform>Any CPU</Platform>
     <PublishDir>D:\XM\Release\DLL</PublishDir>
     <PublishProtocol>FileSystem</PublishProtocol>
-    <VersionPrefix>1.0.6</VersionPrefix>
+    <VersionPrefix>1.0.7</VersionPrefix>
   </PropertyGroup>
 </Project>

+ 2 - 2
WCS.Core/Redis/RedisHelper.cs

@@ -3,7 +3,7 @@ using System;
 using System.Collections.Generic;
 using System.Linq;
 
-namespace WCS.Redis
+namespace WCS.Core.Redis
 {
     /// <summary>
     /// Redis操作类
@@ -86,7 +86,7 @@ namespace WCS.Redis
         /// <param name="connectionConfig">连接字符串</param>
         public RedisClientList(string key, RedisClient client, string connectionConfig)
         {
-            this.Key = key;
+            Key = key;
             Client = client;
             ConnectionConfig = connectionConfig;
         }

+ 3 - 3
WCS.Core/Virtual_PLC/PlcData.cs

@@ -2,9 +2,9 @@
 using Newtonsoft.Json;
 using System.Collections.Generic;
 using System.Linq;
-using WCS.Redis;
+using WCS.Core.Redis;
 
-namespace WCS.Virtual_PLC
+namespace WCS.Core.Virtual_PLC
 {
     /// <summary>
     /// plc数据
@@ -130,7 +130,7 @@ namespace WCS.Virtual_PLC
             int start = 0;
             if (data.DataLength == data.Length) //数据长度与总长度相等时计算
             {
-                start = startLength < data.DataLength ? 0 : (data.DataLength - startLength) + startLength;
+                start = startLength < data.DataLength ? 0 : data.DataLength - startLength + startLength;
             }
             else //不等
             {

+ 4 - 4
WCS.Core/WCS.Core.csproj

@@ -12,11 +12,11 @@
   </ItemGroup>
 
   <ItemGroup>
+    <PackageReference Include="FreeRedis" Version="0.6.5" />
     <PackageReference Include="HslCommunication" Version="6.2.2" />
-    <PackageReference Include="WCS.BaseExtensions" Version="1.0.1" />
-    <PackageReference Include="WCS.DbHelper" Version="1.0.0" />
-    <PackageReference Include="WCS.Entity" Version="1.0.3" />
-    <PackageReference Include="WCS.Redis" Version="1.0.2" />
+    <PackageReference Include="log4net" Version="2.0.15" />
+    <PackageReference Include="SqlSugarCore" Version="5.1.2.6" />
+    <PackageReference Include="WCS.Entity" Version="1.0.4" />
   </ItemGroup>
 
 </Project>

+ 1 - 1
WCS.Service/WCS.Service.csproj

@@ -25,7 +25,7 @@
     <PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="6.0.0" />
     <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.8" />
     <PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
-    <PackageReference Include="WCS.Virtual_PLC" Version="1.0.0" />
+    <PackageReference Include="WCS.Core" Version="1.0.7" />
     <PackageReference Include="WCS.WorkEngineering" Version="1.0.2" />
   </ItemGroup>
 </Project>

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

@@ -1,16 +1,17 @@
-using DbHelper;
-using Log;
-using System;
+using System;
 using System.Collections.Concurrent;
 using System.Collections.Generic;
 using System.Linq;
 using System.Threading.Tasks;
-using WCS.BaseExtensions;
 using WCS.Core;
+using WCS.Core.BaseExtensions;
+using WCS.Core.DataTrans;
+using WCS.Core.DbHelper;
+using WCS.Core.Log;
+using WCS.Core.Redis;
 using WCS.Entity;
 using WCS.Entity.Protocol;
 using WCS.Entity.Protocol.RGV;
-using WCS.Redis;
 using WCS.Service.Helpers;
 using LogHelper = WCS.Service.Helpers.LogHelper;
 using TaskStatus = WCS.Entity.TaskStatus;

+ 5 - 4
WCS.WorkEngineering/Extensions/TaskExtension.cs

@@ -1,10 +1,11 @@
-using DbHelper;
-using Log;
-using System;
+using System;
 using System.Collections.Generic;
 using System.Linq;
-using WCS.BaseExtensions;
 using WCS.Core;
+using WCS.Core.DataTrans;
+using WCS.Core.BaseExtensions;
+using WCS.Core.DbHelper;
+using WCS.Core.Log;
 using WCS.Entity;
 using WCS.Entity.Protocol;
 using WCS.Service.Helpers;

+ 2 - 2
WCS.WorkEngineering/Extensions/WCS_TaskExtensions.cs

@@ -1,5 +1,5 @@
-using DbHelper;
-using System;
+using System;
+using WCS.Core.DbHelper;
 using WCS.Entity;
 using WCS.Entity.Protocol;
 

+ 4 - 4
WCS.WorkEngineering/Handlers/DataClearHandler.cs

@@ -1,9 +1,9 @@
-using DbHelper;
-using SqlSugar;
+using SqlSugar;
 using System;
 using System.ComponentModel;
-using WCS.BaseExtensions;
 using WCS.Core;
+using WCS.Core.BaseExtensions;
+using WCS.Core.DbHelper;
 using WCS.Entity;
 
 namespace WCS.Service
@@ -37,7 +37,7 @@ namespace WCS.Service
                         continue;
                     var sSql = $"Delete FROM {tType.Name} where TIMESTAMPDIFF(DAY,Frame,NOW())>7";
                     db.Default.Ado.UseStoredProcedure().ExecuteCommand(sSql);
-                    DbHelper.DbLog.DB_CLEAN(sSql);
+                    Core.DbHelper.DbLog.DB_CLEAN(sSql);
                 }
                 var taskList = db.Default.Queryable<WCS_TASK>().Where(v => SqlFunc.DateDiff(DateType.Day, v.UPDATETIME, SqlFunc.GetDate()) > 3 && v.STATUS >= TaskStatus.已完成).ToList();
 

+ 2 - 2
WCS.WorkEngineering/Handlers/UploadHandler.cs

@@ -1,7 +1,7 @@
-using DbHelper;
-using System;
+using System;
 using System.ComponentModel;
 using WCS.Core;
+using WCS.Core.DbHelper;
 
 namespace WCS.Service.Handlers
 {

+ 4 - 3
WCS.WorkEngineering/Handlers/WorkHandler.cs

@@ -1,11 +1,12 @@
-using Log;
-using System;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Reflection;
 using System.Threading.Tasks;
-using WCS.BaseExtensions;
 using WCS.Core;
+using WCS.Core.BaseExtensions;
+using WCS.Core.DataTrans;
+using WCS.Core.Log;
 using WCS.Entity;
 
 namespace WCS.Service.Handlers

+ 1 - 1
WCS.WorkEngineering/Helpers/FinishTaskList.cs

@@ -1,6 +1,6 @@
 using System.Collections.Generic;
 using System.Linq;
-using WCS.BaseExtensions;
+using WCS.Core.BaseExtensions;
 using WCS.Service.Extensions;
 using WCS.WebApi.WMS;
 using WCS.WebApi.WMS.Response;

+ 3 - 3
WCS.WorkEngineering/Helpers/LogHelper.cs

@@ -1,7 +1,7 @@
-using DbHelper;
-using Log;
-using SqlSugar;
+using SqlSugar;
 using System;
+using WCS.Core.DbHelper;
+using WCS.Core.Log;
 using WCS.Entity;
 
 namespace WCS.Service.Helpers

+ 1 - 1
WCS.WorkEngineering/Helpers/SystemConfigHelpers.cs

@@ -1,4 +1,4 @@
-using DbHelper;
+using WCS.Core.DbHelper;
 using WCS.Entity.Protocol;
 
 namespace WCS.Service.Helpers

+ 3 - 3
WCS.WorkEngineering/Uploader.cs

@@ -1,6 +1,6 @@
-using DbHelper;
-using Log;
-using System;
+using System;
+using WCS.Core.DbHelper;
+using WCS.Core.Log;
 using WCS.Entity;
 using WCS.WebApi.WMS;
 

+ 3 - 0
WCS.WorkEngineering/WCS.WorkEngineering.csproj

@@ -8,6 +8,9 @@
   </PropertyGroup>
 
   <ItemGroup>
+    <PackageReference Include="WCS.Core" Version="1.0.7" />
+    <PackageReference Include="WCS.Entity" Version="1.0.4" />
+    <PackageReference Include="WCS.Entity.Protocol" Version="1.0.2" />
     <PackageReference Include="WCS.WebApi" Version="1.0.2" />
   </ItemGroup>
 

+ 4 - 4
WCS.WorkEngineering/Works/Station/一楼入库.cs

@@ -1,11 +1,11 @@
-using DbHelper;
-using Log;
-using System;
+using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Linq;
-using WCS.BaseExtensions;
 using WCS.Core;
+using WCS.Core.BaseExtensions;
+using WCS.Core.DbHelper;
+using WCS.Core.Log;
 using WCS.Entity;
 using WCS.Entity.Protocol;
 using WCS.Service.Extensions;