diff --git a/AsbCloudInfrastructure/Services/DrillingProgramApacheService.cs b/AsbCloudInfrastructure/Services/DrillingProgramApacheService.cs index 2a267bab..fcd3f25f 100644 --- a/AsbCloudInfrastructure/Services/DrillingProgramApacheService.cs +++ b/AsbCloudInfrastructure/Services/DrillingProgramApacheService.cs @@ -55,7 +55,7 @@ namespace AsbCloudInfrastructure.Services var fileNames = filesInfos .Where(f => f.Name != resultFileName) - .Select(f => fileService.GetFileName(f)); + .Select(f => fileService.GetUrl(f)); var stream = new MemoryStream(1024 * 1024); UniteExcelFiles(fileNames, stream); diff --git a/AsbCloudInfrastructure/Services/ReportService.cs b/AsbCloudInfrastructure/Services/ReportService.cs index 6236f8d2..3977ffd5 100644 --- a/AsbCloudInfrastructure/Services/ReportService.cs +++ b/AsbCloudInfrastructure/Services/ReportService.cs @@ -180,19 +180,13 @@ namespace AsbCloudInfrastructure.Services DateTime end, int stepSeconds, int format, AsbCloudDbContext context) { var dataSource = new ReportDataSourcePgCloud(context, idWell); - - IReportGenerator generator; - switch (format) + IReportGenerator generator = format switch { - case 1: //LAS - generator = new AsbSaubReportLas.ReprotGeneratorLas(dataSource); - break; - case 0: //PDF - default: - generator = new AsbSaubReportPdf.ReprotGeneratorPdf(dataSource); - break; - } - + //LAS + 1 => new AsbSaubReportLas.ReprotGeneratorLas(dataSource), + //PDF + _ => new AsbSaubReportPdf.ReprotGeneratorPdf(dataSource), + }; generator.Begin = begin; generator.End = end; generator.Step = TimeSpan.FromSeconds(stepSeconds);