From 45e545a79d1b2d0118db222418dee360861e84e8 Mon Sep 17 00:00:00 2001 From: wangsr Date: Fri, 11 Aug 2023 15:17:59 +0800 Subject: [PATCH] =?UTF-8?q?record=20-=20=E6=96=B0=E5=B0=9D=E8=AF=95?= =?UTF-8?q?=E5=A4=87=E4=BB=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FinishBatch/FinishBatchService.cs | 4 +-- .../SaveHelper/ReportWetMixerSaveHelper.cs | 36 ++++++++++++++----- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/FinishBatchService.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/FinishBatchService.cs index 1914cfb..bd020d1 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/FinishBatchService.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/FinishBatchService.cs @@ -159,9 +159,9 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch //FinishBatchHelper.SaveGHData(); - ReportDryMixerSaveHelper.Instance.Save(); + //ReportDryMixerSaveHelper.Instance.Save(); ReportWetMixerSaveHelper.Instance.SaveWetMixerReport(); - ReportGelDoserSaveHelper.Instance.SaveGelDoserReport(); + //ReportGelDoserSaveHelper.Instance.SaveGelDoserReport(); #endregion #region 8、更新物料名称 diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/SaveHelper/ReportWetMixerSaveHelper.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/SaveHelper/ReportWetMixerSaveHelper.cs index e7be5e1..796e8f5 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/SaveHelper/ReportWetMixerSaveHelper.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/SaveHelper/ReportWetMixerSaveHelper.cs @@ -30,10 +30,30 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch.SaveHelper { try { - ICSharpCode.Core.LoggingService.Debug("湿混机报表数据保存开始!!!"); + ICSharpCode.Core.LoggingService.Debug("湿混机报表数据保存开始!!!"); //准备信号读取 + //if (BasePlcHelper.Instance.RdyRpt_D1.NowValue.ToInt() == 1) + //{ + // Report_WetMixer wetMixer_dos0 = readWetMixer("A"); //读取报表数据 + // SaveReportDb(wetMixer_dos0); //保存报表数据 + //} + //else if (BasePlcHelper.Instance.RdyRpt_D1.NowValue.ToInt() == 2) + //{ + // Report_WetMixer wetMixer_dos0 = readWetMixer("B"); //读取报表数据 + // SaveReportDb(wetMixer_dos0); //保存报表数据 + //} + //else if (BasePlcHelper.Instance.RdyRpt_D1.NowValue.ToInt() == 3) + //{ + // Report_WetMixer wetMixer_dos0 = readWetMixer("C"); //读取报表数据 + // SaveReportDb(wetMixer_dos0); //保存报表数据 + //} + //else if (BasePlcHelper.Instance.RdyRpt_D1.NowValue.ToInt() == 4) + //{ + // Report_WetMixer wetMixer_dos0 = readWetMixer("D"); //读取报表数据 + // SaveReportDb(wetMixer_dos0); //保存报表数据 + //} Report_WetMixer WetMixer_dos0 = readWetMixer("A"); //读取报表数据 @@ -43,7 +63,7 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch.SaveHelper } catch (Exception ex) { - ICSharpCode.Core.LoggingService.Error(String.Format("湿混机报表数据保存异常:{0}", ex.Message), ex); + ICSharpCode.Core.LoggingService.Error(String.Format("湿混机报表数据保存异常:{0}", ex.Message), ex); } } @@ -64,7 +84,7 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch.SaveHelper } catch (Exception ex) { - ICSharpCode.Core.LoggingService.Error(String.Format("通过PLC读取湿混机报表数读取异常:{0}", ex.Message), ex); + ICSharpCode.Core.LoggingService.Error(String.Format("通过PLC读取湿混机报表数读取异常:{0}", ex.Message), ex); } return _wetMixer; } @@ -154,11 +174,11 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch.SaveHelper } - ICSharpCode.Core.LoggingService.Warn($"报表数据打印:{str}"); + ICSharpCode.Core.LoggingService.Warn($"报表数据打印:{str}"); } catch (Exception ex) { - ICSharpCode.Core.LoggingService.Error(String.Format("保存报表数据至数据库异常:{0}", ex.Message), ex); + ICSharpCode.Core.LoggingService.Error(String.Format("保存报表数据至数据库异常:{0}", ex.Message), ex); } } @@ -169,7 +189,7 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch.SaveHelper /// 保存湿混机报表数据 /// /// - /// + /// private void InsertReportWetMixer(Guid reportId, WetMixerDevice wetMixer) { try @@ -199,7 +219,7 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch.SaveHelper } catch (Exception ex) { - ICSharpCode.Core.LoggingService.Error(String.Format("保存湿混机报表数据异常:{0}", ex.Message), ex); + ICSharpCode.Core.LoggingService.Error(String.Format("保存湿混机报表数据异常:{0}", ex.Message), ex); } } @@ -245,7 +265,7 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch.SaveHelper } catch (Exception ex) { - ICSharpCode.Core.LoggingService.Error(String.Format("保存湿混机报表明细数据异常:{0}", ex.Message), ex); + ICSharpCode.Core.LoggingService.Error(String.Format("保存湿混机报表明细数据异常:{0}", ex.Message), ex); } }