packages update

Update gestione generazione fabbisogni a livello di ordine
update metodo API x recupero filtrato x CodGroup
This commit is contained in:
Samuele Locatelli
2026-04-30 11:50:24 +02:00
parent 8525d81201
commit 0e7e0aaed0
12 changed files with 39 additions and 15 deletions
+6 -1
View File
@@ -100,14 +100,19 @@ namespace Lux.API.Controllers
/// GET: api/report/matreq-sale-ord/45
/// </summary>
/// <param name="id">id univoco</param>
/// <param name="codGroup">codGruppo per selezionare solo un tpo di item</param>
/// <returns></returns>
[HttpGet("matreq-sale-ord/{id}")]
public async Task<IActionResult> MatReqSaleOrder(int id)
public async Task<IActionResult> MatReqSaleOrder(int id, string codGroup = "")
{
Stopwatch sw = new Stopwatch();
sw.Start();
// recupera dal DB l'offerta con le righe relative
var ordData = await _mrService.GetByOrderAsync(id);
if (!string.IsNullOrWhiteSpace(codGroup))
{
ordData = ordData.Where(x => x.CodGroup.Equals(codGroup, StringComparison.InvariantCultureIgnoreCase)).ToList();
}
sw.Stop();
Log.Debug($"MatReqSaleOrder | {id} | {sw.Elapsed.TotalMilliseconds:N3} ms");