public virtual void HandleEvent(EntityCreatedEventData <Part> eventData) { try { //创建零件后进行进度表的同步 if (eventData.Entity.EnableProcess) { MESProjectManager.SyncProcessSchedule(eventData.Entity.ProjectId).GetAwaiter().GetResult(); } } catch (Exception ex) { Logger.Error(ex.Message, ex); } }
/// <summary> /// /// </summary> /// <param name="projectId"></param> /// <param name="renew"></param> /// <returns></returns> public virtual async Task SyncProcessSchedule(int projectId, bool renew = false) { await MESProjectManager.SyncProcessSchedule(projectId, renew); }