This commit is contained in:
2025-12-01 10:00:40 +01:00
parent 20b13e962c
commit 8cd4c48e95
91 changed files with 27185 additions and 7 deletions

View File

@@ -0,0 +1,38 @@
using Apollinare.API.Modules.Production.Dtos;
using Apollinare.API.Modules.Production.Services;
using Apollinare.Domain.Entities.Production;
using Microsoft.AspNetCore.Mvc;
namespace Apollinare.API.Modules.Production.Controllers;
[ApiController]
[Route("api/production/mrp")]
public class MrpController : ControllerBase
{
private readonly IMrpService _mrpService;
public MrpController(IMrpService mrpService)
{
_mrpService = mrpService;
}
[HttpPost("run")]
public async Task<IActionResult> RunMrp([FromBody] MrpConfigurationDto config)
{
await _mrpService.RunMrpAsync(config);
return Ok(new { message = "MRP Run completed successfully" });
}
[HttpGet("suggestions")]
public async Task<ActionResult<List<MrpSuggestion>>> GetSuggestions([FromQuery] bool includeProcessed = false)
{
return await _mrpService.GetSuggestionsAsync(includeProcessed);
}
[HttpPost("suggestions/{id}/process")]
public async Task<IActionResult> ProcessSuggestion(int id)
{
await _mrpService.ProcessSuggestionAsync(id);
return Ok();
}
}