Aggiunto stored x freeze giorno in TAB3
This commit is contained in:
@@ -352,14 +352,22 @@ namespace MP_TAB3.Components
|
||||
return allOk;
|
||||
}
|
||||
|
||||
|
||||
/// <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
|
||||
await Task.Delay(500);
|
||||
bool fatto = false;
|
||||
if (RecMSE != null)
|
||||
{
|
||||
string IdxMacc = RecMSE.IdxMacchina;
|
||||
fatto = await TabDServ.InsManFreezeDay(IdxMacc, dtCurr);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>6.16.2504.418</Version>
|
||||
<Version>6.16.2504.712</Version>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP_TAB3</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 6.16.2504.418</h4>
|
||||
<h4>Versione: 6.16.2504.712</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2504.418
|
||||
6.16.2504.712
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2504.418</version>
|
||||
<version>6.16.2504.712</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>
|
||||
|
||||
@@ -693,6 +693,29 @@ namespace MP.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Congela la giornata di ins manuali richeista
|
||||
/// </summary>
|
||||
/// <param name="idxMacchina"></param>
|
||||
/// <param name="dtCurr"></param>
|
||||
/// <returns></returns>
|
||||
public bool InsManFreezeDay(string idxMacchina, DateTime dtCurr)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
var IdxMacc = new SqlParameter("@IdxMacchina", idxMacchina);
|
||||
var DataElab = new SqlParameter("@DataElab", dtCurr);
|
||||
|
||||
var dbResult = dbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("EXEC stp_IM_ElaboraInsManuali @IdxMacchina, @DataElab", IdxMacc, DataElab);
|
||||
fatto = dbResult > 0;
|
||||
}
|
||||
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Esegue upsert record
|
||||
/// </summary>
|
||||
|
||||
@@ -20,6 +20,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MongoDB.Driver.Core.Operations;
|
||||
using MP.Data.Controllers;
|
||||
using DnsClient.Protocol;
|
||||
|
||||
namespace MP.Data.Services
|
||||
{
|
||||
@@ -1168,6 +1169,24 @@ namespace MP.Data.Services
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Chiama stored x congelare i dati giornalieri
|
||||
/// </summary>
|
||||
/// <param name="idxMacchina"></param>
|
||||
/// <param name="dtCurr"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> InsManFreezeDay(string idxMacchina, DateTime dtCurr)
|
||||
{
|
||||
bool fatto = false;
|
||||
// salvo
|
||||
fatto = dbTabController.InsManFreezeDay(idxMacchina, dtCurr);
|
||||
// svuoto cache
|
||||
RedisValue pattern = $"{redisBaseKey}:InsMan:*";
|
||||
await ExecFlushRedisPatternAsync(pattern);
|
||||
return fatto;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Esegue salvataggio record + svuotamento cache
|
||||
/// </summary>
|
||||
@@ -4078,6 +4097,7 @@ namespace MP.Data.Services
|
||||
return redHashMpIO($"SavedTask:{idxMacchina}");
|
||||
}
|
||||
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user