Merge branch 'Release/AddGcCollect02'

This commit is contained in:
Samuele Locatelli
2024-01-26 16:57:33 +01:00
12 changed files with 49 additions and 35 deletions
+22 -23
View File
@@ -49,6 +49,26 @@ namespace MP_TAB3.Components
}
}
[Inject]
protected MessageService MServ { get; set; } = null!;
[Inject]
protected NavigationManager NavMan { get; set; } = null!;
protected bool ShowInsFermata { get; set; } = false;
protected bool ShowReqControls { get; set; } = false;
[Inject]
protected SharedMemService SMServ { get; set; } = null!;
[Inject]
protected TabDataService TabDServ { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
/// <summary>
/// Verifica necessit visualizzare il check controlli
/// </summary>
@@ -87,25 +107,6 @@ namespace MP_TAB3.Components
return answ;
}
[Inject]
protected NavigationManager NavMan { get; set; } = null!;
protected bool ShowInsFermata { get; set; } = false;
protected bool ShowReqControls { get; set; } = false;
[Inject]
protected SharedMemService SMServ { get; set; } = null!;
[Inject]
protected TabDataService TabDServ { get; set; } = null!;
protected DateTime lastCheck = DateTime.Today;
protected string lastIdxMacc = "";
#endregion Protected Properties
#region Protected Methods
protected void GoToControls()
{
NavMan.NavigateTo("controls");
@@ -120,13 +121,11 @@ namespace MP_TAB3.Components
{
if (RecMSE != null)
{
DateTime adesso = DateTime.Now;
if (adesso.Subtract(lastCheck).TotalSeconds > 15 || lastIdxMacc != RecMSE.IdxMacchina)
if (MServ.LastIdxMacchina != RecMSE.IdxMacchina)
{
ShowInsFermata = CheckShowInsFermata;
ShowReqControls = await CheckShowReqControls();
lastIdxMacc = RecMSE.IdxMacchina;
lastCheck = adesso;
MServ.LastIdxMacchina = RecMSE.IdxMacchina;
}
}
}
+1 -1
View File
@@ -88,7 +88,7 @@ namespace MP_TAB3.Components
}
DateTime fine = DateTime.Today.AddDays(1);
DateTime inizio = fine.AddDays(-8);
DateTime inizio = fine.AddDays(-3);
CurrPeriodo = new Periodo(inizio, fine);
await doUpdate();
}
+1 -1
View File
@@ -77,7 +77,7 @@ namespace MP_TAB3.Components
}
DateTime fine = DateTime.Today.AddDays(1);
DateTime inizio = fine.AddDays(-8);
DateTime inizio = fine.AddDays(-3);
CurrPeriodo = new Periodo(inizio, fine);
await doUpdate();
}
+1 -1
View File
@@ -66,7 +66,7 @@ namespace MP_TAB3.Components
}
DateTime fine = DateTime.Today.AddDays(1);
DateTime inizio = fine.AddDays(-8);
DateTime inizio = fine.AddDays(-3);
CurrPeriodo = new Periodo(inizio, fine);
await ReloadData();
}
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<Version>6.16.2401.2609</Version>
<Version>6.16.2401.2616</Version>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP_TAB3</RootNamespace>
</PropertyGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 6.16.2401.2609</h4>
<h4>Versione: 6.16.2401.2616</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2401.2609
6.16.2401.2616
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2401.2609</version>
<version>6.16.2401.2616</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>
-1
View File
@@ -173,7 +173,6 @@ namespace MP.Data.Services
// cerco in redis...
string currKey = $"{redisBaseKey}:Menu:ALL";
RedisValue rawData = await redisDb.StringGetAsync(currKey);
//if (!string.IsNullOrEmpty($"{rawData}"))
if (rawData.HasValue)
{
result = JsonConvert.DeserializeObject<List<LinkMenu>>($"{rawData}");
+15
View File
@@ -97,6 +97,20 @@ namespace MP.Data.Services
public DateTime dtLastAction { get; set; } = DateTime.Now;
public DateTime dtLastSave { get; set; } = DateTime.Now;
public string LastIdxMacchina
{
get
{
string answ = "";
answ = redisDb.StringGet((RedisKey)$"{redisBaseKey}:{MatrOpr}:lastIdxMacc");
return answ;
}
set
{
redisDb.StringSet((RedisKey)$"{redisBaseKey}:{MatrOpr}:lastIdxMacc", value, TimeSpan.FromSeconds(30));
}
}
public int MatrOpr
{
get
@@ -612,6 +626,7 @@ namespace MP.Data.Services
/// </summary>
private int cacheTtlShort = 60 * 1;
private string lastIdxMacc = "";
private Logger Log = LogManager.GetCurrentClassLogger();
private string redisBaseKey = "MP:TAB:User";
private Random rnd = new Random();
+1
View File
@@ -1,6 +1,7 @@
using MP.Data.DatabaseModels;
using NLog;
using StackExchange.Redis;
using System;
using System.Collections.Generic;
using System.Linq;
+4 -4
View File
@@ -1951,7 +1951,7 @@ namespace MP.Data.Services
result = dbTabController.RegControlliFilt(idxMacchina, idxODL, dataFrom, dataTo, showMulti);
// serializzp e salvo...
rawData = JsonConvert.SerializeObject(result);
await redisDb.StringSetAsync(currKey, rawData, FastCache);
await redisDb.StringSetAsync(currKey, rawData, UltraLongCache);
}
if (result == null)
{
@@ -2013,7 +2013,7 @@ namespace MP.Data.Services
result = dbTabController.RegControlliLast(idxMacchina);
// serializzp e salvo...
rawData = JsonConvert.SerializeObject(result);
await redisDb.StringSetAsync(currKey, rawData, FastCache);
await redisDb.StringSetAsync(currKey, rawData, UltraLongCache);
}
if (result == null)
{
@@ -2053,7 +2053,7 @@ namespace MP.Data.Services
result = dbTabController.RegDichiarGetFilt(idxMacchina, tagCode, matrOpr, idxODL, dataFrom, dataTo);
// serializzp e salvo...
rawData = JsonConvert.SerializeObject(result);
await redisDb.StringSetAsync(currKey, rawData, FastCache);
await redisDb.StringSetAsync(currKey, rawData, UltraLongCache);
}
if (result == null)
{
@@ -2139,7 +2139,7 @@ namespace MP.Data.Services
result = dbTabController.RegScartiGetFilt(idxMacchina, idxODL, dataFrom, dataTo, showMulti);
// serializzp e salvo...
rawData = JsonConvert.SerializeObject(result);
await redisDb.StringSetAsync(currKey, rawData, FastCache);
await redisDb.StringSetAsync(currKey, rawData, UltraLongCache);
}
if (result == null)
{