Loop Update:
inizio verifica ODL/PODL
This commit is contained in:
@@ -932,6 +932,7 @@ namespace MP.Data.Controllers
|
||||
currRec.KeyRichiesta = editRec.KeyRichiesta;
|
||||
currRec.NumPezzi = editRec.NumPezzi;
|
||||
currRec.Tcassegnato = editRec.Tcassegnato;
|
||||
currRec.Attivabile = editRec.Attivabile;
|
||||
currRec.Note = editRec.Note;
|
||||
dbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
|
||||
@@ -99,8 +99,9 @@ else
|
||||
else
|
||||
{
|
||||
<div class="text-secondary">
|
||||
<div><b>@($"{DateTime.Now:yyyy/MM/dd}")</b></div>
|
||||
<div>@($"{DateTime.Now:ddd HH:mm:ss}")</div>
|
||||
@*<div><b>@($"{DateTime.Now:yyyy/MM/dd}")</b></div>
|
||||
<div>@($"{DateTime.Now:ddd HH:mm:ss}")</div>*@
|
||||
<div><b>NOW</b></div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -172,8 +173,9 @@ else
|
||||
else
|
||||
{
|
||||
<div class="text-secondary">
|
||||
<div><b>@($"{DateTime.Now:yyyy/MM/dd}")</b></div>
|
||||
<div>@($"{DateTime.Now:ddd HH:mm:ss}")</div>
|
||||
@*<div><b>@($"{DateTime.Now:yyyy/MM/dd}")</b></div>
|
||||
<div>@($"{DateTime.Now:ddd HH:mm:ss}")</div>*@
|
||||
<div><b>NOW</b></div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -53,8 +53,10 @@ namespace MP.SPEC.Components
|
||||
[Inject]
|
||||
protected MpDataService MDService { get; set; } = null!;
|
||||
|
||||
#if false
|
||||
[Inject]
|
||||
protected MessageService MessageService { get; set; } = null!;
|
||||
protected MessageService MessageService { get; set; } = null!;
|
||||
#endif
|
||||
|
||||
[Inject]
|
||||
protected IOApiService MpIoApiCall { get; set; } = null!;
|
||||
@@ -235,8 +237,8 @@ namespace MP.SPEC.Components
|
||||
|
||||
private int currPage
|
||||
{
|
||||
get => MessageService.currPage;
|
||||
set => MessageService.currPage = value;
|
||||
get => currFilter.CurrPage;
|
||||
set => currFilter.CurrPage = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -251,8 +253,8 @@ namespace MP.SPEC.Components
|
||||
|
||||
private int numRecord
|
||||
{
|
||||
get => MessageService.numRecord;
|
||||
set => MessageService.numRecord = value;
|
||||
get => currFilter.NumRec;
|
||||
set => currFilter.NumRec = value;
|
||||
}
|
||||
|
||||
private DateTime selDtFine { get; set; } = DateTime.Now;
|
||||
@@ -324,10 +326,12 @@ namespace MP.SPEC.Components
|
||||
private List<string>? ListOdlStatsLabels = new List<string>();
|
||||
#endif
|
||||
|
||||
#if false
|
||||
private async void MessageService_EA_PageUpdated()
|
||||
{
|
||||
await reloadData();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
private string pbStyle(string css)
|
||||
{
|
||||
|
||||
@@ -51,8 +51,10 @@ namespace MP.SPEC.Components
|
||||
[Inject]
|
||||
protected IOApiService MpIoApiCall { get; set; } = null!;
|
||||
|
||||
#if true
|
||||
[Inject]
|
||||
protected MessageService MsgService { get; set; } = null!;
|
||||
protected MessageService MsgService { get; set; } = null!;
|
||||
#endif
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
@@ -103,9 +105,11 @@ namespace MP.SPEC.Components
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
#if true
|
||||
MsgService.EA_PageUpdated += MessageService_EA_PageUpdated;
|
||||
MsgService.EA_SearchUpdated += OnSeachUpdated;
|
||||
MsgService.EA_StatoSearch += MsgService_EA_StatoSearch;
|
||||
MsgService.EA_StatoSearch += MsgService_EA_StatoSearch;
|
||||
#endif
|
||||
ListStati = await MDService.AnagStatiComm();
|
||||
}
|
||||
|
||||
@@ -254,7 +258,7 @@ namespace MP.SPEC.Components
|
||||
{
|
||||
var response = await MpIoApiCall.callMpIoUrlGet(restUrl);
|
||||
}
|
||||
catch(Exception exc)
|
||||
catch (Exception exc)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -305,7 +309,7 @@ namespace MP.SPEC.Components
|
||||
private bool canStartOdl(string idxMacchina)
|
||||
{
|
||||
var currOdl = MDService.OdlGetCurrentByMacc(idxMacchina);
|
||||
bool answ = currOdl == null;
|
||||
bool answ = (currOdl == null || currOdl.IdxOdl == 0);
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
@@ -686,13 +686,16 @@ namespace MP.SPEC.Data
|
||||
else
|
||||
{
|
||||
dbResult = dbController.OdlGetCurrentByMacc(idxMacchina);
|
||||
// serializzp e salvo...
|
||||
rawData = JsonConvert.SerializeObject(dbResult);
|
||||
redisDb.StringSet(currKey, rawData, TimeSpan.FromSeconds(3));
|
||||
//if (dbResult != null)
|
||||
//{
|
||||
// serializzp e salvo...
|
||||
rawData = JsonConvert.SerializeObject(dbResult);
|
||||
redisDb.StringSet(currKey, rawData, TimeSpan.FromSeconds(3));
|
||||
//}
|
||||
}
|
||||
if (dbResult == null)
|
||||
{
|
||||
dbResult = new ODLModel();
|
||||
dbResult = new ODLModel();
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace MP.SPEC.Data
|
||||
public string IdxMacchina { get; set; } = "*";
|
||||
public int CurrPage { get; set; } = 1;
|
||||
public int NumRec { get; set; } = 10;
|
||||
public int TotCount { get; set; } = 0;
|
||||
public DateTime DtEnd { get; set; } = Utils.InitDatetime(DateTime.Now, 5);
|
||||
public DateTime DtStart { get; set; } = Utils.InitDatetime(DateTime.Now, 5).AddDays(-7);
|
||||
public int MaxRecord { get; set; } = 100;
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
using MP.Data;
|
||||
|
||||
namespace MP.SPEC.Data
|
||||
{
|
||||
public class SelectPOdlParams
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public SelectPOdlParams()
|
||||
{ }
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public string CodStato { get; set; } = "*";
|
||||
public string IdxMacchina { get; set; } = "*";
|
||||
public int CurrPage { get; set; } = 1;
|
||||
public int NumRec { get; set; } = 10;
|
||||
public DateTime DtEnd { get; set; } = Utils.InitDatetime(DateTime.Now, 5);
|
||||
public DateTime DtStart { get; set; } = Utils.InitDatetime(DateTime.Now, 5).AddDays(-7);
|
||||
public int MaxRecord { get; set; } = 100;
|
||||
public bool IsActive { get; set; } = true;
|
||||
public string SearchVal { get; set; } = "*";
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (!(obj is SelectOdlParams item))
|
||||
return false;
|
||||
|
||||
if (IsActive != item.IsActive)
|
||||
return false;
|
||||
|
||||
if (CodStato != item.CodStato)
|
||||
return false;
|
||||
|
||||
if (IdxMacchina != item.IdxMacchina)
|
||||
return false;
|
||||
|
||||
if (MaxRecord != item.MaxRecord)
|
||||
return false;
|
||||
|
||||
if (NumRec != item.NumRec)
|
||||
return false;
|
||||
|
||||
if (DtStart != item.DtStart)
|
||||
return false;
|
||||
|
||||
if (DtEnd != item.DtEnd)
|
||||
return false;
|
||||
|
||||
if (CurrPage != item.CurrPage)
|
||||
return false;
|
||||
|
||||
if (SearchVal != item.SearchVal)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
@@ -116,7 +116,9 @@ namespace MP.SPEC.Pages
|
||||
|
||||
protected void UpdateTotCount(int newTotCount)
|
||||
{
|
||||
totalCount = newTotCount;
|
||||
#if false
|
||||
totalCount = newTotCount;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
@@ -147,8 +149,8 @@ namespace MP.SPEC.Pages
|
||||
|
||||
private int numRecord
|
||||
{
|
||||
get => MsgService.numRecord;
|
||||
set => MsgService.numRecord = value;
|
||||
get => currFilter.NumRec;
|
||||
set => currFilter.NumRec = value;
|
||||
}
|
||||
|
||||
private string rightStringCSS
|
||||
@@ -169,8 +171,8 @@ namespace MP.SPEC.Pages
|
||||
|
||||
private int totalCount
|
||||
{
|
||||
get => MsgService.totalCount;
|
||||
set => MsgService.totalCount = value;
|
||||
get => currFilter.TotCount;
|
||||
set => currFilter.TotCount = value;
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
Reference in New Issue
Block a user