public TaskReportEventHandler( TacticManager tacticManager, ProcessTaskReportManager processTaskReportManager, IBackgroundJobManager backgroundJobManager) { _tacticManager = tacticManager; _backgroundJobManager = backgroundJobManager; _processTaskReportManager = processTaskReportManager; }
public virtual async Task <object> GetPartReports(int partId) { var reports = await ProcessTaskReportManager.GetAll() .Include(o => o.Reporter) .Include(o => o.ProcessTask).ThenInclude(o => o.ProcessType) .Where(o => o.ProcessTask.PartId == partId).ToListAsync(); return(reports.Select(o => new { o.Id, ReporterName = o.Reporter.Name, o.ReportType, o.ProcessTask.ProcessType.ProcessTypeName, ReportTime = o.ReportTime.ToString("yyyy-MM-dd HH:mm:ss"), CreationTime = o.CreationTime.ToString("yyyy-MM-dd HH:mm:ss"), o.Remarks, o.Files })); }