Merge branch 'develop' of https://gitlab.steamware.net/steamware/mapo-core into develop
This commit is contained in:
@@ -30,12 +30,12 @@ namespace MP_TAB_SERV.Components
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
// inizilamente riporto machcina corrente da MSE
|
||||
if (RecMSE != null)
|
||||
{
|
||||
await E_MachSel.InvokeAsync(RecMSE?.IdxMacchina);
|
||||
// verifico se la macchina sia configurata tra le MSFD...
|
||||
if (MServ.DictMacchMulti.ContainsKey(RecMSE?.IdxMacchina))
|
||||
{
|
||||
@@ -43,6 +43,8 @@ namespace MP_TAB_SERV.Components
|
||||
}
|
||||
ListMacchineAll = MServ.DictMacchine;
|
||||
}
|
||||
//await E_MachSel.InvokeAsync(RecMSE?.IdxMacchina);
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
@@ -9,113 +9,9 @@
|
||||
@($"{NumGray}%")
|
||||
</div>
|
||||
<div runat="server" id="divBlue" class="progress-bar bg-primary" style="width: @(NumBlue)%">
|
||||
@($"{NumBlue}%")
|
||||
@($"+{NumBlue}%")
|
||||
</div>
|
||||
</div>
|
||||
<asp:HiddenField runat="server" ID="hfProdCount" />
|
||||
|
||||
@code {
|
||||
/// <summary>
|
||||
/// Conteggio dati produzione da mostrare
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public ProdCounter CountData { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Numero pezzi CONFERMATI
|
||||
/// </summary>
|
||||
protected int NumPzConf { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Numero pezzi ORDINATI
|
||||
/// </summary>
|
||||
protected int NumPzOrd { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Numero pezzi PRODOTTI
|
||||
/// </summary>
|
||||
protected int NumPzProd { get; set; } = 0;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Numero pezzi per display BLU
|
||||
/// </summary>
|
||||
protected int NumBlue { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Numero pezzi per display GRIGIO
|
||||
/// </summary>
|
||||
protected int NumGray { get; set; } = 40;
|
||||
|
||||
/// <summary>
|
||||
/// Numero pezzi per display VERDE
|
||||
/// </summary>
|
||||
protected int NumGreen { get; set; } = 20;
|
||||
|
||||
/// <summary>
|
||||
/// Numero pezzi per display GIALLO
|
||||
/// </summary>
|
||||
protected int NumYellow { get; set; } = 30;
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
decimal denom = CountData.numPzProd > CountData.numPzOrd ? (decimal)CountData.numPzProd / 100 : (decimal)CountData.numPzOrd / 100;
|
||||
denom = denom == 0 ? 1 : denom;
|
||||
// calcolo se sono nel caso prod < ordinati o se sono andato OVER
|
||||
if (CountData.numPzProd < CountData.numPzOrd)
|
||||
{
|
||||
nGreen = (int)Math.Floor((decimal)CountData.numPzConf / denom);
|
||||
nYellow = (int)Math.Floor((decimal)(CountData.numPzProd - CountData.numPzConf) / denom);
|
||||
nGray = 100 - (nGreen + nYellow);
|
||||
nBlue = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// devo verificare SE ne ho confermati meno che ordinati o meno...
|
||||
if (CountData.numPzConf < CountData.numPzOrd)
|
||||
{
|
||||
nGreen = (int)Math.Floor((decimal)CountData.numPzConf / denom);
|
||||
}
|
||||
else
|
||||
{
|
||||
nGreen = (int)Math.Floor((decimal)CountData.numPzOrd / denom);
|
||||
}
|
||||
nBlue = 100 - nGreen;
|
||||
nYellow = 0;
|
||||
nGray = 0;
|
||||
}
|
||||
// disegno!
|
||||
NumGreen = nGreen;
|
||||
NumYellow = nYellow;
|
||||
NumGray = nGray;
|
||||
NumBlue = nBlue;
|
||||
// base.OnParametersSet();
|
||||
}
|
||||
|
||||
protected int nBlue = 0;
|
||||
protected int nGray = 0;
|
||||
protected int nGreen = 0;
|
||||
protected int nYellow = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Classe gesitone conteggi produzione
|
||||
/// </summary>
|
||||
public class ProdCounter
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// NUmero pezzi CONFERMATI
|
||||
/// </summary>
|
||||
public int numPzConf { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Numero pezzi ORDINATI
|
||||
/// </summary>
|
||||
public int numPzOrd { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Numero pezzi PRODOTTI
|
||||
/// </summary>
|
||||
public int numPzProd { get; set; } = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
using global::Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace MP_TAB_SERV.Components
|
||||
{
|
||||
public partial class ProdAdvDispl
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Conteggio dati produzione da mostrare
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public ProdCounter CountData { get; set; } = null!;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Classes
|
||||
|
||||
/// <summary>
|
||||
/// Classe gesitone conteggi produzione
|
||||
/// </summary>
|
||||
public class ProdCounter
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// NUmero pezzi CONFERMATI
|
||||
/// </summary>
|
||||
public int numPzConf { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Numero pezzi ORDINATI
|
||||
/// </summary>
|
||||
public int numPzOrd { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Numero pezzi PRODOTTI
|
||||
/// </summary>
|
||||
public int numPzProd { get; set; } = 0;
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
#endregion Public Classes
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
protected int nBlue = 0;
|
||||
|
||||
protected int nGray = 0;
|
||||
|
||||
protected int nGreen = 0;
|
||||
|
||||
protected int nYellow = 0;
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
/// <summary>
|
||||
/// Numero pezzi per display BLU
|
||||
/// </summary>
|
||||
protected int NumBlue { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Numero pezzi per display GRIGIO
|
||||
/// </summary>
|
||||
protected int NumGray { get; set; } = 40;
|
||||
|
||||
/// <summary>
|
||||
/// Numero pezzi per display VERDE
|
||||
/// </summary>
|
||||
protected int NumGreen { get; set; } = 20;
|
||||
|
||||
/// <summary>
|
||||
/// Numero pezzi CONFERMATI
|
||||
/// </summary>
|
||||
protected int NumPzConf { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Numero pezzi ORDINATI
|
||||
/// </summary>
|
||||
protected int NumPzOrd { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Numero pezzi PRODOTTI
|
||||
/// </summary>
|
||||
protected int NumPzProd { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Numero pezzi per display GIALLO
|
||||
/// </summary>
|
||||
protected int NumYellow { get; set; } = 30;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
decimal denom = (decimal)CountData.numPzOrd / 100; //CountData.numPzProd > CountData.numPzOrd ? (decimal)CountData.numPzProd / 100 : (decimal)CountData.numPzOrd / 100;
|
||||
denom = denom == 0 ? 1 : denom;
|
||||
// calcolo se sono nel caso prod < ordinati o se sono andato OVER
|
||||
if (CountData.numPzProd < CountData.numPzOrd)
|
||||
{
|
||||
nGreen = (int)Math.Floor((decimal)CountData.numPzConf / denom);
|
||||
nYellow = (int)Math.Floor((decimal)(CountData.numPzProd - CountData.numPzConf) / denom);
|
||||
nGray = 100 - (nGreen + nYellow);
|
||||
nBlue = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// green: confermati verdi
|
||||
// devo verificare SE ne ho confermati meno che ordinati o meno...
|
||||
if (CountData.numPzConf < CountData.numPzOrd)
|
||||
{
|
||||
nGreen = (int)Math.Floor((decimal)CountData.numPzConf / denom);
|
||||
}
|
||||
else
|
||||
{
|
||||
nGreen = (int)Math.Floor((decimal)CountData.numPzOrd / denom);
|
||||
}
|
||||
// blu: quanti sono "extra" e da confermare
|
||||
nBlue = (int)Math.Floor((decimal)(CountData.numPzProd) / denom) - nGreen;
|
||||
nYellow = 0;
|
||||
nGray = 0;
|
||||
}
|
||||
|
||||
// disegno!
|
||||
NumGreen = nGreen;
|
||||
NumYellow = nYellow;
|
||||
NumGray = nGray;
|
||||
NumBlue = nBlue;
|
||||
// base.OnParametersSet();
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
}
|
||||
}
|
||||
@@ -16,8 +16,6 @@
|
||||
{
|
||||
<div class="alert alert-warning fs-3">MANCA ODL: conferma NON permessa</div>
|
||||
}
|
||||
|
||||
|
||||
</div>
|
||||
<div class="card-body p-0 text-light">
|
||||
@if (showInnov)
|
||||
|
||||
@@ -133,6 +133,8 @@ namespace MP_TAB_SERV.Components
|
||||
|
||||
[Inject]
|
||||
protected TabDataService TabDServ { get; set; } = null!;
|
||||
[Inject]
|
||||
protected StatusData MDataService { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
@@ -154,11 +156,21 @@ namespace MP_TAB_SERV.Components
|
||||
|
||||
protected async Task SalvaConfPz()
|
||||
{
|
||||
isProcessing = true;
|
||||
await Task.Delay(1);
|
||||
// effettua conferma con conf da DB del tipo (giorni / turni / periodo
|
||||
bool fatto = effettuaConfermaProd();
|
||||
// refresh tabella dati tablet...
|
||||
TabDServ.RicalcMse(IdxMaccSel, 0);
|
||||
// rileggo e salvo..
|
||||
var ListMSE = await MDataService.MseGetAll();
|
||||
if (ListMSE != null)
|
||||
{
|
||||
// salvo in LocalStorage...
|
||||
await MServ.SaveMse(ListMSE);
|
||||
// aggiorno MSE attuale
|
||||
RecMSE = ListMSE.Find(x => x.IdxMacchina == IdxMaccSel);
|
||||
}
|
||||
// mostro output
|
||||
lblOut = $"Confermata produzione {numPzConfermati - numPzLasciati} pezzi (+{numPzLasciati} pz lasciati, +{numPzScarto2Rec:N0} pz scarto) |{dtReqUpdate:HH:mm:ss} | {dtReqUpdate:ddd yyyy.MM.dd}";
|
||||
// cambio button conferma...
|
||||
@@ -167,6 +179,8 @@ namespace MP_TAB_SERV.Components
|
||||
dtReqUpdate = DateTime.Now;
|
||||
numPzLasciati = 0;
|
||||
await doUpdate();
|
||||
isProcessing = false;
|
||||
await Task.Delay(1);
|
||||
await E_newVal.InvokeAsync(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace MP_TAB_SERV.Components
|
||||
}
|
||||
|
||||
[Inject]
|
||||
protected ListSelectDataSrv CtrDataServ { get; set; } = null!;
|
||||
protected ListSelectDataSrv MDataService { get; set; } = null!;
|
||||
|
||||
protected int DisplayCount { get; set; } = 0;
|
||||
|
||||
@@ -136,7 +136,7 @@ namespace MP_TAB_SERV.Components
|
||||
if (!ListArtDisabled)
|
||||
{
|
||||
Log.Debug("START GetArticoli");
|
||||
var rawData = await CtrDataServ.ArticoliGetSearch(10000, "*", searchVal);
|
||||
var rawData = await MDataService.ArticoliGetSearch(10000, "*", searchVal);
|
||||
// trasformo!
|
||||
if (rawData != null)
|
||||
{
|
||||
@@ -169,7 +169,7 @@ namespace MP_TAB_SERV.Components
|
||||
if (ListMacchineAll == null || ListMacchineAll.Count == 0)
|
||||
{
|
||||
Log.Debug("START ReloadMacchine");
|
||||
var rawData = await CtrDataServ.MacchineByMatrOper(MatrOpr);
|
||||
var rawData = await MDataService.MacchineByMatrOper(MatrOpr);
|
||||
// trasformo!
|
||||
if (rawData != null)
|
||||
{
|
||||
|
||||
@@ -70,6 +70,16 @@ namespace MP_TAB_SERV.Pages
|
||||
#endif
|
||||
}
|
||||
|
||||
protected async Task RefreshMBlock()
|
||||
{
|
||||
// recupero MSE macchina....
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
|
||||
}
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
private async Task ReloadData()
|
||||
{
|
||||
if (string.IsNullOrEmpty(IdxMacc))
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace MP_TAB_SERV.Pages
|
||||
protected StatusData MDataService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected MessageService MsgServ { get; set; } = null!;
|
||||
protected MessageService MServ { get; set; } = null!;
|
||||
|
||||
protected int slowRefreshMs
|
||||
{
|
||||
@@ -126,7 +126,7 @@ namespace MP_TAB_SERV.Pages
|
||||
if (ListMSE != null)
|
||||
{
|
||||
// salvo in LocalStorage...
|
||||
await MsgServ.SaveMse(ListMSE);
|
||||
await MServ.SaveMse(ListMSE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,15 +164,6 @@ namespace MP_TAB_SERV.Pages
|
||||
private async Task ReloadData()
|
||||
{
|
||||
ListMSE = await MDataService.MseGetAll();
|
||||
//try
|
||||
//{
|
||||
// // salvo in LocalStorage...
|
||||
// await MsgServ.SaveMse(CurrListMSE);
|
||||
//}
|
||||
//catch (Exception exc)
|
||||
//{
|
||||
// Log.Error($"Eccezione in ReloadData{Environment.NewLine}{exc}");
|
||||
//}
|
||||
}
|
||||
|
||||
private async Task setupConf()
|
||||
|
||||
@@ -92,6 +92,7 @@
|
||||
{
|
||||
var allData = await MDataService.ListLinkAll();
|
||||
MStor.SetupMenu(allData);
|
||||
|
||||
// fix config...
|
||||
var allConf = await MDataService.ConfigGetAll();
|
||||
MStor.SetConfig(allConf);
|
||||
@@ -99,6 +100,11 @@
|
||||
// fix MSFD...
|
||||
var allMSFD = await TDataService.VMSFDGetAll();
|
||||
MStor.SetMsfd(allMSFD);
|
||||
|
||||
// non da farsi globalmente
|
||||
// // fix macchine
|
||||
// var allMach = await MDataService.MacchineByMatrOper(0);
|
||||
// MStor.DictMacchine = allMach.ToDictionary(x => x.IdxMacchina, x => $"{x.IdxMacchina} | {x.Nome}");
|
||||
}
|
||||
CurrLevel = MStor.PageLevel(NavMan.Uri);
|
||||
// recupero menù
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
@@ -38,8 +38,8 @@ namespace MP.Data.Services
|
||||
}
|
||||
else
|
||||
{
|
||||
dbController = new Controllers.MpSpecController(configuration);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
dbController = new Controllers.MpSpecController(configuration);
|
||||
sb.AppendLine($"ListSelectDataSrv | MpSpecController OK");
|
||||
Log.Info(sb.ToString());
|
||||
}
|
||||
|
||||
@@ -44,8 +44,8 @@ namespace MP.Data.Services
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public static Controllers.MpIocController dbIocController { get; set; } = null!;
|
||||
public static Controllers.MpTabController dbTabController { get; set; } = null!;
|
||||
private static Controllers.MpIocController dbIocController { get; set; } = null!;
|
||||
private static Controllers.MpTabController dbTabController { get; set; } = null!;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
|
||||
Reference in New Issue
Block a user