添加三菱PLC模块

liuwf
liulb@mesnac.com 1 year ago
parent 322648757e
commit af1faa5196

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -1,7 +0,0 @@
{
"ExpandedNodes": [
""
],
"SelectedNode": "\\Admin.Core.sln",
"PreviewInSolutionExplorer": false
}

@ -596,19 +596,19 @@
"System.Security.Principal.Windows": "4.7.0"
}
},
"Microsoft.Win32.SystemEvents/6.0.0": {
"Microsoft.Win32.SystemEvents/7.0.0": {
"runtime": {
"lib/net6.0/Microsoft.Win32.SystemEvents.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
"assemblyVersion": "7.0.0.0",
"fileVersion": "7.0.22.51805"
}
},
"runtimeTargets": {
"runtimes/win/lib/net6.0/Microsoft.Win32.SystemEvents.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
"assemblyVersion": "7.0.0.0",
"fileVersion": "7.0.22.51805"
}
}
},
@ -747,7 +747,7 @@
"Portable.BouncyCastle": "1.8.10",
"SharpZipLib": "1.3.2",
"System.Configuration.ConfigurationManager": "6.0.0",
"System.Drawing.Common": "6.0.0"
"System.Drawing.Common": "7.0.0"
},
"runtime": {
"lib/netstandard2.1/NPOI.OOXML.dll": {
@ -1559,28 +1559,22 @@
}
}
},
"System.Drawing.Common/6.0.0": {
"System.Drawing.Common/7.0.0": {
"dependencies": {
"Microsoft.Win32.SystemEvents": "6.0.0"
"Microsoft.Win32.SystemEvents": "7.0.0"
},
"runtime": {
"lib/net6.0/System.Drawing.Common.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
"assemblyVersion": "7.0.0.0",
"fileVersion": "7.0.22.51805"
}
},
"runtimeTargets": {
"runtimes/unix/lib/net6.0/System.Drawing.Common.dll": {
"rid": "unix",
"assetType": "runtime",
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
},
"runtimes/win/lib/net6.0/System.Drawing.Common.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
"assemblyVersion": "7.0.0.0",
"fileVersion": "7.0.22.51805"
}
}
},
@ -2155,7 +2149,7 @@
},
"System.Windows.Extensions/6.0.0": {
"dependencies": {
"System.Drawing.Common": "6.0.0"
"System.Drawing.Common": "7.0.0"
},
"runtime": {
"lib/net6.0/System.Windows.Extensions.dll": {
@ -2285,6 +2279,8 @@
"Admin.Core.Repository": "1.0.0",
"Admin.Core.Service": "1.0.0",
"Admin.Core.Tasks": "1.0.0",
"Aucma.Core.Melsec": "1.0.0",
"Aucma.Core.Scanner": "1.0.0",
"Microsoft.AspNetCore.Authentication.JwtBearer": "5.0.9"
},
"runtime": {
@ -2358,6 +2354,48 @@
"runtime": {
"Admin.Core.Tasks.dll": {}
}
},
"Aucma.Core.Melsec/1.0.0": {
"dependencies": {
"Admin.Core.Common": "1.0.0",
"Aucma.Core.MelsecPLc": "1.0.0"
},
"runtime": {
"Aucma.Core.Melsec.dll": {}
}
},
"Aucma.Core.MelsecPLc/1.0.0": {
"dependencies": {
"Admin.Core.Common": "1.0.0"
},
"runtime": {
"Aucma.Core.MelsecPLc.dll": {}
}
},
"Aucma.Core.Scanner/1.0.0": {
"dependencies": {
"Admin.Core.Common": "1.0.0",
"System.Drawing.Common": "7.0.0"
},
"runtime": {
"Aucma.Core.Scanner.dll": {}
}
},
"HslCommunication/11.0.6.0": {
"runtime": {
"HslCommunication.dll": {
"assemblyVersion": "11.0.6.0",
"fileVersion": "11.0.6.0"
}
}
},
"MvCodeReaderSDK.Net/1.5.1.0": {
"runtime": {
"MvCodeReaderSDK.Net.dll": {
"assemblyVersion": "1.5.1.0",
"fileVersion": "1.5.1.0"
}
}
}
}
},
@ -2843,12 +2881,12 @@
"path": "microsoft.win32.registry/4.7.0",
"hashPath": "microsoft.win32.registry.4.7.0.nupkg.sha512"
},
"Microsoft.Win32.SystemEvents/6.0.0": {
"Microsoft.Win32.SystemEvents/7.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-hqTM5628jSsQiv+HGpiq3WKBl2c8v1KZfby2J6Pr7pEPlK9waPdgEO6b8A/+/xn/yZ9ulv8HuqK71ONy2tg67A==",
"path": "microsoft.win32.systemevents/6.0.0",
"hashPath": "microsoft.win32.systemevents.6.0.0.nupkg.sha512"
"sha512": "sha512-2nXPrhdAyAzir0gLl8Yy8S5Mnm/uBSQQA7jEsILOS1MTyS7DbmV1NgViMtvV1sfCD1ebITpNwb1NIinKeJgUVQ==",
"path": "microsoft.win32.systemevents/7.0.0",
"hashPath": "microsoft.win32.systemevents.7.0.0.nupkg.sha512"
},
"MiniProfiler.AspNetCore/4.2.22": {
"type": "package",
@ -3417,12 +3455,12 @@
"path": "system.directoryservices.protocols/6.0.1",
"hashPath": "system.directoryservices.protocols.6.0.1.nupkg.sha512"
},
"System.Drawing.Common/6.0.0": {
"System.Drawing.Common/7.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-NfuoKUiP2nUWwKZN6twGqXioIe1zVD0RIj2t976A+czLHr2nY454RwwXs6JU9Htc6mwqL6Dn/nEL3dpVf2jOhg==",
"path": "system.drawing.common/6.0.0",
"hashPath": "system.drawing.common.6.0.0.nupkg.sha512"
"sha512": "sha512-KIX+oBU38pxkKPxvLcLfIkOV5Ien8ReN78wro7OF5/erwcmortzeFx+iBswlh2Vz6gVne0khocQudGwaO1Ey6A==",
"path": "system.drawing.common/7.0.0",
"hashPath": "system.drawing.common.7.0.0.nupkg.sha512"
},
"System.Dynamic.Runtime/4.3.0": {
"type": "package",
@ -3935,6 +3973,31 @@
"type": "project",
"serviceable": false,
"sha512": ""
},
"Aucma.Core.Melsec/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Aucma.Core.MelsecPLc/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Aucma.Core.Scanner/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"HslCommunication/11.0.6.0": {
"type": "reference",
"serviceable": false,
"sha512": ""
},
"MvCodeReaderSDK.Net/1.5.1.0": {
"type": "reference",
"serviceable": false,
"sha512": ""
}
}
}

