diff --git a/YLErpDAL/Modules/ReportModule/SettlementReportModule/SettlementReportFotShanXiService.cs b/YLErpDAL/Modules/ReportModule/SettlementReportModule/SettlementReportFotShanXiService.cs index 21736f28..316119e5 100644 --- a/YLErpDAL/Modules/ReportModule/SettlementReportModule/SettlementReportFotShanXiService.cs +++ b/YLErpDAL/Modules/ReportModule/SettlementReportModule/SettlementReportFotShanXiService.cs @@ -146,7 +146,7 @@ namespace YLErp.Modules.ReportModule.SettlementReportModule }); if (fileTypes.Contains("pdf")) { - var filepath = GenerateFileEntry(report, "pdf"); + var filepath = GenerateFileEntry(report, "pdf", applyFrontendColumnConfig: false); if (!string.IsNullOrEmpty(filepath)) { attachFiles.Add(filepath); @@ -159,7 +159,7 @@ namespace YLErp.Modules.ReportModule.SettlementReportModule } else { - var filepath = GenerateFileEntry(report, "excel"); + var filepath = GenerateFileEntry(report, "excel", applyFrontendColumnConfig: false); if (!string.IsNullOrEmpty(filepath)) { attachFiles.Add(filepath); @@ -202,15 +202,15 @@ namespace YLErp.Modules.ReportModule.SettlementReportModule /// /// /// - /// + /// 是否按当前用户的前端列配置隐藏并重排互换估值列 /// - public string GenerateFileEntry(ClientDingShiReport_ShanXi report, string type) + public string GenerateFileEntry(ClientDingShiReport_ShanXi report, string type, bool applyFrontendColumnConfig = true) { - var filepath = GenerateReportExcel(report, type.ToLower() == "pdf"); + var filepath = GenerateReportExcel(report, type.ToLower() == "pdf", applyFrontendColumnConfig); return filepath; } - public string GenerateReportExcel(ClientDingShiReport_ShanXi report,bool needToPdf) + public string GenerateReportExcel(ClientDingShiReport_ShanXi report, bool needToPdf, bool applyFrontendColumnConfig = true) { var tempFolder = OtcAppContext.MapPath("~/App_Docs/Temp/结算报告"); tempFolder = MosPathHelper.Combine(tempFolder, ""); @@ -310,7 +310,10 @@ namespace YLErp.Modules.ReportModule.SettlementReportModule , shouldDeleteSheet: true, needToPdf: false, callback: sheets => { FormatSwapValuationDisplayCells(sheets, report.EodSwapPositions); - ApplySwapValuationColumnConfig(sheets); + if (applyFrontendColumnConfig) + { + ApplySwapValuationColumnConfig(sheets); + } }); if (needToPdf) {