42 lines
1.4 KiB
C#
42 lines
1.4 KiB
C#
using AutoMapper;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using SytelineSaAppEfDataModel.Dtos;
|
|
using SytelineSaAppEfDataModel.Services;
|
|
|
|
namespace FaKrosnoApi.Controllers;
|
|
|
|
[ApiController]
|
|
[Route("api/[controller]")]
|
|
public class MaterialTransactionsController(IMaterialTransactionService service) : Controller
|
|
{
|
|
[HttpGet]
|
|
public async Task<IEnumerable<MaterialTransactionDto>> GetAll()
|
|
{
|
|
return await service.GetAll();
|
|
}
|
|
|
|
[HttpGet("by-wz-number")]
|
|
public Task<MaterialTransactionDto?> GetByWzNumber([FromQuery] string wzNumber)
|
|
{
|
|
return service.GetByWzNumber(wzNumber);
|
|
}
|
|
|
|
[HttpGet("list-by-wz-numbers")]
|
|
public Task<IEnumerable<MaterialTransactionDto>> GetListByWzNumber([FromBody] ISet<string> wzNumbers)
|
|
{
|
|
return service.GetOrderNumbersByWz(wzNumbers);
|
|
}
|
|
|
|
[HttpGet("by-order-number")]
|
|
public Task<IEnumerable<MaterialTransactionDto>> GetByOrderNumber([FromQuery] string orderNumber)
|
|
{
|
|
return service.GetByOrderNumber(orderNumber);
|
|
}
|
|
|
|
// public Task<IEnumerable<MaterialTransactionDto>> GetOrderNumbersByWz(ISet<string> wzNumbers);
|
|
// public Task<IEnumerable<MaterialTransactionDto>> GetByCustomerNumber(string customerNumber, int customerSequence);
|
|
// public Task<MaterialTransactionDto?> GetByPartNumber(string partNumber);
|
|
// public Task<IEnumerable<MaterialTransactionDto>> GetWithPartNumber();
|
|
|
|
|
|
} |