@ -375,6 +375,9 @@
"D:\\Project\\gitea\\AUCMA\\SCADA\\Admin.Core.Tasks\\Admin.Core.Tasks.csproj": {
"projectPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Admin.Core.Tasks\\Admin.Core.Tasks.csproj"
},
"D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.Melsec\\Aucma.Core.Melsec.csproj": {
"projectPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.Melsec\\Aucma.Core.Melsec.csproj"
},
"D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.Scanner\\Aucma.Core.Scanner.csproj": {
"projectPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.Scanner\\Aucma.Core.Scanner.csproj"
}
@ -876,6 +879,123 @@
}
}
},
"D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.MelsecPLc\\Aucma.Core.MelsecPLc.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.MelsecPLc\\Aucma.Core.MelsecPLc.csproj",
"projectName": "Aucma.Core.MelsecPLc",
"projectPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.MelsecPLc\\Aucma.Core.MelsecPLc.csproj",
"packagesPath": "C:\\Users\\admin\\.nuget\\packages\\",
"outputPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.MelsecPLc\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\admin\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"netstandard2.1"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"netstandard2.1": {
"targetAlias": "netstandard2.1",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"netstandard2.1": {
"targetAlias": "netstandard2.1",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"NETStandard.Library": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.402\\RuntimeIdentifierGraph.json"
}
}
},
"D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.Melsec\\Aucma.Core.Melsec.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.Melsec\\Aucma.Core.Melsec.csproj",
"projectName": "Aucma.Core.Melsec",
"projectPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.Melsec\\Aucma.Core.Melsec.csproj",
"packagesPath": "C:\\Users\\admin\\.nuget\\packages\\",
"outputPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.Melsec\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\admin\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"net6.0"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"projectReferences": {
"D:\\Project\\gitea\\AUCMA\\SCADA\\Admin.Core.Common\\Admin.Core.Common.csproj": {
"projectPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Admin.Core.Common\\Admin.Core.Common.csproj"
},
"D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.MelsecPLc\\Aucma.Core.MelsecPLc.csproj": {
"projectPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.MelsecPLc\\Aucma.Core.MelsecPLc.csproj"
}
}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.402\\RuntimeIdentifierGraph.json"
}
}
},
"D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.Scanner\\Aucma.Core.Scanner.csproj": {
"version": "1.0.0",
"restore": {

@ -1 +1 @@
a44021d9a5284ae174ac365994709f609116bf67
82d10196ac90fc3b85ec0b5d0034ccff2e921ded

@ -1486,7 +1486,6 @@ D:\Project\gitea\AUCMA\SCADA\Admin.Core.Api\bin\Debug\net6.0\runtimes\win\lib\ne
D:\Project\gitea\AUCMA\SCADA\Admin.Core.Api\bin\Debug\net6.0\runtimes\linux\lib\net6.0\System.DirectoryServices.Protocols.dll
D:\Project\gitea\AUCMA\SCADA\Admin.Core.Api\bin\Debug\net6.0\runtimes\osx\lib\net6.0\System.DirectoryServices.Protocols.dll
D:\Project\gitea\AUCMA\SCADA\Admin.Core.Api\bin\Debug\net6.0\runtimes\win\lib\net6.0\System.DirectoryServices.Protocols.dll
D:\Project\gitea\AUCMA\SCADA\Admin.Core.Api\bin\Debug\net6.0\runtimes\unix\lib\net6.0\System.Drawing.Common.dll
D:\Project\gitea\AUCMA\SCADA\Admin.Core.Api\bin\Debug\net6.0\runtimes\win\lib\net6.0\System.Drawing.Common.dll
D:\Project\gitea\AUCMA\SCADA\Admin.Core.Api\bin\Debug\net6.0\runtimes\win\lib\netstandard2.0\System.Runtime.Caching.dll
D:\Project\gitea\AUCMA\SCADA\Admin.Core.Api\bin\Debug\net6.0\runtimes\win\lib\net6.0\System.Security.Cryptography.ProtectedData.dll
@ -1533,3 +1532,11 @@ D:\Project\gitea\AUCMA\SCADA\Admin.Core.Api\obj\Debug\net6.0\refint\Admin.Core.A
D:\Project\gitea\AUCMA\SCADA\Admin.Core.Api\obj\Debug\net6.0\Admin.Core.Api.pdb
D:\Project\gitea\AUCMA\SCADA\Admin.Core.Api\obj\Debug\net6.0\Admin.Core.Api.genruntimeconfig.cache
D:\Project\gitea\AUCMA\SCADA\Admin.Core.Api\obj\Debug\net6.0\ref\Admin.Core.Api.dll
D:\Project\gitea\AUCMA\SCADA\Admin.Core.Api\bin\Debug\net6.0\Aucma.Core.Melsec.dll
D:\Project\gitea\AUCMA\SCADA\Admin.Core.Api\bin\Debug\net6.0\Aucma.Core.MelsecPLc.dll
D:\Project\gitea\AUCMA\SCADA\Admin.Core.Api\bin\Debug\net6.0\Aucma.Core.Scanner.dll
D:\Project\gitea\AUCMA\SCADA\Admin.Core.Api\bin\Debug\net6.0\HslCommunication.dll
D:\Project\gitea\AUCMA\SCADA\Admin.Core.Api\bin\Debug\net6.0\MvCodeReaderSDK.Net.dll
D:\Project\gitea\AUCMA\SCADA\Admin.Core.Api\bin\Debug\net6.0\Aucma.Core.Melsec.pdb
D:\Project\gitea\AUCMA\SCADA\Admin.Core.Api\bin\Debug\net6.0\Aucma.Core.MelsecPLc.pdb
D:\Project\gitea\AUCMA\SCADA\Admin.Core.Api\bin\Debug\net6.0\Aucma.Core.Scanner.pdb

@ -1 +1 @@
c1ce6d89f6b4c951f6d86e55bbc2f8b196f4de3f
bf91db8049c7035489bc79a3469f03b7b36420c3

@ -3965,6 +3965,7 @@
"Admin.Core.Repository": "1.0.0",
"Admin.Core.Service": "1.0.0",
"Admin.Core.Tasks": "1.0.0",
"Aucma.Core.Melsec": "1.0.0",
"Aucma.Core.Scanner": "1.0.0",
"Microsoft.AspNetCore.Authentication.JwtBearer": "5.0.9"
},
@ -4078,6 +4079,30 @@
"bin/placeholder/Admin.Core.Tasks.dll": {}
}
},
"Aucma.Core.Melsec/1.0.0": {
"type": "project",
"framework": ".NETCoreApp,Version=v6.0",
"dependencies": {
"Admin.Core.Common": "1.0.0",
"Aucma.Core.MelsecPLc": "1.0.0"
},
"compile": {
"bin/placeholder/Aucma.Core.Melsec.dll": {}
},
"runtime": {
"bin/placeholder/Aucma.Core.Melsec.dll": {}
}
},
"Aucma.Core.MelsecPLc/1.0.0": {
"type": "project",
"framework": ".NETStandard,Version=v2.1",
"compile": {
"bin/placeholder/Aucma.Core.MelsecPLc.dll": {}
},
"runtime": {
"bin/placeholder/Aucma.Core.MelsecPLc.dll": {}
}
},
"Aucma.Core.Scanner/1.0.0": {
"type": "project",
"framework": ".NETCoreApp,Version=v6.0",
@ -10922,6 +10947,16 @@
"path": "../Admin.Core.Tasks/Admin.Core.Tasks.csproj",
"msbuildProject": "../Admin.Core.Tasks/Admin.Core.Tasks.csproj"
},
"Aucma.Core.Melsec/1.0.0": {
"type": "project",
"path": "../Aucma.Core.Melsec/Aucma.Core.Melsec.csproj",
"msbuildProject": "../Aucma.Core.Melsec/Aucma.Core.Melsec.csproj"
},
"Aucma.Core.MelsecPLc/1.0.0": {
"type": "project",
"path": "../Aucma.Core.MelsecPLc/Aucma.Core.MelsecPLc.csproj",
"msbuildProject": "../Aucma.Core.MelsecPLc/Aucma.Core.MelsecPLc.csproj"
},
"Aucma.Core.Scanner/1.0.0": {
"type": "project",
"path": "../Aucma.Core.Scanner/Aucma.Core.Scanner.csproj",

@ -1,6 +1,6 @@
{
"version": 2,
"dgSpecHash": "VvMbnzQTe8M9loJsxxyooBP4dISZ7IDmqRtRCEPqwiFihGoSw2fFNSz6Tx4wEP4CN/QfGNu+W18L82/Z+88Sug==",
"dgSpecHash": "kguWVd+Rt9XCmLGjsnIAJvhdCtx7S0IM6fsfpPYk13tAS4xNtxRToY0BUWAg3XfGKtZldwcJdlbt/ecnaDR5Ow==",
"success": true,
"projectFilePath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Admin.Core.Api\\Admin.Core.Api.csproj",
"expectedPackageFiles": [

@ -20,6 +20,7 @@
<ProjectReference Include="..\Admin.Core.Repository\Admin.Core.Repository.csproj" />
<ProjectReference Include="..\Admin.Core.Service\Admin.Core.Service.csproj" />
<ProjectReference Include="..\Admin.Core.Tasks\Admin.Core.Tasks.csproj" />
<ProjectReference Include="..\Aucma.Core.Melsec\Aucma.Core.Melsec.csproj" />
<ProjectReference Include="..\Aucma.Core.Scanner\Aucma.Core.Scanner.csproj" />
</ItemGroup>

@ -0,0 +1,45 @@
using Admin.Core.Common;
using Admin.Core.IService.ISys;
using Admin.Core.Model.Sys;
using Admin.Core.Tasks;
using Aucma.Core.Melsec;
using Aucma.Core.Scanner;
using log4net;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using StackExchange.Profiling.Internal;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Admin.Core.Extensions
{
/// <summary>
///三菱PLC
/// </summary>
public static class MelsecMildd
{
private static readonly ILog log = LogManager.GetLogger(typeof(MelsecMildd));
public static async void UseMelsecMildd(this IApplicationBuilder app, IMelsecService melsec)
{
if (app == null) throw new ArgumentNullException(nameof(app));
try
{
if (Appsettings.app("Middleware", "Melsec", "Enabled").ObjToBool())
{
await melsec.StartMelsecAsync();
//if (result)
// Console.WriteLine("三菱PLC服务启动成功");
//else
// Console.WriteLine("三菱PLC服务启动失败");
}
}
catch (Exception e)
{
log.Error($"An error was reported when starting the job service.\n{e.Message}");
throw;
}
}
}
}

@ -0,0 +1,40 @@
using Admin.Core.Common;
using Admin.Core.Tasks;
using Aucma.Core.Melsec;
using Aucma.Core.Scanner;
using Microsoft.Extensions.DependencyInjection;
using Quartz;
using Quartz.Spi;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
namespace Admin.Core.Extensions
{
/// <summary>
/// 三菱PLC服务
/// </summary>
public static class MelsecSetup
{
public static void AddMelsecSetup(this IServiceCollection services)
{
services.AddSingleton<IMelsecService, MelsecService>();
var baseType = typeof(IMelsecService);
var path = AppDomain.CurrentDomain.RelativeSearchPath ?? AppDomain.CurrentDomain.BaseDirectory;
var referencedAssemblies = System.IO.Directory.GetFiles(path, "Aucma.Core.Melsec.dll").Select(Assembly.LoadFrom).ToArray();
var types = referencedAssemblies
.SelectMany(a => a.DefinedTypes)
.Select(type => type.AsType())
.Where(x => x != baseType && baseType.IsAssignableFrom(x)).ToArray();
var implementTypes = types.Where(x => x.IsClass).ToArray();
foreach (var implementType in implementTypes)
{
services.AddTransient(implementType);
}
}
}
}

@ -13,6 +13,7 @@
"Admin.Core.Repository": "1.0.0",
"Admin.Core.Service": "1.0.0",
"Admin.Core.Tasks": "1.0.0",
"Aucma.Core.Melsec": "1.0.0",
"Aucma.Core.Scanner": "1.0.0",
"Microsoft.AspNetCore.Authentication.JwtBearer": "5.0.9"
},
@ -2297,6 +2298,20 @@
"Admin.Core.Tasks.dll": {}
}
},
"Aucma.Core.Melsec/1.0.0": {
"dependencies": {
"Admin.Core.Common": "1.0.0",
"Aucma.Core.MelsecPLc": "1.0.0"
},
"runtime": {
"Aucma.Core.Melsec.dll": {}
}
},
"Aucma.Core.MelsecPLc/1.0.0": {
"runtime": {
"Aucma.Core.MelsecPLc.dll": {}
}
},
"Aucma.Core.Scanner/1.0.0": {
"dependencies": {
"Admin.Core.Common": "1.0.0",
@ -2313,6 +2328,14 @@
"fileVersion": "1.5.1.0"
}
}
},
"HslCommunication/11.0.6.0": {
"runtime": {
"HslCommunication.dll": {
"assemblyVersion": "11.0.6.0",
"fileVersion": "11.0.6.0"
}
}
}
}
},
@ -3851,6 +3874,16 @@
"serviceable": false,
"sha512": ""
},
"Aucma.Core.Melsec/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Aucma.Core.MelsecPLc/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Aucma.Core.Scanner/1.0.0": {
"type": "project",
"serviceable": false,
@ -3860,6 +3893,11 @@
"type": "reference",
"serviceable": false,
"sha512": ""
},
"HslCommunication/11.0.6.0": {
"type": "reference",
"serviceable": false,
"sha512": ""
}
}
}

