* Introduced MaterialTransactionsController

This commit is contained in:
2025-12-13 13:14:22 +01:00
parent 309044cb0c
commit da71596fad
3 changed files with 50 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
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();
}