Merge branch 'Release/AddLocalStorageConfReparto'
This commit is contained in:
@@ -595,8 +595,10 @@ namespace MP.Data.Controllers
|
||||
/// <summary>
|
||||
/// Elenco PODL non avviati filtrati x articolo, KeyRich (che contiene stato)
|
||||
/// </summary>
|
||||
/// <param name="codArt">Cod articolo</param>
|
||||
/// <param name="lanciato">Solo lanciati (1) o ancora disponibili (0)</param>
|
||||
/// <param name="keyRichPart">KeyRich (parziale) da cercare (es cod stato x yacht)</param>
|
||||
/// <param name="idxMacchina">Macchina</param>
|
||||
/// <param name="codGruppo">Gruppo</param>
|
||||
/// <returns></returns>
|
||||
public List<PODLExpModel> ListPODLFilt(bool lanciato, string keyRichPart, string idxMacchina, string codGruppo)
|
||||
{
|
||||
@@ -604,28 +606,18 @@ namespace MP.Data.Controllers
|
||||
List<PODLExpModel> dbResult = new List<PODLExpModel>();
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
var Lanciato = new SqlParameter("@Lanciato", lanciato);
|
||||
var Lanc = new SqlParameter("@Lanciato", lanciato);
|
||||
var KeyRich = new SqlParameter("@KeyRich", keyRichPart);
|
||||
var CodGruppo = new SqlParameter("@CodGruppo", codGruppo);
|
||||
var IdxMacc = new SqlParameter("@IdxMacchina", idxMacchina);
|
||||
var CodGrp = new SqlParameter("@CodGruppo", codGruppo);
|
||||
|
||||
dbResult = dbCtx
|
||||
.DbSetPODLExp
|
||||
.FromSqlRaw("EXEC stp_PODL_getByFiltSpec @Lanciato, @KeyRich, @CodGruppo, @IdxMacchina", Lanciato, KeyRich, CodGruppo, IdxMacc)
|
||||
.FromSqlRaw("EXEC stp_PODL_getByFiltSpec @Lanciato, @KeyRich, @CodGruppo, @IdxMacchina", Lanc, KeyRich, CodGrp, IdxMacc)
|
||||
.AsNoTracking()
|
||||
//.AsEnumerable()
|
||||
.ToList();
|
||||
}
|
||||
#if false
|
||||
dbResult = dbCtx
|
||||
.DbSetPODL
|
||||
.Where(x => (x.IdxOdl == 0) && (x.KeyRichiesta.Contains(keyRichPart) || keyRichPart == "*") && (codArt == "*" || x.CodArticolo.Contains(codArt)))
|
||||
.AsNoTracking()
|
||||
.Include(m => m.MachineNav)
|
||||
.Include(a => a.ArticoloNav)
|
||||
.OrderByDescending(x => x.InsertDate)
|
||||
.ToList();
|
||||
#endif
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,6 @@ namespace MP.Data.DTO
|
||||
public int MatrOpr { get; set; } = 0;
|
||||
public string Cognome { get; set; } = "";
|
||||
public string Nome { get; set; } = "";
|
||||
public string hashAuthKey { get; set; }
|
||||
public string hashAuthKey { get; set; } = "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
<input @bind="@rawScan" class="fs-3 mb-2" @ref="@target" style="width: 17rem;" />
|
||||
<input @bind="@rawScan" class="fs-3 mb-2" @ref="@target" style="width: 17rem;" />
|
||||
|
||||
@if (rawScan != null)
|
||||
{
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
<div class="d-flex justify-content-end">
|
||||
<div class="d-flex justify-content-between pt-2">
|
||||
@if (filtActive)
|
||||
{
|
||||
<div class=" rounded small d-flex justify-content-between" title="Filtri attivi">
|
||||
@*<i class="fas fa-exclamation text-warning"></i>*@
|
||||
@if (selMacchina != "*")
|
||||
{
|
||||
<button class="btn btn-outline-primary btn-sm mx-2" @onclick="()=>resetMacchina()" title="Rimuovi Filtro Impianto"><i class="fa-solid fa-hard-drive"></i>   <i class="fa-solid fa-xmark text-warning"></i></button>
|
||||
}
|
||||
@if (selArticolo != "*")
|
||||
{
|
||||
<button class="btn btn-outline-primary btn-sm mx-2" @onclick="()=>resetArticolo()" title="Rimuovi Filtro Articolo"><i class="fa-solid fa-sliders"></i>   <i class="fa-solid fa-xmark text-warning"></i></button>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
<div class="p-2">
|
||||
<a class="" data-bs-toggle="offcanvas" data-bs-target="#paramsFilterExample" aria-controls="paramsFilterExample">
|
||||
<i class="fa-solid fa-bars text-dark"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="offcanvas offcanvas-end" tabindex="-1" id="paramsFilterExample" aria-labelledby="paramsFilterExampleLabel">
|
||||
<div class="offcanvas-header">
|
||||
<h3 class="offcanvas-title" id="paramsFilterExampleLabel"><b>FILTRI</b></h3>
|
||||
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="offcanvas-body">
|
||||
<div>
|
||||
Seleziona i filtri per:
|
||||
</div>
|
||||
<div class="small mt-2">
|
||||
<label class="px-2" for="dtMin" title="Selezionare inizio periodo">Articolo</label>
|
||||
</div>
|
||||
<div class="input-group px-2">
|
||||
<label class="input-group-text" for="macchina" title="Selezionare l'articolo"><i class="fa-solid fa-file"></i></label>
|
||||
<select @bind="@selArticolo" class="form-select" id="macchina" title="Selezionare la macchina">
|
||||
<option value="*">--- Tutti ---</option>
|
||||
@if (ListArticoli != null)
|
||||
{
|
||||
foreach (var item in ListArticoli)
|
||||
{
|
||||
<option value="@item">@item</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="small mt-2">
|
||||
<label class="px-2" for="dtMin" title="Selezionare inizio periodo">Macchina</label>
|
||||
</div>
|
||||
<div class="input-group px-2">
|
||||
<label class="input-group-text" for="macchina" title="Selezionare la macchina"><i class="fa-solid fa-hard-drive"></i></label>
|
||||
<select @bind="@selMacchina" class="form-select" id="macchina" title="Selezionare la macchina">
|
||||
<option value="*">--- Tutti ---</option>
|
||||
@if (ListMacchine != null)
|
||||
{
|
||||
foreach (var item in ListMacchine)
|
||||
{
|
||||
<option value="@item">@item</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="small mt-2">
|
||||
<label class="px-2" for="dtMin" title="Selezionare inizio periodo">Inizio Periodo</label>
|
||||
</div>
|
||||
<div class="px-2 input-group">
|
||||
<label class="input-group-text" for="dtMin" title="Selezionare inizio periodo"><i class="fa-regular fa-calendar-minus"></i></label>
|
||||
<input class="form-control" @bind="@selDtMin" id="dtMin" type="datetime-local" title="Data minima eventi da visualizzare">
|
||||
</div>
|
||||
<div class="small mt-2">
|
||||
<label class="px-2" for="dtMax" title="Selezionare fine periodo">Fine Periodo</label>
|
||||
</div>
|
||||
<div class="px-2 input-group">
|
||||
<label class="input-group-text" for="dtMax" title="Selezionare fine periodo"><i class="fa-regular fa-calendar-plus"></i></label>
|
||||
<input class="form-control" @bind="@selDtMax" id="dtMax" type="datetime-local" title="Selezionare fine periodo">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -1,173 +0,0 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using MP.INVE.Data;
|
||||
|
||||
namespace MP.INVE.Components
|
||||
{
|
||||
public partial class DossiersFilter
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<SelectDossierParams> FilterChanged { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public SelectDossierParams SelFilterDossier { get; set; } = null!;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
[Inject]
|
||||
protected MpDataService MDService { get; set; } = null!;
|
||||
|
||||
protected string selArticolo
|
||||
{
|
||||
get
|
||||
{
|
||||
return SelFilterDossier.CodArticolo;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!SelFilterDossier.CodArticolo.Equals(value))
|
||||
{
|
||||
SelFilterDossier.CurrPage = 1;
|
||||
SelFilterDossier.CodArticolo = value;
|
||||
StateHasChanged();
|
||||
Task.Delay(1);
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
private bool filtActive
|
||||
{
|
||||
get => selMacchina != "*" || selArticolo != "*";
|
||||
}
|
||||
protected void resetMacchina()
|
||||
{
|
||||
selMacchina = "*";
|
||||
}
|
||||
protected void resetArticolo()
|
||||
{
|
||||
selArticolo = "*";
|
||||
}
|
||||
protected DateTime selDtMax
|
||||
{
|
||||
get
|
||||
{
|
||||
return SelFilterDossier.DtEnd;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (!SelFilterDossier.DtEnd.Equals(value))
|
||||
{
|
||||
SelFilterDossier.DtEnd = value;
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected DateTime selDtMin
|
||||
{
|
||||
get
|
||||
{
|
||||
return SelFilterDossier.DtStart;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (!SelFilterDossier.DtStart.Equals(value))
|
||||
{
|
||||
SelFilterDossier.DtStart = value;
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected string selMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
return SelFilterDossier.IdxMacchina;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!SelFilterDossier.IdxMacchina.Equals(value))
|
||||
{
|
||||
SelFilterDossier.CurrPage = 1;
|
||||
SelFilterDossier.IdxMacchina = value;
|
||||
StateHasChanged();
|
||||
Task.Delay(1);
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected int selMaxRecord
|
||||
{
|
||||
get
|
||||
{
|
||||
return SelFilterDossier.MaxRecord;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (!SelFilterDossier.MaxRecord.Equals(value))
|
||||
{
|
||||
SelFilterDossier.MaxRecord = value;
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected bool showParam { get; set; } = false;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
SelFilterDossier = new SelectDossierParams();
|
||||
DateTime dtEnd = SelFilterDossier.DtEnd;
|
||||
DateTime dtStart = dtEnd.Subtract(SelFilterDossier.DtStart).TotalDays < 15 ? SelFilterDossier.DtStart : dtEnd.AddDays(-14);
|
||||
ListMacchine = await MDService.MacchineWithFlux(dtStart, dtEnd);
|
||||
ListArticoli = await MDService.ArticleWithDossier();
|
||||
await FilterChanged.InvokeAsync(SelFilterDossier);
|
||||
}
|
||||
|
||||
protected void toggleParams()
|
||||
{
|
||||
showEditPar = !showEditPar;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private List<string>? ListArticoli = null;
|
||||
private List<string>? ListMacchine = null;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private bool showEditPar { get; set; } = false;
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void reportChange()
|
||||
{
|
||||
FilterChanged.InvokeAsync(SelFilterDossier);
|
||||
}
|
||||
|
||||
private void toggleShowParams()
|
||||
{
|
||||
showParam = !showParam;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -1,339 +0,0 @@
|
||||
@using MP.INVE.Components
|
||||
@using MP.INVE.Data
|
||||
|
||||
|
||||
|
||||
|
||||
@if (ListRecords == null)
|
||||
{
|
||||
<LoadingData></LoadingData>
|
||||
}
|
||||
else if (totalCount == 0)
|
||||
{
|
||||
<div class="alert alert-warning text-center display-4">Nessun record trovato</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<!-- INIZIO: MODIFICA FLUSSO -->
|
||||
@if (currFluxLogDto != null)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card mb-5">
|
||||
<div class="card-header bg-primary text-light d-flex justify-content-between">
|
||||
<div>
|
||||
Modifica Parametro
|
||||
</div>
|
||||
<div>
|
||||
@if (isEditing)
|
||||
{
|
||||
<span class="text-light">PENDING CHANGES...</span>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-3 pe-0">
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-text" id="inputGroup-sizing-sm">MACCHINA</span>
|
||||
<input type="text" class="form-control" disabled aria-label="Art search" aria-describedby="inputGroup-sizing-sm" @bind-value="@currFluxLogDto.IdxMacchina">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 pe-0">
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-text" id="inputGroup-sizing-sm">DATA</span>
|
||||
<input type="text" class="form-control" disabled aria-label="Art search" aria-describedby="inputGroup-sizing-sm" @bind-value="@currFluxLogDto.dtEvento">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 pe-0">
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-text" id="inputGroup-sizing-sm">DATA TYPE</span>
|
||||
<input type="text" class="form-control" disabled aria-label="Art search" aria-describedby="inputGroup-sizing-sm" @bind-value="@currFluxLogDto.CodFlux">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 pe-0">
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-text" id="inputGroup-sizing-sm">VALORE</span>
|
||||
<input type="text" class="form-control" aria-label="Art search" aria-describedby="inputGroup-sizing-sm" @bind-value="@currFluxLogDto.ValoreEdit" @onclick="()=> enableEditing()">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row pt-4" style="visibility: @css()">
|
||||
<div class="col-3 pe-0">
|
||||
</div>
|
||||
<div class="col-3 pe-0">
|
||||
</div>
|
||||
<div class="col-3 pe-0">
|
||||
<div class="d-grid gap-2">
|
||||
<button @onclick="() => cancel()" class="btn btn-warning">Annulla <i class="bi bi-x-circle"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 pe-0">
|
||||
<div class="d-grid gap-2">
|
||||
<button @onclick="() => update(currFluxLogDto)" class="btn btn-success">Save <i class="bi bi-save"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<!-- FINE: MODIFICA FLUSSO -->
|
||||
<!-- INIZIO: NUOVO DOSSIER -->
|
||||
@if (currRecordClone != null)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card mb-5">
|
||||
<div class="card-header bg-primary text-light d-flex justify-content-between">
|
||||
<div>
|
||||
Nuovo Dossier
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<!--INIZIO PRIMA RIGA-->
|
||||
<div class="row">
|
||||
<div class="col-4 pe-0">
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-text" id="inputGroup-sizing-sm">MACCHINA</span>
|
||||
<select @bind="@currRecordClone.IdxMacchina" class="form-select" id="macchina" title="Selezionare la macchina" @onclick="()=> enableEditing()">
|
||||
@if (ListMacchine != null)
|
||||
{
|
||||
foreach (var item in ListMacchine)
|
||||
{
|
||||
@if (item.IdxMacchina == currRecordClone.IdxMacchina)
|
||||
{
|
||||
|
||||
<option value="@item.IdxMacchina" selected>@item.IdxMacchina | @item.Descrizione</option>
|
||||
}
|
||||
else
|
||||
{
|
||||
<option value="@item.IdxMacchina">@item.IdxMacchina | @item.Descrizione</option>
|
||||
}
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 pe-0">
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-text" id="inputGroup-sizing-sm">FASE</span>
|
||||
<select class="form-select" @bind="@currRecordClone.KeyRichiesta" @onclick="()=> enableEditing()" title="Selezionare la fase">
|
||||
@if (ListStati != null)
|
||||
{
|
||||
foreach (var item in ListStati)
|
||||
{
|
||||
@if (item.value == currRecordClone.KeyRichiesta)
|
||||
{
|
||||
<option value="@item.value" selected>@item.label</option>
|
||||
}
|
||||
else
|
||||
{
|
||||
<option value="@item.value">@item.label</option>
|
||||
}
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4 pe-0">
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-text" id="inputGroup-sizing-sm" @onclick="()=> enableEditing()">ARTICOLI</span>
|
||||
|
||||
<select @bind="@currRecordClone.CodArticolo" class="form-select" id="macchina" title="Selezionare l'articolo">
|
||||
@if (ListArticoli != null)
|
||||
{
|
||||
foreach (var item in ListArticoli)
|
||||
{
|
||||
@if (item.CodArticolo == currRecordClone.CodArticolo)
|
||||
{
|
||||
<option value="@item.CodArticolo" selected>@item.CodArticolo | @item.DescArticolo</option>
|
||||
}
|
||||
else
|
||||
{
|
||||
<option value="@item.CodArticolo">@item.CodArticolo | @item.DescArticolo</option>
|
||||
}
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--FINE PRIMA RIGA-->
|
||||
|
||||
|
||||
<div class="row pt-4">
|
||||
<div class="col-3 pe-0">
|
||||
</div>
|
||||
<div class="col-3 pe-0">
|
||||
</div>
|
||||
<div class="col-3 pe-0">
|
||||
<div class="d-grid gap-2">
|
||||
<button @onclick="() => cancelNewDoss()" class="btn btn-warning">Annulla <i class="bi bi-x-circle"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 pe-0">
|
||||
<div class="d-grid gap-2">
|
||||
<button @onclick="() => newDossier(currRecordClone)" class="btn btn-success">Save <i class="bi bi-save"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
<!-- FINE: NUOVO DOSSIER -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="d-flex justify justify-content-between">
|
||||
<table class="table table-sm table-striped small">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<div class="text-nowrap">
|
||||
|
||||
@if (currRecord != null)
|
||||
{
|
||||
<button @onclick="() => closeTableFlux()" class="btn btn-primary btn-sm"><i class="bi bi-arrow-counterclockwise"></i></button>
|
||||
<button @onclick="()=> cloneRecord(currRecord)" class="btn btn-info btn-sm" title="Duplica Record"><i class="bi bi-clipboard-check"></i></button>
|
||||
}
|
||||
</div>
|
||||
</th>
|
||||
<th><i class="fa-solid fa-file"></i> Articolo</th>
|
||||
<th><i class="fa-solid fa-screwdriver-wrench"></i> Fase</th>
|
||||
<th><i class="fa-solid fa-hard-drive"></i> Macchina</th>
|
||||
<th><i class="fa-regular fa-calendar-days"></i> Data Snap</th>
|
||||
<th><i class="fa-solid fa-sliders"></i> ODL</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var record in ListRecords)
|
||||
{
|
||||
<tr class="@checkSelect(@record)">
|
||||
<td>
|
||||
@if (isEditing == false)
|
||||
{
|
||||
<!--SEL RECORD PER VISUALIZZAZIONE FLUSSI-->
|
||||
<button class="btn btn-primary btn-sm" @onclick="() => selRecord(record)"><i class="fa-solid fa-magnifying-glass"></i></button>
|
||||
<!--SEL RECORD PER CLONA DOSSIER-->
|
||||
@*<button @onclick="()=> cloneRecord(record)" class="btn btn-info btn-sm" title="Duplica Record"><i class="bi bi-clipboard-check"></i></button>*@
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="btn btn-secondary btn-sm disabled"><i class="fa-solid fa-magnifying-glass"></i></button>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@record.CodArticolo
|
||||
<div class="small textConsensed text-secondary">@record.ArticoloNav.DescArticolo</div>
|
||||
</td>
|
||||
<td>
|
||||
@tradFase(record.KeyRichiesta)
|
||||
</td>
|
||||
<td>
|
||||
@record.IdxMacchina
|
||||
@*<div class="small textConsensed text-secondary">@record.MachineNav.Descrizione</div>*@
|
||||
</td>
|
||||
<td>
|
||||
@record.DtRif
|
||||
</td>
|
||||
<td>
|
||||
@record.IdxODL
|
||||
</td>
|
||||
<td>
|
||||
@if (isEditing == false)
|
||||
{
|
||||
|
||||
<button @onclick="() => deleteRecord(record)" class="btn btn-danger btn-sm"><i class="bi bi-trash-fill"></i></button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="btn btn-secondary btn-sm disabled"><i class="bi bi-trash-fill"></i></button>
|
||||
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@if (!visualizzaFlux)
|
||||
{
|
||||
if (listaFlux == null)
|
||||
{
|
||||
<div class="alert alert-warning text-center display-4">Nessun record trovato</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="table selBlock p-2">
|
||||
<table class="table table-light table-sm table-striped small mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<button class="btn btn-info" @onclick="() => closeTableFlux()"><i class="fa-solid fa-xmark"></i></button>
|
||||
</th>
|
||||
<th><i class="fa-solid fa-hard-drive"></i> Macchina</th>
|
||||
<th><i class="fa-regular fa-calendar-days"></i> Data</th>
|
||||
<th><i class="fa-solid fa-sliders"></i> Data Type</th>
|
||||
<th style="text-align: right;">
|
||||
<span class="col-11"> Valore </span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var record in listaFlux)
|
||||
{
|
||||
<tr class="@checkSelPar(@record)">
|
||||
<td>
|
||||
<button @onclick="() => editRecord(record)" class="btn btn-primary btn-sm" title="Modifica Record"><i class="bi bi-pencil-square"></i></button>
|
||||
</td>
|
||||
<td>
|
||||
@record.IdxMacchina
|
||||
</td>
|
||||
<td>
|
||||
@record.dtEvento
|
||||
</td>
|
||||
<td>
|
||||
@traduci(record.CodFlux)
|
||||
<div class="small textConsensed text-secondary" title="Valore Registrato">@record.CodFlux</div>
|
||||
</td>
|
||||
<td style="text-align: right;">
|
||||
@if (record.ValoreEdit != record.Valore)
|
||||
{
|
||||
<div title="Valore Modificato"><span class="small text-dark"></span><b>@record.ValoreEdit</b></div>
|
||||
<div class="small text-secondary" title="Valore Registrato">(<i>@record.Valore</i>)</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div><span class="small text-dark"></span>@record.ValoreEdit</div>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,459 +0,0 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.Data.DTO;
|
||||
using MP.INVE.Data;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace MP.INVE.Components
|
||||
{
|
||||
public partial class ListDossiers : IDisposable
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<DossierModel> RecordSel { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<FluxLogDTO> RecordSelFlux { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public SelectDossierParams SelFilter { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> TotRecordChanged { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public string checkSelect(DossierModel recordSel)
|
||||
{
|
||||
string answ = "";
|
||||
if (currRecord != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
answ = (currRecord.IdxMacchina == recordSel.IdxMacchina && currRecord.DtRif == recordSel.DtRif) ? "table-info" : "";
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
public string checkSelPar(FluxLogDTO recordSel)
|
||||
{
|
||||
string answ = "";
|
||||
if (currFluxLogDto != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
answ = (currFluxLogDto.CodFlux == recordSel.CodFlux && currFluxLogDto.dtEvento == recordSel.dtEvento) ? "table-info" : "";
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
currRecord = null;
|
||||
SearchRecords = null;
|
||||
ListRecords = null;
|
||||
GC.Collect();
|
||||
}
|
||||
|
||||
public async Task flushCache()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
await MDService.FlushRedisCache();
|
||||
await Task.Delay(1);
|
||||
// rimando a pagina corrente
|
||||
NavManager.NavigateTo(NavManager.Uri, true);
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
[Inject]
|
||||
protected IJSRuntime JSRuntime { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected MpDataService MDService { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected async Task cancel()
|
||||
{
|
||||
var alert = await JSRuntime.InvokeAsync<bool>("confirm", "Confermi di voler annullare TUTTE le modifiche? i dati saranno ricaricati.");
|
||||
if (alert)
|
||||
{
|
||||
currFluxLogDto = null;
|
||||
isEditing = false;
|
||||
await Task.Delay(1);
|
||||
if (currRecord != null)
|
||||
{
|
||||
listaFlux = MDService.getFluxLog(currRecord.Valore);
|
||||
}
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task cancelNewDoss()
|
||||
{
|
||||
var alert = await JSRuntime.InvokeAsync<bool>("confirm", "Confermi di voler annullare l'aggiunta di un nuovo dossier? i dati saranno ricaricati.");
|
||||
if (alert)
|
||||
{
|
||||
currRecordClone = null;
|
||||
isEditing = false;
|
||||
await Task.Delay(1);
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task cloneRecord(DossierModel selRec)
|
||||
{
|
||||
// creo record duplicato...
|
||||
DossierModel newRec = new DossierModel()
|
||||
{
|
||||
//IdxDossier = 0,
|
||||
DataType = selRec.DataType,
|
||||
KeyRichiesta = selRec.KeyRichiesta,
|
||||
DtRif = DateTime.Now,
|
||||
IdxMacchina = selRec.IdxMacchina,
|
||||
CodArticolo = selRec.CodArticolo,
|
||||
IdxODL = 0,
|
||||
Valore = selRec.Valore
|
||||
};
|
||||
currRecordClone = newRec;
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Eliminazione record selezionato (previa conferma)
|
||||
/// </summary>
|
||||
/// <param name="selRec"></param>
|
||||
/// <returns></returns>
|
||||
protected async Task deleteRecord(DossierModel selRec)
|
||||
{
|
||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", "Eliminazione Dossier: sei sicuro di voler procedere?"))
|
||||
return;
|
||||
await Task.Delay(1);
|
||||
var done = await MDService.DossiersDeleteRecord(selRec);
|
||||
currRecord = null;
|
||||
await reloadData(true);
|
||||
visualizzaFlux = true;
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
protected async Task editRecord(FluxLogDTO selRec)
|
||||
{
|
||||
currFluxLogDto = selRec;
|
||||
// indico record selezionato
|
||||
await RecordSelFlux.InvokeAsync(selRec);
|
||||
}
|
||||
|
||||
protected async Task newDossier(DossierModel selRec)
|
||||
{
|
||||
var alert = await JSRuntime.InvokeAsync<bool>("confirm", "Confermi di voler creare un nuovo Dossier per l'impianto/articolo selezionato?");
|
||||
|
||||
if (alert)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
if (currRecordClone != null)
|
||||
{
|
||||
// serializzo valore x flux log...
|
||||
|
||||
DossierFluxLogDTO? valoreDeserializzato = JsonConvert.DeserializeObject<DossierFluxLogDTO>(selRec.Valore);
|
||||
if (valoreDeserializzato != null)
|
||||
{
|
||||
listaFlux = valoreDeserializzato
|
||||
.ODL
|
||||
.OrderBy(x => x.CodFlux)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
if (listaFlux != null)
|
||||
{
|
||||
foreach (var item in listaFlux)
|
||||
{
|
||||
item.IdxMacchina = selRec.IdxMacchina;
|
||||
item.Valore = "0";
|
||||
item.ValoreEdit = "0";
|
||||
item.dtEvento = DateTime.Now;
|
||||
}
|
||||
}
|
||||
|
||||
DossierFluxLogDTO updatedResult = new DossierFluxLogDTO() { ODL = listaFlux };
|
||||
string newVal = JsonConvert.SerializeObject(updatedResult);
|
||||
// preparo x insert
|
||||
currRecordClone.DtRif = DateTime.Now;
|
||||
currRecordClone.IdxMacchina = selRec.IdxMacchina;
|
||||
currRecordClone.CodArticolo = selRec.CodArticolo;
|
||||
currRecordClone.KeyRichiesta = selRec.KeyRichiesta;
|
||||
currRecordClone.Valore = newVal;
|
||||
// METODO PER INSERT DOSSIER + FLUX
|
||||
await MDService.DossiersInsert(currRecordClone);
|
||||
//await reloadData(true);
|
||||
currRecordClone = null;
|
||||
isEditing = false;
|
||||
await Task.Delay(1);
|
||||
await flushCache();
|
||||
}
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
currRecordClone = null;
|
||||
await Task.Delay(1);
|
||||
NavManager.NavigateTo(NavManager.Uri, true);
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
ListGruppiFase = await MDService.ElencoGruppiFase();
|
||||
ListStati = await MDService.AnagStatiComm();
|
||||
ListArticoli = await MDService.ArticoliGetSearch(100000, "BAGLIETTO", "");
|
||||
ListMacchine = await MDService.MacchineGetAll();
|
||||
await reloadData(true);
|
||||
}
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
if (!lastFilter.Equals(SelFilter))
|
||||
{
|
||||
lastFilter = SelFilter.clone();
|
||||
await reloadData(true);
|
||||
}
|
||||
}
|
||||
|
||||
protected async void OnSeachUpdated()
|
||||
{
|
||||
await InvokeAsync(() =>
|
||||
{
|
||||
currPage = 1;
|
||||
StateHasChanged();
|
||||
});
|
||||
}
|
||||
|
||||
protected async Task selRecord(DossierModel selRec)
|
||||
{
|
||||
currRecord = selRec;
|
||||
await RecordSel.InvokeAsync(selRec);
|
||||
listaFlux = MDService.getFluxLog(selRec.Valore);
|
||||
await toggleTableFlux();
|
||||
}
|
||||
|
||||
protected async Task update(FluxLogDTO selRec)
|
||||
{
|
||||
var alert = await JSRuntime.InvokeAsync<bool>("confirm", "Confermi di voler salvare TUTTE le modifiche? queste saranno parte del dossier inviato all'impianto");
|
||||
|
||||
if (alert)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
if (currRecord != null)
|
||||
{
|
||||
// serializzo valore x flux log...
|
||||
DossierFluxLogDTO updatedResult = new DossierFluxLogDTO() { ODL = listaFlux };
|
||||
string newVal = JsonConvert.SerializeObject(updatedResult);
|
||||
currRecord.Valore = newVal;
|
||||
// METODO PER UPDATE FLUX
|
||||
await MDService.DossiersUpdateValore(currRecord);
|
||||
currFluxLogDto = null;
|
||||
isEditing = false;
|
||||
await Task.Delay(1);
|
||||
StateHasChanged();
|
||||
}
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
currFluxLogDto = null;
|
||||
await Task.Delay(1);
|
||||
// rimando a pagina corrente
|
||||
NavManager.NavigateTo(NavManager.Uri, true);
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task UpdateData()
|
||||
{
|
||||
currRecord = null;
|
||||
await reloadData(true);
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private int _totalCount = 0;
|
||||
|
||||
private FluxLogDTO? currFluxLogDto = null;
|
||||
|
||||
private DossierModel? currRecord = null;
|
||||
|
||||
private DossierModel? currRecordClone = null;
|
||||
|
||||
private List<AnagArticoli>? ListArticoli;
|
||||
private List<AnagGruppi>? ListGruppiFase;
|
||||
|
||||
private List<Macchine>? ListMacchine;
|
||||
private List<DossierModel>? ListRecords;
|
||||
|
||||
private List<ListValues>? ListStati;
|
||||
|
||||
private List<DossierModel>? SearchRecords;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private int currPage
|
||||
{
|
||||
get => SelFilter.CurrPage;
|
||||
set => SelFilter.CurrPage = value;
|
||||
}
|
||||
|
||||
private bool isEditing
|
||||
{
|
||||
get => SelFilter.isEditing;
|
||||
set => SelFilter.isEditing = value;
|
||||
}
|
||||
|
||||
private bool isLoading { get; set; } = false;
|
||||
|
||||
private SelectDossierParams lastFilter { get; set; } = new SelectDossierParams() { CurrPage = -1 };
|
||||
|
||||
private List<FluxLogDTO>? listaFlux { get; set; } = null;
|
||||
|
||||
private int MaxRecord
|
||||
{
|
||||
get => SelFilter.MaxRecord;
|
||||
}
|
||||
|
||||
[Inject]
|
||||
private NavigationManager NavManager { get; set; } = null!;
|
||||
|
||||
private int numRecord
|
||||
{
|
||||
get => SelFilter.NumRec;
|
||||
set => SelFilter.NumRec = value;
|
||||
}
|
||||
|
||||
private string SelArticolo
|
||||
{
|
||||
get => SelFilter.CodArticolo;
|
||||
}
|
||||
|
||||
private DateTime SelDtEnd
|
||||
{
|
||||
get => SelFilter.DtEnd;
|
||||
}
|
||||
|
||||
private DateTime SelDtStart
|
||||
{
|
||||
get => SelFilter.DtStart;
|
||||
}
|
||||
|
||||
private string SelMacchina
|
||||
{
|
||||
get => SelFilter.IdxMacchina;
|
||||
}
|
||||
|
||||
private int totalCount
|
||||
{
|
||||
get => _totalCount;
|
||||
set
|
||||
{
|
||||
if (_totalCount != value)
|
||||
{
|
||||
_totalCount = value;
|
||||
TotRecordChanged.InvokeAsync(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool visualizzaFlux { get; set; } = true;
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task closeTableFlux()
|
||||
{
|
||||
currFluxLogDto = null;
|
||||
currRecord = null;
|
||||
currRecordClone = null;
|
||||
visualizzaFlux = true;
|
||||
isEditing = false;
|
||||
await RecordSelFlux.InvokeAsync(currFluxLogDto);
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
private string css()
|
||||
{
|
||||
string answ = "";
|
||||
if (isEditing)
|
||||
{
|
||||
answ = "visible";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "hidden";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
private void enableEditing()
|
||||
{
|
||||
isEditing = true;
|
||||
}
|
||||
|
||||
private async Task reloadData(bool setChanged)
|
||||
{
|
||||
isLoading = true;
|
||||
SearchRecords = await MDService.DossiersGetLastFilt(SelMacchina, SelArticolo, SelDtStart, SelDtEnd);
|
||||
totalCount = SearchRecords.Count;
|
||||
ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
|
||||
await Task.Delay(1);
|
||||
if (setChanged)
|
||||
{
|
||||
await InvokeAsync(() => StateHasChanged());
|
||||
}
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
private async Task toggleTableFlux()
|
||||
{
|
||||
visualizzaFlux = false;
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
private string tradFase(string codFase)
|
||||
{
|
||||
string answ = codFase;
|
||||
if (ListStati != null && ListStati.Count > 0)
|
||||
{
|
||||
var recSel = ListStati.FirstOrDefault(x => x.value == codFase);
|
||||
if (recSel != null)
|
||||
{
|
||||
answ = recSel.label;
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
private string traduci(string lemma)
|
||||
{
|
||||
var answ = MDService.Traduci(lemma, "IT");
|
||||
return answ;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -9,9 +9,8 @@ elenco di buttons che servono a confermare operazione:
|
||||
</ul>*@
|
||||
|
||||
<div class="btn-group" role="group" aria-label="Basic example">
|
||||
<button type="button" class="btn btn-primary">Left</button>
|
||||
<button type="button" class="btn btn-primary">Middle</button>
|
||||
<button type="button" class="btn btn-primary">Right</button>
|
||||
<button type="button" class="btn btn-success">Conferma</button>
|
||||
<button type="button" class="btn btn-danger">Annulla</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -23,14 +23,19 @@
|
||||
<ul class="p-0">
|
||||
<li class="list-group-item">Lotto: @udc.lottoNav.Lotto</li>
|
||||
<li class="list-group-item">Articolo: @udc.lottoNav.CodArt</li>
|
||||
<li class="list-group-item">Quantità: @Math.Round(udc.Qta, 0) pz.</li>
|
||||
<li class="list-group-item">
|
||||
Quantità:
|
||||
<div class="input-group input-group-sm">
|
||||
<input class="form-control" value="@Math.Round(udc.Qta, 0)" />
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="col-12 d-flex flex-row-reverse">
|
||||
<ProcOperat></ProcOperat>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<ProcOperat></ProcOperat>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+160
-37
@@ -312,6 +312,27 @@ namespace MP.INVE.Data
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce valore della stringa (SE disponibile)
|
||||
/// </summary>
|
||||
/// <param name="keyName"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> tryGetConfig(string keyName)
|
||||
{
|
||||
string answ = "";
|
||||
// preselezione valori
|
||||
var configData = await ConfigGetAll();
|
||||
var currRec = configData.FirstOrDefault(x => x.Chiave == keyName);
|
||||
if (currRec != null)
|
||||
{
|
||||
answ = currRec.Valore;
|
||||
}
|
||||
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Reset dati cache config
|
||||
/// </summary>
|
||||
@@ -478,13 +499,42 @@ namespace MP.INVE.Data
|
||||
/// <returns></returns>
|
||||
public Task<List<AnagGruppi>> ElencoGruppiFase()
|
||||
{
|
||||
return Task.FromResult(dbController.AnagGruppiFase());
|
||||
#if false
|
||||
return Task.FromResult(dbController.AnagGruppiFase());
|
||||
#endif
|
||||
List<AnagGruppi> result = new List<AnagGruppi>();
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
string readType = "DB";
|
||||
string currKey = $"{redisAnagGruppi}";
|
||||
// cerco in redis dato valore sel macchina...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
result = JsonConvert.DeserializeObject<List<AnagGruppi>>($"{rawData}");
|
||||
readType = "REDIS";
|
||||
}
|
||||
else
|
||||
{
|
||||
result = dbController.AnagGruppiFase();
|
||||
// serializzo e salvo...
|
||||
rawData = JsonConvert.SerializeObject(result);
|
||||
redisDb.StringSet(currKey, rawData, getRandTOut(redisLongTimeCache / 5));
|
||||
}
|
||||
if (result == null)
|
||||
{
|
||||
result = new List<AnagGruppi>();
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Debug($"ElencoGruppiFase | Read from {readType}: {ts.TotalMilliseconds}ms");
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
|
||||
//public Task<List<LinkMenu>> ElencoLink()
|
||||
//{
|
||||
// return Task.FromResult(dbController.ElencoLink());
|
||||
//}
|
||||
public Task<List<LinkMenu>> ElencoLink()
|
||||
{
|
||||
return Task.FromResult(dbController.ElencoLink());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiunta record EventList
|
||||
@@ -506,6 +556,7 @@ namespace MP.INVE.Data
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Elenco ultimi n record flux log dato macchina e flusso (ordinato x data registrazione)
|
||||
/// </summary>
|
||||
@@ -515,7 +566,7 @@ namespace MP.INVE.Data
|
||||
/// <param name="CodFlux">*=tutti, altrimenti solo selezionato</param>
|
||||
/// <param name="MaxRec">numero massimo record da restituire</param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<FluxLog>> FluxLogGetLastFilt(DateTime DtMax, DateTime DtMin, string IdxMacchina, string CodFlux, int MaxRec)
|
||||
public async Task<List<FluxLog>> FluxLogGetLastFilt(DateTime DtMax, DateTime DtMin, string IdxMacchina, string CodFlux, int MaxRec, int redisCacheSec)
|
||||
{
|
||||
List<FluxLog>? result = new List<FluxLog>();
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
@@ -534,7 +585,7 @@ namespace MP.INVE.Data
|
||||
result = await Task.FromResult(dbController.FluxLogGetLastFilt(DtMax, DtMin, IdxMacchina, CodFlux, MaxRec));
|
||||
// serializzo e salvo...
|
||||
rawData = JsonConvert.SerializeObject(result);
|
||||
redisDb.StringSet(currKey, rawData, TimeSpan.FromSeconds(10));
|
||||
redisDb.StringSet(currKey, rawData, TimeSpan.FromSeconds(redisCacheSec / 2));
|
||||
}
|
||||
if (result == null)
|
||||
{
|
||||
@@ -600,11 +651,43 @@ namespace MP.INVE.Data
|
||||
/// <param name="inCorso">Stato ODL: true=in corso/completato</param>
|
||||
/// <param name="codArt">Cod articolo</param>
|
||||
/// <param name="keyRichPart">KeyRich (parziale) da cercare (es cod stato x yacht)</param>
|
||||
/// <param name="IdxMacchina">id macchina da cercare</param>
|
||||
/// <param name="Reparto">Reparto selezionato</param>
|
||||
/// <param name="IdxMacchina">Macchina selezionata</param>
|
||||
/// <param name="startDate">Data inizio</param>
|
||||
/// <param name="endDate">Data fine</param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<ODLModel>> ListODLFilt(bool inCorso, string codArt, string keyRichPart, string IdxMacchina, DateTime startDate, DateTime endDate)
|
||||
public async Task<List<ODLExpModel>> ListODLFilt(bool inCorso, string codArt, string keyRichPart, string Reparto, string IdxMacchina, DateTime startDate, DateTime endDate)
|
||||
{
|
||||
return await Task.FromResult(dbController.ListODLFilt(inCorso, codArt, keyRichPart, IdxMacchina, startDate, endDate));
|
||||
List<ODLExpModel>? result = new List<ODLExpModel>();
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
string readType = "DB";
|
||||
string currKey = $"{redisOdlList}:{inCorso}:{codArt}:{keyRichPart}:{Reparto}:{IdxMacchina}:{startDate:yyyyMMdd_HHmmss}:{endDate:yyyyMMdd_HHmmss}";
|
||||
// cerco in redis dato valore sel macchina...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
result = JsonConvert.DeserializeObject<List<ODLExpModel>>($"{rawData}");
|
||||
readType = "REDIS";
|
||||
}
|
||||
else
|
||||
{
|
||||
result = await Task.FromResult(dbController.ListODLFilt(inCorso, codArt, keyRichPart, Reparto, IdxMacchina, startDate, endDate));
|
||||
// serializzo e salvo...
|
||||
rawData = JsonConvert.SerializeObject(result);
|
||||
redisDb.StringSet(currKey, rawData, TimeSpan.FromSeconds(redisShortTimeCache));
|
||||
}
|
||||
if (result == null)
|
||||
{
|
||||
result = new List<ODLExpModel>();
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Debug($"ListODLFilt | Read from {readType}: {ts.TotalMilliseconds}ms");
|
||||
return result;
|
||||
|
||||
|
||||
//return await Task.FromResult(dbController.ListODLFilt(inCorso, codArt, keyRichPart, Reparto, IdxMacchina, startDate, endDate));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -613,13 +696,51 @@ namespace MP.INVE.Data
|
||||
/// <param name="codArt">Cod articolo</param>
|
||||
/// <param name="keyRichPart">KeyRich (parziale) da cercare (es cod stato x yacht)</param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<PODLModel>> ListPODLFilt(string codArt, string keyRichPart)
|
||||
public async Task<List<PODLExpModel>> ListPODLFilt(bool lanciato, string keyRichPart, string idxMacchina, string codGruppo)
|
||||
{
|
||||
List<PODLExpModel>? result = new List<PODLExpModel>();
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
string readType = "DB";
|
||||
string currKey = $"{redisPOdlList}:{lanciato}:{keyRichPart}:{idxMacchina}:{codGruppo}";
|
||||
// cerco in redis dato valore sel macchina...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
result = JsonConvert.DeserializeObject<List<PODLExpModel>>($"{rawData}");
|
||||
readType = "REDIS";
|
||||
}
|
||||
else
|
||||
{
|
||||
result = await Task.FromResult(dbController.ListPODLFilt(lanciato, keyRichPart, idxMacchina, codGruppo));
|
||||
// serializzo e salvo...
|
||||
rawData = JsonConvert.SerializeObject(result);
|
||||
redisDb.StringSet(currKey, rawData, TimeSpan.FromSeconds(redisShortTimeCache));
|
||||
}
|
||||
if (result == null)
|
||||
{
|
||||
result = new List<PODLExpModel>();
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Debug($"ListPODLFilt | Read from {readType}: {ts.TotalMilliseconds}ms");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Elenco PODL avviati filtrati x articolo, KeyRich (che contiene stato)
|
||||
/// </summary>
|
||||
/// <param name="codArt">Cod articolo</param>
|
||||
/// <param name="keyRichPart">KeyRich (parziale) da cercare (es cod stato x yacht)</param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<PODLModel>> ListPODLFiltNOOdl(string codArt, string keyRichPart)
|
||||
{
|
||||
List<PODLModel>? result = new List<PODLModel>();
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
string readType = "DB";
|
||||
string currKey = $"{redisPOdlList}:{codArt}:{keyRichPart}";
|
||||
string currKey = $"{redisPOdlListNOOdl}:{codArt}:{keyRichPart}";
|
||||
// cerco in redis dato valore sel macchina...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
@@ -629,7 +750,7 @@ namespace MP.INVE.Data
|
||||
}
|
||||
else
|
||||
{
|
||||
result = await Task.FromResult(dbController.ListPODLFilt(codArt, keyRichPart));
|
||||
result = await Task.FromResult(dbController.ListPODLFiltNOOdl(codArt, keyRichPart));
|
||||
// serializzo e salvo...
|
||||
rawData = JsonConvert.SerializeObject(result);
|
||||
redisDb.StringSet(currKey, rawData, TimeSpan.FromSeconds(3));
|
||||
@@ -640,7 +761,7 @@ namespace MP.INVE.Data
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Debug($"ListPODLFilt | Read from {readType}: {ts.TotalMilliseconds}ms");
|
||||
Log.Debug($"ListPODLFiltNOOdl | Read from {readType}: {ts.TotalMilliseconds}ms");
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -872,7 +993,7 @@ namespace MP.INVE.Data
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Debug($"PODL_getByKey | Read from {readType}: {ts.TotalMilliseconds}ms");
|
||||
Log.Trace($"PODL_getByKey | Read from {readType}: {ts.TotalMilliseconds}ms");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -915,7 +1036,7 @@ namespace MP.INVE.Data
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Debug($"PODL_getByOdl | Read from {readType}: {ts.TotalMilliseconds}ms");
|
||||
Log.Trace($"PODL_getByOdl | Read from {readType}: {ts.TotalMilliseconds}ms");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -929,7 +1050,7 @@ namespace MP.INVE.Data
|
||||
/// </summary>
|
||||
/// <param name="currRec"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> PODLDeleteRecord(PODLModel currRec)
|
||||
public async Task<bool> PODLDeleteRecord(PODLExpModel currRec)
|
||||
{
|
||||
return await dbController.PODLDeleteRecord(currRec);
|
||||
}
|
||||
@@ -939,7 +1060,7 @@ namespace MP.INVE.Data
|
||||
/// </summary>
|
||||
/// <param name="currRec"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> POdlDoSetup(PODLModel currRec)
|
||||
public async Task<bool> POdlDoSetup(PODLExpModel currRec)
|
||||
{
|
||||
return await dbController.PODL_startSetup(currRec, 0, 1, 1, "");
|
||||
}
|
||||
@@ -949,7 +1070,7 @@ namespace MP.INVE.Data
|
||||
/// </summary>
|
||||
/// <param name="currRec"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> POdlUpdateRecord(PODLModel currRec)
|
||||
public async Task<bool> POdlUpdateRecord(PODLExpModel currRec)
|
||||
{
|
||||
var dbResult = await dbController.PODLUpdateRecord(currRec);
|
||||
// elimino cache redis...
|
||||
@@ -1090,37 +1211,38 @@ namespace MP.INVE.Data
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private const string redisArtByDossier = redisBaseAddr + ":Cache:ArtByDossier";
|
||||
private const string redisAnagGruppi = redisBaseAddr + "SPEC:Cache:AnagGruppi";
|
||||
|
||||
private const string redisArtList = redisBaseAddr + ":Cache:ArtList";
|
||||
private const string redisArtByDossier = redisBaseAddr + "SPEC:Cache:ArtByDossier";
|
||||
|
||||
private const string redisBaseAddr = "MP:SPEC";
|
||||
private const string redisArtList = redisBaseAddr + "SPEC:Cache:ArtList";
|
||||
|
||||
private const string redisConfKey = redisBaseAddr + ":Cache:Config";
|
||||
private const string redisBaseAddr = "MP:";
|
||||
|
||||
private const string redisDossByMac = redisBaseAddr + ":Cache:DossByMac";
|
||||
private const string redisConfKey = redisBaseAddr + "SPEC:Cache:Config";
|
||||
|
||||
private const string redisFluxByMac = redisBaseAddr + ":Cache:FluxByMac";
|
||||
private const string redisDossByMac = redisBaseAddr + "SPEC:Cache:DossByMac";
|
||||
|
||||
private const string redisFluxLogFilt = redisBaseAddr + ":Cache:FluxLogFilt";
|
||||
private const string redisFluxByMac = redisBaseAddr + "SPEC:Cache:FluxByMac";
|
||||
|
||||
private const string redisMacByFlux = redisBaseAddr + ":Cache:MacByFlux";
|
||||
private const string redisFluxLogFilt = redisBaseAddr + "SPEC:Cache:FluxLogFilt";
|
||||
|
||||
private const string redisMacList = redisBaseAddr + ":Cache:MacList";
|
||||
private const string redisMacByFlux = redisBaseAddr + "SPEC:Cache:MacByFlux";
|
||||
|
||||
private const string redisOdlCurrByMac = redisBaseAddr + ":Cache:OdlByMac";
|
||||
private const string redisMacList = redisBaseAddr + "SPEC:Cache:MacList";
|
||||
|
||||
private const string redisPOdlList = redisBaseAddr + ":Cache:POdlList";
|
||||
private const string redisOdlCurrByMac = redisBaseAddr + "SPEC:Cache:OdlByMac";
|
||||
private const string redisOdlList = redisBaseAddr + "SPEC:Cache:OdlList";
|
||||
|
||||
private const string redisPOdlByPOdl = redisBaseAddr + ":Cache:POdlByPOdl";
|
||||
private const string redisPOdlByOdl = redisBaseAddr + "SPEC:Cache:POdlByOdl";
|
||||
private const string redisPOdlByPOdl = redisBaseAddr + "SPEC:Cache:POdlByPOdl";
|
||||
private const string redisPOdlList = redisBaseAddr + "SPEC:Cache:POdlList";
|
||||
private const string redisPOdlListNOOdl = redisBaseAddr + "SPEC:Cache:POdlListNOOdl";
|
||||
private const string redisStatoCom = redisBaseAddr + "SPEC:Cache:StatoCom";
|
||||
|
||||
private const string redisPOdlByOdl = redisBaseAddr + ":Cache:POdlByOdl";
|
||||
private const string redisTipoArt = redisBaseAddr + "SPEC:Cache:TipoArt";
|
||||
|
||||
private const string redisStatoCom = redisBaseAddr + ":Cache:StatoCom";
|
||||
|
||||
private const string redisTipoArt = redisBaseAddr + ":Cache:TipoArt";
|
||||
|
||||
private const string redisVocabolario = redisBaseAddr + ":Cache:Vocabolario";
|
||||
private const string redisVocabolario = redisBaseAddr + "SPEC:Cache:Vocabolario";
|
||||
|
||||
private static IConfiguration _configuration = null!;
|
||||
|
||||
@@ -1149,6 +1271,7 @@ namespace MP.INVE.Data
|
||||
private IDatabase redisDb = null!;
|
||||
|
||||
private int redisLongTimeCache = 5;
|
||||
private int redisShortTimeCache = 4;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.INVE</RootNamespace>
|
||||
<Version>6.16.2211.2409</Version>
|
||||
<Version>6.16.2211.2513</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
@page "/DOSS"
|
||||
|
||||
<div class="card mb-5">
|
||||
<div class="card-header table-primary">
|
||||
<div class="d-flex">
|
||||
<div class="px-0 py-1">
|
||||
<h3><b>DOSSIERS</b></h3>
|
||||
</div>
|
||||
<div class="px-2 flex-fill">
|
||||
@if (isFiltering)
|
||||
{
|
||||
<LoadingDataSmall></LoadingDataSmall>
|
||||
<i>filtro x macchina / periodo</i>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
<DossiersFilter FilterChanged="updateFilter"></DossiersFilter>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if (isLoading)
|
||||
{
|
||||
<LoadingData></LoadingData>
|
||||
}
|
||||
else
|
||||
{
|
||||
<ListDossiers SelFilter="@currFilter" RecordSel="@selRecordDoss" TotRecordChanged="updateTotal"></ListDossiers>
|
||||
}
|
||||
</div>
|
||||
<div class="card-footer py-1">
|
||||
<DataPager @ref="pagerODL" PageSize="numRecord" currPage="currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" totalCount="totalCount" showLoading="isLoading" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,142 +0,0 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.INVE.Components;
|
||||
using MP.INVE.Data;
|
||||
|
||||
namespace MP.INVE.Pages
|
||||
{
|
||||
public partial class DOSS
|
||||
{
|
||||
#region Protected Fields
|
||||
|
||||
protected DataPager? pagerODL = null!;
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
[Inject]
|
||||
protected IJSRuntime JSRuntime { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected MpDataService MDService { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void ForceReload(int newNum)
|
||||
{
|
||||
numRecord = newNum;
|
||||
}
|
||||
|
||||
protected void ForceReloadPage(int newNum)
|
||||
{
|
||||
currPage = newNum;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
isLoading = true;
|
||||
isFiltering = true;
|
||||
// fix pagina
|
||||
await Task.Delay(1);
|
||||
var modFilter = currFilter;
|
||||
modFilter.CurrPage = 1;
|
||||
currFilter = modFilter;
|
||||
await Task.Delay(1);
|
||||
isFiltering = false;
|
||||
}
|
||||
|
||||
protected async Task selRecordDoss(DossierModel selDoss)
|
||||
{
|
||||
currRecordDoss = selDoss;
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
protected void updateTotal(int newTotCount)
|
||||
{
|
||||
totalCount = newTotCount;
|
||||
}
|
||||
|
||||
protected void UpdateTotCount(int newTotCount)
|
||||
{
|
||||
totalCount = newTotCount;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private SelectDossierParams currFilter { get; set; } = new SelectDossierParams();
|
||||
|
||||
private int currPage
|
||||
{
|
||||
get => currFilter.CurrPage;
|
||||
set => currFilter.CurrPage = value;
|
||||
}
|
||||
|
||||
private DossierModel? currRecordDoss { get; set; } = null;
|
||||
|
||||
private bool isEditing
|
||||
{
|
||||
get => currFilter.isEditing;
|
||||
set => currFilter.isEditing = value;
|
||||
}
|
||||
|
||||
private bool isFiltering { get; set; } = false;
|
||||
|
||||
private bool isLoading { get; set; } = true;
|
||||
|
||||
private int numRecord
|
||||
{
|
||||
get => currFilter.NumRec;
|
||||
set => currFilter.NumRec = value;
|
||||
}
|
||||
|
||||
private int totalCount
|
||||
{
|
||||
get => currFilter.TotCount;
|
||||
set => currFilter.TotCount = value;
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private string css()
|
||||
{
|
||||
string answ = "";
|
||||
if (isEditing == false)
|
||||
{
|
||||
answ = "hidden";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "visible";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
private void enableEditing()
|
||||
{
|
||||
isEditing = true;
|
||||
}
|
||||
|
||||
private async Task updateFilter(SelectDossierParams newParams)
|
||||
{
|
||||
isFiltering = false;
|
||||
isLoading = true;
|
||||
await Task.Delay(1);
|
||||
currPage = 1;
|
||||
await Task.Delay(1);
|
||||
await InvokeAsync(() => StateHasChanged());
|
||||
currFilter = newParams;
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOINVE </i>
|
||||
<h4>Versione: 6.16.2211.2409</h4>
|
||||
<h4>Versione: 6.16.2211.2513</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2211.2409
|
||||
6.16.2211.2513
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2211.2409</version>
|
||||
<version>6.16.2211.2513</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace MP.SPEC.Components
|
||||
#region Public Properties
|
||||
|
||||
[Parameter]
|
||||
public SelectOdlParams currFilter { get; set; } = null!;
|
||||
public SelectXdlParams currFilter { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public string padCodXdl { get; set; } = "0000";
|
||||
@@ -409,7 +409,7 @@ namespace MP.SPEC.Components
|
||||
private async Task reloadData()
|
||||
{
|
||||
isLoading = true;
|
||||
SearchRecords = await MDService.ListODLFilt(currFilter.IsActive, currFilter.SearchVal, currFilter.CodStato, currFilter.CodReparto, currFilter.IdxMacchina, currFilter.DtStart, currFilter.DtEnd);
|
||||
SearchRecords = await MDService.ListODLFilt(currFilter.IsActive, currFilter.SearchVal, currFilter.CodFase, currFilter.CodReparto, currFilter.IdxMacchina, currFilter.DtStart, currFilter.DtEnd);
|
||||
totalCount = SearchRecords.Count;
|
||||
ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
|
||||
await Task.Delay(1);
|
||||
|
||||
@@ -4,7 +4,6 @@ using MP.Data.DatabaseModels;
|
||||
using MP.SPEC.Data;
|
||||
using MP.SPEC.Services;
|
||||
using NLog;
|
||||
using StackExchange.Redis;
|
||||
|
||||
namespace MP.SPEC.Components
|
||||
{
|
||||
@@ -13,7 +12,7 @@ namespace MP.SPEC.Components
|
||||
#region Public Properties
|
||||
|
||||
[Parameter]
|
||||
public SelectPOdlParams actFilter { get; set; } = new SelectPOdlParams();
|
||||
public SelectXdlParams actFilter { get; set; } = new SelectXdlParams();
|
||||
|
||||
[Parameter]
|
||||
public string padCodXdl { get; set; } = "0000";
|
||||
@@ -68,6 +67,9 @@ namespace MP.SPEC.Components
|
||||
[Inject]
|
||||
protected IOApiService MpIoApiCall { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager NavManager { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
@@ -208,10 +210,6 @@ namespace MP.SPEC.Components
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager NavManager { get; set; } = null!;
|
||||
|
||||
protected async Task UpdateData()
|
||||
{
|
||||
currRecord = null;
|
||||
@@ -253,18 +251,12 @@ namespace MP.SPEC.Components
|
||||
|
||||
private bool hasOdl
|
||||
{
|
||||
get => actFilter.hasOdl;
|
||||
set => actFilter.hasOdl = value;
|
||||
get => actFilter.HasOdl;
|
||||
set => actFilter.HasOdl = value;
|
||||
}
|
||||
|
||||
private bool isLoading { get; set; } = false;
|
||||
private SelectPOdlParams lastFilter { get; set; } = new SelectPOdlParams() { CurrPage = -1 };
|
||||
|
||||
private int numRecord
|
||||
{
|
||||
get => actFilter.NumRec;
|
||||
set => actFilter.NumRec = value;
|
||||
}
|
||||
private SelectXdlParams lastFilter { get; set; } = new SelectXdlParams() { CurrPage = -1 };
|
||||
|
||||
private string macchina
|
||||
{
|
||||
@@ -272,22 +264,28 @@ namespace MP.SPEC.Components
|
||||
set => actFilter.IdxMacchina = value;
|
||||
}
|
||||
|
||||
private int numRecord
|
||||
{
|
||||
get => actFilter.NumRec;
|
||||
set => actFilter.NumRec = value;
|
||||
}
|
||||
|
||||
private string reparto
|
||||
{
|
||||
get => actFilter.CodReparto;
|
||||
set => actFilter.CodReparto = value;
|
||||
}
|
||||
private string StatoSel
|
||||
{
|
||||
get => actFilter.CodFase;
|
||||
set => actFilter.CodFase = value;
|
||||
}
|
||||
|
||||
private string SearchVal
|
||||
{
|
||||
get => string.IsNullOrEmpty(actFilter.SearchVal) ? "*" : actFilter.SearchVal;
|
||||
}
|
||||
|
||||
private string StatoSel
|
||||
{
|
||||
get => actFilter.CodFase;
|
||||
set => actFilter.CodFase = value;
|
||||
}
|
||||
|
||||
private int totalCount
|
||||
{
|
||||
@@ -415,15 +413,6 @@ namespace MP.SPEC.Components
|
||||
{
|
||||
ListRecords = null;
|
||||
isLoading = true;
|
||||
#if false
|
||||
if (hasOdl)
|
||||
{
|
||||
SearchRecords = await MDService.ListPODLFiltNOOdl(SearchVal, StatoSel);
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
#endif
|
||||
SearchRecords = await MDService.ListPODLFilt(hasOdl, StatoSel, macchina, reparto);
|
||||
totalCount = SearchRecords.Count;
|
||||
ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Blazored.LocalStorage;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.SPEC.Data;
|
||||
@@ -27,6 +28,21 @@ namespace MP.SPEC.Components
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
[Inject]
|
||||
protected ILocalStorageService localStorage { get; set; } = null!;
|
||||
protected async Task getReparto()
|
||||
{
|
||||
string keyStor = "reparto";
|
||||
string localReparto = await localStorage.GetItemAsync<string>(keyStor);
|
||||
if (!string.IsNullOrEmpty(localReparto))
|
||||
{
|
||||
selReparto = localReparto;
|
||||
}
|
||||
else
|
||||
{
|
||||
await localStorage.SetItemAsync(keyStor, selReparto);
|
||||
}
|
||||
}
|
||||
protected bool hasOdl
|
||||
{
|
||||
get => currFilter.hasOdl;
|
||||
@@ -78,7 +94,12 @@ namespace MP.SPEC.Components
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
//selReparto = localStorage.GetItemAsync<string>("reparto").ToString();
|
||||
await getReparto();
|
||||
}
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
{
|
||||
foreach (var item in ListMacchine)
|
||||
{
|
||||
<option value="@item">@item</option>
|
||||
<option value="@item.CodMacchina">@item.Descrizione</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
@@ -67,7 +67,7 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@if (!isActive)
|
||||
@if (!isActive || hasOdl)
|
||||
{
|
||||
<div class="small mt-2">
|
||||
<label class="px-2" for="dtMin" title="Selezionare inizio periodo">Inizio Periodo</label>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Blazored.LocalStorage;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.SPEC.Data;
|
||||
@@ -9,16 +10,16 @@ namespace MP.SPEC.Components
|
||||
#region Public Properties
|
||||
|
||||
[Parameter]
|
||||
public SelectOdlParams currFilter { get; set; } = new SelectOdlParams();
|
||||
public SelectXdlParams currFilter { get; set; } = new SelectXdlParams();
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<SelectOdlParams> FilterChanged { get; set; }
|
||||
public EventCallback<SelectXdlParams> FilterChanged { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public List<AnagGruppi>? ListGruppiFase { get; set; } = null;
|
||||
|
||||
[Parameter]
|
||||
public List<string>? ListMacchine { get; set; } = null;
|
||||
public List<Macchine>? ListMacchine { get; set; } = null;
|
||||
|
||||
[Parameter]
|
||||
public List<ListValues>? ListStati { get; set; } = null;
|
||||
@@ -27,11 +28,19 @@ namespace MP.SPEC.Components
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected bool hasOdl
|
||||
{
|
||||
get => currFilter.HasOdl;
|
||||
}
|
||||
|
||||
protected bool isActive
|
||||
{
|
||||
get => currFilter.IsActive;
|
||||
}
|
||||
|
||||
[Inject]
|
||||
protected ILocalStorageService localStorage { get; set; } = null!;
|
||||
|
||||
protected DateTime selDtEnd
|
||||
{
|
||||
get => currFilter.DtEnd;
|
||||
@@ -62,6 +71,29 @@ namespace MP.SPEC.Components
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected async Task getReparto()
|
||||
{
|
||||
string keyStor = "reparto";
|
||||
string localReparto = await localStorage.GetItemAsync<string>(keyStor);
|
||||
if (!string.IsNullOrEmpty(localReparto))
|
||||
{
|
||||
selReparto = localReparto;
|
||||
}
|
||||
else
|
||||
{
|
||||
await localStorage.SetItemAsync(keyStor, selReparto);
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await getReparto();
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private string selMacchina
|
||||
@@ -94,12 +126,12 @@ namespace MP.SPEC.Components
|
||||
|
||||
private string selStato
|
||||
{
|
||||
get => currFilter.CodStato;
|
||||
get => currFilter.CodFase;
|
||||
set
|
||||
{
|
||||
if (currFilter.CodStato != value)
|
||||
if (currFilter.CodFase != value)
|
||||
{
|
||||
currFilter.CodStato = value;
|
||||
currFilter.CodFase = value;
|
||||
Task.Delay(1);
|
||||
reportChange();
|
||||
}
|
||||
|
||||
@@ -511,7 +511,11 @@ namespace MP.SPEC.Data
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
result = JsonConvert.DeserializeObject<List<AnagGruppi>>($"{rawData}");
|
||||
var rawResult = JsonConvert.DeserializeObject<List<AnagGruppi>>($"{rawData}");
|
||||
if (rawResult != null)
|
||||
{
|
||||
result = rawResult;
|
||||
}
|
||||
readType = "REDIS";
|
||||
}
|
||||
else
|
||||
@@ -693,8 +697,10 @@ namespace MP.SPEC.Data
|
||||
/// <summary>
|
||||
/// Elenco PODL non avviati filtrati x articolo, KeyRich (che contiene stato)
|
||||
/// </summary>
|
||||
/// <param name="codArt">Cod articolo</param>
|
||||
/// <param name="lanciato">Solo lanciati (1) o ancora disponibili (0)</param>
|
||||
/// <param name="keyRichPart">KeyRich (parziale) da cercare (es cod stato x yacht)</param>
|
||||
/// <param name="idxMacchina">Macchina</param>
|
||||
/// <param name="codGruppo">Gruppo</param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<PODLExpModel>> ListPODLFilt(bool lanciato, string keyRichPart, string idxMacchina, string codGruppo)
|
||||
{
|
||||
@@ -1020,7 +1026,11 @@ namespace MP.SPEC.Data
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
result = JsonConvert.DeserializeObject<PODLModel>($"{rawData}");
|
||||
var rawResult = JsonConvert.DeserializeObject<PODLModel>($"{rawData}");
|
||||
if (rawResult != null)
|
||||
{
|
||||
result = rawResult;
|
||||
}
|
||||
readType = "REDIS";
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using MP.Data.DatabaseModels;
|
||||
|
||||
namespace MP.SPEC.Data
|
||||
namespace MP.SPEC.Data
|
||||
{
|
||||
public class SelectPOdlParams
|
||||
{
|
||||
@@ -15,9 +13,9 @@ namespace MP.SPEC.Data
|
||||
|
||||
public string CodFase { get; set; } = "*";
|
||||
|
||||
public int CurrPage { get; set; } = 1;
|
||||
public string CodReparto { get; set; } = "*";
|
||||
|
||||
public int CurrPage { get; set; } = 1;
|
||||
public bool hasOdl { get; set; } = false;
|
||||
public string IdxMacchina { get; set; } = "*";
|
||||
|
||||
public int MaxRecord { get; set; } = 100;
|
||||
@@ -27,7 +25,6 @@ namespace MP.SPEC.Data
|
||||
public string SearchVal { get; set; } = "*";
|
||||
|
||||
public int TotCount { get; set; } = 0;
|
||||
public bool hasOdl { get; set; } = false;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
using MP.Data;
|
||||
|
||||
namespace MP.SPEC.Data
|
||||
{
|
||||
public class SelectXdlParams
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public SelectXdlParams()
|
||||
{ }
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public string CodFase { get; set; } = "*";
|
||||
public string CodReparto { get; set; } = "*";
|
||||
public int CurrPage { get; set; } = 1;
|
||||
public DateTime DtEnd { get; set; } = Utils.InitDatetime(DateTime.Now, 5);
|
||||
public DateTime DtStart { get; set; } = Utils.InitDatetime(DateTime.Now, 5).AddDays(-10);
|
||||
public bool HasOdl { get; set; } = false;
|
||||
public string IdxMacchina { get; set; } = "*";
|
||||
public bool IsActive { get; set; } = true;
|
||||
public int MaxRecord { get; set; } = 100;
|
||||
public int NumRec { get; set; } = 10;
|
||||
public string SearchVal { get; set; } = "*";
|
||||
public int TotCount { get; set; } = 0;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public SelectXdlParams clone()
|
||||
{
|
||||
SelectXdlParams clonedData = new SelectXdlParams()
|
||||
{
|
||||
CodFase = this.CodFase,
|
||||
CodReparto = this.CodReparto,
|
||||
CurrPage = this.CurrPage,
|
||||
DtEnd = this.DtEnd,
|
||||
DtStart = this.DtStart,
|
||||
HasOdl = this.HasOdl,
|
||||
IdxMacchina = this.IdxMacchina,
|
||||
IsActive = this.IsActive,
|
||||
MaxRecord = this.MaxRecord,
|
||||
NumRec = this.NumRec,
|
||||
SearchVal = this.SearchVal,
|
||||
TotCount = this.TotCount
|
||||
};
|
||||
return clonedData;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (!(obj is SelectXdlParams item))
|
||||
return false;
|
||||
|
||||
if (CodFase != item.CodFase)
|
||||
return false;
|
||||
|
||||
if (CodReparto != item.CodReparto)
|
||||
return false;
|
||||
|
||||
if (CurrPage != item.CurrPage)
|
||||
return false;
|
||||
|
||||
if (DtEnd != item.DtEnd)
|
||||
return false;
|
||||
|
||||
if (DtStart != item.DtStart)
|
||||
return false;
|
||||
|
||||
if (HasOdl != item.HasOdl)
|
||||
return false;
|
||||
|
||||
if (IdxMacchina != item.IdxMacchina)
|
||||
return false;
|
||||
|
||||
if (IsActive != item.IsActive)
|
||||
return false;
|
||||
|
||||
if (MaxRecord != item.MaxRecord)
|
||||
return false;
|
||||
|
||||
if (NumRec != item.NumRec)
|
||||
return false;
|
||||
|
||||
if (SearchVal != item.SearchVal)
|
||||
return false;
|
||||
|
||||
if (TotCount != item.TotCount)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.SPEC</RootNamespace>
|
||||
<Version>6.16.2211.2508</Version>
|
||||
<Version>6.16.2211.2519</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -27,6 +27,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Blazored.LocalStorage" Version="4.2.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.Negotiate" Version="6.0.9" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Blazored.LocalStorage;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
using MP.Data.DatabaseModels;
|
||||
@@ -42,6 +43,9 @@ namespace MP.SPEC.Pages
|
||||
[Inject]
|
||||
protected IJSRuntime JSRuntime { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected ILocalStorageService localStorage { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected MpDataService MDService { get; set; } = null!;
|
||||
|
||||
@@ -83,15 +87,31 @@ namespace MP.SPEC.Pages
|
||||
currPage = newNum;
|
||||
}
|
||||
|
||||
protected async Task getReparto()
|
||||
{
|
||||
string keyStor = "reparto";
|
||||
string localReparto = await localStorage.GetItemAsync<string>(keyStor);
|
||||
if (!string.IsNullOrEmpty(localReparto))
|
||||
{
|
||||
selReparto = localReparto;
|
||||
}
|
||||
else
|
||||
{
|
||||
selReparto = "*";
|
||||
await localStorage.SetItemAsync(keyStor, selReparto);
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await getReparto();
|
||||
var allGruppiData = await MDService.ElencoGruppiFase();
|
||||
if (allGruppiData != null)
|
||||
{
|
||||
ListGruppiFase = allGruppiData.Where(x => x.SelEnabled).ToList();
|
||||
}
|
||||
ListStati = await MDService.AnagStatiComm();
|
||||
ListMacchine = await MDService.MacchineWithFlux(currFilter.DtStart, currFilter.DtEnd);
|
||||
ListMacchine = await MDService.MacchineGetAll();
|
||||
padCodXdl = await MDService.tryGetConfig("padCodXdl");
|
||||
}
|
||||
|
||||
@@ -133,15 +153,14 @@ namespace MP.SPEC.Pages
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private List<string>? ListMacchine;
|
||||
|
||||
private List<Macchine>? ListMacchine;
|
||||
private List<MP.Data.DatabaseModels.ListValues>? ListStati;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private SelectOdlParams currFilter { get; set; } = new SelectOdlParams();
|
||||
private SelectXdlParams currFilter { get; set; } = new SelectXdlParams();
|
||||
|
||||
private int currPage
|
||||
{
|
||||
@@ -162,6 +181,7 @@ namespace MP.SPEC.Pages
|
||||
}
|
||||
|
||||
private List<AnagGruppi>? ListGruppiFase { get; set; } = null;
|
||||
private string localReparto { get; set; } = "";
|
||||
|
||||
private int numRecord
|
||||
{
|
||||
@@ -182,10 +202,16 @@ namespace MP.SPEC.Pages
|
||||
set => currFilter.IdxMacchina = value;
|
||||
}
|
||||
|
||||
private string selReparto
|
||||
{
|
||||
get => currFilter.CodReparto;
|
||||
set => currFilter.CodReparto = value;
|
||||
}
|
||||
|
||||
private string selStato
|
||||
{
|
||||
get => currFilter.CodStato;
|
||||
set => currFilter.CodStato = value;
|
||||
get => currFilter.CodFase;
|
||||
set => currFilter.CodFase = value;
|
||||
}
|
||||
|
||||
private int totalCount
|
||||
@@ -198,11 +224,13 @@ namespace MP.SPEC.Pages
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task updateFilter(SelectOdlParams newParams)
|
||||
private async Task updateFilter(SelectXdlParams newParams)
|
||||
{
|
||||
isLoading = true;
|
||||
await Task.Delay(1);
|
||||
currPage = 1;
|
||||
// salvo comunque filtro reparto x utente
|
||||
await localStorage.SetItemAsync("reparto", selReparto);
|
||||
await Task.Delay(1);
|
||||
await InvokeAsync(() => StateHasChanged());
|
||||
currFilter = newParams;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<div class="px-2 col-5">
|
||||
<h3><b>P</b>romesse <b>ODL</b></h3>
|
||||
</div>
|
||||
<div class="col-2 align-content-center">
|
||||
<div class="col-4 align-content-center">
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-text">
|
||||
<span class="me-1" title="Elenco PODL disponibili da produrre">Da Produrre</span>
|
||||
@@ -53,12 +53,13 @@
|
||||
}
|
||||
}
|
||||
</select>*@
|
||||
@*<SelFilterPODL currFilter="@currFilter" ListMacchine="@ListMacchine" ListStati="@ListStati" ListGruppiFase="@ListGruppiFase" FilterChanged="updateFilter"></SelFilterPODL>*@
|
||||
<SelFilterXDL currFilter="@currFilter" ListMacchine="@ListMacchine" ListStati="@ListStati" ListGruppiFase="@ListGruppiFase" FilterChanged="updateFilter"></SelFilterXDL>
|
||||
<div class="p-2">
|
||||
<a class="pt-2 text-dark" data-bs-toggle="offcanvas" data-bs-target="#paramsFilterExample" aria-controls="paramsFilterExample">
|
||||
<i class="fa-solid fa-bars"></i>
|
||||
</a>
|
||||
</div>
|
||||
<SelFilterPODL currFilter="@currFilter" ListMacchine="@ListMacchine" ListStati="@ListStati" ListGruppiFase="@ListGruppiFase" FilterChanged="updateFilter"></SelFilterPODL>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
+67
-47
@@ -1,4 +1,5 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Blazored.LocalStorage;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.SPEC.Components;
|
||||
@@ -12,7 +13,7 @@ namespace MP.SPEC.Pages
|
||||
{
|
||||
#region Protected Fields
|
||||
|
||||
protected DataPager pagerODL = null!;
|
||||
protected DataPager? pagerODL = null!;
|
||||
|
||||
protected bool reqNew = false;
|
||||
|
||||
@@ -23,6 +24,9 @@ namespace MP.SPEC.Pages
|
||||
[Inject]
|
||||
protected IJSRuntime JSRuntime { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected ILocalStorageService localStorage { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected MpDataService MDService { get; set; } = null!;
|
||||
|
||||
@@ -66,8 +70,24 @@ namespace MP.SPEC.Pages
|
||||
currPage = newNum;
|
||||
}
|
||||
|
||||
protected async Task getReparto()
|
||||
{
|
||||
string keyStor = "reparto";
|
||||
string localReparto = await localStorage.GetItemAsync<string>(keyStor);
|
||||
if (!string.IsNullOrEmpty(localReparto))
|
||||
{
|
||||
selReparto = localReparto;
|
||||
}
|
||||
else
|
||||
{
|
||||
selReparto = "*";
|
||||
await localStorage.SetItemAsync(keyStor, selReparto);
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await getReparto();
|
||||
ListAziende = await MDService.ElencoAziende();
|
||||
var allGruppiData = await MDService.ElencoGruppiFase();
|
||||
if (allGruppiData != null)
|
||||
@@ -76,16 +96,7 @@ namespace MP.SPEC.Pages
|
||||
}
|
||||
ListMacchine = await MDService.MacchineGetAll();
|
||||
ListStati = await MDService.AnagStatiComm();
|
||||
SearchRecords = await MDService.ListPODLFilt(hasOdl, StatoSel, macchina, reparto);
|
||||
#if false
|
||||
// preselezione valori
|
||||
configData = await MDService.ConfigGetAll();
|
||||
var currRec = configData.FirstOrDefault(x => x.Chiave == "AZIENDA");
|
||||
if (currRec != null)
|
||||
{
|
||||
currAzienda = currRec.Valore;
|
||||
}
|
||||
#endif
|
||||
SearchRecords = await MDService.ListPODLFilt(hasOdl, StatoSel, macchina, selReparto);
|
||||
currAzienda = await MDService.tryGetConfig("AZIENDA");
|
||||
padCodXdl = await MDService.tryGetConfig("padCodXdl");
|
||||
// carico dati
|
||||
@@ -97,7 +108,10 @@ namespace MP.SPEC.Pages
|
||||
if (doReset)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
pagerODL.resetCurrPage();
|
||||
if (pagerODL != null)
|
||||
{
|
||||
pagerODL.resetCurrPage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,16 +176,6 @@ namespace MP.SPEC.Pages
|
||||
hasOdl = !hasOdl;
|
||||
await Task.Delay(1);
|
||||
}
|
||||
private async Task updateFilter(SelectPOdlParams newParams)
|
||||
{
|
||||
isLoading = true;
|
||||
await Task.Delay(1);
|
||||
currPage = 1;
|
||||
await Task.Delay(1);
|
||||
await InvokeAsync(() => StateHasChanged());
|
||||
currFilter = newParams;
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
protected async Task update(PODLExpModel selRec)
|
||||
{
|
||||
@@ -198,24 +202,29 @@ namespace MP.SPEC.Pages
|
||||
#region Private Fields
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
private PODLExpModel? _currRecord = null;
|
||||
|
||||
private PODLExpModel currRecordControlli = new PODLExpModel();
|
||||
|
||||
private List<AnagArticoli>? ListArticoli;
|
||||
|
||||
private List<AnagGruppi>? ListAziende;
|
||||
|
||||
private List<AnagGruppi>? ListGruppiFase;
|
||||
|
||||
private List<Macchine>? ListMacchine;
|
||||
|
||||
private List<ListValues>? ListStati;
|
||||
|
||||
private List<PODLExpModel>? SearchRecords;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#if false
|
||||
private PODLModel? _currRecordControlli = null;
|
||||
#endif
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private string _artSearch { get; set; } = "";
|
||||
|
||||
private string _currAzienda { get; set; } = "*";
|
||||
|
||||
private bool addEnabled
|
||||
@@ -245,9 +254,6 @@ namespace MP.SPEC.Pages
|
||||
get => currArticolo == "" ? "Sel Articolo" : "Nuovo PODL";
|
||||
}
|
||||
|
||||
#if false
|
||||
private List<ConfigModel>? configData { get; set; } = null;
|
||||
#endif
|
||||
private string currArticolo { get; set; } = "";
|
||||
|
||||
private string currAzienda
|
||||
@@ -280,7 +286,7 @@ namespace MP.SPEC.Pages
|
||||
}
|
||||
}
|
||||
|
||||
private SelectPOdlParams currFilter { get; set; } = new SelectPOdlParams();
|
||||
private SelectXdlParams currFilter { get; set; } = new SelectXdlParams();
|
||||
|
||||
private int currPage
|
||||
{
|
||||
@@ -300,18 +306,24 @@ namespace MP.SPEC.Pages
|
||||
|
||||
private bool hasOdl
|
||||
{
|
||||
get => currFilter.hasOdl;
|
||||
get => currFilter.HasOdl;
|
||||
set
|
||||
{
|
||||
if (currFilter.hasOdl != value)
|
||||
if (currFilter.HasOdl != value)
|
||||
{
|
||||
currFilter.hasOdl = value;
|
||||
currFilter.HasOdl = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool isLoading { get; set; } = false;
|
||||
|
||||
private string macchina
|
||||
{
|
||||
get => currFilter.IdxMacchina;
|
||||
set => currFilter.IdxMacchina = value;
|
||||
}
|
||||
|
||||
private int numRecord
|
||||
{
|
||||
get => currFilter.NumRec;
|
||||
@@ -320,29 +332,24 @@ namespace MP.SPEC.Pages
|
||||
|
||||
private string padCodXdl { get; set; } = "00000";
|
||||
|
||||
private int totalCount
|
||||
{
|
||||
get => currFilter.TotCount;
|
||||
set => currFilter.TotCount = value;
|
||||
}
|
||||
|
||||
private string macchina
|
||||
{
|
||||
get => currFilter.IdxMacchina;
|
||||
set => currFilter.IdxMacchina = value;
|
||||
}
|
||||
|
||||
private string reparto
|
||||
private string selReparto
|
||||
{
|
||||
get => currFilter.CodReparto;
|
||||
set => currFilter.CodReparto = value;
|
||||
}
|
||||
|
||||
private string StatoSel
|
||||
{
|
||||
get => currFilter.CodFase;
|
||||
set => currFilter.CodFase = value;
|
||||
}
|
||||
|
||||
private int totalCount
|
||||
{
|
||||
get => currFilter.TotCount;
|
||||
set => currFilter.TotCount = value;
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
@@ -382,6 +389,19 @@ namespace MP.SPEC.Pages
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
private async Task updateFilter(SelectXdlParams newParams)
|
||||
{
|
||||
isLoading = true;
|
||||
await Task.Delay(1);
|
||||
currPage = 1;
|
||||
// salvo comunque filtro reparto x utente
|
||||
await localStorage.SetItemAsync("reparto", selReparto);
|
||||
await Task.Delay(1);
|
||||
await InvokeAsync(() => StateHasChanged());
|
||||
currFilter = newParams;
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
using Blazored.LocalStorage;
|
||||
using Microsoft.AspNetCore.Authentication.Negotiate;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.Web;
|
||||
@@ -38,6 +39,7 @@ builder.Services.AddServerSideBlazor();
|
||||
builder.Services.AddSingleton<IConnectionMultiplexer>(redisMultiplexer);
|
||||
builder.Services.AddSingleton<MpDataService>();
|
||||
builder.Services.AddScoped<MessageService>();
|
||||
builder.Services.AddBlazoredLocalStorage();
|
||||
|
||||
builder.Services.AddHttpClient();
|
||||
builder.Services.AddSingleton<IOApiService>();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 6.16.2211.2508</h4>
|
||||
<h4>Versione: 6.16.2211.2519</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2211.2508
|
||||
6.16.2211.2519
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2211.2508</version>
|
||||
<version>6.16.2211.2519</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user