/// <summary>
 /// 自定义校验
 /// </summary>
 /// <param name="aggregateExcelMessage"></param>
 protected virtual void CheckDto(TaskManagerInfoArg taskManagerInfoArg)
 {
     foreach (var dto in Dtos)
     {
         ExcelTask.CheckBusiness(dto, taskManagerInfoArg);
     }
 }
        /// <summary>
        /// 导入数据
        /// </summary>
        /// <param name="taskManagerInfoArg"></param>
        public virtual void Do(TaskManagerInfoArg taskManagerInfoArg)
        {
            var processInfo = (FileExcelTaskTypeInfo as IProcessInfo);

            processInfo.SetProcessTotalRow(Dtos.Count);
            ThreadPool.SetMaxThreads(maxThreaderCount, maxThreaderCount);
            foreach (var dto in Dtos)
            {
                try
                {
                    ExcelTask.Do(dto, taskManagerInfoArg);
                }
                catch (MgExcelException mgExcelException)
                {
                    taskManagerInfoArg.AggregateExcelMessage.Add(dto.Row.RowIndex, mgExcelException.ColumnIndex, mgExcelException.Message, "", ExcelMessageType.Exception, FileExcelTaskTypeInfo);
                }
                catch (MgException mgException)
                {
                    taskManagerInfoArg.AggregateExcelMessage.Add(dto.Row.RowIndex, 0, mgException.Message, "", ExcelMessageType.Exception, FileExcelTaskTypeInfo);
                }
                catch (Exception exception)
                {
                    log.Error(exception.Message + "\n" + exception.StackTrace);
                    taskManagerInfoArg.AggregateExcelMessage.Add(dto.Row?.RowIndex, 0, exception.Message, exception.StackTrace, ExcelMessageType.Exception, FileExcelTaskTypeInfo);
                }
                finally
                {
                    processInfo.SetProcessRow();
                }
            }
        }
        protected void CheckMgRow(TaskManagerInfoArg taskManagerInfoArg)
        {
            if (!this.MgExcel.MgSheet.IsHasRow())
            {
                taskManagerInfoArg.AggregateExcelMessage.Add(new ExcelMessage("表格没有可以导入的数据", "", ExcelMessageType.Error, taskManagerInfoArg.FileExcelTaskTypeInfo));
            }

            var processInfo = ((IProcessInfo)taskManagerInfoArg.FileExcelTaskTypeInfo);

            processInfo.SetProcessTotalRow(this.MgExcel.MgSheet.GetTotleRow());
            for (int rowIndex = this.MgExcel.MgSheet.StartRowIndex; rowIndex <= this.MgExcel.MgSheet.MaxRowIndex; rowIndex++)
            {
                try
                {
                    var row = MgExcel.MgSheet.GetRow(rowIndex);
                    ExcelTask.CheckMgRow(row, taskManagerInfoArg);
                }
                finally
                {
                    processInfo.SetProcessRow();
                }
            }
        }