forked from ddrilling/AsbCloudServer
Merge branch 'dev' into feature/notifications_updates
This commit is contained in:
commit
e3992f3d4c
@ -53,7 +53,7 @@ public class AutoGeneratedDailyReportController : ControllerBase
|
|||||||
reportDate,
|
reportDate,
|
||||||
cancellationToken);
|
cancellationToken);
|
||||||
|
|
||||||
return File(reportFile.stream, reportFile.fileName);
|
return File(reportFile.stream, "application/octet-stream", reportFile.fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -162,7 +162,7 @@ namespace AsbCloudWebApi.Controllers
|
|||||||
/// <param name="token"></param>
|
/// <param name="token"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("{date}/excel")]
|
[HttpGet("{date}/excel")]
|
||||||
[ProducesResponseType(typeof(PhysicalFileResult), (int)System.Net.HttpStatusCode.OK, "application/octet-stream")]
|
[ProducesResponseType(typeof(PhysicalFileResult), (int)System.Net.HttpStatusCode.OK)]
|
||||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||||
public async Task<IActionResult> DownloadAsync(int idWell, DateOnly date, CancellationToken token)
|
public async Task<IActionResult> DownloadAsync(int idWell, DateOnly date, CancellationToken token)
|
||||||
{
|
{
|
||||||
@ -177,7 +177,7 @@ namespace AsbCloudWebApi.Controllers
|
|||||||
return NoContent();
|
return NoContent();
|
||||||
|
|
||||||
var fileName = $"Суточный рапорт по скважине {well.Caption} куст {well.Cluster}.xlsx";
|
var fileName = $"Суточный рапорт по скважине {well.Caption} куст {well.Cluster}.xlsx";
|
||||||
return File(stream, fileName);
|
return File(stream, "application/octet-stream", fileName);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ namespace AsbCloudWebApi.Controllers
|
|||||||
{
|
{
|
||||||
var stream = plannedTrajectoryImportService.GetTemplateFile();
|
var stream = plannedTrajectoryImportService.GetTemplateFile();
|
||||||
var fileName = "ЕЦП_шаблон_файла_плановая_траектория.xlsx";
|
var fileName = "ЕЦП_шаблон_файла_плановая_траектория.xlsx";
|
||||||
return File(stream, fileName);
|
return File(stream, "application/octet-stream", fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -68,7 +68,7 @@ namespace AsbCloudWebApi.Controllers
|
|||||||
return Forbid();
|
return Forbid();
|
||||||
var stream = await plannedTrajectoryImportService.ExportAsync(idWell, token);
|
var stream = await plannedTrajectoryImportService.ExportAsync(idWell, token);
|
||||||
var fileName = await plannedTrajectoryImportService.GetFileNameAsync(idWell, token);
|
var fileName = await plannedTrajectoryImportService.GetFileNameAsync(idWell, token);
|
||||||
return File(stream, fileName);
|
return File(stream, "application/octet-stream", fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -170,7 +170,7 @@ namespace AsbCloudWebApi.Controllers
|
|||||||
{
|
{
|
||||||
var stream = await processMapPlanImportService.GetExcelTemplateStreamAsync(cancellationToken);
|
var stream = await processMapPlanImportService.GetExcelTemplateStreamAsync(cancellationToken);
|
||||||
var fileName = "ЕЦП_шаблон_файла_РТК.xlsx";
|
var fileName = "ЕЦП_шаблон_файла_РТК.xlsx";
|
||||||
return File(stream, fileName);
|
return File(stream, "application/octet-stream", fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -236,7 +236,7 @@ namespace AsbCloudWebApi.Controllers
|
|||||||
|
|
||||||
var stream = await processMapPlanImportService.ExportAsync(idWell, cancellationToken);
|
var stream = await processMapPlanImportService.ExportAsync(idWell, cancellationToken);
|
||||||
var fileName = $"РТК-план по скважине {well.Caption} куст {well.Cluster}.xlsx";
|
var fileName = $"РТК-план по скважине {well.Caption} куст {well.Cluster}.xlsx";
|
||||||
return File(stream, fileName);
|
return File(stream, "application/octet-stream", fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task NotifyUsersBySignalR(int idWell, CancellationToken token)
|
private async Task NotifyUsersBySignalR(int idWell, CancellationToken token)
|
||||||
|
@ -60,7 +60,7 @@ namespace AsbCloudWebApi.Controllers.SAUB
|
|||||||
|
|
||||||
var stream = await telemetryDataSaubService.GetZippedCsv(idWell, beginDate, endDate, token).ConfigureAwait(false);
|
var stream = await telemetryDataSaubService.GetZippedCsv(idWell, beginDate, endDate, token).ConfigureAwait(false);
|
||||||
var fileName = $"DataSaub idWell{idWell} {beginDate:yyyy-MM-DDTHH-mm} - {endDate:yyyy-MM-DDTHH-mm}.zip";
|
var fileName = $"DataSaub idWell{idWell} {beginDate:yyyy-MM-DDTHH-mm} - {endDate:yyyy-MM-DDTHH-mm}.zip";
|
||||||
return File(stream, fileName);
|
return File(stream, "application/octet-stream", fileName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -333,7 +333,7 @@ namespace AsbCloudWebApi.Controllers
|
|||||||
|
|
||||||
var stream = wellOperationImportService.Export(idWell);
|
var stream = wellOperationImportService.Export(idWell);
|
||||||
var fileName = await wellService.GetWellCaptionByIdAsync(idWell, token) + "_operations.xlsx";
|
var fileName = await wellService.GetWellCaptionByIdAsync(idWell, token) + "_operations.xlsx";
|
||||||
return File(stream, fileName);
|
return File(stream, "application/octet-stream", fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -373,7 +373,7 @@ namespace AsbCloudWebApi.Controllers
|
|||||||
{
|
{
|
||||||
var stream = wellOperationImportService.GetExcelTemplateStream();
|
var stream = wellOperationImportService.GetExcelTemplateStream();
|
||||||
var fileName = "ЕЦП_шаблон_файла_операций.xlsx";
|
var fileName = "ЕЦП_шаблон_файла_операций.xlsx";
|
||||||
return File(stream, fileName);
|
return File(stream, "application/octet-stream", fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<bool> CanUserAccessToWellAsync(int idWell, CancellationToken token)
|
private async Task<bool> CanUserAccessToWellAsync(int idWell, CancellationToken token)
|
||||||
|
Loading…
Reference in New Issue
Block a user