Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a0ffe1bc6c | |||
| 6e75f590bb | |||
| 12473b5088 | |||
| f6406f833f | |||
| a21cd16362 | |||
| d659afacc2 | |||
| 56c3ba4064 | |||
| 8d0292d789 | |||
| 419863a684 | |||
| f56a7e5164 | |||
| 0cf6ecd38f | |||
| 094ce0d181 | |||
| b4de1c9880 | |||
| 67f0f74fbe | |||
| d00b4bbb8b | |||
| dd63bb292d | |||
| 57bc790074 | |||
| 41a00ffa45 | |||
| 633b5dda6e | |||
| 5d6bef0fc8 | |||
| d24b2ada0c | |||
| 0a9ccffe28 | |||
| 207d305327 |
@@ -741,6 +741,46 @@ namespace MP.Data.Controllers
|
|||||||
return dbResult;
|
return dbResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Recupero Odl CORRENTI
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public List<ODLModel> OdlGetCurrent()
|
||||||
|
{
|
||||||
|
List<ODLModel> dbResult = new List<ODLModel>();
|
||||||
|
using (var dbCtx = new MoonProContext(_configuration))
|
||||||
|
{
|
||||||
|
dbResult = dbCtx
|
||||||
|
.DbSetODL
|
||||||
|
.Where(x => x.DataInizio != null && x.DataFine == null)
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
|
return dbResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Statistiche ODL calcolate (da stored stp_STAT_ODL)
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<List<StatODLModel>> OdlStart(int IdxOdl)
|
||||||
|
{
|
||||||
|
List<StatODLModel> dbResult = new List<StatODLModel>();
|
||||||
|
if (IdxOdl > 0)
|
||||||
|
{
|
||||||
|
using (var dbCtx = new MoonProContext(_configuration))
|
||||||
|
{
|
||||||
|
var IdxODL = new SqlParameter("@IdxODL", IdxOdl);
|
||||||
|
|
||||||
|
dbResult = await dbCtx
|
||||||
|
.DbSetStatOdl
|
||||||
|
.FromSqlRaw("EXEC stp_STAT_ODL @IdxODL", IdxODL)
|
||||||
|
.AsNoTracking()
|
||||||
|
.ToListAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return dbResult;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Elenco parametri validi x una data macchina
|
/// Elenco parametri validi x una data macchina
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -762,6 +802,33 @@ namespace MP.Data.Controllers
|
|||||||
return dbResult;
|
return dbResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Recupero PODL da chiave
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="idxPODL"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<PODLModel> PODL_getByKey(int idxPODL)
|
||||||
|
{
|
||||||
|
PODLModel dbResult = new PODLModel();
|
||||||
|
using (var dbCtx = new MoonProContext(_configuration))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
dbResult = dbCtx
|
||||||
|
.DbSetPODL
|
||||||
|
.AsNoTracking()
|
||||||
|
.Where(x => x.IdxPromessa == idxPODL)
|
||||||
|
.FirstOrDefault();
|
||||||
|
}
|
||||||
|
catch (Exception exc)
|
||||||
|
{
|
||||||
|
Log.Error($"Eccezione durante PODL_getByKey{Environment.NewLine}{exc}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
await Task.Delay(1);
|
||||||
|
return dbResult;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Avvio setup ODL da PODL
|
/// Avvio setup ODL da PODL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -771,17 +838,19 @@ namespace MP.Data.Controllers
|
|||||||
/// <param name="pzPallet"></param>
|
/// <param name="pzPallet"></param>
|
||||||
/// <param name="note"></param>
|
/// <param name="note"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<ODLModel> PODL_startSetup(PODLModel editRec, int matrOpr, double tcRich, int pzPallet, string note)
|
public async Task<bool> PODL_startSetup(PODLModel editRec, int matrOpr, double tcRich, int pzPallet, string note)
|
||||||
{
|
{
|
||||||
ODLModel dbResult = new ODLModel();
|
bool answ = false;
|
||||||
using (var dbCtx = new MoonProContext(_configuration))
|
using (var dbCtx = new MoonProContext(_configuration))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var currRec = dbCtx
|
var currRec = dbCtx
|
||||||
.DbSetPODL
|
.DbSetPODL
|
||||||
|
.AsNoTracking()
|
||||||
.Where(x => x.IdxPromessa == editRec.IdxPromessa)
|
.Where(x => x.IdxPromessa == editRec.IdxPromessa)
|
||||||
.FirstOrDefault();
|
.FirstOrDefault();
|
||||||
|
|
||||||
if (currRec != null)
|
if (currRec != null)
|
||||||
{
|
{
|
||||||
// eseguo stored attrezzaggio
|
// eseguo stored attrezzaggio
|
||||||
@@ -793,13 +862,9 @@ namespace MP.Data.Controllers
|
|||||||
var Note = new SqlParameter("@Note", note);
|
var Note = new SqlParameter("@Note", note);
|
||||||
var callResult = await dbCtx
|
var callResult = await dbCtx
|
||||||
.Database
|
.Database
|
||||||
.ExecuteSqlRawAsync("EXEC stp_ODL_inizioSetupPromessa @idxPromessa, @MatrOpr, @IdxMacchina @TCRichAttr, @PzPallet, @Note", IdxPromessa, MatrOpr, IdxMacchina, TCRichAttr, PzPallet, Note);
|
.ExecuteSqlRawAsync("EXEC stp_ODL_inizioSetupPromessa @idxPromessa, @MatrOpr, @IdxMacchina, @TCRichAttr, @PzPallet, @Note", IdxPromessa, MatrOpr, IdxMacchina, TCRichAttr, PzPallet, Note);
|
||||||
|
|
||||||
// recupero info su ODL corrente
|
answ = true;
|
||||||
dbResult = await dbCtx
|
|
||||||
.DbSetODL
|
|
||||||
.Where(x => x.IdxMacchina == editRec.IdxMacchina && x.DataInizio != null && x.DataFine == null)
|
|
||||||
.FirstOrDefaultAsync();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception exc)
|
catch (Exception exc)
|
||||||
@@ -808,7 +873,7 @@ namespace MP.Data.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
await Task.Delay(1);
|
await Task.Delay(1);
|
||||||
return dbResult;
|
return answ;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -866,6 +931,7 @@ namespace MP.Data.Controllers
|
|||||||
currRec.KeyRichiesta = editRec.KeyRichiesta;
|
currRec.KeyRichiesta = editRec.KeyRichiesta;
|
||||||
currRec.NumPezzi = editRec.NumPezzi;
|
currRec.NumPezzi = editRec.NumPezzi;
|
||||||
currRec.Tcassegnato = editRec.Tcassegnato;
|
currRec.Tcassegnato = editRec.Tcassegnato;
|
||||||
|
currRec.Attivabile = editRec.Attivabile;
|
||||||
currRec.Note = editRec.Note;
|
currRec.Note = editRec.Note;
|
||||||
dbCtx.Entry(currRec).State = EntityState.Modified;
|
dbCtx.Entry(currRec).State = EntityState.Modified;
|
||||||
}
|
}
|
||||||
@@ -911,29 +977,6 @@ namespace MP.Data.Controllers
|
|||||||
return answ;
|
return answ;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Statistiche ODL calcolate (da stored stp_STAT_ODL)
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
public async Task<List<StatODLModel>> StatOdl(int IdxOdl)
|
|
||||||
{
|
|
||||||
List<StatODLModel> dbResult = new List<StatODLModel>();
|
|
||||||
if (IdxOdl > 0)
|
|
||||||
{
|
|
||||||
using (var dbCtx = new MoonProContext(_configuration))
|
|
||||||
{
|
|
||||||
var IdxODL = new SqlParameter("@IdxODL", IdxOdl);
|
|
||||||
|
|
||||||
dbResult = await dbCtx
|
|
||||||
.DbSetStatOdl
|
|
||||||
.FromSqlRaw("EXEC stp_STAT_ODL @IdxODL", IdxODL)
|
|
||||||
.AsNoTracking()
|
|
||||||
.ToListAsync();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return dbResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stato prod macchina
|
/// Stato prod macchina
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Microsoft.JSInterop;
|
using Microsoft.JSInterop;
|
||||||
using MP.Data;
|
using MP.Data;
|
||||||
|
using MP.SPEC.Data;
|
||||||
using static System.Net.Mime.MediaTypeNames;
|
using static System.Net.Mime.MediaTypeNames;
|
||||||
|
|
||||||
namespace MP.SPEC.Components.Chart
|
namespace MP.SPEC.Components.Chart
|
||||||
@@ -28,7 +29,7 @@ namespace MP.SPEC.Components.Chart
|
|||||||
public double[] Data { get; set; }
|
public double[] Data { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public string[] BackgroundColor { get; set; }
|
public List<DoughnutStyling> BackgroundColor { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public string[] Labels { get; set; }
|
public string[] Labels { get; set; }
|
||||||
@@ -46,7 +47,7 @@ namespace MP.SPEC.Components.Chart
|
|||||||
{
|
{
|
||||||
Datasets = new[]
|
Datasets = new[]
|
||||||
{
|
{
|
||||||
new { Data = Data, BackgroundColor = BackgroundColor
|
new { Data = Data, BackgroundColor = BackgroundColor.Select(x=>x.color), borderColor = BackgroundColor.Select(x=>x.border), borderWidth= 0, offset= 1, borderRadius = 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Labels = Labels
|
Labels = Labels
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ namespace MP.SPEC.Components
|
|||||||
|
|
||||||
protected int _numRecord { get; set; } = 10;
|
protected int _numRecord { get; set; } = 10;
|
||||||
|
|
||||||
protected int percLoading { get; set; } = 0;
|
protected int percLoading { get; set; } = 0;
|
||||||
|
|
||||||
#endregion Protected Properties
|
#endregion Protected Properties
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ using MP.SPEC.Data;
|
|||||||
|
|
||||||
namespace MP.SPEC.Components
|
namespace MP.SPEC.Components
|
||||||
{
|
{
|
||||||
public partial class ListDossiers
|
public partial class ListDossiers: IDisposable
|
||||||
{
|
{
|
||||||
#region Public Properties
|
#region Public Properties
|
||||||
|
|
||||||
@@ -40,6 +40,16 @@ namespace MP.SPEC.Components
|
|||||||
}
|
}
|
||||||
return answ;
|
return answ;
|
||||||
}
|
}
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
MessageService.EA_PageUpdated -= MessageService_EA_PageUpdated;
|
||||||
|
MessageService.EA_SearchUpdated -= OnSeachUpdated;
|
||||||
|
currRecord = null;
|
||||||
|
SearchRecords = null;
|
||||||
|
ListRecords = null;
|
||||||
|
GC.Collect();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion Public Methods
|
#endregion Public Methods
|
||||||
|
|
||||||
@@ -81,18 +91,6 @@ namespace MP.SPEC.Components
|
|||||||
await RecordSelFlux.InvokeAsync(selRec);
|
await RecordSelFlux.InvokeAsync(selRec);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected string findRec(FluxLog record)
|
|
||||||
{
|
|
||||||
string answ = "";
|
|
||||||
#if false
|
|
||||||
if (ListRecordsMod != null)
|
|
||||||
{
|
|
||||||
answ = ListRecordsMod.Where(l => l.IdxMacchina == record.IdxMacchina && l.CodFlux == record.CodFlux).Select(x => x.Valore).SingleOrDefault();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return answ;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
MessageService.EA_PageUpdated += MessageService_EA_PageUpdated;
|
MessageService.EA_PageUpdated += MessageService_EA_PageUpdated;
|
||||||
|
|||||||
@@ -15,13 +15,14 @@ else
|
|||||||
@if (currRecord != null && !showStats && isCurrOdl)
|
@if (currRecord != null && !showStats && isCurrOdl)
|
||||||
{
|
{
|
||||||
<div class="col-6 col-lg-8">
|
<div class="col-6 col-lg-8">
|
||||||
|
<button @onclick="() => forceSyncDb()" class="btn btn-success btn-sm btn-">Forza sync dati ODL <i class="bi bi-fast-forward-circle"></i></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 col-lg-4 text-end">
|
<div class="col-6 col-lg-4 text-end">
|
||||||
@*<div class="px-2 input-group" title="Selezionare Data-Ora chiusura ODL">
|
@*<div class="px-2 input-group" title="Selezionare Data-Ora chiusura ODL">
|
||||||
<label class="input-group-text" for="dtMax"><i class="fa-regular fa-calendar-minus"></i></label>
|
<label class="input-group-text" for="dtMax"><i class="fa-regular fa-calendar-minus"></i></label>
|
||||||
<input class="form-control" @bind="@selDtFine" id="dtMax" type="datetime-local">
|
<input class="form-control" @bind="@selDtFine" id="dtMax" type="datetime-local">
|
||||||
<button @onclick="() => chiudiOdl()" class="btn btn-danger btn-sm btn-">Registra chiusura ODL <i class="far fa-stop-circle"></i></button>
|
<button @onclick="() => chiudiOdl()" class="btn btn-danger btn-sm btn-">Registra chiusura ODL <i class="far fa-stop-circle"></i></button>
|
||||||
</div>*@
|
</div>*@
|
||||||
<button @onclick="() => chiudiOdl()" class="btn btn-danger btn-sm btn-">Registra chiusura ODL <i class="far fa-stop-circle"></i></button>
|
<button @onclick="() => chiudiOdl()" class="btn btn-danger btn-sm btn-">Registra chiusura ODL <i class="far fa-stop-circle"></i></button>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@@ -110,7 +111,7 @@ else
|
|||||||
<b>@record.DurataMinuti</b>
|
<b>@record.DurataMinuti</b>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button class="btn btn-sm btn-primary py-0" type="button" @onclick="() => selectRecord(record)" data-bs-toggle="modal" data-bs-target="#myModal" title="Mostra statistiche"><i class="fa-solid fa-chart-pie"></i></button>
|
<button class="btn btn-sm btn-primary py-0" type="button" @onclick="() => selectStatRecord(record)" data-bs-toggle="modal" data-bs-target="#myModal" title="Mostra statistiche"><i class="fa-solid fa-chart-pie"></i></button>
|
||||||
</div>
|
</div>
|
||||||
<!-- Modal -->
|
<!-- Modal -->
|
||||||
</td>
|
</td>
|
||||||
@@ -122,26 +123,26 @@ else
|
|||||||
<div class="modal-dialog modal-dialog-centered modal-xl">
|
<div class="modal-dialog modal-dialog-centered modal-xl">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header bg-primary col-12">
|
<div class="modal-header bg-primary col-12">
|
||||||
@if (currRecord != null)
|
@if (statRecord != null)
|
||||||
{
|
{
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
<b class="modal-title fs-1" id="staticBackdropLabel"><b>ODL @currRecord.IdxOdl</b></b>
|
<b class="modal-title fs-1" id="staticBackdropLabel"><b>ODL @statRecord.IdxOdl</b></b>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 fs-5">
|
<div class="col-6 fs-5">
|
||||||
<b>@currRecord.CodArticolo</b>
|
<b>@statRecord.CodArticolo</b>
|
||||||
<div class="small textConsensed text-light">@currRecord.ArticoloNav.DescArticolo</div>
|
<div class="small textConsensed text-light">@statRecord.ArticoloNav.DescArticolo</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-2 fs-5">
|
<div class="col-2 fs-5">
|
||||||
<b>@currRecord.IdxMacchina</b>
|
<b>@statRecord.IdxMacchina</b>
|
||||||
<div class="small textConsensed text-light">@currRecord.MachineNav.Descrizione</div>
|
<div class="small textConsensed text-light">@statRecord.MachineNav.Descrizione</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
<div class="col-1 text-end">
|
<div class="col-1 text-end">
|
||||||
<button type="button" class="btn btn-close" data-bs-dismiss="modal" aria-label="Close" @onclick="TriggerDotNetInstanceMethod"></button>
|
<button type="button" class="btn btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body col-12">
|
<div class="modal-body col-12">
|
||||||
@if (currRecord != null && showStats)
|
@if (statRecord != null && showStats)
|
||||||
{
|
{
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
@@ -150,23 +151,23 @@ else
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width: 270px">
|
<td style="width: 270px">
|
||||||
<div class="small textConsensed"><b>N° pezzi:</b> @currRecord.NumPezzi</div>
|
<div class="small textConsensed"><b>N° pezzi:</b> @statRecord.NumPezzi</div>
|
||||||
<div class="small textConsensed"><b>T. Ciclo:</b> @currRecord.Tcassegnato.ToString("N3")</div>
|
<div class="small textConsensed"><b>T. Ciclo:</b> @statRecord.Tcassegnato.ToString("N3")</div>
|
||||||
</td>
|
</td>
|
||||||
<td style="width: 300px">
|
<td style="width: 300px">
|
||||||
<div class="small d-flex justify-content-between">
|
<div class="small d-flex justify-content-between">
|
||||||
<div>
|
<div>
|
||||||
<div><b>@($"{@currRecord.DataInizio:yyyy/MM/dd}")</b></div>
|
<div><b>@($"{@statRecord.DataInizio:yyyy/MM/dd}")</b></div>
|
||||||
<div>@($"{@currRecord.DataInizio:ddd HH:mm:ss}")</div>
|
<div>@($"{@statRecord.DataInizio:ddd HH:mm:ss}")</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-0">
|
<div class="p-0">
|
||||||
<i class="fa-solid fa-angles-right"></i>
|
<i class="fa-solid fa-angles-right"></i>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@if (@currRecord.DataFine != null)
|
@if (@statRecord.DataFine != null)
|
||||||
{
|
{
|
||||||
<div><b>@($"{@currRecord.DataFine:yyyy/MM/dd}")</b></div>
|
<div><b>@($"{@statRecord.DataFine:yyyy/MM/dd}")</b></div>
|
||||||
<div>@($"{@currRecord.DataFine:ddd HH:mm:ss}")</div>
|
<div>@($"{@statRecord.DataFine:ddd HH:mm:ss}")</div>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -178,10 +179,6 @@ else
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
|
||||||
|
|
||||||
<!-- Modal -->
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -192,12 +189,12 @@ else
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<div>
|
<div>
|
||||||
@tradFase(currRecord.KeyRichiesta)
|
@tradFase(statRecord.KeyRichiesta)
|
||||||
</div>
|
</div>
|
||||||
@if (currRecord.Note != "")
|
@if (statRecord.Note != "")
|
||||||
{
|
{
|
||||||
<div class="small textConsensed text-secondary badge text-bg-light border border-secondary rounded">
|
<div class="small textConsensed text-secondary badge text-bg-light border border-secondary rounded">
|
||||||
<b class="text-dark"></b> <span class="text-wrap text-start"> @currRecord.Note </span>
|
<b class="text-dark"></b> <span class="text-wrap text-start"> @statRecord.Note </span>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -206,25 +203,25 @@ else
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@if (currRecord != null)
|
@if (statRecord != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
@if (ListOdlStats != null)
|
@if (ListOdlStats != null)
|
||||||
{
|
{
|
||||||
@foreach (var statRecord in ListOdlStats)
|
@foreach (var stat in ListOdlStats)
|
||||||
{
|
{
|
||||||
<div class="p-1">
|
<div class="p-1">
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<div class="text-uppercase">
|
<div class="text-uppercase">
|
||||||
@statRecord.Descrizione
|
@stat.Descrizione
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<b>@(formDurata(statRecord.TotDurata))</b>
|
<b>@(formDurata(stat.TotDurata))</b>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
<div class="progress-bar @colorChanger(@statRecord.Css)" role="progressbar" aria-valuenow="0" aria-valuemin="0" style="width: @Math.Round(calcolaPerc(statRecord.TotDurata),0)%; background-color:@statRecord.Css;" aria-valuemax="100">@($"{calcolaPerc(statRecord.TotDurata):N1}%")</div>
|
<div class="progress-bar @colorChanger(@stat.Css)" role="progressbar" aria-valuenow="0" aria-valuemin="0" style="width: @Math.Round(calcolaPerc(stat.TotDurata),0)%; background-color:@pbStyle(@stat.Css);" aria-valuemax="100">@($"{calcolaPerc(stat.TotDurata):N1}%")</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -234,14 +231,14 @@ else
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 dcContainer">
|
<div class="col-4 dcContainer">
|
||||||
@if (currRecord != null && ListOdlStats != null)
|
@if (statRecord != null && ListOdlStats != null)
|
||||||
{
|
{
|
||||||
<div class="dcBox">
|
<div class="dcBox">
|
||||||
<ODLPlot SelectedOdl="@currRecord.IdxOdl"></ODLPlot>
|
<ODLPlot SelectedOdl="@statRecord.IdxOdl"></ODLPlot>
|
||||||
</div>
|
</div>
|
||||||
<div class="dcBox dcOverlay d-flex">
|
<div class="dcBox dcOverlay d-flex">
|
||||||
<div class="align-self-center text-center w-100">
|
<div class="align-self-center text-center w-100">
|
||||||
<b class="fs-3">@currRecord.DurataMinuti</b>
|
<b class="fs-3">@statRecord.DurataMinuti</b>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Microsoft.JSInterop;
|
using Microsoft.JSInterop;
|
||||||
using MP.Data;
|
|
||||||
using MP.Data.DatabaseModels;
|
using MP.Data.DatabaseModels;
|
||||||
using MP.SPEC.Data;
|
using MP.SPEC.Data;
|
||||||
using MP.SPEC.Pages;
|
using MP.SPEC.Services;
|
||||||
using System.Xml.Linq;
|
|
||||||
|
|
||||||
namespace MP.SPEC.Components
|
namespace MP.SPEC.Components
|
||||||
{
|
{
|
||||||
public partial class ListODL
|
public partial class ListODL : IDisposable
|
||||||
{
|
{
|
||||||
#region Public Properties
|
#region Public Properties
|
||||||
|
|
||||||
@@ -40,33 +38,22 @@ namespace MP.SPEC.Components
|
|||||||
return answ;
|
return answ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
currRecord = null;
|
||||||
|
SearchRecords = null;
|
||||||
|
ListRecords = null;
|
||||||
|
ListStati = null;
|
||||||
|
ListOdlStats = null;
|
||||||
|
statRecord = null;
|
||||||
|
GC.Collect();
|
||||||
|
}
|
||||||
|
|
||||||
public string formDurata(double durataMin)
|
public string formDurata(double durataMin)
|
||||||
{
|
{
|
||||||
return MP.Data.Utils.FormDurata(durataMin);
|
return MP.Data.Utils.FormDurata(durataMin);
|
||||||
}
|
}
|
||||||
|
|
||||||
//oggetto contenente le funzioni del code behind che sono jsInvokable
|
|
||||||
private DotNetObjectReference<ListODL>? objRef;
|
|
||||||
|
|
||||||
#if true //FUNZIONA SE IL METODO TriggerDotNetInstanceMethod() E' IN ONCLOCK BOTTONE
|
|
||||||
|
|
||||||
[JSInvokable]
|
|
||||||
public void svuotaRecord()
|
|
||||||
{
|
|
||||||
currRecord = null;
|
|
||||||
|
|
||||||
}
|
|
||||||
[JSInvokable]
|
|
||||||
public void setHelper()
|
|
||||||
{
|
|
||||||
objRef = DotNetObjectReference.Create(this);
|
|
||||||
}
|
|
||||||
public async Task TriggerDotNetInstanceMethod()
|
|
||||||
{
|
|
||||||
await JSRuntime.InvokeVoidAsync("recordDeselect", objRef);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endregion Public Methods
|
#endregion Public Methods
|
||||||
|
|
||||||
#region Protected Properties
|
#region Protected Properties
|
||||||
@@ -78,7 +65,7 @@ namespace MP.SPEC.Components
|
|||||||
protected MpDataService MDService { get; set; } = null!;
|
protected MpDataService MDService { get; set; } = null!;
|
||||||
|
|
||||||
[Inject]
|
[Inject]
|
||||||
protected MessageService MessageService { get; set; } = null!;
|
protected IOApiService MpIoApiCall { get; set; } = null!;
|
||||||
|
|
||||||
#endregion Protected Properties
|
#endregion Protected Properties
|
||||||
|
|
||||||
@@ -90,6 +77,9 @@ namespace MP.SPEC.Components
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected async Task chiudiOdl()
|
protected async Task chiudiOdl()
|
||||||
{
|
{
|
||||||
|
if (!await JSRuntime.InvokeAsync<bool>("confirm", "Sei sicuro di voler chiudere l'ODL corrente?"))
|
||||||
|
return;
|
||||||
|
|
||||||
if (currRecord != null)
|
if (currRecord != null)
|
||||||
{
|
{
|
||||||
// effettua chiusura sul DB
|
// effettua chiusura sul DB
|
||||||
@@ -100,18 +90,6 @@ namespace MP.SPEC.Components
|
|||||||
await reloadData();
|
await reloadData();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
|
||||||
{
|
|
||||||
ListStati = await MDService.AnagStatiComm();
|
|
||||||
objRef = DotNetObjectReference.Create(this);
|
|
||||||
//await JSRuntime.InvokeVoidAsync("setHelper", objRef);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override async Task OnParametersSetAsync()
|
|
||||||
{
|
|
||||||
await reloadData();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected string colorChanger(string colorCSS)
|
protected string colorChanger(string colorCSS)
|
||||||
{
|
{
|
||||||
string answ = "";
|
string answ = "";
|
||||||
@@ -122,13 +100,33 @@ namespace MP.SPEC.Components
|
|||||||
return answ;
|
return answ;
|
||||||
}
|
}
|
||||||
|
|
||||||
//protected double durataMin(DateTime? DataInizio, DateTime? DataFine)
|
/// <summary>
|
||||||
//{
|
/// Richiesta invio sync all'IOB-WIN
|
||||||
// DateTime end = DataInizio != null ? (DateTime)DataFine : DateTime.Now;
|
/// </summary>
|
||||||
// var tsDurata = (end).Subtract((DateTime)DataInizio);
|
/// <returns></returns>
|
||||||
|
protected async Task forceSyncDb()
|
||||||
|
{
|
||||||
|
if (!await JSRuntime.InvokeAsync<bool>("confirm", "Sei sicuro di voler reinviare i dati (Articoli, PODL) all'impianto?"))
|
||||||
|
return;
|
||||||
|
|
||||||
// return tsDurata.TotalMinutes;
|
if (currRecord != null)
|
||||||
//}
|
{
|
||||||
|
await callSyncDb(currRecord.IdxMacchina);
|
||||||
|
// ricarica...
|
||||||
|
await selectRecord(null);
|
||||||
|
}
|
||||||
|
await reloadData();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
ListStati = await MDService.AnagStatiComm();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override async Task OnParametersSetAsync()
|
||||||
|
{
|
||||||
|
await reloadData();
|
||||||
|
}
|
||||||
|
|
||||||
protected async void OnSeachUpdated()
|
protected async void OnSeachUpdated()
|
||||||
{
|
{
|
||||||
@@ -163,6 +161,23 @@ namespace MP.SPEC.Components
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected async Task selectStatRecord(ODLModel? currRec)
|
||||||
|
{
|
||||||
|
showStats = true;
|
||||||
|
await Task.Delay(1);
|
||||||
|
statRecord = currRec;
|
||||||
|
if (currRec != null)
|
||||||
|
{
|
||||||
|
showStats = true;
|
||||||
|
ListOdlStats = await MDService.StatOdl(currRec.IdxOdl);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
showStats = false;
|
||||||
|
ListOdlStats = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected async Task selRecord(ODLModel? currRec)
|
protected async Task selRecord(ODLModel? currRec)
|
||||||
{
|
{
|
||||||
await Task.Delay(1);
|
await Task.Delay(1);
|
||||||
@@ -192,14 +207,18 @@ namespace MP.SPEC.Components
|
|||||||
|
|
||||||
private List<ODLModel>? SearchRecords;
|
private List<ODLModel>? SearchRecords;
|
||||||
|
|
||||||
|
private ODLModel? statRecord = null;
|
||||||
|
|
||||||
#endregion Private Fields
|
#endregion Private Fields
|
||||||
|
|
||||||
#region Private Properties
|
#region Private Properties
|
||||||
|
|
||||||
|
private int _totalCount { get; set; } = 0;
|
||||||
|
|
||||||
private int currPage
|
private int currPage
|
||||||
{
|
{
|
||||||
get => MessageService.currPage;
|
get => currFilter.CurrPage;
|
||||||
set => MessageService.currPage = value;
|
set => currFilter.CurrPage = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -214,22 +233,49 @@ namespace MP.SPEC.Components
|
|||||||
|
|
||||||
private int numRecord
|
private int numRecord
|
||||||
{
|
{
|
||||||
get => MessageService.numRecord;
|
get => currFilter.NumRec;
|
||||||
set => MessageService.numRecord = value;
|
set => currFilter.NumRec = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
private DateTime selDtFine { get; set; } = DateTime.Now;
|
private DateTime selDtFine { get; set; } = DateTime.Now;
|
||||||
|
|
||||||
private bool showStats { get; set; } = false;
|
private bool showStats { get; set; } = false;
|
||||||
#if false
|
|
||||||
private List<double>? ListOdlStatsData = new List<double>();
|
private int totalCount
|
||||||
private List<string>? ListOdlStatsLabels = new List<string>();
|
{
|
||||||
#endif
|
get => _totalCount;
|
||||||
private int totalCount { get; set; } = 0;
|
set
|
||||||
|
{
|
||||||
|
if (_totalCount != value)
|
||||||
|
{
|
||||||
|
_totalCount = value;
|
||||||
|
updateRecordCount.InvokeAsync(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion Private Properties
|
#endregion Private Properties
|
||||||
|
|
||||||
#region Private Methods
|
#region Private Methods
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Chiama metodo x chiedere sync DB
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="selRec"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private async Task addTask2Exe(string idxMacc, string taskName, string taskVal)
|
||||||
|
{
|
||||||
|
// compongo URL e chiamo
|
||||||
|
string restUrl = $"IOB/addTask2Exe/{idxMacc}?taskName={taskName}&taskVal={taskVal}";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var response = await MpIoApiCall.callMpIoUrlGet(restUrl);
|
||||||
|
}
|
||||||
|
catch (Exception exc)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private double calcolaPerc(double durata)
|
private double calcolaPerc(double durata)
|
||||||
{
|
{
|
||||||
double answ = 0;
|
double answ = 0;
|
||||||
@@ -255,9 +301,36 @@ namespace MP.SPEC.Components
|
|||||||
return answ;
|
return answ;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void MessageService_EA_PageUpdated()
|
/// <summary>
|
||||||
|
/// Chiama metodo x chiedere sync DB
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="IdxMacc"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private async Task callSyncDb(string IdxMacc)
|
||||||
{
|
{
|
||||||
await reloadData();
|
// chiamo aggiunta task SyncDb...
|
||||||
|
await addTask2Exe(IdxMacc, "syncDbData", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
private string pbStyle(string css)
|
||||||
|
{
|
||||||
|
string answ = "";
|
||||||
|
if (ListOdlStats != null)
|
||||||
|
{
|
||||||
|
if (css == "yellow")
|
||||||
|
{
|
||||||
|
answ = "orange";
|
||||||
|
}
|
||||||
|
else if (css == "blue")
|
||||||
|
{
|
||||||
|
answ = "#2874A6";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
answ = css;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return answ;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task reloadData()
|
private async Task reloadData()
|
||||||
@@ -268,7 +341,6 @@ namespace MP.SPEC.Components
|
|||||||
ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
|
ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
|
||||||
await Task.Delay(1);
|
await Task.Delay(1);
|
||||||
await InvokeAsync(() => StateHasChanged());
|
await InvokeAsync(() => StateHasChanged());
|
||||||
await updateRecordCount.InvokeAsync(totalCount);
|
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,6 +62,10 @@ namespace MP.SPEC.Components
|
|||||||
MessageService.EA_SearchUpdated -= OnSeachUpdated;
|
MessageService.EA_SearchUpdated -= OnSeachUpdated;
|
||||||
aTimer.Stop();
|
aTimer.Stop();
|
||||||
aTimer.Dispose();
|
aTimer.Dispose();
|
||||||
|
currRecord = null;
|
||||||
|
SearchRecords = null;
|
||||||
|
ListRecords = null;
|
||||||
|
GC.Collect();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ElapsedTimer(object? source, System.Timers.ElapsedEventArgs e)
|
public void ElapsedTimer(object? source, System.Timers.ElapsedEventArgs e)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
@using MP.SPEC.Components
|
@using MP.SPEC.Components
|
||||||
@using MP.SPEC.Data
|
@using MP.SPEC.Data
|
||||||
|
|
||||||
@if (ListRecords == null)
|
@if (ListRecords == null || isLoading)
|
||||||
{
|
{
|
||||||
<LoadingData></LoadingData>
|
<LoadingData></LoadingData>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,10 +6,15 @@ using MP.SPEC.Services;
|
|||||||
|
|
||||||
namespace MP.SPEC.Components
|
namespace MP.SPEC.Components
|
||||||
{
|
{
|
||||||
public partial class ListPODL
|
public partial class ListPODL : IDisposable
|
||||||
{
|
{
|
||||||
#region Public Properties
|
#region Public Properties
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public SelectPOdlParams actFilter { get; set; } = new SelectPOdlParams();
|
||||||
|
|
||||||
|
private SelectPOdlParams lastFilter { get; set; } = new SelectPOdlParams() { CurrPage = -1 };
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public EventCallback<bool> PagerResetReq { get; set; }
|
public EventCallback<bool> PagerResetReq { get; set; }
|
||||||
|
|
||||||
@@ -40,6 +45,15 @@ namespace MP.SPEC.Components
|
|||||||
|
|
||||||
#endregion Public Methods
|
#endregion Public Methods
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
currRecord = null;
|
||||||
|
SearchRecords = null;
|
||||||
|
ListRecords = null;
|
||||||
|
ListStati = null;
|
||||||
|
GC.Collect();
|
||||||
|
}
|
||||||
|
|
||||||
#region Protected Properties
|
#region Protected Properties
|
||||||
|
|
||||||
[Inject]
|
[Inject]
|
||||||
@@ -51,9 +65,6 @@ namespace MP.SPEC.Components
|
|||||||
[Inject]
|
[Inject]
|
||||||
protected IOApiService MpIoApiCall { get; set; } = null!;
|
protected IOApiService MpIoApiCall { get; set; } = null!;
|
||||||
|
|
||||||
[Inject]
|
|
||||||
protected MessageService MsgService { get; set; } = null!;
|
|
||||||
|
|
||||||
#endregion Protected Properties
|
#endregion Protected Properties
|
||||||
|
|
||||||
#region Protected Methods
|
#region Protected Methods
|
||||||
@@ -103,15 +114,17 @@ namespace MP.SPEC.Components
|
|||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
MsgService.EA_PageUpdated += MessageService_EA_PageUpdated;
|
//await FilterChanged.InvokeAsync(actFilter);
|
||||||
MsgService.EA_SearchUpdated += OnSeachUpdated;
|
|
||||||
MsgService.EA_StatoSearch += MsgService_EA_StatoSearch;
|
|
||||||
ListStati = await MDService.AnagStatiComm();
|
ListStati = await MDService.AnagStatiComm();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override async Task OnParametersSetAsync()
|
protected override async Task OnParametersSetAsync()
|
||||||
{
|
{
|
||||||
await reloadData();
|
if (!lastFilter.Equals(actFilter))
|
||||||
|
{
|
||||||
|
lastFilter = actFilter.clone();
|
||||||
|
await reloadData();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async void OnSeachUpdated()
|
protected async void OnSeachUpdated()
|
||||||
@@ -144,6 +157,9 @@ namespace MP.SPEC.Components
|
|||||||
|
|
||||||
protected async Task startOdl(PODLModel selRec)
|
protected async Task startOdl(PODLModel selRec)
|
||||||
{
|
{
|
||||||
|
if (!await JSRuntime.InvokeAsync<bool>("confirm", "Sei sicuro di voler avviare PODL selezionato?"))
|
||||||
|
return;
|
||||||
|
|
||||||
if (selRec != null)
|
if (selRec != null)
|
||||||
{
|
{
|
||||||
int idxEvento = 0;
|
int idxEvento = 0;
|
||||||
@@ -154,9 +170,12 @@ namespace MP.SPEC.Components
|
|||||||
await callStartSetup(selRec.IdxMacchina);
|
await callStartSetup(selRec.IdxMacchina);
|
||||||
await Task.Delay(1);
|
await Task.Delay(1);
|
||||||
// chiamo stored stp_ODL_inizioSetupPromessa e recupero ODL corrente
|
// chiamo stored stp_ODL_inizioSetupPromessa e recupero ODL corrente
|
||||||
var newOdl = await MDService.POdlDoSetup(selRec);
|
bool fatto = await MDService.POdlDoSetup(selRec);
|
||||||
if (newOdl != null)
|
if (fatto)
|
||||||
{
|
{
|
||||||
|
var currPOdl = await MDService.PODL_getByKey(selRec.IdxPromessa);
|
||||||
|
var newOdl = await MDService.OdlGetByKey(currPOdl.IdxOdl);
|
||||||
|
|
||||||
// registro evento...
|
// registro evento...
|
||||||
idxEvento = 2;
|
idxEvento = 2;
|
||||||
evMess = $"Inizio Setup | PODL {selRec.IdxPromessa}";
|
evMess = $"Inizio Setup | PODL {selRec.IdxPromessa}";
|
||||||
@@ -204,32 +223,45 @@ namespace MP.SPEC.Components
|
|||||||
|
|
||||||
#region Private Properties
|
#region Private Properties
|
||||||
|
|
||||||
|
private int _totalCount { get; set; } = 0;
|
||||||
|
|
||||||
private int currPage
|
private int currPage
|
||||||
{
|
{
|
||||||
get => MsgService.currPage;
|
get => actFilter.CurrPage;
|
||||||
set => MsgService.currPage = value;
|
set => actFilter.CurrPage = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool isLoading { get; set; } = false;
|
private bool isLoading { get; set; } = false;
|
||||||
|
|
||||||
private int numRecord
|
private int numRecord
|
||||||
{
|
{
|
||||||
get => MsgService.numRecord;
|
get => actFilter.NumRec;
|
||||||
set => MsgService.numRecord = value;
|
set => actFilter.NumRec = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string SearchVal
|
private string SearchVal
|
||||||
{
|
{
|
||||||
get => string.IsNullOrEmpty(MsgService.SearchVal) ? "*" : MsgService.SearchVal;
|
get => string.IsNullOrEmpty(actFilter.SearchVal) ? "*" : actFilter.SearchVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string StatoSel
|
private string StatoSel
|
||||||
{
|
{
|
||||||
get => MsgService.StateSel;
|
get => actFilter.CodFase;
|
||||||
set => MsgService.StateSel = value;
|
set => actFilter.CodFase = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int totalCount { get; set; } = 0;
|
private int totalCount
|
||||||
|
{
|
||||||
|
get => _totalCount;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (_totalCount != value)
|
||||||
|
{
|
||||||
|
_totalCount = value;
|
||||||
|
updateRecordCount.InvokeAsync(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion Private Properties
|
#endregion Private Properties
|
||||||
|
|
||||||
@@ -244,7 +276,13 @@ namespace MP.SPEC.Components
|
|||||||
{
|
{
|
||||||
// compongo URL e chiamo
|
// compongo URL e chiamo
|
||||||
string restUrl = $"IOB/addTask2Exe/{idxMacc}?taskName={taskName}&taskVal={taskVal}";
|
string restUrl = $"IOB/addTask2Exe/{idxMacc}?taskName={taskName}&taskVal={taskVal}";
|
||||||
var response = await MpIoApiCall.callMpIoUrlGet(restUrl);
|
try
|
||||||
|
{
|
||||||
|
var response = await MpIoApiCall.callMpIoUrlGet(restUrl);
|
||||||
|
}
|
||||||
|
catch (Exception exc)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -278,11 +316,6 @@ namespace MP.SPEC.Components
|
|||||||
{
|
{
|
||||||
// chiamo aggiunta task SyncDb...
|
// chiamo aggiunta task SyncDb...
|
||||||
await addTask2Exe(IdxMacc, "syncDbData", "");
|
await addTask2Exe(IdxMacc, "syncDbData", "");
|
||||||
#if false
|
|
||||||
string idxMacc = selRec.IdxMacchina;
|
|
||||||
string restUrl = $"IOB/addTask2Exe/{idxMacc}?taskName=syncDbData&taskVal=";
|
|
||||||
var response = await MpIoApiCall.callMpIoUrlGet(restUrl);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -292,27 +325,11 @@ namespace MP.SPEC.Components
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private bool canStartOdl(string idxMacchina)
|
private bool canStartOdl(string idxMacchina)
|
||||||
{
|
{
|
||||||
// fare!!!
|
var listOdlCurr = MDService.OdlGetCurrent();
|
||||||
bool answ = idxMacchina.Contains("BAG");
|
bool answ = !listOdlCurr.Contains(idxMacchina);
|
||||||
return answ;
|
return answ;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void MessageService_EA_PageUpdated()
|
|
||||||
{
|
|
||||||
await reloadData();
|
|
||||||
}
|
|
||||||
|
|
||||||
private async void MsgService_EA_StatoSearch()
|
|
||||||
{
|
|
||||||
await InvokeAsync(() =>
|
|
||||||
{
|
|
||||||
PagerResetReq.InvokeAsync(true);
|
|
||||||
//currPage = 1;
|
|
||||||
Task task = UpdateData();
|
|
||||||
StateHasChanged();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// processa evento richiesto
|
/// processa evento richiesto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -326,7 +343,10 @@ namespace MP.SPEC.Components
|
|||||||
if (string.IsNullOrEmpty(codArticolo))
|
if (string.IsNullOrEmpty(codArticolo))
|
||||||
{
|
{
|
||||||
var currOdl = await MDService.OdlGetByKey(idxODL);
|
var currOdl = await MDService.OdlGetByKey(idxODL);
|
||||||
codArticolo = currOdl.CodArticolo;
|
if (currOdl != null)
|
||||||
|
{
|
||||||
|
codArticolo = currOdl.CodArticolo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// scrivo evento scriviRigaEventoBarcode
|
// scrivo evento scriviRigaEventoBarcode
|
||||||
@@ -352,7 +372,7 @@ namespace MP.SPEC.Components
|
|||||||
ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
|
ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
|
||||||
await Task.Delay(1);
|
await Task.Delay(1);
|
||||||
await InvokeAsync(() => StateHasChanged());
|
await InvokeAsync(() => StateHasChanged());
|
||||||
await updateRecordCount.InvokeAsync(totalCount);
|
//await updateRecordCount.InvokeAsync(totalCount);
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<MP.SPEC.Components.Chart.Doughnut Type="@Chart.Doughnut.ChartType.Doughnut" Data="@Data.ToArray()" BackgroundColor="@colors.ToArray()"></MP.SPEC.Components.Chart.Doughnut>
|
<MP.SPEC.Components.Chart.Doughnut Type="@Chart.Doughnut.ChartType.Doughnut" Data="@Data.ToArray()" BackgroundColor="@colors"></MP.SPEC.Components.Chart.Doughnut>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@@ -49,7 +49,7 @@ namespace MP.SPEC.Components
|
|||||||
|
|
||||||
public List<double> Data = new List<double>();
|
public List<double> Data = new List<double>();
|
||||||
public List<string> Labels = new List<string>();
|
public List<string> Labels = new List<string>();
|
||||||
public List<string> colors = new List<string>();
|
public List<DoughnutStyling> colors = new List<DoughnutStyling>();
|
||||||
|
|
||||||
protected async Task ReloadData()
|
protected async Task ReloadData()
|
||||||
{
|
{
|
||||||
@@ -61,7 +61,20 @@ namespace MP.SPEC.Components
|
|||||||
{
|
{
|
||||||
Data.Add(record.TotDurata);
|
Data.Add(record.TotDurata);
|
||||||
Labels.Add($"{record.Descrizione} - {record.TotDurata:N1}min");
|
Labels.Add($"{record.Descrizione} - {record.TotDurata:N1}min");
|
||||||
colors.Add(record.Css);
|
if (record.Css == "yellow")
|
||||||
|
{
|
||||||
|
colors.Add(new DoughnutStyling("orange", "ccc"));
|
||||||
|
}
|
||||||
|
else if (record.Css == "blue")
|
||||||
|
{
|
||||||
|
colors.Add(new DoughnutStyling("#2874A6", "ccc"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
colors.Add(new DoughnutStyling(record.Css, "ccc"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
await Task.Delay(1);
|
await Task.Delay(1);
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
using System.Drawing;
|
||||||
|
|
||||||
|
namespace MP.SPEC.Data
|
||||||
|
{
|
||||||
|
public class DoughnutStyling
|
||||||
|
{
|
||||||
|
public string color { get; set; }
|
||||||
|
public string border { get; set; }
|
||||||
|
|
||||||
|
public DoughnutStyling(string color, string border)
|
||||||
|
{
|
||||||
|
this.color = color;
|
||||||
|
this.border = border;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -664,6 +664,48 @@ namespace MP.SPEC.Data
|
|||||||
return dbResult;
|
return dbResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ODL correnti (tutti)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="idxMacchina"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public List<string> OdlGetCurrent()
|
||||||
|
{
|
||||||
|
List<string> dbResult = new List<string>();
|
||||||
|
Stopwatch stopWatch = new Stopwatch();
|
||||||
|
stopWatch.Start();
|
||||||
|
string readType = "DB";
|
||||||
|
string currKey = $"{redisOdlCurrByMac}";
|
||||||
|
// cerco in redis dato valore sel macchina...
|
||||||
|
RedisValue rawData = redisDb.StringGet(currKey);
|
||||||
|
if (rawData.HasValue)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
dbResult = JsonConvert.DeserializeObject<List<string>>($"{rawData}");
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{ }
|
||||||
|
readType = "REDIS";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dbResult = dbController.OdlGetCurrent().Select(x => x.IdxMacchina).Distinct().ToList();
|
||||||
|
rawData = JsonConvert.SerializeObject(dbResult);
|
||||||
|
redisDb.StringSet(currKey, rawData, TimeSpan.FromSeconds(3));
|
||||||
|
}
|
||||||
|
if (dbResult == null)
|
||||||
|
{
|
||||||
|
dbResult = new List<string>();
|
||||||
|
}
|
||||||
|
stopWatch.Stop();
|
||||||
|
TimeSpan ts = stopWatch.Elapsed;
|
||||||
|
Log.Debug($"OdlGetCurrent | Read from {readType}: {ts.TotalMilliseconds}ms");
|
||||||
|
|
||||||
|
|
||||||
|
return dbResult;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Elenco di tutti i parametri filtrati x macchina
|
/// Elenco di tutti i parametri filtrati x macchina
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -700,6 +742,16 @@ namespace MP.SPEC.Data
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Recupero PODL da chiave
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="idxPODL"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<PODLModel> PODL_getByKey(int idxPODL)
|
||||||
|
{
|
||||||
|
return await dbController.PODL_getByKey(idxPODL);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Eliminazione record selezionato
|
/// Eliminazione record selezionato
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -715,7 +767,7 @@ namespace MP.SPEC.Data
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="currRec"></param>
|
/// <param name="currRec"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<ODLModel> POdlDoSetup(PODLModel currRec)
|
public async Task<bool> POdlDoSetup(PODLModel currRec)
|
||||||
{
|
{
|
||||||
return await dbController.PODL_startSetup(currRec, 0, 1, 1, "");
|
return await dbController.PODL_startSetup(currRec, 0, 1, 1, "");
|
||||||
}
|
}
|
||||||
@@ -736,7 +788,7 @@ namespace MP.SPEC.Data
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public Task<List<StatODLModel>> StatOdl(int IdxOdl)
|
public Task<List<StatODLModel>> StatOdl(int IdxOdl)
|
||||||
{
|
{
|
||||||
return dbController.StatOdl(IdxOdl);
|
return dbController.OdlStart(IdxOdl);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<bool> updateDossierValue(Dossiers currDoss, FluxLogDTO editFL)
|
public async Task<bool> updateDossierValue(Dossiers currDoss, FluxLogDTO editFL)
|
||||||
@@ -812,6 +864,7 @@ namespace MP.SPEC.Data
|
|||||||
private const string redisDossByMac = redisBaseAddr + "SPEC:Cache:DossByMac";
|
private const string redisDossByMac = redisBaseAddr + "SPEC:Cache:DossByMac";
|
||||||
|
|
||||||
private const string redisFluxByMac = redisBaseAddr + "SPEC:Cache:FluxByMac";
|
private const string redisFluxByMac = redisBaseAddr + "SPEC:Cache:FluxByMac";
|
||||||
|
private const string redisOdlCurrByMac = redisBaseAddr + "SPEC:Cache:OdlByMac";
|
||||||
|
|
||||||
private const string redisMacByFlux = redisBaseAddr + "SPEC:Cache:MacByFlux";
|
private const string redisMacByFlux = redisBaseAddr + "SPEC:Cache:MacByFlux";
|
||||||
private const string redisMacList = redisBaseAddr + "SPEC:Cache:MacList";
|
private const string redisMacList = redisBaseAddr + "SPEC:Cache:MacList";
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ namespace MP.SPEC.Data
|
|||||||
public string IdxMacchina { get; set; } = "*";
|
public string IdxMacchina { get; set; } = "*";
|
||||||
public int CurrPage { get; set; } = 1;
|
public int CurrPage { get; set; } = 1;
|
||||||
public int NumRec { get; set; } = 10;
|
public int NumRec { get; set; } = 10;
|
||||||
|
public int TotCount { get; set; } = 0;
|
||||||
public DateTime DtEnd { get; set; } = Utils.InitDatetime(DateTime.Now, 5);
|
public DateTime DtEnd { get; set; } = Utils.InitDatetime(DateTime.Now, 5);
|
||||||
public DateTime DtStart { get; set; } = Utils.InitDatetime(DateTime.Now, 5).AddDays(-7);
|
public DateTime DtStart { get; set; } = Utils.InitDatetime(DateTime.Now, 5).AddDays(-7);
|
||||||
public int MaxRecord { get; set; } = 100;
|
public int MaxRecord { get; set; } = 100;
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
namespace MP.SPEC.Data
|
||||||
|
{
|
||||||
|
public class SelectPOdlParams
|
||||||
|
{
|
||||||
|
#region Public Constructors
|
||||||
|
|
||||||
|
public SelectPOdlParams()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
#endregion Public Constructors
|
||||||
|
|
||||||
|
#region Public Properties
|
||||||
|
|
||||||
|
public string CodFase { get; set; } = "*";
|
||||||
|
|
||||||
|
public int CurrPage { get; set; } = 1;
|
||||||
|
|
||||||
|
public string IdxMacchina { get; set; } = "*";
|
||||||
|
|
||||||
|
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 SelectPOdlParams clone()
|
||||||
|
{
|
||||||
|
SelectPOdlParams clonedData = new SelectPOdlParams()
|
||||||
|
{
|
||||||
|
CodFase = this.CodFase,
|
||||||
|
CurrPage = this.CurrPage,
|
||||||
|
IdxMacchina = this.IdxMacchina,
|
||||||
|
MaxRecord = this.MaxRecord,
|
||||||
|
NumRec = this.NumRec,
|
||||||
|
SearchVal = this.SearchVal,
|
||||||
|
TotCount = this.TotCount
|
||||||
|
};
|
||||||
|
return clonedData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Equals(object obj)
|
||||||
|
{
|
||||||
|
if (!(obj is SelectPOdlParams item))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (CodFase != item.CodFase)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (MaxRecord != item.MaxRecord)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (NumRec != item.NumRec)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (TotCount != item.TotCount)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (CurrPage != item.CurrPage)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (IdxMacchina != item.IdxMacchina)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (SearchVal != item.SearchVal)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
return base.GetHashCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion Public Methods
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<RootNamespace>MP.SPEC</RootNamespace>
|
<RootNamespace>MP.SPEC</RootNamespace>
|
||||||
<Version>6.16.2210.1808</Version>
|
<Version>6.16.2210.1817</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -27,6 +27,12 @@ namespace MP.SPEC.Pages
|
|||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
MessageService.EA_SearchUpdated -= OnSeachUpdated;
|
MessageService.EA_SearchUpdated -= OnSeachUpdated;
|
||||||
|
currRecord = null;
|
||||||
|
ListTipoArt = null;
|
||||||
|
ListAziende = null;
|
||||||
|
SearchRecords = null;
|
||||||
|
ListRecords = null;
|
||||||
|
GC.Collect();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async void OnSeachUpdated()
|
public async void OnSeachUpdated()
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ namespace MP.SPEC.Pages
|
|||||||
|
|
||||||
#region Protected Fields
|
#region Protected Fields
|
||||||
|
|
||||||
protected DataPager pagerODL;
|
protected DataPager pagerODL = null!;
|
||||||
|
|
||||||
#endregion Protected Fields
|
#endregion Protected Fields
|
||||||
|
|
||||||
@@ -44,9 +44,6 @@ namespace MP.SPEC.Pages
|
|||||||
[Inject]
|
[Inject]
|
||||||
protected MpDataService MDService { get; set; } = null!;
|
protected MpDataService MDService { get; set; } = null!;
|
||||||
|
|
||||||
[Inject]
|
|
||||||
protected MessageService MsgService { get; set; } = null!;
|
|
||||||
|
|
||||||
protected DateTime selDtEnd
|
protected DateTime selDtEnd
|
||||||
{
|
{
|
||||||
get => currFilter.DtEnd;
|
get => currFilter.DtEnd;
|
||||||
@@ -87,16 +84,8 @@ namespace MP.SPEC.Pages
|
|||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
// abilito ricerca...
|
|
||||||
MsgService.ShowSearch = true;
|
|
||||||
// resetto search
|
|
||||||
MsgService.SearchVal = "";
|
|
||||||
ListStati = await MDService.AnagStatiComm();
|
ListStati = await MDService.AnagStatiComm();
|
||||||
ListMacchine = await MDService.MacchineWithFlux();
|
ListMacchine = await MDService.MacchineWithFlux();
|
||||||
#if false
|
|
||||||
// carico dati
|
|
||||||
await reloadData();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async Task pgResetReq(bool doReset)
|
protected async Task pgResetReq(bool doReset)
|
||||||
@@ -134,8 +123,8 @@ namespace MP.SPEC.Pages
|
|||||||
|
|
||||||
private int currPage
|
private int currPage
|
||||||
{
|
{
|
||||||
get => MsgService.currPage;
|
get => currFilter.CurrPage;
|
||||||
set => MsgService.currPage = value;
|
set => currFilter.CurrPage = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool isLoading { get; set; } = false;
|
private bool isLoading { get; set; } = false;
|
||||||
@@ -147,8 +136,8 @@ namespace MP.SPEC.Pages
|
|||||||
|
|
||||||
private int numRecord
|
private int numRecord
|
||||||
{
|
{
|
||||||
get => MsgService.numRecord;
|
get => currFilter.NumRec;
|
||||||
set => MsgService.numRecord = value;
|
set => currFilter.NumRec = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string rightStringCSS
|
private string rightStringCSS
|
||||||
@@ -169,8 +158,8 @@ namespace MP.SPEC.Pages
|
|||||||
|
|
||||||
private int totalCount
|
private int totalCount
|
||||||
{
|
{
|
||||||
get => MsgService.totalCount;
|
get => currFilter.TotCount;
|
||||||
set => MsgService.totalCount = value;
|
set => currFilter.TotCount = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Private Properties
|
#endregion Private Properties
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<div class="card mb-5">
|
<div class="card mb-5">
|
||||||
<div class="card-header table-primary">
|
<div class="card-header table-primary">
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<div class="col-6">
|
<div class="col-6 col-lg-8">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<div class="px-2">
|
<div class="px-2">
|
||||||
<h3><b>P</b>romesse <b>ODL</b></h3>
|
<h3><b>P</b>romesse <b>ODL</b></h3>
|
||||||
@@ -17,9 +17,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6 col-lg-4">
|
||||||
<div class="input-group input-group-sm">
|
<div class="input-group input-group-sm">
|
||||||
<label class="input-group-text" for="maxRecord" title="Selezionare l'azienda da visualizzare"><i class="fa-solid fa-industry"></i></label>
|
@*<label class="input-group-text" for="maxRecord" title="Selezionare l'azienda da visualizzare"><i class="fa-solid fa-industry"></i></label>
|
||||||
<select @bind="@currAzienda" class="form-select" title="Selezionare l'azienda da visualizzare">
|
<select @bind="@currAzienda" class="form-select" title="Selezionare l'azienda da visualizzare">
|
||||||
@if (ListAziende != null)
|
@if (ListAziende != null)
|
||||||
{
|
{
|
||||||
@@ -28,9 +28,9 @@
|
|||||||
<option value="@item.CodGruppo">@item.DescrGruppo</option>
|
<option value="@item.CodGruppo">@item.DescrGruppo</option>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</select>
|
</select>*@
|
||||||
<label class="input-group-text" for="maxRecord" title="Selezionare la fase da visualizzare"><i class="fa-solid fa-screwdriver-wrench"></i></label>
|
<label class="input-group-text" for="maxRecord" title="Selezionare la fase da visualizzare"><i class="fa-solid fa-screwdriver-wrench"></i></label>
|
||||||
<select @bind="@selStato" class="form-select" title="Selezionare la fase da visualizzare">
|
<select @bind="@currFase" class="form-select" title="Selezionare la fase da visualizzare">
|
||||||
<option value="*">--- Tutti ---</option>
|
<option value="*">--- Tutti ---</option>
|
||||||
@if (ListStati != null)
|
@if (ListStati != null)
|
||||||
{
|
{
|
||||||
@@ -222,13 +222,10 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<ListPODL PagerResetReq="pgResetReq" RecordSel="@selRecord" updateRecordCount="UpdateTotCount"></ListPODL>
|
<ListPODL PagerResetReq="pgResetReq" RecordSel="@selRecord" updateRecordCount="UpdateTotCount" actFilter="@currFilter"></ListPODL>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer py-1">
|
<div class="card-footer py-1">
|
||||||
<DataPager @ref="pagerODL" PageSize="numRecord" currPage="currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" totalCount="totalCount" showLoading="isLoading" />
|
<DataPager @ref="pagerODL" PageSize="numRecord" currPage="currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" totalCount="totalCount" showLoading="@isLoading" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+21
-26
@@ -11,7 +11,7 @@ namespace MP.SPEC.Pages
|
|||||||
{
|
{
|
||||||
#region Protected Fields
|
#region Protected Fields
|
||||||
|
|
||||||
protected DataPager pagerODL;
|
protected DataPager pagerODL = null!;
|
||||||
|
|
||||||
protected bool reqNew = false;
|
protected bool reqNew = false;
|
||||||
|
|
||||||
@@ -28,9 +28,6 @@ namespace MP.SPEC.Pages
|
|||||||
[Inject]
|
[Inject]
|
||||||
protected IOApiService MpIoApiCall { get; set; } = null!;
|
protected IOApiService MpIoApiCall { get; set; } = null!;
|
||||||
|
|
||||||
[Inject]
|
|
||||||
protected MessageService MsgService { get; set; } = null!;
|
|
||||||
|
|
||||||
[Inject]
|
[Inject]
|
||||||
protected NavigationManager NavManager { get; set; } = null!;
|
protected NavigationManager NavManager { get; set; } = null!;
|
||||||
|
|
||||||
@@ -70,10 +67,6 @@ namespace MP.SPEC.Pages
|
|||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
// abilito ricerca...
|
|
||||||
MsgService.ShowSearch = true;
|
|
||||||
// resetto search
|
|
||||||
MsgService.SearchVal = "";
|
|
||||||
ListAziende = await MDService.ElencoAziende();
|
ListAziende = await MDService.ElencoAziende();
|
||||||
ListGruppiFase = await MDService.ElencoGruppiFase();
|
ListGruppiFase = await MDService.ElencoGruppiFase();
|
||||||
ListMacchine = await MDService.MacchineGetAll();
|
ListMacchine = await MDService.MacchineGetAll();
|
||||||
@@ -110,7 +103,7 @@ namespace MP.SPEC.Pages
|
|||||||
var firstArt = ListArticoli.FirstOrDefault();
|
var firstArt = ListArticoli.FirstOrDefault();
|
||||||
currArticolo = firstArt != null ? firstArt.CodArticolo : "";
|
currArticolo = firstArt != null ? firstArt.CodArticolo : "";
|
||||||
}
|
}
|
||||||
string codExt = $"{selStato}";
|
string codExt = $"{currFase}";
|
||||||
string codGruppo = "";
|
string codGruppo = "";
|
||||||
if (ListGruppiFase != null && ListGruppiFase.Count > 0)
|
if (ListGruppiFase != null && ListGruppiFase.Count > 0)
|
||||||
{
|
{
|
||||||
@@ -170,15 +163,10 @@ namespace MP.SPEC.Pages
|
|||||||
#region Private Fields
|
#region Private Fields
|
||||||
|
|
||||||
private PODLModel? _currRecord = null;
|
private PODLModel? _currRecord = null;
|
||||||
|
|
||||||
private List<AnagArticoli>? ListArticoli;
|
private List<AnagArticoli>? ListArticoli;
|
||||||
|
|
||||||
private List<AnagGruppi>? ListAziende;
|
private List<AnagGruppi>? ListAziende;
|
||||||
|
|
||||||
private List<AnagGruppi>? ListGruppiFase;
|
private List<AnagGruppi>? ListGruppiFase;
|
||||||
|
|
||||||
private List<Macchine>? ListMacchine;
|
private List<Macchine>? ListMacchine;
|
||||||
|
|
||||||
private List<ListValues>? ListStati;
|
private List<ListValues>? ListStati;
|
||||||
|
|
||||||
#endregion Private Fields
|
#endregion Private Fields
|
||||||
@@ -186,12 +174,11 @@ namespace MP.SPEC.Pages
|
|||||||
#region Private Properties
|
#region Private Properties
|
||||||
|
|
||||||
private string _artSearch { get; set; } = "";
|
private string _artSearch { get; set; } = "";
|
||||||
|
|
||||||
private string _currAzienda { get; set; } = "*";
|
private string _currAzienda { get; set; } = "*";
|
||||||
|
|
||||||
private bool addEnabled
|
private bool addEnabled
|
||||||
{
|
{
|
||||||
get => selStato != "*";
|
get => currFase != "*";
|
||||||
}
|
}
|
||||||
|
|
||||||
private string artSearch
|
private string artSearch
|
||||||
@@ -217,7 +204,6 @@ namespace MP.SPEC.Pages
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<ConfigModel>? configData { get; set; } = null;
|
private List<ConfigModel>? configData { get; set; } = null;
|
||||||
|
|
||||||
private string currArticolo { get; set; } = "";
|
private string currArticolo { get; set; } = "";
|
||||||
|
|
||||||
private string currAzienda
|
private string currAzienda
|
||||||
@@ -237,10 +223,12 @@ namespace MP.SPEC.Pages
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private SelectPOdlParams currFilter { get; set; } = new SelectPOdlParams();
|
||||||
|
|
||||||
private int currPage
|
private int currPage
|
||||||
{
|
{
|
||||||
get => MsgService.currPage;
|
get => currFilter.CurrPage;
|
||||||
set => MsgService.currPage = value;
|
set => currFilter.CurrPage = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
private PODLModel? currRecord
|
private PODLModel? currRecord
|
||||||
@@ -257,20 +245,27 @@ namespace MP.SPEC.Pages
|
|||||||
|
|
||||||
private int numRecord
|
private int numRecord
|
||||||
{
|
{
|
||||||
get => MsgService.numRecord;
|
get => currFilter.NumRec;
|
||||||
set => MsgService.numRecord = value;
|
set => currFilter.NumRec = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string selStato
|
private string currFase
|
||||||
{
|
{
|
||||||
get => MsgService.StateSel;
|
get => currFilter.CodFase;
|
||||||
set => MsgService.StateSel = value;
|
set
|
||||||
|
{
|
||||||
|
if (!currFilter.CodFase.Equals(value))
|
||||||
|
{
|
||||||
|
currFilter.CodFase = value;
|
||||||
|
currPage = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private int totalCount
|
private int totalCount
|
||||||
{
|
{
|
||||||
get => MsgService.totalCount;
|
get => currFilter.TotCount;
|
||||||
set => MsgService.totalCount = value;
|
set => currFilter.TotCount = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Private Properties
|
#endregion Private Properties
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<body>
|
<body>
|
||||||
<i>Modulo MAPOSPEC </i>
|
<i>Modulo MAPOSPEC </i>
|
||||||
<h4>Versione: 6.16.2210.1808</h4>
|
<h4>Versione: 6.16.2210.1817</h4>
|
||||||
<br /> Note di rilascio:
|
<br /> Note di rilascio:
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
6.16.2210.1808
|
6.16.2210.1817
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<item>
|
<item>
|
||||||
<version>6.16.2210.1808</version>
|
<version>6.16.2210.1817</version>
|
||||||
<url>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip</url>
|
<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>
|
<changelog>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html</changelog>
|
||||||
<mandatory>false</mandatory>
|
<mandatory>false</mandatory>
|
||||||
|
|||||||
@@ -327,3 +327,22 @@ a,
|
|||||||
min-height: 4rem;
|
min-height: 4rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* Colori!*/
|
||||||
|
blue {
|
||||||
|
color: purple;
|
||||||
|
background-color: purple;
|
||||||
|
}
|
||||||
|
.dc_yellow {
|
||||||
|
color: yellow;
|
||||||
|
background-color: yellow;
|
||||||
|
}
|
||||||
|
.dc_gray {
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
.dc_red {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
.dc_green {
|
||||||
|
color: green;
|
||||||
|
background-color: green;
|
||||||
|
}
|
||||||
@@ -376,3 +376,24 @@ a, .btn-link {
|
|||||||
min-height: @blSCut * 4;
|
min-height: @blSCut * 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Colori!*/
|
||||||
|
blue {
|
||||||
|
color: purple;
|
||||||
|
background-color: purple;
|
||||||
|
}
|
||||||
|
.dc_yellow {
|
||||||
|
color: yellow;
|
||||||
|
background-color: yellow;
|
||||||
|
}
|
||||||
|
.dc_gray {
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
.dc_red {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
.dc_green {
|
||||||
|
color: green;
|
||||||
|
background-color: green;
|
||||||
|
}
|
||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -1,15 +1,4 @@
|
|||||||
//window.recordDeselect = (dotNetHelper) => {
|
////TENTATIVO POPOLAMENTO HELPER PER POTER INVOCARE IL METODO DOPO
|
||||||
// var myModalEl = document.getElementById('myModal')
|
|
||||||
// myModalEl.addEventListener('hidden.bs.modal', function (event) {
|
|
||||||
// // do something...
|
|
||||||
// //dotNetHelper.invokeMethodAsync('TriggerDotNetInstanceMethod');
|
|
||||||
// return dotNetHelper.invokeMethodAsync('svuotaRecord');
|
|
||||||
// console.log("fatto");
|
|
||||||
// });
|
|
||||||
//};
|
|
||||||
|
|
||||||
|
|
||||||
//TENTATIVO POPOLAMENTO HELPER PER POTER INVOCARE IL METODO DOPO
|
|
||||||
//let helper;
|
//let helper;
|
||||||
|
|
||||||
//window.setHelper = (dotNetHelper) => {
|
//window.setHelper = (dotNetHelper) => {
|
||||||
@@ -18,15 +7,15 @@
|
|||||||
// return dotNetHelper.invokeMethodAsync('setHelper');
|
// return dotNetHelper.invokeMethodAsync('setHelper');
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//BECCA QUANDO LA MODALE VIENE CHIUSA ED ESEGUE
|
////BECCA QUANDO LA MODALE VIENE CHIUSA ED ESEGUE
|
||||||
document.addEventListener('click', function (e) {
|
//document.addEventListener('click', function (e) {
|
||||||
if (e.target.id === 'myModal') {
|
// if (e.target.id === 'myModal') {
|
||||||
console.log('chiuso');
|
// console.log('chiuso');
|
||||||
|
|
||||||
return helper.invokeMethodAsync('svuotaRecord');
|
// //return helper.invokeMethodAsync('svuotaRecord');
|
||||||
console.log("fatto");
|
// console.log("fatto");
|
||||||
} else {
|
// } else {
|
||||||
console.log('aperto');
|
// console.log('aperto');
|
||||||
}
|
// }
|
||||||
e.stopPropagation();
|
// e.stopPropagation();
|
||||||
}, false);
|
//}, false);
|
||||||
Reference in New Issue
Block a user