Browse Source

1.异常排查
2.增加web管理页面。

Klosszhu 3 years ago
parent
commit
edc580983b
100 changed files with 4619 additions and 109 deletions
  1. BIN
      .vs/Fine.OPCDaClient/DesignTimeBuild/.dtbcache.v2
  2. BIN
      .vs/Fine.OPCDaClient/FileContentIndex/5a7b8601-75e2-4135-8a84-2e4298a8941f.vsidx
  3. BIN
      .vs/Fine.OPCDaClient/FileContentIndex/6714cc2c-cb1b-4e89-b219-e05ddb32a549.vsidx
  4. BIN
      .vs/Fine.OPCDaClient/FileContentIndex/86b418f6-9580-4528-b7d6-b922030dc4fc.vsidx
  5. BIN
      .vs/Fine.OPCDaClient/FileContentIndex/9b754217-a12b-4c3d-8911-b7b44a72921e.vsidx
  6. BIN
      .vs/Fine.OPCDaClient/FileContentIndex/9ff40715-9150-4e18-97e4-c7e63c540857.vsidx
  7. BIN
      .vs/Fine.OPCDaClient/FileContentIndex/afcb8924-92c4-4f09-985c-cdffe74237d4.vsidx
  8. BIN
      .vs/Fine.OPCDaClient/FileContentIndex/d16799c4-6cc4-47bd-8a10-c368aeb1dbed.vsidx
  9. BIN
      .vs/Fine.OPCDaClient/FileContentIndex/merges/1431a83e-896d-4d9a-836a-7766c50b3978.vsidx
  10. 1016 0
      .vs/Fine.OPCDaClient/config/applicationhost.config
  11. BIN
      .vs/Fine.OPCDaClient/v17/.futdcache.v1
  12. BIN
      .vs/Fine.OPCDaClient/v17/HierarchyCache.v1.txt
  13. BIN
      .vs/Fine.OPCDaClient/v17/fileList.bin
  14. BIN
      .vs/ProjectEvaluation/fine.opcdaclient.metadata.v2
  15. BIN
      .vs/ProjectEvaluation/fine.opcdaclient.projects.v2
  16. 1 1
      Fine.HttpServer/HttpServer.cs
  17. 1 0
      Fine.HttpServer/obj/Release/_IsIncrementalBuild
  18. 1 0
      Fine.IHttpServer/obj/Debug/Fine.IHttpServer.csproj.FileListAbsolute.txt
  19. 1 0
      Fine.IHttpServer/obj/Release/Fine.IHttpServer.csproj.FileListAbsolute.txt
  20. 1 0
      Fine.IHttpServer/obj/Release/_IsIncrementalBuild
  21. 1 0
      Fine.MQTT/obj/Release/_IsIncrementalBuild
  22. 58 2
      Fine.OPCDaClient.sln
  23. 4 0
      Fine.OPCDaClient9000/App/Common/AppUtil.cs
  24. 7 2
      Fine.OPCDaClient9000/App/IHttpMethod.cs
  25. 47 16
      Fine.OPCDaClient9000/ConfigForm.cs
  26. 7 4
      Fine.OPCDaClient9000/Fine.OPCDaClient9000.csproj
  27. 22 22
      Fine.OPCDaClient9000/TestForm.Designer.cs
  28. 71 16
      Fine.OPCDaClient9000/TestForm.cs
  29. 0 0
      Fine.OPCDaClient9000/bin/Debug/Fine.AllInOne.exe.config
  30. 90 0
      Fine.OPCDaClient9000/bin/Debug/config/Router/5K单机/5K单机.json
  31. 3 3
      Fine.OPCDaClient9000/bin/Debug/config/Router/9000/9000回潮.json
  32. 44 0
      Fine.OPCDaClient9000/bin/Debug/config/Router/白肋烟/出柜段_Post.json
  33. 47 4
      Fine.OPCDaClient9000/bin/Debug/config/Router/白肋烟/加表料_Get.json
  34. 55 7
      Fine.OPCDaClient9000/bin/Debug/config/Router/白肋烟/加表料_Post.json
  35. 4 4
      Fine.OPCDaClient9000/bin/Debug/config/Router/白肋烟/加里料_Get.json
  36. 16 8
      Fine.OPCDaClient9000/bin/Debug/config/Router/白肋烟/加里料_Post.json
  37. 6 2
      Fine.OPCDaClient9000/bin/Debug/config/Router/白肋烟/进柜段_Post.json
  38. 1 1
      Fine.OPCDaClient9000/bin/Debug/config/httpserver.json
  39. 90 0
      Fine.OPCDaClient9000/config/Router/5K单机/5K单机.json
  40. 3 3
      Fine.OPCDaClient9000/config/Router/9000/9000回潮.json
  41. 1 1
      Fine.OPCDaClient9000/config/httpserver.json
  42. 7 5
      Fine.OPCDaClient9000/obj/Debug/Fine.OPCDaClient9000.csproj.FileListAbsolute.txt
  43. BIN
      Fine.OPCDaClient9000/obj/Release/Fine.OPCDaClient9000.ConfigForm.resources
  44. BIN
      Fine.OPCDaClient9000/obj/Release/Fine.OPCDaClient9000.TestForm.resources
  45. 30 7
      Fine.OPCDaClient9000/obj/Release/Fine.OPCDaClient9000.csproj.FileListAbsolute.txt
  46. 1 0
      Fine.OPCDaClient9000/obj/Release/_IsIncrementalBuild
  47. 150 0
      Fine.OPCDaClientAI/App.config
  48. 115 0
      Fine.OPCDaClientAI/App/AppHandle.cs
  49. 68 0
      Fine.OPCDaClientAI/App/BaseService.cs
  50. 600 0
      Fine.OPCDaClientAI/App/Common/AppUtil.cs
  51. 150 0
      Fine.OPCDaClientAI/App/ItemService.cs
  52. 90 0
      Fine.OPCDaClientAI/App/MachineService.cs
  53. 471 0
      Fine.OPCDaClientAI/DAServerMgr.cs
  54. 58 0
      Fine.OPCDaClientAI/DataItem.cs
  55. 88 0
      Fine.OPCDaClientAI/DataMode/IoModal.cs
  56. 75 0
      Fine.OPCDaClientAI/DataMode/RetMsg.cs
  57. 12 0
      Fine.OPCDaClientAI/DbContext/SqlDbContext.cs
  58. 28 0
      Fine.OPCDaClientAI/DbContext/SqlServerDbContext.cs
  59. 20 0
      Fine.OPCDaClientAI/Entitys/TechParam.cs
  60. 26 0
      Fine.OPCDaClientAI/Entitys/WorkOrder.cs
  61. 179 0
      Fine.OPCDaClientAI/Fine.OPCDaClientAI.csproj
  62. 280 0
      Fine.OPCDaClientAI/Form1.Designer.cs
  63. 235 0
      Fine.OPCDaClientAI/Form1.cs
  64. 123 0
      Fine.OPCDaClientAI/Form1.resx
  65. 15 0
      Fine.OPCDaClientAI/OPCHelper.cs
  66. 47 0
      Fine.OPCDaClientAI/Program.cs
  67. 36 0
      Fine.OPCDaClientAI/Properties/AssemblyInfo.cs
  68. 32 0
      Fine.OPCDaClientAI/ServerConfig.cs
  69. 22 0
      Fine.OPCDaClientAI/Tool/MyTool.cs
  70. 49 0
      Fine.OPCDaClientAI/Util/Enumic.cs
  71. 14 1
      Fine.OPCDaClient9000/bin/Release/Fine.OPCDaClient9000.exe.config
  72. 0 0
      Fine.OPCDaClientAI/bin/Debug/MQTTnet.xml
  73. 0 0
      Fine.OPCDaClientAI/bin/Debug/Microsoft.Bcl.AsyncInterfaces.xml
  74. 0 0
      Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Caching.Abstractions.xml
  75. 0 0
      Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Caching.Memory.xml
  76. 0 0
      Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Configuration.Abstractions.xml
  77. 0 0
      Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Configuration.Binder.xml
  78. 0 0
      Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Configuration.CommandLine.xml
  79. 0 0
      Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Configuration.EnvironmentVariables.xml
  80. 0 0
      Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Configuration.FileExtensions.xml
  81. 0 0
      Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Configuration.Json.xml
  82. 0 0
      Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Configuration.UserSecrets.xml
  83. 0 0
      Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Configuration.xml
  84. 0 0
      Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.DependencyInjection.Abstractions.xml
  85. 0 0
      Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.DependencyInjection.xml
  86. 0 0
      Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.FileProviders.Abstractions.xml
  87. 0 0
      Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.FileProviders.Physical.xml
  88. 0 0
      Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.FileSystemGlobbing.xml
  89. 0 0
      Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Hosting.Abstractions.xml
  90. 0 0
      Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Hosting.xml
  91. 0 0
      Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Logging.Abstractions.xml
  92. 0 0
      Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Logging.Configuration.xml
  93. 0 0
      Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Logging.Console.xml
  94. 0 0
      Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Logging.Debug.xml
  95. 0 0
      Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Logging.EventLog.xml
  96. 0 0
      Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Logging.EventSource.xml
  97. 0 0
      Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Logging.xml
  98. 0 0
      Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Options.ConfigurationExtensions.xml
  99. 0 0
      Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Options.xml
  100. 0 0
      Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.Primitives.xml

BIN
.vs/Fine.OPCDaClient/DesignTimeBuild/.dtbcache.v2


BIN
.vs/Fine.OPCDaClient/FileContentIndex/5a7b8601-75e2-4135-8a84-2e4298a8941f.vsidx


BIN
.vs/Fine.OPCDaClient/FileContentIndex/6714cc2c-cb1b-4e89-b219-e05ddb32a549.vsidx


BIN
.vs/Fine.OPCDaClient/FileContentIndex/86b418f6-9580-4528-b7d6-b922030dc4fc.vsidx


BIN
.vs/Fine.OPCDaClient/FileContentIndex/9b754217-a12b-4c3d-8911-b7b44a72921e.vsidx


BIN
.vs/Fine.OPCDaClient/FileContentIndex/9ff40715-9150-4e18-97e4-c7e63c540857.vsidx


BIN
.vs/Fine.OPCDaClient/FileContentIndex/afcb8924-92c4-4f09-985c-cdffe74237d4.vsidx


BIN
.vs/Fine.OPCDaClient/FileContentIndex/d16799c4-6cc4-47bd-8a10-c368aeb1dbed.vsidx


BIN
.vs/Fine.OPCDaClient/FileContentIndex/merges/1431a83e-896d-4d9a-836a-7766c50b3978.vsidx


File diff suppressed because it is too large
+ 1016 - 0
.vs/Fine.OPCDaClient/config/applicationhost.config


BIN
.vs/Fine.OPCDaClient/v17/.futdcache.v1


BIN
.vs/Fine.OPCDaClient/v17/HierarchyCache.v1.txt


BIN
.vs/Fine.OPCDaClient/v17/fileList.bin


BIN
.vs/ProjectEvaluation/fine.opcdaclient.metadata.v2


BIN
.vs/ProjectEvaluation/fine.opcdaclient.projects.v2


+ 1 - 1
Fine.HttpServer/HttpServer.cs

@@ -163,7 +163,7 @@ namespace Fine.HttpServer
             catch
             {
                 LogUtil.WriteLog("网络连接异常,服务将重启" + stime);
-                this.Start();
+              
             }
 
         }

+ 1 - 0
Fine.HttpServer/obj/Release/_IsIncrementalBuild

@@ -0,0 +1 @@
+obj\Release\\_IsIncrementalBuild

+ 1 - 0
Fine.IHttpServer/obj/Debug/Fine.IHttpServer.csproj.FileListAbsolute.txt

@@ -33,6 +33,7 @@ E:\远舢智能\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.IHt
 E:\远舢智能\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.IHttpServer\obj\Debug\Fine.IHttpServer.pdb
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.IHttpServer\bin\Debug\Fine.IHttpServer.dll
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.IHttpServer\bin\Debug\Fine.IHttpServer.pdb
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.IHttpServer\obj\Debug\Fine.IHttpServer.csproj.AssemblyReference.cache
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.IHttpServer\obj\Debug\Fine.IHttpServer.csproj.CoreCompileInputs.cache
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.IHttpServer\obj\Debug\Fine.IHttpServer.dll
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.IHttpServer\obj\Debug\Fine.IHttpServer.pdb

+ 1 - 0
Fine.IHttpServer/obj/Release/Fine.IHttpServer.csproj.FileListAbsolute.txt

@@ -6,6 +6,7 @@ E:\ys\Fine.OPCDaClient1027_vs2019\Fine.IHttpServer\obj\Release\Fine.IHttpServer.
 E:\ys\Fine.OPCDaClient1027_vs2019\Fine.IHttpServer\obj\Release\Fine.IHttpServer.pdb
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.IHttpServer\bin\Release\Fine.IHttpServer.dll
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.IHttpServer\bin\Release\Fine.IHttpServer.pdb
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.IHttpServer\obj\Release\Fine.IHttpServer.csproj.AssemblyReference.cache
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.IHttpServer\obj\Release\Fine.IHttpServer.csproj.CoreCompileInputs.cache
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.IHttpServer\obj\Release\Fine.IHttpServer.dll
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.IHttpServer\obj\Release\Fine.IHttpServer.pdb

+ 1 - 0
Fine.IHttpServer/obj/Release/_IsIncrementalBuild

@@ -0,0 +1 @@
+obj\Release\\_IsIncrementalBuild

+ 1 - 0
Fine.MQTT/obj/Release/_IsIncrementalBuild

@@ -0,0 +1 @@
+obj\Release\\_IsIncrementalBuild

+ 58 - 2
Fine.OPCDaClient.sln

@@ -1,7 +1,7 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.32802.440
+# Visual Studio Version 17
+VisualStudioVersion = 17.2.32616.157
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsFormsApp1", "WindowsFormsApp1\WindowsFormsApp1.csproj", "{398B72DE-8187-41EB-8AA7-F74EC06213AB}"
 EndProject
@@ -37,6 +37,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fine.OPCDaClient5000", "Fin
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fine.OPCDaClient3000", "Fine.OPCDaClient3000\Fine.OPCDaClient3000.csproj", "{67AD0DC2-6793-4ADF-B2A3-6026F52139C5}"
 EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "YS.Smart.Admin", "YS.Smart.Admin\YS.Smart.Admin.csproj", "{BCD47B40-2879-4A32-87E3-86B2E652851B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "YS.Start.AdminLine", "YS.Start.AdminLine\YS.Start.AdminLine.csproj", "{5B638DA4-DF4A-4B09-A734-5F081346E1F6}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fine.OPCDaClientAI", "Fine.OPCDaClientAI\Fine.OPCDaClientAI.csproj", "{60BE333D-E007-4BE6-AD1B-A3C5272508E5}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fine.OPCDaClientAINew", "Fine.OPCDaClientAI_New\Fine.OPCDaClientAINew.csproj", "{93572676-74A9-4077-8ACA-C44ED4E8764A}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -239,6 +247,54 @@ Global
 		{67AD0DC2-6793-4ADF-B2A3-6026F52139C5}.Release|x64.Build.0 = Release|Any CPU
 		{67AD0DC2-6793-4ADF-B2A3-6026F52139C5}.Release|x86.ActiveCfg = Release|Any CPU
 		{67AD0DC2-6793-4ADF-B2A3-6026F52139C5}.Release|x86.Build.0 = Release|Any CPU
