INserito filtro parametri xDL x creazione PODL/KIT
This commit is contained in:
@@ -78,7 +78,7 @@ namespace MP.Data.Controllers
|
||||
/// Elenco Gruppi tipo Azienda
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<AnagGruppi> AnagGruppiAziende()
|
||||
public List<AnagGruppiModel> AnagGruppiAziende()
|
||||
{
|
||||
return AnagGruppiGetTipo("AZIENDA");
|
||||
}
|
||||
@@ -87,7 +87,7 @@ namespace MP.Data.Controllers
|
||||
/// Elenco Gruppi tipo Fasi
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<AnagGruppi> AnagGruppiFase()
|
||||
public List<AnagGruppiModel> AnagGruppiFase()
|
||||
{
|
||||
return AnagGruppiGetTipo("FASE");
|
||||
}
|
||||
@@ -96,9 +96,9 @@ namespace MP.Data.Controllers
|
||||
/// Elenco Gruppi
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<AnagGruppi> AnagGruppiGetAll()
|
||||
public List<AnagGruppiModel> AnagGruppiGetAll()
|
||||
{
|
||||
List<AnagGruppi> dbResult = new List<AnagGruppi>();
|
||||
List<AnagGruppiModel> dbResult = new List<AnagGruppiModel>();
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
dbResult = dbCtx
|
||||
@@ -115,9 +115,9 @@ namespace MP.Data.Controllers
|
||||
/// </summary>
|
||||
/// <param name="tipoGruppo"></param>
|
||||
/// <returns></returns>
|
||||
public List<AnagGruppi> AnagGruppiGetTipo(string tipoGruppo)
|
||||
public List<AnagGruppiModel> AnagGruppiGetTipo(string tipoGruppo)
|
||||
{
|
||||
List<AnagGruppi> dbResult = new List<AnagGruppi>();
|
||||
List<AnagGruppiModel> dbResult = new List<AnagGruppiModel>();
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
dbResult = dbCtx
|
||||
|
||||
@@ -10,7 +10,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
namespace MP.Data.DbModels
|
||||
{
|
||||
[Table("AnagraficaGruppi")]
|
||||
public partial class AnagGruppi
|
||||
public partial class AnagGruppiModel
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace MP.Data.DbModels
|
||||
/// Navigazione oggetto Machine
|
||||
/// </summary>
|
||||
[ForeignKey("CodGruppo")]
|
||||
public virtual AnagGruppi GruppiNav { get; set; } = null!;
|
||||
public virtual AnagGruppiModel GruppiNav { get; set; } = null!;
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace MP.Data.DbModels
|
||||
/// Navigazione oggetto Machine
|
||||
/// </summary>
|
||||
[ForeignKey("CodGruppo")]
|
||||
public virtual AnagGruppi GruppiNav { get; set; } = null!;
|
||||
public virtual AnagGruppiModel GruppiNav { get; set; } = null!;
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace MP.Data
|
||||
public virtual DbSet<AnagEventiModel> DbSetAnagEventi { get; set; }
|
||||
public virtual DbSet<AnagraficaFlussiModel> DbSetAnagFlussi { get; set; }
|
||||
public virtual DbSet<AnagFluxTypeModel> DbSetAnagFluxType { get; set; }
|
||||
public virtual DbSet<AnagGruppi> DbSetAnagGruppi { get; set; }
|
||||
public virtual DbSet<AnagGruppiModel> DbSetAnagGruppi { get; set; }
|
||||
public virtual DbSet<AnagStatiModel> DbSetAnagStati { get; set; }
|
||||
public virtual DbSet<AnagTagsModel> DbSetAnagTags { get; set; }
|
||||
public virtual DbSet<AnagArticoliModel> DbSetArticoli { get; set; }
|
||||
@@ -326,7 +326,7 @@ namespace MP.Data
|
||||
.HasColumnName("valoreStd")
|
||||
.HasComment("Valore di default/riferimento per la variabile");
|
||||
});
|
||||
modelBuilder.Entity<AnagGruppi>(entity =>
|
||||
modelBuilder.Entity<AnagGruppiModel>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.CodGruppo);
|
||||
|
||||
|
||||
@@ -3142,7 +3142,7 @@ namespace MP.Data.Services
|
||||
sw.Start();
|
||||
List<ST_AnagGruppi>? result = new List<ST_AnagGruppi>();
|
||||
// cerco in redis...
|
||||
string currKey = $"{redisBaseKey}:ST:AnagGruppi";
|
||||
string currKey = $"{redisBaseKey}:ST:AnagGruppiModel";
|
||||
RedisValue rawData = await redisDb.StringGetAsync(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace MP.SPEC.Components
|
||||
if (idxOdl > 0)
|
||||
{
|
||||
DateTime oggi = DateTime.Today;
|
||||
// recupero macchina x ODL...
|
||||
// recupero idxMaccSel x ODL...
|
||||
var elencoOdl = await MDService.OdlListGetFilt(true, "*", "*", "*", "*", DateTime.Today.AddMonths(-1), DateTime.Today.AddDays(1));
|
||||
var currOdl = elencoOdl.FirstOrDefault(x => x.IdxOdl == idxOdl);
|
||||
if (currOdl != null && currOdl.IdxOdl == idxOdl)
|
||||
|
||||
@@ -230,12 +230,12 @@ namespace MP.SPEC.Components
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await MDService.ConfigResetCache();
|
||||
ListGruppiFase = await MDService.ElencoGruppiFase();
|
||||
ListGruppiFase = MDService.ElencoGruppiFase();
|
||||
ListStati = await MDService.AnagStatiComm();
|
||||
selAzienda = await MDService.ConfigTryGetAsync("AZIENDA");
|
||||
giacenzeConf = await MDService.ConfigTryGetAsync("SPEC_ShowGiacenze");
|
||||
ListArticoli = await MDService.ArticoliGetSearch(100000, selAzienda, "");
|
||||
ListMacchine = await MDService.MacchineGetFilt("*");
|
||||
ListMacchine = MDService.MacchineGetFilt("*");
|
||||
await ReloadData(true);
|
||||
}
|
||||
|
||||
@@ -315,7 +315,7 @@ namespace MP.SPEC.Components
|
||||
private DossierModel? currRecordClone = null;
|
||||
|
||||
private List<AnagArticoliModel>? ListArticoli;
|
||||
private List<AnagGruppi>? ListGruppiFase;
|
||||
private List<AnagGruppiModel>? ListGruppiFase;
|
||||
|
||||
private List<Macchine>? ListMacchine;
|
||||
private List<DossierModel>? ListRecords;
|
||||
|
||||
@@ -71,13 +71,13 @@ else
|
||||
}
|
||||
@if (MachineWithRecipe)
|
||||
{
|
||||
@if (machineHasRecipeConf(record.IdxMacchina).Result)
|
||||
@if (machineHasRecipeConf(record.IdxMacchina))
|
||||
{
|
||||
<button class="btn btn-dark btn-sm mx-0" title="Gestione Ricetta" @onclick="() => doShowRecipeConf(record)">
|
||||
<i class="fa-solid fa-flask"></i>
|
||||
</button>
|
||||
}
|
||||
else if (machineHasRecipeArch(record.IdxMacchina).Result)
|
||||
else if (machineHasRecipeArch(record.IdxMacchina))
|
||||
{
|
||||
<button class="btn btn-primary btn-sm mx-0" title="Gestione Ricetta" @onclick="() => doShowRecipeArch(record)">
|
||||
<i class="fa-solid fa-flask"></i>
|
||||
|
||||
@@ -122,18 +122,18 @@ namespace MP.SPEC.Components
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
protected async Task doShowRecipeArch(PODLExpModel selRec)
|
||||
protected void doShowRecipeArch(PODLExpModel selRec)
|
||||
{
|
||||
currRecord = selRec;
|
||||
currRecipeArchPath = await MDService.MacchineRecipeArchive(selRec.IdxMacchina);
|
||||
currRecipeArchPath = MDService.MacchineRecipeArchive(selRec.IdxMacchina);
|
||||
showRecipeArch = true;
|
||||
showRecipeConf = false;
|
||||
}
|
||||
|
||||
protected async Task doShowRecipeConf(PODLExpModel selRec)
|
||||
protected void doShowRecipeConf(PODLExpModel selRec)
|
||||
{
|
||||
currRecord = selRec;
|
||||
currRecipePath = await MDService.MacchineRecipeConf(selRec.IdxMacchina);
|
||||
currRecipePath = MDService.MacchineRecipeConf(selRec.IdxMacchina);
|
||||
showRecipeArch = false;
|
||||
showRecipeConf = true;
|
||||
}
|
||||
@@ -495,7 +495,7 @@ namespace MP.SPEC.Components
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// verifica se sia avviabile ODL x macchina
|
||||
/// verifica se sia avviabile ODL x idxMaccSel
|
||||
/// </summary>
|
||||
/// <param name="idxMacchina"></param>
|
||||
/// <returns></returns>
|
||||
@@ -514,24 +514,24 @@ namespace MP.SPEC.Components
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifica se la macchina abbia associata un path x ricette (elenco)
|
||||
/// Verifica se la idxMaccSel abbia associata un path x ricette (elenco)
|
||||
/// </summary>
|
||||
/// <param name="idxMacchina"></param>
|
||||
/// <returns></returns>
|
||||
private async Task<bool> machineHasRecipeArch(string idxMacchina)
|
||||
private bool machineHasRecipeArch(string idxMacchina)
|
||||
{
|
||||
var recipeArchive = await MDService.MacchineRecipeArchive(idxMacchina);
|
||||
var recipeArchive = MDService.MacchineRecipeArchive(idxMacchina);
|
||||
return !string.IsNullOrEmpty(recipeArchive);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifica se la macchina abbia associata una ricetta (template)
|
||||
/// Verifica se la idxMaccSel abbia associata una ricetta (template)
|
||||
/// </summary>
|
||||
/// <param name="idxMacchina"></param>
|
||||
/// <returns></returns>
|
||||
private async Task<bool> machineHasRecipeConf(string idxMacchina)
|
||||
private bool machineHasRecipeConf(string idxMacchina)
|
||||
{
|
||||
var recipePath = await MDService.MacchineRecipeConf(idxMacchina);
|
||||
var recipePath = MDService.MacchineRecipeConf(idxMacchina);
|
||||
return !string.IsNullOrEmpty(recipePath);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<div>
|
||||
|
||||
<div class="small mt-2">
|
||||
<label class="px-2" for="macchina" title="Selezionare inizio periodo">Reparto</label>
|
||||
<label class="px-2" for="macchina" title="Selezionare Reparto">Reparto</label>
|
||||
</div>
|
||||
<div class="input-group px-2">
|
||||
<label class="input-group-text" for="macchina" title="Selezionare la macchina da visualizzare"><i class="fa-solid fa-building"></i> </label>
|
||||
@@ -23,7 +23,7 @@
|
||||
{
|
||||
foreach (var item in ListGruppiFase)
|
||||
{
|
||||
<option value="@item.CodGruppo">@item.DescrGruppo</option>
|
||||
<option value="@item.CodGruppo">@item.DescrGruppo</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
@@ -32,7 +32,7 @@
|
||||
<div>
|
||||
|
||||
<div class="small mt-2">
|
||||
<label class="px-2" for="macchina" title="Selezionare inizio periodo">Macchina</label>
|
||||
<label class="px-2" for="macchina" title="Selezionare Macchina">Macchina</label>
|
||||
</div>
|
||||
<div class="input-group px-2">
|
||||
<label class="input-group-text" for="macchina" title="Selezionare la macchina da visualizzare"><i class="fa-solid fa-hard-drive"></i></label>
|
||||
@@ -42,47 +42,50 @@
|
||||
{
|
||||
foreach (var item in ListMacchine)
|
||||
{
|
||||
<option value="@item.IdxMacchina">@item.Descrizione</option>
|
||||
<option value="@item.IdxMacchina">@item.Descrizione</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
@if (ListStati != null && ListStati.Count() > 0)
|
||||
{
|
||||
<div>
|
||||
|
||||
<div class="small mt-2">
|
||||
<label class="px-2" for="fase" title="Selezionare inizio periodo">Fase</label>
|
||||
</div>
|
||||
<div class="input-group px-2">
|
||||
<label class="input-group-text" for="fase" title="Selezionare la fase da visualizzare"><i class="fa-solid fa-screwdriver-wrench"></i></label>
|
||||
<select @bind="@selStato" id="fase" class="form-select" title="Selezionare la fase da visualizzare">
|
||||
<option value="*">--- Tutti ---</option>
|
||||
@if (ListStati != null)
|
||||
{
|
||||
foreach (var item in ListStati)
|
||||
<div class="small mt-2">
|
||||
<label class="px-2" for="fase" title="Selezionare Fase">Fase</label>
|
||||
</div>
|
||||
<div class="input-group px-2">
|
||||
<label class="input-group-text" for="fase" title="Selezionare la fase da visualizzare"><i class="fa-solid fa-screwdriver-wrench"></i></label>
|
||||
<select @bind="@selStato" id="fase" class="form-select" title="Selezionare la fase da visualizzare">
|
||||
<option value="*">--- Tutti ---</option>
|
||||
@if (ListStati != null)
|
||||
{
|
||||
<option value="@item.value">@item.label</option>
|
||||
foreach (var item in ListStati)
|
||||
{
|
||||
<option value="@item.value">@item.label</option>
|
||||
}
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@if (!isActive || hasOdl)
|
||||
{
|
||||
<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="@selDtStart" 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="@selDtEnd" id="dtMax" type="datetime-local" title="Selezionare fine periodo">
|
||||
</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="@selDtStart" 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="@selDtEnd" id="dtMax" type="datetime-local" title="Selezionare fine periodo">
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace MP.SPEC.Components
|
||||
public EventCallback<SelectXdlParams> FilterChanged { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public List<AnagGruppi>? ListGruppiFase { get; set; } = null;
|
||||
public List<AnagGruppiModel>? ListGruppiFase { get; set; } = null;
|
||||
|
||||
[Parameter]
|
||||
public List<Macchine>? ListMacchine { get; set; } = null;
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace MP.SPEC.Controllers
|
||||
public async Task<string> GetByPODL(string idxMacc, int idxPODL)
|
||||
{
|
||||
string answ = "";
|
||||
string archPath = await DService.MacchineRecipeArchive(idxMacc);
|
||||
string archPath = DService.MacchineRecipeArchive(idxMacc);
|
||||
var podlData = await DService.POdlGetByKey(idxPODL);
|
||||
if (podlData != null)
|
||||
{
|
||||
@@ -43,10 +43,10 @@ namespace MP.SPEC.Controllers
|
||||
}
|
||||
|
||||
[HttpGet("GetFile")]
|
||||
public async Task<string> GetFile(string idxMacc, string fileName)
|
||||
public string GetFile(string idxMacc, string fileName)
|
||||
{
|
||||
string answ = "";
|
||||
string archPath = await DService.MacchineRecipeArchive(idxMacc);
|
||||
string archPath = DService.MacchineRecipeArchive(idxMacc);
|
||||
if (!string.IsNullOrEmpty(archPath))
|
||||
{
|
||||
string fullPath = Path.Combine(archPath, fileName);
|
||||
|
||||
@@ -261,7 +261,7 @@ namespace MP.SPEC.Data
|
||||
stopWatch.Start();
|
||||
string readType = "DB";
|
||||
string currKey = Utils.redisArtByDossier;
|
||||
// cerco in redis dato valore sel macchina...
|
||||
// cerco in redis dato valore sel idxMaccSel...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
@@ -311,7 +311,7 @@ namespace MP.SPEC.Data
|
||||
string readType = "DB";
|
||||
string sKey = string.IsNullOrEmpty(searchVal) ? "***" : searchVal;
|
||||
string currKey = $"{Utils.redisArtList}:{azienda}:{sKey}";
|
||||
// cerco in redis dato valore sel macchina...
|
||||
// cerco in redis dato valore sel idxMaccSel...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
@@ -617,9 +617,9 @@ namespace MP.SPEC.Data
|
||||
|
||||
/// <summary>
|
||||
/// Elenco ultimi n record DOssiers (che contengono ad esempio "salvataggi" di FLuxLog) dato
|
||||
/// macchina (ordinato x data registrazione)
|
||||
/// idxMaccSel (ordinato x data registrazione)
|
||||
/// </summary>
|
||||
/// <param name="IdxMacchina">* = tutte, altrimenti solo x una data macchina</param>
|
||||
/// <param name="IdxMacchina">* = tutte, altrimenti solo x una data idxMaccSel</param>
|
||||
/// <param name="DtStart">Data minima per estrazione records</param>
|
||||
/// <param name="DtEnd">Data Massima per estrazione records</param>
|
||||
/// <returns></returns>
|
||||
@@ -630,7 +630,7 @@ namespace MP.SPEC.Data
|
||||
stopWatch.Start();
|
||||
string readType = "DB";
|
||||
string currKey = $"{Utils.redisDossByMac}:{IdxMacchina}:{CodArticolo}:{DtStart:yyyyMMddHHmm}:{DtEnd:yyyyMMddHHmm}";
|
||||
// cerco in redis dato valore sel macchina...
|
||||
// cerco in redis dato valore sel idxMaccSel...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
@@ -670,7 +670,7 @@ namespace MP.SPEC.Data
|
||||
/// <summary>
|
||||
/// Effettua salvataggio snapshot parametri (con stored) + svuota eventuale cache redis
|
||||
/// </summary>
|
||||
/// <param name="IdxMacchina">macchina</param>
|
||||
/// <param name="IdxMacchina">idxMaccSel</param>
|
||||
/// <param name="MaxSec">NUm massimo secondi per recuperare dati correnti</param>
|
||||
/// <param name="DtRif">DataOra riferimento x cui prendere valori antecedenti</param>
|
||||
/// <returns></returns>
|
||||
@@ -678,7 +678,7 @@ namespace MP.SPEC.Data
|
||||
{
|
||||
bool answ = false;
|
||||
await Task.Delay(1);
|
||||
Log.Info($"Richiesta snapshot per macchina {IdxMacchina} | periodo {dtMin} --> {dtMax}");
|
||||
Log.Info($"Richiesta snapshot per idxMaccSel {IdxMacchina} | periodo {dtMin} --> {dtMax}");
|
||||
// chiamo stored x salvare parametri
|
||||
dbController.DossiersTakeParamsSnapshotLast(IdxMacchina, dtMin, dtMax);
|
||||
// elimino cache redis...
|
||||
@@ -705,7 +705,7 @@ namespace MP.SPEC.Data
|
||||
/// Restitusice elenco aziende
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Task<List<AnagGruppi>> ElencoAziende()
|
||||
public Task<List<AnagGruppiModel>> ElencoAziende()
|
||||
{
|
||||
return Task.FromResult(dbController.AnagGruppiAziende());
|
||||
}
|
||||
@@ -714,18 +714,18 @@ namespace MP.SPEC.Data
|
||||
/// Restitusice elenco fasi
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Task<List<AnagGruppi>> ElencoGruppiFase()
|
||||
public List<AnagGruppiModel> ElencoGruppiFase()
|
||||
{
|
||||
List<AnagGruppi> result = new List<AnagGruppi>();
|
||||
List<AnagGruppiModel> result = new List<AnagGruppiModel>();
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
string readType = "DB";
|
||||
string currKey = $"{Utils.redisAnagGruppi}";
|
||||
// cerco in redis dato valore sel macchina...
|
||||
// cerco in redis dato valore sel idxMaccSel...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
var rawResult = JsonConvert.DeserializeObject<List<AnagGruppi>>($"{rawData}");
|
||||
var rawResult = JsonConvert.DeserializeObject<List<AnagGruppiModel>>($"{rawData}");
|
||||
if (rawResult != null)
|
||||
{
|
||||
result = rawResult;
|
||||
@@ -741,12 +741,12 @@ namespace MP.SPEC.Data
|
||||
}
|
||||
if (result == null)
|
||||
{
|
||||
result = new List<AnagGruppi>();
|
||||
result = new List<AnagGruppiModel>();
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Debug($"ElencoGruppiFase | Read from {readType}: {ts.TotalMilliseconds}ms");
|
||||
return Task.FromResult(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Task<List<LinkMenu>> ElencoLink()
|
||||
@@ -930,11 +930,11 @@ namespace MP.SPEC.Data
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco ultimi n record flux log dato macchina e flusso (ordinato x data registrazione)
|
||||
/// Elenco ultimi n record flux log dato idxMaccSel e flusso (ordinato x data registrazione)
|
||||
/// </summary>
|
||||
/// <param name="DtMax">Data massima x eventi</param>
|
||||
/// <param name="DtMin">Data minima x eventi</param>
|
||||
/// <param name="IdxMacchina">* = tutte, altrimenti solo x una data macchina</param>
|
||||
/// <param name="IdxMacchina">* = tutte, altrimenti solo x una data idxMaccSel</param>
|
||||
/// <param name="CodFlux">*=tutti, altrimenti solo selezionato</param>
|
||||
/// <param name="MaxRec">numero massimo record da restituire</param>
|
||||
/// <returns></returns>
|
||||
@@ -945,7 +945,7 @@ namespace MP.SPEC.Data
|
||||
stopWatch.Start();
|
||||
string readType = "DB";
|
||||
string currKey = $"{Utils.redisFluxLogFilt}:{IdxMacchina}:{CodFlux}:{MaxRec}:{DtMax:yyyyMMddHHmm}:{DtMin:yyyyMMddHHmm}";
|
||||
// cerco in redis dato valore sel macchina...
|
||||
// cerco in redis dato valore sel idxMaccSel...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
@@ -1176,7 +1176,7 @@ namespace MP.SPEC.Data
|
||||
stopWatch.Start();
|
||||
string readType = "DB";
|
||||
string currKey = $"{Utils.redisGiacenzaList}:{IdxOdl}";
|
||||
// cerco in redis dato valore sel macchina...
|
||||
// cerco in redis dato valore sel idxMaccSel...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
@@ -1216,7 +1216,7 @@ namespace MP.SPEC.Data
|
||||
string readType = "DB";
|
||||
string avType = OnlyAvail ? "Avail" : "ALL";
|
||||
string currKey = $"{Utils.redisPOdlByCodArt}:{CodArticolo}:{avType}";
|
||||
// cerco in redis dato valore sel macchina...
|
||||
// cerco in redis dato valore sel idxMaccSel...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue && rawData.Length() > 2)
|
||||
{
|
||||
@@ -1254,7 +1254,7 @@ namespace MP.SPEC.Data
|
||||
/// </summary>
|
||||
/// <param name="codGruppo"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<Macchine>> MacchineGetFilt(string codGruppo)
|
||||
public List<Macchine> MacchineGetFilt(string codGruppo)
|
||||
{
|
||||
List<Macchine>? result = new List<Macchine>();
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
@@ -1262,7 +1262,7 @@ namespace MP.SPEC.Data
|
||||
string readType = "DB";
|
||||
string keyGrp = codGruppo != "*" ? codGruppo : "ALL";
|
||||
string currKey = $"{Utils.redisMacList}:{keyGrp}";
|
||||
// cerco in redis dato valore sel macchina...
|
||||
// cerco in redis dato valore sel idxMaccSel...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
@@ -1271,7 +1271,7 @@ namespace MP.SPEC.Data
|
||||
}
|
||||
else
|
||||
{
|
||||
result = await Task.FromResult(dbController.MacchineGetFilt(codGruppo));
|
||||
result = dbController.MacchineGetFilt(codGruppo);
|
||||
// serializzo e salvo...
|
||||
rawData = JsonConvert.SerializeObject(result);
|
||||
redisDb.StringSet(currKey, rawData, getRandTOut(redisLongTimeCache));
|
||||
@@ -1287,18 +1287,18 @@ namespace MP.SPEC.Data
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifica se la macchina abbia un codice PATH ricette associato
|
||||
/// Verifica se la idxMaccSel abbia un codice PATH ricette associato
|
||||
/// </summary>
|
||||
/// <param name="idxMacchina"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> MacchineRecipeArchive(string idxMacchina)
|
||||
public string MacchineRecipeArchive(string idxMacchina)
|
||||
{
|
||||
string? result = "";
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
string readType = "DB";
|
||||
string currKey = $"{Utils.redisMacRecipePath}:{idxMacchina}";
|
||||
// cerco in redis dato valore sel macchina...
|
||||
// cerco in redis dato valore sel idxMaccSel...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
@@ -1308,7 +1308,7 @@ namespace MP.SPEC.Data
|
||||
else
|
||||
{
|
||||
//recupero elenco macchine...
|
||||
var machineList = await MacchineGetFilt("*");
|
||||
var machineList = MacchineGetFilt("*");
|
||||
var currMach = machineList.Where(x => x.IdxMacchina == idxMacchina).FirstOrDefault();
|
||||
result = currMach != null ? currMach.RecipeArchivePath : null;
|
||||
// serializzo e salvo...
|
||||
@@ -1322,18 +1322,18 @@ namespace MP.SPEC.Data
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifica se la macchina abbia un codice CONF ricetta associato
|
||||
/// Verifica se la idxMaccSel abbia un codice CONF ricetta associato
|
||||
/// </summary>
|
||||
/// <param name="idxMacchina"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> MacchineRecipeConf(string idxMacchina)
|
||||
public string MacchineRecipeConf(string idxMacchina)
|
||||
{
|
||||
string? result = "";
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
string readType = "DB";
|
||||
string currKey = $"{Utils.redisMacRecipeConf}:{idxMacchina}";
|
||||
// cerco in redis dato valore sel macchina...
|
||||
// cerco in redis dato valore sel idxMaccSel...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
@@ -1343,7 +1343,7 @@ namespace MP.SPEC.Data
|
||||
else
|
||||
{
|
||||
//recupero elenco macchine...
|
||||
var machineList = await MacchineGetFilt("*");
|
||||
var machineList = MacchineGetFilt("*");
|
||||
var currMach = machineList.Where(x => x.IdxMacchina == idxMacchina).FirstOrDefault();
|
||||
result = currMach != null ? currMach.RecipePath : null;
|
||||
// serializzo e salvo...
|
||||
@@ -1369,7 +1369,7 @@ namespace MP.SPEC.Data
|
||||
stopWatch.Start();
|
||||
string readType = "DB";
|
||||
string currKey = $"{Utils.redisMacByFlux}:{dtStart:yyyyMMddHHmm}:{dtEnd:yyyyMMddHHmm}";
|
||||
// cerco in redis dato valore sel macchina...
|
||||
// cerco in redis dato valore sel idxMaccSel...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
@@ -1469,7 +1469,7 @@ namespace MP.SPEC.Data
|
||||
stopWatch.Start();
|
||||
string readType = "DB";
|
||||
string currKey = Utils.redisOdlByBatch;
|
||||
// cerco in redis dato valore sel macchina...
|
||||
// cerco in redis dato valore sel idxMaccSel...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
@@ -1515,7 +1515,7 @@ namespace MP.SPEC.Data
|
||||
/// Effettua chiusura dell'ODL indicato, andand
|
||||
/// </summary>
|
||||
/// <param name="idxOdl">idx odl da chiudere</param>
|
||||
/// <param name="idxMacchina">idx macchina</param>
|
||||
/// <param name="idxMacchina">idx idxMaccSel</param>
|
||||
/// <param name="matrOpr">matricola operatore</param>
|
||||
/// <param name="confPezzi">indica se confermare i pezzi priam di chiudere ODL</param>
|
||||
public async Task<bool> ODLClose(int idxOdl, string idxMacchina, int matrOpr, bool confPezzi)
|
||||
@@ -1568,7 +1568,7 @@ namespace MP.SPEC.Data
|
||||
stopWatch.Start();
|
||||
string readType = "DB";
|
||||
string currKey = $"{Utils.redisOdlCurrByMac}";
|
||||
// cerco in redis dato valore sel macchina...
|
||||
// cerco in redis dato valore sel idxMaccSel...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
@@ -1633,7 +1633,7 @@ namespace MP.SPEC.Data
|
||||
stopWatch.Start();
|
||||
string readType = "DB";
|
||||
string currKey = $"{Utils.redisOdlList}:{inCorso}:{codArt}:{keyRichPart}:{Reparto}:{IdxMacchina}:{startDate:yyyyMMdd_HHmmss}:{endDate:yyyyMMdd_HHmmss}";
|
||||
// cerco in redis dato valore sel macchina...
|
||||
// cerco in redis dato valore sel idxMaccSel...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
@@ -1658,9 +1658,9 @@ namespace MP.SPEC.Data
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco di tutti i parametri filtrati x macchina
|
||||
/// Elenco di tutti i parametri filtrati x idxMaccSel
|
||||
/// </summary>
|
||||
/// <param name="IdxMacchina">* = tutte, altrimenti solo x una data macchina</param>
|
||||
/// <param name="IdxMacchina">* = tutte, altrimenti solo x una data idxMaccSel</param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<string>> ParametriGetFilt(string IdxMacchina)
|
||||
{
|
||||
@@ -1669,7 +1669,7 @@ namespace MP.SPEC.Data
|
||||
stopWatch.Start();
|
||||
string readType = "DB";
|
||||
string currKey = $"{Utils.redisFluxByMac}:{IdxMacchina}";
|
||||
// cerco in redis dato valore sel macchina...
|
||||
// cerco in redis dato valore sel idxMaccSel...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
@@ -1735,7 +1735,7 @@ namespace MP.SPEC.Data
|
||||
stopWatch.Start();
|
||||
string readType = "DB";
|
||||
string currKey = $"{Utils.redisPOdlByPOdl}:{idxPODL}";
|
||||
// cerco in redis dato valore sel macchina...
|
||||
// cerco in redis dato valore sel idxMaccSel...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
@@ -1782,7 +1782,7 @@ namespace MP.SPEC.Data
|
||||
stopWatch.Start();
|
||||
string readType = "DB";
|
||||
string currKey = $"{Utils.redisPOdlByOdl}:{idxODL}";
|
||||
// cerco in redis dato valore sel macchina...
|
||||
// cerco in redis dato valore sel idxMaccSel...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
@@ -1847,7 +1847,7 @@ namespace MP.SPEC.Data
|
||||
stopWatch.Start();
|
||||
string readType = "DB";
|
||||
string currKey = $"{Utils.redisPOdlList}:{codGruppo}:{idxMacchina}:{keyRichPart}:{lanciato}:{startDate:yyyyMMdd_HHmmss}:{endDate:yyyyMMdd_HHmmss}";
|
||||
// cerco in redis dato valore sel macchina...
|
||||
// cerco in redis dato valore sel idxMaccSel...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
@@ -1888,7 +1888,7 @@ namespace MP.SPEC.Data
|
||||
stopWatch.Start();
|
||||
string readType = "DB";
|
||||
string currKey = $"{Utils.redisPOdlList}:{codGruppo}:{idxMacchina}:{keyRichPart}:{lanciato}:{startDate:yyyyMMdd_HHmmss}:{endDate:yyyyMMdd_HHmmss}";
|
||||
// cerco in redis dato valore sel macchina...
|
||||
// cerco in redis dato valore sel idxMaccSel...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.SPEC</RootNamespace>
|
||||
<Version>6.16.2504.1407</Version>
|
||||
<Version>6.16.2504.1411</Version>
|
||||
<UserSecretsId>1800a78a-6ff1-40f9-b490-87fb8bfc1394</UserSecretsId>
|
||||
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -237,7 +237,7 @@ namespace MP.SPEC.Pages
|
||||
|
||||
private string _selAzienda = "*";
|
||||
private AnagArticoliModel? currRecord = null;
|
||||
private List<AnagGruppi>? ListAziende;
|
||||
private List<AnagGruppiModel>? ListAziende;
|
||||
private List<AnagArticoliModel>? ListRecords;
|
||||
private List<ListValues>? ListTipoArt;
|
||||
private List<AnagArticoliModel>? SearchRecords;
|
||||
|
||||
@@ -120,17 +120,17 @@ namespace MP.SPEC.Pages
|
||||
isReindexing = false;
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
ReloadStats();
|
||||
await ReloadData();
|
||||
ReloadData();
|
||||
}
|
||||
|
||||
protected async Task ReloadMacchine()
|
||||
protected void ReloadMacchine()
|
||||
{
|
||||
if (ListMacchineAll == null || ListMacchineAll.Count == 0)
|
||||
{
|
||||
var rawData = await MDataServ.MacchineGetFilt("*");
|
||||
var rawData = MDataServ.MacchineGetFilt("*");
|
||||
// trasformo!
|
||||
if (rawData != null)
|
||||
{
|
||||
@@ -218,9 +218,9 @@ namespace MP.SPEC.Pages
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task ReloadData()
|
||||
private void ReloadData()
|
||||
{
|
||||
await ReloadMacchine();
|
||||
ReloadMacchine();
|
||||
DateTime dtEnd = DateTime.Today.AddDays(1);
|
||||
DateTime dtStart = dtEnd.AddMonths(-1);
|
||||
CurrPeriodo = new Periodo(dtStart, dtEnd);
|
||||
|
||||
@@ -105,13 +105,13 @@ namespace MP.SPEC.Pages
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await getReparto();
|
||||
var allGruppiData = await MDService.ElencoGruppiFase();
|
||||
var allGruppiData = MDService.ElencoGruppiFase();
|
||||
if (allGruppiData != null)
|
||||
{
|
||||
ListGruppiFase = allGruppiData.Where(x => x.SelEnabled).ToList();
|
||||
}
|
||||
ListStati = await MDService.AnagStatiComm();
|
||||
ListMacchine = await MDService.MacchineGetFilt(selReparto);
|
||||
ListMacchine = MDService.MacchineGetFilt(selReparto);
|
||||
padCodXdl = await MDService.ConfigTryGetAsync("PadCodXdl");
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ namespace MP.SPEC.Pages
|
||||
get => isActive ? "text-secondary" : "text-dark fw-bold";
|
||||
}
|
||||
|
||||
private List<AnagGruppi>? ListGruppiFase { get; set; } = null;
|
||||
private List<AnagGruppiModel>? ListGruppiFase { get; set; } = null;
|
||||
private string localReparto { get; set; } = "";
|
||||
|
||||
private int numRecord
|
||||
|
||||
@@ -125,7 +125,7 @@ namespace MP.SPEC.Pages
|
||||
{
|
||||
await getReparto();
|
||||
ListAziende = await MDService.ElencoAziende();
|
||||
var allGruppiData = await MDService.ElencoGruppiFase();
|
||||
var allGruppiData = MDService.ElencoGruppiFase();
|
||||
if (allGruppiData != null)
|
||||
{
|
||||
ListGruppiFase = allGruppiData.Where(x => x.SelEnabled).ToList();
|
||||
@@ -293,11 +293,11 @@ namespace MP.SPEC.Pages
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
private PODLExpModel? _currRecord = null;
|
||||
private AnagGruppi currGruppoSel = new AnagGruppi();
|
||||
private AnagGruppiModel currGruppoSel = new AnagGruppiModel();
|
||||
private PODLExpModel currRecordControlli = new PODLExpModel();
|
||||
private List<AnagArticoliModel>? ListArticoli;
|
||||
private List<AnagGruppi>? ListAziende;
|
||||
private List<AnagGruppi>? ListGruppiFase;
|
||||
private List<AnagGruppiModel>? ListAziende;
|
||||
private List<AnagGruppiModel>? ListGruppiFase;
|
||||
private List<Macchine>? ListMacchine;
|
||||
private List<ListValues>? ListStati;
|
||||
private int nArtSearch = 5;
|
||||
@@ -492,7 +492,7 @@ namespace MP.SPEC.Pages
|
||||
{
|
||||
isLoading = true;
|
||||
await Task.Delay(1);
|
||||
ListMacchine = await MDService.MacchineGetFilt(selReparto);
|
||||
ListMacchine = MDService.MacchineGetFilt(selReparto);
|
||||
ListArticoli = await MDService.ArticoliGetSearch(100, currAzienda, artSearch);
|
||||
if (ListGruppiFase != null)
|
||||
{
|
||||
|
||||
@@ -14,19 +14,34 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="px-0 align-content-center d-flex justify-content-end">
|
||||
<div class="input-group me-2">
|
||||
<button class="btn @addNewBtnCss" style="min-width: 8rem;" @onclick="() => DoAddNew()">@addNewBtnText <i class="bi bi-plus-square"></i></button>
|
||||
@if (filtActive)
|
||||
{
|
||||
<div class="small d-flex justify-content-between text-nowrap" title="Filtri attivi">
|
||||
@if (repartoSel != "*")
|
||||
{
|
||||
<button class="btn btn-outline-primary btn-sm mx-2" @onclick="resetReparto" title="Rimuovi Filtro Reparto"><i class="fa-solid fa-building"></i> @repartoSel <i class="fa-solid fa-xmark text-warning"></i></button>
|
||||
}
|
||||
@if (idxMaccSel != "*")
|
||||
{
|
||||
<button class="btn btn-outline-primary btn-sm mx-2" @onclick="resetMacchina" title="Rimuovi Filtro Impianto"><i class="fa-solid fa-hard-drive"></i> @idxMaccSel <i class="fa-solid fa-xmark text-warning"></i></button>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="input-group me-1">
|
||||
<button class="btn @addNewBtnCss" style="min-width: 8rem;" @onclick="() => DoAddNew()">@addNewBtnText <i class="fa-solid @iconDetail"></i></button>
|
||||
</div>
|
||||
@* <div class="input-group me-2" style="min-width: 20rem;">
|
||||
<span class="input-group-text"><i class="fa fa-search"></i></span>
|
||||
<input type="text" class="form-control" placeholder="@($"Cod Commessa | Ctrl-R")" aria-label="Ricerca" title="@($"Ricerca Commessa | Ctrl-R")" @bind="@SearchComm" accesskey="R">
|
||||
<button class="btn @sParentCss" @onclick="() => ResetParent()"><i class="fa fa-ban"></i></button>
|
||||
</div> *@
|
||||
<div class="p-2 text-end">
|
||||
<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>
|
||||
|
||||
<SelFilterXDL currFilter="@currFilter" ListMacchine="@ListMacchine" ListStati="@ListStati" ListGruppiFase="@ListGruppiFase" FilterChanged="UpdateFilter"></SelFilterXDL>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<MP.SPEC.Components.ProdKit.Manager DoAddNew=@doAddNew></MP.SPEC.Components.ProdKit.Manager>
|
||||
@* <ScratchPodlKit></ScratchPodlKit> *@
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
using Blazored.LocalStorage;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using Microsoft.JSInterop;
|
||||
using MP.Data.DbModels;
|
||||
using MP.SPEC.Components;
|
||||
using MP.SPEC.Data;
|
||||
using NLog.Layouts;
|
||||
using System.Reflection.PortableExecutable;
|
||||
|
||||
namespace MP.SPEC.Pages
|
||||
{
|
||||
@@ -161,8 +164,6 @@ namespace MP.SPEC.Pages
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
private bool OptAdmKitEnabled = false;
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
numRecord = 10;
|
||||
@@ -185,22 +186,6 @@ namespace MP.SPEC.Pages
|
||||
}
|
||||
}
|
||||
|
||||
#if false
|
||||
protected override void OnAfterRender(bool firstRender)
|
||||
{
|
||||
if (firstRender)
|
||||
{
|
||||
if (OptAdmKitEnabled)
|
||||
{
|
||||
doReset();
|
||||
}
|
||||
}
|
||||
//base.OnAfterRender(firstRender);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
ReloadData();
|
||||
@@ -256,10 +241,22 @@ namespace MP.SPEC.Pages
|
||||
private bool doSearchArt = false;
|
||||
|
||||
private IstanzeKitModel? EditRecord = null;
|
||||
|
||||
private List<IstanzeKitModel>? ListRecords;
|
||||
|
||||
private int minChar = 2;
|
||||
private bool OptAdmKitEnabled = false;
|
||||
#if false
|
||||
protected override void OnAfterRender(bool firstRender)
|
||||
{
|
||||
if (firstRender)
|
||||
{
|
||||
if (OptAdmKitEnabled)
|
||||
{
|
||||
doReset();
|
||||
}
|
||||
}
|
||||
//base.OnAfterRender(firstRender);
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// RegExp x SAVE KIT
|
||||
@@ -291,6 +288,21 @@ namespace MP.SPEC.Pages
|
||||
|
||||
private int _numRecord { get; set; } = 10;
|
||||
|
||||
private string addNewBtnCss
|
||||
{
|
||||
get => doAddNew ? "btn-secondary" : "btn-primary";
|
||||
}
|
||||
|
||||
private string addNewBtnText
|
||||
{
|
||||
get => doAddNew ? "Chiudi Composizione KIT" : "Composizione Nuovo KIT";
|
||||
}
|
||||
|
||||
private string iconDetail
|
||||
{
|
||||
get => doAddNew ? "fa-chevron-up" : "fa-chevron-down";
|
||||
}
|
||||
|
||||
private int currPage
|
||||
{
|
||||
get => _currPage;
|
||||
@@ -321,15 +333,68 @@ namespace MP.SPEC.Pages
|
||||
|
||||
private string sCodComm { get; set; } = "";
|
||||
|
||||
private bool ShowCharts { get; set; } = false;
|
||||
private SelectXdlParams currFilter { get; set; } = new SelectXdlParams();
|
||||
private bool filtActive
|
||||
{
|
||||
get => idxMaccSel != "*" || repartoSel != "*";
|
||||
}
|
||||
private string idxMaccSel
|
||||
{
|
||||
get => currFilter.IdxMacchina;
|
||||
set => currFilter.IdxMacchina = value;
|
||||
}
|
||||
private string repartoSel
|
||||
{
|
||||
get => currFilter.CodReparto;
|
||||
set => currFilter.CodReparto = value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
[Inject]
|
||||
protected ILocalStorageService localStorage { get; set; } = null!;
|
||||
|
||||
private List<ListValues>? ListStati;
|
||||
private async Task UpdateFilter(SelectXdlParams newParams)
|
||||
{
|
||||
isLoading = true;
|
||||
currPage = 1;
|
||||
// salvo comunque filtro reparto x utente
|
||||
await localStorage.SetItemAsync("reparto", repartoSel);
|
||||
ReloadData();
|
||||
//await InvokeAsync(() => StateHasChanged());
|
||||
currFilter = newParams;
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
|
||||
protected void resetMacchina()
|
||||
{
|
||||
idxMaccSel = "*";
|
||||
}
|
||||
|
||||
protected void resetReparto()
|
||||
{
|
||||
repartoSel = "*";
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private List<AnagGruppiModel> ListGruppiFase = new List<AnagGruppiModel>();
|
||||
private List<Macchine> ListMacchine = new List<Macchine>();
|
||||
|
||||
private void ReloadData()
|
||||
{
|
||||
isLoading = true;
|
||||
// leggo dati x filtro
|
||||
var allGruppiData = MDService.ElencoGruppiFase();
|
||||
if (allGruppiData != null)
|
||||
{
|
||||
ListGruppiFase = allGruppiData.Where(x => x.SelEnabled).ToList();
|
||||
}
|
||||
ListMacchine = MDService.MacchineGetFilt(repartoSel);
|
||||
SearchRecords = MDService.IstKitFilt("", "");
|
||||
totalCount = SearchRecords.Count;
|
||||
// conto i kit = distinct...
|
||||
@@ -363,16 +428,5 @@ namespace MP.SPEC.Pages
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
|
||||
private string addNewBtnText
|
||||
{
|
||||
get => doAddNew ? "Annulla creazione Istanza KIT" : "Composizione Nuovo KIT";
|
||||
}
|
||||
private string addNewBtnCss
|
||||
{
|
||||
get => doAddNew ? "btn-secondary" : "btn-primary";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 6.16.2504.1407</h4>
|
||||
<h4>Versione: 6.16.2504.1411</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2504.1407
|
||||
6.16.2504.1411
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2504.1407</version>
|
||||
<version>6.16.2504.1411</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