Merge branch 'Release/MpTab3_07'
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
@if (DayImportRatio != 1)
|
||||
{
|
||||
<div class="col-3 my-2 pe-1">
|
||||
<button class="btn btn-success w-100" @onclick="() => FreezeDay()" title="Conferma giornata"><i class="fa-solid fa-stamp"></i> Conferma</button>
|
||||
<button class="btn btn-success w-100 px-0" @onclick="() => FreezeDay()" title="Conferma giornata"><i class="fa-solid fa-stamp"></i> Conferma</button>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
@@ -38,7 +38,7 @@
|
||||
</div>
|
||||
}
|
||||
<div class="col-3 my-2 ps-1">
|
||||
<button class="btn btn-outline-light w-100" @onclick="@CloseDet"><i class="fa-solid fa-xmark"></i> Close</button>
|
||||
<button class="btn btn-outline-light w-100 px-0" @onclick="@CloseDet"><i class="fa-solid fa-xmark"></i> Close</button>
|
||||
</div>
|
||||
</div>
|
||||
@if (SeqStatus != null && SeqStatus.Count() > 0)
|
||||
@@ -46,7 +46,7 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="d-flex justify-content-between fs-4">
|
||||
<div class="px-1">Prod: @($"{DayMinLav:N1}") min (@($"{DayOee:P0}"))</div>
|
||||
<div class="px-1">Prod: @($"{DayMinLav:N1}") min (@($"{DayOee:P1}"))</div>
|
||||
<div class="px-1">Copert: @($"{DayMinTot:N0}") min</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -54,7 +54,7 @@
|
||||
<div class="progress" style="min-height: 3.5rem;">
|
||||
@foreach (var item in SeqStatus)
|
||||
{
|
||||
<div class="progress-bar @item.CssBlock" style="width: @($"{item.ValuePerc:P0}");">
|
||||
<div class="progress-bar @item.CssBlock" style="width: @PercWidth(item.ValuePerc);">
|
||||
<div>@item.Title</div>
|
||||
<small>@($"{item.Value:N0}min")</small>
|
||||
</div>
|
||||
@@ -192,7 +192,7 @@
|
||||
<th>Stato</th>
|
||||
<th>Art.</th>
|
||||
<th>Ora</th>
|
||||
<th class="text-end">Pezzi #</th>
|
||||
<th class="text-end">Pezzi</th>
|
||||
<th class="text-end">T.Ciclo</th>
|
||||
<th class="text-end">Minuti</th>
|
||||
<th class="text-end"></th>
|
||||
|
||||
@@ -44,34 +44,6 @@ namespace MP_TAB3.Components
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
/// <summary>
|
||||
/// Boolear controllo visualizzazione ricerca articoli
|
||||
/// </summary>
|
||||
private bool doSearchArt = false;
|
||||
|
||||
/// <summary>
|
||||
/// Abilitazione edit DataOra inizio (solo x primo record, poi devono essere consecutivi...
|
||||
/// </summary>
|
||||
private bool enableEditTime = false;
|
||||
|
||||
private void SearchArtToggle()
|
||||
{
|
||||
doSearchArt = !doSearchArt;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Salva selezione articolo
|
||||
/// </summary>
|
||||
/// <param name="codArt"></param>
|
||||
private void SetArtSelected(string codArt)
|
||||
{
|
||||
if (EditRecord != null)
|
||||
{
|
||||
EditRecord.CodArticolo = codArt;
|
||||
doSearchArt = false;
|
||||
}
|
||||
}
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void AddNew(bool isWork)
|
||||
@@ -105,6 +77,18 @@ namespace MP_TAB3.Components
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Annulla editing
|
||||
/// </summary>
|
||||
/// <param name="selRec"></param>
|
||||
protected void DoCancel()
|
||||
{
|
||||
doSearchArt = false;
|
||||
EditRecord = null;
|
||||
ReloadData();
|
||||
RecalcDayData(dtCurr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// impossta record x eliminazione
|
||||
/// </summary>
|
||||
@@ -150,17 +134,6 @@ namespace MP_TAB3.Components
|
||||
}
|
||||
EditRecord = selRec;
|
||||
}
|
||||
/// <summary>
|
||||
/// Annulla editing
|
||||
/// </summary>
|
||||
/// <param name="selRec"></param>
|
||||
protected void DoCancel()
|
||||
{
|
||||
doSearchArt = false;
|
||||
EditRecord = null;
|
||||
ReloadData();
|
||||
RecalcDayData(dtCurr);
|
||||
}
|
||||
|
||||
protected async Task DoSave()
|
||||
{
|
||||
@@ -179,6 +152,7 @@ namespace MP_TAB3.Components
|
||||
}
|
||||
else
|
||||
{
|
||||
EditRecord.CodArticolo = "ND";
|
||||
EditRecord.PzBuoni = 0;
|
||||
EditRecord.TCiclo = 0;
|
||||
}
|
||||
@@ -250,6 +224,11 @@ namespace MP_TAB3.Components
|
||||
/// </summary>
|
||||
private Dictionary<DateTime, string> DateCheck = new Dictionary<DateTime, string>();
|
||||
|
||||
/// <summary>
|
||||
/// % record importati
|
||||
/// </summary>
|
||||
private double DayImportRatio = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Minuti lavorati (da sequencer)
|
||||
/// </summary>
|
||||
@@ -260,17 +239,23 @@ namespace MP_TAB3.Components
|
||||
/// </summary>
|
||||
private double DayMinTot = 0;
|
||||
|
||||
/// <summary>
|
||||
/// % record importati
|
||||
/// </summary>
|
||||
private double DayImportRatio = 0;
|
||||
|
||||
/// <summary>
|
||||
/// OEE giornaliero (ore lav / 24h)
|
||||
/// </summary>
|
||||
private double DayOee = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Boolear controllo visualizzazione ricerca articoli
|
||||
/// </summary>
|
||||
private bool doSearchArt = false;
|
||||
|
||||
private InsManualiModel? EditRecord = null;
|
||||
|
||||
/// <summary>
|
||||
/// Abilitazione edit DataOra inizio (solo x primo record, poi devono essere consecutivi...
|
||||
/// </summary>
|
||||
private bool enableEditTime = false;
|
||||
|
||||
private List<ManualStatusDTO> SeqStatus = new List<ManualStatusDTO>();
|
||||
|
||||
#endregion Private Fields
|
||||
@@ -278,21 +263,27 @@ namespace MP_TAB3.Components
|
||||
#region Private Properties
|
||||
|
||||
private bool confProdActive { get; set; } = false;
|
||||
|
||||
private MappaStatoExpl? currRecMSE { get; set; } = null;
|
||||
|
||||
private DateTime dtCurr { get; set; } = DateTime.Today;
|
||||
|
||||
private List<InsManualiModel>? ListDay { get; set; } = new List<InsManualiModel>();
|
||||
|
||||
private List<InsManDayDto>? ListDTO { get; set; } = new List<InsManDayDto>();
|
||||
|
||||
/// <summary>
|
||||
/// Eventi inseribili come fermate
|
||||
/// </summary>
|
||||
private List<vSelEventiBCodeModel> ListEvents { get; set; } = new List<vSelEventiBCodeModel>();
|
||||
|
||||
private List<InsManualiModel>? ListPeriod { get; set; } = new List<InsManualiModel>();
|
||||
|
||||
/// <summary>
|
||||
/// Eventi inseribili come fermate
|
||||
/// </summary>
|
||||
private Dictionary<decimal, string> ListTCiclo { get; set; } = new Dictionary<decimal, string>();
|
||||
|
||||
private List<InsManualiModel>? ListPeriod { get; set; } = new List<InsManualiModel>();
|
||||
|
||||
private bool showDetail { get; set; } = false;
|
||||
|
||||
#endregion Private Properties
|
||||
@@ -346,6 +337,25 @@ namespace MP_TAB3.Components
|
||||
return numChange;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Congela la definizione giornaliera di produzione
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private async Task FreezeDay()
|
||||
{
|
||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", $"Sicuro di voler confermare gli eventi della giornata? i valori non saranno più modificabili."))
|
||||
return;
|
||||
|
||||
// esegue stored
|
||||
bool fatto = false;
|
||||
if (RecMSE != null)
|
||||
{
|
||||
string IdxMacc = RecMSE.IdxMacchina;
|
||||
fatto = await TabDServ.InsManFreezeDay(IdxMacc, dtCurr);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
private bool IsTimeInfoOk(DateTime reqDate, bool reloadDay)
|
||||
{
|
||||
bool allOk = false;
|
||||
@@ -353,8 +363,13 @@ namespace MP_TAB3.Components
|
||||
if (ListDTO != null)
|
||||
{
|
||||
var dayDto = ListDTO.FirstOrDefault(x => x.DataRif == reqDate.Date);
|
||||
if (dayDto != null && (ListDay != null || (reloadDay && ListPeriod != null)))
|
||||
if (dayDto != null && ListDay != null && ListPeriod != null)
|
||||
{
|
||||
// se listDay vuoto forzo reload...
|
||||
if (ListDay.Count == 0)
|
||||
{
|
||||
reloadDay = true;
|
||||
}
|
||||
if (reloadDay)
|
||||
{
|
||||
// calcolo eventi giorno
|
||||
@@ -379,22 +394,13 @@ namespace MP_TAB3.Components
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Congela la definizione giornaliera di produzione
|
||||
/// Restitusice la % formattata in invariant con "." e senza spazi prima della %
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
private async Task FreezeDay()
|
||||
private string PercWidth(double value)
|
||||
{
|
||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", $"Sicuro di voler confermare gli eventi della giornata? i valori non saranno più modificabili."))
|
||||
return;
|
||||
|
||||
// esegue stored
|
||||
bool fatto = false;
|
||||
if (RecMSE != null)
|
||||
{
|
||||
string IdxMacc = RecMSE.IdxMacchina;
|
||||
fatto = await TabDServ.InsManFreezeDay(IdxMacc, dtCurr);
|
||||
}
|
||||
return;
|
||||
return value.ToString("P2", CultureInfo.InvariantCulture).Replace(" ", "");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -513,7 +519,24 @@ namespace MP_TAB3.Components
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
private void SearchArtToggle()
|
||||
{
|
||||
doSearchArt = !doSearchArt;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Salva selezione articolo
|
||||
/// </summary>
|
||||
/// <param name="codArt"></param>
|
||||
private void SetArtSelected(string codArt)
|
||||
{
|
||||
if (EditRecord != null)
|
||||
{
|
||||
EditRecord.CodArticolo = codArt;
|
||||
doSearchArt = false;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>6.16.2504.717</Version>
|
||||
<Version>6.16.2504.719</Version>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP_TAB3</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 6.16.2504.717</h4>
|
||||
<h4>Versione: 6.16.2504.719</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2504.717
|
||||
6.16.2504.719
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2504.717</version>
|
||||
<version>6.16.2504.719</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/MP-TAB3.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -1152,7 +1152,7 @@ namespace MP.Data.Services
|
||||
}
|
||||
// se non arrivo a mezzanotte aggiungo "pad finale"
|
||||
var deltaFin = TimeSpan.FromHours(24).Subtract(periodEnd.TimeOfDay);
|
||||
if (deltaFin.TotalMinutes > 1)
|
||||
if (deltaFin.TotalMinutes > 0.01)
|
||||
{
|
||||
lastIdxTipo = 0;
|
||||
currRec = new ManualStatusDTO
|
||||
@@ -1160,7 +1160,7 @@ namespace MP.Data.Services
|
||||
IdxTipo = lastIdxTipo,
|
||||
CssBlock = "bg-light text-dark",
|
||||
Title = "missing",
|
||||
Value = deltaFin.TotalMinutes,
|
||||
Value = deltaFin.TotalMinutes,
|
||||
ValueMax = 1440
|
||||
};
|
||||
result.Add(currRec);
|
||||
|
||||
Reference in New Issue
Block a user