+		{BCD47B40-2879-4A32-87E3-86B2E652851B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{BCD47B40-2879-4A32-87E3-86B2E652851B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{BCD47B40-2879-4A32-87E3-86B2E652851B}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{BCD47B40-2879-4A32-87E3-86B2E652851B}.Debug|x64.Build.0 = Debug|Any CPU
+		{BCD47B40-2879-4A32-87E3-86B2E652851B}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{BCD47B40-2879-4A32-87E3-86B2E652851B}.Debug|x86.Build.0 = Debug|Any CPU
+		{BCD47B40-2879-4A32-87E3-86B2E652851B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{BCD47B40-2879-4A32-87E3-86B2E652851B}.Release|Any CPU.Build.0 = Release|Any CPU
+		{BCD47B40-2879-4A32-87E3-86B2E652851B}.Release|x64.ActiveCfg = Release|Any CPU
+		{BCD47B40-2879-4A32-87E3-86B2E652851B}.Release|x64.Build.0 = Release|Any CPU
+		{BCD47B40-2879-4A32-87E3-86B2E652851B}.Release|x86.ActiveCfg = Release|Any CPU
+		{BCD47B40-2879-4A32-87E3-86B2E652851B}.Release|x86.Build.0 = Release|Any CPU
+		{5B638DA4-DF4A-4B09-A734-5F081346E1F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{5B638DA4-DF4A-4B09-A734-5F081346E1F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{5B638DA4-DF4A-4B09-A734-5F081346E1F6}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{5B638DA4-DF4A-4B09-A734-5F081346E1F6}.Debug|x64.Build.0 = Debug|Any CPU
+		{5B638DA4-DF4A-4B09-A734-5F081346E1F6}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{5B638DA4-DF4A-4B09-A734-5F081346E1F6}.Debug|x86.Build.0 = Debug|Any CPU
+		{5B638DA4-DF4A-4B09-A734-5F081346E1F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{5B638DA4-DF4A-4B09-A734-5F081346E1F6}.Release|Any CPU.Build.0 = Release|Any CPU
+		{5B638DA4-DF4A-4B09-A734-5F081346E1F6}.Release|x64.ActiveCfg = Release|Any CPU
+		{5B638DA4-DF4A-4B09-A734-5F081346E1F6}.Release|x64.Build.0 = Release|Any CPU
+		{5B638DA4-DF4A-4B09-A734-5F081346E1F6}.Release|x86.ActiveCfg = Release|Any CPU
+		{5B638DA4-DF4A-4B09-A734-5F081346E1F6}.Release|x86.Build.0 = Release|Any CPU
+		{60BE333D-E007-4BE6-AD1B-A3C5272508E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{60BE333D-E007-4BE6-AD1B-A3C5272508E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{60BE333D-E007-4BE6-AD1B-A3C5272508E5}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{60BE333D-E007-4BE6-AD1B-A3C5272508E5}.Debug|x64.Build.0 = Debug|Any CPU
+		{60BE333D-E007-4BE6-AD1B-A3C5272508E5}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{60BE333D-E007-4BE6-AD1B-A3C5272508E5}.Debug|x86.Build.0 = Debug|Any CPU
+		{60BE333D-E007-4BE6-AD1B-A3C5272508E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{60BE333D-E007-4BE6-AD1B-A3C5272508E5}.Release|Any CPU.Build.0 = Release|Any CPU
+		{60BE333D-E007-4BE6-AD1B-A3C5272508E5}.Release|x64.ActiveCfg = Release|Any CPU
+		{60BE333D-E007-4BE6-AD1B-A3C5272508E5}.Release|x64.Build.0 = Release|Any CPU
+		{60BE333D-E007-4BE6-AD1B-A3C5272508E5}.Release|x86.ActiveCfg = Release|Any CPU
+		{60BE333D-E007-4BE6-AD1B-A3C5272508E5}.Release|x86.Build.0 = Release|Any CPU
+		{93572676-74A9-4077-8ACA-C44ED4E8764A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{93572676-74A9-4077-8ACA-C44ED4E8764A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{93572676-74A9-4077-8ACA-C44ED4E8764A}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{93572676-74A9-4077-8ACA-C44ED4E8764A}.Debug|x64.Build.0 = Debug|Any CPU
+		{93572676-74A9-4077-8ACA-C44ED4E8764A}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{93572676-74A9-4077-8ACA-C44ED4E8764A}.Debug|x86.Build.0 = Debug|Any CPU
+		{93572676-74A9-4077-8ACA-C44ED4E8764A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{93572676-74A9-4077-8ACA-C44ED4E8764A}.Release|Any CPU.Build.0 = Release|Any CPU
+		{93572676-74A9-4077-8ACA-C44ED4E8764A}.Release|x64.ActiveCfg = Release|Any CPU
+		{93572676-74A9-4077-8ACA-C44ED4E8764A}.Release|x64.Build.0 = Release|Any CPU
+		{93572676-74A9-4077-8ACA-C44ED4E8764A}.Release|x86.ActiveCfg = Release|Any CPU
+		{93572676-74A9-4077-8ACA-C44ED4E8764A}.Release|x86.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 4 - 0
Fine.OPCDaClient9000/App/Common/AppUtil.cs

@@ -383,6 +383,10 @@ namespace Fine.OPCDaClient9000.Util
                     DataItem dataItem = null;
                     if (AppUtil.DataItemQueue.TryGetValue(item.TagAddress, out dataItem))
                     {
+                        if (item.Value==null)
+                        {
+                            item.Value = "";
+                        }
                         if (item.Value.ToString() == dataItem.Value.ToString())
                         {
                             result.Add(true);

+ 7 - 2
Fine.OPCDaClient9000/App/IHttpMethod.cs

@@ -5,6 +5,9 @@ using System.Text;
 using System.IO;
 using System.Net;
 using System.Net.Http;
+using Newtonsoft.Json;
+using Fine.OPCDaClient9000.App;
+using Fine.IHttpServer;
 
 namespace FaceppSDK
 {
@@ -45,9 +48,10 @@ namespace FaceppSDK
                     reader.Close();
                 }
             }
-            catch (Exception)
+            catch (Exception ext)
             {
                 Console.WriteLine("api 访问错误");
+                return JsonConvert.SerializeObject(new HttpResult {  Error = ext.Message,  Success = false });
             }
             finally
             {
@@ -89,9 +93,10 @@ namespace FaceppSDK
                     reader.Close();
                 }
             }
-            catch (Exception)
+            catch (Exception ext)
             {
                 Console.WriteLine("api 访问错误");
+                return JsonConvert.SerializeObject(new HttpResult { Error = ext.Message,  Success  = false });
             }
             finally
             {

+ 47 - 16
Fine.OPCDaClient9000/ConfigForm.cs

@@ -90,6 +90,15 @@ namespace Fine.OPCDaClient9000
             Dictionary<string, List<IoModal>> result = new Dictionary<string, List<IoModal>>();
             if (checkBox1.Checked)
             {
+                var apiNoTag = AppUtil.newsConfig.Where(a => a.Data.Any(b => b.Params.Any(c => c.keys.Any(d =>d.WriteTagName==null||d.CheckTagName==null || d.WriteTagName.Contains(" ")
+                || d.CheckTagName.Contains(" ")||string.IsNullOrWhiteSpace( d.WriteTagName)||string.IsNullOrWhiteSpace( d.WriteTagName)
+                )))).Select(a=>a.path);
+                if (apiNoTag.Count()>0)
+                {
+                    MessageBox.Show(String.Join("\n", apiNoTag.Select(a => a)));
+                    return;
+                }
+             
                 var apis = AppUtil.newsConfig.Where(a => a.Data.Any(n => n.Params.Any(c => c.keys.Any(d => d.WriteTagName.ToLower().Contains(textBox1.Text.ToLower())))) || a.Data.Any(n => n.Params.Any(c => c.keys.Any(d => d.WriteTagName.ToLower().Contains(textBox1.Text.ToLower()))))).ToList();
                 foreach (var item in apis)
                 {
@@ -220,8 +229,28 @@ namespace Fine.OPCDaClient9000
                                     Content = api.接口备注
                                 };
                                 var getwriteandgetkey = new List<WriteAndCheckKey>();
-                                string[] writes = string.IsNullOrEmpty(api.写入点位) ? null : api.写入点位.Split('/');
-                                string[] checks = string.IsNullOrEmpty(api.检查点位) ? null : api.检查点位.Split('/');
+
+                                if (string.IsNullOrEmpty(api.写入点位))
+                                {
+                                    textBox5.Text += api.Api名称 + "异常";
+                                    textBox5.Update();
+                                    continue;
+                                }
+                                string[] writes;
+                                string[] checks;
+
+                                if (api.写入点位.Contains("\n"))
+                                {
+                                    writes = string.IsNullOrEmpty(api.写入点位) ? null : api.写入点位.Split('\n');
+                                    checks = string.IsNullOrEmpty(api.检查点位) ? null : api.检查点位.Split('\n');
+                                }
+                                else 
+                                {
+                                    writes = string.IsNullOrEmpty(api.写入点位) ? null : api.写入点位.Split('/');
+                                    checks = string.IsNullOrEmpty(api.检查点位) ? null : api.检查点位.Split('/');
+                                }
+
+                               
                                 for (int i = 0; i < writes.Length; i++)
                                 {
                                     var moda = new WriteAndCheckKey();
@@ -296,12 +325,12 @@ namespace Fine.OPCDaClient9000
                                     if (checks != null)
                                     {
                                         //var c = checks[i].Trim().Split('=');
-                                        moda.CheckTagName = checks[0];
+                                        moda.CheckTagName = checks[0].Trim();
 
                                     }
                                     else
                                     {
-                                        moda.CheckTagName = writes[0];
+                                        moda.CheckTagName = writes[0].Trim();
                                     }
                                     getwriteandgetkey.Add(moda);
                                     var moda2 = new WriteAndCheckKey() { InputName = "BranchNo" };
@@ -310,12 +339,12 @@ namespace Fine.OPCDaClient9000
                                     if (checks != null)
                                     {
                                         //var c = checks[i].Trim().Split('=');
-                                        moda2.CheckTagName = checks[1];
+                                        moda2.CheckTagName = checks[1].Trim();
 
                                     }
                                     else
                                     {
-                                        moda2.CheckTagName = writes[1];
+                                        moda2.CheckTagName = writes[1].Trim();
                                     }
 
                                     getwriteandgetkey.Add(moda2);
@@ -325,12 +354,12 @@ namespace Fine.OPCDaClient9000
                                     if (checks != null)
                                     {
                                         //var c = checks[i].Trim().Split('=');
-                                        moda3.CheckTagName = checks[2];
+                                        moda3.CheckTagName = checks[2].Trim();
 
                                     }
                                     else
                                     {
-                                        moda3.CheckTagName = writes[2];
+                                        moda3.CheckTagName = writes[2].Trim();
                                     }
 
                                     getwriteandgetkey.Add(moda3);
@@ -351,26 +380,26 @@ namespace Fine.OPCDaClient9000
                                     if (checks != null)
                                     {
                                         //var c = checks[i].Trim().Split('=');
-                                        moda.CheckTagName = checks[0];
+                                        moda.CheckTagName = checks[0].Trim();
 
                                     }
                                     else
                                     {
-                                        moda.CheckTagName = writes[0];
+                                        moda.CheckTagName = writes[0].Trim();
                                     }
                                     getwriteandgetkey.Add(moda);
-                                    var moda2 = new WriteAndCheckKey() { InputName = "BranchNum" };
+                                    var moda2 = new WriteAndCheckKey() { InputName = "BatchNum" };
 
                                     moda2.WriteTagName = writes[1].Trim();
                                     if (checks != null)
                                     {
                                         //var c = checks[i].Trim().Split('=');
-                                        moda2.CheckTagName = checks[1];
+                                        moda2.CheckTagName = checks[1].Trim();
 
                                     }
                                     else
                                     {
-                                        moda2.CheckTagName = writes[1];
+                                        moda2.CheckTagName = writes[1].Trim();
                                     }
 
                                     getwriteandgetkey.Add(moda2);
@@ -380,12 +409,12 @@ namespace Fine.OPCDaClient9000
                                     if (checks != null)
                                     {
                                         //var c = checks[i].Trim().Split('=');
-                                        moda3.CheckTagName = checks[2];
+                                        moda3.CheckTagName = checks[2].Trim();
 
                                     }
                                     else
                                     {
-                                        moda3.CheckTagName = writes[2];
+                                        moda3.CheckTagName = writes[2].Trim();
                                     }
 
                                     getwriteandgetkey.Add(moda3);
@@ -439,7 +468,8 @@ namespace Fine.OPCDaClient9000
                                         var chks = reads == null ? null : reads[i].Split('/');
 
                                         var wc = new WriteAndCheckKey();
-                                        wc.InputName = "BranchNum";
+                                        wc.InputName = "BatchNum";
+                                        wc.WriteTagName = wrts[0].Trim();
                                         if (chks != null)
                                         {
                                             wc.CheckTagName = chks[0].Trim();
@@ -454,6 +484,7 @@ namespace Fine.OPCDaClient9000
 
                                         var wc1 = new WriteAndCheckKey();
                                         wc1.InputName = "BrandNum";
+                                        wc1.WriteTagName = wrts[1].Trim();
                                         if (chks != null)
                                         {
                                             wc1.CheckTagName = chks[1].Trim();

+ 7 - 4
Fine.OPCDaClient9000/Fine.OPCDaClient9000.csproj

@@ -5,9 +5,9 @@
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
     <ProjectGuid>{8A918CE3-C39E-47DB-8E63-680F7777ACB3}</ProjectGuid>
-    <OutputType>WinExe</OutputType>
-    <RootNamespace>Fine.OPCDaClient9000</RootNamespace>
-    <AssemblyName>Fine.OPCDaClient9000</AssemblyName>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>Fine.AllInOne</RootNamespace>
+    <AssemblyName>Fine.AllInOne</AssemblyName>
     <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
@@ -36,7 +36,7 @@
     <OutputPath>bin\Debug\</OutputPath>
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
+    <WarningLevel>0</WarningLevel>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <PlatformTarget>AnyCPU</PlatformTarget>
@@ -161,6 +161,9 @@
     <None Include="config\Router\3000_add\L3KYPJYG_POST.json">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </None>
+    <None Include="config\Router\5K单机\5K单机.json">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
     <None Include="config\Router\9000\9000加料.json">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </None>

+ 22 - 22
Fine.OPCDaClient9000/TestForm.Designer.cs

@@ -34,6 +34,8 @@ namespace Fine.OPCDaClient9000
             this.label1 = new System.Windows.Forms.Label();
             this.richTextBox3 = new System.Windows.Forms.RichTextBox();
             this.groupBox2 = new System.Windows.Forms.GroupBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.button2 = new System.Windows.Forms.Button();
             this.button1 = new System.Windows.Forms.Button();
             this.checkBox1 = new System.Windows.Forms.CheckBox();
             this.textBox1 = new System.Windows.Forms.TextBox();
@@ -41,8 +43,6 @@ namespace Fine.OPCDaClient9000
             this.richTextBox1 = new System.Windows.Forms.RichTextBox();
             this.groupBox4 = new System.Windows.Forms.GroupBox();
             this.richTextBox2 = new System.Windows.Forms.RichTextBox();
-            this.button2 = new System.Windows.Forms.Button();
-            this.label2 = new System.Windows.Forms.Label();
             this.groupBox1.SuspendLayout();
             this.groupBox2.SuspendLayout();
             this.groupBox3.SuspendLayout();
@@ -104,6 +104,26 @@ namespace Fine.OPCDaClient9000
             this.groupBox2.TabStop = false;
             this.groupBox2.Text = "查询";
             // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.ForeColor = System.Drawing.Color.Red;
+            this.label2.Location = new System.Drawing.Point(6, 63);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(98, 18);
+            this.label2.TabIndex = 4;
+            this.label2.Text = "查询个数:";
+            // 
+            // button2
+            // 
+            this.button2.Location = new System.Drawing.Point(582, 22);
+            this.button2.Name = "button2";
+            this.button2.Size = new System.Drawing.Size(114, 37);
+            this.button2.TabIndex = 3;
+            this.button2.Text = "全部测试";
+            this.button2.UseVisualStyleBackColor = true;
+            this.button2.Click += new System.EventHandler(this.button2_Click);
+            // 
             // button1
             // 
             this.button1.Location = new System.Drawing.Point(480, 24);
@@ -169,26 +189,6 @@ namespace Fine.OPCDaClient9000
             this.richTextBox2.TabIndex = 0;
             this.richTextBox2.Text = "";
             // 
-            // button2
-            // 
-            this.button2.Location = new System.Drawing.Point(582, 22);
-            this.button2.Name = "button2";
-            this.button2.Size = new System.Drawing.Size(114, 37);
-            this.button2.TabIndex = 3;
-            this.button2.Text = "全部测试";
-            this.button2.UseVisualStyleBackColor = true;
-            this.button2.Click += new System.EventHandler(this.button2_Click);
-            // 
-            // label2
-            // 
-            this.label2.AutoSize = true;
-            this.label2.ForeColor = System.Drawing.Color.Red;
-            this.label2.Location = new System.Drawing.Point(6, 63);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(98, 18);
-            this.label2.TabIndex = 4;
-            this.label2.Text = "查询个数:";
-            // 
             // TestForm
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);

+ 71 - 16
Fine.OPCDaClient9000/TestForm.cs

@@ -1,8 +1,10 @@
 using FaceppSDK;
+using Fine.IHttpServer;
 using Fine.OPCDaClient9000.App;
 using Fine.OPCDaClient9000.Util;
 using Fine.Util;
 using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
@@ -13,6 +15,7 @@ using System.Linq;
 using System.Net;
 using System.Net.Sockets;
 using System.Text;
+using System.Threading;
 using System.Threading.Tasks;
 using System.Windows.Forms;
 
@@ -23,6 +26,13 @@ namespace Fine.OPCDaClient9000
         public TestForm()
         {
             InitializeComponent();
+            label2.TextChanged += Label2_TextChanged;
+        }
+
+        private void Label2_TextChanged(object sender, EventArgs e)
+        {
+            label2.Show();
+            // MessageBox.Show("1111");
         }
 
         private void button1_Click(object sender, EventArgs e)
@@ -46,6 +56,15 @@ namespace Fine.OPCDaClient9000
             Dictionary<string, List<IoModal>> result = new Dictionary<string, List<IoModal>>();
             if (checkBox1.Checked)
             {
+                var apiNoTag = AppUtil.newsConfig.Where(a => a.Data.Any(b => b.Params.Any(c => c.keys.Any(d => d.WriteTagName == null || d.CheckTagName == null || d.WriteTagName.Contains(" ")
+               || d.CheckTagName.Contains(" ") || string.IsNullOrWhiteSpace(d.WriteTagName) || string.IsNullOrWhiteSpace(d.WriteTagName)
+               )))).Select(a => a.path);
+                if (apiNoTag.Count() > 0)
+                {
+                    MessageBox.Show(String.Join("\n", apiNoTag.Select(a => a)));
+                    return;
+                }
+
                 var apis = AppUtil.newsConfig.Where(a => a.Data.Any(n => n.Params.Any(c => c.keys.Any(d => d.WriteTagName.ToLower().Contains(textBox1.Text.ToLower())))) || a.Data.Any(n => n.Params.Any(c => c.keys.Any(d => d.WriteTagName.ToLower().Contains(textBox1.Text.ToLower()))))).ToList();
                 foreach (var item in apis)
                 {
@@ -140,7 +159,7 @@ namespace Fine.OPCDaClient9000
                         }
                         else if (api.Params.SelectMany(a => a.keys).Any(a => a.InputName.Contains("GDNum")))
                         {
-                            SelYPno sel = new SelYPno { GDNum = "abc", BatchNum = " ", BrandNum = " " };
+                            SelYPno sel = new SelYPno { GDNum = "abc", BatchNum = "vadd", BrandNum = "derr" };
                             richTextBox2.Text = JsonConvert.SerializeObject(sel);
                         }
 
@@ -223,24 +242,31 @@ namespace Fine.OPCDaClient9000
 
         private void button2_Click(object sender, EventArgs e)
         {
+
             if (listBox1.Items.Count == 0)
             {
                 MessageBox.Show("请查询接口名称后测试");
                 return;
             }
-            StringBuilder stringBuilder = new StringBuilder();
+            richTextBox1.Text = "";
+            richTextBox1.Update();
+
+
             List<string> fitler = new List<string>();
             List<string> errorapi = new List<string>();
             foreach (string item in listBox1.Items)
             {
                 fitler.Add(item);
             }
-            var apis = AppUtil.newsConfig.SelectMany(a => a.Data).Where(a => fitler.Any(c => c == a.APIName));
+            List<IoModal> timmerapis = AppUtil.newsConfig.SelectMany(a => a.Data).Where(a => fitler.Any(c => c == a.APIName)).ToList();
             int i = 1;
-            foreach (var api in apis)
+            foreach (var api in timmerapis)
             {
-                label2.Text = $"查询个数:{apis.Count()},已完成{i}";
+                
+                label2.Text = $"查询个数:{timmerapis.Count()},已完成{i},测试进度{ Math.Floor(Convert.ToDecimal(1.00*i/ timmerapis.Count())*100)}%";
+                label2.Update();
                 i++;
+                StringBuilder stringBuilder = new StringBuilder();
                 string Parms = string.Empty;
                 if (api.Method == "get")
                 {
@@ -250,16 +276,25 @@ namespace Fine.OPCDaClient9000
                     HttpMethods http = new HttpMethods();
                     var url = $"{GetServerAddress()}{api.APIName}";
                     var result = http.HttpGet(url);
-                    var rtl = JsonConvert.DeserializeObject<PLCResultAll>(result);
-                    if (rtl.Sucessful == false)
+                    var rtl = JsonConvert.DeserializeObject<HttpResult>(result);
+                    if (rtl.Success == false)
                     {
-                        errorapi.Add(api.APIName);
+                        errorapi.Add(api.APIName + "   网络异常");
+                    }
+                    else {
+                       var js=  JsonConvert.SerializeObject(rtl.Result);
+                        var re = JsonConvert.DeserializeObject<PLCResultAll>(js);
+                            if (re.Sucessful == false)
+                            {
+                                errorapi.Add(api.APIName + "   接口异常");
+                            }
                     }
+                    
                     swatch.Stop(); //计时结束
                     string time = swatch.ElapsedMilliseconds.ToString(); //获取代码段执行时间
                     stringBuilder.AppendLine($"{api.APIName} {api.Method} 总耗时" + time);
                     stringBuilder.AppendLine($"请求参数:{Parms}");
-                    stringBuilder.AppendLine($"返回值:{result }");
+                    stringBuilder.AppendLine($"返回值:{result}");
                 }
                 else if (api.Method == "post")
                 {
@@ -313,26 +348,46 @@ namespace Fine.OPCDaClient9000
                     HttpMethods http = new HttpMethods();
                     var url = $"{GetServerAddress()}{api.APIName}";
                     var result = http.HttpPost(url, Parms);
-                    var rtl = JsonConvert.DeserializeObject<PLCResultAll>(result);
-                    if (rtl.Sucessful == false)
+                    var rtl = JsonConvert.DeserializeObject<HttpResult>(result);
+                    if (rtl.Success == false)
+                    {
+                        errorapi.Add(api.APIName + "   网络异常");
+                    }
+                    else
                     {
-                        errorapi.Add(api.APIName);
+                        var js = JsonConvert.SerializeObject(rtl.Result);
+                        var re = JsonConvert.DeserializeObject<PLCResultAll>(js);
+                        if (re.Sucessful == false)
+                        {
+                            errorapi.Add(api.APIName + "   接口异常");
+                        }
                     }
                     swatch.Stop(); //计时结束
                     string time = swatch.ElapsedMilliseconds.ToString(); //获取代码段执行时间
                     stringBuilder.AppendLine($"{api.APIName} {api.Method} 总耗时" + time);
                     stringBuilder.AppendLine($"请求参数:{Parms}");
-                    stringBuilder.AppendLine($"返回值:{result }");
+                    stringBuilder.AppendLine($"返回值:{result}");
 
                 }
                 else
                 {
-                    MessageBox.Show("接口配置异常,请检查接口", "错误信息");
+                    stringBuilder.AppendLine($"错误信息:{api.APIName}接口配置异常,请检查接口");
                     return;
                 }
+                richTextBox1.Text += stringBuilder.ToString();
+                richTextBox1.Update();
             }
-            richTextBox3.Text = string.Join("\t\n", errorapi);
-            richTextBox1.Text = stringBuilder.ToString();
+            if (errorapi.Count > 0)
+            {
+                richTextBox3.Text = string.Join("\t\n", errorapi);
+            }
+            else {
+                richTextBox3.Text = "正常";
+            }
+            
+          
         }
+
+
     }
 }

Fine.OPCDaClient9000/bin/Debug/Fine.OPCDaClient9000.exe.config → Fine.OPCDaClient9000/bin/Debug/Fine.AllInOne.exe.config


+ 90 - 0
Fine.OPCDaClient9000/bin/Debug/config/Router/5K单机/5K单机.json

@@ -0,0 +1,90 @@
+[
+  {
+    "APIName": "L5KDJ_JL_ScaleWaterMode",
+    "Content": "加料机使用定比例加水模式",
+    "IsCheck": true,
+    "DelayTime": 3000,
+    "Params": [
+      {
+        "Param": "",
+        "keys": [
+          {
+            "WriteTagName": "THISNODE.YT6022_C_SJ2147_WATER_MODE.F_CV",
+            "CheckTagName": "THISNODE.YT6022_C_SJ2147_WATER_MODE.F_CV",
+            "StrValue": "0",
+            "CheckValue": "0",
+            "DelayTime": 1500
+          }
+        ]
+      }
+    ],
+    "Method": "get",
+    "PType": 0
+  },
+  {
+    "APIName": "L5KDJ_JL_TrackWaterMode",
+    "Content": "加料机使用跟踪加水模式",
+    "IsCheck": true,
+    "DelayTime": 3000,
+    "Params": [
+      {
+        "Param": "",
+        "keys": [
+          {
+            "WriteTagName": "THISNODE.YT6022_C_SJ2147_WATER_MODE.F_CV",
+            "CheckTagName": "THISNODE.YT6022_C_SJ2147_WATER_MODE.F_CV",
+            "StrValue": "1",
+            "CheckValue": "1",
+            "DelayTime": 1500
+          }
+        ]
+      }
+    ],
+    "Method": "get",
+    "PType": 0
+  },
+  {
+    "APIName": "L5KDJ_JL_UseWaterMode",
+    "Content": "加料机使用加水模式",
+    "IsCheck": true,
+    "DelayTime": 3000,
+    "Params": [
+      {
+        "Param": "",
+        "keys": [
+          {
+            "WriteTagName": "THISNODE.YT6022_C_SJ2147_WATER_ADD.F_CV",
+            "CheckTagName": "THISNODE.YT6022_C_SJ2147_WATER_ADD.F_CV",
+            "StrValue": "1",
+            "CheckValue": "1",
+            "DelayTime": 1500
+          }
+        ]
+      }
+    ],
+    "Method": "get",
+    "PType": 0
+  },
+  {
+    "APIName": "L5KDJ_JL_UseNoWaterMode",
+    "Content": "加料机使用不加水模式",
+    "IsCheck": true,
+    "DelayTime": 3000,
+    "Params": [
+      {
+        "Param": "",
+        "keys": [
+          {
+            "WriteTagName": "THISNODE.YT6022_C_SJ2147_WATER_ADD.F_CV",
+            "CheckTagName": "THISNODE.YT6022_C_SJ2147_WATER_ADD.F_CV",
+            "StrValue": "0",
+            "CheckValue": "0",
+            "DelayTime": 1500
+          }
+        ]
+      }
+    ],
+    "Method": "get",
+    "PType": 0
+  }
+]

+ 3 - 3
Fine.OPCDaClient9000/bin/Debug/config/Router/9000/9000回潮.json

@@ -61,7 +61,7 @@
         "keys": [
           {
             "WriteTagName": "THISNODE.K2_Z5L1CurrRec_P_23.F_CV",
-            "CheckTagName": "THISNODE.K2_Z5L1CurrRec_P_23.F_CV ",
+            "CheckTagName": "THISNODE.K2_Z5L1CurrRec_P_23.F_CV",
             "DelayTime": 0
           }
         ]
@@ -81,7 +81,7 @@
         "keys": [
           {
             "WriteTagName": "THISNODE.YT6024_WQ3154_SP1.F_CV",
-            "CheckTagName": "THISNODE.YT6024_WQ3154_SP1.F_CV ",
+            "CheckTagName": "THISNODE.YT6024_WQ3154_SP1.F_CV",
             "DelayTime": 0
           }
         ]
@@ -101,7 +101,7 @@
         "keys": [
           {
             "WriteTagName": "THISNODE.K2_Z5L1CurrRec_P_23.F_CV",
-            "CheckTagName": "THISNODE.K2_Z5L1CurrRec_P_23.F_CV ",
+            "CheckTagName": "THISNODE.K2_Z5L1CurrRec_P_23.F_CV",
             "DelayTime": 0
           }
         ]

+ 44 - 0
Fine.OPCDaClient9000/bin/Debug/config/Router/白肋烟/出柜段_Post.json

@@ -32,5 +32,49 @@
         ],
         "Method": "post",
         "PType": 3
+    },
+    {
+        "APIName": "LPBLYJG_ZHQD_YPGSelno1_InfoSet",
+        "Content": "后柜信息清零",
+        "IsCheck": true,
+        "DelayTime": 3000,
+        "Params": [
+            {
+                "Param": "BLG5",
+                "keys": [
+                    {
+                        "InputName": "BatchNum",
+                        "WriteTagName": "THISNODE.BLG5BatchNo1.A_CV",
+                        "CheckTagName": "THISNODE.BLG5BatchNo1.A_CV",
+                        "DelayTime": 0
+                    },
+                    {
+                        "InputName": "BrandNum",
+                        "WriteTagName": "THISNODE.BLG5Brand1.A_CV",
+                        "CheckTagName": "THISNODE.BLG5Brand1.A_CV",
+                        "DelayTime": 0
+                    }
+                ]
+            },
+            {
+                "Param": "BLG6",
+                "keys": [
+                    {
+                        "InputName": "BatchNum",
+                        "WriteTagName": "THISNODE.BLG6BatchNo1.A_CV",
+                        "CheckTagName": "THISNODE.BLG6BatchNo1.A_CV",
+                        "DelayTime": 0
+                    },
+                    {
+                        "InputName": "BrandNum",
+                        "WriteTagName": "THISNODE.BLG6Brand1.A_CV",
+                        "CheckTagName": "THISNODE.BLG6Brand1.A_CV",
+                        "DelayTime": 0
+                    }
+                ]
+            }
+        ],
+        "Method": "post",
+        "PType": 4
     }
 ]

+ 47 - 4
Fine.OPCDaClient9000/bin/Debug/config/Router/白肋烟/加表料_Get.json

@@ -55,8 +55,22 @@
                     {
                         "WriteTagName": "THISNODE.YT612OuterStuffAUTO.F_CV",
                         "CheckTagName": "THISNODE.YT612OuterStuffAUTO.F_CV",
-                        "StrValue": "0\n     THISNODE.YT612OuterStuffLOCK.F_CV",
-                        "CheckValue": "0\n     THISNODE.YT612OuterStuffLOCK.F_CV",
+                        "StrValue": "0",
+                        "CheckValue": "0",
+                        "DelayTime": 0
+                    },
+                    {
+                        "WriteTagName": "THISNODE.YT612OuterStuffLOCK.F_CV",
+                        "CheckTagName": "THISNODE.YT612OuterStuffLOCK.F_CV",
+                        "StrValue": "0",
+                        "CheckValue": "0",
+                        "DelayTime": 0
+                    },
+                    {
+                        "WriteTagName": "THISNODE.YT612OuterStuffMAN.F_CV",
+                        "CheckTagName": "THISNODE.YT612OuterStuffMAN.F_CV",
+                        "StrValue": "1",
+                        "CheckValue": "1",
                         "DelayTime": 0
                     }
                 ]
@@ -222,8 +236,15 @@
                     {
                         "WriteTagName": "THISNODE.GP3119OutSelCur.F_CV",
                         "CheckTagName": "THISNODE.GP3119OutSelCur.F_CV",
-                        "StrValue": "0\n      THISNODE.GP3119_1OutSelCur.F_CV",
-                        "CheckValue": "0\n      THISNODE.GP3119_1OutSelCur.F_CV",
+                        "StrValue": "0",
+                        "CheckValue": "0",
+                        "DelayTime": 0
+                    },
+                    {
+                        "WriteTagName": "THISNODE.GP3119_1OutSelCur.F_CV",
+                        "CheckTagName": "THISNODE.GP3119_1OutSelCur.F_CV",
+                        "StrValue": "0",
+                        "CheckValue": "0",
                         "DelayTime": 0
                     }
                 ]
@@ -450,6 +471,28 @@
         "Method": "get",
         "PType": 0
     },
+    {
+        "APIName": "LPBLYJL2_ZHSTOP_CLEAR_PRODINFO",
+        "Content": "生产清零",
+        "IsCheck": true,
+        "DelayTime": 3000,
+        "Params": [
+            {
+                "Param": "",
+                "keys": [
+                    {
+                        "WriteTagName": "THISNODE.JK_YT612_SURFACESC_CLEAR.F_CV",
+                        "CheckTagName": "THISNODE.JK_YT612_SURFACESC_CLEAR_OK.F_CV",
+                        "StrValue": "1",
+                        "CheckValue": "1",
+                        "DelayTime": 0
+                    }
+                ]
+            }
+        ],
+        "Method": "get",
+        "PType": 0
+    },
     {
         "APIName": "LPBLYJL2_ZHStop_Stop",
         "Content": "设备组合停止",

+ 55 - 7
Fine.OPCDaClient9000/bin/Debug/config/Router/白肋烟/加表料_Post.json

@@ -55,7 +55,7 @@
                         "DelayTime": 0
                     },
                     {
-                        "InputName": "BranchNum",
+                        "InputName": "BatchNum",
                         "WriteTagName": "THISNODE.OuterStuffBatchNo.A_CV",
                         "CheckTagName": "THISNODE.OuterStuffBatchNo.A_CV",
                         "DelayTime": 0
@@ -84,7 +84,7 @@
                     {
                         "InputName": "Weight",
                         "WriteTagName": "THISNODE.SJ3135Tank1AskQty.F_CV",
-                        "CheckTagName": "    THISNODE.SJ3135Tank1AskQty.F_CV",
+                        "CheckTagName": "THISNODE.SJ3135Tank1AskQty.F_CV",
                         "DelayTime": 0
                     },
                     {
@@ -96,7 +96,7 @@
                     {
                         "InputName": "BrandNo",
                         "WriteTagName": "THISNODE.SJ3135Tank1AskBrand.A_CV",
-                        "CheckTagName": "THISNODE.SJ3135Tank1AskBrand.A_CV ",
+                        "CheckTagName": "THISNODE.SJ3135Tank1AskBrand.A_CV",
                         "DelayTime": 0
                     }
                 ]
@@ -146,7 +146,7 @@
         "DelayTime": 3000,
         "Params": [
             {
-                "Param": "BLG3",
+                "Param": "BLG5",
                 "keys": [
                     {
                         "WriteTagName": "THISNODE.JK_GP3139InSelCur.F_CV",
@@ -158,7 +158,7 @@
                 ]
             },
             {
-                "Param": "BLG4",
+                "Param": "BLG6",
                 "keys": [
                     {
                         "WriteTagName": "THISNODE.JK_GP3139_1InSelCur.F_CV",
@@ -183,12 +183,14 @@
                 "Param": "BLG5",
                 "keys": [
                     {
-                        "InputName": "BranchNum",
+                        "InputName": "BatchNum",
+                        "WriteTagName": "THISNODE.BLG5BatchNo1.A_CV",
                         "CheckTagName": "THISNODE.BLG5BatchNo1.A_CV",
                         "DelayTime": 0
                     },
                     {
                         "InputName": "BrandNum",
+                        "WriteTagName": "THISNODE.BLG5Brand1.A_CV",
                         "CheckTagName": "THISNODE.BLG5Brand1.A_CV",
                         "DelayTime": 0
                     }
@@ -198,12 +200,14 @@
                 "Param": "BLG6",
                 "keys": [
                     {
-                        "InputName": "BranchNum",
+                        "InputName": "BatchNum",
+                        "WriteTagName": "THISNODE.BLG6BatchNo1.A_CV",
                         "CheckTagName": "THISNODE.BLG6BatchNo1.A_CV",
                         "DelayTime": 0
                     },
                     {
                         "InputName": "BrandNum",
+                        "WriteTagName": "THISNODE.BLG6Brand1.A_CV",
                         "CheckTagName": "THISNODE.BLG6Brand1.A_CV",
                         "DelayTime": 0
                     }
@@ -212,5 +216,49 @@
         ],
         "Method": "post",
         "PType": 4
+    },
+    {
+        "APIName": "LPBLYJL2_ZHQD_YPGSelno1_InfoSet",
+        "Content": "中柜信息清零",
+        "IsCheck": true,
+        "DelayTime": 3000,
+        "Params": [
+            {
+                "Param": "BLG3",
+                "keys": [
+                    {
+                        "InputName": "BatchNum",
+                        "WriteTagName": "THISNODE.BLG3BatchNo1.A_CV",
+                        "CheckTagName": "THISNODE.BLG3BatchNo1.A_CV",
+                        "DelayTime": 0
+                    },
+                    {
+                        "InputName": "BrandNum",
+                        "WriteTagName": "THISNODE.BLG3Brand1.A_CV",
+                        "CheckTagName": "THISNODE.BLG3Brand1.A_CV",
+                        "DelayTime": 0
+                    }
+                ]
+            },
+            {
+                "Param": "BLG4",
+                "keys": [
+                    {
+                        "InputName": "BatchNum",
+                        "WriteTagName": "THISNODE.BLG4BatchNo1.A_CV",
+                        "CheckTagName": "THISNODE.BLG4BatchNo1.A_CV",
+                        "DelayTime": 0
+                    },
+                    {
+                        "InputName": "BrandNum",
+                        "WriteTagName": "THISNODE.BLG4Brand1.A_CV",
+                        "CheckTagName": "THISNODE.BLG4Brand1.A_CV",
+                        "DelayTime": 0
+                    }
+                ]
+            }
+        ],
+        "Method": "post",
+        "PType": 4
     }
 ]

+ 4 - 4
Fine.OPCDaClient9000/bin/Debug/config/Router/白肋烟/加里料_Get.json

@@ -438,8 +438,8 @@
                 "Param": "",
                 "keys": [
                     {
-                        "WriteTagName": "THISNODE.JK_YT612_SJ3112Tank1SelNW.F_CV",
-                        "CheckTagName": "THISNODE.JK_YT612_SJ3112Tank1SelNW.F_CV",
+                        "WriteTagName": "THISNODE.YT612_SJ3112Tank1SelNW.F_CV",
+                        "CheckTagName": "THISNODE.YT612_SJ3112Tank1SelNW.F_CV",
                         "StrValue": "1",
                         "CheckValue": "1",
                         "DelayTime": 0
@@ -460,8 +460,8 @@
                 "Param": "",
                 "keys": [
                     {
-                        "WriteTagName": "THISNODE.JK_YT612_SJ3112Tank1SelNW.F_CV",
-                        "CheckTagName": "THISNODE.JK_YT612_SJ3112Tank1SelNW.F_CV",
+                        "WriteTagName": "THISNODE.YT612_SJ3112Tank1SelNW.F_CV",
+                        "CheckTagName": "THISNODE.YT612_SJ3112Tank1SelNW.F_CV",
                         "StrValue": "0",
                         "CheckValue": "0",
                         "DelayTime": 0

+ 16 - 8
Fine.OPCDaClient9000/bin/Debug/config/Router/白肋烟/加里料_Post.json

@@ -55,7 +55,7 @@
                         "DelayTime": 0
                     },
                     {
-                        "InputName": "BranchNum",
+                        "InputName": "BatchNum",
                         "WriteTagName": "THISNODE.InnerStuffBatchNo.A_CV",
                         "CheckTagName": "THISNODE.InnerStuffBatchNo.A_CV",
                         "DelayTime": 0
@@ -84,7 +84,7 @@
                     {
                         "InputName": "Weight",
                         "WriteTagName": "THISNODE.SJ3112Tank1AskQty.F_CV",
-                        "CheckTagName": "    THISNODE.SJ3112Tank1AskQty.F_CV",
+                        "CheckTagName": "THISNODE.SJ3112Tank1AskQty.F_CV",
                         "DelayTime": 0
                     },
                     {
@@ -96,7 +96,7 @@
                     {
                         "InputName": "BrandNo",
                         "WriteTagName": "THISNODE.SJ3112Tank1AskBrand.A_CV",
-                        "CheckTagName": "THISNODE.SJ3112Tank1AskBrand.A_CV\n\n",
+                        "CheckTagName": "THISNODE.SJ3112Tank1AskBrand.A_CV",
                         "DelayTime": 0
                     }
                 ]
@@ -129,7 +129,7 @@
                     {
                         "InputName": "BrandNo",
                         "WriteTagName": "THISNODE.SJ3112Tank2AskBrand.A_CV",
-                        "CheckTagName": "THISNODE.SJ3112Tank2AskBrand.A_CV\n",
+                        "CheckTagName": "THISNODE.SJ3112Tank2AskBrand.A_CV",
                         "DelayTime": 0
                     }
                 ]
@@ -250,12 +250,14 @@
                 "Param": "BLG3",
                 "keys": [
                     {
-                        "InputName": "BranchNum",
+                        "InputName": "BatchNum",
+                        "WriteTagName": "THISNODE.BLG3BatchNo1.A_CV",
                         "CheckTagName": "THISNODE.BLG3BatchNo1.A_CV",
                         "DelayTime": 0
                     },
                     {
                         "InputName": "BrandNum",
+                        "WriteTagName": "THISNODE.BLG3Brand1.A_CV",
                         "CheckTagName": "THISNODE.BLG3Brand1.A_CV",
                         "DelayTime": 0
                     }
@@ -265,12 +267,14 @@
                 "Param": "BLG4",
                 "keys": [
                     {
-                        "InputName": "BranchNum",
+                        "InputName": "BatchNum",
+                        "WriteTagName": "THISNODE.BLG4BatchNo1.A_CV",
                         "CheckTagName": "THISNODE.BLG4BatchNo1.A_CV",
                         "DelayTime": 0
                     },
                     {
                         "InputName": "BrandNum",
+                        "WriteTagName": "THISNODE.BLG4Brand1.A_CV",
                         "CheckTagName": "THISNODE.BLG4Brand1.A_CV",
                         "DelayTime": 0
                     }
@@ -290,12 +294,14 @@
                 "Param": "BLG1",
                 "keys": [
                     {
-                        "InputName": "BranchNum",
+                        "InputName": "BatchNum",
+                        "WriteTagName": "THISNODE.BLG1BatchNo1.A_CV",
                         "CheckTagName": "THISNODE.BLG1BatchNo1.A_CV",
                         "DelayTime": 0
                     },
                     {
                         "InputName": "BrandNum",
+                        "WriteTagName": "THISNODE.BLG3Brand1.A_CV",
                         "CheckTagName": "THISNODE.BLG3Brand1.A_CV",
                         "DelayTime": 0
                     }
@@ -305,12 +311,14 @@
                 "Param": "BLG2",
                 "keys": [
                     {
-                        "InputName": "BranchNum",
+                        "InputName": "BatchNum",
+                        "WriteTagName": "THISNODE.BLG2BatchNo1.A_CV",
                         "CheckTagName": "THISNODE.BLG2BatchNo1.A_CV",
                         "DelayTime": 0
                     },
                     {
                         "InputName": "BrandNum",
+                        "WriteTagName": "THISNODE.BLG4Brand1.A_CV",
                         "CheckTagName": "THISNODE.BLG4Brand1.A_CV",
                         "DelayTime": 0
                     }

+ 6 - 2
Fine.OPCDaClient9000/bin/Debug/config/Router/白肋烟/进柜段_Post.json

@@ -43,12 +43,14 @@
                 "Param": "BLG1",
                 "keys": [
                     {
-                        "InputName": "BranchNum",
+                        "InputName": "BatchNum",
+                        "WriteTagName": "THISNODE.BLG1BatchNo1.A_CV",
                         "CheckTagName": "THISNODE.BLG1BatchNo1.A_CV",
                         "DelayTime": 0
                     },
                     {
                         "InputName": "BrandNum",
+                        "WriteTagName": "THISNODE.BLG1Brand1.A_CV",
                         "CheckTagName": "THISNODE.BLG1Brand1.A_CV",
                         "DelayTime": 0
                     }
@@ -58,12 +60,14 @@
                 "Param": "BLG2",
                 "keys": [
                     {
-                        "InputName": "BranchNum",
+                        "InputName": "BatchNum",
+                        "WriteTagName": "THISNODE.BLG2BatchNo1.A_CV",
                         "CheckTagName": "THISNODE.BLG2BatchNo1.A_CV",
                         "DelayTime": 0
                     },
                     {
                         "InputName": "BrandNum",
+                        "WriteTagName": "THISNODE.BLG2Brand1.A_CV",
                         "CheckTagName": "THISNODE.BLG2Brand1.A_CV",
                         "DelayTime": 0
                     }

+ 1 - 1
Fine.OPCDaClient9000/bin/Debug/config/httpserver.json

@@ -1,5 +1,5 @@
 {
   "Host": "+",
-  "Port": 9011,
+  "Port": 9051,
   "Service": "3K线API接口服务"
 }

+ 90 - 0
Fine.OPCDaClient9000/config/Router/5K单机/5K单机.json

@@ -0,0 +1,90 @@
+[
+  {
+    "APIName": "L5KDJ_JL_ScaleWaterMode",
+    "Content": "加料机使用定比例加水模式",
+    "IsCheck": true,
+    "DelayTime": 3000,
+    "Params": [
+      {
+        "Param": "",
+        "keys": [
+          {
+            "WriteTagName": "THISNODE.YT6022_C_SJ2147_WATER_MODE.F_CV",
+            "CheckTagName": "THISNODE.YT6022_C_SJ2147_WATER_MODE.F_CV",
+            "StrValue": "0",
+            "CheckValue": "0",
+            "DelayTime": 1500
+          }
+        ]
+      }
+    ],
+    "Method": "get",
+    "PType": 0
+  },
+  {
+    "APIName": "L5KDJ_JL_TrackWaterMode",
+    "Content": "加料机使用跟踪加水模式",
+    "IsCheck": true,
+    "DelayTime": 3000,
+    "Params": [
+      {
+        "Param": "",
+        "keys": [
+          {
+            "WriteTagName": "THISNODE.YT6022_C_SJ2147_WATER_MODE.F_CV",
+            "CheckTagName": "THISNODE.YT6022_C_SJ2147_WATER_MODE.F_CV",
+            "StrValue": "1",
+            "CheckValue": "1",
+            "DelayTime": 1500
+          }
+        ]
+      }
+    ],
+    "Method": "get",
+    "PType": 0
+  },
+  {
+    "APIName": "L5KDJ_JL_UseWaterMode",
+    "Content": "加料机使用加水模式",
+    "IsCheck": true,
+    "DelayTime": 3000,
+    "Params": [
+      {
+        "Param": "",
+        "keys": [
+          {
+            "WriteTagName": "THISNODE.YT6022_C_SJ2147_WATER_ADD.F_CV",
+            "CheckTagName": "THISNODE.YT6022_C_SJ2147_WATER_ADD.F_CV",
+            "StrValue": "1",
+            "CheckValue": "1",
+            "DelayTime": 1500
+          }
+        ]
+      }
+    ],
+    "Method": "get",
+    "PType": 0
+  },
+  {
+    "APIName": "L5KDJ_JL_UseNoWaterMode",
+    "Content": "加料机使用不加水模式",
+    "IsCheck": true,
+    "DelayTime": 3000,
+    "Params": [
+      {
+        "Param": "",
+        "keys": [
+          {
+            "WriteTagName": "THISNODE.YT6022_C_SJ2147_WATER_ADD.F_CV",
+            "CheckTagName": "THISNODE.YT6022_C_SJ2147_WATER_ADD.F_CV",
+            "StrValue": "0",
+            "CheckValue": "0",
+            "DelayTime": 1500
+          }
+        ]
+      }
+    ],
+    "Method": "get",
+    "PType": 0
+  }
+]

+ 3 - 3
Fine.OPCDaClient9000/config/Router/9000/9000回潮.json

@@ -61,7 +61,7 @@
         "keys": [
           {
             "WriteTagName": "THISNODE.K2_Z5L1CurrRec_P_23.F_CV",
-            "CheckTagName": "THISNODE.K2_Z5L1CurrRec_P_23.F_CV ",
+            "CheckTagName": "THISNODE.K2_Z5L1CurrRec_P_23.F_CV",
             "DelayTime": 0
           }
         ]
@@ -81,7 +81,7 @@
         "keys": [
           {
             "WriteTagName": "THISNODE.YT6024_WQ3154_SP1.F_CV",
-            "CheckTagName": "THISNODE.YT6024_WQ3154_SP1.F_CV ",
+            "CheckTagName": "THISNODE.YT6024_WQ3154_SP1.F_CV",
             "DelayTime": 0
           }
         ]
@@ -101,7 +101,7 @@
         "keys": [
           {
             "WriteTagName": "THISNODE.K2_Z5L1CurrRec_P_23.F_CV",
-            "CheckTagName": "THISNODE.K2_Z5L1CurrRec_P_23.F_CV ",
+            "CheckTagName": "THISNODE.K2_Z5L1CurrRec_P_23.F_CV",
             "DelayTime": 0
           }
         ]

+ 1 - 1
Fine.OPCDaClient9000/config/httpserver.json

@@ -1,5 +1,5 @@
 {
   "Host": "+",
-  "Port": 9011,
+  "Port": 9051,
   "Service": "3K线API接口服务"
 }

+ 7 - 5
Fine.OPCDaClient9000/obj/Debug/Fine.OPCDaClient9000.csproj.FileListAbsolute.txt

@@ -158,9 +158,6 @@ E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Debug\config\Template\01.json
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Debug\config\Template\00.json
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Debug\Excel\模板下载.xlsx
-E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Debug\Fine.OPCDaClient9000.exe.config
-E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Debug\Fine.OPCDaClient9000.exe
-E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Debug\Fine.OPCDaClient9000.pdb
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Debug\BouncyCastle.Crypto.dll
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Debug\Fine.HttpServer.dll
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Debug\Fine.IHttpServer.dll
@@ -290,5 +287,10 @@ E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\obj\Debug\Fine.OPCDaClient9000.csproj.GenerateResource.cache
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\obj\Debug\Fine.OPCDaClient9000.csproj.CoreCompileInputs.cache
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\obj\Debug\Fine.OPCDaClient9000.csproj.CopyComplete
-E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\obj\Debug\Fine.OPCDaClient9000.exe
-E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\obj\Debug\Fine.OPCDaClient9000.pdb
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Debug\config\Router\5K单机\5K单机.json
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\obj\Debug\Fine.OPCDaClient9000.csproj.SuggestedBindingRedirects.cache
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Debug\Fine.AllInOne.exe.config
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Debug\Fine.AllInOne.exe
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Debug\Fine.AllInOne.pdb
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\obj\Debug\Fine.AllInOne.exe
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\obj\Debug\Fine.AllInOne.pdb

BIN
Fine.OPCDaClient9000/obj/Release/Fine.OPCDaClient9000.ConfigForm.resources


BIN
Fine.OPCDaClient9000/obj/Release/Fine.OPCDaClient9000.TestForm.resources


+ 30 - 7
Fine.OPCDaClient9000/obj/Release/Fine.OPCDaClient9000.csproj.FileListAbsolute.txt

@@ -114,7 +114,6 @@ E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\System.Text.Encodings.Web.xml
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\Microsoft.Extensions.Options.ConfigurationExtensions.xml
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\obj\Release\Fine.OPCDaClient9000.csproj.AssemblyReference.cache
-E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\obj\Release\Fine.OPCDaClient9000.exe.config
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\obj\Release\Fine.OPCDaClient9000.Form1.resources
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\obj\Release\Fine.OPCDaClient9000.csproj.GenerateResource.cache
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\obj\Release\Fine.OPCDaClient9000.csproj.CoreCompileInputs.cache
@@ -132,12 +131,6 @@ E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\config\Router\JsonCfg\L3_JL2_POST.json
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\config\Router\JsonCfg\L3_JYG_GET.json
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\config\Router\JsonCfg\L3_JYG_POST.json
-E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\config\Router\JsonCfg\L3_TSFK_GET.json
-E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\config\Router\JsonCfg\L3_TSFK_POST.json
-E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\config\Router\JsonCfg\L3_YR_GET.json
-E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\config\Router\JsonCfg\L3_YR_POST.json
-E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\config\Router\JsonCfg\L3_ZH_GET.json
-E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\config\Router\JsonCfg\L3_ZH_POST.json
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\config\Router\JsonCfg\ZKAB_GET.json
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\config\Router\JsonCfg\ZKAB_POST.json
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\config\Router\JsonCfg\ZKSTOP_GET.json
@@ -148,3 +141,33 @@ E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\config\Router\JsonCfg\ZK_POST.json
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\config\Router\3000_add\L3KYPJYG_GET.json
 E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\config\Router\3000_add\L3KYPJYG_POST.json
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\config\Router\5K单机\5K单机.json
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\config\Template\5.json
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\config\Template\4.json
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\config\Template\3.json
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\config\Template\22.json
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\config\Template\21.json
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\config\Template\1.json
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\config\Template\01.json
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\config\Template\00.json
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\Excel\模板下载.xlsx
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\BouncyCastle.Crypto.dll
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\ICSharpCode.SharpZipLib.dll
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\NPOI.dll
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\Npoi.Mapper.dll
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\NPOI.OOXML.dll
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\NPOI.OpenXml4Net.dll
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\NPOI.OpenXmlFormats.dll
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\BouncyCastle.Crypto.xml
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\ICSharpCode.SharpZipLib.pdb
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\ICSharpCode.SharpZipLib.xml
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\NPOI.pdb
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\NPOI.xml
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\NPOI.OOXML.pdb
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\NPOI.OOXML.xml
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\NPOI.OpenXml4Net.pdb
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\NPOI.OpenXml4Net.xml
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\bin\Release\NPOI.OpenXmlFormats.pdb
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\obj\Release\Fine.OPCDaClient9000.csproj.SuggestedBindingRedirects.cache
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\obj\Release\Fine.OPCDaClient9000.ConfigForm.resources
+E:\yszn\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient1027_vs2019\Fine.OPCDaClient9000\obj\Release\Fine.OPCDaClient9000.TestForm.resources

+ 1 - 0
Fine.OPCDaClient9000/obj/Release/_IsIncrementalBuild

@@ -0,0 +1 @@
+obj\Release\\_IsIncrementalBuild

+ 150 - 0
Fine.OPCDaClientAI/App.config

@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <connectionStrings>
+    <add name="default" connectionString="Data Source=127.0.0.1;Initial Catalog=qddb; User Id=DBTEST;Password=test@123" providerName="" />
+  </connectionStrings>
+  <appSettings>
+    <add key="logenable" value="true" />
+    <add key="logisrealpath" value="true" />
+    <!--如果是flase,logpath直接写文件夹相对路径-->
+    <add key="logpath" value="E:\ysAIlog\" />
+    <add key="auth" value="E230539F13CDB91D2764603BC283D909" />
+    <add key="isauth" value="false" />
+    <add key="ClientSettingsProvider.ServiceUri" value="" />
+  </appSettings>
+  <startup>
+    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
+  </startup>
+  <runtime>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.IdentityModel.Abstractions" publicKeyToken="31bf3856ad364e35" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.21.0.0" newVersion="6.21.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Identity.Client" publicKeyToken="0a613f4dd989e8ae" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.45.0.0" newVersion="4.45.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Text.Encodings.Web" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.IO.Pipelines" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.3" newVersion="6.0.0.3" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.DependencyInjection.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.Configuration.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.Logging.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.DependencyInjection" publicKeyToken="adb9793829ddae60" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.Logging" publicKeyToken="adb9793829ddae60" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.Hosting.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.Primitives" publicKeyToken="adb9793829ddae60" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.FileProviders.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.Configuration" publicKeyToken="adb9793829ddae60" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.Configuration.EnvironmentVariables" publicKeyToken="adb9793829ddae60" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.Configuration.FileExtensions" publicKeyToken="adb9793829ddae60" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.AspNetCore.Http" publicKeyToken="adb9793829ddae60" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-2.1.22.0" newVersion="2.1.22.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.Options" publicKeyToken="adb9793829ddae60" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.FileProviders.Physical" publicKeyToken="adb9793829ddae60" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.AspNetCore.Server.Kestrel.Core" publicKeyToken="adb9793829ddae60" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-2.1.25.0" newVersion="2.1.25.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Security.Cryptography.Cng" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.3.1.1" newVersion="4.3.1.1" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.Configuration.Binder" publicKeyToken="adb9793829ddae60" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+  </runtime>
+  <system.web>
+    <membership defaultProvider="ClientAuthenticationMembershipProvider">
+      <providers>
+        <add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
+      </providers>
+    </membership>
+    <roleManager defaultProvider="ClientRoleProvider" enabled="true">
+      <providers>
+        <add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
+      </providers>
+    </roleManager>
+  </system.web>
+</configuration>

+ 115 - 0
Fine.OPCDaClientAI/App/AppHandle.cs

@@ -0,0 +1,115 @@
+using Fine.IHttpServer;
+
+using Fine.OPCDaClient9000.Util;
+using Fine.Util;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Fine.OPCDaClient9000.App
+{
+    public class AppHandle : IHttpHandler
+    {
+
+
+        public object Get(string action, string pras)   //Alon 2023-03
+        {
+            //LogUtil.WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff ") + "--前端调用--" + action + ":", $"【Get动作】--- {action}     【Params参数】--- {pras}");
+            LogUtil.Write( ",【Get动作】---" +action  +","+   "【Params参数】"+pras);
+            object rlt = null;
+
+            switch (action)
+            {
+                case "api/getallitem":
+                    rlt = new ItemService().GetAllItem();
+                    break;
+                #region 测试使用,本次无用,已失效。
+                case "api/startmachine":
+                    new MachineService().StartMachine();
+                    break;
+
+                //case "api/excutenextworkorder":
+                //    new WorkOrderService().ExcuteNextWorkOrder();
+                //    break;
+                case "api/ExeGD_Change":   //IOT换工单
+                    new MachineService().Machine_GDChange();
+                    break;
+                case "api/ExeGD_End":   //工单结束
+                    new MachineService().Machine_GDEnd();
+                    break;
+                case "api/ExeGD_PLCDelete":   //工单结束
+                    new MachineService().Machine_PLCGDDelete();
+                    break;
+                case "api/machine_IFIXStart":    //启动设备
+                    new MachineService().StartMachine_IFIX();
+                    break;
+
+                case "api/GD_SETV1":    //设置工单为初始化状态
+                    new MachineService().GD_SETV1();
+                    break;
+                case "api/GD_Request1":    //设置工单为初始化状态
+                    new MachineService().GD_Requst();
+                    break;
+             
+
+                #endregion
+
+                #region AI模型控制功能
+
+
+                #endregion
+           
+                default:
+                    rlt = AppUtil.ConfigRouter(action, "get");
+                    break;
+            }
+            //Console.WriteLine("时间: {0}, 调用API: {1}  \r\n 返回结果:{2} ", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff"),action, JsonUtil.SerializeObject(rlt));
+            //LogUtil.WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff") + "--执行返回--" + action + ":", JsonUtil.SerializeObject(rlt));
+            LogUtil.Write("-------------------------------------------------------\t\n");
+            return rlt;
+        }
+
+        public object Post(string action, string pras)
+        {
+            //LogUtil.WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff") + "--前端调用--" + action + ":", $"Post:--- {action}  | Params:--- {pras}");
+            LogUtil.Write(",修改API:" + action + "," + "【Params参数】" + pras);
+            object rlt = null;
+            switch (action)
+            {
+                #region 测试使用,屏蔽
+                case "api/writeSingle":   //单点写操作
+                    rlt = new ItemService().WriteSingle(pras);
+                    break;
+                case "api/writeList":  //多点写操作
+                    rlt = new ItemService().WriteList(pras);
+                    break;
+                case "api/readList":   //多点读操作
+                    rlt = new ItemService().ReadList(pras);
+                    break;
+                case "api/readSingle":  //单点读操作
+                    rlt = new ItemService().ReadSingle(pras);
+                    break;
+                #endregion
+                default:
+                    if (action.Contains("AIFuc"))   //判断是否AI模型的方法调用 ( API方法要包括AIFuc )
+                    {
+                        rlt= AppUtil.TryFunc_AIRun(action, "post", pras);
+                        break;
+                    }
+                    rlt = AppUtil.ConfigRouter(action,"post",pras);
+                    break;
+
+            }
+            //Console.WriteLine("时间:{0},返回API:{1}  \r\n执行结果:{2} ", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff"), action, JsonUtil.SerializeObject(rlt));
+            //Console.WriteLine("********************************\t\n");
+            LogUtil.Write(",返回API:" + action+"\r\n执行结果:"+ JsonUtil.SerializeObject(rlt));
+            LogUtil.Write("***********【执行完成】**********"+"\r\n");
+            //LogUtil.Write("**************************************************\r\n");
+            //LogUtil.WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff ") + "--执行返回--" + action + ":", JsonUtil.SerializeObject(rlt));
+            //LogUtil.Write("-------------------------------------------------------\t\n");
+            return rlt;
+        }
+    }
+}

+ 68 - 0
Fine.OPCDaClientAI/App/BaseService.cs

@@ -0,0 +1,68 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Fine.OPCDaClient9000.App
+{
+    public class BaseService
+    {
+        
+        private DataItem Get(string itemName)
+        {
+            var item =OPCHelper.daServerMgr.GetItem(itemName);
+            return item;
+        }
+
+        public T GetValue<T>(string itemName)
+        {
+            var item = OPCHelper.daServerMgr.GetItem(itemName);
+            try
+            {
+                return (T)item.Value;
+            }
+            catch
+            {
+                return default(T);
+            }
+            
+        }
+
+        public void Write(string itemName, object value)
+        {
+            List<DataItem> items = new List<DataItem>();
+            items.Add(new DataItem() { TagAddress = itemName, Value = value });
+            OPCHelper.daServerMgr.Write(items);
+        }
+
+        public void Write(List<DataItem> items)
+        {
+            OPCHelper.daServerMgr.Write(items);
+        }
+
+        public void Write(DataItem item)
+        {
+            OPCHelper.daServerMgr.Write(new List<DataItem>() { item });
+        }
+
+        public T Read<T>(string itemName)
+        {
+            List<DataItem> items = OPCHelper.daServerMgr.ReadForServer(new string[] {itemName });
+
+            DataItem item = null;
+            if (items == null || items.Count == 0)
+                item = new DataItem();
+            else
+                item = items[0];
+
+            try
+            {                
+                return (T)item.Value;
+            }
+            catch {
+                return default(T);
+            }
+        }
+    }
+}

+ 600 - 0
Fine.OPCDaClientAI/App/Common/AppUtil.cs

@@ -0,0 +1,600 @@
+using Fine.OPCDaClient9000;
+using Fine.OPCDaClient9000.App;
+using Fine.OPCDaClient9000.Util;
+using Fine.Util;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace Fine.OPCDaClient9000.Util
+{
+    public static class AppUtil
+    {
+
+        private static List<IoModal> newConfig;
+
+        private static string apppath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "config", "Router");
+
+        public static Dictionary<string, DataItem> DataItemQueue = new Dictionary<string, DataItem>();
+
+        public static List<DataItem> DataPointCheckList = new List<DataItem>();
+
+        //初始化获取有配置文件
+        public static void InitAllDirectoryCfg()
+        {
+            if (Directory.Exists(apppath))
+            {
+                newConfig = GetFiles(apppath, "*.json");
+            }
+        }
+
+        public static List<string> CheckPointConfig { get { return newConfig.SelectMany(a => a.Params).SelectMany(a => a.keys).Select(a => a.CheckTagName).Distinct().ToList(); } }
+
+        /// <summary>
+        /// 读取文件夹下所有json,并转化为ioModal
+        /// </summary>
+        /// <param name="apppath"></param>
+        /// <returns></returns>
+        static List<IoModal> GetFiles(string directory, string pattern = "*.*")
+        {
+            List<IoModal> files = new List<IoModal>();
+            foreach (var item in Directory.GetFiles(directory, pattern))
+            {
+                files.AddRange(JsonConvert.DeserializeObject<List<IoModal>>(File.ReadAllText(item)));
+            }
+            foreach (var item in Directory.GetDirectories(directory))
+            {
+                files.AddRange(GetFiles(item, pattern));
+            }
+            return files;
+        }
+
+        public static PLCResultAll TryFunc_AIRun(string action, string method, string param = null)
+        {
+            try
+            {
+                return Func_AIRun(action, method, param);
+            }
+            catch (Exception ext)
+            {
+
+                LogUtil.WriteError($"AI:{action}异常",ext.Message);
+                return new PLCResultAll { Sucessful = false, Message = "AI接口失败" };
+            }
+        }
+
+        /// <summary>
+        /// AI模型的执行操作,依据不同的检查值,分别调用
+        /// </summary>
+        /// <param name="action"></param>
+        /// <param name="method"></param>
+        /// <param name="param"></param>
+        /// <returns></returns>
+        public static PLCResultAll  Func_AIRun(string action, string method, string param = null)
+        {
+            //判断不同的API调用
+            //依据不同的API名称的标识区分不同的检测点,后期可封装到配置文件中. along202305
+
+            float rlt = 0;
+            try
+            {
+                if (action.Contains("WQ2116_AIFuc"))   //回潮机
+                {
+                    rlt = Read<float>("THISNODE.JK_YT6022_L5KYPHC_MODE.F_CV");  //读取模式状态点
+                }
+                if (action.Contains("SJ2147_AIFuc"))   //加料机
+                {
+                    rlt = Read<float>("THISNODE.JK_YT6022_L5KYPJL_MODE.F_CV");  //读取模式状态点
+                }
+
+                //Console.WriteLine("时间:{0},调用API:{1},参数:{2},模式:{3}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff"),action,param,rlt);
+                LogUtil.Write(",调用API:" + action + ",参数:" + param + ", 模式:" + rlt);
+                string MyAction = "";   //转换后的调用API名称
+
+                switch (rlt)
+                {
+                    case 1:   //AI模型控制
+                        MyAction = action + "_AI";
+                        return ConfigRouter(MyAction, method, param);
+                    case 2:
+                        MyAction = action + "_Test";
+                        return ConfigRouter(MyAction, method, param);
+                    default:
+                        return new PLCResultAll { Sucessful = false, Message = "AI控制模式错误、请重新选择" };
+                }
+            }
+            catch (Exception ex)
+            {
+                Console.WriteLine(ex.Message);
+                return new PLCResultAll { Sucessful = false, Message = "程序异常!" };
+            }
+            
+        }
+
+
+        /// <summary>
+        /// 配置加载路由信息、调用检查
+        /// </summary>
+        /// <param name="action"></param>
+        /// <param name="method"></param>
+        /// <param name="param"></param>
+        /// <returns></returns>
+        public static PLCResultAll ConfigRouter(string action, string method, string param = null)
+        {
+            var first = newConfig.FirstOrDefault(a => "api/" + a.APIName == action && a.Method == method);
+            if (first != null)
+            {
+                //LogUtil.WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff") + first.APIName, "进入查询!");
+                if (param != null)
+                {
+                    return WrNewCheckList(first, param);
+                }
+                else
+                {
+                    return WrNewCheckList(first);
+                }
+            }
+            else
+            {
+                LogUtil.WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff") + "访问失败", "无此接口,访问无效");
+                return new PLCResultAll { Sucessful = false, Message = "文档错误,访问失败" };
+            }
+        }
+
+
+        public static PLCResultAll Test()
+        {
+            var first = newConfig.FirstOrDefault(a => a.APIName == "Ifix_Status" && a.Method == "get");    
+            //LogUtil.WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:fff") + "--PING IFX:", $"【Get动作】--- Ifix_Status     【Params参数】");
+            var data = WrNewCheckList(first);
+            //LogUtil.WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:fff") + "--PING IFX返回结果:",JsonConvert.SerializeObject(data));
+            return data;
+        }
+
+        private static PLCResultAll WrNewCheckList(IoModal iovar, string pras = null)
+        {
+            //Console.WriteLine("API调用时间: {0}", System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff"));
+            bool IsCheck = iovar.IsCheck;  //获取是否要校验读写结果
+
+            try
+            {
+                //情况1:GET方法,无参数
+                if (iovar.PType == EAPIparType.NoParam && string.IsNullOrEmpty(pras))
+                {
+                    var writestr = JsonUtil.SerializeObject(iovar.Params.SelectMany(a => a.keys).Select(a => new DataItem { TagAddress = a.WriteTagName, Value = a.StrValue }));
+                    var readstr = JsonUtil.SerializeObject(iovar.Params.SelectMany(a => a.keys).Select(a => new DataItem { TagAddress = a.CheckTagName, Value = a.StrValue }));
+                    return WriteListIsCheck(writestr, readstr, iovar.DelayTime, IsCheck);
+                }
+
+                //情况2:传入单值,如预热温度值下发
+                if (iovar.PType == EAPIparType.InOneVal)
+                {
+                    if (!string.IsNullOrEmpty(pras))   //判断是否有传入值
+                    {
+                        //iovar.StrValue = pras;   //更新配置的写入值为:调用时传入值
+
+                        var writestr = JsonUtil.SerializeObject(iovar.Params.SelectMany(a => a.keys).Select(a => new DataItem { TagAddress = a.WriteTagName, Value = pras }));
+                        var readstr = JsonUtil.SerializeObject(iovar.Params.SelectMany(a => a.keys).Select(a => new DataItem { TagAddress = a.CheckTagName, Value = pras }));
+                        return WriteListIsCheck(writestr, readstr, iovar.DelayTime, IsCheck);
+
+                    }
+                    else
+                    {
+                        return new PLCResultAll { Sucessful = false, Message = "传入参数为空", PlcResults = new List<DataItem> { new DataItem { TagAddress = "", IsSetSuccessful = false } } };
+                    }
+
+                }
+
+                //情况3:传入多值(Json方式),如工单号、批次号、牌号信息下发
+                if (iovar.PType == EAPIparType.inMultiValObj)   //检查配置中的:InputName对应关系
+                {
+                    JObject data = (JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(pras);
+                    var strWrite = JsonUtil.SerializeObject(iovar.Params.Where(a => a.Param == "").SelectMany(a => a.keys).Select(a => new DataItem { TagAddress = a.WriteTagName, Value = data.GetValue(a.InputName) }));
+                    var strRead = JsonUtil.SerializeObject(iovar.Params.Where(a => a.Param == "").SelectMany(a => a.keys).Select(a => new DataItem { TagAddress = a.CheckTagName, Value = data.GetValue(a.InputName) }));
+                    return WriteListIsCheck(strWrite, strRead, iovar.DelayTime, IsCheck);
+                }
+
+                //情况4:传入查询条件,如用柜号校验路径
+                if (iovar.PType == EAPIparType.InSel)
+                {
+                    //JObject data = (JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(pras);
+                    var strWrite = JsonUtil.SerializeObject(iovar.Params.Where(a => a.Param == pras).SelectMany(a => a.keys).Select(a => new DataItem { TagAddress = a.WriteTagName, Value = a.StrValue }));
+                    var strRead = JsonUtil.SerializeObject(iovar.Params.Where(a => a.Param == pras).SelectMany(a => a.keys).Select(a => new DataItem { TagAddress = a.CheckTagName, Value = a.StrValue }));
+                    return WriteListIsCheck(strWrite, strRead, iovar.DelayTime, IsCheck);
+                }
+                //情况5:传入查询条件后传入多个值
+                if (iovar.PType == EAPIparType.inSelAndMultiVal)
+                {
+                    JObject data = (JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(pras);
+                    SelYPno data1 = Newtonsoft.Json.JsonConvert.DeserializeObject<SelYPno>(pras);
+                    if (!string.IsNullOrEmpty(data1.GDNum))   //输入参数判断
+                    {
+                        var strWrite = JsonUtil.SerializeObject(iovar.Params.Where(a => a.Param == data1.GDNum).SelectMany(a => a.keys).Select(a => new DataItem { TagAddress = a.WriteTagName, Value = data.GetValue(a.InputName) }));
+                        var strRead = JsonUtil.SerializeObject(iovar.Params.Where(a => a.Param == data1.GDNum).SelectMany(a => a.keys).Select(a => new DataItem { TagAddress = a.CheckTagName, Value = data.GetValue(a.InputName) }));
+                        return WriteListIsCheck(strWrite, strRead, iovar.DelayTime, IsCheck);
+                    }
+
+                }
+                if (iovar.PType == EAPIparType.OnlyRead)
+                {
+                    // var writestr = JsonUtil.SerializeObject(iovar.Params.SelectMany(a => a.keys).Select(a => new DataItem { TagAddress = a.WriteTagName, Value = a.StrValue }));
+                    var readstr = JsonUtil.SerializeObject(iovar.Params.SelectMany(a => a.keys).Select(a => new DataItem { TagAddress = a.CheckTagName, Value = a.CheckValue }));
+                    List<DataItem> list = JsonUtil.DeserializeObject<List<DataItem>>(readstr);
+                    List<DataItem> rlt = OPCHelper.daServerMgr.ReadListForServer(list);
+                    foreach (var item in rlt)
+                    {
+                        var listdata = list.FirstOrDefault(a => a.TagAddress == item.TagAddress);
+                        if (listdata != null)
+                        {
+                            if (listdata.Value.ToString() == item.Value.ToString())
+                            {
+                                item.IsSetSuccessful = true;
+                                item.Message = "写入成功";
+                            }
+                            else
+                            {
+                                item.IsSetSuccessful = false;
+                                item.Message = "写入失败";
+                            }
+                        }
+                    }
+                    if (rlt.Count == 0)
+                    {
+                        throw new Exception("异常");
+                    }
+                    if (rlt.Exists(a => a.IsSetSuccessful == false))
+                    {
+                        return new PLCResultAll { Sucessful = false, PlcResults = rlt, Message = "读取失败" };
+                    }
+                    return new PLCResultAll { Sucessful = true, PlcResults = rlt, Message = "读取成功" };
+                }
+                return new PLCResultAll
+                {
+                    Sucessful = false,
+                    Message = "传入参数异常",
+                    PlcResults = new List<DataItem> { new DataItem { TagAddress = "", IsSetSuccessful = false }
+                }
+                };
+            }
+            catch (Exception ex)
+            {
+                LogUtil.WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff") + "错误信息", iovar.APIName + ex.Message);
+              
+                //Console.WriteLine("错误信息:{0}", ex.Message);
+                return new PLCResultAll
+                {
+                    Sucessful = false,
+                    Message = "接口程序执行错误,需检查!",
+                    PlcResults = new List<DataItem> { new DataItem { TagAddress = "", IsSetSuccessful = false }
+                    //throw;
+                    }
+                };
+
+            }
+        }
+
+
+        //写入批操作,加入是否检查标志(为1时检查,默认0为 不检查状态)
+        public static PLCResultAll WriteListIsCheck(string strWrite, string strRead, int duration, bool bCheck)   //写入标签LIST
+        {
+
+            List<DataItem> list = JsonConvert.DeserializeObject<List<DataItem>>(strWrite, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore });
+            PLCResultAll rlt_All = new PLCResultAll();
+            rlt_All.PlcResults = new List<DataItem>();
+
+            if (list.Count > 20)   //判断写入的数量,超过20不进行操作
+            {
+                LogUtil.WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff") + "错误信息", "写入数据过多,执行失败");
+                rlt_All.Sucessful = false;
+                rlt_All.Message = "写入数据过多,执行失败";
+                return rlt_All;
+            }
+            foreach (var item in list)
+            {
+                OPCHelper.daServerMgr.Write(new List<DataItem> { new DataItem { TagAddress = item.TagAddress, Value = item.Value } });
+                Thread.Sleep(5);  //间隔 时间
+
+            }
+
+            /// 1:在不检查状态下,直接返回结果信息 
+            if (!bCheck)   //在不检查状态下
+            {
+                LogUtil.WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff") + "不检查", "不检查");
+                rlt_All.Sucessful = true;
+                rlt_All.Message = "不检查";
+                rlt_All.PlcResults = new List<DataItem>() { new DataItem { TagAddress = "", IsSetSuccessful = false } };
+                return rlt_All;
+
+            }
+
+            //2:在检查状态,读回原有标签的数据
+            if (duration < 1000)///避免没有配置
+            {
+                duration = 2000;
+            }
+
+            //间隔等待,写入后数据更新再读出
+            //Thread.Sleep(duration);
+            int delatTime = 500;
+            bool listerner = false;   //True为正确读取值
+            List<DataItem> Rlst = null;
+            while (delatTime <= duration)    //循环增时,判断缓存的数据是否更新
+            {
+                //var resultbool = GetPointFromListerner(strRead);  //读取缓存记录
+                //if (resultbool.Count > 0 && ! resultbool.Exists(a => a == false))   //结果大于0 或 结果为false
+                //{
+                //    listerner = true;
+                //    break;
+                //}
+
+                Thread.Sleep(500);
+                delatTime += 500;
+                //定时主动读取 along 202305
+                PLCResultAll Rall = TimeReadList(list,strRead);
+                if (Rall.Sucessful==true)
+                {
+                    //Console.WriteLine("*************主动读取,获取全部正确值!************");
+                    LogUtil.Write(",动作:"+"主动读取,获取正确值!");
+                    return Rall;
+                }
+                //else
+                //{
+                //    LogUtil.Write(",结果:" + "数据不匹配"+",读取结果:"+ JsonUtil.SerializeObject(Rall));
+                //}
+
+            
+            }
+
+
+            return TimeReadList(list, strRead);
+            
+            //if (listerner)
+            //{
+            //    Rlst = DataPointCheckList;   //根据监听数据更新结果
+            //}
+            //else
+            //{
+            //    Rlst = ReadList(strRead);   //进行写入值的回读操作
+            //}
+            //rlt_All.Sucessful = true;   //默认成功,在下方的比较中只要其中有一个不正确,置为false。
+            //rlt_All.Message = "批量写入---成功";
+            //for (int i = 0; i < list.Count; i++)
+            //{
+            //    var write = list[i].TagAddress;
+            //    var check = Rlst[i].TagAddress;
+
+            //    //if (write == check)  //标签名相同时,进行两个值的比较
+            //    //{
+            //    //if (write.ToString() == check.ToString())    allen 2023-04 检查代码出错,进行屏蔽,修改
+            //    if (Rlst[i].Value == null)   //判断是否读取值,没有读取到(一般是标签值不存在情况),  跳出返回:写入失败
+            //    {
+            //        LogUtil.WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff") + "错误信息", "批量写入---失败");
+            //        Rlst[i].IsSetSuccessful = false;
+            //        Rlst[i].Message = "写入失败";
+            //        rlt_All.Sucessful = false;
+            //        rlt_All.Message = "批量写入---失败";
+            //        continue;
+            //        //break;
+            //    }
+            //    var ValWrite = list[i].Value.ToString();
+            //    var ValRead = Rlst[i].Value.ToString();
+            //    if (ValWrite == ValRead)  //进行两者值的比较
+            //    {
+            //        Rlst[i].IsSetSuccessful = true;
+            //        Rlst[i].Message = "写入成功";
+            //    }
+            //    else
+            //    {
+            //        LogUtil.WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff") + "错误信息", "批量写入---失败");
+            //        Rlst[i].IsSetSuccessful = false;
+            //        Rlst[i].Message = "写入失败";
+            //        rlt_All.Sucessful = false;
+            //        rlt_All.Message = "批量写入---失败";
+
+            //    }
+            //    rlt_All.PlcResults = Rlst;
+            //}
+
+            //if (bCheck == false)   //在不检查状态下
+            //{
+            //    rlt_All.Sucessful = true;
+            //    rlt_All.Message = "不检查写入值";
+            //    //return rlt_All;
+            //    //还要读取,时间调整为1S时间
+            //}
+            //return rlt_All;
+
+        }
+
+        /// <summary>
+        /// 定时读取OPC标签,获取结果集 along 202305
+        /// </summary>
+        /// <param name="strList"></param>
+        /// <returns></returns>
+        public static PLCResultAll TimeReadList(List<DataItem> list,string strRead)
+        {
+            PLCResultAll rlt_All = new PLCResultAll();
+            rlt_All.PlcResults = new List<DataItem>();
+            List<DataItem> Rlst = null;
+
+            Rlst = ReadList(strRead);   //进行写入值的回读操作
+            rlt_All.Sucessful = true;   //默认成功,在下方的比较中只要其中有一个不正确,置为false。
+            rlt_All.Message = "批量写入---成功";
+            for (int i = 0; i < list.Count; i++)
+            {
+                var write = list[i].TagAddress;
+                var check = Rlst[i].TagAddress;
+
+                //if (write == check)  //标签名相同时,进行两个值的比较
+                //{
+                //if (write.ToString() == check.ToString())    allen 2023-04 检查代码出错,进行屏蔽,修改
+                if (Rlst[i].Value == null)   //判断是否读取值,没有读取到(一般是标签值不存在情况),  跳出返回:写入失败
+                {
+                    //LogUtil.WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff") + "错误信息", "批量写入---读取后比较1");
+                    Rlst[i].IsSetSuccessful = false;
+                    Rlst[i].Message = "写入失败";
+                    rlt_All.Sucessful = false;
+                    rlt_All.Message = "批量写入---失败";
+                    continue;
+                    //break;
+                }
+                var ValWrite = list[i].Value.ToString();
+                var ValRead = Rlst[i].Value.ToString();
+                if (ValWrite == ValRead)  //进行两者值的比较
+                {
+                    Rlst[i].IsSetSuccessful = true;
+                    Rlst[i].Message = "写入成功";
+                }
+                else
+                {
+                    //LogUtil.WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff") + "错误信息", "批量写入---读取后比较2");
+                    Rlst[i].IsSetSuccessful = false;
+                    Rlst[i].Message = "写入失败";
+                    rlt_All.Sucessful = false;
+                    rlt_All.Message = "批量写入---失败";
+
+                }
+                rlt_All.PlcResults = Rlst;
+            }
+
+            
+            return rlt_All;
+
+        }
+
+
+        /// <summary>
+        /// 从回调的更新缓存读取结果值
+        /// </summary>
+        /// <param name="str"></param>
+        /// <returns></returns>
+        private static List<bool> GetPointFromListerner(string str)
+        {
+            DataPointCheckList = new List<DataItem>();
+            List<bool> result = new List<bool>();
+            List<DataItem> list = JsonUtil.DeserializeObject<List<DataItem>>(str);
+            foreach (var item in list)
+            {
+                if (item.TagAddress.EndsWith(".F_CV"))
+                {
+                    DataItem dataItem = null;
+                    if (AppUtil.DataItemQueue.TryGetValue(item.TagAddress, out dataItem))
+                    {
+                        if (float.Parse( item.Value.ToString()) == (float)dataItem.Value)
+                        {
+                            result.Add(true);
+                            dataItem.IsSetSuccessful = true;
+                            dataItem.Message = "写入成功!";
+                            DataPointCheckList.Add(dataItem);
+                        }
+                    }
+                    else
+                    {
+                        result.Add(false);
+                    }
+
+                }
+                else if (item.TagAddress.EndsWith(".A_CV"))
+                {
+                    DataItem dataItem = null;
+                    if (AppUtil.DataItemQueue.TryGetValue(item.TagAddress, out dataItem))
+                    {
+                        if (item.Value.ToString() == dataItem.Value.ToString())
+                        {
+                            result.Add(true);
+                            dataItem.IsSetSuccessful = true;
+                            dataItem.Message = "写入成功!";
+                            DataPointCheckList.Add(dataItem);
+                        }
+                    }
+                    else
+                    {
+                        result.Add(false);
+                    }
+                }
+            }
+            return result;
+        }
+
+        public static List<DataItem> ReadList(string str)   //读取多个标签
+        {
+            //List<string> tags = JsonUtil.DeserializeObject<List<string>>(str);
+            List<DataItem> list = JsonUtil.DeserializeObject<List<DataItem>>(str);
+            List<DataItem> rlt = new List<DataItem>();
+            foreach (var item in list)
+            {
+                if (item.TagAddress.EndsWith(".F_CV"))
+                {
+                    rlt.Add(new DataItem()
+                    {
+                        TagAddress = item.TagAddress,
+                        Value = Read<float>(item.TagAddress),
+
+                    });
+                }
+                else if (item.TagAddress.EndsWith(".A_CV"))
+                {
+                    rlt.Add(new DataItem()
+                    {
+                        TagAddress = item.TagAddress,
+                        Value = Read<string>(item.TagAddress),
+
+                    });
+
+                }
+                Thread.Sleep(5);
+            }
+            return rlt;
+        }
+
+
+
+        /// <summary>
+        /// 写入OPC
+        /// </summary>
+        /// <param name="itemName"></param>
+        /// <param name="value"></param>
+        public static void Write(string itemName, object value)
+        {
+            List<DataItem> items = new List<DataItem>();
+            items.Add(new DataItem() { TagAddress = itemName, Value = value });
+            OPCHelper.daServerMgr.Write(items);
+        }
+
+
+
+
+
+
+
+
+
+        /// <summary>
+        /// 读取RPC
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <param name="itemName"></param>
+        /// <returns></returns>
+        public static T Read<T>(string itemName)
+        {
+            List<DataItem> items = OPCHelper.daServerMgr.ReadForServer(new string[] { itemName });
+
+            DataItem item = null;
+            if (items == null || items.Count == 0)
+                item = new DataItem();
+            else
+                item = items[0];
+            return (T)item.Value;
+
+        }
+
+
+    }
+}

+ 150 - 0
Fine.OPCDaClientAI/App/ItemService.cs

@@ -0,0 +1,150 @@
+using Fine.Util;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Threading;
+
+namespace Fine.OPCDaClient9000.App
+{
+    public class ItemService
+    {
+        public DataItem WriteSingle(string str)
+        {
+            //List<DataItem> list = JsonUtil.DeserializeObject<List<DataItem>>(str);
+
+            DataItem dv = JsonUtil.DeserializeObject<DataItem>(str);
+            DataItem nDi = new DataItem()
+            {
+                TagAddress = dv.TagAddress,
+                Value = dv.Value
+            };
+            
+            //测试用屏蔽 Allen 2023-03
+            //DataItem di = new DataItem();
+            //di.TagAddress = "FIX.JK_QY1.F_CV";
+            //di.Value = 11;
+            //di.DeviceId = "101";
+
+            List<DataItem> lst2 = new List<DataItem>();
+            lst2.Add(nDi);
+            //OPCHelper.daServerMgr.Write(list);
+            OPCHelper.daServerMgr.WriteSingle(nDi);
+            //Thread.Sleep(100);
+            //OPCHelper.daServerMgr.WriteSingle(di);
+            
+            string strTag=JsonUtil.SerializeObject(nDi);
+            Thread.Sleep(1000);  //暂停
+            DataItem readitem = ReadSingle(nDi.TagAddress);
+            if (readitem.Value.ToString()== nDi.Value.ToString())
+            {
+                readitem.IsSetSuccessful = true;
+            }
+            else
+            {
+                readitem.IsSetSuccessful = false;
+            }
+            return readitem;
+        }
+
+
+        public PLCResultAll WriteList(string str)   //写入标签LIST
+        {
+            List<DataItem> list = JsonUtil.DeserializeObject<List<DataItem>>(str);
+            PLCResultAll rlt_All = new PLCResultAll();
+            rlt_All.PlcResults = new List<DataItem>();
+
+            if (list.Count>20)   //判断写入的数量,超过20不进行操作
+            {
+                //DataItem di = new DataItem() {
+                //    IsSetSuccessful = false,
+                //    Message = "写入数据量过多,执行失败",
+                //};
+                rlt_All.Sucessful = false;
+                rlt_All.Message = "写入数据量过多,执行失败";
+                return rlt_All;
+            }
+            OPCHelper.daServerMgr.Write(list);
+            //间隔等待,写入后数据更新再读出
+            Thread.Sleep(5000);
+            List<DataItem> Rlst = ReadList(str);   //进行写入值的回读操作
+
+            
+            rlt_All.Sucessful = true;   //默认成功,在下方的比较中只要其中有一个不正确,置为false。
+            rlt_All.Message = "批量写入---成功";
+
+            //数据校验,对写入值与读出值进行比较
+            //foreach (var item in list)  //传入
+            //{
+            //    foreach (var Ritem in Rlst)   //返回
+            //    {
+            //        if (item.TagAddress==Ritem.TagAddress)  //标签名相同时,进行两个值的比较
+            //        {
+            //            if (item.Value.ToString()==Ritem.Value.ToString())
+            //            {
+            //                item.IsSetSuccessful = true;
+            //            }
+            //            else
+            //            {
+            //                item.IsSetSuccessful = false;
+            //                rlt_All.Sucessful = false;
+            //                rlt_All.Message = "批量写入---失败";
+            //            }
+            //        }
+            //    }
+                for (int i = 0; i < list.Count; i++)
+                {
+                    for (int x = 0; x < Rlst.Count; x++)
+                    {
+                        if (list[i].TagAddress == Rlst[x].TagAddress)  //标签名相同时,进行两个值的比较
+                        {
+                            if (list[i].Value.ToString() == Rlst[x].Value.ToString())
+                            {
+                                Rlst[x].IsSetSuccessful = true;
+                                Rlst[x].Message = "写入成功";
+                            }
+                            else
+                            {
+                                Rlst[x].IsSetSuccessful = false;
+                                Rlst[x].Message = "写入失败";
+                                rlt_All.Sucessful = false;
+                                rlt_All.Message = "批量写入---失败";
+                            }
+                        }
+                }
+                rlt_All.PlcResults = Rlst;
+
+            }
+            return rlt_All;
+
+
+        }
+        public List<DataItem> GetAllItem()   //获取所有ITEM
+        {
+            
+            List<DataItem> list = OPCHelper.daServerMgr.GetAllDataItem();
+            return list;
+        }
+
+        public List<DataItem> ReadList(string str)   //读取多个标签
+        {
+            //List<string> tags = JsonUtil.DeserializeObject<List<string>>(str);
+            List<DataItem> list = JsonUtil.DeserializeObject<List<DataItem>>(str);
+
+            List <DataItem> rlt = OPCHelper.daServerMgr.ReadListForServer(list);
+
+            return rlt;
+
+        }
+        public DataItem ReadSingle(string str)   //读取单个标签
+        {
+            //string tags = JsonUtil.DeserializeObject<string>(str);
+
+            DataItem rlt = OPCHelper.daServerMgr.ReadSingleForServer(str);
+
+            return rlt;
+
+        }
+    }
+}

+ 90 - 0
Fine.OPCDaClientAI/App/MachineService.cs

@@ -0,0 +1,90 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Threading;
+using Fine.OPCDaClient9000.Util;
+
+namespace Fine.OPCDaClient9000.App
+{
+    public class MachineService: BaseService
+    {
+        //List<IoModal> LstIO_L5K_YPHC=AppUtil.GetConfig( ModuleEnum.HC);
+        public void StartMachine()
+        {
+           // float wd = Read<float>("YTSB.YTSB.YRWD");
+            float wd = Read<float>("FIX.YRWD.F_CV");
+            if (wd > 60)
+            {
+                //Write("FIX.BZ-ZHQD.F_CV", true);
+                Write("FIX.BZ-ZHQD.F_CV", 1);
+            }
+            else {
+                throw new Exception("温度值小于<60度,设备不能启动");
+            }
+        }
+
+        public void StartMachine_IFIX()
+        {
+            // float wd = Read<float>("YTSB.YTSB.YRWD");
+            float wd = Read<float>("FIX.YRWD.F_CV");
+            if (wd > 60)
+            {
+                //Write("FIX.BZ-ZHQD.F_CV", true);
+                Write("FIX.IOT_CMD.A_CV", "StartM1");
+            }
+            else
+            {
+                throw new Exception("温度值小于<60度,设备不能启动");
+            }
+        }
+        public void Machine_GDChange()  //换工单
+        {
+            //写入OPC标签值
+            //Write("FIX.IOT_CMD.A_CV", "");
+            //Thread.Sleep(500);
+            string nextGD = Read<string>("FIX.SI_NEXT_WORKORDERCODE.A_CV");
+            if (nextGD!="")
+            {
+                Write("FIX.IOT_CMD.A_CV", "GD_CHANGE");
+            }else
+            {
+                throw new Exception("无下一个工单,请确认后再操作!");
+            }
+            
+               //Thread.Sleep(500);
+               //Write("FIX.IOT_CMD.A_CV", "");
+
+        }
+        public void Machine_GDEnd()  //DB工单清除
+        {
+            //写入OPC标签值
+            //Write("FIX.IOT_CMD.A_CV", "");
+            //Thread.Sleep(500);
+            Write("FIX.IOT_CMD.A_CV", "GD_Delete");
+            //Thread.Sleep(500);
+            //Write("FIX.IOT_CMD.A_CV", "");
+
+        }
+        public void Machine_PLCGDDelete()  //PLC中工单
+        {
+            //写入OPC标签值
+            Write("FIX.IOT_CMD.A_CV", "GD_PLCDelete");
+        }
+        public void GD_SETV1()  //设置GD为初始化状态
+        {
+            //写入OPC标签值
+            Write("FIX.IOT_CMD.A_CV", "GD_SETV1");
+        }
+        public void GD_Requst()  //从DB中获取工单,到准备阶段
+        {
+            //写入OPC标签值
+            Write("FIX.IOT_CMD.A_CV", "GD_Request");
+
+
+        }
+
+
+    }
+}

+ 471 - 0
Fine.OPCDaClientAI/DAServerMgr.cs

@@ -0,0 +1,471 @@
+using Fine.MQTT;
+using Fine.OPCDaClient9000.Util;
+using Fine.Util;
+using Opc.Da;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Fine.OPCDaClient9000
+{
+    public class DAServerMgr
+    {
+       
+        private Opc.Da.Server _server;
+        private ServerConfig _config;
+        private Dictionary<string,DataItem> _dataItems = new Dictionary<string, DataItem>();
+        private MQTTClientMgr _mqttclient;
+        public string ID
+        {
+            get;set;
+        }
+
+        public bool Status
+        {
+            get; set;
+        }
+        //public delegate void StateChange(string serverid,int status,string error);
+        //public event StateChange StateChangeEvents;
+
+        /// <summary>
+        /// 状态更改Action serverid,状态,错误信息
+        /// </summary>
+        private Action<string, bool, string> _statusChangeHandler;
+
+        public DAServerMgr(Action<string, bool, string> statusChange)
+        {
+            _statusChangeHandler = statusChange;
+        }
+        SubscriptionState substate;
+        public DAServerMgr()
+        {
+            substate = new SubscriptionState();
+        }
+
+
+
+        public void Start()   //加载配置,连接OPC服务
+        {
+            try
+            {
+                //_config = JsonUtil.DeserializeObjectFile<ServerConfig>("config/opcserver.json");
+                _config = JsonUtil.DeserializeObjectFile<ServerConfig>("config/opcserverifix.json");
+                ConnectionAsync(_config.ServerName);
+                //_mqttclient = new MQTTClientMgr();
+                //_mqttclient.Start();
+                //AddConfigGroup(); 
+            }
+            catch (Exception ee)
+            {
+                LogUtil.WriteEnvDlog("启动错误:"+ee.Message);
+            }
+        }
+
+        public void DisConnectGroup() {
+            substate.Active = false;
+            AppUtil.DataItemQueue.Clear();
+        }
+
+        //加载组配置信息
+        public void AddConfigGroup() {
+            if (!_server.IsConnected)
+                return;
+            //SubscriptionState substate = new SubscriptionState();
+            substate.UpdateRate = 300;
+            //substate.KeepAlive = 1000;
+            substate.Deadband = _config.Group.Deadband;
+            substate.Active = true;
+            substate.UpdateRate = _config.Group.UpdateRate;
+            substate.ClientHandle = Guid.NewGuid().ToString();
+            ISubscription subscription = _server.CreateSubscription(substate);
+            subscription.DataChanged += Subscription_DataChanged;
+            List<Item> items = new List<Item>();
+            for (int i = 0; i < AppUtil.CheckPointConfig.Count; i++)
+            {
+                Item item = new Item();
+                item.ItemName = AppUtil.CheckPointConfig[i];
+                items.Add(item);
+
+                _dataItems[item.ItemName] = new DataItem() { TagAddress = item.ItemName, DeviceId = _config.Group.DeviceId };
+            }
+            var rlts = subscription.AddItems(items.ToArray());
+            foreach (var item in rlts)
+            {
+                LogUtil.WriteEnvDlog("Add item " + item.ItemName + ":" + (item.ResultID.Succeeded() ? "成功" : "失败"));
+            }
+        }
+
+        public void AddGroup()
+        {
+            if (!_server.IsConnected)
+                return;
+
+            SubscriptionState substate = new SubscriptionState();
+            substate.KeepAlive = 10000;
+            substate.Deadband = _config.Group.Deadband;
+            substate.Active = true;
+            substate.UpdateRate = _config.Group.UpdateRate;
+            substate.ClientHandle = Guid.NewGuid().ToString();
+            ISubscription subscription= _server.CreateSubscription(substate);
+            subscription.DataChanged += Subscription_DataChanged;
+            
+            //var rlt=subscription.Write(new ItemValue[] { itemValue });
+            List<Item> items = new List<Item>();
+            for (int i = 0; i < _config.Group.Items.Count; i++)
+            {
+                Item item = new Item();
+                item.ItemName = _config.Group.Items[i];
+                items.Add(item);
+
+                _dataItems[item.ItemName]=new DataItem() { TagAddress=item.ItemName, DeviceId=_config.Group.DeviceId };
+            }
+
+            var rlts = subscription.AddItems(items.ToArray());
+            foreach (var item in rlts)
+            {
+                LogUtil.WriteEnvDlog("Add item "+item.ItemName + ":" + (item.ResultID.Succeeded() ? "成功" : "失败"));
+            }
+        }
+
+        private void Subscription_DataChanged(object subscriptionHandle, object requestHandle, ItemValueResult[] values)
+        {
+            AppUtil.DataItemQueue.Clear();
+            //AppUtil.DataItemQueue = new Dictionary<string, DataItem>();
+            //var tmplist = new List<DataItem>();
+            foreach (var item in values)
+            {
+                var dataitem = _dataItems[item.ItemName];
+                if (dataitem != null)
+                {
+                    lock (dataitem)
+                    {
+                        dataitem.Value = item.Value;
+                        dataitem.IsGood = item.Quality == Quality.Good ? true : false;
+                        //dataitem.Timestamp = item.Timestamp.ToTimestamp();  along屏蔽
+                        //dataitem.Timestamp = item.Timestamp.ToLocalTime();
+                        dataitem.Timestamp = item.Timestamp.ToString("yyyy-MM-dd HH:mm:ss fff");
+                        //_mqttclient.Publish("/data/" + dataitem.DeviceId, JsonUtil.SerializeObject(dataitem));
+                        //AppUtil.DataItemQueue.Add(item.ItemName,dataitem);    //along 屏蔽
+                        Console.WriteLine("订阅功能-时间:{0} ,标签:{1},数值:{2}", item.Timestamp.ToLocalTime(),item.ItemName,item.Value);
+                    }
+                    
+                }
+                //Console.WriteLine($"{item.ItemName}:{item.Value}");
+            }
+
+            
+        }
+        
+
+        public async void ConnectionAsync(string serverName)
+        {
+
+            if (string.IsNullOrEmpty(serverName))
+            {
+                LogUtil.WriteEnvDlog($"{serverName}:为空,未发现服务!");
+                return;
+            }
+
+            Opc.Da.Server server = GetServer(serverName) as Opc.Da.Server;
+            if (server == null)
+            {
+                LogUtil.WriteEnvDlog($"没有找到OPC Server [{serverName}]");
+                throw new Exception($"没有找到OPC Server [{serverName}]");
+            }
+            _server = server;
+            await ServerConnectionAsync();
+            LogUtil.WriteEnvDlog($"{serverName}:连接执行成功!");
+        }
+
+        /// <summary>
+        /// 通过异步方式去连接服务
+        /// </summary>
+        /// <returns></returns>
+        private async Task ServerConnectionAsync()
+        {
+            await Task.Run(() =>
+            {
+                try
+                {
+                    _server.Connect();
+                }
+                catch (Exception ee)
+                {
+                    LogUtil.WriteEnvDlog($"[{_server.Name}]连接失败:{ee.Message}");
+                    SetStatus(false, ee.Message);
+                }
+
+                if (_server.IsConnected)
+                {
+                    SetStatus(true, "");
+                    LogUtil.WriteEnvDlog($"[{_server.Name}]连接成功...");
+                    _server.ServerShutdown += (e) =>
+                    {
+                        SetStatus(false, e);
+                    };
+
+                    //var list = ReadForServer(new string[] { "test.jyj.zzzz" });
+                    ///☆监听开始
+                    //AddGroup();
+                    // AddConfigGroup();
+                }
+            });
+        }
+
+       
+        /// <summary>
+        /// 断开服务连接
+        /// </summary>
+        public void DisConnect()
+        {
+            _server.Disconnect();
+            _server.Dispose();
+        }
+
+        private void SetStatus(bool status, string error)
+        {
+            Status = status;
+            if (_statusChangeHandler != null)
+            {
+                _statusChangeHandler(ID, status, error);
+            }
+        }
+
+
+        public Opc.Server[] GetUrls()
+        {             
+            Opc.IDiscovery m_discovery = new OpcCom.ServerEnumerator();
+            var servers = m_discovery.GetAvailableServers(Opc.Specification.COM_DA_20,"",null);
+            
+            return servers;
+        }
+
+        public Opc.Server GetServer(string serverName)
+        {
+            Opc.Server server = GetServer(serverName, Opc.Specification.COM_DA_30);
+
+            if (server == null)
+            {
+                server = GetServer(serverName, Opc.Specification.COM_DA_20);
+            }
+
+            if (server == null)
+            {
+                server = GetServer(serverName, Opc.Specification.COM_DA_10);
+            }
+            
+            return server;
+        }
+
+        private Opc.Server GetServer(string serverName, Opc.Specification specif)
+        {
+            Opc.IDiscovery m_discovery = new OpcCom.ServerEnumerator();
+
+            var serverlist = m_discovery.GetAvailableServers(specif,"",null);
+            foreach (var item in serverlist)
+            {
+                if (item.Name == serverName)
+                    return item;
+            }
+
+            return null;
+        }
+
+
+        public void Write(List<DataItem> items)
+        {
+            if (!_server.IsConnected)
+            {
+                return;
+            }
+            //List<ItemValue> listvalues = new List<ItemValue>();
+            //foreach (var item in items)
+            //{
+            //    ItemValue v = new ItemValue() { ItemName = item.TagAddress, Value = item.Value };
+            //    listvalues.Add(v);
+            //}
+            var listvalues = items.Select(a=>new ItemValue { ItemName = a.TagAddress, Value = a.Value }).ToArray();
+            _server.Write(listvalues);
+        }
+
+        //public List<DataItem> WriteList(List<DataItem> items)
+        //{
+        //    if (!_server.IsConnected)
+        //    {
+        //        return new List<DataItem>(); 
+        //    }
+        //    List<ItemValue> listvalues = new List<ItemValue>();
+        //    foreach (var item in items)
+        //    {
+        //        ItemValue v = new ItemValue() { ItemName = item.TagAddress, Value = item.Value };
+        //        listvalues.Add(v);
+        //    }
+        //    _server.Write(listvalues.ToArray());
+        //}
+
+
+        public void WriteSingle(DataItem items)    //写单点操作
+        {
+            if (!_server.IsConnected)
+            {
+                return;
+            }
+            List<ItemValue> listvalues = new List<ItemValue>();
+            //foreach (var item in items)
+            //{
+            //    ItemValue v = new ItemValue() { ItemName = item.TagAddress, Value = item.Value };
+            //    listvalues.Add(v);
+            //}
+            ItemValue v = new ItemValue() { ItemName = items.TagAddress, Value = items.Value };
+            listvalues.Add(v);
+            _server.Write(listvalues.ToArray());
+        }
+
+
+
+        public List<DataItem> ReadForServer(string[] tags)
+        {
+            if (!_server.IsConnected)
+            {
+                return new List<DataItem>();
+            }
+
+            List<Item> list = new List<Item>();
+            foreach (var tag in tags)
+            {
+                var item = new Item() { ItemName = tag };
+                list.Add(item);
+            }
+
+            var values=_server.Read(list.ToArray());
+
+            List<DataItem> rltlist = new List<DataItem>();
+
+            foreach (var item in values)
+            {
+                var dataitem = new DataItem()
+                {
+                    TagAddress = item.ItemName,
+                    Value = item.Value,
+                    IsGood = item.Quality == Quality.Good ? true : false,
+                    //Timestamp = item.Timestamp.ToTimestamp()   Allen屏蔽  2023-03
+                    //Timestamp = item.Timestamp.ToLocalTime()
+                    Timestamp = item.Timestamp.ToString("yyyy-MM-dd HH:mm:ss fff")
+            };
+
+                rltlist.Add(dataitem);
+            }
+
+            return rltlist;
+        }
+
+
+        /// <summary>
+        /// 读取-LIST列表方式  Allen 2023-03
+        /// </summary>
+        /// <param name="tags"></param>
+        /// <returns></returns>
+        public List<DataItem> ReadListForServer(List<DataItem> tagList)
+        {
+            //转换List到string[]
+
+            string[] tags = new string[tagList.Count];
+            int nCount = 0;
+            foreach (var v in tagList)
+            {
+                tags[nCount] = v.TagAddress.ToString();
+                nCount++;
+            }
+            if (!_server.IsConnected)
+            {
+                return new List<DataItem>();
+            }
+
+            List<Item> list = new List<Item>();
+            foreach (var tag in tags)
+            {
+                var item = new Item() { ItemName = tag};
+                list.Add(item);
+            }
+
+            var values = _server.Read(list.ToArray());
+
+            List<DataItem> rltlist = new List<DataItem>();
+
+            foreach (var item in values)
+            {
+                var dataitem = new DataItem()
+                {
+                    TagAddress = item.ItemName,
+                    Value = item.Value,
+                    IsGood = item.Quality == Quality.Good ? true : false,
+                    //Timestamp = item.Timestamp.ToTimestamp()   Allen屏蔽  2023-03
+                    //Timestamp = item.Timestamp.ToLocalTime()
+                    Timestamp = item.Timestamp.ToString("yyyy-MM-dd HH:mm:ss fff")
+                };
+
+                rltlist.Add(dataitem);
+            }
+
+            return rltlist;
+        }
+
+        public DataItem ReadSingleForServer(string  tags)   //单点读取
+        {
+            if (!_server.IsConnected)
+            {
+                return new DataItem();
+            }
+
+            
+            List<Item> list = new List<Item>();
+            var item1 = new Item() { ItemName = tags };
+            list.Add(item1);
+
+
+            var values = _server.Read(list.ToArray());
+
+            List<DataItem> rltlist = new List<DataItem>();
+
+            foreach (var item in values)
+            {
+                var dataitem = new DataItem()
+                {
+                    TagAddress = item.ItemName,
+                    Value = item.Value,
+                    IsGood = item.Quality == Quality.Good ? true : false,      //返回状态
+                    IsSetSuccessful = item.Quality == Quality.Good ? true : false,   //返回状态
+                    //Timestamp = item.Timestamp.ToTimestamp()
+                    Timestamp = item.Timestamp.ToString("yyyy-MM-dd HH:mm:ss fff")
+                };
+               
+                rltlist.Add(dataitem);
+            }
+            if (rltlist.Count==1)
+            {
+                return rltlist[0];
+            }
+            else
+            {
+                return new DataItem();
+            }
+            
+        }
+        public List<DataItem> GetAllDataItem()
+        {
+            return _dataItems.Values.AsEnumerable().ToList();
+        }
+
+        public DataItem GetItem(string itemName)
+        {
+            if (_dataItems.ContainsKey(itemName))
+                return _dataItems[itemName];
+            else
+                return new DataItem();
+        }
+        
+
+    }
+}

+ 58 - 0
Fine.OPCDaClientAI/DataItem.cs

@@ -0,0 +1,58 @@
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Fine.OPCDaClient9000
+{
+
+    public class DataItem
+    {
+        [JsonIgnore]
+        public string DeviceId
+        { get; set; }
+
+        [JsonProperty("TagAddress")]
+        public string TagAddress  //标签名
+        { get; set; }
+
+        [JsonIgnore]
+        public string Code    //编码
+        { get; set; }
+
+        public object Value  //数据值
+        { get; set; }
+
+        //public long Timestamp   //时间
+        //{ get; set; }
+        //public DateTime Timestamp   //时间
+        //{ get; set; }
+        [JsonIgnore]
+        public string Timestamp   //时间
+        { get; set; }
+
+        [JsonIgnore]
+        public bool IsGood   //数据状态
+        { get; set; } = false;
+
+        [JsonIgnore]
+        public string DataType { get; set; }   //数据类型
+
+        [JsonProperty("IsSetSuccessful")]
+        public bool IsSetSuccessful { get; set; }   //检查结果,1为校对正确,0为校对异常
+
+        [JsonProperty("Message")]
+        public string Message { get; set; }   //tag操作消息提示
+
+        /// <summary>
+        /// 操作点位:点位值
+        /// </summary>
+        /// [JsonIgnore]
+        [JsonIgnore]
+        public string PreviousValue { get; set; }  
+
+        //public TagType OpcTageType { get; set; }   //标签类型
+    }
+}

+ 88 - 0
Fine.OPCDaClientAI/DataMode/IoModal.cs

@@ -0,0 +1,88 @@
+using Fine.OPCDaClient9000.Util;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Fine.OPCDaClient9000
+{
+    /// <summary>
+    /// 对PLC的写入点\校验点\间隔时间(来自配置)
+    /// </summary>
+   public class IoModal 
+    {
+        /// <summary>
+        /// API调用名
+        /// </summary>
+        public string APIName { get; set; }   //API接口名
+        public bool IsCheck { get; set; } = true;  //是否进行标签读写校验,默认为:校验
+        public int DelayTime { get; set; }   //读写间隔延时
+        public List<Params> @Params { get; set; } = new List<Params>();
+        public string Method { get;  set; } = "";
+        public EAPIparType PType { get;  set; }
+    }
+
+    public class Params
+    {
+        public string Param { get; set; }
+        public List<WriteAndCheckKey> keys { get; set; } = new List<WriteAndCheckKey>();
+    }
+
+    public class WriteAndCheckKey
+    {
+        public string InputName { get; set; }
+        public string WriteTagName { get; set; }
+        public string CheckTagName { get; set; }
+        public string StrValue { get; set; }
+        public string CheckValue { get; set; }
+        public int DelayTime { get; set; }
+    }
+
+
+    /// <summary>
+    /// 工单信息
+    /// </summary>
+    public class GDinfo
+    {
+        /// <summary>
+        /// 当前设备/工序名称
+        /// </summary>
+        public string CurDev { get; set; }
+
+        /// <summary>
+        /// 工单号
+        /// </summary>
+        public string GDNum { get; set; }
+
+        /// <summary>
+        /// 批次号
+        /// </summary>
+        public string BatchNum { get; set; }
+
+        /// <summary>
+        /// 牌号
+        /// </summary>
+        public string BrandNum { get; set; }
+
+    }
+
+    public class TankInfo   //料筒信息---下发
+    {
+        /// <summary>
+        /// 批次号
+        /// </summary>
+        public string TankPCH { get; set; }
+
+        /// <summary>
+        /// 物料代码
+        /// </summary>
+        public string MaterielCode { get; set; }
+
+        /// <summary>
+        /// 物料重量
+        /// </summary>
+        public float MaterielWeight { get; set; }
+    }
+
+}

+ 75 - 0
Fine.OPCDaClientAI/DataMode/RetMsg.cs

@@ -0,0 +1,75 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Fine.OPCDaClient9000.App
+{
+    public class RetMsg   //返回消息
+    {
+        public bool IsSetSuccessful { get; set; }  //执行比对情况反馈
+
+        //public string ExeTime { get; set; }  //执行时间
+        //public string ExeProc { get; set; }   //执行的过程操作
+
+        //public string Param { get; set; }  //下发的参数值
+        public string Message { get; set; }  //返回的消息说明
+        public int  ErrCode { get; set; }   //错误编码,在执行中的异常反馈(0-无故障、其它为故障编码)
+
+
+    }
+   
+    public class LogMsg   //返回消息
+    {
+        public string ExeTime { get; set; }  //执行时间
+        public string ExeProc { get; set; }   //执行的过程操作
+        public string Param { get; set; }  //下发的参数值
+        public RetMsg Retinfo;  //返回信息
+
+    }
+    public class LogMsg1   //返回消息
+    {
+        public string ExeTime { get; set; }  //执行时间
+        public bool IsSetSuccessful { get; set; }   //执行的过程操作
+
+        public List<RetMsg> Retinfo { get; set; }  //返回信息
+
+    }
+    /// <summary>
+    /// PLC执行结果
+    /// </summary>
+    public class PLCResultAll
+    {
+        /// <summary>
+        /// 执行结果详情
+        /// </summary>
+        public List<DataItem> PlcResults { get; set; } = new List<DataItem>();
+        /// <summary>
+        /// 批执行---总结果
+        /// </summary>
+        public bool Sucessful { get; set; } = true;
+        /// <summary>
+        /// 批执行---总消息
+        /// </summary>
+        public string Message { get; set; }
+    }
+
+    /// <summary>
+    /// 柜信息
+    /// </summary>
+    public class GPinfo  
+    {
+
+    }
+
+
+
+    public class SelYPno  //选柜操作
+    {
+        public string GDNum { get; set; }
+        public string BatchNum { get; set; }
+        public string BrandNum { get; set; }
+    }
+
+}

+ 12 - 0
Fine.OPCDaClientAI/DbContext/SqlDbContext.cs

@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Fine.OPCDaClient9000.DbContext
+{
+    class SqlDbContext
+    {
+    }
+}

+ 28 - 0
Fine.OPCDaClientAI/DbContext/SqlServerDbContext.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Data.SqlClient;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+
+namespace Fine.OPCDaClient9000.DbContext
+{
+    public class SqlServerDbContext
+    {
+        public IDbConnection Create(string configname)
+        {
+            
+            string constr = ConfigurationManager.ConnectionStrings[configname].ConnectionString;
+            var conn = new SqlConnection(constr);
+            return conn;
+        }
+
+        public System.Data.IDbConnection Create()
+        {
+            return Create("default");
+        }
+    }
+}

+ 20 - 0
Fine.OPCDaClientAI/Entitys/TechParam.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Fine.OPCDaClient9000.Entitys
+{
+    public class TechParam
+    {
+        public int Id
+        { get; set; }
+
+        public string ParCode
+        { get; set; }
+
+        public double ParValue
+        { get; set; }
+    }
+}

+ 26 - 0
Fine.OPCDaClientAI/Entitys/WorkOrder.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Fine.OPCDaClient9000.Entitys
+{
+    public class WorkOrder
+    {
+        public int Id
+        { get; set; }
+
+        public string WorkOrderCode
+        { get; set; }
+
+        public int TechId
+        { get; set; }
+
+        public int Status
+        { get; set; }
+
+        public int Seq
+        { get; set; }
+    }
+}

+ 179 - 0
Fine.OPCDaClientAI/Fine.OPCDaClientAI.csproj

@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{60BE333D-E007-4BE6-AD1B-A3C5272508E5}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>Fine.OPCDaClientAI</RootNamespace>
+    <AssemblyName>Fine.OPCDaClientAI</AssemblyName>
+    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>0</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup>
+    <StartupObject />
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+      <HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
+    </Reference>
+    <Reference Include="OpcNetApi">
+      <HintPath>..\packages\OpcNetApi.2.1.107\lib\net40\OpcNetApi.dll</HintPath>
+    </Reference>
+    <Reference Include="OpcNetApi.Com">
+      <HintPath>..\packages\OpcNetApi.Com.2.1.107\lib\net40\OpcNetApi.Com.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Configuration" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Drawing.Design" />
+    <Reference Include="System.Web.Extensions" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="App\AppHandle.cs" />
+    <Compile Include="App\BaseService.cs" />
+    <Compile Include="App\Common\AppUtil.cs" />
+    <Compile Include="App\ItemService.cs" />
+    <Compile Include="App\MachineService.cs" />
+    <Compile Include="DAServerMgr.cs" />
+    <Compile Include="DataItem.cs" />
+    <Compile Include="DataMode\IoModal.cs" />
+    <Compile Include="DataMode\RetMsg.cs" />
+    <Compile Include="DbContext\SqlDbContext.cs" />
+    <Compile Include="DbContext\SqlServerDbContext.cs" />
+    <Compile Include="Entitys\TechParam.cs" />
+    <Compile Include="Entitys\WorkOrder.cs" />
+    <Compile Include="Form1.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Form1.Designer.cs">
+      <DependentUpon>Form1.cs</DependentUpon>
+    </Compile>
+    <Compile Include="OPCHelper.cs" />
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="ServerConfig.cs" />
+    <Compile Include="Tool\MyTool.cs" />
+    <Compile Include="Util\Enumic.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+    <None Include="config\httpserver.json">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Include="config\mqttclient.json">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Include="config\opcserver.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="config\opcserverifix.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="config\Router\JsonCfg\JL5K_AIMode.json">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Include="config\Router\JsonCfg\JL5K_YPG.json">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Include="config\Router\JsonCfg\JL5K_AIwrite.json">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Include="config\Router\Status\FixStatus.json">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Include="packages.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Fine.HttpServer\Fine.HttpServer.csproj">
+      <Project>{d2d51a0a-9a58-43be-90cf-f2165071a634}</Project>
+      <Name>Fine.HttpServer</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\Fine.IHttpServer\Fine.IHttpServer.csproj">
+      <Project>{86ca6c5e-e25f-4831-8050-d09defcadb04}</Project>
+      <Name>Fine.IHttpServer</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\Fine.MQTT\Fine.MQTT.csproj">
+      <Project>{FC246947-BB3B-4E6B-A7E8-121F100F00C5}</Project>
+      <Name>Fine.MQTT</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\Fine.Util\Fine.Util.csproj">
+      <Project>{95450657-3181-49b3-abeb-8862741288bb}</Project>
+      <Name>Fine.Util</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\MQTTClient\MQTTClient.csproj">
+      <Project>{08d414a4-c354-4e04-b0e2-de4cd46bc04a}</Project>
+      <Name>MQTTClient</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\OpcClientMqtt\OpcClientMqtt.csproj">
+      <Project>{e6409c40-8546-4fa7-bb38-79a4e7723e75}</Project>
+      <Name>OpcClientMqtt</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="Form1.resx">
+      <DependentUpon>Form1.cs</DependentUpon>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
+      <Visible>False</Visible>
+      <ProductName>Microsoft .NET Framework 4.7.2 %28x86 和 x64%29</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <ItemGroup>
+    <Folder Include="config\Router\9000\" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>

+ 280 - 0
Fine.OPCDaClientAI/Form1.Designer.cs

@@ -0,0 +1,280 @@
+
+namespace Fine.OPCDaClient9000
+{
+    partial class Form1
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            this.groupBox1 = new System.Windows.Forms.GroupBox();
+            this.label5 = new System.Windows.Forms.Label();
+            this.label6 = new System.Windows.Forms.Label();
+            this.button5 = new System.Windows.Forms.Button();
+            this.HttptextBox = new System.Windows.Forms.Label();
+            this.button4 = new System.Windows.Forms.Button();
+            this.ServertextBox = new System.Windows.Forms.Label();
+            this.IFixlabel = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.button3 = new System.Windows.Forms.Button();
+            this.label3 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.label1 = new System.Windows.Forms.Label();
+            this.button1 = new System.Windows.Forms.Button();
+            this.button2 = new System.Windows.Forms.Button();
+            this.TitleLabel1 = new System.Windows.Forms.Label();
+            this.IfixTimmer = new System.Windows.Forms.Timer(this.components);
+            this.groupBox1.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // groupBox1
+            // 
+            this.groupBox1.Controls.Add(this.label5);
+            this.groupBox1.Controls.Add(this.label6);
+            this.groupBox1.Controls.Add(this.button5);
+            this.groupBox1.Controls.Add(this.HttptextBox);
+            this.groupBox1.Controls.Add(this.button4);
+            this.groupBox1.Controls.Add(this.ServertextBox);
+            this.groupBox1.Controls.Add(this.IFixlabel);
+            this.groupBox1.Controls.Add(this.label4);
+            this.groupBox1.Controls.Add(this.button3);
+            this.groupBox1.Controls.Add(this.label3);
+            this.groupBox1.Controls.Add(this.label2);
+            this.groupBox1.Controls.Add(this.label1);
+            this.groupBox1.Location = new System.Drawing.Point(17, 111);
+            this.groupBox1.Margin = new System.Windows.Forms.Padding(4);
+            this.groupBox1.Name = "groupBox1";
+            this.groupBox1.Padding = new System.Windows.Forms.Padding(4);
+            this.groupBox1.Size = new System.Drawing.Size(822, 287);
+            this.groupBox1.TabIndex = 0;
+            this.groupBox1.TabStop = false;
+            this.groupBox1.Text = "状态";
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Location = new System.Drawing.Point(213, 236);
+            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(82, 24);
+            this.label5.TabIndex = 12;
+            this.label5.Text = "未开始";
+            // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Location = new System.Drawing.Point(13, 236);
+            this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(106, 24);
+            this.label6.TabIndex = 11;
+            this.label6.Text = "监听状态";
+            // 
+            // button5
+            // 
+            this.button5.Location = new System.Drawing.Point(651, 67);
+            this.button5.Margin = new System.Windows.Forms.Padding(4);
+            this.button5.Name = "button5";
+            this.button5.Size = new System.Drawing.Size(157, 57);
+            this.button5.TabIndex = 5;
+            this.button5.Text = "监听开始";
+            this.button5.UseVisualStyleBackColor = true;
+            this.button5.Click += new System.EventHandler(this.button5_Click);
+            // 
+            // HttptextBox
+            // 
+            this.HttptextBox.AutoSize = true;
+            this.HttptextBox.Location = new System.Drawing.Point(217, 83);
+            this.HttptextBox.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.HttptextBox.Name = "HttptextBox";
+            this.HttptextBox.Size = new System.Drawing.Size(82, 24);
+            this.HttptextBox.TabIndex = 10;
+            this.HttptextBox.Text = "label6";
+            // 
+            // button4
+            // 
+            this.button4.Location = new System.Drawing.Point(651, 144);
+            this.button4.Margin = new System.Windows.Forms.Padding(4);
+            this.button4.Name = "button4";
+            this.button4.Size = new System.Drawing.Size(157, 57);
+            this.button4.TabIndex = 4;
+            this.button4.Text = "监听停止";
+            this.button4.UseVisualStyleBackColor = true;
+            this.button4.Click += new System.EventHandler(this.button4_Click);
+            // 
+            // ServertextBox
+            // 
+            this.ServertextBox.AutoSize = true;
+            this.ServertextBox.ForeColor = System.Drawing.SystemColors.Highlight;
+            this.ServertextBox.Location = new System.Drawing.Point(217, 36);
+            this.ServertextBox.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ServertextBox.Name = "ServertextBox";
+            this.ServertextBox.Size = new System.Drawing.Size(82, 24);
+            this.ServertextBox.TabIndex = 9;
+            this.ServertextBox.Text = "label6";
+            // 
+            // IFixlabel
+            // 
+            this.IFixlabel.AutoSize = true;
+            this.IFixlabel.Location = new System.Drawing.Point(213, 177);
+            this.IFixlabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.IFixlabel.Name = "IFixlabel";
+            this.IFixlabel.Size = new System.Drawing.Size(82, 24);
+            this.IFixlabel.TabIndex = 8;
+            this.IFixlabel.Text = "label5";
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Location = new System.Drawing.Point(13, 177);
+            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(154, 24);
+            this.label4.TabIndex = 7;
+            this.label4.Text = "IFix连接状态";
+            // 
+            // button3
+            // 
+            this.button3.Location = new System.Drawing.Point(217, 115);
+            this.button3.Margin = new System.Windows.Forms.Padding(4);
+            this.button3.Name = "button3";
+            this.button3.Size = new System.Drawing.Size(175, 51);
+            this.button3.TabIndex = 6;
+            this.button3.Text = "打开路径";
+            this.button3.UseVisualStyleBackColor = true;
+            this.button3.Click += new System.EventHandler(this.button3_Click);
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(13, 131);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(142, 24);
+            this.label3.TabIndex = 5;
+            this.label3.Text = "查看Log日志";
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(13, 83);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(178, 24);
+            this.label2.TabIndex = 3;
+            this.label2.Text = "服务开启状态:";
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(9, 37);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(178, 24);
+            this.label1.TabIndex = 0;
+            this.label1.Text = "服务接口地址:";
+            // 
+            // button1
+            // 
+            this.button1.Location = new System.Drawing.Point(17, 417);
+            this.button1.Margin = new System.Windows.Forms.Padding(4);
+            this.button1.Name = "button1";
+            this.button1.Size = new System.Drawing.Size(241, 66);
+            this.button1.TabIndex = 1;
+            this.button1.Text = "启动";
+            this.button1.UseVisualStyleBackColor = true;
+            this.button1.Click += new System.EventHandler(this.button1_Click);
+            // 
+            // button2
+            // 
+            this.button2.Location = new System.Drawing.Point(309, 417);
+            this.button2.Margin = new System.Windows.Forms.Padding(4);
+            this.button2.Name = "button2";
+            this.button2.Size = new System.Drawing.Size(254, 66);
+            this.button2.TabIndex = 2;
+            this.button2.Text = "停止";
+            this.button2.UseVisualStyleBackColor = true;
+            this.button2.Click += new System.EventHandler(this.button2_Click);
+            // 
+            // TitleLabel1
+            // 
+            this.TitleLabel1.AutoSize = true;
+            this.TitleLabel1.Font = new System.Drawing.Font("宋体", 25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.TitleLabel1.Location = new System.Drawing.Point(18, 23);
+            this.TitleLabel1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.TitleLabel1.Name = "TitleLabel1";
+            this.TitleLabel1.Size = new System.Drawing.Size(199, 67);
+            this.TitleLabel1.TabIndex = 3;
+            this.TitleLabel1.Text = "Title";
+            this.TitleLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // IfixTimmer
+            // 
+            this.IfixTimmer.Interval = 5000;
+            this.IfixTimmer.Tick += new System.EventHandler(this.IfixTimmer_Tick);
+            // 
+            // Form1
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(856, 524);
+            this.Controls.Add(this.TitleLabel1);
+            this.Controls.Add(this.button2);
+            this.Controls.Add(this.button1);
+            this.Controls.Add(this.groupBox1);
+            this.Margin = new System.Windows.Forms.Padding(4);
+            this.Name = "Form1";
+            this.Text = "青岛卷烟厂";
+            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
+            this.Load += new System.EventHandler(this.Form1_Load);
+            this.groupBox1.ResumeLayout(false);
+            this.groupBox1.PerformLayout();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.GroupBox groupBox1;
+        private System.Windows.Forms.Button button1;
+        private System.Windows.Forms.Button button2;
+        private System.Windows.Forms.Label TitleLabel1;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Button button3;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.Label IFixlabel;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.Label HttptextBox;
+        private System.Windows.Forms.Label ServertextBox;
+        private System.Windows.Forms.Timer IfixTimmer;
+        private System.Windows.Forms.Button button4;
+        private System.Windows.Forms.Button button5;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.Label label6;
+    }
+}

+ 235 - 0
Fine.OPCDaClientAI/Form1.cs

@@ -0,0 +1,235 @@
+
+using Fine.OPCDaClient9000.App;
+using Fine.OPCDaClient9000.Util;
+using Fine.Util;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Configuration;
+using System.Data;
+using System.Drawing;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Net.Sockets;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace Fine.OPCDaClient9000
+{
+    public partial class Form1 : Form
+    {
+        private HttpServer.HttpServer<AppHandle> httpserver;
+        private bool Listerner = false;
+        public Form1()
+        {
+            InitializeComponent();
+            AppUtil.InitAllDirectoryCfg();
+
+        }
+
+        private void ListernerState() {
+            if (Listerner==true)
+            {
+                label5.Text = "监听开始";
+                button5.Enabled = false;
+                button4.Enabled = true;
+            }
+            else
+            {
+                label5.Text = "监听停止";
+                button4.Enabled = false;
+                button5.Enabled = true;
+            }
+        }
+
+        DAServerMgr damgr;
+        private void Form1_Load(object sender, EventArgs e)
+        {
+            var httppar = JsonUtil.DeserializeObjectFile<HttpServer.HttpServerParams>("config/httpserver.json");
+
+            TitleLabel1.Text = httppar.Service;
+            IFixlabel.Text = "启动后显示状态";
+            IFixlabel.ForeColor = Color.Red;
+            ServertextBox.Text = $"http://{GetServerIP()}:{httppar.Port}";
+            ///加载配置
+            HttptextBox.ForeColor = Color.Red;
+            HttptextBox.Text = "未开启";
+             damgr = new DAServerMgr();
+            damgr.Start();
+            OPCHelper.daServerMgr = damgr;
+            httpserver = new HttpServer.HttpServer<AppHandle>(httppar);
+            //httpserver.Start();
+            label5.Text = "未开始";
+
+            //自动置按钮
+            //ChangeServerStatus(true);
+        }
+
+        private void ChangeServerStatus(bool start)
+        {
+            if (start)
+            {
+                IfixTimmer.Interval = 3000;
+                IfixTimmer.Start();
+                HttptextBox.ForeColor = Color.Green;
+                httpserver.Start();
+                HttptextBox.Text = "已开启";
+                button1.Enabled = false;
+                button2.Enabled = true;
+            }
+            else
+            {
+                IfixTimmer.Stop();
+                IFixlabel.Text = "启动后显示状态";
+                IFixlabel.ForeColor = Color.Red;
+                HttptextBox.ForeColor = Color.Red;
+                httpserver.Close();
+                HttptextBox.Text = "未开启";
+                button1.Enabled = true;
+                button2.Enabled = false;
+            }
+        }
+
+        private void IFixStatus(int Stat)
+        {
+            if (Stat == 1)
+            {
+                IFixlabel.Text = "正常";
+                IFixlabel.ForeColor = Color.Green;
+            }
+            else if (Stat == 2)
+            {
+                IFixlabel.Text = "未连接";
+                IFixlabel.ForeColor = Color.Red;
+            }
+            else
+            {
+                IFixlabel.Text = "未连接";
+                IFixlabel.ForeColor = Color.Red;
+            }
+
+        }
+
+        private string GetServerIP()
+        {
+            string ipstr = "+";
+            var host = Dns.GetHostEntry(Dns.GetHostName());
+            foreach (var ip in host.AddressList)
+            {
+                if (ip.AddressFamily == AddressFamily.InterNetwork)
+                {
+                    ipstr = ip.ToString();
+                    break;
+                }
+
+            }
+            return ipstr;
+        }
+
+        private void button1_Click(object sender, EventArgs e)
+        {
+            ChangeServerStatus(true);
+        }
+
+        private void button2_Click(object sender, EventArgs e)
+        {
+            ChangeServerStatus(false);
+            //this.IfixTimmer.Enabled = false;
+        }
+        string log_OpenFolderPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ConfigurationManager.AppSettings["logpath"]);
+        private void button3_Click(object sender, EventArgs e)
+        {
+
+
+            System.Diagnostics.Process.Start("explorer.exe", log_OpenFolderPath);
+        }
+
+        private void IfixTimmer_Tick(object sender, EventArgs e)
+        {
+            ListernerState();
+            //LoadLog();
+            try
+            {
+
+                var data = AppUtil.Test();
+                if (data.Sucessful)
+                {
+                    IFixStatus(1);
+                }
+                else
+                {
+                    IFixStatus(2);
+                }
+            }
+            catch
+            {
+                IFixStatus(3);
+
+            }
+        }
+        private string Read()
+        {
+            string file = Directory.GetFiles(log_OpenFolderPath).OrderByDescending(a => a).FirstOrDefault();
+            if (!string.IsNullOrEmpty(file))
+            {
+                using (StreamReader sr = new StreamReader(file, Encoding.UTF8, true))
+                {
+                    return sr.ReadToEnd();
+                }
+            }
+            else
+            {
+                return "";
+            }
+
+        }
+
+        private void button4_Click(object sender, EventArgs e)
+        {
+            damgr.DisConnectGroup();
+            Listerner = false;
+        }
+
+        private void button5_Click(object sender, EventArgs e)
+        {
+            damgr.AddConfigGroup();
+            Listerner = true;
+        }
+
+        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
+        {
+            damgr.DisConnectGroup();
+            Listerner = false;
+            IfixTimmer.Enabled = false;
+            
+
+        }
+
+        //private void LoadLog() {
+        //    richTextBox1.Text = Read();
+        //}
+
+        //private void IfixTimmer_Tick(object sender, EventArgs e)
+        //{
+        //    try
+        //    {
+
+        //       var data= AppUtil.Test("THISNODE.IFIX_Status.F_CV");
+        //        if (data.Sucessful)
+        //        {
+        //            IFixStatus(1);
+        //        }
+        //        else {
+        //            IFixStatus(2);
+        //        }
+        //    }
+        //    catch 
+        //    {
+        //        IFixStatus(3);
+
+        //    }
+        //}
+    }
+}

+ 123 - 0
Fine.OPCDaClientAI/Form1.resx

@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="IfixTimmer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+</root>

+ 15 - 0
Fine.OPCDaClientAI/OPCHelper.cs

@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Fine.OPCDaClient9000
+{
+    public class OPCHelper
+    {
+        public static DAServerMgr daServerMgr { get; set; }
+
+        
+    }
+}

+ 47 - 0
Fine.OPCDaClientAI/Program.cs

@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Threading;
+using Fine.OPCDaClient9000.Util;
+using Fine.Util;
+using Fine.OPCDaClient9000.App;
+using System.Windows.Forms;
+
+namespace Fine.OPCDaClient9000
+{
+    class Program
+    {
+        static void Main(string[] args)
+        {
+            /////加载配置
+            //AppUtil.InitAllDirectoryCfg();
+            ////启动Http Server
+
+
+            //DAServerMgr damgr = new DAServerMgr();
+
+            //damgr.Start();
+
+            //OPCHelper.daServerMgr = damgr;
+
+            //var httppar = JsonUtil.DeserializeObjectFile<HttpServer.HttpServerParams>("config/httpserver.json");
+            //var httpserver = new HttpServer.HttpServer<AppHandle>(httppar);
+            //httpserver.Start();
+
+            //Console.ReadLine();
+
+            Application.EnableVisualStyles();
+            Application.SetCompatibleTextRenderingDefault(false);
+            Application.Run(new Form1());
+
+            //server.StartAsync();
+
+
+        }
+    }
+}
+
+
+

+ 36 - 0
Fine.OPCDaClientAI/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 有关程序集的一般信息由以下
+// 控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("Fine.OPCDaClient9000")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Fine.OPCDaClient9000")]
+[assembly: AssemblyCopyright("Copyright ©  2023")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 将 ComVisible 设置为 false 会使此程序集中的类型
+//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
+//请将此类型的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
+[assembly: Guid("8a918ce3-c39e-47db-8e63-680f7777acb3")]
+
+// 程序集的版本信息由下列四个值组成: 
+//
+//      主版本
+//      次版本
+//      生成号
+//      修订号
+//
+//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
+//通过使用 "*",如下所示:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 32 - 0
Fine.OPCDaClientAI/ServerConfig.cs

@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Fine.OPCDaClient9000
+{
+    public class ServerConfig
+    {
+        public string ServerName
+        { get; set; }
+
+        public OpcGroup Group
+        { get; set; }
+    }
+
+    public class OpcGroup
+    { 
+        public int UpdateRate
+        { get; set; }
+
+        public int Deadband
+        { get; set; }
+
+        public List<string> Items
+        { get; set; }
+
+        public string DeviceId
+        { get; set; }
+    }
+}

+ 22 - 0
Fine.OPCDaClientAI/Tool/MyTool.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Fine.OPCDaClient9000
+{
+    public class MyTool
+    {
+        /// <summary>
+        /// 获取当前方法名
+        /// </summary>
+        /// <returns></returns>
+        public static string GetCurMethodInfo()
+        {
+            return System.Reflection.MethodBase.GetCurrentMethod().Name;
+        }
+
+
+    }
+}

+ 49 - 0
Fine.OPCDaClientAI/Util/Enumic.cs

@@ -0,0 +1,49 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Fine.OPCDaClient9000.Util
+{
+    public enum ModuleEnum
+    {
+        //回潮
+        HC,
+        //加料5000
+        JL5K,
+        //加料3000一次
+        JL3KY, 
+        //加料3000二次
+        JL3KR,
+        //真空
+        ZK,
+        //真空-生产提升
+        ZKTS,
+        //真空-AB锅
+        ZKAB,
+        //真空-停止
+        ZKSTOP,
+        //3K线---预热
+        L3_YR,
+        //3K线---组合启停 
+        L3_ZH,
+        //3K线---提升辅控 
+        L3_TSFK,
+        L3_JL1,  //3K线 一次加料
+        L3_JL2,//3K线 二次加料
+        L3_YP, //3K线 进柜
+        L3_JYG
+    }
+
+    public enum EAPIparType  //API传入值的分类enum
+    {
+        NoParam=0,            //无参数
+        InOneVal=1,           //传入单个值:如温度写入
+        inMultiValObj=2,  //传入多个值:Json方式
+        InSel=3,                 //传条件,查询配置操作
+        inSelAndMultiVal=4,   //传条件后、传入多个值
+        OnlyRead=5,
+        Error=10
+    }
+}

+ 14 - 1
Fine.OPCDaClient9000/bin/Release/Fine.OPCDaClient9000.exe.config

@@ -7,9 +7,10 @@
     <add key="logenable" value="true" />
     <add key="logisrealpath" value="true" />
     <!--如果是flase,logpath直接写文件夹相对路径-->
-    <add key="logpath" value="E:\ys\serverlog" />
+    <add key="logpath" value="E:\ysAIlog\" />
     <add key="auth" value="E230539F13CDB91D2764603BC283D909" />
     <add key="isauth" value="false" />
+    <add key="ClientSettingsProvider.ServiceUri" value="" />
   </appSettings>
   <startup>
     <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
@@ -140,4 +141,16 @@
       </dependentAssembly>
     </assemblyBinding>
   </runtime>
+  <system.web>
+    <membership defaultProvider="ClientAuthenticationMembershipProvider">
+      <providers>
+        <add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
+      </providers>
+    </membership>
+    <roleManager defaultProvider="ClientRoleProvider" enabled="true">
+      <providers>
+        <add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
+      </providers>
+    </roleManager>
+  </system.web>
 </configuration>

Fine.OPCDaClient9000/bin/Release/MQTTnet.xml → Fine.OPCDaClientAI/bin/Debug/MQTTnet.xml


Fine.OPCDaClient9000/bin/Release/Microsoft.Bcl.AsyncInterfaces.xml → Fine.OPCDaClientAI/bin/Debug/Microsoft.Bcl.AsyncInterfaces.xml


Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.Caching.Abstractions.xml → Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Caching.Abstractions.xml


Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.Caching.Memory.xml → Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Caching.Memory.xml


Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.Configuration.Abstractions.xml → Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Configuration.Abstractions.xml


Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.Configuration.Binder.xml → Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Configuration.Binder.xml


Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.Configuration.CommandLine.xml → Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Configuration.CommandLine.xml


Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.Configuration.EnvironmentVariables.xml → Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Configuration.EnvironmentVariables.xml


Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.Configuration.FileExtensions.xml → Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Configuration.FileExtensions.xml


Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.Configuration.Json.xml → Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Configuration.Json.xml


Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.Configuration.UserSecrets.xml → Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Configuration.UserSecrets.xml


Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.Configuration.xml → Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Configuration.xml


Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.DependencyInjection.Abstractions.xml → Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.DependencyInjection.Abstractions.xml


Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.DependencyInjection.xml → Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.DependencyInjection.xml


Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.FileProviders.Abstractions.xml → Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.FileProviders.Abstractions.xml


Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.FileProviders.Physical.xml → Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.FileProviders.Physical.xml


Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.FileSystemGlobbing.xml → Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.FileSystemGlobbing.xml


Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.Hosting.Abstractions.xml → Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Hosting.Abstractions.xml


Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.Hosting.xml → Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Hosting.xml


Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.Logging.Abstractions.xml → Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Logging.Abstractions.xml


Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.Logging.Configuration.xml → Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Logging.Configuration.xml


Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.Logging.Console.xml → Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Logging.Console.xml


Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.Logging.Debug.xml → Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Logging.Debug.xml


Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.Logging.EventLog.xml → Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Logging.EventLog.xml


Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.Logging.EventSource.xml → Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Logging.EventSource.xml


Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.Logging.xml → Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Logging.xml


Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.Options.ConfigurationExtensions.xml → Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Options.ConfigurationExtensions.xml


Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.Options.xml → Fine.OPCDaClientAI/bin/Debug/Microsoft.Extensions.Options.xml


+ 0 - 0
Fine.OPCDaClient9000/bin/Release/Microsoft.Extensions.Primitives.xml


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