change - 出库逻辑添加异常捕获日志

collectionStore
wenjy 8 months ago
parent 1d0fbfcf5d
commit f58e78893a

@ -105,6 +105,8 @@ namespace Aucma.Scada.Business
#endregion #endregion
private OutStoreBusiness() private OutStoreBusiness()
{
try
{ {
_spaceInfoService = registerServices.GetService<IBaseSpaceInfoService>(); _spaceInfoService = registerServices.GetService<IBaseSpaceInfoService>();
_taskInfoService = registerServices.GetService<IRealTaskInfoService>(); _taskInfoService = registerServices.GetService<IRealTaskInfoService>();
@ -120,6 +122,12 @@ namespace Aucma.Scada.Business
taskHandleBusiness.OutStoreFinsihEvent += OutStoreFinish; taskHandleBusiness.OutStoreFinsihEvent += OutStoreFinish;
taskHandleBusiness.UpdateMesPlanCompleteEvent += UpdatePlanInfo; taskHandleBusiness.UpdateMesPlanCompleteEvent += UpdatePlanInfo;
StartPassDown(); StartPassDown();
}catch (Exception ex)
{
Console.WriteLine($"OutStoreBusiness异常{ex.Message}");
PrintLogErrorMessage($"OutStoreBusiness异常{ex.Message}");
Console.ReadLine();
}
} }
/// <summary> /// <summary>
@ -988,8 +996,8 @@ namespace Aucma.Scada.Business
/// <param name="ex"></param> /// <param name="ex"></param>
private void PrintLogErrorMessage(string message, Exception ex = null) private void PrintLogErrorMessage(string message, Exception ex = null)
{ {
RefreshLogMessageEvent?.Invoke(message);
logHelper.Error(message, ex); logHelper.Error(message, ex);
RefreshLogMessageEvent?.Invoke(message);
} }
#endregion #endregion
} }

@ -97,6 +97,8 @@ namespace Aucma.Scada.Business
private OutStoreTaskHandle() private OutStoreTaskHandle()
{
try
{ {
_plcDictionary = _pool.GetAll(); _plcDictionary = _pool.GetAll();
_taskInfoService = registerServices.GetService<IRealTaskInfoService>(); _taskInfoService = registerServices.GetService<IRealTaskInfoService>();
@ -106,6 +108,12 @@ namespace Aucma.Scada.Business
RealReadLinerFinish(); RealReadLinerFinish();
RealBindMaterialCode(); RealBindMaterialCode();
}catch (Exception ex)
{
Console.WriteLine($"OutStoreTaskHandle异常{ex.Message}");
logHelper.Error("OutStoreTaskHandle异常", ex);
Console.ReadLine();
}
} }
#region 箱壳出库任务下发处理 #region 箱壳出库任务下发处理

Loading…
Cancel
Save