Fix gestione filtro completo x ODL
This commit is contained in:
@@ -3,6 +3,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using MP.Data.DatabaseModels;
|
||||
using NLog;
|
||||
using StackExchange.Redis;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -546,22 +547,47 @@ namespace MP.Data.Controllers
|
||||
/// <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="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 List<ODLModel> ListODLFilt(bool inCorso, string codArt, string keyRichPart, string IdxMacchina, DateTime startDate, DateTime endDate)
|
||||
public List<ODLExpModel> ListODLFilt(bool inCorso, string codArt, string keyRichPart, string Reparto, string IdxMacchina, DateTime startDate, DateTime endDate)
|
||||
{
|
||||
List<ODLModel> dbResult = new List<ODLModel>();
|
||||
List<ODLExpModel> dbResult = new List<ODLExpModel>();
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
|
||||
var InCorso = new SqlParameter("@InCorso", inCorso);
|
||||
var CodArt = new SqlParameter("@CodArt", codArt);
|
||||
var KeyRich = new SqlParameter("@KeyRich", keyRichPart);
|
||||
var CodGruppo = new SqlParameter("@CodGruppo", Reparto);
|
||||
var IdxMacc = new SqlParameter("@IdxMacchina", IdxMacchina);
|
||||
var DataFrom = new SqlParameter("@DataFrom", startDate);
|
||||
var DataTo = new SqlParameter("@DataTo", endDate);
|
||||
|
||||
dbResult = dbCtx
|
||||
.DbSetODL
|
||||
.Where(x => ((inCorso && x.DataFine == null) || ((!inCorso && x.DataFine != null) && x.DataInizio >= startDate && x.DataInizio <= endDate)) && (x.KeyRichiesta.Contains(keyRichPart) || keyRichPart == "*") && (x.IdxMacchina.Contains(IdxMacchina) || IdxMacchina == "*") && (codArt == "*" || x.CodArticolo.Contains(codArt)))
|
||||
.AsNoTracking()
|
||||
.Include(m => m.MachineNav)
|
||||
.Include(a => a.ArticoloNav)
|
||||
.OrderByDescending(x => x.IdxOdl)
|
||||
.ToList();
|
||||
.DbSetODLExp
|
||||
.FromSqlRaw("EXEC stp_ODL_getByFiltSpec @InCorso, @CodArt, @KeyRich, @CodGruppo, @IdxMacchina, @DataFrom, @DataTo", InCorso, CodArt, KeyRich, CodGruppo, IdxMacc, DataFrom, DataTo)
|
||||
.AsNoTracking()
|
||||
//.AsEnumerable()
|
||||
.ToList();
|
||||
|
||||
#if false
|
||||
dbResult = dbCtx
|
||||
.DbSetODL
|
||||
.Where(x => ((inCorso && x.DataFine == null) || ((!inCorso && x.DataFine != null)
|
||||
&& x.DataInizio >= startDate && x.DataInizio <= endDate))
|
||||
&& (x.KeyRichiesta.Contains(keyRichPart) || keyRichPart == "*")
|
||||
//&& (x.MachineNav.Contains(IdxMacchina) || Reparto == "*")
|
||||
&& (x.IdxMacchina.Contains(IdxMacchina) || IdxMacchina == "*")
|
||||
&& (codArt == "*" || x.CodArticolo.Contains(codArt)))
|
||||
.AsNoTracking()
|
||||
.Include(m => m.MachineNav)
|
||||
.Include(a => a.ArticoloNav)
|
||||
.OrderByDescending(x => x.IdxOdl)
|
||||
.ToList();
|
||||
#endif
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
#nullable disable
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
namespace MP.Data.DatabaseModels
|
||||
{
|
||||
[Table("Gruppi2Macchine")]
|
||||
public partial class Gruppi2MaccModel
|
||||
{
|
||||
#region Public Properties
|
||||
public string IdxMacchina { get; set; }
|
||||
|
||||
public string CodGruppo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Navigazione oggetto Machine
|
||||
/// </summary>
|
||||
[ForeignKey("IdxMacchina")]
|
||||
public virtual Macchine MachineNav { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Navigazione oggetto Machine
|
||||
/// </summary>
|
||||
[ForeignKey("CodGruppo")]
|
||||
public virtual AnagGruppi GruppiNav { get; set; } = null!;
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
|
||||
#nullable disable
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
namespace MP.Data.DatabaseModels
|
||||
{
|
||||
public partial class ODLExpModel
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[Key]
|
||||
public int IdxOdl { get; set; }
|
||||
public string CodArticolo { get; set; } = "";
|
||||
public string IdxMacchina { get; set; }
|
||||
public int NumPezzi { get; set; }
|
||||
public decimal Tcassegnato { get; set; }
|
||||
public DateTime? DataInizio { get; set; }
|
||||
public DateTime? DataFine { get; set; }
|
||||
[MaxLength(2500)]
|
||||
public string Note { get; set; } = "";
|
||||
public string KeyRichiesta { get; set; }
|
||||
public int PzPallet { get; set; } = 1;
|
||||
public string CodCli { get; set; } = "";
|
||||
|
||||
[NotMapped]
|
||||
public string DurataMinuti
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
DateTime end = DataFine != null ? (DateTime)DataFine : DateTime.Now;
|
||||
var tsDurata = (end).Subtract((DateTime)DataInizio);
|
||||
if (tsDurata.TotalDays < 1)
|
||||
{
|
||||
answ = $"{tsDurata.Hours:00}h {tsDurata.Minutes:00}'";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = $"{tsDurata.Days}gg {tsDurata.Hours:00}h";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Navigazione oggetto Machine
|
||||
/// </summary>
|
||||
[ForeignKey("IdxMacchina")]
|
||||
public virtual Macchine MachineNav { get; set; } = null!;
|
||||
/// <summary>
|
||||
/// Navigazione oggetto Articolo
|
||||
/// </summary>
|
||||
[ForeignKey("CodArticolo")]
|
||||
public virtual AnagArticoli ArticoloNav { get; set; } = null!;
|
||||
|
||||
public string DescArticolo { get; set; } = "";
|
||||
public string CodMacchina { get; set; } = "";
|
||||
public string Nome { get; set; } = "";
|
||||
|
||||
public string OperSetup { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
}
|
||||
@@ -45,6 +45,7 @@ namespace MP.Data
|
||||
public virtual DbSet<ListValues> DbSetListValues { get; set; }
|
||||
public virtual DbSet<LinkMenu> DbSetLinkMenu { get; set; }
|
||||
public virtual DbSet<ODLModel> DbSetODL { get; set; }
|
||||
public virtual DbSet<ODLExpModel> DbSetODLExp { get; set; }
|
||||
public virtual DbSet<PODLModel> DbSetPODL { get; set; }
|
||||
public virtual DbSet<FluxLog> DbSetFluxLog { get; set; }
|
||||
public virtual DbSet<DossierModel> DbSetDossiers { get; set; }
|
||||
@@ -53,6 +54,7 @@ namespace MP.Data
|
||||
public virtual DbSet<EventListModel> DbSetEvList { get; set; }
|
||||
public virtual DbSet<VocabolarioModel> DbSetVocabolario { get; set; }
|
||||
public virtual DbSet<AnagOperatoriModel> DbOperatori { get; set; }
|
||||
public virtual DbSet<Gruppi2MaccModel> DbSetGrp2Macc { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
@@ -312,6 +314,11 @@ namespace MP.Data
|
||||
{
|
||||
entity.HasKey(e => new { e.Lingua, e.Lemma });
|
||||
|
||||
});
|
||||
modelBuilder.Entity<Gruppi2MaccModel>(entity =>
|
||||
{
|
||||
entity.HasKey(e => new { e.CodGruppo, e.IdxMacchina});
|
||||
|
||||
});
|
||||
|
||||
OnModelCreatingPartial(modelBuilder);
|
||||
|
||||
@@ -83,7 +83,7 @@ else
|
||||
</td>
|
||||
<td>
|
||||
@record.CodArticolo
|
||||
<div class="small textConsensed text-secondary">@record.ArticoloNav.DescArticolo</div>
|
||||
<div class="small textConsensed text-secondary">@record.DescArticolo</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
@@ -99,7 +99,7 @@ else
|
||||
|
||||
<td>
|
||||
@record.IdxMacchina
|
||||
<div class="small textConsensed text-secondary">@record.MachineNav.Descrizione</div>
|
||||
<div class="small textConsensed text-secondary">@record.Nome</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="small textConsensed"><b>N° pezzi:</b> @record.NumPezzi</div>
|
||||
|
||||
@@ -162,7 +162,7 @@ namespace MP.SPEC.Components
|
||||
await reloadData();
|
||||
}
|
||||
|
||||
protected async Task selectStatRecord(ODLModel? currRec)
|
||||
protected async Task selectStatRecord(ODLExpModel? currRec)
|
||||
{
|
||||
showStats = true;
|
||||
await Task.Delay(1);
|
||||
@@ -178,7 +178,7 @@ namespace MP.SPEC.Components
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task selRecord(ODLModel? currRec)
|
||||
protected async Task selRecord(ODLExpModel? currRec)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
selDtFine = DateTime.Now;
|
||||
@@ -210,19 +210,19 @@ namespace MP.SPEC.Components
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
private ODLModel? currRecord = null;
|
||||
private ODLExpModel? currRecord = null;
|
||||
|
||||
private List<StatODLModel>? ListOdlStats;
|
||||
|
||||
private List<StatODLModel>? ListOdlStatsNetto;
|
||||
|
||||
private List<ODLModel>? ListRecords;
|
||||
private List<ODLExpModel>? ListRecords;
|
||||
|
||||
private List<ListValues>? ListStati;
|
||||
|
||||
private List<ODLModel>? SearchRecords;
|
||||
private List<ODLExpModel>? SearchRecords;
|
||||
|
||||
private ODLModel? statRecord = null;
|
||||
private ODLExpModel? statRecord = null;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
@@ -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.IdxMacchina, currFilter.DtStart, currFilter.DtEnd);
|
||||
SearchRecords = await MDService.ListODLFilt(currFilter.IsActive, currFilter.SearchVal, currFilter.CodStato, currFilter.CodReparto, currFilter.IdxMacchina, currFilter.DtStart, currFilter.DtEnd);
|
||||
totalCount = SearchRecords.Count;
|
||||
ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
|
||||
await Task.Delay(1);
|
||||
@@ -417,7 +417,7 @@ namespace MP.SPEC.Components
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
private async Task reloadStatsData(ODLModel? currRec)
|
||||
private async Task reloadStatsData(ODLExpModel? currRec)
|
||||
{
|
||||
showStats = true;
|
||||
if (currRec != null)
|
||||
|
||||
@@ -11,6 +11,9 @@ namespace MP.SPEC.Components
|
||||
[Parameter]
|
||||
public SelectOdlParams currFilter { get; set; } = new SelectOdlParams();
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<SelectOdlParams> FilterChanged { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public List<AnagGruppi>? ListGruppiFase { get; set; } = null;
|
||||
|
||||
@@ -18,7 +21,7 @@ namespace MP.SPEC.Components
|
||||
public List<string>? ListMacchine { get; set; } = null;
|
||||
|
||||
[Parameter]
|
||||
public List<MP.Data.DatabaseModels.ListValues>? ListStati { get; set; } = null;
|
||||
public List<ListValues>? ListStati { get; set; } = null;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
@@ -27,7 +30,6 @@ namespace MP.SPEC.Components
|
||||
protected bool isActive
|
||||
{
|
||||
get => currFilter.IsActive;
|
||||
set => currFilter.IsActive = value;
|
||||
}
|
||||
|
||||
protected DateTime selDtEnd
|
||||
@@ -38,6 +40,8 @@ namespace MP.SPEC.Components
|
||||
if (currFilter.DtEnd != value)
|
||||
{
|
||||
currFilter.DtEnd = value;
|
||||
Task.Delay(1);
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -50,6 +54,8 @@ namespace MP.SPEC.Components
|
||||
if (currFilter.DtStart != value)
|
||||
{
|
||||
currFilter.DtStart = value;
|
||||
Task.Delay(1);
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -61,20 +67,54 @@ namespace MP.SPEC.Components
|
||||
private string selMacchina
|
||||
{
|
||||
get => currFilter.IdxMacchina;
|
||||
set => currFilter.IdxMacchina = value;
|
||||
set
|
||||
{
|
||||
if (currFilter.IdxMacchina != value)
|
||||
{
|
||||
currFilter.IdxMacchina = value;
|
||||
Task.Delay(1);
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private string selReparto
|
||||
{
|
||||
get => currFilter.CodReparto;
|
||||
set => currFilter.CodReparto = value;
|
||||
set
|
||||
{
|
||||
if (currFilter.CodReparto != value)
|
||||
{
|
||||
currFilter.CodReparto = value;
|
||||
Task.Delay(1);
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private string selStato
|
||||
{
|
||||
get => currFilter.CodStato;
|
||||
set => currFilter.CodStato = value;
|
||||
set
|
||||
{
|
||||
if (currFilter.CodStato != value)
|
||||
{
|
||||
currFilter.CodStato = value;
|
||||
Task.Delay(1);
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void reportChange()
|
||||
{
|
||||
FilterChanged.InvokeAsync(currFilter);
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -651,11 +651,43 @@ namespace MP.SPEC.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>
|
||||
@@ -683,7 +715,7 @@ namespace MP.SPEC.Data
|
||||
result = await Task.FromResult(dbController.ListPODLFilt(codArt, keyRichPart));
|
||||
// serializzo e salvo...
|
||||
rawData = JsonConvert.SerializeObject(result);
|
||||
redisDb.StringSet(currKey, rawData, TimeSpan.FromSeconds(3));
|
||||
redisDb.StringSet(currKey, rawData, TimeSpan.FromSeconds(redisShortTimeCache));
|
||||
}
|
||||
if (result == null)
|
||||
{
|
||||
@@ -961,7 +993,7 @@ namespace MP.SPEC.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
|
||||
{
|
||||
@@ -1004,7 +1036,7 @@ namespace MP.SPEC.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
|
||||
{
|
||||
@@ -1200,6 +1232,7 @@ namespace MP.SPEC.Data
|
||||
private const string redisMacList = redisBaseAddr + "SPEC:Cache:MacList";
|
||||
|
||||
private const string redisOdlCurrByMac = redisBaseAddr + "SPEC:Cache:OdlByMac";
|
||||
private const string redisOdlList = redisBaseAddr + "SPEC:Cache:OdlList";
|
||||
|
||||
private const string redisPOdlByOdl = redisBaseAddr + "SPEC:Cache:POdlByOdl";
|
||||
private const string redisPOdlByPOdl = redisBaseAddr + "SPEC:Cache:POdlByPOdl";
|
||||
@@ -1238,6 +1271,7 @@ namespace MP.SPEC.Data
|
||||
private IDatabase redisDb = null!;
|
||||
|
||||
private int redisLongTimeCache = 5;
|
||||
private int redisShortTimeCache = 4;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
|
||||
@@ -13,17 +13,17 @@ namespace MP.SPEC.Data
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public bool IsActive { get; set; } = true;
|
||||
public string CodReparto { get; set; } = "*";
|
||||
public string CodStato { get; set; } = "*";
|
||||
public string IdxMacchina { get; set; } = "*";
|
||||
public int CurrPage { get; set; } = 1;
|
||||
public int NumRec { get; set; } = 10;
|
||||
public int TotCount { get; set; } = 0;
|
||||
public DateTime DtEnd { get; set; } = Utils.InitDatetime(DateTime.Now, 5);
|
||||
public DateTime DtStart { get; set; } = Utils.InitDatetime(DateTime.Now, 5).AddDays(-10);
|
||||
public int MaxRecord { get; set; } = 100;
|
||||
public bool IsActive { get; set; } = true;
|
||||
public int NumRec { get; set; } = 10;
|
||||
public DateTime DtStart { get; set; } = Utils.InitDatetime(DateTime.Now, 5).AddDays(-10);
|
||||
public DateTime DtEnd { get; set; } = Utils.InitDatetime(DateTime.Now, 5);
|
||||
public int CurrPage { get; set; } = 1;
|
||||
public string SearchVal { get; set; } = "*";
|
||||
public int TotCount { get; set; } = 0;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
@@ -37,6 +37,9 @@ namespace MP.SPEC.Data
|
||||
if (IsActive != item.IsActive)
|
||||
return false;
|
||||
|
||||
if (CodReparto != item.CodReparto)
|
||||
return false;
|
||||
|
||||
if (CodStato != item.CodStato)
|
||||
return false;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.SPEC</RootNamespace>
|
||||
<Version>6.16.2211.2411</Version>
|
||||
<Version>6.16.2211.2415</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@
|
||||
Write all events with minimal level of Debug (So Debug, Info, Warn, Error and Fatal, but not Trace) to "f"
|
||||
<logger name="*" minlevel="Debug" writeTo="f" />
|
||||
-->
|
||||
<logger name="*" minlevel="Trace" writeTo="consoleTarget" />
|
||||
<logger name="*" minlevel="Debug" writeTo="consoleTarget" />
|
||||
<!--<logger name="Microsoft.*" maxlevel="Info" final="true" />-->
|
||||
<logger name="*" minlevel="Info" writeTo="fileTarget" />
|
||||
</rules>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<SelFilterXDL currFilter="@currFilter" ListMacchine="@ListMacchine" ListStati="@ListStati" ListGruppiFase="@ListGruppiFase"></SelFilterXDL>
|
||||
<SelFilterXDL currFilter="@currFilter" ListMacchine="@ListMacchine" ListStati="@ListStati" ListGruppiFase="@ListGruppiFase" FilterChanged="updateFilter"></SelFilterXDL>
|
||||
@*<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>
|
||||
|
||||
+41
-20
@@ -72,19 +72,7 @@ namespace MP.SPEC.Pages
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
private bool filtActive
|
||||
{
|
||||
get => selMacchina != "*" || selStato != "*";
|
||||
}
|
||||
|
||||
protected void resetMacchina()
|
||||
{
|
||||
selMacchina = "*";
|
||||
}
|
||||
protected void resetFase()
|
||||
{
|
||||
selStato = "*";
|
||||
}
|
||||
protected void ForceReload(int newNum)
|
||||
{
|
||||
numRecord = newNum;
|
||||
@@ -95,7 +83,6 @@ namespace MP.SPEC.Pages
|
||||
currPage = newNum;
|
||||
}
|
||||
|
||||
private List<AnagGruppi>? ListGruppiFase { get; set; } = null;
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
var allGruppiData = await MDService.ElencoGruppiFase();
|
||||
@@ -120,7 +107,15 @@ namespace MP.SPEC.Pages
|
||||
}
|
||||
}
|
||||
|
||||
private string padCodXdl { get; set; } = "00000";
|
||||
protected void resetFase()
|
||||
{
|
||||
selStato = "*";
|
||||
}
|
||||
|
||||
protected void resetMacchina()
|
||||
{
|
||||
selMacchina = "*";
|
||||
}
|
||||
|
||||
protected void setDtMax()
|
||||
{
|
||||
@@ -138,9 +133,10 @@ namespace MP.SPEC.Pages
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private List<MP.Data.DatabaseModels.ListValues>? ListStati;
|
||||
private List<string>? ListMacchine;
|
||||
|
||||
private List<MP.Data.DatabaseModels.ListValues>? ListStati;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
@@ -153,6 +149,11 @@ namespace MP.SPEC.Pages
|
||||
set => currFilter.CurrPage = value;
|
||||
}
|
||||
|
||||
private bool filtActive
|
||||
{
|
||||
get => selMacchina != "*" || selStato != "*";
|
||||
}
|
||||
|
||||
private bool isLoading { get; set; } = false;
|
||||
|
||||
private string leftStringCSS
|
||||
@@ -160,27 +161,32 @@ namespace MP.SPEC.Pages
|
||||
get => isActive ? "text-secondary" : "text-dark fw-bold";
|
||||
}
|
||||
|
||||
private List<AnagGruppi>? ListGruppiFase { get; set; } = null;
|
||||
|
||||
private int numRecord
|
||||
{
|
||||
get => currFilter.NumRec;
|
||||
set => currFilter.NumRec = value;
|
||||
}
|
||||
|
||||
private string padCodXdl { get; set; } = "00000";
|
||||
|
||||
private string rightStringCSS
|
||||
{
|
||||
get => isActive ? "text-dark fw-bold" : "text-secondary";
|
||||
}
|
||||
|
||||
private string selMacchina
|
||||
{
|
||||
get => currFilter.IdxMacchina;
|
||||
set => currFilter.IdxMacchina = value;
|
||||
}
|
||||
|
||||
private string selStato
|
||||
{
|
||||
get => currFilter.CodStato;
|
||||
set => currFilter.CodStato = value;
|
||||
}
|
||||
private string selMacchina
|
||||
{
|
||||
get => currFilter.IdxMacchina;
|
||||
set => currFilter.IdxMacchina = value;
|
||||
}
|
||||
|
||||
private int totalCount
|
||||
{
|
||||
@@ -189,5 +195,20 @@ namespace MP.SPEC.Pages
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task updateFilter(SelectOdlParams newParams)
|
||||
{
|
||||
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 MAPOSPEC </i>
|
||||
<h4>Versione: 6.16.2211.2411</h4>
|
||||
<h4>Versione: 6.16.2211.2415</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2211.2411
|
||||
6.16.2211.2415
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2211.2411</version>
|
||||
<version>6.16.2211.2415</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