protected StringBuilder SyncBOCData(DateTime startTime) { var strInfo = new StringBuilder(); var title = ""; var url = HtmlManager.GetUrl(out title); var ch = new ReportManager(); if (ch.IsBocFileExists(title)) { return(new StringBuilder("")); } strInfo.AppendFormat("Job begin at {0}\n", startTime); strInfo.AppendFormat("Source [Type: WebPage, Address: {0}]\n", ConfigurationManager.AppSettings["BOC_URL"]); strInfo.AppendFormat("Destination [Type: Oracle DB, Address: " + ConfigurationManager.AppSettings["reportConnstr"] + "]\n"); strInfo.AppendFormat("Destination [Type: WebService, Address: {0}]\n", ConfigHelper.GetEndpointClientAddress("StorageServiceImplPort")); #region 执行数据同步程序 PdfSaverByPechkin saver = new PdfSaverByPechkin(); var filePath = string.Empty; var titStr = string.Empty; var auStr = string.Empty; saver.SaveByHtml(url, out filePath, out titStr, out auStr); auStr = auStr.Replace(" ", ""); //call storage service, insert to filedb ch.InsertReportFile(filePath, "BOC", "FX", "FXDaily", auStr, strInfo); HtmlManager.DelFiles(filePath); #endregion var endTime = DateTime.UtcNow; strInfo.AppendFormat("Synchronization completed at {0}.\n", endTime); return(strInfo); }