@ -297,6 +297,9 @@
"D:\\Project\\gitea\\AUCMA\\SCADA\\Admin.Core.Tasks\\Admin.Core.Tasks.csproj": {
"projectPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Admin.Core.Tasks\\Admin.Core.Tasks.csproj"
},
"D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.Melsec\\Aucma.Core.Melsec.csproj": {
"projectPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.Melsec\\Aucma.Core.Melsec.csproj"
},
"D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.Scanner\\Aucma.Core.Scanner.csproj": {
"projectPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.Scanner\\Aucma.Core.Scanner.csproj"
}
@ -798,6 +801,123 @@
}
}
},
"D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.MelsecPLc\\Aucma.Core.MelsecPLc.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.MelsecPLc\\Aucma.Core.MelsecPLc.csproj",
"projectName": "Aucma.Core.MelsecPLc",
"projectPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.MelsecPLc\\Aucma.Core.MelsecPLc.csproj",
"packagesPath": "C:\\Users\\admin\\.nuget\\packages\\",
"outputPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.MelsecPLc\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\admin\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"netstandard2.1"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"netstandard2.1": {
"targetAlias": "netstandard2.1",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"netstandard2.1": {
"targetAlias": "netstandard2.1",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"NETStandard.Library": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.402\\RuntimeIdentifierGraph.json"
}
}
},
"D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.Melsec\\Aucma.Core.Melsec.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.Melsec\\Aucma.Core.Melsec.csproj",
"projectName": "Aucma.Core.Melsec",
"projectPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.Melsec\\Aucma.Core.Melsec.csproj",
"packagesPath": "C:\\Users\\admin\\.nuget\\packages\\",
"outputPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.Melsec\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\admin\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"net6.0"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"projectReferences": {
"D:\\Project\\gitea\\AUCMA\\SCADA\\Admin.Core.Common\\Admin.Core.Common.csproj": {
"projectPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Admin.Core.Common\\Admin.Core.Common.csproj"
},
"D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.MelsecPLc\\Aucma.Core.MelsecPLc.csproj": {
"projectPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.MelsecPLc\\Aucma.Core.MelsecPLc.csproj"
}
}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.402\\RuntimeIdentifierGraph.json"
}
}
},
"D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.Scanner\\Aucma.Core.Scanner.csproj": {
"version": "1.0.0",
"restore": {

@ -1 +1 @@
c221d2822946284c2428f8d8975a329248418d36
358ecef1634cd6433b092edf2ac53756aa06ac37

@ -365,3 +365,8 @@ D:\gitea\AUCMA\AUCMA_SCADA\Admin.Core.Extensions\obj\Debug\net6.0\ref\Admin.Core
D:\Project\gitea\AUCMA\SCADA\Admin.Core.Extensions\bin\Debug\net6.0\Aucma.Core.Scanner.dll
D:\Project\gitea\AUCMA\SCADA\Admin.Core.Extensions\bin\Debug\net6.0\MvCodeReaderSDK.Net.dll
D:\Project\gitea\AUCMA\SCADA\Admin.Core.Extensions\bin\Debug\net6.0\Aucma.Core.Scanner.pdb
D:\Project\gitea\AUCMA\SCADA\Admin.Core.Extensions\bin\Debug\net6.0\Aucma.Core.Melsec.dll
D:\Project\gitea\AUCMA\SCADA\Admin.Core.Extensions\bin\Debug\net6.0\Aucma.Core.MelsecPLc.dll
D:\Project\gitea\AUCMA\SCADA\Admin.Core.Extensions\bin\Debug\net6.0\HslCommunication.dll
D:\Project\gitea\AUCMA\SCADA\Admin.Core.Extensions\bin\Debug\net6.0\Aucma.Core.Melsec.pdb
D:\Project\gitea\AUCMA\SCADA\Admin.Core.Extensions\bin\Debug\net6.0\Aucma.Core.MelsecPLc.pdb

@ -3982,6 +3982,30 @@
"bin/placeholder/Admin.Core.Tasks.dll": {}
}
},
"Aucma.Core.Melsec/1.0.0": {
"type": "project",
"framework": ".NETCoreApp,Version=v6.0",
"dependencies": {
"Admin.Core.Common": "1.0.0",
"Aucma.Core.MelsecPLc": "1.0.0"
},
"compile": {
"bin/placeholder/Aucma.Core.Melsec.dll": {}
},
"runtime": {
"bin/placeholder/Aucma.Core.Melsec.dll": {}
}
},
"Aucma.Core.MelsecPLc/1.0.0": {
"type": "project",
"framework": ".NETStandard,Version=v2.1",
"compile": {
"bin/placeholder/Aucma.Core.MelsecPLc.dll": {}
},
"runtime": {
"bin/placeholder/Aucma.Core.MelsecPLc.dll": {}
}
},
"Aucma.Core.Scanner/1.0.0": {
"type": "project",
"framework": ".NETCoreApp,Version=v6.0",
@ -10725,6 +10749,16 @@
"path": "../Admin.Core.Tasks/Admin.Core.Tasks.csproj",
"msbuildProject": "../Admin.Core.Tasks/Admin.Core.Tasks.csproj"
},
"Aucma.Core.Melsec/1.0.0": {
"type": "project",
"path": "../Aucma.Core.Melsec/Aucma.Core.Melsec.csproj",
"msbuildProject": "../Aucma.Core.Melsec/Aucma.Core.Melsec.csproj"
},
"Aucma.Core.MelsecPLc/1.0.0": {
"type": "project",
"path": "../Aucma.Core.MelsecPLc/Aucma.Core.MelsecPLc.csproj",
"msbuildProject": "../Aucma.Core.MelsecPLc/Aucma.Core.MelsecPLc.csproj"
},
"Aucma.Core.Scanner/1.0.0": {
"type": "project",
"path": "../Aucma.Core.Scanner/Aucma.Core.Scanner.csproj",
@ -10738,6 +10772,7 @@
"Admin.Core.Repository >= 1.0.0",
"Admin.Core.Service >= 1.0.0",
"Admin.Core.Tasks >= 1.0.0",
"Aucma.Core.Melsec >= 1.0.0",
"Aucma.Core.Scanner >= 1.0.0",
"Microsoft.AspNetCore.Authentication.JwtBearer >= 5.0.9"
]
@ -10784,6 +10819,9 @@
"D:\\Project\\gitea\\AUCMA\\SCADA\\Admin.Core.Tasks\\Admin.Core.Tasks.csproj": {
"projectPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Admin.Core.Tasks\\Admin.Core.Tasks.csproj"
},
"D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.Melsec\\Aucma.Core.Melsec.csproj": {
"projectPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.Melsec\\Aucma.Core.Melsec.csproj"
},
"D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.Scanner\\Aucma.Core.Scanner.csproj": {
"projectPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.Scanner\\Aucma.Core.Scanner.csproj"
}

