From 0fba392cb025bdcbb9b0fc13b6de4fa0fe1df24b Mon Sep 17 00:00:00 2001 From: sun__lin <1142226789@qq.com> Date: Mon, 23 Feb 2026 19:18:51 +0800 Subject: [PATCH] 1 --- iMES.Bi.API/iMES.Bi.API.csproj | 2 +- iMES.Bi.Data/iMES.Bi.Data.csproj | 6 +++--- iMES.Bi/iMES.Bi.csproj | 2 +- iMES.Builder/iMES.Builder.csproj | 10 +++++----- iMES.Calendar/iMES.Calendar.csproj | 2 +- iMES.Core/Extensions/ObjectExtension.cs | 25 ++++++++++++++----------- iMES.Core/iMES.Core.csproj | 22 +++++++++++----------- iMES.Custom/iMES.Custom.csproj | 2 +- iMES.Entity/iMES.Entity.csproj | 10 +++++----- iMES.Equip/iMES.Equip.csproj | 2 +- iMES.Production/iMES.Production.csproj | 2 +- iMES.Quality/iMES.Quality.csproj | 2 +- iMES.Report/iMES.Report.csproj | 2 +- iMES.System/iMES.System.csproj | 10 +++++----- iMES.Tools/iMES.Tools.csproj | 2 +- iMES.Warehouse/iMES.Warehouse.csproj | 2 +- iMES.WebApi/appsettings.json | 3 ++- iMES.WebApi/iMES.WebApi.csproj | 7 ++++--- iMES.sln | 10 ++++++++-- 19 files changed, 67 insertions(+), 56 deletions(-) diff --git a/iMES.Bi.API/iMES.Bi.API.csproj b/iMES.Bi.API/iMES.Bi.API.csproj index 6a50874..92bb5a4 100644 --- a/iMES.Bi.API/iMES.Bi.API.csproj +++ b/iMES.Bi.API/iMES.Bi.API.csproj @@ -1,7 +1,7 @@  - net8.0 + net6.0 diff --git a/iMES.Bi.Data/iMES.Bi.Data.csproj b/iMES.Bi.Data/iMES.Bi.Data.csproj index 6de8f86..0711115 100644 --- a/iMES.Bi.Data/iMES.Bi.Data.csproj +++ b/iMES.Bi.Data/iMES.Bi.Data.csproj @@ -1,12 +1,12 @@  - net8.0 + net6.0 - - + + diff --git a/iMES.Bi/iMES.Bi.csproj b/iMES.Bi/iMES.Bi.csproj index d41a442..481d541 100644 --- a/iMES.Bi/iMES.Bi.csproj +++ b/iMES.Bi/iMES.Bi.csproj @@ -1,7 +1,7 @@ - net8.0 + net6.0 diff --git a/iMES.Builder/iMES.Builder.csproj b/iMES.Builder/iMES.Builder.csproj index ad56bfc..eb06c5c 100644 --- a/iMES.Builder/iMES.Builder.csproj +++ b/iMES.Builder/iMES.Builder.csproj @@ -8,7 +8,7 @@ - net8.0 + net6.0 Library @@ -18,10 +18,10 @@ - - - - + + + + diff --git a/iMES.Calendar/iMES.Calendar.csproj b/iMES.Calendar/iMES.Calendar.csproj index d41a442..481d541 100644 --- a/iMES.Calendar/iMES.Calendar.csproj +++ b/iMES.Calendar/iMES.Calendar.csproj @@ -1,7 +1,7 @@ - net8.0 + net6.0 diff --git a/iMES.Core/Extensions/ObjectExtension.cs b/iMES.Core/Extensions/ObjectExtension.cs index 1be3ee8..ff62c0b 100644 --- a/iMES.Core/Extensions/ObjectExtension.cs +++ b/iMES.Core/Extensions/ObjectExtension.cs @@ -8,13 +8,11 @@ using System.Linq.Expressions; using System.Reflection; using System.Runtime.Serialization.Formatters.Binary; using System.Text; -using System.Text.Json; using System.Text.RegularExpressions; using System.Web; using System.Xml; using System.Xml.Linq; - namespace iMES.Core.Extensions { @@ -543,23 +541,28 @@ namespace iMES.Core.Extensions return info; } - public static T FromBytes(this byte[] data) + public static byte[] ToBytes(this object obj) { - if (data == null || data.Length == 0) + if (obj == null) + return null; + var bf = new BinaryFormatter(); + using (var ms = new MemoryStream()) { - return default(T); + bf.Serialize(ms, obj); + return ms.ToArray(); } - return JsonSerializer.Deserialize(data); } - public static T ToObject(this byte[] source) + public static object ToObject(this byte[] source) { - if (source == null || source.Length == 0) + using (var memStream = new MemoryStream()) { - return default(T); + var bf = new BinaryFormatter(); + memStream.Write(source, 0, source.Length); + memStream.Seek(0, SeekOrigin.Begin); + var obj = bf.Deserialize(memStream); + return obj; } - - return JsonSerializer.Deserialize(source); } /// diff --git a/iMES.Core/iMES.Core.csproj b/iMES.Core/iMES.Core.csproj index 6b8f556..9a203fb 100644 --- a/iMES.Core/iMES.Core.csproj +++ b/iMES.Core/iMES.Core.csproj @@ -8,7 +8,7 @@ - net8.0 + net6.0 Library @@ -35,8 +35,8 @@ - - + + @@ -45,20 +45,20 @@ - - + + - + - - - + + + - + - + diff --git a/iMES.Custom/iMES.Custom.csproj b/iMES.Custom/iMES.Custom.csproj index 35d60ca..9145b9a 100644 --- a/iMES.Custom/iMES.Custom.csproj +++ b/iMES.Custom/iMES.Custom.csproj @@ -1,7 +1,7 @@ - net8.0 + net6.0 diff --git a/iMES.Entity/iMES.Entity.csproj b/iMES.Entity/iMES.Entity.csproj index 02a936f..5584ba7 100644 --- a/iMES.Entity/iMES.Entity.csproj +++ b/iMES.Entity/iMES.Entity.csproj @@ -8,7 +8,7 @@ - net8.0 + net6.0 @@ -21,10 +21,10 @@ - - - - + + + + diff --git a/iMES.Equip/iMES.Equip.csproj b/iMES.Equip/iMES.Equip.csproj index d41a442..481d541 100644 --- a/iMES.Equip/iMES.Equip.csproj +++ b/iMES.Equip/iMES.Equip.csproj @@ -1,7 +1,7 @@ - net8.0 + net6.0 diff --git a/iMES.Production/iMES.Production.csproj b/iMES.Production/iMES.Production.csproj index 846ed4c..ac45735 100644 --- a/iMES.Production/iMES.Production.csproj +++ b/iMES.Production/iMES.Production.csproj @@ -1,7 +1,7 @@  - net8.0 + net6.0 diff --git a/iMES.Quality/iMES.Quality.csproj b/iMES.Quality/iMES.Quality.csproj index ba34c9b..3f61dbb 100644 --- a/iMES.Quality/iMES.Quality.csproj +++ b/iMES.Quality/iMES.Quality.csproj @@ -1,7 +1,7 @@  - net8.0 + net6.0 diff --git a/iMES.Report/iMES.Report.csproj b/iMES.Report/iMES.Report.csproj index 27ec42c..6566c8f 100644 --- a/iMES.Report/iMES.Report.csproj +++ b/iMES.Report/iMES.Report.csproj @@ -1,7 +1,7 @@  - net8.0 + net6.0 diff --git a/iMES.System/iMES.System.csproj b/iMES.System/iMES.System.csproj index c1b3809..6c1b460 100644 --- a/iMES.System/iMES.System.csproj +++ b/iMES.System/iMES.System.csproj @@ -8,7 +8,7 @@ - net8.0 + net6.0 Library @@ -18,10 +18,10 @@ - - - - + + + + diff --git a/iMES.Tools/iMES.Tools.csproj b/iMES.Tools/iMES.Tools.csproj index ba34c9b..3f61dbb 100644 --- a/iMES.Tools/iMES.Tools.csproj +++ b/iMES.Tools/iMES.Tools.csproj @@ -1,7 +1,7 @@  - net8.0 + net6.0 diff --git a/iMES.Warehouse/iMES.Warehouse.csproj b/iMES.Warehouse/iMES.Warehouse.csproj index ba34c9b..3f61dbb 100644 --- a/iMES.Warehouse/iMES.Warehouse.csproj +++ b/iMES.Warehouse/iMES.Warehouse.csproj @@ -1,7 +1,7 @@  - net8.0 + net6.0 diff --git a/iMES.WebApi/appsettings.json b/iMES.WebApi/appsettings.json index 7418bfa..2e5215b 100644 --- a/iMES.WebApi/appsettings.json +++ b/iMES.WebApi/appsettings.json @@ -17,7 +17,8 @@ "DBType": "MsSql", //MySql/MsSql/PgSql //数据库类型,如果使用的是sqlserver此处应设置为MsSql //sqlserver连接字符串 //"DbConnectionString": "Data Source=.;Initial Catalog=iMES;Persist Security Info=True;User ID=sa;Password=sunlin786546;Connect Timeout=500;", - "DbConnectionString": "Data Source=.;Initial Catalog=iMES;Persist Security Info=True;User ID=sa;Password=sunlin786546;Pooling=False;MultipleActiveResultSets=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=True;Packet Size=4096;", + //"DbConnectionString": "Data Source=113.44.218.8;Initial Catalog=iMES;Persist Security Info=True;User ID=sa;Password=Sunlin786546+;Pooling=False;MultipleActiveResultSets=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=True;Packet Size=4096;", + "DbConnectionString": "Data Source=.;Initial Catalog=iMES;Persist Security Info=True;User ID=sa;Password=123;Pooling=False;MultipleActiveResultSets=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=True;Packet Size=4096;", //mysql连接字符串(升级EFCore3.1到时已将mysql连接字符串修改,2019-12-20) //"DbConnectionString": " Data Source=127.0.0.1;Database=netcoredev1;AllowLoadLocalInfile=true;User ID=root;Password=jxx!@#123..errrewJXXX;allowPublicKeyRetrieval=true;pooling=true;CharSet=utf8;port=3306;sslmode=none;", diff --git a/iMES.WebApi/iMES.WebApi.csproj b/iMES.WebApi/iMES.WebApi.csproj index 66ffff1..f8f4564 100644 --- a/iMES.WebApi/iMES.WebApi.csproj +++ b/iMES.WebApi/iMES.WebApi.csproj @@ -1,7 +1,7 @@  - net8.0 + net6.0 enable bcbf6258-c4b4-4daf-8676-641b2abd648e @@ -20,8 +20,8 @@ - - + + @@ -37,6 +37,7 @@ + diff --git a/iMES.sln b/iMES.sln index 4b7e1be..b3b9e7b 100644 --- a/iMES.sln +++ b/iMES.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29613.14 +# Visual Studio Version 17 +VisualStudioVersion = 17.14.36414.22 d17.14 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "iMES.Core", "iMES.Core\iMES.Core.csproj", "{9F72743E-647E-4D37-85D1-07EC9CD0AB71}" EndProject @@ -40,6 +40,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "iMES.Bi.API", "iMES.Bi.API\ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "iMES.Bi.Data", "iMES.Bi.Data\iMES.Bi.Data.csproj", "{9E2AE622-7047-464A-9F4F-B88DD34223A4}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iMES.Injection", "iMES.Injection\iMES.Injection.csproj", "{E750C801-4A25-4097-A54F-AEDCCF627737}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -110,6 +112,10 @@ Global {9E2AE622-7047-464A-9F4F-B88DD34223A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {9E2AE622-7047-464A-9F4F-B88DD34223A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {9E2AE622-7047-464A-9F4F-B88DD34223A4}.Release|Any CPU.Build.0 = Release|Any CPU + {E750C801-4A25-4097-A54F-AEDCCF627737}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E750C801-4A25-4097-A54F-AEDCCF627737}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E750C801-4A25-4097-A54F-AEDCCF627737}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E750C801-4A25-4097-A54F-AEDCCF627737}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE