* Added Lot table and service

* Changed behaviour of scanning to scan first PartNumber, select specific record and then scan MeylePartNumber
This commit is contained in:
2025-06-17 08:30:10 +02:00
parent e96bcc95ba
commit a8e3a8be66
15 changed files with 374 additions and 25 deletions

View File

@@ -6,7 +6,7 @@ namespace FaKrosnoApi.Controllers;
[ApiController]
[Route("api/[controller]")]
public class WzRowMeyleController(IWzRowMeyleService service) : Controller
public class WzRowMeyleController(IWzRowMeyleService service, IMaterialTransactionService materialTransactionService) : Controller
{
[HttpGet]
public async Task<ActionResult<IEnumerable<WzRowMeyleDto>>> GetAll()
@@ -34,6 +34,13 @@ public class WzRowMeyleController(IWzRowMeyleService service) : Controller
return Ok(wzRows);
}
[HttpGet("by-part-number")]
public async Task<ActionResult<MaterialTransactionDto>> GetByPartNumber([FromQuery] string partNumber)
{
MaterialTransactionDto materialTransaction = await materialTransactionService.GetByPartNumber(partNumber);
return Ok(materialTransaction);
}
[HttpPut]
public async Task<ActionResult> UpdateRows([FromBody] IEnumerable<WzRowMeyleDto> rows)
{