forked from ddrilling/AsbCloudServer
ProcessMapReportDataSaubStatExportService nit
This commit is contained in:
parent
8f271eac0a
commit
11873c6764
@ -10,18 +10,18 @@ using System.Reflection;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.ProcessMaps.Report
|
||||
{
|
||||
public class ProcessMapReportDataSaubStatExportService : IProcessMapReportDataSaubStatExportService
|
||||
{
|
||||
const int firstColumn = 2;
|
||||
const int lastColumn = 35;
|
||||
namespace AsbCloudInfrastructure.Services.ProcessMaps.Report;
|
||||
|
||||
const int headerRowsCount = 5;
|
||||
public class ProcessMapReportDataSaubStatExportService : IProcessMapReportDataSaubStatExportService
|
||||
{
|
||||
private const int firstColumn = 2;
|
||||
private const int lastColumn = 35;
|
||||
private const int headerRowsCount = 5;
|
||||
private const string TemplateName = "ProcessMapReportDataSaubStatTemplate.xlsx";
|
||||
private const string sheetName = "Отчёт";
|
||||
|
||||
private readonly IWellService wellService;
|
||||
private readonly IProcessMapReportDataSaubStatService processMapReportDataSaubStatService;
|
||||
private readonly string TemplateName = "ProcessMapReportDataSaubStatTemplate.xlsx";
|
||||
|
||||
public ProcessMapReportDataSaubStatExportService(IWellService wellService,
|
||||
IProcessMapReportDataSaubStatService processMapReportDataSaubStatService)
|
||||
@ -53,11 +53,8 @@ namespace AsbCloudInfrastructure.Services.ProcessMaps.Report
|
||||
return (name, memoryStream);
|
||||
}
|
||||
|
||||
private static void FillProcessMapToWorkbook(XLWorkbook workbook,
|
||||
IEnumerable<ProcessMapReportDataSaubStatDto> data)
|
||||
private static void FillProcessMapToWorkbook(XLWorkbook workbook, IEnumerable<ProcessMapReportDataSaubStatDto> data)
|
||||
{
|
||||
const string sheetName = "Отчёт";
|
||||
|
||||
var sheet = workbook.GetWorksheet(sheetName);
|
||||
|
||||
var startRow = headerRowsCount + 1;
|
||||
@ -68,8 +65,7 @@ namespace AsbCloudInfrastructure.Services.ProcessMaps.Report
|
||||
}
|
||||
|
||||
|
||||
private static int FillRow(IXLWorksheet sheet, ProcessMapReportDataSaubStatDto item,
|
||||
int startRow)
|
||||
private static int FillRow(IXLWorksheet sheet, ProcessMapReportDataSaubStatDto item, int startRow)
|
||||
{
|
||||
var endRow = FillIntervalData(sheet, item, startRow);
|
||||
|
||||
@ -255,5 +251,4 @@ namespace AsbCloudInfrastructure.Services.ProcessMaps.Report
|
||||
|
||||
style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ using AsbCloudWebApi.SignalR.Clients;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.IO;
|
||||
@ -91,6 +92,7 @@ public class ProcessMapWellDrillingController : ProcessMapBaseController<Process
|
||||
/// <param name="file"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[Obsolete]
|
||||
[HttpPost("import/{options}")]
|
||||
[ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)]
|
||||
public async Task<IActionResult> ImportAsync(int idWell,
|
||||
@ -129,6 +131,7 @@ public class ProcessMapWellDrillingController : ProcessMapBaseController<Process
|
||||
/// <param name="idWell">Id скважины</param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[Obsolete]
|
||||
[HttpGet("export")]
|
||||
[ProducesResponseType(typeof(PhysicalFileResult), StatusCodes.Status200OK, "application/octet-stream")]
|
||||
[ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)]
|
||||
@ -143,6 +146,7 @@ public class ProcessMapWellDrillingController : ProcessMapBaseController<Process
|
||||
/// Возвращает шаблон файла для импорта
|
||||
/// </summary>
|
||||
/// <returns>Запрашиваемый файл</returns>
|
||||
[Obsolete]
|
||||
[HttpGet("template")]
|
||||
[ProducesResponseType(typeof(PhysicalFileResult), StatusCodes.Status200OK, "application/octet-stream")]
|
||||
public async Task<IActionResult> GetTemplateAsync(CancellationToken cancellationToken)
|
||||
|
Loading…
Reference in New Issue
Block a user