Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a0ffe1bc6c | |||
| 6e75f590bb | |||
| 12473b5088 | |||
| f6406f833f | |||
| a21cd16362 | |||
| d659afacc2 | |||
| 56c3ba4064 | |||
| 8d0292d789 | |||
| 419863a684 | |||
| f56a7e5164 | |||
| 0cf6ecd38f | |||
| 094ce0d181 | |||
| b4de1c9880 |
@@ -742,19 +742,18 @@ namespace MP.Data.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Recupero Odl CORRENTE x macchina (SE c'è)
|
/// Recupero Odl CORRENTI
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="idxMacchina"></param>
|
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ODLModel OdlGetCurrentByMacc(string idxMacchina)
|
public List<ODLModel> OdlGetCurrent()
|
||||||
{
|
{
|
||||||
ODLModel dbResult = new ODLModel();
|
List<ODLModel> dbResult = new List<ODLModel>();
|
||||||
|
|
||||||
using (var dbCtx = new MoonProContext(_configuration))
|
using (var dbCtx = new MoonProContext(_configuration))
|
||||||
{
|
{
|
||||||
dbResult = dbCtx
|
dbResult = dbCtx
|
||||||
.DbSetODL
|
.DbSetODL
|
||||||
.FirstOrDefault(x => x.IdxMacchina == idxMacchina && x.DataInizio != null && x.DataFine == null);
|
.Where(x => x.DataInizio != null && x.DataFine == null)
|
||||||
|
.ToList();
|
||||||
}
|
}
|
||||||
return dbResult;
|
return dbResult;
|
||||||
}
|
}
|
||||||
@@ -932,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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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>
|
||||||
}
|
}
|
||||||
@@ -178,10 +179,6 @@ else
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
|
||||||
|
|
||||||
<!-- Modal -->
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -224,7 +221,7 @@ else
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
<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:@stat.Css;" aria-valuemax="100">@($"{calcolaPerc(stat.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>
|
||||||
|
|
||||||
|
|||||||
@@ -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,39 +38,26 @@ 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 false //FUNZIONA SE IL METODO TriggerDotNetInstanceMethod() E' IN ONCLICK BOTTONE
|
|
||||||
|
|
||||||
[JSInvokable]
|
|
||||||
public void setHelper()
|
|
||||||
{
|
|
||||||
objRef = DotNetObjectReference.Create(this);
|
|
||||||
}
|
|
||||||
[JSInvokable]
|
|
||||||
public void svuotaRecord()
|
|
||||||
{
|
|
||||||
currRecord = null;
|
|
||||||
|
|
||||||
}
|
|
||||||
public async Task TriggerDotNetInstanceMethod()
|
|
||||||
{
|
|
||||||
await JSRuntime.InvokeVoidAsync("recordDeselect", objRef);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endregion Public Methods
|
#endregion Public Methods
|
||||||
|
|
||||||
#region Protected Properties
|
#region Protected Properties
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[Inject]
|
[Inject]
|
||||||
protected IJSRuntime JSRuntime { get; set; } = null!;
|
protected IJSRuntime JSRuntime { get; set; } = null!;
|
||||||
|
|
||||||
@@ -80,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
|
||||||
|
|
||||||
@@ -105,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 = "";
|
||||||
@@ -127,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()
|
||||||
{
|
{
|
||||||
@@ -167,6 +160,7 @@ namespace MP.SPEC.Components
|
|||||||
ListOdlStats = null;
|
ListOdlStats = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async Task selectStatRecord(ODLModel? currRec)
|
protected async Task selectStatRecord(ODLModel? currRec)
|
||||||
{
|
{
|
||||||
showStats = true;
|
showStats = true;
|
||||||
@@ -205,8 +199,6 @@ namespace MP.SPEC.Components
|
|||||||
|
|
||||||
private ODLModel? currRecord = null;
|
private ODLModel? currRecord = null;
|
||||||
|
|
||||||
private ODLModel? statRecord = null;
|
|
||||||
|
|
||||||
private List<StatODLModel>? ListOdlStats;
|
private List<StatODLModel>? ListOdlStats;
|
||||||
|
|
||||||
private List<ODLModel>? ListRecords;
|
private List<ODLModel>? ListRecords;
|
||||||
@@ -215,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>
|
||||||
@@ -237,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;
|
||||||
@@ -278,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()
|
||||||
@@ -291,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()
|
||||||
@@ -210,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
|
||||||
|
|
||||||
@@ -254,7 +280,7 @@ namespace MP.SPEC.Components
|
|||||||
{
|
{
|
||||||
var response = await MpIoApiCall.callMpIoUrlGet(restUrl);
|
var response = await MpIoApiCall.callMpIoUrlGet(restUrl);
|
||||||
}
|
}
|
||||||
catch(Exception exc)
|
catch (Exception exc)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -290,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>
|
||||||
@@ -304,27 +325,11 @@ namespace MP.SPEC.Components
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private bool canStartOdl(string idxMacchina)
|
private bool canStartOdl(string idxMacchina)
|
||||||
{
|
{
|
||||||
var currOdl = MDService.OdlGetCurrentByMacc(idxMacchina);
|
var listOdlCurr = MDService.OdlGetCurrent();
|
||||||
bool answ = currOdl == null;
|
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>
|
||||||
@@ -367,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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -665,38 +665,42 @@ namespace MP.SPEC.Data
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ODL corrente x macchina
|
/// ODL correnti (tutti)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="idxMacchina"></param>
|
/// <param name="idxMacchina"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ODLModel OdlGetCurrentByMacc(string idxMacchina)
|
public List<string> OdlGetCurrent()
|
||||||
{
|
{
|
||||||
ODLModel dbResult = new ODLModel();
|
List<string> dbResult = new List<string>();
|
||||||
Stopwatch stopWatch = new Stopwatch();
|
Stopwatch stopWatch = new Stopwatch();
|
||||||
stopWatch.Start();
|
stopWatch.Start();
|
||||||
string readType = "DB";
|
string readType = "DB";
|
||||||
string currKey = $"{redisOdlCurrByMac}:{idxMacchina}";
|
string currKey = $"{redisOdlCurrByMac}";
|
||||||
// cerco in redis dato valore sel macchina...
|
// cerco in redis dato valore sel macchina...
|
||||||
RedisValue rawData = redisDb.StringGet(currKey);
|
RedisValue rawData = redisDb.StringGet(currKey);
|
||||||
if (rawData.HasValue)
|
if (rawData.HasValue)
|
||||||
{
|
{
|
||||||
dbResult = JsonConvert.DeserializeObject<ODLModel>($"{rawData}");
|
try
|
||||||
|
{
|
||||||
|
dbResult = JsonConvert.DeserializeObject<List<string>>($"{rawData}");
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{ }
|
||||||
readType = "REDIS";
|
readType = "REDIS";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dbResult = dbController.OdlGetCurrentByMacc(idxMacchina);
|
dbResult = dbController.OdlGetCurrent().Select(x => x.IdxMacchina).Distinct().ToList();
|
||||||
// serializzp e salvo...
|
|
||||||
rawData = JsonConvert.SerializeObject(dbResult);
|
rawData = JsonConvert.SerializeObject(dbResult);
|
||||||
redisDb.StringSet(currKey, rawData, TimeSpan.FromSeconds(3));
|
redisDb.StringSet(currKey, rawData, TimeSpan.FromSeconds(3));
|
||||||
}
|
}
|
||||||
if (dbResult == null)
|
if (dbResult == null)
|
||||||
{
|
{
|
||||||
dbResult = new ODLModel();
|
dbResult = new List<string>();
|
||||||
}
|
}
|
||||||
stopWatch.Stop();
|
stopWatch.Stop();
|
||||||
TimeSpan ts = stopWatch.Elapsed;
|
TimeSpan ts = stopWatch.Elapsed;
|
||||||
Log.Debug($"OdlGetCurrentByMacc | Read from {readType}: {ts.TotalMilliseconds}ms");
|
Log.Debug($"OdlGetCurrent | Read from {readType}: {ts.TotalMilliseconds}ms");
|
||||||
|
|
||||||
|
|
||||||
return dbResult;
|
return dbResult;
|
||||||
|
|||||||
@@ -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.1810</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.1810</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.1810
|
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.1810</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>
|
||||||
|
|||||||
Reference in New Issue
Block a user