|
|
@ -30,10 +30,30 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch.SaveHelper
|
|
|
|
{
|
|
|
|
{
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ICSharpCode.Core.LoggingService<ReportDryMixerSaveHelper>.Debug("湿混机报表数据保存开始!!!");
|
|
|
|
ICSharpCode.Core.LoggingService<ReportWetMixerSaveHelper>.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"); //读取报表数据
|
|
|
|
Report_WetMixer WetMixer_dos0 = readWetMixer("A"); //读取报表数据
|
|
|
@ -43,7 +63,7 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch.SaveHelper
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ICSharpCode.Core.LoggingService<ReportDryMixerSaveHelper>.Error(String.Format("湿混机报表数据保存异常:{0}", ex.Message), ex);
|
|
|
|
ICSharpCode.Core.LoggingService<ReportWetMixerSaveHelper>.Error(String.Format("湿混机报表数据保存异常:{0}", ex.Message), ex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -64,7 +84,7 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch.SaveHelper
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ICSharpCode.Core.LoggingService<ReportDryMixerSaveHelper>.Error(String.Format("通过PLC读取湿混机报表数读取异常:{0}", ex.Message), ex);
|
|
|
|
ICSharpCode.Core.LoggingService<ReportWetMixerSaveHelper>.Error(String.Format("通过PLC读取湿混机报表数读取异常:{0}", ex.Message), ex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return _wetMixer;
|
|
|
|
return _wetMixer;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -154,11 +174,11 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch.SaveHelper
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ICSharpCode.Core.LoggingService<ReportDryMixerSaveHelper>.Warn($"报表数据打印:{str}");
|
|
|
|
ICSharpCode.Core.LoggingService<ReportWetMixerSaveHelper>.Warn($"报表数据打印:{str}");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ICSharpCode.Core.LoggingService<ReportDryMixerSaveHelper>.Error(String.Format("保存报表数据至数据库异常:{0}", ex.Message), ex);
|
|
|
|
ICSharpCode.Core.LoggingService<ReportWetMixerSaveHelper>.Error(String.Format("保存报表数据至数据库异常:{0}", ex.Message), ex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -169,7 +189,7 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch.SaveHelper
|
|
|
|
/// 保存湿混机报表数据
|
|
|
|
/// 保存湿混机报表数据
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="reportId"></param>
|
|
|
|
/// <param name="reportId"></param>
|
|
|
|
/// <param name="_dryMixerDos"></param>
|
|
|
|
/// <param name="_wetMixerDos"></param>
|
|
|
|
private void InsertReportWetMixer(Guid reportId, WetMixerDevice wetMixer)
|
|
|
|
private void InsertReportWetMixer(Guid reportId, WetMixerDevice wetMixer)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
try
|
|
|
|
try
|
|
|
@ -199,7 +219,7 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch.SaveHelper
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ICSharpCode.Core.LoggingService<ReportDryMixerSaveHelper>.Error(String.Format("保存湿混机报表数据异常:{0}", ex.Message), ex);
|
|
|
|
ICSharpCode.Core.LoggingService<ReportWetMixerSaveHelper>.Error(String.Format("保存湿混机报表数据异常:{0}", ex.Message), ex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -245,7 +265,7 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch.SaveHelper
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ICSharpCode.Core.LoggingService<ReportDryMixerSaveHelper>.Error(String.Format("保存湿混机报表明细数据异常:{0}", ex.Message), ex);
|
|
|
|
ICSharpCode.Core.LoggingService<ReportWetMixerSaveHelper>.Error(String.Format("保存湿混机报表明细数据异常:{0}", ex.Message), ex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|