@ -1,6 +1,6 @@
{
"version": 2,
"dgSpecHash": "CWepDfyn6WjxMKVPMl0wqs+tNivKASajEzzZ6AiX12KTQrIUbcTj7HBOG3bUMhJnPRRA88ARRLNJEfic3vs0Lw==",
"dgSpecHash": "32HX9OehfURuSDm9ZMCPvghxCqC7OsS+LqIae6prtI8hbJQEUw5HlZL6XoLN0R5s0yjj9Sue5UPZSWzgkJWHHQ==",
"success": true,
"projectFilePath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Admin.Core.Extensions\\Admin.Core.Extensions.csproj",
"expectedPackageFiles": [

@ -1 +1 @@
de807fb807db12dabd51b95af540d2e1f70498fd
634ba6720c50c833fa99e3d03628d9ec3cab93d4

@ -35,6 +35,7 @@
<ItemGroup>
<ProjectReference Include="..\Admin.Core.Extensions\Admin.Core.Extensions.csproj" />
<ProjectReference Include="..\Aucma.Core.Melsec\Aucma.Core.Melsec.csproj" />
</ItemGroup>
<ItemGroup>

@ -6,6 +6,8 @@ using Admin.Core.IService.ISys;
using Admin.Core.Repository;
using Admin.Core.Service;
using Admin.Core.Tasks;
using Aucma.Core.Melsec;
using Aucma.Core.MelsecPLc;
using Aucma.Core.Scanner;
using Autofac;
using Microsoft.AspNetCore.Builder;
@ -62,7 +64,9 @@ namespace Admin.Core.RealTimeService
//任务调度
//services.AddJobSetup();
//扫码器
services.AddScannerSetup();
//services.AddScannerSetup();
//ÈýÁâPLC
services.AddMelsecSetup();
//支持编码大全 例如:支持 System.Text.Encoding.GetEncoding("GB2312") System.Text.Encoding.GetEncoding("GB18030")
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
}
@ -83,14 +87,17 @@ namespace Admin.Core.RealTimeService
/// </summary>
/// <param name="app"></param>
/// <param name="env"></param>
public void Configure(IApplicationBuilder app,IScannerService scannerService)
public void Configure(IApplicationBuilder app,
IMelsecService melsecService)//IScannerService scannerService,
{
// 使用静态文件
app.UseStaticFiles();
// 开启QuartzNetJob调度服务
// app.UseQuartzJobMildd(tasksQzService, schedulerCenter);
//开启扫码服务
app.UseScannerMildd(scannerService);
//app.UseScannerMildd(scannerService);
//ÈýÁâPLC
app.UseMelsecMildd(melsecService);
}
#region 注册服务
@ -101,6 +108,8 @@ namespace Admin.Core.RealTimeService
private static void AddServices(IServiceCollection services)
{
#region 注册服务
services.AddScoped<IMelsecPlc, MelsecPlc>();
//services.AddScoped<IProductOrderInfoServices, ProductOrderInfoServices>();
//services.AddScoped<IProductOrderInfoRepository, ProductOrderInfoRepository>();
//services.AddScoped<IBaseRepository<EEquipmentCategory>, BaseRepository<EEquipmentCategory>>();

@ -166,6 +166,11 @@
},
"Scanner": { //
"Enabled": true
},
"Melsec": {
"ConString": "127.0.0.1",
"Port": 6000,
"Enabled": true
}
},
"IpRateLimiting": {

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save