From 85e2019459acd0398b0d0afb33117969b689a53b Mon Sep 17 00:00:00 2001 From: wangsr Date: Thu, 10 Aug 2023 14:33:20 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E5=B9=B2=E6=B7=B7=E6=9C=BA?= =?UTF-8?q?=E7=B1=BB=E5=90=8D=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FinishBatch/FinishBatchService.cs | 2 +- .../SaveHelper/ReportSaveHelper.cs | 38 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/FinishBatchService.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/FinishBatchService.cs index 3c83a34..ae55319 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/FinishBatchService.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/FinishBatchService.cs @@ -159,7 +159,7 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch //FinishBatchHelper.SaveGHData(); - ReportSaveHelper.Instance.SaveDryMixerReport(); + ReportDryMixerSaveHelper.Instance.Save(); #endregion #region 8、更新物料名称 diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/SaveHelper/ReportSaveHelper.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/SaveHelper/ReportSaveHelper.cs index 6a387eb..967be66 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/SaveHelper/ReportSaveHelper.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/SaveHelper/ReportSaveHelper.cs @@ -8,11 +8,11 @@ using System.Web.Script.Serialization; namespace Mesnac.Action.ChemicalWeighing.FinishBatch.SaveHelper { - public sealed class ReportSaveHelper + public sealed class ReportDryMixerSaveHelper { - private static readonly Lazy lazy = new Lazy(() => new ReportSaveHelper()); - public static ReportSaveHelper Instance + private static readonly Lazy lazy = new Lazy(() => new ReportDryMixerSaveHelper()); + public static ReportDryMixerSaveHelper Instance { get { @@ -20,16 +20,16 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch.SaveHelper } } - private ReportSaveHelper() { } + private ReportDryMixerSaveHelper() { } /// /// 干混机报表数据保存 /// - public void SaveDryMixerReport() + public void Save() { try { - ICSharpCode.Core.LoggingService.Debug("干混机报表数据保存开始!!!"); + ICSharpCode.Core.LoggingService.Debug("干混机报表数据保存开始!!!"); //准备信号读取 //if (BasePlcHelper.Instance.RdyRpt_D1.NowValue.ToInt() == 1) //{ @@ -59,7 +59,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); } } @@ -70,7 +70,7 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch.SaveHelper { try { - ICSharpCode.Core.LoggingService.Debug("湿混机报表数据保存开始!!!"); + ICSharpCode.Core.LoggingService.Debug("湿混机报表数据保存开始!!!"); //准备信号读取 @@ -83,7 +83,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); } } @@ -104,7 +104,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 _dryMixer; } @@ -125,7 +125,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; } @@ -295,11 +295,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); } } @@ -326,11 +326,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); } } @@ -378,7 +378,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); } } @@ -423,7 +423,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); } } @@ -462,7 +462,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); } } @@ -508,7 +508,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); } } }