From 72eebd2aff5ba5b58aad54420022b7977cba3320 Mon Sep 17 00:00:00 2001 From: liuwf Date: Tue, 2 Apr 2024 16:59:49 +0800 Subject: [PATCH] . --- Admin.Core.Api/Admin.Core.Model.xml | 4 ++-- .../Admin.Core.FrameWork.AssemblyInfo.cs | 2 +- .../Admin.Core.FrameWork.AssemblyInfoInputs.cache | 2 +- ...eWork.GeneratedMSBuildEditorConfig.editorconfig | 6 ------ Admin.Core.Model/Model_New/CodeBindingRecord.cs | 4 ++-- .../Admin.Core.RealTimeService.AssemblyInfo.cs | 2 +- ...n.Core.RealTimeService.AssemblyInfoInputs.cache | 2 +- ...rvice.GeneratedMSBuildEditorConfig.editorconfig | 6 ------ .../Aucma.Core.CodeBinding.csproj | 2 +- Aucma.Core.CodeBinding/Business/GunBusiness.cs | 4 ++-- Aucma.Core.CodeBinding/Models/ReaderInfo.cs | 4 ++-- .../ViewModels/IndexPageViewModel.cs | 6 ++++-- .../ViewModels/StatisticsPageViewModel.cs | 4 ++-- Aucma.Core.CodeBinding/Views/IndexPageView.xaml | 3 ++- Aucma.Core.HwPLc/Impl/MelsecPlc.cs | 2 +- Aucma.Core.Palletiz/Business/InstoreBusiness.cs | 14 +++++++------- Aucma.Core.Palletiz/appsettings.json | 2 +- 17 files changed, 30 insertions(+), 39 deletions(-) diff --git a/Admin.Core.Api/Admin.Core.Model.xml b/Admin.Core.Api/Admin.Core.Model.xml index 315ec4a3..1253d367 100644 --- a/Admin.Core.Api/Admin.Core.Model.xml +++ b/Admin.Core.Api/Admin.Core.Model.xml @@ -2486,9 +2486,9 @@ 条码2记录时间 - + - plc放行标志,2为放行通过,1为pda提示需要放行记录 + plc放行标志,1为自动放行,2为手动放行 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 22897c45..7a3f49c3 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+88718f3b34f7734324ee7cf97223cb04de12229c")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [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 e61911a3..4390da2f 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 @@ -20767d7337a3656e5cd7e3434c747ce5e30a077ccc10b646dba8956b775fa268 +7d60a94dd38c10522cbfe4a021ccb6e9c5da0354 diff --git a/Admin.Core.FrameWork/obj/Debug/netcoreapp3.1/Admin.Core.FrameWork.GeneratedMSBuildEditorConfig.editorconfig b/Admin.Core.FrameWork/obj/Debug/netcoreapp3.1/Admin.Core.FrameWork.GeneratedMSBuildEditorConfig.editorconfig index d6daf09f..417dcd7b 100644 --- a/Admin.Core.FrameWork/obj/Debug/netcoreapp3.1/Admin.Core.FrameWork.GeneratedMSBuildEditorConfig.editorconfig +++ b/Admin.Core.FrameWork/obj/Debug/netcoreapp3.1/Admin.Core.FrameWork.GeneratedMSBuildEditorConfig.editorconfig @@ -1,9 +1,3 @@ is_global = true build_property.RootNamespace = Admin.Core.FrameWork -<<<<<<< HEAD build_property.ProjectDir = E:\c#\AUCMA\最新代码整合\new\Admin.Core.FrameWork\ -======= -build_property.ProjectDir = D:\Project\gitea\AUCMA\SCADA\Admin.Core.FrameWork\ -build_property.EnableComHosting = -build_property.EnableGeneratedComInterfaceComImportInterop = ->>>>>>> 97953438a8516959b94be7b8b7960a70eb343705 diff --git a/Admin.Core.Model/Model_New/CodeBindingRecord.cs b/Admin.Core.Model/Model_New/CodeBindingRecord.cs index 71bbd1e2..27965863 100644 --- a/Admin.Core.Model/Model_New/CodeBindingRecord.cs +++ b/Admin.Core.Model/Model_New/CodeBindingRecord.cs @@ -51,10 +51,10 @@ namespace Admin.Core.Model [SugarColumn(ColumnName = "RECORD_TIME2")] public DateTime RecordTime2 { get; set; } /// - /// plc放行标志,2为放行通过,1为pda提示需要放行记录 + /// plc放行标志,1为自动放行,2为手动放行 /// [SugarColumn(ColumnName = "IS_PASS")] - public int isPlcPass { get; set; } + public int IsPass { get; set; } /// /// 内胆码 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 86dcdb61..d49abd81 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+88718f3b34f7734324ee7cf97223cb04de12229c")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [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 03710f46..d77b8cba 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 @@ -689391e9f973c5505f9f19ae7180cf35baa36d32cc9dacfb00d7905272e68934 +0868e6bde5b49a65a126b91d794e990427a11761 diff --git a/Admin.Core.RealTimeService/obj/Debug/net6.0/Admin.Core.RealTimeService.GeneratedMSBuildEditorConfig.editorconfig b/Admin.Core.RealTimeService/obj/Debug/net6.0/Admin.Core.RealTimeService.GeneratedMSBuildEditorConfig.editorconfig index 70b741bc..19085d53 100644 --- a/Admin.Core.RealTimeService/obj/Debug/net6.0/Admin.Core.RealTimeService.GeneratedMSBuildEditorConfig.editorconfig +++ b/Admin.Core.RealTimeService/obj/Debug/net6.0/Admin.Core.RealTimeService.GeneratedMSBuildEditorConfig.editorconfig @@ -8,10 +8,4 @@ build_property.PlatformNeutralAssembly = build_property.EnforceExtendedAnalyzerRules = build_property._SupportedPlatformList = Linux,macOS,Windows build_property.RootNamespace = Admin.Core.RealTimeService -<<<<<<< HEAD build_property.ProjectDir = E:\c#\AUCMA\最新代码整合\new\Admin.Core.RealTimeService\ -======= -build_property.ProjectDir = D:\Project\gitea\AUCMA\SCADA\Admin.Core.RealTimeService\ -build_property.EnableComHosting = -build_property.EnableGeneratedComInterfaceComImportInterop = ->>>>>>> 97953438a8516959b94be7b8b7960a70eb343705 diff --git a/Aucma.Core.CodeBinding/Aucma.Core.CodeBinding.csproj b/Aucma.Core.CodeBinding/Aucma.Core.CodeBinding.csproj index c722d4c6..2b3d3121 100644 --- a/Aucma.Core.CodeBinding/Aucma.Core.CodeBinding.csproj +++ b/Aucma.Core.CodeBinding/Aucma.Core.CodeBinding.csproj @@ -1,7 +1,7 @@  - Exe + WinExe net6.0-windows enable true diff --git a/Aucma.Core.CodeBinding/Business/GunBusiness.cs b/Aucma.Core.CodeBinding/Business/GunBusiness.cs index 37c3966e..6ad6f4aa 100644 --- a/Aucma.Core.CodeBinding/Business/GunBusiness.cs +++ b/Aucma.Core.CodeBinding/Business/GunBusiness.cs @@ -31,7 +31,7 @@ namespace Aucma.Core.CodeBinding.Business /// code1扫码信息刷新 /// /// - public delegate void BindingReceiveCode(string MesCode, string SnCode); + public delegate void BindingReceiveCode(string MesCode, string SnCode, int flag = 1); public static event BindingReceiveCode? BindingReceiveCodeEvent; #region 单例实现 @@ -117,7 +117,7 @@ namespace Aucma.Core.CodeBinding.Business if(!string.IsNullOrEmpty(MESCode) && !string.IsNullOrEmpty(SNCode)) { // 委托 - BindingReceiveCodeEvent?.Invoke(MESCode, SNCode); + BindingReceiveCodeEvent?.Invoke(MESCode, SNCode,2); SNCode = string.Empty; MESCode = string.Empty; } diff --git a/Aucma.Core.CodeBinding/Models/ReaderInfo.cs b/Aucma.Core.CodeBinding/Models/ReaderInfo.cs index 0779f860..8e81141d 100644 --- a/Aucma.Core.CodeBinding/Models/ReaderInfo.cs +++ b/Aucma.Core.CodeBinding/Models/ReaderInfo.cs @@ -34,9 +34,9 @@ namespace Aucma.Core.CodeBinding.Models /// public string? BindingResult { get; set; } /// - /// plc下传结果 + /// 放行方式,1-自动,2-手动 /// - public string? IsPlcPass { get; set; } + public string? IsPass { get; set; } /// /// 记录时间 /// diff --git a/Aucma.Core.CodeBinding/ViewModels/IndexPageViewModel.cs b/Aucma.Core.CodeBinding/ViewModels/IndexPageViewModel.cs index 77a6bbac..fd367fdc 100644 --- a/Aucma.Core.CodeBinding/ViewModels/IndexPageViewModel.cs +++ b/Aucma.Core.CodeBinding/ViewModels/IndexPageViewModel.cs @@ -234,6 +234,7 @@ namespace Aucma.Core.CodeBinding.ViewModels ProductCode = record.ProductCode, BoxName = record.BoxName, BindingResult = record.BindingResult, + IsPass = record.IsPass==1?"自动":"手动", RecordTime = record.RecordTime2.ToString() }); @@ -574,7 +575,8 @@ namespace Aucma.Core.CodeBinding.ViewModels /// /// MES码 /// SN码 - public void BindingCode(string code1, string code2) + /// 1为自动扫描,2为手动扫描 + public void BindingCode(string code1, string code2,int flag =1) { try { @@ -621,7 +623,7 @@ namespace Aucma.Core.CodeBinding.ViewModels record.ProductCode = code2; //record.RecordTime1 = System.DateTime.Now; record.RecordTime2 = System.DateTime.Now; - record.isPlcPass = 1; + record.IsPass = flag; record.BindingResult = "成功"; bool result = false; if (Repeatflag == 0) diff --git a/Aucma.Core.CodeBinding/ViewModels/StatisticsPageViewModel.cs b/Aucma.Core.CodeBinding/ViewModels/StatisticsPageViewModel.cs index 03aecaea..60acd088 100644 --- a/Aucma.Core.CodeBinding/ViewModels/StatisticsPageViewModel.cs +++ b/Aucma.Core.CodeBinding/ViewModels/StatisticsPageViewModel.cs @@ -41,7 +41,7 @@ namespace Aucma.Core.CodeBinding.ViewModels { Application.Current.Dispatcher.Invoke(() => { - ListItems.Add(new ReaderInfo() { No = ListItems.Count + 1, BoxCode = record.BoxCode, ProductCode = record.ProductCode, BoxName = record.BoxName, BindingResult = record.BindingResult, IsPlcPass = record.isPlcPass == 2 ? "plc放行成功" : "", RecordTime = record.RecordTime2.ToString() }); + ListItems.Add(new ReaderInfo() { No = ListItems.Count + 1, BoxCode = record.BoxCode, ProductCode = record.ProductCode, BoxName = record.BoxName, BindingResult = record.BindingResult, IsPass = record.IsPass == 1 ? "自动" : "手动", RecordTime = record.RecordTime2.ToString() }); }); } @@ -114,7 +114,7 @@ namespace Aucma.Core.CodeBinding.ViewModels foreach (CodeBindingRecord record in list) { - ListItems.Add(new ReaderInfo() { No = ListItems.Count + 1, BoxCode = record.BoxCode, ProductCode = record.ProductCode, BoxName = record.BoxName, BindingResult = record.BindingResult, IsPlcPass = record.isPlcPass == 2 ? "plc放行成功" : "", RecordTime = record.RecordTime2.ToString() }); + ListItems.Add(new ReaderInfo() { No = ListItems.Count + 1, BoxCode = record.BoxCode, ProductCode = record.ProductCode, BoxName = record.BoxName, BindingResult = record.BindingResult, IsPass = record.IsPass == 1 ? "自动" : "手动", RecordTime = record.RecordTime2.ToString() }); } })); diff --git a/Aucma.Core.CodeBinding/Views/IndexPageView.xaml b/Aucma.Core.CodeBinding/Views/IndexPageView.xaml index 775d557f..4a15346f 100644 --- a/Aucma.Core.CodeBinding/Views/IndexPageView.xaml +++ b/Aucma.Core.CodeBinding/Views/IndexPageView.xaml @@ -214,7 +214,8 @@ - + + diff --git a/Aucma.Core.HwPLc/Impl/MelsecPlc.cs b/Aucma.Core.HwPLc/Impl/MelsecPlc.cs index b2cc7361..0f6913a9 100644 --- a/Aucma.Core.HwPLc/Impl/MelsecPlc.cs +++ b/Aucma.Core.HwPLc/Impl/MelsecPlc.cs @@ -85,7 +85,7 @@ namespace Aucma.Core.HwPLc melsecMcNet.Port = port; // 如果网络不太理想,配置了两个端口,一个有问题,立即切换另一个的话,可以配置如下的代码 - // melsecMcNet.GetPipeSocket().SetMultiPorts(new int[] { 5552, 5553, 5554, 5555}); + // melsecMcNet.GetPipeSocket().SetMultiPorts(new int[] { 2014, 2015}); try { // 先关闭再重连,防止多次重连 diff --git a/Aucma.Core.Palletiz/Business/InstoreBusiness.cs b/Aucma.Core.Palletiz/Business/InstoreBusiness.cs index 5334f110..262068a9 100644 --- a/Aucma.Core.Palletiz/Business/InstoreBusiness.cs +++ b/Aucma.Core.Palletiz/Business/InstoreBusiness.cs @@ -186,8 +186,7 @@ namespace Aucma.Core.Palletiz.Business recordInstore.EntryPattern = 0; } - _ = _recordInstoreServices.AddAsync(recordInstore).Result; - + #endregion if (!result) @@ -214,7 +213,8 @@ namespace Aucma.Core.Palletiz.Business //刷新页面 AddDataEvent?.Invoke(recordInstore); } - + + _ = _recordInstoreServices.AddAsync(recordInstore).Result; } @@ -280,7 +280,7 @@ namespace Aucma.Core.Palletiz.Business } - if (spaceinfos == null) + if (spaceinfos == null || spaceinfos.Count==0) { throw new ArgumentException($"通过物料型号获取货道信息异常:根据成品信息获取货道信息为空"); } @@ -289,14 +289,14 @@ namespace Aucma.Core.Palletiz.Business MatchSpaceInfoByPlc(ref spaceinfos); - if (spaceinfos == null) + if (spaceinfos == null || spaceinfos.Count==0) { throw new ArgumentException($"通过物料型号获取货道信息异常:通过PLC匹配可用货道信息为空"); } FiltrateSpaceInfo(spaceinfos, out laseSpaceinfo, out spaceinfo); - if (spaceinfo == null) + if (spaceinfo == null || spaceinfos.Count==0) { throw new ArgumentException($"通过物料型号获取货道信息异常:未获取到匹配的货道信息"); } @@ -346,7 +346,7 @@ namespace Aucma.Core.Palletiz.Business /// private void FiltrateSpaceInfo(List spaceinfos, out BaseSpaceInfo laseSpaceinfo, out BaseSpaceInfo spaceinfo) { - if (spaceinfos == null) + if (spaceinfos == null || spaceinfos.Count == 0) { throw new ArgumentException($"筛选货道信息异常:传入货道信息参数为空"); } diff --git a/Aucma.Core.Palletiz/appsettings.json b/Aucma.Core.Palletiz/appsettings.json index b11c9809..0048502d 100644 --- a/Aucma.Core.Palletiz/appsettings.json +++ b/Aucma.Core.Palletiz/appsettings.json @@ -197,7 +197,7 @@ "PlcType": "Melsec", "Enabled": true, "IP": "10.10.92.80", //10.10.92.80 - "Port": 2015 + "Port": 2014 } ], "StoreInfo": {