39 lines
1.3 KiB
C#
39 lines
1.3 KiB
C#
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace OI.Metrology.Server.ApiControllers;
|
|
|
|
using OI.Metrology.Shared.DataModels;
|
|
using OI.Metrology.Shared.Models.Stateless;
|
|
using System.Text.Json;
|
|
|
|
[Route("api/[controller]")]
|
|
public class ExportController : Controller, IExportController<IActionResult>
|
|
{
|
|
|
|
private readonly IExportRepository _ExportRepository;
|
|
|
|
public ExportController(IExportRepository exportRepository) =>
|
|
_ExportRepository = exportRepository;
|
|
|
|
[HttpGet]
|
|
[Route("export")]
|
|
public IActionResult GetExport(HeaderCommon headerCommon) =>
|
|
Content(_ExportRepository.GetExport(headerCommon));
|
|
|
|
[HttpGet]
|
|
[Route("headers")]
|
|
public IActionResult GetHeaders(HeaderCommon headerCommon) =>
|
|
Json(_ExportRepository.GetHeaders(headerCommon), new JsonSerializerOptions { PropertyNamingPolicy = null, WriteIndented = true });
|
|
|
|
[HttpGet]
|
|
[Route("logistics")]
|
|
public IActionResult GetLogistics(HeaderCommon headerCommon) =>
|
|
Json(_ExportRepository.GetLogistics(headerCommon), new JsonSerializerOptions { PropertyNamingPolicy = null, WriteIndented = true });
|
|
|
|
[HttpGet]
|
|
[Route("pdsf")]
|
|
[Route("processDataStandardFormat")]
|
|
public IActionResult GetProcessDataStandardFormat(HeaderCommon headerCommon) =>
|
|
Content(_ExportRepository.GetProcessDataStandardFormat(headerCommon));
|
|
|
|
} |