public override string GenerateReport() { if (this.ReportType == XEnum.ReportType.C_XZDKMX_D) { this.ReportFileName = string.Format("各支行新增风险贷款明细表({0}-{1}).xls", this.AsOfDate.ToString("yyyy.M.d"), this.AsOfDate2.ToString("yyyy.M.d")); this.SPName = "spC_XZDKMX_D"; } else if (this.ReportType == XEnum.ReportType.C_JQDKMX_D) { this.ReportFileName = string.Format("各支行化解及清息贷款明细表({0}-{1}).xls", this.AsOfDate.ToString("yyyy.M.d"), this.AsOfDate2.ToString("yyyy.M.d")); this.SPName = "spC_JQDKMX_D"; } else { var msg = "Unknown Import loan daily report type: " + this.ReportType.ToString(); Logger.Error(msg); return(msg); } var fileName = this.ReportFileName; Logger.Debug("Generating " + fileName); Logger.Debug("Selected columns Loan: " + string.Join(", ", this.DbColumnNames)); var report = TargetTable.GetById(this.ReportType); var filePath = CreateReportFile(report.TemplateName, fileName, this.AsOfDate2); foreach (var sheet in report.Sheets) { PopulateSheet(filePath, sheet); } ExcelHelper.ActivateSheet(filePath); return(string.Empty); }
public override string GenerateReport() { var import = Import.GetByDate(this.AsOfDate); if (import == null) { var msg = string.Format("{0}的数据还没导入系统", this.AsOfDate.ToString("yyyy年M月d日")); Logger.Debug(msg); return(msg); } var fileName = string.Format("榆林分行{0}月末风险贷款情况表 - {1}.xls", this.AsOfDate.Month, import.WJFLDate == null ? "初" : "终"); Logger.Debug("Generating " + fileName); var report = TargetTable.GetById(XEnum.ReportType.X_WJFL_M); var filePath = CreateReportFile(report.TemplateName, fileName); foreach (var sheet in report.Sheets) { if (sheet.Name.Equals("累收累增")) { PopulateSheetVS(filePath, sheet); } else { PopulateSheet(filePath, sheet); } } ExcelHelper.ActivateSheet(filePath); return(string.Empty); }
public override string GenerateReport() { var fileName = string.Format("城商行榆林地区{0}月授信情况统计表.xls", this.AsOfDate.Month); Logger.Debug("Generating " + fileName); var report = TargetTable.GetById(XEnum.ReportType.X_CSHSX_M); var filePath = CreateReportFile(report.TemplateName, fileName); var result = string.Empty; foreach (var sheet in report.Sheets) { switch (sheet.Index) { case 1: result = PopulateSheet1(filePath, sheet); break; case 2: result = PopulateSheet2(filePath, sheet); break; case 3: PopulateSheet3(filePath, sheet); break; case 4: result = PopulateSheet4(filePath, sheet); break; default: break; } if (!string.IsNullOrEmpty(result)) { break; } } ExcelHelper.ActivateSheet(filePath); return(result); }
public override string GenerateReport() { var fileName = string.Format("{0}月到期贷款情况.xls", this.AsOfDate.ToString("MM").TrimStart('0')); Logger.Debug("Generating " + fileName); Logger.Debug("Selected columns Public: " + string.Join(", ", this.PublicColumns)); Logger.Debug("Selected columns Private: " + string.Join(", ", this.PrivateColumns)); var report = TargetTable.GetById(XEnum.ReportType.C_DQDKQK_M); var filePath = CreateReportFile(report.TemplateName, fileName); foreach (var sheet in report.Sheets) { PopulateSheet(filePath, sheet); } ExcelHelper.ActivateSheet(filePath); return(string.Empty); }
public override string GenerateReport() { var fileName = string.Format("{0}新榆林地区不良贷款监测旬报(旬报).xls", this.AsOfDate.ToString("M.dd")); Logger.Debug("Generating " + fileName); var report = TargetTable.GetById(XEnum.ReportType.X_BLDKJC_X); var filePath = CreateReportFile(report.TemplateName, fileName); var result = string.Empty; foreach (var sheet in report.Sheets) { if (sheet.Name.Equals("附表1")) { result = PopulateSheet1(filePath, sheet); } else if (sheet.Name.Equals("附表2")) { result = PopulateSheet2(filePath, sheet); } else if (sheet.Name.Equals("附表3")) { result = PopulateSheet3(filePath, sheet); } else if (sheet.Name.Equals("附表4")) { result = PopulateSheet4(filePath, sheet); } if (!string.IsNullOrEmpty(result)) { break; } } ExcelHelper.ActivateSheet(filePath); return(result); }