Merge branch 'Release/Spec_KitMan_06'
This commit is contained in:
@@ -1298,6 +1298,35 @@ namespace MP.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco PODLper composizione KIT non avviati filtrati x articolo, KeyRich (che contiene stato)
|
||||
/// </summary>
|
||||
/// <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> ListPODL_KitFilt(bool lanciato, string keyRichPart, string idxMacchina, string codGruppo, DateTime startDate, DateTime endDate)
|
||||
{
|
||||
List<PODLExpModel> dbResult = new List<PODLExpModel>();
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
var Lanc = new SqlParameter("@Lanciato", lanciato);
|
||||
var KeyRich = new SqlParameter("@KeyRich", keyRichPart);
|
||||
var CodGrp = new SqlParameter("@CodGruppo", codGruppo);
|
||||
var IdxMacc = new SqlParameter("@IdxMacchina", idxMacchina);
|
||||
var DateFrom = new SqlParameter("@DtInizio", startDate);
|
||||
var DateTo = new SqlParameter("@DtFine", endDate);
|
||||
|
||||
dbResult = dbCtx
|
||||
.DbSetPODLExp
|
||||
.FromSqlRaw("EXEC stp_PODL_getByFiltSpecKit @Lanciato, @KeyRich, @CodGruppo, @IdxMacchina, @DtInizio, @DtFine", Lanc, KeyRich, CodGrp, IdxMacc, DateFrom, DateTo)
|
||||
.AsNoTracking()
|
||||
.ToList();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco PODL non avviati filtrati x articolo, KeyRich (che contiene stato)
|
||||
/// </summary>
|
||||
|
||||
@@ -129,7 +129,7 @@ namespace MP.SPEC.Components.ProdKit
|
||||
{
|
||||
ListRecords = null;
|
||||
isLoading = true;
|
||||
SearchRecords = await MDService.POdlListGetFiltAsync(hasOdl, StatoSel, macchina, reparto, selDtStart, selDtEnd);
|
||||
SearchRecords = await MDService.POdlToKitListGetFiltAsync(hasOdl, StatoSel, macchina, reparto, selDtStart, selDtEnd);
|
||||
|
||||
// rivedere filtro FixMe ToDo!!!
|
||||
// filtro tenendo SOLO se hanno keyRichiesta CodExt + ATTIVI + NON KIT | Hard Coded...
|
||||
|
||||
@@ -17,16 +17,33 @@
|
||||
</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>
|
||||
<select @bind="@selReparto" id="macchina" class="form-select" title="Selezionare la macchina da visualizzare">
|
||||
<option value="*">--- Tutti ---</option>
|
||||
@if (ListGruppiFase != null)
|
||||
{
|
||||
foreach (var item in ListGruppiFase)
|
||||
@if (ChangeGrpEnab)
|
||||
{
|
||||
<select @bind="@selReparto" id="macchina" class="form-select" title="Selezionare la macchina da visualizzare">
|
||||
<option value="*">--- Tutti ---</option>
|
||||
@if (ListGruppiFase != null)
|
||||
{
|
||||
<option value="@item.CodGruppo">@item.DescrGruppo</option>
|
||||
foreach (var item in ListGruppiFase)
|
||||
{
|
||||
<option value="@item.CodGruppo">@item.DescrGruppo</option>
|
||||
}
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</select>
|
||||
}
|
||||
else
|
||||
{
|
||||
<select @bind="@selReparto" id="macchina" class="form-select disabled" disabled title="Selezionare la macchina da visualizzare">
|
||||
<option value="*">--- Tutti ---</option>
|
||||
@if (ListGruppiFase != null)
|
||||
{
|
||||
foreach (var item in ListGruppiFase)
|
||||
{
|
||||
<option value="@item.CodGruppo">@item.DescrGruppo</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@@ -24,6 +24,9 @@ namespace MP.SPEC.Components
|
||||
[Parameter]
|
||||
public List<ListValuesModel>? ListStati { get; set; } = null;
|
||||
|
||||
[Parameter]
|
||||
public bool ChangeGrpEnab { get; set; } = true;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
@@ -2107,6 +2107,48 @@ namespace MP.SPEC.Data
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Elenco PODL per composizione KIT (Async) non avviati filtrati x articolo, KeyRich (che contiene stato)
|
||||
/// </summary>
|
||||
/// <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>
|
||||
/// <param name="startDate">Data inizio</param>
|
||||
/// <param name="endDate">Data fine</param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<PODLExpModel>> POdlToKitListGetFiltAsync(bool lanciato, string keyRichPart, string idxMacchina, string codGruppo, DateTime startDate, DateTime endDate)
|
||||
{
|
||||
List<PODLExpModel>? result = new List<PODLExpModel>();
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
string readType = "DB";
|
||||
string currKey = $"{Utils.redisPOdlList}_kit:{codGruppo}:{idxMacchina}:{keyRichPart}:{lanciato}:{startDate:yyyyMMdd_HHmmss}:{endDate:yyyyMMdd_HHmmss}";
|
||||
// cerco in redis dato valore sel idxMaccSel...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
result = JsonConvert.DeserializeObject<List<PODLExpModel>>($"{rawData}");
|
||||
readType = "REDIS";
|
||||
}
|
||||
else
|
||||
{
|
||||
result = await Task.FromResult(dbController.ListPODL_KitFilt(lanciato, keyRichPart, idxMacchina, codGruppo, startDate, endDate));
|
||||
// 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($"POdlToKitListGetFiltAsync | Read from {readType}: {ts.TotalMilliseconds}ms");
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Chiamata salvataggio ricetta + refresh REDIS
|
||||
/// </summary>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.SPEC</RootNamespace>
|
||||
<Version>6.16.2505.719</Version>
|
||||
<Version>6.16.2505.908</Version>
|
||||
<UserSecretsId>1800a78a-6ff1-40f9-b490-87fb8bfc1394</UserSecretsId>
|
||||
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -37,13 +37,12 @@
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<SelFilterXDL currFilter="@currFilter" ListMacchine="@ListMacchine" ListStati="@ListStati" ListGruppiFase="@ListGruppiFase" FilterChanged="UpdateFilter"></SelFilterXDL>
|
||||
<SelFilterXDL currFilter="@currFilter" ListMacchine="@ListMacchine" ListStati="@ListStati" ListGruppiFase="@ListGruppiFase" FilterChanged="UpdateFilter" ChangeGrpEnab="!isComposing"></SelFilterXDL>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<MP.SPEC.Components.ProdKit.Manager DoAddNew=@doAddNew ActFilt="@currFilter" EC_FiltUpdated="UpdateFilter" EC_IsComposing="SetComposing"></MP.SPEC.Components.ProdKit.Manager>
|
||||
@* <ScratchPodlKit></ScratchPodlKit> *@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 6.16.2505.719</h4>
|
||||
<h4>Versione: 6.16.2505.908</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2505.719
|
||||
6.16.2505.908
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2505.719</version>
|
||||
<version>6.16.2505.908</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