public DynamicGridDataModel Process(string companyId)
        {
            var result = new DynamicGridDataModel()
            {
                total = 10000, rows = new List <Dictionary <string, string> >()
            };

            if (string.IsNullOrEmpty(companyId))
            {
                return(result);
            }
            var idArr      = companyId.Split('_');
            var id         = Convert.ToInt32(idArr[1]);
            var allRecords = _companyBll.GetCompanyconnectrecordByCompanyId(id);

            if (allRecords == null)
            {
                return(result);
            }
            foreach (var record in allRecords)
            {
                var dic = new Dictionary <string, string>();
                dic.Add("CompanyConnectRecordId", record.CompanyConnectRecordId.ToString());
                dic.Add("PhoneConnectDate", record.PhoneConnectDate.GetFormatStr());
                dic.Add("CompanyState", record.CompanyState.ToString());
                dic.Add("IsValidateAddress", record.IsValidateAddress.ToString());
                dic.Add("ConfirmAddress", record.ConfirmAddress?.ToString());
                dic.Add("GoHomePerson", record.GoHomePerson?.ToString());
                dic.Add("GoHomeTime", record.GoHomeTime.GetFormatStr());
                dic.Add("PhoneConnectState", record.PhoneConnectState?.ToString());
                dic.Add("CooperationIntention", record.CooperationIntention.ToString());
                result.rows.Add(dic);
            }
            return(result);
        }
        /// <summary>
        /// 业务逻辑
        /// </summary>
        /// <param name="excelId"></param>
        /// <returns></returns>
        public Stream Process(string ids)
        {
            var excelDatas = new List <List <string> >();

            excelDatas.Add(GetExcelTitel());
            var idsArr      = ids.Split(',');
            var companyList = new List <Company>();
            var areas       = _companyBll.GetAllArea();

            foreach (var id in idsArr)
            {
                if (string.IsNullOrEmpty(id))
                {
                    continue;
                }
                var idArr  = id.Split('_');
                var findId = Convert.ToInt32(idArr[1]);
                if (idArr[0] == "1")
                {
                    var companys = _companyBll.GetCompanyByAreaId(findId);
                    if (companys != null)
                    {
                        companyList.AddRange(companys);
                    }
                }
                else
                {
                    var company = _companyBll.GetCompanyByKey(findId);
                    if (company != null)
                    {
                        companyList.Add(company);
                    }
                }
            }
            foreach (var company in companyList)
            {
                var area           = areas.FirstOrDefault(x => x.AreaId == company.AreaId);
                var companyRecords = _companyBll.GetCompanyconnectrecordByCompanyId(company.CompanyId);
                if (companyRecords != null && companyRecords.Count > 0)
                {
                    foreach (var record in companyRecords)
                    {
                        excelDatas.Add(GetOneCellData(area, company, record));
                    }
                }
                else
                {
                    excelDatas.Add(GetOneCellData(area, company, new CompanyConnectRecord()));
                }
            }
            var excelBuilder = ExcelFactory.CreateBuilder();
            var sheet        = excelBuilder.InsertSheet("sheet1");

            sheet.InsertSheetContent(ExcelExportRequest.GetInstance(excelDatas));
            var stream = new MemoryStream();

            excelBuilder.Save(stream, SaveFormat.Xlsx);
            stream.Position = 0;
            return(stream);
        }