diff --git a/Admin.Core.Api/Admin.Core.Model.xml b/Admin.Core.Api/Admin.Core.Model.xml
index e54c8175..73d4dc64 100644
--- a/Admin.Core.Api/Admin.Core.Model.xml
+++ b/Admin.Core.Api/Admin.Core.Model.xml
@@ -2341,6 +2341,11 @@
工位编码
+
+
+ 工位编码
+
+
物料编号
@@ -2491,6 +2496,11 @@
当前登录班组(一线白班,一线夜班,二线白班,二线夜班)
+
+
+ 下传plc放行结果,下传后为1,plc应答后更新为2
+
+
灌注告警
@@ -2676,6 +2686,51 @@
打印类型:箱壳、内胆
+
+
+ 补打二维码
+
+
+
+
+ 主键
+
+
+
+
+ 箱体条码
+
+
+
+
+ 箱体名称
+
+
+
+
+ 箱体名称
+
+
+
+
+ 成品码
+
+
+
+
+ 打印时间
+
+
+
+
+ 打印类型
+
+
+
+
+ 打印名称
+
+
订单执行表
@@ -5526,6 +5581,26 @@
Dto
+
+
+ 钣金物料类型
+
+
+
+
+ 物料编号
+
+
+
+
+ 物料名称
+
+
+
+
+ 物料类别
+
+
条码打印物料信息
diff --git a/Admin.Core.Api/obj/Admin.Core.Api.csproj.nuget.dgspec.json b/Admin.Core.Api/obj/Admin.Core.Api.csproj.nuget.dgspec.json
index 30db0c7d..7b8f115b 100644
--- a/Admin.Core.Api/obj/Admin.Core.Api.csproj.nuget.dgspec.json
+++ b/Admin.Core.Api/obj/Admin.Core.Api.csproj.nuget.dgspec.json
@@ -391,6 +391,9 @@
"D:\\Project\\gitea\\AUCMA\\SCADA\\Admin.Core.Tasks\\Admin.Core.Tasks.csproj": {
"projectPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Admin.Core.Tasks\\Admin.Core.Tasks.csproj"
},
+ "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.PerfusionTask\\Aucma.Core.PerfusionTask.csproj": {
+ "projectPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.PerfusionTask\\Aucma.Core.PerfusionTask.csproj"
+ },
"D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.RunPlc\\Aucma.Core.RunPlc.csproj": {
"projectPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.RunPlc\\Aucma.Core.RunPlc.csproj"
},
@@ -1009,6 +1012,75 @@
}
}
},
+ "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.PerfusionTask\\Aucma.Core.PerfusionTask.csproj": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.PerfusionTask\\Aucma.Core.PerfusionTask.csproj",
+ "projectName": "Aucma.Core.PerfusionTask",
+ "projectPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.PerfusionTask\\Aucma.Core.PerfusionTask.csproj",
+ "packagesPath": "C:\\Users\\admin\\.nuget\\packages\\",
+ "outputPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.PerfusionTask\\obj\\",
+ "projectStyle": "PackageReference",
+ "fallbackFolders": [
+ "D:\\install\\VS\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
+ ],
+ "configFilePaths": [
+ "C:\\Users\\admin\\AppData\\Roaming\\NuGet\\NuGet.Config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
+ ],
+ "originalTargetFrameworks": [
+ "net6.0"
+ ],
+ "sources": {
+ "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "net6.0": {
+ "targetAlias": "net6.0",
+ "projectReferences": {
+ "D:\\Project\\gitea\\AUCMA\\SCADA\\Admin.Core.IService\\Admin.Core.IService.csproj": {
+ "projectPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Admin.Core.IService\\Admin.Core.IService.csproj"
+ },
+ "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.HwPLc\\Aucma.Core.HwPLc.csproj": {
+ "projectPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.HwPLc\\Aucma.Core.HwPLc.csproj"
+ },
+ "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.PLc\\Aucma.Core.PLc.csproj": {
+ "projectPath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.PLc\\Aucma.Core.PLc.csproj"
+ }
+ }
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ }
+ },
+ "frameworks": {
+ "net6.0": {
+ "targetAlias": "net6.0",
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48",
+ "net481"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "frameworkReferences": {
+ "Microsoft.NETCore.App": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.102\\RuntimeIdentifierGraph.json"
+ }
+ }
+ },
"D:\\Project\\gitea\\AUCMA\\SCADA\\Aucma.Core.PLc\\Aucma.Core.PLc.csproj": {
"version": "1.0.0",
"restore": {
diff --git a/Admin.Core.Api/obj/Debug/net6.0/Admin.Core.Api.AssemblyInfo.cs b/Admin.Core.Api/obj/Debug/net6.0/Admin.Core.Api.AssemblyInfo.cs
index 7eb5f43a..9c3c3f0d 100644
--- a/Admin.Core.Api/obj/Debug/net6.0/Admin.Core.Api.AssemblyInfo.cs
+++ b/Admin.Core.Api/obj/Debug/net6.0/Admin.Core.Api.AssemblyInfo.cs
@@ -15,7 +15,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Api")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5972c771230554e7ffbf66d51846cd501637e447")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+499f069197ca25e9a1608c75be20ffac33665f86")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Api")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Api")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/Admin.Core.Api/obj/Debug/net6.0/Admin.Core.Api.AssemblyInfoInputs.cache b/Admin.Core.Api/obj/Debug/net6.0/Admin.Core.Api.AssemblyInfoInputs.cache
index 3ad0e841..69488a62 100644
--- a/Admin.Core.Api/obj/Debug/net6.0/Admin.Core.Api.AssemblyInfoInputs.cache
+++ b/Admin.Core.Api/obj/Debug/net6.0/Admin.Core.Api.AssemblyInfoInputs.cache
@@ -1 +1 @@
-328d019814fd578ff1b66effb7a3d5f785bbe47d82c52d4e18a8e00a46e47ecd
+37b90083f99a6195bde19de1f7f6c88d010d39a69c1fcd96aa5c916d805242f6
diff --git a/Admin.Core.Api/obj/Debug/net6.0/Admin.Core.Api.assets.cache b/Admin.Core.Api/obj/Debug/net6.0/Admin.Core.Api.assets.cache
index 89b3302e..dcd0e946 100644
Binary files a/Admin.Core.Api/obj/Debug/net6.0/Admin.Core.Api.assets.cache and b/Admin.Core.Api/obj/Debug/net6.0/Admin.Core.Api.assets.cache differ
diff --git a/Admin.Core.Api/obj/project.assets.json b/Admin.Core.Api/obj/project.assets.json
index ce64005f..87e15982 100644
--- a/Admin.Core.Api/obj/project.assets.json
+++ b/Admin.Core.Api/obj/project.assets.json
@@ -4049,6 +4049,7 @@
"Admin.Core.Repository": "1.0.0",
"Admin.Core.Service": "1.0.0",
"Admin.Core.Tasks": "1.0.0",
+ "Aucma.Core.PerfusionTask": "1.0.0",
"Aucma.Core.RunPlc": "1.0.0",
"Aucma.Core.Scanner": "1.0.0",
"Aucma.Core.ScannerGun": "1.0.0",
@@ -4183,6 +4184,21 @@
"bin/placeholder/Aucma.Core.HwPLc.dll": {}
}
},
+ "Aucma.Core.PerfusionTask/1.0.0": {
+ "type": "project",
+ "framework": ".NETCoreApp,Version=v6.0",
+ "dependencies": {
+ "Admin.Core.IService": "1.0.0",
+ "Aucma.Core.HwPLc": "1.0.0",
+ "Aucma.Core.PLc": "1.0.0"
+ },
+ "compile": {
+ "bin/placeholder/Aucma.Core.PerfusionTask.dll": {}
+ },
+ "runtime": {
+ "bin/placeholder/Aucma.Core.PerfusionTask.dll": {}
+ }
+ },
"Aucma.Core.PLc/1.0.0": {
"type": "project",
"framework": ".NETStandard,Version=v2.1",
@@ -11251,6 +11267,11 @@
"path": "../Aucma.Core.HwPLc/Aucma.Core.HwPLc.csproj",
"msbuildProject": "../Aucma.Core.HwPLc/Aucma.Core.HwPLc.csproj"
},
+ "Aucma.Core.PerfusionTask/1.0.0": {
+ "type": "project",
+ "path": "../Aucma.Core.PerfusionTask/Aucma.Core.PerfusionTask.csproj",
+ "msbuildProject": "../Aucma.Core.PerfusionTask/Aucma.Core.PerfusionTask.csproj"
+ },
"Aucma.Core.PLc/1.0.0": {
"type": "project",
"path": "../Aucma.Core.PLc/Aucma.Core.PLc.csproj",
diff --git a/Admin.Core.Api/obj/project.nuget.cache b/Admin.Core.Api/obj/project.nuget.cache
index 58500b2e..f30d3ed2 100644
--- a/Admin.Core.Api/obj/project.nuget.cache
+++ b/Admin.Core.Api/obj/project.nuget.cache
@@ -1,6 +1,6 @@
{
"version": 2,
- "dgSpecHash": "CegtX4ngQ9zPBSJ/sDLmsyWP/3p+JYLqzt3VARw/ViEWABeP85WCVrE4PcS24CD52tCdpZCtWFC1BlYzpx6uvg==",
+ "dgSpecHash": "mKHe0UCqn5jEBQ4tqKtwendQ1k/Vgl5ErcuXqtsiCHkk5SQsMG3LpraKCdnM1WX4tZ4J4KFd11zhVgmg20ljVw==",
"success": true,
"projectFilePath": "D:\\Project\\gitea\\AUCMA\\SCADA\\Admin.Core.Api\\Admin.Core.Api.csproj",
"expectedPackageFiles": [
diff --git a/Admin.Core.Common/obj/Debug/net6.0/Admin.Core.Common.AssemblyInfo.cs b/Admin.Core.Common/obj/Debug/net6.0/Admin.Core.Common.AssemblyInfo.cs
index 38452aa8..ba4424f6 100644
--- a/Admin.Core.Common/obj/Debug/net6.0/Admin.Core.Common.AssemblyInfo.cs
+++ b/Admin.Core.Common/obj/Debug/net6.0/Admin.Core.Common.AssemblyInfo.cs
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Common")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5972c771230554e7ffbf66d51846cd501637e447")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+1a7f5b2c5d615dd77e3d962d3b3bc9e735ac9121")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Common")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Common")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/Admin.Core.Common/obj/Debug/net6.0/Admin.Core.Common.AssemblyInfoInputs.cache b/Admin.Core.Common/obj/Debug/net6.0/Admin.Core.Common.AssemblyInfoInputs.cache
index f37266c9..3bff4ba6 100644
--- a/Admin.Core.Common/obj/Debug/net6.0/Admin.Core.Common.AssemblyInfoInputs.cache
+++ b/Admin.Core.Common/obj/Debug/net6.0/Admin.Core.Common.AssemblyInfoInputs.cache
@@ -1 +1 @@
-f91c01806ecb0cbf45a7945a9a1cea32793a3f91782b50a074b5df8e15698347
+d02edd2ebb8f20e6ac7017403113c013f65d4c915862adcc59daefaa469faca4
diff --git a/Admin.Core.EventBus/obj/Debug/net6.0/Admin.Core.EventBus.AssemblyInfo.cs b/Admin.Core.EventBus/obj/Debug/net6.0/Admin.Core.EventBus.AssemblyInfo.cs
index 2b29f618..62719f25 100644
--- a/Admin.Core.EventBus/obj/Debug/net6.0/Admin.Core.EventBus.AssemblyInfo.cs
+++ b/Admin.Core.EventBus/obj/Debug/net6.0/Admin.Core.EventBus.AssemblyInfo.cs
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.EventBus")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5972c771230554e7ffbf66d51846cd501637e447")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+499f069197ca25e9a1608c75be20ffac33665f86")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.EventBus")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.EventBus")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/Admin.Core.EventBus/obj/Debug/net6.0/Admin.Core.EventBus.AssemblyInfoInputs.cache b/Admin.Core.EventBus/obj/Debug/net6.0/Admin.Core.EventBus.AssemblyInfoInputs.cache
index 37e019fb..c9145d41 100644
--- a/Admin.Core.EventBus/obj/Debug/net6.0/Admin.Core.EventBus.AssemblyInfoInputs.cache
+++ b/Admin.Core.EventBus/obj/Debug/net6.0/Admin.Core.EventBus.AssemblyInfoInputs.cache
@@ -1 +1 @@
-0bee910b6d77564b4792ae2101f6977a7b7cdcc5da106cd66660a3ad7476a8ab
+a9739b756cd152a9a724c376cc5091a0f525c410683738e1d42126d701aca3fc
diff --git a/Admin.Core.Extensions/Admin.Core.Extensions.csproj b/Admin.Core.Extensions/Admin.Core.Extensions.csproj
index 1585988f..2e4c3252 100644
--- a/Admin.Core.Extensions/Admin.Core.Extensions.csproj
+++ b/Admin.Core.Extensions/Admin.Core.Extensions.csproj
@@ -10,6 +10,11 @@
+
+
+
+
+
@@ -20,6 +25,7 @@
+
diff --git a/Admin.Core.Extensions/Middlewares/AucmaTaskMildd.cs b/Admin.Core.Extensions/Middlewares/AucmaTaskMildd.cs
index 408516c8..68d743a1 100644
--- a/Admin.Core.Extensions/Middlewares/AucmaTaskMildd.cs
+++ b/Admin.Core.Extensions/Middlewares/AucmaTaskMildd.cs
@@ -20,8 +20,8 @@ namespace Admin.Core.Extensions
{
if (Appsettings.app("Middleware", "AucamTask", "Enabled").ObjToBool())
{
- /// aucamTaskService.AucamTaskAsync();
- Console.WriteLine("澳柯玛定时服务已开启");
+ aucamTaskService.AucamTaskAsync();
+ Console.WriteLine("澳柯玛灌注服务已开启");
}
}
catch (Exception e)
diff --git a/Admin.Core.Extensions/obj/Debug/net6.0/Admin.Core.Extensions.AssemblyInfo.cs b/Admin.Core.Extensions/obj/Debug/net6.0/Admin.Core.Extensions.AssemblyInfo.cs
index 39fd42fe..75951273 100644
--- a/Admin.Core.Extensions/obj/Debug/net6.0/Admin.Core.Extensions.AssemblyInfo.cs
+++ b/Admin.Core.Extensions/obj/Debug/net6.0/Admin.Core.Extensions.AssemblyInfo.cs
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Extensions")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5972c771230554e7ffbf66d51846cd501637e447")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5597057ca1de6338786ab4f638a2c2b9e090f8b3")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Extensions")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Extensions")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/Admin.Core.Extensions/obj/Debug/net6.0/Admin.Core.Extensions.AssemblyInfoInputs.cache b/Admin.Core.Extensions/obj/Debug/net6.0/Admin.Core.Extensions.AssemblyInfoInputs.cache
index 86c0458b..6f4affbe 100644
--- a/Admin.Core.Extensions/obj/Debug/net6.0/Admin.Core.Extensions.AssemblyInfoInputs.cache
+++ b/Admin.Core.Extensions/obj/Debug/net6.0/Admin.Core.Extensions.AssemblyInfoInputs.cache
@@ -1 +1 @@
-9a166f9c5576cc93aa769b28702c48c7668be85e3c1f883f9be15da877a5adad
+d193b9c44ad00be2b82657401ccac3732a15fc013f7137edd8242712fafe1fc1
diff --git a/Admin.Core.FrameWork/obj/Debug/netcoreapp3.1/Admin.Core.FrameWork.AssemblyInfo.cs b/Admin.Core.FrameWork/obj/Debug/netcoreapp3.1/Admin.Core.FrameWork.AssemblyInfo.cs
index 6c73d0e1..e9f99fc6 100644
--- a/Admin.Core.FrameWork/obj/Debug/netcoreapp3.1/Admin.Core.FrameWork.AssemblyInfo.cs
+++ b/Admin.Core.FrameWork/obj/Debug/netcoreapp3.1/Admin.Core.FrameWork.AssemblyInfo.cs
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.FrameWork")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5972c771230554e7ffbf66d51846cd501637e447")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+499f069197ca25e9a1608c75be20ffac33665f86")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.FrameWork")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.FrameWork")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/Admin.Core.FrameWork/obj/Debug/netcoreapp3.1/Admin.Core.FrameWork.AssemblyInfoInputs.cache b/Admin.Core.FrameWork/obj/Debug/netcoreapp3.1/Admin.Core.FrameWork.AssemblyInfoInputs.cache
index 47a975e3..691077c4 100644
--- a/Admin.Core.FrameWork/obj/Debug/netcoreapp3.1/Admin.Core.FrameWork.AssemblyInfoInputs.cache
+++ b/Admin.Core.FrameWork/obj/Debug/netcoreapp3.1/Admin.Core.FrameWork.AssemblyInfoInputs.cache
@@ -1 +1 @@
-616655c58b838f58c492ec366edb01af19150c2ad3b48292ef216310410558aa
+5413ffd7fe5b81262d9042b86942d421eed20cda67a90255a8b74aa10c94f448
diff --git a/Admin.Core.IRepository/IRepository_New/IBaseMaterialInfoRepository.cs b/Admin.Core.IRepository/IRepository_New/IBaseMaterialInfoRepository.cs
index 4b1f9be3..dd9507c9 100644
--- a/Admin.Core.IRepository/IRepository_New/IBaseMaterialInfoRepository.cs
+++ b/Admin.Core.IRepository/IRepository_New/IBaseMaterialInfoRepository.cs
@@ -1,5 +1,8 @@
using Admin.Core.Model;
using Admin.Core.Model.Model_New;
+using Admin.Core.Model.ViewModels;
+using System.Collections.Generic;
+using System.Threading.Tasks;
namespace Admin.Core.IRepository
{
diff --git a/Admin.Core.IRepository/obj/Debug/net6.0/Admin.Core.IRepository.AssemblyInfo.cs b/Admin.Core.IRepository/obj/Debug/net6.0/Admin.Core.IRepository.AssemblyInfo.cs
index c0cca792..f484670c 100644
--- a/Admin.Core.IRepository/obj/Debug/net6.0/Admin.Core.IRepository.AssemblyInfo.cs
+++ b/Admin.Core.IRepository/obj/Debug/net6.0/Admin.Core.IRepository.AssemblyInfo.cs
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.IRepository")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5972c771230554e7ffbf66d51846cd501637e447")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5597057ca1de6338786ab4f638a2c2b9e090f8b3")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.IRepository")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.IRepository")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/Admin.Core.IRepository/obj/Debug/net6.0/Admin.Core.IRepository.AssemblyInfoInputs.cache b/Admin.Core.IRepository/obj/Debug/net6.0/Admin.Core.IRepository.AssemblyInfoInputs.cache
index 7199dab5..c981c244 100644
--- a/Admin.Core.IRepository/obj/Debug/net6.0/Admin.Core.IRepository.AssemblyInfoInputs.cache
+++ b/Admin.Core.IRepository/obj/Debug/net6.0/Admin.Core.IRepository.AssemblyInfoInputs.cache
@@ -1 +1 @@
-79a4e7c71cd8afc6ca51d0337c0ed07e190d421af6c26bb5e1d5ac9f776c8e5e
+35aa1a57ddc5e77ab1a1b4bc80187fc2fe2642ed83c36fc82726d03ed20160ff
diff --git a/Admin.Core.IService/IService_New/IBaseMaterialInfoServices.cs b/Admin.Core.IService/IService_New/IBaseMaterialInfoServices.cs
index 20e8fa22..64dfc105 100644
--- a/Admin.Core.IService/IService_New/IBaseMaterialInfoServices.cs
+++ b/Admin.Core.IService/IService_New/IBaseMaterialInfoServices.cs
@@ -1,5 +1,6 @@
using Admin.Core.IService;
using Admin.Core.Model;
+using Admin.Core.Model.ViewModels;
using System.Collections.Generic;
using System.Threading.Tasks;
@@ -15,5 +16,6 @@ namespace Admin.Core.IService
/// 查出BASE_MATERIALINFO中存在的成品类型
///
public Task> queryAsyncLike(string search);
+
}
}
\ No newline at end of file
diff --git a/Admin.Core.IService/obj/Debug/net6.0/Admin.Core.IService.AssemblyInfo.cs b/Admin.Core.IService/obj/Debug/net6.0/Admin.Core.IService.AssemblyInfo.cs
index 75a9169d..dac08c90 100644
--- a/Admin.Core.IService/obj/Debug/net6.0/Admin.Core.IService.AssemblyInfo.cs
+++ b/Admin.Core.IService/obj/Debug/net6.0/Admin.Core.IService.AssemblyInfo.cs
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.IService")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5972c771230554e7ffbf66d51846cd501637e447")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5597057ca1de6338786ab4f638a2c2b9e090f8b3")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.IService")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.IService")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/Admin.Core.IService/obj/Debug/net6.0/Admin.Core.IService.AssemblyInfoInputs.cache b/Admin.Core.IService/obj/Debug/net6.0/Admin.Core.IService.AssemblyInfoInputs.cache
index c36caa8b..0e4cb177 100644
--- a/Admin.Core.IService/obj/Debug/net6.0/Admin.Core.IService.AssemblyInfoInputs.cache
+++ b/Admin.Core.IService/obj/Debug/net6.0/Admin.Core.IService.AssemblyInfoInputs.cache
@@ -1 +1 @@
-a901275feb6085c1f28b281e48e5553475a5b4c8ded34ec63b1c37b3fa5b07fa
+4c7017c484d2ee1bf671b88b9cfda242bf136f7f40600c3cb36373e49f74f071
diff --git a/Admin.Core.Model/Model_New/DoorMateHistory.cs b/Admin.Core.Model/Model_New/DoorMateHistory.cs
index b94ebc5f..fc4399c0 100644
--- a/Admin.Core.Model/Model_New/DoorMateHistory.cs
+++ b/Admin.Core.Model/Model_New/DoorMateHistory.cs
@@ -44,7 +44,11 @@ namespace Admin.Core.Model
///
[SugarColumn(ColumnName = "STATION_CODE")]
public string StationCode { get; set; }
-
+ ///
+ /// 工位编码
+ ///
+ [SugarColumn(ColumnName = "MATERIAL_BARCODE")]
+ public string MaterialBarCode { get; set; }
///
/// 物料编号
///
diff --git a/Admin.Core.Model/obj/Debug/net6.0/Admin.Core.Model.AssemblyInfo.cs b/Admin.Core.Model/obj/Debug/net6.0/Admin.Core.Model.AssemblyInfo.cs
index 0744e188..6ae0666c 100644
--- a/Admin.Core.Model/obj/Debug/net6.0/Admin.Core.Model.AssemblyInfo.cs
+++ b/Admin.Core.Model/obj/Debug/net6.0/Admin.Core.Model.AssemblyInfo.cs
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Model")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5972c771230554e7ffbf66d51846cd501637e447")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5597057ca1de6338786ab4f638a2c2b9e090f8b3")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Model")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Model")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/Admin.Core.Model/obj/Debug/net6.0/Admin.Core.Model.AssemblyInfoInputs.cache b/Admin.Core.Model/obj/Debug/net6.0/Admin.Core.Model.AssemblyInfoInputs.cache
index bc7454e9..28fa9c31 100644
--- a/Admin.Core.Model/obj/Debug/net6.0/Admin.Core.Model.AssemblyInfoInputs.cache
+++ b/Admin.Core.Model/obj/Debug/net6.0/Admin.Core.Model.AssemblyInfoInputs.cache
@@ -1 +1 @@
-5b3de9b5743074ed362450d920da18b56180e797235d4eba9eed0f9c19e5101c
+1e07680cc947c2c2f3b8a95ff31878fb1dd9ee440a7f415fe66f9bb26f64ba0a
diff --git a/Admin.Core.RealTimeService/obj/Debug/net6.0/Admin.Core.RealTimeService.AssemblyInfo.cs b/Admin.Core.RealTimeService/obj/Debug/net6.0/Admin.Core.RealTimeService.AssemblyInfo.cs
index c9b4b609..1d08406f 100644
--- a/Admin.Core.RealTimeService/obj/Debug/net6.0/Admin.Core.RealTimeService.AssemblyInfo.cs
+++ b/Admin.Core.RealTimeService/obj/Debug/net6.0/Admin.Core.RealTimeService.AssemblyInfo.cs
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.RealTimeService")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f242c55c6773055ed882072b4cbd144f26a025f1")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+499f069197ca25e9a1608c75be20ffac33665f86")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.RealTimeService")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.RealTimeService")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/Admin.Core.RealTimeService/obj/Debug/net6.0/Admin.Core.RealTimeService.AssemblyInfoInputs.cache b/Admin.Core.RealTimeService/obj/Debug/net6.0/Admin.Core.RealTimeService.AssemblyInfoInputs.cache
index b65e38b0..e4b7cc50 100644
--- a/Admin.Core.RealTimeService/obj/Debug/net6.0/Admin.Core.RealTimeService.AssemblyInfoInputs.cache
+++ b/Admin.Core.RealTimeService/obj/Debug/net6.0/Admin.Core.RealTimeService.AssemblyInfoInputs.cache
@@ -1 +1 @@
-9b91b2796fb406d49fdb27eb68d79566580a4e8d69d50cc0f88bef80277b52f1
+a071a1004b950dee097a8dea2e1de0d56f63feb1bd8a5be9e4191bd359c16064
diff --git a/Admin.Core.Repository/Repository_New/BaseMaterialInfoRepository.cs b/Admin.Core.Repository/Repository_New/BaseMaterialInfoRepository.cs
index c094c8e0..7767215b 100644
--- a/Admin.Core.Repository/Repository_New/BaseMaterialInfoRepository.cs
+++ b/Admin.Core.Repository/Repository_New/BaseMaterialInfoRepository.cs
@@ -1,5 +1,9 @@
using Admin.Core.IRepository;
using Admin.Core.Model;
+using Admin.Core.Model.Model_New;
+using Admin.Core.Model.ViewModels;
+using System.Collections.Generic;
+using System.Threading.Tasks;
namespace Admin.Core.Repository
{
@@ -11,5 +15,6 @@ namespace Admin.Core.Repository
public BaseMaterialInfoRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
{
}
+
}
}
\ No newline at end of file
diff --git a/Admin.Core.Repository/obj/Debug/net6.0/Admin.Core.Repository.AssemblyInfo.cs b/Admin.Core.Repository/obj/Debug/net6.0/Admin.Core.Repository.AssemblyInfo.cs
index 3ace9a57..3834ad20 100644
--- a/Admin.Core.Repository/obj/Debug/net6.0/Admin.Core.Repository.AssemblyInfo.cs
+++ b/Admin.Core.Repository/obj/Debug/net6.0/Admin.Core.Repository.AssemblyInfo.cs
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Repository")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5972c771230554e7ffbf66d51846cd501637e447")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5597057ca1de6338786ab4f638a2c2b9e090f8b3")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Repository")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Repository")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/Admin.Core.Repository/obj/Debug/net6.0/Admin.Core.Repository.AssemblyInfoInputs.cache b/Admin.Core.Repository/obj/Debug/net6.0/Admin.Core.Repository.AssemblyInfoInputs.cache
index 2eafd324..7725ac99 100644
--- a/Admin.Core.Repository/obj/Debug/net6.0/Admin.Core.Repository.AssemblyInfoInputs.cache
+++ b/Admin.Core.Repository/obj/Debug/net6.0/Admin.Core.Repository.AssemblyInfoInputs.cache
@@ -1 +1 @@
-8ba667252ca16fab385dcb2d4668df57b2070d4ed5f6f76f06f05f8ebe489baf
+7cba122a6db51bd673570cf9ab1adf247cec15c0f34d2e839b5aaa2298c7cecb
diff --git a/Admin.Core.Serilog.Es/obj/Debug/net6.0/Admin.Core.Serilog.Es.AssemblyInfo.cs b/Admin.Core.Serilog.Es/obj/Debug/net6.0/Admin.Core.Serilog.Es.AssemblyInfo.cs
index 80f746e0..fd79acae 100644
--- a/Admin.Core.Serilog.Es/obj/Debug/net6.0/Admin.Core.Serilog.Es.AssemblyInfo.cs
+++ b/Admin.Core.Serilog.Es/obj/Debug/net6.0/Admin.Core.Serilog.Es.AssemblyInfo.cs
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Serilog.Es")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5972c771230554e7ffbf66d51846cd501637e447")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+499f069197ca25e9a1608c75be20ffac33665f86")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Serilog.Es")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Serilog.Es")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/Admin.Core.Serilog.Es/obj/Debug/net6.0/Admin.Core.Serilog.Es.AssemblyInfoInputs.cache b/Admin.Core.Serilog.Es/obj/Debug/net6.0/Admin.Core.Serilog.Es.AssemblyInfoInputs.cache
index 4fea1363..07c6ee07 100644
--- a/Admin.Core.Serilog.Es/obj/Debug/net6.0/Admin.Core.Serilog.Es.AssemblyInfoInputs.cache
+++ b/Admin.Core.Serilog.Es/obj/Debug/net6.0/Admin.Core.Serilog.Es.AssemblyInfoInputs.cache
@@ -1 +1 @@
-eccc15ed85fe869f68dfcf35d0b6292c4c4ee8c6f2ef025e659bc791fabdf8b2
+f6b7ed47a484f4b2449e1eae2be215943e1dbd39f5553fbae963a343f898ab07
diff --git a/Admin.Core.Service/obj/Debug/net6.0/Admin.Core.Service.AssemblyInfo.cs b/Admin.Core.Service/obj/Debug/net6.0/Admin.Core.Service.AssemblyInfo.cs
index 164473aa..9498fc93 100644
--- a/Admin.Core.Service/obj/Debug/net6.0/Admin.Core.Service.AssemblyInfo.cs
+++ b/Admin.Core.Service/obj/Debug/net6.0/Admin.Core.Service.AssemblyInfo.cs
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Service")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5972c771230554e7ffbf66d51846cd501637e447")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5597057ca1de6338786ab4f638a2c2b9e090f8b3")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Service")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Service")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/Admin.Core.Service/obj/Debug/net6.0/Admin.Core.Service.AssemblyInfoInputs.cache b/Admin.Core.Service/obj/Debug/net6.0/Admin.Core.Service.AssemblyInfoInputs.cache
index eacc3ab7..1e12ac7c 100644
--- a/Admin.Core.Service/obj/Debug/net6.0/Admin.Core.Service.AssemblyInfoInputs.cache
+++ b/Admin.Core.Service/obj/Debug/net6.0/Admin.Core.Service.AssemblyInfoInputs.cache
@@ -1 +1 @@
-a10e0780416426304801009d0aa85274d1639779b70a2e8d8703d332b3513a06
+ef879b2cc8bc67519a02c49a04b960afdf86ff36351a00da1fe3afa1b9b095fa
diff --git a/Admin.Core.Tasks/obj/Debug/net6.0/Admin.Core.Tasks.AssemblyInfo.cs b/Admin.Core.Tasks/obj/Debug/net6.0/Admin.Core.Tasks.AssemblyInfo.cs
index f3e81232..fd1ff983 100644
--- a/Admin.Core.Tasks/obj/Debug/net6.0/Admin.Core.Tasks.AssemblyInfo.cs
+++ b/Admin.Core.Tasks/obj/Debug/net6.0/Admin.Core.Tasks.AssemblyInfo.cs
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Tasks")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5972c771230554e7ffbf66d51846cd501637e447")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5597057ca1de6338786ab4f638a2c2b9e090f8b3")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Tasks")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Tasks")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/Admin.Core.Tasks/obj/Debug/net6.0/Admin.Core.Tasks.AssemblyInfoInputs.cache b/Admin.Core.Tasks/obj/Debug/net6.0/Admin.Core.Tasks.AssemblyInfoInputs.cache
index 884df24c..3207f64e 100644
--- a/Admin.Core.Tasks/obj/Debug/net6.0/Admin.Core.Tasks.AssemblyInfoInputs.cache
+++ b/Admin.Core.Tasks/obj/Debug/net6.0/Admin.Core.Tasks.AssemblyInfoInputs.cache
@@ -1 +1 @@
-49a715b382f39d30953405dc212b106cf0da985854a38dd3ede368558dc2ca64
+93c0ff485404c0147686b1d7d1ad3af677231c3152e12b068ac4c1529b7bc87d
diff --git a/Admin.Core.sln b/Admin.Core.sln
index 73746949..e87f55db 100644
--- a/Admin.Core.sln
+++ b/Admin.Core.sln
@@ -89,7 +89,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aucma.Core.PrintTo", "Aucma
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aucma.Core.SheetMetalTasks", "Aucma.Core.SheetMetalTasks\Aucma.Core.SheetMetalTasks.csproj", "{F78F41F3-8B38-4CA1-A254-C18CCDCA8291}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aucma.Core.TemperatureTask", "Aucma.Core.TemperatureTask\Aucma.Core.TemperatureTask.csproj", "{F427E68F-100D-4136-8761-F2C9CB0E7940}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aucma.Core.TemperatureTask", "Aucma.Core.TemperatureTask\Aucma.Core.TemperatureTask.csproj", "{F427E68F-100D-4136-8761-F2C9CB0E7940}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/Aucam.Core.PerfusionService/Aucam.Core.PerfusionService.csproj b/Aucam.Core.PerfusionService/Aucam.Core.PerfusionService.csproj
index 0af4424c..34c855ee 100644
--- a/Aucam.Core.PerfusionService/Aucam.Core.PerfusionService.csproj
+++ b/Aucam.Core.PerfusionService/Aucam.Core.PerfusionService.csproj
@@ -14,7 +14,7 @@
- Always
+ PreserveNewest
true
PreserveNewest
diff --git a/Aucam.Core.PerfusionService/Startup.cs b/Aucam.Core.PerfusionService/Startup.cs
index 80e30841..d9701be1 100644
--- a/Aucam.Core.PerfusionService/Startup.cs
+++ b/Aucam.Core.PerfusionService/Startup.cs
@@ -1,9 +1,9 @@
using Admin.Core.Common;
using Admin.Core.Extensions;
-using Admin.Core.IService.ISys;
-using Admin.Core.Tasks;
+using Admin.Core.Extensions.Middlewares;
using Aucma.Core.RunPlc;
using Aucma.Core.Tasks;
+using Aucma.Core.TemperatureTask;
using Autofac;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
@@ -56,13 +56,11 @@ namespace Aucam.Core.PerfusionService
//עҵ
AddServices(services);
-
- //
- services.AddJobSetup();
//PLC
services.AddPlcSetup();
-
+ //עȡ
services.AddAucmaTaskSetup();
+
//ֱ֧ȫ :֧ System.Text.Encoding.GetEncoding("GB2312") System.Text.Encoding.GetEncoding("GB18030")
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
}
@@ -83,17 +81,15 @@ namespace Aucam.Core.PerfusionService
///
///
///
- public void Configure(IApplicationBuilder app, IAucamTaskService aucamTaskService, IRunPlcService runPlcService) // ISysTasksQzService tasksQzService,ISchedulerCenter schedulerCenter, IRunPlcService runPlcService
+ public void Configure(IApplicationBuilder app, IAucamTaskService aucamTaskService, IRunPlcService runPlcService)
{
// ʹþ̬ļ
app.UseStaticFiles();
- // ȻȨм
- //app.UseAuthorization();
- // QuartzNetJobȷ
- // app.UseQuartzJobMildd(tasksQzService, schedulerCenter);
- app.AucmaTaskMildds(aucamTaskService);
//PLC
app.UsePlcMildd(runPlcService);
+ // עעȡм
+ app.AucmaTaskMildds(aucamTaskService);
+
}
#region ע
diff --git a/Aucam.Core.PerfusionService/appsettings.json b/Aucam.Core.PerfusionService/appsettings.json
index 99778df0..38b1f81d 100644
--- a/Aucam.Core.PerfusionService/appsettings.json
+++ b/Aucam.Core.PerfusionService/appsettings.json
@@ -109,7 +109,7 @@
"TriggerType": 1,
"IntervalSecond": 1,
"CycleRunTimes": 1,
- "IsStart": true,
+ "IsStart": false,
"JobParams": null,
"DelFlag": false,
"CreateBy": "admin",
@@ -169,7 +169,7 @@
},
"AucamTask": {
- "Enabled": false
+ "Enabled": true
}
},
"PLCServer": [
@@ -179,7 +179,7 @@
"PlcType": "Siemens",
"Enabled": true,
"IP": "10.10.92.147",
- // "IP": "127.0.0.1",
+ // "IP": "127.0.0.1",
"Port": 102
}
],
diff --git a/Aucma.Core.BoxFoam/Business/InStoreBusiness.cs b/Aucma.Core.BoxFoam/Business/InStoreBusiness.cs
index 69025758..50b74ac8 100644
--- a/Aucma.Core.BoxFoam/Business/InStoreBusiness.cs
+++ b/Aucma.Core.BoxFoam/Business/InStoreBusiness.cs
@@ -468,14 +468,12 @@ namespace Aucma.Core.BoxFoam.Business
///
public BaseSpaceInfo ReadSpaceInfoByPlc(BaseSpaceInfo spaceInfo)
{
-
var obj = PlcHelper.siemensList.FirstOrDefault(d => d.EquipName.Equals("泡前库Plc"));
if (obj != null && obj.plc.IsConnected)
{
//将货道信息更新到配置文件中
SpaceAddress spaceAddress = spaceConfig.GetSpaceAddress(spaceInfo.StoreCode, spaceInfo.SpaceCode);
spaceInfo.SpaceStock = obj.plc.ReadInt16(spaceAddress.onStore);//获取
-
}
return spaceInfo;
}
@@ -627,8 +625,6 @@ namespace Aucma.Core.BoxFoam.Business
#endregion
-
-
#region 添加货道明细 不控制出库,暂时未添加明细
BaseSpaceDetail spaceDetail = new BaseSpaceDetail();
spaceDetail.MaterialType = taskInfo.MaterialType;
diff --git a/Aucma.Core.DoorFoam/Aucma.Core.DoorFoam.csproj b/Aucma.Core.DoorFoam/Aucma.Core.DoorFoam.csproj
index 10f45baa..132de828 100644
--- a/Aucma.Core.DoorFoam/Aucma.Core.DoorFoam.csproj
+++ b/Aucma.Core.DoorFoam/Aucma.Core.DoorFoam.csproj
@@ -75,7 +75,6 @@
-
diff --git a/Aucma.Core.DoorFoam/Business/MvCodeHelper.cs b/Aucma.Core.DoorFoam/Business/MvCodeHelper.cs
index 301da472..ee4b18fa 100644
--- a/Aucma.Core.DoorFoam/Business/MvCodeHelper.cs
+++ b/Aucma.Core.DoorFoam/Business/MvCodeHelper.cs
@@ -1,12 +1,17 @@
using Admin.Core.Common;
using Aucma.Core.Scanner;
+using log4net;
using MvCodeReaderSDKNet;
+using NPOI.SS.Formula.Functions;
+using StackExchange.Profiling;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
+using System.Threading;
using System.Threading.Tasks;
+using UAParser;
namespace Aucma.Core.DoorFoam.Business
{
@@ -18,28 +23,44 @@ namespace Aucma.Core.DoorFoam.Business
private static string lastCode;
private static List allScanners = Appsettings.app("ScannerServer").ToList();
// 内胆扫码器ip
- private static string LinerScannerIp = allScanners.First(x => x.Name == "扫码器1").Ip;
+ private static string doorScannerIp = allScanners.First(x => x.Name == "扫码器1").Ip;
+
+ private static readonly log4net.ILog log = LogManager.GetLogger(typeof(MvCodeHelper));
- #region 委托事件
+ #region 全局变量定义
+ public static MvCodeReader doorDevice = null;
+ public static DateTime doorLiveTime = DateTime.Now;
+ #endregion
- #region 门体匹配委托事件
+ #region 委托事件
- #region 门体匹配扫码信息刷新
///
- /// 门体匹配扫码信息刷新
+ /// 门体匹配扫码
///
///
- public delegate void DoorReceiveCodeDelegate(string code);
- public static event DoorReceiveCodeDelegate DoorReceiveCodeDelegateEvent;
- #endregion
-
+ public delegate Task DoorReceiveCodeDelegate(string code1);
+ public static event DoorReceiveCodeDelegate? DoorReceiveCodeDelegateEvent;
- #endregion
+ ///
+ /// 刷新扫码器状态
+ ///
+ ///
+ ///
+ public delegate void RefreshState(string ip, bool flag);
+ public static event RefreshState RefreshStateEvent;
+
+
+ ///
+ /// 日志信息刷新
+ ///
+ ///
+ public delegate void RefreshLogMessage(string message);
+ public static event RefreshLogMessage RefreshLogMessageEvent;
#endregion
- public static void LinerImageCallbackFunc(IntPtr pData, IntPtr pstFrameInfoEx2, IntPtr pUser)
+ public static void DoorImageCallbackFunc(IntPtr pData, IntPtr pstFrameInfoEx2, IntPtr pUser)
{
var stFrameInfo = (MvCodeReader.MV_CODEREADER_IMAGE_OUT_INFO_EX2)Marshal.PtrToStructure(pstFrameInfoEx2, typeof(MvCodeReader.MV_CODEREADER_IMAGE_OUT_INFO_EX2));
@@ -48,7 +69,10 @@ namespace Aucma.Core.DoorFoam.Business
// Console.WriteLine("CodeNum[" + Convert.ToString(stBcrResult.nCodeNum) + "]");
if (stBcrResult.nCodeNum == 0)
{
- Console.WriteLine("liner--->No Read 处理");
+ Console.WriteLine(DateTime.Now+":门体匹配--->No Read 处理");
+ //log.Info(DateTime.Now + ":门体匹配--->No Read 处理");
+ // 更新存活时间
+ doorLiveTime = DateTime.Now;
}
for (Int32 i = 0; i < stBcrResult.nCodeNum; i++)
{
@@ -56,15 +80,29 @@ namespace Aucma.Core.DoorFoam.Business
if (bIsValidUTF8)
{
string strCode = Encoding.UTF8.GetString(stBcrResult.stBcrInfoEx2[i].chCode);
- Console.WriteLine("Get CodeNum: " + "CodeNum[" + i.ToString() + "], CodeString[" + strCode.Trim().TrimEnd('\0') + "]");
+ Console.WriteLine(DateTime.Now + ":Get CodeNum: " + "CodeNum[" + i.ToString() + "], CodeString[" + strCode.Trim().TrimEnd('\0') + "]");
}
else
{
string strCode = Encoding.GetEncoding("GB2312").GetString(stBcrResult.stBcrInfoEx2[i].chCode);
- Console.WriteLine("Get CodeNum: " + "CodeNum[" + i.ToString() + "], CodeString[" + strCode.Trim().TrimEnd('\0') + "]");
+ Console.WriteLine(DateTime.Now + ":箱门匹配扫码器==>Get CodeNum: " + "CodeNum[" + i.ToString() + "], CodeString[" + strCode.Trim().TrimEnd('\0') + "]");
+ log.Info(DateTime.Now + ":箱门匹配扫码器==>Get CodeNum: " + "CodeNum[" + i.ToString() + "], CodeString[" + strCode.Trim().TrimEnd('\0') + "]");
// RefreshMaterialCodeStrEvent?.Invoke(strCode.Trim().TrimEnd('\0'), LinerScannerIp);
- // 业务处理
- DoorReceiveCodeDelegateEvent?.Invoke(strCode.Trim().TrimEnd('\0'));
+ if (!string.IsNullOrEmpty(strCode.Trim().TrimEnd('\0')))
+ {
+ // 更新存活时间
+ doorLiveTime = DateTime.Now;
+ // 业务处理
+ DoorReceiveCodeDelegateEvent?.Invoke(strCode.Trim().TrimEnd('\0'));
+ }
+ else
+ {
+ // 更新存活时间
+ doorLiveTime = DateTime.Now;
+ Console.WriteLine(DateTime.Now + "箱门匹配扫码器==>条码:" + strCode.Trim().TrimEnd('\0') + "长度不为20,当做No Read 处理");
+ log.Info(DateTime.Now + "箱门匹配扫码器==>条码:" + strCode.Trim().TrimEnd('\0') + "长度不为20,当做No Read 处理");
+ }
+
}
}
@@ -78,11 +116,9 @@ namespace Aucma.Core.DoorFoam.Business
}
}
-
-
- public static void Liner()
+ public static Task Door()
{
-
+ doorLiveTime = DateTime.Now;
MvCodeReader.cbOutputEx2delegate ImageCallback;
MvCodeReader.MV_CODEREADER_IMAGE_OUT_INFO_EX2 stFrameInfo = new MvCodeReader.MV_CODEREADER_IMAGE_OUT_INFO_EX2();
@@ -96,12 +132,18 @@ namespace Aucma.Core.DoorFoam.Business
nRet = MvCodeReader.MV_CODEREADER_EnumDevices_NET(ref stDevList, MvCodeReader.MV_CODEREADER_GIGE_DEVICE);
if (MvCodeReader.MV_CODEREADER_OK != nRet)
{
+ // 刷新扫码器状态
+ RefreshStateEvent?.Invoke("箱门匹配", false);
+ Thread.Sleep(1000 * 10);
Console.WriteLine("Enum device failed:{0:x8}", nRet);
break;
}
Console.WriteLine("Enum device count : " + Convert.ToString(stDevList.nDeviceNum));
if (0 == stDevList.nDeviceNum)
{
+ // 刷新扫码器状态
+ RefreshStateEvent?.Invoke("箱门匹配", false);
+ Thread.Sleep(1000 * 10);
break;
}
@@ -110,7 +152,6 @@ namespace Aucma.Core.DoorFoam.Business
// ch:打印设备信息 | en:Print device info
for (Int32 i = 0; i < stDevList.nDeviceNum; i++)
{
-
stDevInfo = (MvCodeReader.MV_CODEREADER_DEVICE_INFO)Marshal.PtrToStructure(stDevList.pDeviceInfo[i], typeof(MvCodeReader.MV_CODEREADER_DEVICE_INFO));
if (MvCodeReader.MV_CODEREADER_GIGE_DEVICE == stDevInfo.nTLayerType)
@@ -123,14 +164,22 @@ namespace Aucma.Core.DoorFoam.Business
// Console.WriteLine("\n" + i.ToString() + ": [GigE] User Define Name : " + stGigEDeviceInfo.chUserDefinedName);
string ip = ((stGigEDeviceInfo.nCurrentIp & 0xff000000) >> 24) + "." + ((stGigEDeviceInfo.nCurrentIp & 0x00ff0000) >> 16) + "." + ((stGigEDeviceInfo.nCurrentIp & 0x0000ff00) >> 8) + "." + (stGigEDeviceInfo.nCurrentIp & 0x000000ff);
string ipStr = nIp1 + "." + nIp2 + "." + nIp3 + "." + nIp4;
- if (ipStr == LinerScannerIp)
+ if (ipStr ==doorScannerIp)
{
Console.WriteLine("device IP :" + ipStr);
nDevIndex = i;
}
}
}
- if (nDevIndex < 0) return;
+ if (nDevIndex < 0)
+ {
+ Console.WriteLine("未找到箱门匹配扫码器");
+ // 刷新扫码器状态
+ RefreshStateEvent?.Invoke("箱门匹配", false);
+ Thread.Sleep(1000 * 30);
+ break;
+ }
+
stDevInfo = (MvCodeReader.MV_CODEREADER_DEVICE_INFO)Marshal.PtrToStructure(stDevList.pDeviceInfo[nDevIndex], typeof(MvCodeReader.MV_CODEREADER_DEVICE_INFO));
// ch:创建设备 | en:Create device
@@ -142,16 +191,19 @@ namespace Aucma.Core.DoorFoam.Business
}
// ch:打开设备 | en:Open device
- nRet = device.MV_CODEREADER_OpenDevice_NET();
+ nRet = device.MV_CODEREADER_OpenDevice_NET();
if (MvCodeReader.MV_CODEREADER_OK != nRet)
{
Console.WriteLine("Open device failed:{0:x8}", nRet);
+ // 刷新扫码器状态
+ RefreshStateEvent?.Invoke("箱门匹配", false);
break;
}
-
+ // 刷新扫码器状态
+ RefreshStateEvent?.Invoke("箱门匹配", true);
// ch:注册回调函数 | en:Register image callback
- ImageCallback = new MvCodeReader.cbOutputEx2delegate(LinerImageCallbackFunc);
+ ImageCallback = new MvCodeReader.cbOutputEx2delegate(DoorImageCallbackFunc);
nRet = device.MV_CODEREADER_RegisterImageCallBackEx2_NET(ImageCallback, IntPtr.Zero);
if (MvCodeReader.MV_CODEREADER_OK != nRet)
{
@@ -166,9 +218,24 @@ namespace Aucma.Core.DoorFoam.Business
Console.WriteLine("Start grabbing failed:{0:x8}", nRet);
break;
}
+ // 关闭使用
Console.WriteLine("Press enter to exit");
- Console.ReadLine();
+ Console.WriteLine(DateTime.Now.ToString());
+ while (true)
+ {
+ Thread.Sleep(1000*60);
+ DateTime dateTime = DateTime.Now;
+ TimeSpan timeSpan = dateTime.Subtract(doorLiveTime);
+ if (timeSpan.TotalMinutes >= 10)
+ {
+ Console.WriteLine("箱门匹配扫码器超时");
+
+ break;
+ }
+
+ }
+ //Console.ReadLine();
// ch:停止抓图 | en:Stop grabbing
nRet = device.MV_CODEREADER_StopGrabbing_NET();
@@ -193,6 +260,7 @@ namespace Aucma.Core.DoorFoam.Business
Console.WriteLine("Destroy device failed:{0:x8}", nRet);
break;
}
+
} while (false);
if (MvCodeReader.MV_CODEREADER_OK != nRet)
@@ -204,7 +272,43 @@ namespace Aucma.Core.DoorFoam.Business
Console.WriteLine("Destroy device failed:{0:x8}", nRet);
}
}
+ Thread.Sleep(1000);
+ Door();
+ return Task.CompletedTask;
+ }
+
+ ///
+ /// 关闭内胆扫码器
+ ///
+ public static void CloseDoor()
+ {
+ int nRet = MvCodeReader.MV_CODEREADER_OK;
+ MvCodeReader device = doorDevice;
+ // ch:停止抓图 | en:Stop grabbing
+ nRet = device.MV_CODEREADER_StopGrabbing_NET();
+ if (MvCodeReader.MV_CODEREADER_OK != nRet)
+ {
+ Console.WriteLine("Stop grabbing failed{0:x8}", nRet);
+ return;
+ }
+ // ch:关闭设备 | en:Close device
+ nRet = device.MV_CODEREADER_CloseDevice_NET();
+ if (MvCodeReader.MV_CODEREADER_OK != nRet)
+ {
+ Console.WriteLine("Close device failed{0:x8}", nRet);
+ return;
+ }
+
+ // ch:销毁设备 | en:Destroy device
+ nRet = device.MV_CODEREADER_DestroyHandle_NET();
+ if (MvCodeReader.MV_CODEREADER_OK != nRet)
+ {
+ Console.WriteLine("Destroy device failed:{0:x8}", nRet);
+ return;
+ }
+ Console.WriteLine("关闭内胆扫码器成功");
+ return;
}
#region 判断字符编码
@@ -279,7 +383,5 @@ namespace Aucma.Core.DoorFoam.Business
}
#endregion
-
-
}
}
diff --git a/Aucma.Core.DoorFoam/Startup.cs b/Aucma.Core.DoorFoam/Startup.cs
index 7d079f45..d6d4cd49 100644
--- a/Aucma.Core.DoorFoam/Startup.cs
+++ b/Aucma.Core.DoorFoam/Startup.cs
@@ -62,11 +62,6 @@ namespace Aucma.Core.DoorFoam
//עҵ
AddServices(services);
- //ɨ
- // services.AddScannerSetup();
-
- //
- // services.AddJobSetup();
//PLC
services.AddPlcSetup();
//ֱ֧ȫ :֧ System.Text.Encoding.GetEncoding("GB2312") System.Text.Encoding.GetEncoding("GB18030")
@@ -93,14 +88,6 @@ namespace Aucma.Core.DoorFoam
{
// ʹþ̬ļ
app.UseStaticFiles();
- // ȻȨм
- //app.UseAuthorization();
-
- // QuartzNetJobȷ
- // app.UseQuartzJobMildd(tasksQzService, schedulerCenter);
-
- //ɨ
- //app.UseScannerMildd(scannerService);
//PLC
app.UsePlcMildd(runPlcService);
}
diff --git a/Aucma.Core.DoorFoam/ViewModels/MainWindowViewModel.cs b/Aucma.Core.DoorFoam/ViewModels/MainWindowViewModel.cs
index 39eee1d0..88e2f945 100644
--- a/Aucma.Core.DoorFoam/ViewModels/MainWindowViewModel.cs
+++ b/Aucma.Core.DoorFoam/ViewModels/MainWindowViewModel.cs
@@ -6,9 +6,6 @@ using System;
using log4net;
using System.Diagnostics;
using System.Threading;
-using NPOI.HSSF.Record;
-using Admin.Core.Common;
-using Aucma.Core.Scanner;
using System.Linq;
using Aucma.Core.HwPLc;
using System.Windows.Threading;
@@ -26,7 +23,7 @@ namespace Aucma.Core.DoorFoam.ViewModels
public MainWindowViewModel()
{
UserContent = firstPage;
-
+ Aucma.Core.DoorFoam.Business.MvCodeHelper.RefreshStateEvent += RefreshScanner;
// 创建一个DispatcherTimer对象
DispatcherTimer timer = new DispatcherTimer();
timer.Interval = TimeSpan.FromSeconds(1);
@@ -57,7 +54,7 @@ namespace Aucma.Core.DoorFoam.ViewModels
{
RefreshMesDb();
RefreshPlc();
- RefreshScanner();
+ RefreshScanner("",false);
}
///
@@ -121,11 +118,9 @@ namespace Aucma.Core.DoorFoam.ViewModels
///
///
///
- public void RefreshScanner()
+ public void RefreshScanner(string ip, bool flag)
{
- string ip1 = Appsettings.app("Middleware", "Scanner1", "Ip");
- bool flag1 = MvCodeHelper.ConnectionStatus(ip1);
- Scanner1State(flag1);
+ Scanner1State(flag); ;
}
#endregion
@@ -449,13 +444,12 @@ namespace Aucma.Core.DoorFoam.ViewModels
{
try
{
-
Task.Run(() =>
{
Thread.Sleep(2000);
//MvCodeHelper1.DeviceListAcq();//获取创建设备
// MvCodeHelper1.StartGrab(); // 开启触发扫码接收数据
- Business.MvCodeHelper.Liner();
+ Aucma.Core.DoorFoam.Business.MvCodeHelper.Door();
});
}
diff --git a/Aucma.Core.DoorFoam/ViewModels/RealTimePageViewModel.cs b/Aucma.Core.DoorFoam/ViewModels/RealTimePageViewModel.cs
index 10006fce..e753d80c 100644
--- a/Aucma.Core.DoorFoam/ViewModels/RealTimePageViewModel.cs
+++ b/Aucma.Core.DoorFoam/ViewModels/RealTimePageViewModel.cs
@@ -19,40 +19,45 @@ using System.Text.RegularExpressions;
using System.Windows.Controls;
using System.Threading;
using Aucma.Core.DoorFoam.Business;
+using Admin.Core.Service;
+using Admin.Core.Model.Model_New;
namespace Aucma.Core.DoorFoam.ViewModels
{
- public partial class RealTimePageViewModel : ObservableObject
+ public partial class RealTimePageViewModel : ObservableObject
{
private static readonly log4net.ILog log = LogManager.GetLogger(typeof(RealTimePageViewModel));
protected readonly IProductPlanInfoServices? _productPlanInfoServices;
protected readonly IBaseOrderInfoServices? _baseOrderInfoServices;
protected readonly IDoorMateHistoryServices? _doorMateHistoryServices;
protected readonly IPrintBarCodeServices? _printBarCodeServices;
- protected readonly ISysUserInfoRepository _sysUserInfoRepository;
+ protected readonly ISysUserInfoRepository _sysUserInfoRepository;
+ protected readonly IOrderBomInfoServices _orderBomInfoServices;
+ private readonly IMaterialCompletionServices _materialCompletionServices;
private ObservableCollection listItems = new ObservableCollection();
+
public RealTimePageViewModel()
{
+ _orderBomInfoServices = App.ServiceProvider.GetService();
_baseOrderInfoServices = App.ServiceProvider.GetService();
_productPlanInfoServices = App.ServiceProvider.GetService();
_doorMateHistoryServices = App.ServiceProvider.GetService();
_sysUserInfoRepository = App.ServiceProvider.GetService();
_printBarCodeServices = App.ServiceProvider.GetService();
- InitEveryDayMethodAsync();
+ _materialCompletionServices = App.ServiceProvider.GetService();
MvCodeHelper.DoorReceiveCodeDelegateEvent += OnLoadPlanData;
- //OnLoadPlanData("B24010181060282920001");
-
- Task.Run(() =>
- {
- Thread.Sleep(2000);
- while(true)
- {
- InitEveryDayMethodAsync();//刷新型号统计图表
- Thread.Sleep(1000);
- }
- });
+ InitEveryDayMethodAsync();
+ //Task.Run(() =>
+ //{
+ // Thread.Sleep(2000);
+ // while(true)
+ // {
+ // InitEveryDayMethodAsync();//刷新型号统计图表
+ // Thread.Sleep(1000);
+ // }
+ //});
}
///
/// 获取今天的数据
@@ -60,7 +65,7 @@ namespace Aucma.Core.DoorFoam.ViewModels
///
private void InitEveryDayMethodAsync()
{
-
+
ChartValues achievement = new ChartValues();
MaterialNameList = new List();
@@ -68,7 +73,7 @@ namespace Aucma.Core.DoorFoam.ViewModels
App.Current.Dispatcher.BeginInvoke((Action)(() =>
{
- // ModelStatistics.Clear();
+ // ModelStatistics.Clear();
if (info != null)
{
@@ -78,7 +83,7 @@ namespace Aucma.Core.DoorFoam.ViewModels
foreach (var groupItem in groupResult)
{
achievement.Add(groupItem.Count);
-
+
MaterialNameList.Add(FormatMaterialType(groupItem.MaterialName));
}
}
@@ -93,19 +98,23 @@ namespace Aucma.Core.DoorFoam.ViewModels
};
if (ModelStatistics.Count > 0)
{
- for(int i = 0; i < achievement.Count; i++)
- {
- ModelStatistics.FirstOrDefault().Values[i] = achievement[i];
- }
+ #region 这样添加数据会有问题
+ //for (int i = 0; i < achievement.Count; i++)
+ //{
+ // ModelStatistics.FirstOrDefault().Values[i] = achievement[i];
+ //}
+ #endregion
+ //从数据库重新加载
+ InitEveryDayMethodAsync();
}
else
{
ModelStatistics.Add(column);
}
-
+
}));
-
+
}
@@ -229,28 +238,35 @@ namespace Aucma.Core.DoorFoam.ViewModels
/// 门体匹配队列
///
///
- public void OnLoadPlanData(string code)
+ public async Task OnLoadPlanData(string code)
{
string stationCode = Appsettings.app("StationInfo", "StationCode");
- string productLineCode = Appsettings.app("StationInfo", "ProductlineCode");
+ string phproductlineCode = Appsettings.app("StationInfo", "PHProductlineCode");
+
if (string.IsNullOrEmpty(code)) return;
- var plan = _productPlanInfoServices.QueryAsync(d => d.ProductLineCode == stationCode && d.PlanAmount > d.CompleteAmount).Result;
+ var result = await _doorMateHistoryServices.FirstAsync(d=>d.MaterialBarCode== code);
+ if (result!=null) return;
+
+ var plan = await _productPlanInfoServices.QueryAsync(d => d.PlanAmount > d.CompleteAmount);
+ // var plan = _orderBomInfoServices.Query(d => d.MaterialType == "200");
//var plan = _baseOrderInfoServices.QueryAsync().Result;
if (plan == null)
{
+ PrintMessageToListBox("未查询到计划信息");
Console.WriteLine("未查询到计划信息");
return;
}
- var obj = _printBarCodeServices.FirstAsync(d => d.MaterialBarcode == code).Result;
+ var obj = await _printBarCodeServices.FirstAsync(d => d.MaterialBarcode == code);
if (obj == null)
{
+ PrintMessageToListBox("未查询到条码打印信息");
Console.WriteLine("未查询到条码打印信息");
return;
}
- //string materialCode = "11239723";
- ProductPlanInfo stationPlan = plan.FirstOrDefault(d =>d.OrderCode == obj.OrderCode);
+ ProductPlanInfo stationPlan = plan.FirstOrDefault(d => d.OrderCode == obj.OrderCode);
if (stationPlan == null)
{
+ PrintMessageToListBox($"未查询到该条码订单信息;条码【{code}】");
Console.WriteLine($"未查询到该条码订单信息;条码【{code}】");
log.Error($"未查询到该条码订单信息;条码【{code}】");
return;
@@ -259,18 +275,25 @@ namespace Aucma.Core.DoorFoam.ViewModels
DoorMateHistory model = new DoorMateHistory();
if (planInfoDataGrid.Count() == 0) model.ObjId = 1;
else model.ObjId = planInfoDataGrid.Count() + 1;
-
+
model.PlanCode = stationPlan.PlanCode;
model.OrderCode = stationPlan.OrderCode;
+ model.MaterialBarCode = code;
model.MaterialCode = stationPlan.MaterialCode;
model.MaterialName = stationPlan.MaterialName;
model.ScanTime = DateTime.Now;
- SaveMateHistory(code,obj, productLineCode, plan, model);
- Console.WriteLine($"箱门匹配信息记录成功!");
+
+ SaveMateHistory(code, obj, phproductlineCode, plan, model);
+ Console.WriteLine($"箱门匹配信息记录成功!箱体码【{code}】");
+ PrintMessageToListBox($"箱门匹配信息记录成功!箱体码【{code}】");
model.MaterialName = this.FormatMaterialType(stationPlan.MaterialName);
- model.ObjId = i+1;
- planInfoDataGrid.Insert(0, model);
+ System.Windows.Application.Current.Dispatcher.Invoke((Action)(async () =>
+ {
+ planInfoDataGrid.Insert(0, model);
+ }));
+
+ InsertToCompleteAndCheck(model, code);
InitEveryDayMethodAsync();//刷新型号统计图表
Console.WriteLine($"箱门匹配信息记录成功!刷新型号统计图表");
}
@@ -296,7 +319,7 @@ namespace Aucma.Core.DoorFoam.ViewModels
model.PlantCode = station.PlantCode;
model.StationCode = station.StationCode;
int result = _doorMateHistoryServices.AddAsync(model).Result;
- if (result <= 0)
+ if (result != 0)
{
PrintMessageToListBox($"箱门匹配记录异常!扫描箱体条码:【{code}】");
log.Error($"箱门匹配记录异常!扫描箱体条码:【{code}】");
@@ -306,9 +329,9 @@ namespace Aucma.Core.DoorFoam.ViewModels
PrintMessageToListBox($"箱门匹配成功!扫描箱体条码:【{code}】");
log.Info($"箱门匹配成功!扫描箱体条码:【{code}】");
}
-
+
}
- }
+ }
#endregion
#endregion
@@ -357,7 +380,7 @@ namespace Aucma.Core.DoorFoam.ViewModels
log.Error("日志数据绑定异常", ex);
}
- }
+ }
#endregion
#region 截取物料编码
@@ -373,7 +396,7 @@ namespace Aucma.Core.DoorFoam.ViewModels
}
#endregion
-
+ #region 格式化物料类型
///
/// 格式化物料类型
///
@@ -395,5 +418,38 @@ namespace Aucma.Core.DoorFoam.ViewModels
return result;
}
+ #endregion
+
+ #region 保存过点数
+
+ ///
+ /// 保存过点数
+ ///
+ ///
+ ///
+ ///
+ public async void InsertToCompleteAndCheck(DoorMateHistory history, string barCode)
+ {
+ if (history != null) return ;
+ List completionList = new List();
+ #region 更新过点数据
+ string stationName = Appsettings.app("StationInfo", "StationName");
+ MaterialCompletion completion = new MaterialCompletion();
+ completion.OrderCode = history.OrderCode;
+ completion.MaterialBarcode = barCode;
+ completion.MaterialCode = history.MaterialCode;
+ completion.MaterialName = history.MaterialName;
+ completion.StationName = stationName;
+ completion.ProductLineCode = "CX_02";
+ completion.CompleteDate = DateTime.Now;
+ completionList.Add(completion);
+ #endregion
+
+ int r = _materialCompletionServices.AddAsync(completionList).Result;
+
+ }
+
+ #endregion
+
}
}
diff --git a/Aucma.Core.DoorFoam/Views/RealTimePageView.xaml b/Aucma.Core.DoorFoam/Views/RealTimePageView.xaml
index dd3d9114..51c5a67d 100644
--- a/Aucma.Core.DoorFoam/Views/RealTimePageView.xaml
+++ b/Aucma.Core.DoorFoam/Views/RealTimePageView.xaml
@@ -134,14 +134,20 @@
-
+
+
+
+
+
+
+
diff --git a/Aucma.Core.DoorFoam/Views/RealTimePageView.xaml.cs b/Aucma.Core.DoorFoam/Views/RealTimePageView.xaml.cs
index 6a65b351..e9db0a32 100644
--- a/Aucma.Core.DoorFoam/Views/RealTimePageView.xaml.cs
+++ b/Aucma.Core.DoorFoam/Views/RealTimePageView.xaml.cs
@@ -26,5 +26,14 @@ namespace Aucma.Core.DoorFoam.Views
InitializeComponent();
this.DataContext = new RealTimePageViewModel();
}
+
+ //在载入行的时候在行表头添加编号
+
+ private void dgvMH_LoadingRow(object sender, DataGridRowEventArgs e)
+ {
+ e.Row.Header = (e.Row.GetIndex() + 1).ToString();
+ }
+
+
}
}
diff --git a/Aucma.Core.DoorFoam/appsettings.json b/Aucma.Core.DoorFoam/appsettings.json
index 270a181e..842522a8 100644
--- a/Aucma.Core.DoorFoam/appsettings.json
+++ b/Aucma.Core.DoorFoam/appsettings.json
@@ -195,7 +195,7 @@
"ScannerServer": [
{
"Id": 1,
- "Ip": "10.10.92.121", //测试:10.10.92.121
+ "Ip": "10.10.92.134", //测试:10.10.92.121
"Name": "扫码器1"
}
],
@@ -219,12 +219,13 @@
}
],
"StationInfo": {
- "StationCode": 1005,
+ "StationCode": 1020,
"ShellInventoryStoreCode": "XKJCK-001",
"LinerInventory": "NDJCK-001",
"AfterStoreCode": "FPJCK-001",
"BeforeStoreCode": "PBSCK-001",
- "ProductlineCode": "CX_02"
+ "PHProductlineCode": "1006", //泡后库工位编码
+ "StationName": "门体发泡" //门体发泡工位编码
},
"IpRateLimiting": {
"EnableEndpointRateLimiting": false, //False: globally executed, true: executed for each
diff --git a/Aucma.Core.HwPLc/IPlc.cs b/Aucma.Core.HwPLc/IPlc.cs
index 261e0c16..5ec8df31 100644
--- a/Aucma.Core.HwPLc/IPlc.cs
+++ b/Aucma.Core.HwPLc/IPlc.cs
@@ -96,6 +96,13 @@ namespace Aucma.Core.HwPLc
///
bool WriteString(string address, string value);
///
+ /// 写入bool
+ ///
+ ///
+ ///
+ ///
+ bool WriteBool(string address, bool value);
+ ///
/// 写入byte
///
///
diff --git a/Aucma.Core.HwPLc/Impl/MelsecPlc.cs b/Aucma.Core.HwPLc/Impl/MelsecPlc.cs
index edde9f02..298135c7 100644
--- a/Aucma.Core.HwPLc/Impl/MelsecPlc.cs
+++ b/Aucma.Core.HwPLc/Impl/MelsecPlc.cs
@@ -592,5 +592,39 @@ namespace Aucma.Core.HwPLc
b = temp;
}
+
+
+
+ #region 写入bool
+ ///
+ /// 写入bool
+ ///
+ ///
+ ///
+ ///
+ ///
+ public bool WriteBool(string address, bool value)
+ {
+ bool iflag = false;
+ try
+ {
+ OperateResult write = melsecMcNet.Write(address, value);
+ if (write.IsSuccess)
+ {
+ iflag = true;
+ }
+ else
+ {
+ iflag = false;
+ }
+ }
+ catch (Exception ex)
+ {
+ log.Error("WriteBool方法异常" + ex.ToString());
+ iflag = false;
+ }
+ return iflag;
+ }
+ #endregion
}
}
diff --git a/Aucma.Core.HwPLc/Impl/SiemensPlc.cs b/Aucma.Core.HwPLc/Impl/SiemensPlc.cs
index eed02386..114fa91e 100644
--- a/Aucma.Core.HwPLc/Impl/SiemensPlc.cs
+++ b/Aucma.Core.HwPLc/Impl/SiemensPlc.cs
@@ -399,6 +399,38 @@ namespace Aucma.Core.HwPLc
#endregion
+ #region 写入bool
+ ///
+ /// 写入bool
+ ///
+ ///
+ ///
+ ///
+ ///
+ public bool WriteBool(string address, bool value)
+ {
+ bool iflag = false;
+ try
+ {
+ OperateResult write = siemensS7Net.Write(address, value);
+ if (write.IsSuccess)
+ {
+ iflag = true;
+ }
+ else
+ {
+ iflag = false;
+ }
+ }
+ catch (Exception ex)
+ {
+ log.Error("WriteBool方法异常" + ex.ToString());
+ iflag = false;
+ }
+ return iflag;
+ }
+ #endregion
+
#region 写入byte
///
/// 写入byte
@@ -406,7 +438,7 @@ namespace Aucma.Core.HwPLc
///
///
///
- public bool WriteByte(string address, byte[] bytes)
+ public bool WriteByte(string address, byte[] bytes)
{
bool iflag = false;
try
@@ -528,5 +560,7 @@ namespace Aucma.Core.HwPLc
{
throw new NotImplementedException();
}
+
+
}
}
diff --git a/Aucma.Core.Palletiz/Views/HandPalletizView.xaml b/Aucma.Core.Palletiz/Views/HandPalletizView.xaml
index fae57d26..b8919b8e 100644
--- a/Aucma.Core.Palletiz/Views/HandPalletizView.xaml
+++ b/Aucma.Core.Palletiz/Views/HandPalletizView.xaml
@@ -49,7 +49,7 @@
-
+
@@ -67,8 +67,8 @@
-
-
+
diff --git a/Aucma.Core.Palletiz/Views/HandPalletizView.xaml.cs b/Aucma.Core.Palletiz/Views/HandPalletizView.xaml.cs
index e72d0eb9..5ccbf815 100644
--- a/Aucma.Core.Palletiz/Views/HandPalletizView.xaml.cs
+++ b/Aucma.Core.Palletiz/Views/HandPalletizView.xaml.cs
@@ -60,23 +60,23 @@ namespace Aucma.Core.Palletiz.Views
#region 目的货道选择
private void btn_space1_Click(object sender, RoutedEventArgs e)
{
- btn_space1.Background = Brushes.Lime;
- btn_space2.Background = Brushes.DarkCyan;
- btn_space3.Background = Brushes.DarkCyan;
- btn_space4.Background = Brushes.DarkCyan;
- btn_space5.Background = Brushes.DarkCyan;
- btn_space6.Background = Brushes.DarkCyan;
- btn_space7.Background = Brushes.DarkCyan;
- btn_space8.Background = Brushes.DarkCyan;
- btn_space9.Background = Brushes.DarkCyan;
+ btn_space1.Background = Brushes.Lime;
+ btn_space2.Background = Brushes.DarkCyan;
+ btn_space3.Background = Brushes.DarkCyan;
+ btn_space4.Background = Brushes.DarkCyan;
+ btn_space5.Background = Brushes.DarkCyan;
+ btn_space6.Background = Brushes.DarkCyan;
+ btn_space7.Background = Brushes.DarkCyan;
+ btn_space8.Background = Brushes.DarkCyan;
+ btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
- btn_space15.Background = Brushes.DarkCyan;
- btn_space16.Background = Brushes.DarkCyan;
- this.btn_spaceTemp.Text = "001";
+ //btn_space15.Background = Brushes.DarkCyan;
+ //btn_space16.Background = Brushes.DarkCyan;
+ this.btn_spaceTemp.Text = "001";
}
private void btn_space2_Click(object sender, RoutedEventArgs e)
@@ -95,8 +95,8 @@ namespace Aucma.Core.Palletiz.Views
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
- btn_space15.Background = Brushes.DarkCyan;
- btn_space16.Background = Brushes.DarkCyan;
+ //btn_space15.Background = Brushes.DarkCyan;
+ //btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "002";
}
@@ -116,8 +116,8 @@ namespace Aucma.Core.Palletiz.Views
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
- btn_space15.Background = Brushes.DarkCyan;
- btn_space16.Background = Brushes.DarkCyan;
+ //btn_space15.Background = Brushes.DarkCyan;
+ //btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "003";
}
@@ -137,8 +137,8 @@ namespace Aucma.Core.Palletiz.Views
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
- btn_space15.Background = Brushes.DarkCyan;
- btn_space16.Background = Brushes.DarkCyan;
+ //btn_space15.Background = Brushes.DarkCyan;
+ //btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "004";
}
@@ -158,8 +158,8 @@ namespace Aucma.Core.Palletiz.Views
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
- btn_space15.Background = Brushes.DarkCyan;
- btn_space16.Background = Brushes.DarkCyan;
+ //btn_space15.Background = Brushes.DarkCyan;
+ //btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "005";
}
@@ -179,8 +179,8 @@ namespace Aucma.Core.Palletiz.Views
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
- btn_space15.Background = Brushes.DarkCyan;
- btn_space16.Background = Brushes.DarkCyan;
+ //btn_space15.Background = Brushes.DarkCyan;
+ //btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "006";
}
@@ -200,8 +200,8 @@ namespace Aucma.Core.Palletiz.Views
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
- btn_space15.Background = Brushes.DarkCyan;
- btn_space16.Background = Brushes.DarkCyan;
+ //btn_space15.Background = Brushes.DarkCyan;
+ //btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "007";
}
private void btn_space8_Click(object sender, RoutedEventArgs e)
@@ -220,8 +220,8 @@ namespace Aucma.Core.Palletiz.Views
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
- btn_space15.Background = Brushes.DarkCyan;
- btn_space16.Background = Brushes.DarkCyan;
+ //btn_space15.Background = Brushes.DarkCyan;
+ //btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "008";
}
private void btn_space9_Click(object sender, RoutedEventArgs e)
@@ -240,8 +240,8 @@ namespace Aucma.Core.Palletiz.Views
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
- btn_space15.Background = Brushes.DarkCyan;
- btn_space16.Background = Brushes.DarkCyan;
+ //btn_space15.Background = Brushes.DarkCyan;
+ //btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "009";
}
private void btn_space10_Click(object sender, RoutedEventArgs e)
@@ -260,8 +260,8 @@ namespace Aucma.Core.Palletiz.Views
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
- btn_space15.Background = Brushes.DarkCyan;
- btn_space16.Background = Brushes.DarkCyan;
+ //btn_space15.Background = Brushes.DarkCyan;
+ //btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "010";
}
private void btn_space11_Click(object sender, RoutedEventArgs e)
@@ -280,8 +280,8 @@ namespace Aucma.Core.Palletiz.Views
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
- btn_space15.Background = Brushes.DarkCyan;
- btn_space16.Background = Brushes.DarkCyan;
+ //btn_space15.Background = Brushes.DarkCyan;
+ //btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "011";
}
private void btn_space12_Click(object sender, RoutedEventArgs e)
@@ -300,8 +300,8 @@ namespace Aucma.Core.Palletiz.Views
btn_space12.Background = Brushes.Lime;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
- btn_space15.Background = Brushes.DarkCyan;
- btn_space16.Background = Brushes.DarkCyan;
+ //btn_space15.Background = Brushes.DarkCyan;
+ //btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "012";
}
private void btn_space13_Click(object sender, RoutedEventArgs e)
@@ -320,8 +320,8 @@ namespace Aucma.Core.Palletiz.Views
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.Lime;
btn_space14.Background = Brushes.DarkCyan;
- btn_space15.Background = Brushes.DarkCyan;
- btn_space16.Background = Brushes.DarkCyan;
+ //btn_space15.Background = Brushes.DarkCyan;
+ //btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "013";
}
private void btn_space14_Click(object sender, RoutedEventArgs e)
@@ -340,8 +340,8 @@ namespace Aucma.Core.Palletiz.Views
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.Lime;
- btn_space15.Background = Brushes.DarkCyan;
- btn_space16.Background = Brushes.DarkCyan;
+ //btn_space15.Background = Brushes.DarkCyan;
+ //btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "014";
}
private void btn_space15_Click(object sender, RoutedEventArgs e)
@@ -360,8 +360,8 @@ namespace Aucma.Core.Palletiz.Views
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
- btn_space15.Background = Brushes.Lime;
- btn_space16.Background = Brushes.DarkCyan;
+ //btn_space15.Background = Brushes.Lime;
+ //btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "015";
}
private void btn_space16_Click(object sender, RoutedEventArgs e)
@@ -380,8 +380,8 @@ namespace Aucma.Core.Palletiz.Views
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
- btn_space15.Background = Brushes.DarkCyan;
- btn_space16.Background = Brushes.Lime;
+ //btn_space15.Background = Brushes.DarkCyan;
+ //btn_space16.Background = Brushes.Lime;
this.btn_spaceTemp.Text = "016";
}
#endregion
diff --git a/Aucma.Core.PrintTo/Models/BarCodeModel.cs b/Aucma.Core.PrintTo/Models/BarCodeModel.cs
index f53807cf..63213d02 100644
--- a/Aucma.Core.PrintTo/Models/BarCodeModel.cs
+++ b/Aucma.Core.PrintTo/Models/BarCodeModel.cs
@@ -14,6 +14,10 @@ namespace Aucma.Core.PrintTo.Models
///
public int ID { get; set; }
///
+ /// 订单编码
+ ///
+ public string? OrderCode { get; set; }
+ ///
/// 产品编码
///
public string? ProductCode { get; set; }
diff --git a/Aucma.Core.PrintTo/ViewModels/IndexPageViewModel.cs b/Aucma.Core.PrintTo/ViewModels/IndexPageViewModel.cs
index 2447870e..5daf9bad 100644
--- a/Aucma.Core.PrintTo/ViewModels/IndexPageViewModel.cs
+++ b/Aucma.Core.PrintTo/ViewModels/IndexPageViewModel.cs
@@ -9,6 +9,7 @@ using CommunityToolkit.Mvvm.Input;
using CommunityToolkit.Mvvm.Messaging;
using log4net;
using Microsoft.Extensions.DependencyInjection;
+using NPOI.Util;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -164,7 +165,7 @@ namespace Aucma.Core.PrintTo.ViewModels
/// 打印
///
[RelayCommand]
- private void Print(string obj)
+ private async void Print(string obj)
{
if (string.IsNullOrEmpty(obj))
{
@@ -184,7 +185,7 @@ namespace Aucma.Core.PrintTo.ViewModels
}
if (SelectedCells.PlanAmount < PrintAmount)
{
- MessageBox.Show("打印数量能高于计划数量!", "系统提醒");
+ MessageBox.Show("打印数量不能高于计划数量!", "系统提醒");
return;
}
if (printType==0)
@@ -192,6 +193,7 @@ namespace Aucma.Core.PrintTo.ViewModels
MessageBox.Show("请选择打印类型!", "系统提醒");
return;
}
+
try
{
@@ -202,8 +204,34 @@ namespace Aucma.Core.PrintTo.ViewModels
//string material_name = SelectedCells.MaterialName;
int standard_amount = PrintAmount;
string printName = SelectedCells.PrintName;
-
PrintIsEnabled = "False";
+ int type = 0;
+ if (printType == 500)
+ {
+ type = 2;
+ }
+ if (printType == 200)
+ {
+ type = 1;
+ }
+ var list= await _printBarCodeServices.QueryAsync(d => d.OrderCode == order_code&&d.PrintBarType== printType);
+
+ if (list!=null||list.Count!= 0)
+ {
+ int num= list.Count;//已经打印数量
+ int residue= SelectedCells.PlanAmount - num;//剩余打印数量
+ if (residue == standard_amount)
+ {
+ MessageBox.Show("订单数量已经打印到规定订单数量!", "系统提醒");
+ return;
+ }
+ if ((residue- standard_amount)< 1)
+ {
+ MessageBox.Show("订单数量已经打印到规定订单数量!", "系统提醒");
+ return;
+ }
+ }
+
//更新打印名称
var baseOrder = _baseOrderInfoServices.FirstAsync(d => d.OrderCode == order_code).Result;
if (string.IsNullOrEmpty(baseOrder.PrintName))
@@ -229,19 +257,7 @@ namespace Aucma.Core.PrintTo.ViewModels
[RelayCommand]
private void SupplementPrint(string obj)
{
- if (string.IsNullOrEmpty(obj))
- {
- MessageBox.Show("请选中要补打的数据!", "系统提醒");
- return;
- }
- string order_code = SelectedCells.OrderCode;
- string product_code = SelectedCells.ProductCode;
- string product_name = SelectedCells.ProductName;
- string material_code = SelectedCells.MaterialCode;
- string material_name = SelectedCells.MaterialName;
- int standard_amount = SelectedCells.StandardAmount;
-
- SupplementPrintPageView printToDev = new SupplementPrintPageView(order_code,product_code, material_code, material_name);
+ SupplementPrintPageView printToDev = new SupplementPrintPageView();
printToDev.ShowDialog();
}
#endregion
diff --git a/Aucma.Core.PrintTo/ViewModels/SupplementPrintPageViewModel.cs b/Aucma.Core.PrintTo/ViewModels/SupplementPrintPageViewModel.cs
index 6c6ebcec..5bc40c99 100644
--- a/Aucma.Core.PrintTo/ViewModels/SupplementPrintPageViewModel.cs
+++ b/Aucma.Core.PrintTo/ViewModels/SupplementPrintPageViewModel.cs
@@ -1,6 +1,7 @@
using Admin.Core.IRepository;
using Admin.Core.IService;
using Admin.Core.Service;
+using Admin.Core.Service.Service_New;
using Aucma.Core.PrintTo.Models;
using Aucma.Core.PrintTo.Views;
using CommunityToolkit.Mvvm.ComponentModel;
@@ -22,22 +23,14 @@ namespace Aucma.Core.PrintTo.ViewModels
private static readonly log4net.ILog log = LogManager.GetLogger(typeof(SupplementPrintPageViewModel));
private readonly IPrintBarCodeServices? _barCodeServices;
protected readonly IBaseOrderInfoServices? _baseOrderInfoServices;
+ protected readonly IPrintSuppleMentBarCodeServices _printSuppleMentBarCodeServices;
+ public SupplementPrintPageViewModel() {
- public SupplementPrintPageViewModel() { }
-
- public SupplementPrintPageViewModel(string orderCode, string productCode,string material_code,string materialName)
- {
- OrderNo = orderCode;
- ProductNo = productCode;
- MaterialCode = material_code;
- MaterialName = materialName;
-
- _barCodeServices = App.ServiceProvider.GetService();
+ _printSuppleMentBarCodeServices = App.ServiceProvider.GetService();
_baseOrderInfoServices = App.ServiceProvider.GetService();
-
- Task.WaitAll(LoadData(productCode, material_code));
+ Task.WaitAll(LoadData());
}
-
+
#region 选中订单参数
#region 产品编码
@@ -71,21 +64,25 @@ namespace Aucma.Core.PrintTo.ViewModels
/// 打印
///
[RelayCommand]
- private void Print(string obj)
+ private async void Print(string obj)
{
if (string.IsNullOrEmpty(obj))
{
- MessageBox.Show("请选中一行!", "系统提醒");
+ MessageBox.Show("请选中要补打的条码!", "系统提醒");
return;
}
- var productCode = SelectedCells.ProductCode;
+ var orderCode = SelectedCells.OrderCode;
var materialCode = SelectedCells.MaterialCode;
var materialName = SelectedCells.MaterialName;
- var printName = SelectedCells.PrintName;
var barCode = SelectedCells.BarCode;
- var printType= SelectedCells.PrintType;
- PrintToDevView printToDev = new PrintToDevView(productCode, materialCode, materialName, 1, printName,printType);
- printToDev.ShowDialog();
+ var printName = SelectedCells.PrintName;
+ var baseOrderInfo=await _baseOrderInfoServices.FirstAsync(d => d.OrderCode == orderCode);
+ if (baseOrderInfo!=null)
+ {
+ SupplementView printToDev = new SupplementView(orderCode, materialCode, materialName, printName, barCode);
+ printToDev.ShowDialog();
+ }
+
}
#endregion
@@ -96,22 +93,22 @@ namespace Aucma.Core.PrintTo.ViewModels
[RelayCommand]
private async Task QueryBarCode(string queryStr)
{
- //System.Windows.Application.Current.Dispatcher.Invoke((Action)(async () =>
- //{
+ System.Windows.Application.Current.Dispatcher.Invoke((Action)(async () =>
+ {
if (!string.IsNullOrEmpty(queryStr))
{
Datalist.Clear();
- var list = await _barCodeServices.QueryAsync(d => d.MaterialName.Contains(queryStr) ||d.MaterialBarcode.Equals(ProductNo) || d.OrderCode.Equals(ProductNo));
+ var list = await _printSuppleMentBarCodeServices.QueryAsync(d => d.MaterialName.Contains(queryStr) || d.MaterialBarCode.Equals(ProductNo) || d.OrderCode.Equals(ProductNo));
foreach (var item in list)
{
- Datalist.Add(new BarCodeModel() {
- ProductCode = ProductNo,
- MaterialCode= item.MaterialCode,
- MaterialName=item.MaterialName,
- BarCode = item.MaterialBarcode,
- PrintTime = item.PrintTime,
- SuppleMetNum = item.SupplementMaterial
+ Datalist.Add(new BarCodeModel()
+ {
+ OrderCode = item.OrderCode,
+ MaterialCode = item.MaterialCode,
+ MaterialName = item.MaterialName,
+ BarCode = item.MaterialBarCode,
+ PrintTime = item.PrintTime
});
}
}
@@ -120,28 +117,47 @@ namespace Aucma.Core.PrintTo.ViewModels
Datalist.Clear();
await LoadData(ProductNo, MaterialCode);
}
- //}));
+ }));
}
#endregion
#region 加载DataGrid数据
- private async Task LoadData(string productCode,string material_code)
+ private async Task LoadData(string materialCode, string materialName)
{
- var list = await _barCodeServices.QueryAsync(d => d.OrderCode.Contains(productCode)&& d.MaterialCode.Contains(material_code));
+ var list = await _printSuppleMentBarCodeServices.QueryAsync(d=>d.MaterialBarCode.Contains(materialCode)|| d.MaterialBarCode.Contains(materialName));
if (list == null) return;
+
foreach (var item in list)
{
Datalist.Add(new BarCodeModel() {
- ProductCode = ProductNo,
+ OrderCode = item.OrderCode,
MaterialCode = item.MaterialCode,
MaterialName = item.MaterialName,
- BarCode = item.MaterialBarcode,
- PrintTime = item.PrintTime,
- SuppleMetNum = item.SupplementMaterial
+ BarCode = item.MaterialBarCode,
+ PrintName = item.PrintName,
+ PrintTime = item.PrintTime
});
}
}
+ private async Task LoadData()
+ {
+ var list = await _printSuppleMentBarCodeServices.QueryAsync();
+ if (list == null) return;
+
+ foreach (var item in list)
+ {
+ Datalist.Add(new BarCodeModel()
+ {
+ OrderCode = item.OrderCode,
+ MaterialCode = item.MaterialCode,
+ MaterialName = item.MaterialName,
+ BarCode = item.MaterialBarCode,
+ PrintName = item.PrintName,
+ PrintTime = item.PrintTime
+ });
+ }
+ }
#endregion
#region 初始化datagrid
diff --git a/Aucma.Core.PrintTo/Views/IndexPageView.xaml b/Aucma.Core.PrintTo/Views/IndexPageView.xaml
index bdbafdba..176ee01d 100644
--- a/Aucma.Core.PrintTo/Views/IndexPageView.xaml
+++ b/Aucma.Core.PrintTo/Views/IndexPageView.xaml
@@ -235,7 +235,7 @@
-
+
diff --git a/Aucma.Core.PrintTo/Views/SupplementPrintPageView.xaml b/Aucma.Core.PrintTo/Views/SupplementPrintPageView.xaml
index 3444bc8a..35730079 100644
--- a/Aucma.Core.PrintTo/Views/SupplementPrintPageView.xaml
+++ b/Aucma.Core.PrintTo/Views/SupplementPrintPageView.xaml
@@ -92,16 +92,23 @@
-
-
+
+
+
+
+
+
+
+
-
+
-
+
@@ -118,29 +125,35 @@
+
-
-
+
+
-
-
+
-
-
-
+
+
+
+
+
diff --git a/Aucma.Core.PrintTo/Views/SupplementPrintPageView.xaml.cs b/Aucma.Core.PrintTo/Views/SupplementPrintPageView.xaml.cs
index e57c06be..39f4a747 100644
--- a/Aucma.Core.PrintTo/Views/SupplementPrintPageView.xaml.cs
+++ b/Aucma.Core.PrintTo/Views/SupplementPrintPageView.xaml.cs
@@ -26,11 +26,9 @@ namespace Aucma.Core.PrintTo.Views
InitializeComponent();
this.DataContext = new SupplementPrintPageViewModel();
}
-
- public SupplementPrintPageView(string orderCode,string productCode,string material_code, string materialName)
+ private void dgvMH_LoadingRow(object sender, DataGridRowEventArgs e)
{
- InitializeComponent();
- this.DataContext = new SupplementPrintPageViewModel(orderCode, productCode, material_code, materialName);
+ e.Row.Header = (e.Row.GetIndex() + 1).ToString();
}
private void queryParam_PreviewMouseDown(object sender, MouseButtonEventArgs e)
diff --git a/Aucma.Core.Tasks/AucamTaskService.cs b/Aucma.Core.Tasks/AucamTaskService.cs
index aeeae41b..db6ef97b 100644
--- a/Aucma.Core.Tasks/AucamTaskService.cs
+++ b/Aucma.Core.Tasks/AucamTaskService.cs
@@ -1,4 +1,5 @@
using Admin.Core.Common;
+using Admin.Core.Common.Helper;
using Admin.Core.IService;
using Admin.Core.Model;
using Admin.Core.Model.Model_New;
@@ -6,7 +7,10 @@ using Admin.Core.Model.ViewModels;
using Aucma.Core.HwPLc;
using Aucma.Core.Tasks.Business;
using log4net;
+using StackExchange.Profiling.Internal;
+using System.Text;
using System.Timers;
+using static ICSharpCode.SharpZipLib.Zip.ExtendedUnixData;
namespace Aucma.Core.Tasks
{
@@ -16,58 +20,334 @@ namespace Aucma.Core.Tasks
public class AucamTaskService : IAucamTaskService
{
private static readonly log4net.ILog logHelper = LogManager.GetLogger(typeof(AucamTaskService));
- IPerfusionRecordServices _perfusionRecordServices;
- IExecutePlanInfoServices _executePlanInfoServices;
+ Semaphore semaphore = new Semaphore(1, 1);
+ protected readonly IPerfusionRecordServices? _perfusionRecordServices;
+ protected readonly IPerfusionAlarmServices? _perfusionAlarmServices;
+ protected readonly IPerfusionDeviceStatusServices? _perfusionDeviceStatusServices;
+ private readonly IMaterialCompletionServices _materialCompletionServices;
+ private readonly IPrintBarCodeServices _printBarCodeServices;
+ bool flag = true;
+ private static System.Text.ASCIIEncoding asciiEncoding = new System.Text.ASCIIEncoding();
+ private Perfusion_Record record;
+ private Perfusion_Record temprRecord;
+
+ private Perfusion_DeviceStatus perfusion_DeviceStatus = new Perfusion_DeviceStatus();
+ private Perfusion_Alarm perfusion_Alarm = new Perfusion_Alarm();
System.Timers.Timer timer1 = new System.Timers.Timer(5000);
- public AucamTaskService(IPerfusionRecordServices perfusionRecordServices,
- IPerfusionAlarmServices perfusionAlarmServices, IExecutePlanInfoServices executePlanInfoServices,
- IPerfusionDeviceStatusServices perfusionDeviceStatusServices)
+ public AucamTaskService(IPerfusionRecordServices perfusionRecordServices, IPerfusionAlarmServices perfusionAlarmServices,
+ IPerfusionDeviceStatusServices perfusionDeviceStatusServices, IMaterialCompletionServices materialCompletionServices,
+ IPrintBarCodeServices printBarCodeServices)
{
- PerfusionCollection coll = new PerfusionCollection(perfusionRecordServices, perfusionAlarmServices, perfusionDeviceStatusServices);
+ _perfusionRecordServices = perfusionRecordServices;
+ _perfusionAlarmServices = perfusionAlarmServices;
+ _perfusionDeviceStatusServices = perfusionDeviceStatusServices;
+ _materialCompletionServices = materialCompletionServices;
+ _printBarCodeServices = printBarCodeServices;
}
#region 更新钣金工位计划数
bool qFlay = true;//完成
- public void AucamUpdatePlanNumTask()
+ public void AucamTaskAsync()
{
- //timer1.Elapsed += new System.Timers.ElapsedEventHandler(Run1); //到达时间的时候执行事件;
- //timer1.AutoReset = true;//设置是执行一次(false)还是一直执行(true);
- //timer1.Enabled = true;//需要调用 timer.Start()或者timer.Enabled = true来启动它,
- //timer1.Start();//timer.Start()的内部原理还是设置timer.Enabled = true;
+ startCollect();
}
- private void Run1(object? sender, ElapsedEventArgs e)
+ #endregion
+
+ #region 灌注
+
+ public void startCollect()
{
- if (qFlay)
+ Task.Run(() =>
{
- qFlay = false;
- List viewList=new List();
- List list= _executePlanInfoServices.QuerySheetMetalData("1001");
- foreach (SheetMetalDataView item in list)
+ Thread.Sleep(3000);
+ Console.WriteLine($"【{DateTime.Now}】》灌注数据采集服务开启");
+ var obj = PlcHelper.siemensList.FirstOrDefault(d => d.EquipName.Equals("PerfusionPlc"));
+ if (obj != null)
{
- if (item.SidPanelAmount==item.BackPanelAmount)
+ while (true)
{
- SheetMetalDataView view = new SheetMetalDataView();
- view.CompleteAmount= item.PlanAmount;
- viewList.Add(view);
- }
- if (item.SidPanelAmount > item.BackPanelAmount)
- {
- SheetMetalDataView view = new SheetMetalDataView();
- view.CompleteAmount = item.BackPanelAmount;
- viewList.Add(view);
- }
- if (item.SidPanelAmount < item.BackPanelAmount)
- {
- SheetMetalDataView view = new SheetMetalDataView();
- view.CompleteAmount = item.SidPanelAmount;
- viewList.Add(view);
+ if (flag)
+ {
+ flag = false;
+ try
+ {
+ int signal = obj.plc.ReadInt16("DB55.84.0");
+
+ if (signal == 0)
+ {
+ Thread.Sleep(1000);
+ continue;
+ }
+ Console.WriteLine($"【{DateTime.Now}】》当前灌注采集信号:{signal}");
+ Console.WriteLine($"【{DateTime.Now}】》灌注数据开始采集");
+ //采集数据
+ record = ReadEquipSystem(obj, record, perfusion_DeviceStatus, perfusion_Alarm);
+ if (record == null) continue;
+ if (string.IsNullOrEmpty(record.PerfusionBoxCode))
+ {
+ Console.WriteLine($"【{DateTime.Now}】》条码为空!");
+ continue;
+ }
+ Console.WriteLine($"【{DateTime.Now}】》灌注数据条码:{record.PerfusionBoxCode}》灌注结果:{record.PerfusionResult}》设定灌注量:{record.PerfusionSetVolume}》灌注量:{record.PerfusionActualVolume}");
+ var tempRecord = _perfusionRecordServices.FirstAsync(d => d.PerfusionBoxCode.Equals(record.PerfusionBoxCode) && d.PerfusionResult == record.PerfusionResult).Result;
+
+ if (tempRecord != null)
+ {
+ Console.WriteLine($"【{DateTime.Now}】》灌注数据条码:[{record.PerfusionBoxCode}],灌注结果:[{record.PerfusionResult}],已存在系统中");
+ bool fw=obj.plc.WriteInt16("DB55.84.0", "0");//存盘成功写入bool
+ Console.WriteLine($"【{DateTime.Now}】》写入复位信号{fw}");
+ Thread.Sleep(1000);
+ continue;
+ }
+ #region 更新设备状态
+ Perfusion_DeviceStatus device = _perfusionDeviceStatusServices.FirstAsync().Result;
+ if (device == null)
+ {
+ _ = _perfusionDeviceStatusServices.AddAsync(perfusion_DeviceStatus).Result;
+ }
+ else
+ {
+ device.PerfusionStatus = perfusion_DeviceStatus.PerfusionStatus;
+ var rsult = _perfusionDeviceStatusServices.UpdateAsync(device).Result;
+ }
+ #endregion
+
+ #region 更新报警信息
+ if (perfusion_Alarm.PerfusionStatus > 0)
+ {
+ int a = _perfusionAlarmServices.AddAsync(perfusion_Alarm).Result;
+ }
+ #endregion
+
+
+ //充注结束
+ int result = _perfusionRecordServices.AddAsync(record).Result;
+ if (result == 0)
+ {
+ //添加过点数
+ Console.WriteLine($"【{DateTime.Now}】》灌注结果:{record.PerfusionResult}");
+ if (record.PerfusionResult == 8)
+ {
+ var insert= InsertToCompleteAndCheck(record);
+ if (insert)
+ {
+ Console.WriteLine($"【{DateTime.Now}】》保存过点数成功!");
+ }
+ }
+
+ Console.WriteLine(record.ToJson());
+ }
+
+ bool r = obj.plc.WriteInt16("DB55.84.0", "0");//存盘成功写入bool
+ Console.WriteLine($"【{DateTime.Now}】》写入复位信号{r}");
+ Console.WriteLine($"【{DateTime.Now}】》灌注数据采集结束");
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine(ex);
+ }
+ finally
+ {
+ flag = true;
+ // Console.WriteLine($"【{DateTime.Now}】》灌注数据采集结束");
+ }
+ }
+
}
+
}
+
+ });
+ }
+
+ ///
+ /// 采集灌注参数
+ ///
+ ///
+ static Perfusion_Record ReadEquipSystem(Aucma.Core.HwPLc.PlcModel obj, Perfusion_Record record, Perfusion_DeviceStatus deviceStatus, Perfusion_Alarm alarmInfo)
+ {
+ record = new Perfusion_Record();
+ byte[] info = obj.plc.Read("DB55.0", 84);
+ byte[] codeInfo = obj.plc.Read("DB60.0", 46);
+ if (info == null) return null;
+ #region 灌注记录赋值
+ record.PerfusionActualVolume = byteToDouble(info.Skip(0).Take(8).ToArray()).ToString().Replace("\0", "");
+ record.PerfusionR = byteToFloat(info.Skip(8).Take(4).ToArray()).ToString().ToString().Replace("\0", "");
+ record.PerfusionL = byteToFloat(info.Skip(54).Take(4).ToArray()).ToString().Replace("\0", "");
+ record.PerfusionDuration = int.Parse(StringChange.bytesToHexStr(info.Skip(12).Take(4).ToArray(), 4), System.Globalization.NumberStyles.HexNumber).ToString().Replace("\0", "");
+ record.Yield = int.Parse(StringChange.bytesToHexStr(info.Skip(16).Take(4).ToArray(), 4), System.Globalization.NumberStyles.HexNumber).ToString().Replace("\0", "");
+ record.PerfusionBoxCode = asciiEncoding.GetString(codeInfo.Skip(2).Take(22).ToArray()).Trim('\n').Replace("\0", "").Replace("\r","");
+ record.PerfusionRefrigerantTypeLeft = asciiEncoding.GetString(codeInfo.Skip(28).Take(7).ToArray()).Trim('\n').Replace("\0", "");
+ record.PerfusionRefrigerantTypeRight = asciiEncoding.GetString(codeInfo.Skip(38).Take(7).ToArray()).Trim('\n').Replace("\0", "");
+ record.PerfusionSetVolume = byteToFloat(info.Skip(78).Take(4).ToArray()).ToString().Replace("\0", "");
+ record.PerfusionSystem = short.Parse(StringChange.bytesToHexStr(info.Skip(82).Take(2).ToArray(), 2), System.Globalization.NumberStyles.HexNumber).ToString().Replace("\0", "");
+ ///灌注完成状态字
+ record.PerfusionFinishStatus = short.Parse(StringChange.bytesToHexStr(info.Skip(46).Take(2).ToArray(), 2), System.Globalization.NumberStyles.HexNumber).ToString().Replace("\0", "");
+ record.PerfusionResult = short.Parse(StringChange.bytesToHexStr(info.Skip(48).Take(2).ToArray(), 2), System.Globalization.NumberStyles.HexNumber);
+ record.CreatedBy = "equip";
+ record.CreatedTime = DateTime.Now;
+ record.UpdatedBy = "equip";
+ record.UpdatedTime = DateTime.Now;
+ #endregion
+ // Console.WriteLine("灌注记录:" + record.ToJson());
+ #region 设备状态赋值
+ deviceStatus.PerfusionDevicetype = "灌注";
+ deviceStatus.PerfusionStatus = short.Parse(StringChange.bytesToHexStr(info.Skip(50).Take(2).ToArray(), 2), System.Globalization.NumberStyles.HexNumber);
+ deviceStatus.CreatedBy = "equip";
+ deviceStatus.CreatedTime = DateTime.Now;
+ deviceStatus.UpdatedBy = "equip";
+ deviceStatus.UpdatedTime = DateTime.Now;
+ #endregion
+ // Console.WriteLine("设备状态:" + deviceStatus.ToJson());
+ #region 设备报警赋值
+ alarmInfo.PerfusionBoxcode = record.PerfusionBoxCode;
+ alarmInfo.PerfusionStatus = short.Parse(StringChange.bytesToHexStr(info.Skip(52).Take(2).ToArray(), 2), System.Globalization.NumberStyles.HexNumber);
+ alarmInfo.PerfusionAlarm = AlarmTrans(alarmInfo.PerfusionStatus);
+ alarmInfo.PerfusionCompleted = "1";
+ alarmInfo.CreatedBy = "equip";
+ alarmInfo.CreatedTime = DateTime.Now;
+ alarmInfo.UpdatedBy = "equip";
+ alarmInfo.UpdatedTime = DateTime.Now;
+ #endregion
+ // Console.WriteLine("报警信息:" + alarmInfo.ToJson());
+ // Console.WriteLine("\n");
+ return record;
+ }
+ static string AlarmTrans(short code)
+ {
+ string result = "";
+ switch (code)
+ {
+
+ case 2: result = "充注枪真空不合格"; break;
+ case 4: result = "充注故障"; break;
+ case 8: result = "充注时真空度超限定"; break;
+ case 16: result = "回升检测不合格"; break;
+ case 32: result = "工件真空不合格"; break;
+ case 64: result = "平衡缸接近开关异常"; break;
+ case 128: result = "增压超时"; break;
+ case 256: result = "风压不足"; break;
}
- }
+ return result;
+ }
+
+
+ #region 字符工具转换方法
+ /// byte[]转十进制ascii码
+ ///
+ ///
+ static string ByteArrayToString(byte[] bytes)
+ {
+ string result = string.Empty;
+ foreach (byte b in bytes)
+ {
+ int decimalValue = Convert.ToInt32(b); // 将字节转换为十进制值
+ result += decimalValue;
+ }
+ return result;
+ }
+ ///
+ /// byte[]转二进制
+ ///
+ ///
+ static string ByteArrayToBinary(byte[] bytes)
+ {
+ StringBuilder binaryString = new StringBuilder();
+
+ foreach (byte b in bytes)
+ {
+ binaryString.Append(Convert.ToString(b, 2).PadLeft(8, '0'));
+ }
+
+ // Console.WriteLine(binaryString);
+
+ string reversedStr = new string(binaryString.ToString().Reverse().ToArray());
+ // Console.WriteLine(reversedStr);
+
+ return reversedStr;
+ }
+
+ ///
+ /// 根据二进制字符串确定夹具状态 1正常生产 2暂停生产
+ ///
+ static int judgeStatus(string str1)
+ {
+ int item1 = 0;
+ if (str1.Substring(0, 1) == "1")
+ {
+ item1 = 1; //
+ }
+ else if (str1.Substring(1, 1) == "1")
+ {
+ item1 = 2; //
+ }
+ return item1;
+ }
+
+
+ ///
+ /// byte数组转换为float
+ ///
+ static float byteToFloat(byte[] list)
+ {
+ float result = 0.00f;
+ Array.Reverse(list);
+ result = BitConverter.ToSingle(list, 0);
+ // 只保留两位小数
+ // string str = result.ToString("0.00");
+
+ return result;
+
+ }
+
+ ///
+ /// byte数组转换为double
+ ///
+ static double byteToDouble(byte[] list)
+ {
+ double result = 0;
+ Array.Reverse(list);
+ result = BitConverter.ToDouble(list, 0);
+ return result;
+
+ }
+
+ #endregion
+
+
+ #region 保存过点数
+
+ ///
+ /// 保存过点数
+ ///
+ ///
+ ///
+ public bool InsertToCompleteAndCheck(Perfusion_Record record)
+ {
+ var barcode = _printBarCodeServices.FirstAsync(d => d.MaterialBarcode == record.PerfusionBoxCode).Result;
+
+ if (barcode == null) return false;
+ #region 更新过点数据
+ MaterialCompletion completion = new MaterialCompletion();
+ completion.OrderCode = barcode.OrderCode;
+ completion.MaterialBarcode = record.PerfusionBoxCode;
+ completion.MaterialCode = barcode.MaterialCode;
+ completion.MaterialName = barcode.MaterialName;
+ completion.StationName = "2015";
+ completion.ProductLineCode = "CX_02";
+ completion.CompleteDate = DateTime.Now;
+
+ #endregion
+ int r = _materialCompletionServices.AddAsync(completion).Result;
+ if (r > 0) return true;
+ else return false;
+
+ }
+
+ #endregion
#endregion
}
}
diff --git a/Aucma.Core.Tasks/Business/PerfusionCollection.cs b/Aucma.Core.Tasks/Business/PerfusionCollection.cs
index 0e56c570..020b55ef 100644
--- a/Aucma.Core.Tasks/Business/PerfusionCollection.cs
+++ b/Aucma.Core.Tasks/Business/PerfusionCollection.cs
@@ -25,19 +25,25 @@ namespace Aucma.Core.Tasks.Business
protected readonly IPerfusionRecordServices? _perfusionRecordServices;
protected readonly IPerfusionAlarmServices? _perfusionAlarmServices;
protected readonly IPerfusionDeviceStatusServices? _perfusionDeviceStatusServices;
-
-
+ private readonly IMaterialCompletionServices _materialCompletionServices;
+ private readonly IPrintBarCodeServices _printBarCodeServices;
+ bool flag = true;
private static System.Text.ASCIIEncoding asciiEncoding = new System.Text.ASCIIEncoding();
private Perfusion_Record record;
private Perfusion_Record temprRecord;
private Perfusion_DeviceStatus perfusion_DeviceStatus = new Perfusion_DeviceStatus();
private Perfusion_Alarm perfusion_Alarm = new Perfusion_Alarm();
- public PerfusionCollection(IPerfusionRecordServices perfusionRecordServices, IPerfusionAlarmServices perfusionAlarmServices, IPerfusionDeviceStatusServices perfusionDeviceStatusServices)
+
+ public PerfusionCollection(IPerfusionRecordServices perfusionRecordServices, IPerfusionAlarmServices perfusionAlarmServices,
+ IPerfusionDeviceStatusServices perfusionDeviceStatusServices, IMaterialCompletionServices materialCompletionServices,
+ IPrintBarCodeServices printBarCodeServices)
{
_perfusionRecordServices = perfusionRecordServices;
_perfusionAlarmServices = perfusionAlarmServices;
_perfusionDeviceStatusServices = perfusionDeviceStatusServices;
+ _materialCompletionServices = materialCompletionServices;
+ _printBarCodeServices = printBarCodeServices;
startCollect();
}
@@ -47,67 +53,85 @@ namespace Aucma.Core.Tasks.Business
Task.Run(() =>
{
Thread.Sleep(3000);
- Console.WriteLine("灌注数据采集服务开启");
+ Console.WriteLine($"【{DateTime.Now}】》灌注数据采集服务开启");
var obj = PlcHelper.siemensList.FirstOrDefault(d => d.EquipName.Equals("PerfusionPlc"));
if (obj != null)
- {
+ {
while (true)
{
- try
+ if (flag)
{
-
- //采集数据
- record = ReadEquipSystem(obj, record, perfusion_DeviceStatus, perfusion_Alarm);
- if (string.IsNullOrEmpty(record.PerfusionBoxCode)) continue;
- if (temprRecord == null)
- {
- temprRecord = _perfusionRecordServices.Query(d => d.PerfusionBoxCode.Equals(record.PerfusionBoxCode)).FirstOrDefault();
- }
- #region 更新设备状态
- Perfusion_DeviceStatus device = _perfusionDeviceStatusServices.FirstAsync().Result;
- if (device == null)
+ flag = false;
+ try
{
- _ = _perfusionDeviceStatusServices.AddAsync(perfusion_DeviceStatus).Result;
- }
- else
- {
- device.PerfusionStatus = perfusion_DeviceStatus.PerfusionStatus;
- var rsult = _perfusionDeviceStatusServices.UpdateAsync(device).Result;
- }
- #endregion
+ bool signal = obj.plc.ReadBool("DB55.84.0");
- #region 更新报警信息
- if (perfusion_Alarm.PerfusionStatus > 0)
- {
- int a = _perfusionAlarmServices.AddAsync(perfusion_Alarm).Result;
- }
- #endregion
-
-
- //充注结束
- // if (record.PerfusionFinishStatus == "1")
- // {
- // 箱体码和上次不一样,或者箱体码一样但是充铸结果不一样
- if (temprRecord == null || temprRecord.PerfusionBoxCode != record.PerfusionBoxCode || (temprRecord.PerfusionBoxCode == record.PerfusionBoxCode && temprRecord.PerfusionResult != record.PerfusionResult))
+ if (signal == false)
+ {
+ Console.WriteLine($"【{DateTime.Now}】》当前灌注采集信号:{signal}");
+ Thread.Sleep(1000);
+ continue;
+ }
+ Console.WriteLine($"【{DateTime.Now}】》当前灌注采集信号:{signal}");
+ Console.WriteLine($"【{DateTime.Now}】》灌注数据开始采集");
+ //采集数据
+ record = ReadEquipSystem(obj, record, perfusion_DeviceStatus, perfusion_Alarm);
+ if (record == null) continue;
+ if (string.IsNullOrEmpty(record.PerfusionBoxCode)) continue;
+ Console.WriteLine($"【{DateTime.Now}】》灌注数据条码:[{record.PerfusionBoxCode}],灌注状态:[{record.PerfusionResult}]");
+
+ var tempRecord = _perfusionRecordServices.FirstAsync(d => d.PerfusionBoxCode.Equals(record.PerfusionBoxCode) && d.PerfusionResult == record.PerfusionResult).Result;
+
+ if (tempRecord != null)
+ {
+ Console.WriteLine($"【{DateTime.Now}】》灌注数据条码:[{record.PerfusionBoxCode}],灌注结果:[{record.PerfusionResult}],已存在系统中");
+ Thread.Sleep(1000);
+ continue;
+ }
+ #region 更新设备状态
+ Perfusion_DeviceStatus device = _perfusionDeviceStatusServices.FirstAsync().Result;
+ if (device == null)
+ {
+ _ = _perfusionDeviceStatusServices.AddAsync(perfusion_DeviceStatus).Result;
+ }
+ else
+ {
+ device.PerfusionStatus = perfusion_DeviceStatus.PerfusionStatus;
+ var rsult = _perfusionDeviceStatusServices.UpdateAsync(device).Result;
+ }
+ #endregion
+
+ #region 更新报警信息
+ if (perfusion_Alarm.PerfusionStatus > 0)
{
- int result = _perfusionRecordServices.AddAsync(record).Result;
- if (result > 0)
+ int a = _perfusionAlarmServices.AddAsync(perfusion_Alarm).Result;
+ }
+ #endregion
+
+
+ //充注结束
+ int result = _perfusionRecordServices.AddAsync(record).Result;
+ if (result == 0)
+ {
+ //添加过点数
+ if (record.PerfusionResult==8)
{
- Console.WriteLine(record.ToJson());
- temprRecord = record;
-
+ InsertToCompleteAndCheck(record);
}
+
+ Console.WriteLine(record.ToJson());
}
- // }
-
- }
- catch (Exception ex)
- {
- Console.WriteLine(ex);
+ bool r = obj.plc.WriteBool("DB55.84.0", false);//存盘成功写入bool
+ Console.WriteLine($"【{DateTime.Now}】》灌注数据采集结束写入复位信号{r}");
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine(ex);
+ }
+ finally { flag = true; }
}
- Thread.Sleep(2000);
}
}
@@ -119,7 +143,7 @@ namespace Aucma.Core.Tasks.Business
/// 采集灌注参数
///
///
- static Perfusion_Record ReadEquipSystem(Aucma.Core.HwPLc.PlcModel obj, Perfusion_Record record, Perfusion_DeviceStatus deviceStatus, Perfusion_Alarm alarmInfo)
+ static Perfusion_Record ReadEquipSystem(Aucma.Core.HwPLc.PlcModel obj, Perfusion_Record record, Perfusion_DeviceStatus deviceStatus, Perfusion_Alarm alarmInfo)
{
record = new Perfusion_Record();
byte[] info = obj.plc.Read("DB55.0", 84);
@@ -268,5 +292,37 @@ namespace Aucma.Core.Tasks.Business
}
#endregion
+
+
+ #region 保存过点数和测温质检
+
+ ///
+ /// 保存过点数和测温质检
+ ///
+ ///
+ ///
+ public bool InsertToCompleteAndCheck(Perfusion_Record record)
+ {
+ var printBarCodeList = _printBarCodeServices.QueryAsync().Result;
+ PrintBarCode barcode = printBarCodeList.First(d => d.MaterialBarcode == record.PerfusionBoxCode);
+ if (barcode == null) return false;
+ #region 更新过点数据
+ MaterialCompletion completion = new MaterialCompletion();
+ completion.OrderCode = barcode.OrderCode;
+ completion.MaterialBarcode = record.PerfusionBoxCode;
+ completion.MaterialCode = barcode.MaterialCode;
+ completion.MaterialName = barcode.MaterialName;
+ completion.StationName = "测温检验01";
+ completion.ProductLineCode = "CX_02";
+ completion.CompleteDate = DateTime.Now;
+
+ #endregion
+ int r = _materialCompletionServices.AddAsync(completion).Result;
+ if (r > 0) return true;
+ else return false;
+
+ }
+
+ #endregion
}
}
diff --git a/Aucma.Core.Tasks/IAucamTaskService.cs b/Aucma.Core.Tasks/IAucamTaskService.cs
index 2cda6c5f..2206a1db 100644
--- a/Aucma.Core.Tasks/IAucamTaskService.cs
+++ b/Aucma.Core.Tasks/IAucamTaskService.cs
@@ -3,9 +3,6 @@ namespace Aucma.Core.Tasks
{
public interface IAucamTaskService
{
- ///
- /// 实时更新工位计划表中的数据
- ///
- public void AucamUpdatePlanNumTask();
+ public void AucamTaskAsync();
}
}
diff --git a/Aucma.Core.TemperatureTask/AucamTemperatureMeasurementService.cs b/Aucma.Core.TemperatureTask/AucamTemperatureMeasurementService.cs
index fff8b5a2..f4150150 100644
--- a/Aucma.Core.TemperatureTask/AucamTemperatureMeasurementService.cs
+++ b/Aucma.Core.TemperatureTask/AucamTemperatureMeasurementService.cs
@@ -61,7 +61,7 @@ namespace Aucma.Core.TemperatureTask
try
{
flag = false;
- var historyList = _codeMESServices.QueryAsync(d=>d.IsSync==0).Result;
+ var historyList = _codeMESServices.QueryAsync(d => d.IsSync == 0).Result;
Console.WriteLine(historyList.ToJson());
var query = (from a in historyList
select new TemperatureHistory
@@ -77,7 +77,7 @@ namespace Aucma.Core.TemperatureTask
TestTime = a.TestTime,
TestedTime = a.TestedTime,
Etemp = a.Etemp,
- BeginDateTime =Convert.ToDateTime(a.BeginDateTime),
+ BeginDateTime = Convert.ToDateTime(a.BeginDateTime),
CpResult = a.CpResult,
EndDateTime = Convert.ToDateTime(a.EndDateTime),
UserName = a.UserName,
@@ -91,27 +91,27 @@ namespace Aucma.Core.TemperatureTask
LowV_PowerMax = a.LowV_PowerMax,
LowV_PowerFact = a.LowV_PowerFact,
LowVoltage = a.LowVoltage,
- SyncDate =DateTime.Now
+ SyncDate = DateTime.Now
}).ToList();
if (query == null || query.Count == 0) return;
logHelper.Error($"读取数据个数:{historyList.Count()}");
Console.WriteLine($"【{DateTime.Now}】读取数据个数:{historyList.Count()}");
- var result = _temperatureHistoryServices.AddAsync(query).Result;
+ var result = _temperatureHistoryServices.AddAsync(query).Result;
if (result > 0)
{
historyList.ForEach(d => d.IsSync = 1);
- int r = _codeMESServices.UpateTemperatureHistoryFlag(historyList);
+ int r = _codeMESServices.UpateTemperatureHistoryFlag(historyList);
if (r > 0)
{
InsertToCompleteAndCheck(query);//保存过点数据
//发送post 请求
PostToMes(query);
-
+
Console.WriteLine($"【{DateTime.Now}】保存测温数据成功!保存数量:{query.Count}");
- } }
+ }
+ }
Console.WriteLine($"【{DateTime.Now}】测温数据同步成功!数量:{query.Count}");
-
}
catch (Exception ex)
{
@@ -143,7 +143,7 @@ namespace Aucma.Core.TemperatureTask
foreach (var temperatureHistory in list)
{
PrintBarCode barcode = printBarCodeList.First(d => d.MaterialBarcode == temperatureHistory.CpNo);
- if (barcode != null) return false;
+ if (barcode == null) return false;
#region 更新过点数据
MaterialCompletion completion = new MaterialCompletion();
completion.OrderCode = barcode.OrderCode;
@@ -172,14 +172,25 @@ namespace Aucma.Core.TemperatureTask
///
public bool PostToMes(List list)
{
+ Console.WriteLine($"【{DateTime.Now}】开始向质检发送测温数据");
string address = Appsettings.app("Common", "TemperatureApiAddRess");//测温地址
+ Console.WriteLine($"【{DateTime.Now}】请求路径:{address}/report/qualityInspection/temperatureApi");
+ Console.WriteLine($"【{DateTime.Now}】发送数据:{list.ToJson()}");
+ list= list.Where(d=>d.CpResult== "OK").ToList();
+ Console.WriteLine($"发送Post信息:{list.ToJson()}");
string check = HttpHelper.Post(address + "/report/qualityInspection/temperatureApi", list.ToJson());
Result r = check.FromJson();
if (r.code == 200)
{
- Console.WriteLine("发送质检请求!");
+ Console.WriteLine($"【{DateTime.Now}】发送质检请求成功!");
+ Console.WriteLine($"【{DateTime.Now}】开始向质检发送测温数据");
return true;
}
+ else
+ {
+ Console.WriteLine($"【{DateTime.Now}】向质检发送测温数据失败:返回结果:{r.code};{r.msg}");
+ }
+
return false;
}
#endregion
diff --git a/HwControlLib/obj/Debug/net6.0-windows/HwControlLib.AssemblyInfo.cs b/HwControlLib/obj/Debug/net6.0-windows/HwControlLib.AssemblyInfo.cs
index d7d8ad7c..3c06befa 100644
--- a/HwControlLib/obj/Debug/net6.0-windows/HwControlLib.AssemblyInfo.cs
+++ b/HwControlLib/obj/Debug/net6.0-windows/HwControlLib.AssemblyInfo.cs
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("HwControlLib")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5972c771230554e7ffbf66d51846cd501637e447")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+1a7f5b2c5d615dd77e3d962d3b3bc9e735ac9121")]
[assembly: System.Reflection.AssemblyProductAttribute("HwControlLib")]
[assembly: System.Reflection.AssemblyTitleAttribute("HwControlLib")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/HwControlLib/obj/Debug/net6.0-windows/HwControlLib.AssemblyInfoInputs.cache b/HwControlLib/obj/Debug/net6.0-windows/HwControlLib.AssemblyInfoInputs.cache
index a59f24a3..f1c0f3c2 100644
--- a/HwControlLib/obj/Debug/net6.0-windows/HwControlLib.AssemblyInfoInputs.cache
+++ b/HwControlLib/obj/Debug/net6.0-windows/HwControlLib.AssemblyInfoInputs.cache
@@ -1 +1 @@
-68fe028e8fb6dd00ab226c595d729f086b7922e724f85c2e7a8e8bde11373554
+d8a7f0a357cb634c93e2dc09fbebfab8d8edfbc46af62e2891ac2d3c51306ce2