Altri fix async
This commit is contained in:
@@ -2076,40 +2076,31 @@ namespace MP.Data.Controllers
|
||||
/// </summary>
|
||||
/// <param name="codGruppo"></param>
|
||||
/// <returns></returns>
|
||||
public List<AnagOperatoriModel> OperatoriGetFilt(string codGruppo)
|
||||
public async Task<List<AnagOperatoriModel>> OperatoriGetFiltAsync(string codGruppo)
|
||||
{
|
||||
List<AnagOperatoriModel> dbResult = new List<AnagOperatoriModel>();
|
||||
try
|
||||
using var dbCtx = new MoonProContext(options);
|
||||
if (codGruppo == "*")
|
||||
{
|
||||
using (var dbCtx = new MoonProContext(options))
|
||||
{
|
||||
if (codGruppo == "*")
|
||||
{
|
||||
dbResult = dbCtx
|
||||
.DbOperatori
|
||||
.AsNoTracking()
|
||||
.OrderBy(x => x.MatrOpr)
|
||||
.ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
dbResult = dbCtx
|
||||
.DbSetGrp2Oper
|
||||
.Where(g => g.CodGruppo == codGruppo)
|
||||
.Join(dbCtx.DbOperatori,
|
||||
g => g.MatrOpr,
|
||||
m => m.MatrOpr,
|
||||
(g, m) => m
|
||||
)
|
||||
.AsNoTracking()
|
||||
.OrderBy(x => x.MatrOpr)
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
dbResult = await dbCtx
|
||||
.DbOperatori
|
||||
.AsNoTracking()
|
||||
.OrderBy(x => x.MatrOpr)
|
||||
.ToListAsync();
|
||||
}
|
||||
catch (Exception exc)
|
||||
else
|
||||
{
|
||||
Log.Error($"Eccezione in OperatoriGetFilt{Environment.NewLine}{exc}");
|
||||
dbResult = await dbCtx
|
||||
.DbSetGrp2Oper
|
||||
.Where(g => g.CodGruppo == codGruppo)
|
||||
.Join(dbCtx.DbOperatori,
|
||||
g => g.MatrOpr,
|
||||
m => m.MatrOpr,
|
||||
(g, m) => m
|
||||
)
|
||||
.AsNoTracking()
|
||||
.OrderBy(x => x.MatrOpr)
|
||||
.ToListAsync();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.INVE</RootNamespace>
|
||||
<Version>8.16.2605.2812</Version>
|
||||
<Version>8.16.2605.2813</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOINVE </i>
|
||||
<h4>Versione: 8.16.2605.2812</h4>
|
||||
<h4>Versione: 8.16.2605.2813</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2605.2812
|
||||
8.16.2605.2813
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2605.2812</version>
|
||||
<version>8.16.2605.2813</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>8.16.2605.2812</Version>
|
||||
<Version>8.16.2605.2813</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MP-IOC </i>
|
||||
<h4>Versione: 8.16.2605.2812</h4>
|
||||
<h4>Versione: 8.16.2605.2813</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2605.2812
|
||||
8.16.2605.2813
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2605.2812</version>
|
||||
<version>8.16.2605.2813</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/MP.IOC.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<RootNamespace>MP.Land</RootNamespace>
|
||||
<Version>8.16.2605.2812</Version>
|
||||
<Version>8.16.2605.2813</Version>
|
||||
<Configurations>Debug;Release;Debug_LiManDebug</Configurations>
|
||||
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||
<RunAnalyzersDuringBuild>True</RunAnalyzersDuringBuild>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo Tablet MAPO - DotNet6</i>
|
||||
<h4>Versione: 8.16.2605.2812</h4>
|
||||
<h4>Versione: 8.16.2605.2813</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2605.2812
|
||||
8.16.2605.2813
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2605.2812</version>
|
||||
<version>8.16.2605.2813</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/MP.Land.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.MON</RootNamespace>
|
||||
<AssemblyName>$(AssemblyName.Replace(' ', '_'))</AssemblyName>
|
||||
<Version>8.16.2605.2812</Version>
|
||||
<Version>8.16.2605.2813</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 8.16.2605.2812</h4>
|
||||
<h4>Versione: 8.16.2605.2813</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2605.2812
|
||||
8.16.2605.2813
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2605.2812</version>
|
||||
<version>8.16.2605.2813</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-MON/stable/LAST/MP.MON.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-MON/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<RootNamespace>MP.Prog</RootNamespace>
|
||||
<Version>8.16.2605.2812</Version>
|
||||
<Version>8.16.2605.2813</Version>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo gestione Programmi MAPO</i>
|
||||
<h4>Versione: 8.16.2605.2812</h4>
|
||||
<h4>Versione: 8.16.2605.2813</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2605.2812
|
||||
8.16.2605.2813
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2605.2812</version>
|
||||
<version>8.16.2605.2813</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/MP.Prog.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.RIOC</RootNamespace>
|
||||
<Version>8.16.2605.2812</Version>
|
||||
<Version>8.16.2605.2813</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MP-RIOC </i>
|
||||
<h4>Versione: 8.16.2605.2812</h4>
|
||||
<h4>Versione: 8.16.2605.2813</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2605.2812
|
||||
8.16.2605.2813
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2605.2812</version>
|
||||
<version>8.16.2605.2813</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-RIOC/stable/LAST/MP.RIOC.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-RIOC/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -235,7 +235,7 @@ namespace MP.SPEC.Components
|
||||
selAzienda = await MDService.ConfigTryGetAsync("AZIENDA");
|
||||
giacenzeConf = await MDService.ConfigTryGetAsync("SPEC_ShowGiacenze");
|
||||
ListArticoli = await MDService.ArticoliGetSearchAsync(100000, "*", selAzienda, "");
|
||||
ListMacchine = MDService.MacchineGetFilt("*");
|
||||
ListMacchine = await MDService.MacchineGetFiltAsync("*");
|
||||
await ReloadData(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -128,18 +128,18 @@ namespace MP.SPEC.Components
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
protected void doShowRecipeArch(PODLExpModel selRec)
|
||||
protected async Task doShowRecipeArch(PODLExpModel selRec)
|
||||
{
|
||||
currRecord = selRec;
|
||||
currRecipeArchPath = MDService.MacchineRecipeArchive(selRec.IdxMacchina);
|
||||
currRecipeArchPath = await MDService.MacchineRecipeArchiveAsync(selRec.IdxMacchina);
|
||||
showRecipeArch = true;
|
||||
showRecipeConf = false;
|
||||
}
|
||||
|
||||
protected void doShowRecipeConf(PODLExpModel selRec)
|
||||
protected async Task doShowRecipeConf(PODLExpModel selRec)
|
||||
{
|
||||
currRecord = selRec;
|
||||
currRecipePath = MDService.MacchineRecipeConf(selRec.IdxMacchina);
|
||||
currRecipePath = await MDService.MacchineRecipeConfAsync(selRec.IdxMacchina);
|
||||
showRecipeArch = false;
|
||||
showRecipeConf = true;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace MP.SPEC.Controllers
|
||||
public async Task<string> GetByPODL(string idxMacc, int idxPODL)
|
||||
{
|
||||
string answ = "";
|
||||
string archPath = DService.MacchineRecipeArchive(idxMacc);
|
||||
string archPath = await DService.MacchineRecipeArchiveAsync(idxMacc);
|
||||
var podlData = await DService.POdlGetByKey(idxPODL);
|
||||
if (podlData != null)
|
||||
{
|
||||
@@ -43,10 +43,10 @@ namespace MP.SPEC.Controllers
|
||||
}
|
||||
|
||||
[HttpGet("GetFile")]
|
||||
public string GetFile(string idxMacc, string fileName)
|
||||
public async Task<string> GetFile(string idxMacc, string fileName)
|
||||
{
|
||||
string answ = "";
|
||||
string archPath = DService.MacchineRecipeArchive(idxMacc);
|
||||
string archPath = await DService.MacchineRecipeArchiveAsync(idxMacc);
|
||||
if (!string.IsNullOrEmpty(archPath))
|
||||
{
|
||||
string fullPath = Path.Combine(archPath, fileName);
|
||||
|
||||
@@ -1349,43 +1349,6 @@ namespace MP.SPEC.Data
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco di tutte le macchine filtrate x gruppo
|
||||
/// </summary>
|
||||
/// <param name="codGruppo"></param>
|
||||
/// <returns></returns>
|
||||
public List<MacchineModel> MacchineGetFilt(string codGruppo)
|
||||
{
|
||||
using var activity = ActivitySource.StartActivity("MacchineGetFilt");
|
||||
List<MacchineModel>? result = new List<MacchineModel>();
|
||||
string source = "DB";
|
||||
string keyGrp = codGruppo != "*" ? codGruppo : "ALL";
|
||||
string currKey = $"{Utils.redisMacList}:{keyGrp}";
|
||||
// cerco in redis dato valore sel idxMaccSel...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
result = JsonConvert.DeserializeObject<List<MacchineModel>>($"{rawData}");
|
||||
source = "REDIS";
|
||||
}
|
||||
else
|
||||
{
|
||||
result = dbController.MacchineGetFilt(codGruppo);
|
||||
// serializzo e salvo...
|
||||
rawData = JsonConvert.SerializeObject(result);
|
||||
redisDb.StringSet(currKey, rawData, getRandTOut(redisLongTimeCache));
|
||||
}
|
||||
if (result == null)
|
||||
{
|
||||
result = new List<MacchineModel>();
|
||||
}
|
||||
activity?.SetTag("data.source", source);
|
||||
activity?.SetTag("result.count", 1);
|
||||
activity?.Stop();
|
||||
LogTrace($"MacchineGetFilt | Read from {source}: {activity?.Duration.TotalMilliseconds}ms");
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco di tutte le macchine filtrate x gruppo
|
||||
/// </summary>
|
||||
@@ -1412,14 +1375,14 @@ namespace MP.SPEC.Data
|
||||
/// </summary>
|
||||
/// <param name="idxMacchina"></param>
|
||||
/// <returns></returns>
|
||||
public string MacchineRecipeArchive(string idxMacchina)
|
||||
public async Task<string> MacchineRecipeArchiveAsync(string idxMacchina)
|
||||
{
|
||||
using var activity = ActivitySource.StartActivity("MacchineRecipeArchive");
|
||||
using var activity = ActivitySource.StartActivity("MacchineRecipeArchiveAsync");
|
||||
string? result = "";
|
||||
string source = "DB";
|
||||
string currKey = $"{Utils.redisMacRecipePath}:{idxMacchina}";
|
||||
// cerco in redis dato valore sel idxMaccSel...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
RedisValue rawData = await redisDb.StringGetAsync(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
result = JsonConvert.DeserializeObject<string>($"{rawData}");
|
||||
@@ -1428,17 +1391,17 @@ namespace MP.SPEC.Data
|
||||
else
|
||||
{
|
||||
//recupero elenco macchine...
|
||||
var machineList = MacchineGetFilt("*");
|
||||
var machineList = await MacchineGetFiltAsync("*");
|
||||
var currMach = machineList.Where(x => x.IdxMacchina == idxMacchina).FirstOrDefault();
|
||||
result = currMach != null ? currMach.RecipeArchivePath : null;
|
||||
// serializzo e salvo...
|
||||
rawData = JsonConvert.SerializeObject(result);
|
||||
redisDb.StringSet(currKey, rawData, getRandTOut(redisLongTimeCache));
|
||||
await redisDb.StringSetAsync(currKey, rawData, getRandTOut(redisLongTimeCache));
|
||||
}
|
||||
activity?.SetTag("data.source", source);
|
||||
activity?.SetTag("result.count", 1);
|
||||
activity?.Stop();
|
||||
LogTrace($"MacchineRecipeArchive | Read from {source}: {activity?.Duration.TotalMilliseconds}ms");
|
||||
LogTrace($"MacchineRecipeArchiveAsync | Read from {source}: {activity?.Duration.TotalMilliseconds}ms");
|
||||
return result ?? "";
|
||||
}
|
||||
|
||||
@@ -1447,14 +1410,14 @@ namespace MP.SPEC.Data
|
||||
/// </summary>
|
||||
/// <param name="idxMacchina"></param>
|
||||
/// <returns></returns>
|
||||
public string MacchineRecipeConf(string idxMacchina)
|
||||
public async Task<string> MacchineRecipeConfAsync(string idxMacchina)
|
||||
{
|
||||
using var activity = ActivitySource.StartActivity("MacchineRecipeConf");
|
||||
using var activity = ActivitySource.StartActivity("MacchineRecipeConfAsync");
|
||||
string? result = "";
|
||||
string source = "DB";
|
||||
string currKey = $"{Utils.redisMacRecipeConf}:{idxMacchina}";
|
||||
// cerco in redis dato valore sel idxMaccSel...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
RedisValue rawData = await redisDb.StringGetAsync(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
result = JsonConvert.DeserializeObject<string>($"{rawData}");
|
||||
@@ -1463,17 +1426,17 @@ namespace MP.SPEC.Data
|
||||
else
|
||||
{
|
||||
//recupero elenco macchine...
|
||||
var machineList = MacchineGetFilt("*");
|
||||
var machineList = await MacchineGetFiltAsync("*");
|
||||
var currMach = machineList.Where(x => x.IdxMacchina == idxMacchina).FirstOrDefault();
|
||||
result = currMach != null ? currMach.RecipePath : null;
|
||||
// serializzo e salvo...
|
||||
rawData = JsonConvert.SerializeObject(result);
|
||||
redisDb.StringSet(currKey, rawData, getRandTOut(redisLongTimeCache));
|
||||
await redisDb.StringSetAsync(currKey, rawData, getRandTOut(redisLongTimeCache));
|
||||
}
|
||||
activity?.SetTag("data.source", source);
|
||||
activity?.SetTag("result.count", 1);
|
||||
activity?.Stop();
|
||||
LogTrace($"MacchineRecipeConf | Read from {source}: {activity?.Duration.TotalMilliseconds}ms");
|
||||
LogTrace($"MacchineRecipeConfAsync | Read from {source}: {activity?.Duration.TotalMilliseconds}ms");
|
||||
return result ?? "";
|
||||
}
|
||||
|
||||
@@ -1767,15 +1730,15 @@ namespace MP.SPEC.Data
|
||||
/// </summary>
|
||||
/// <param name="codGruppo"></param>
|
||||
/// <returns></returns>
|
||||
public List<AnagOperatoriModel> OperatoriGetFilt(string codGruppo)
|
||||
public async Task<List<AnagOperatoriModel>> OperatoriGetFiltAsync(string codGruppo)
|
||||
{
|
||||
using var activity = ActivitySource.StartActivity("OperatoriGetFilt");
|
||||
using var activity = ActivitySource.StartActivity("OperatoriGetFiltAsync");
|
||||
List<AnagOperatoriModel>? result = new List<AnagOperatoriModel>();
|
||||
string source = "DB";
|
||||
string keyGrp = codGruppo != "*" ? codGruppo : "ALL";
|
||||
string currKey = $"{Utils.redisOprList}:{keyGrp}";
|
||||
// cerco in redis dato valore sel idxMaccSel...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
RedisValue rawData = await redisDb.StringGetAsync(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
result = JsonConvert.DeserializeObject<List<AnagOperatoriModel>>($"{rawData}");
|
||||
@@ -1783,10 +1746,10 @@ namespace MP.SPEC.Data
|
||||
}
|
||||
else
|
||||
{
|
||||
result = dbController.OperatoriGetFilt(codGruppo);
|
||||
result = await dbController.OperatoriGetFiltAsync(codGruppo);
|
||||
// serializzo e salvo...
|
||||
rawData = JsonConvert.SerializeObject(result);
|
||||
redisDb.StringSet(currKey, rawData, getRandTOut(redisLongTimeCache));
|
||||
await redisDb.StringSetAsync(currKey, rawData, getRandTOut(redisLongTimeCache));
|
||||
}
|
||||
if (result == null)
|
||||
{
|
||||
@@ -1794,7 +1757,7 @@ namespace MP.SPEC.Data
|
||||
}
|
||||
activity?.SetTag("result.count", result.Count);
|
||||
activity?.Stop();
|
||||
LogTrace($"OperatoriGetFilt | Read from {source}: {activity?.Duration.TotalMilliseconds}ms"); activity?.SetTag("data.source", source);
|
||||
LogTrace($"OperatoriGetFiltAsync | Read from {source}: {activity?.Duration.TotalMilliseconds}ms"); activity?.SetTag("data.source", source);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.SPEC</RootNamespace>
|
||||
<Version>8.16.2605.2812</Version>
|
||||
<Version>8.16.2605.2813</Version>
|
||||
<UserSecretsId>1800a78a-6ff1-40f9-b490-87fb8bfc1394</UserSecretsId>
|
||||
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -120,17 +120,17 @@ namespace MP.SPEC.Pages
|
||||
isReindexing = false;
|
||||
}
|
||||
|
||||
protected override void OnInitialized()
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
ReloadStats();
|
||||
ReloadData();
|
||||
await ReloadDataAsync();
|
||||
}
|
||||
|
||||
protected void ReloadMacchine()
|
||||
protected async Task ReloadMacchineAsync()
|
||||
{
|
||||
if (ListMacchineAll == null || ListMacchineAll.Count == 0)
|
||||
{
|
||||
var rawData = MDataServ.MacchineGetFilt("*");
|
||||
var rawData = await MDataServ.MacchineGetFiltAsync("*");
|
||||
// trasformo!
|
||||
if (rawData != null)
|
||||
{
|
||||
@@ -218,9 +218,9 @@ namespace MP.SPEC.Pages
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void ReloadData()
|
||||
private async Task ReloadDataAsync()
|
||||
{
|
||||
ReloadMacchine();
|
||||
await ReloadMacchineAsync();
|
||||
DateTime dtEnd = DateTime.Today.AddDays(1);
|
||||
DateTime dtStart = dtEnd.AddMonths(-1);
|
||||
CurrPeriodo = new Periodo(dtStart, dtEnd);
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using DnsClient.Protocol;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using MP.Core.DTO;
|
||||
using MP.Data.DbModels;
|
||||
using MP.Data.Services;
|
||||
using MP.SPEC.Data;
|
||||
|
||||
namespace MP.SPEC.Pages
|
||||
@@ -24,13 +22,26 @@ namespace MP.SPEC.Pages
|
||||
[Inject]
|
||||
protected MpDataService MDService { get; set; } = null!;
|
||||
|
||||
protected string SearchVal
|
||||
{
|
||||
get => searchVal;
|
||||
set
|
||||
{
|
||||
if (searchVal != value)
|
||||
{
|
||||
searchVal = value;
|
||||
ReloadDataAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
ReloadData();
|
||||
ReloadDataAsync();
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
@@ -41,10 +52,17 @@ namespace MP.SPEC.Pages
|
||||
|
||||
private bool isLoading = false;
|
||||
|
||||
private string searchVal = "";
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private string btnSearchCss
|
||||
{
|
||||
get => string.IsNullOrWhiteSpace(SearchVal) ? "btn-secondary" : "btn-primary";
|
||||
}
|
||||
|
||||
private string CssMain
|
||||
{
|
||||
get => ShowDetail ? "col-3" : "col-12";
|
||||
@@ -65,17 +83,22 @@ namespace MP.SPEC.Pages
|
||||
{
|
||||
CodGruppo = "";
|
||||
}
|
||||
ReloadData();
|
||||
ReloadDataAsync();
|
||||
}
|
||||
|
||||
private void ReloadData()
|
||||
private async Task ReloadBaseDataAsync()
|
||||
{
|
||||
ListMacchineAll = await MDService.MacchineGetFiltAsync("*");
|
||||
var listRaw = await MDService.OperatoriGetFiltAsync("*");
|
||||
ListOperatoriAll = listRaw.Where(x => x.isEnabled).ToList();
|
||||
}
|
||||
|
||||
private async Task ReloadDataAsync()
|
||||
{
|
||||
isLoading = true;
|
||||
ListMacchine?.Clear();
|
||||
ListMacchineAll = MDService.MacchineGetFilt("*");
|
||||
ListOperatoriAll= MDService.OperatoriGetFilt("*").Where(x => x.isEnabled).ToList();
|
||||
var rawList = MDService.ElencoRepartiDTO();
|
||||
if(string.IsNullOrEmpty(SearchVal))
|
||||
if (string.IsNullOrEmpty(SearchVal))
|
||||
{
|
||||
ListReparti = rawList;
|
||||
}
|
||||
@@ -85,51 +108,33 @@ namespace MP.SPEC.Pages
|
||||
}
|
||||
if (!string.IsNullOrEmpty(CodGruppo))
|
||||
{
|
||||
ReloadDetail();
|
||||
await ReloadDetailAsync();
|
||||
}
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
private void ReloadDetail()
|
||||
private async Task ReloadDetailAsync()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(CodGruppo))
|
||||
{
|
||||
ListMacchine = MDService.MacchineGetFilt(CodGruppo);
|
||||
ListOperatori = MDService.OperatoriGetFilt(CodGruppo).Where(x => x.isEnabled).ToList();
|
||||
ListMacchine = await MDService.MacchineGetFiltAsync(CodGruppo);
|
||||
ListOperatori = (await MDService.OperatoriGetFiltAsync(CodGruppo))
|
||||
.Where(x => x.isEnabled).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
private void SetCodGruppo(string CodGruppoSel)
|
||||
{
|
||||
isLoading = true;
|
||||
CodGruppo = CodGruppoSel;
|
||||
ReloadDetail();
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
private string btnSearchCss
|
||||
{
|
||||
get => string.IsNullOrWhiteSpace(SearchVal) ? "btn-secondary" : "btn-primary";
|
||||
}
|
||||
|
||||
private void ResetSearch()
|
||||
{
|
||||
SearchVal = "";
|
||||
}
|
||||
|
||||
protected string SearchVal
|
||||
private async Task SetCodGruppo(string CodGruppoSel)
|
||||
{
|
||||
get => searchVal;
|
||||
set
|
||||
{
|
||||
if (searchVal != value)
|
||||
{
|
||||
searchVal = value;
|
||||
ReloadData();
|
||||
}
|
||||
}
|
||||
isLoading = true;
|
||||
CodGruppo = CodGruppoSel;
|
||||
await ReloadDetailAsync();
|
||||
isLoading = false;
|
||||
}
|
||||
private string searchVal = "";
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace MP.SPEC.Pages
|
||||
ListGruppiFase = allGruppiData.Where(x => x.SelEnabled).ToList();
|
||||
}
|
||||
ListStati = await MDService.AnagStatiCommAsync();
|
||||
ListMacchine = MDService.MacchineGetFilt(selReparto);
|
||||
ListMacchine = await MDService.MacchineGetFiltAsync(selReparto);
|
||||
padCodXdl = await MDService.ConfigTryGetAsync("PadCodXdl");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 8.16.2605.2812</h4>
|
||||
<h4>Versione: 8.16.2605.2813</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2605.2812
|
||||
8.16.2605.2813
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2605.2812</version>
|
||||
<version>8.16.2605.2813</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<RootNamespace>MP.Stats</RootNamespace>
|
||||
<UserSecretsId>826e877c-ba70-4253-84cb-d0b1cafd4440</UserSecretsId>
|
||||
<Version>8.16.2605.2812</Version>
|
||||
<Version>8.16.2605.2813</Version>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo statistiche MAPO</i>
|
||||
<h4>Versione: 8.16.2605.2812</h4>
|
||||
<h4>Versione: 8.16.2605.2813</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2605.2812
|
||||
8.16.2605.2813
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2605.2812</version>
|
||||
<version>8.16.2605.2813</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/MP.Stats.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -42,6 +42,71 @@ I metodi verranno suddivisi in:
|
||||
- [x] `TksScoreAsync`
|
||||
- [x] `WipKitFiltAsync`
|
||||
- [x] `POdlGetByOdlAsync`
|
||||
- [x] `FluxLogGetLastFiltAsync`
|
||||
- [x] `FluxLogParetoAsync`
|
||||
- [ ] `AnagEventiGeneral`
|
||||
- [ ] `AnagEventiGetByMacch`
|
||||
- [ ] `AnagKeyValGetAll`
|
||||
- [ ] `AnagStatiComm`
|
||||
- [ ] `AnagTipoArtLvAsync`
|
||||
- [ ] `ArticleWithDossier`
|
||||
- [ ] `ConfigGetAll`
|
||||
- [ ] `DbDedupStats`
|
||||
- [ ] `ElencoRepartiDTO`
|
||||
- [ ] `ExpiryReloadParamGet`
|
||||
- [ ] `IobInfo`
|
||||
- [ ] `ListPODL_ByCodArt`
|
||||
- [ ] `MacchineGetFilt`
|
||||
- [ ] `MacchineRecipeArchive`
|
||||
- [ ] `MacchineRecipeConf`
|
||||
- [ ] `MachIobConf`
|
||||
- [ ] `MseGetAll`
|
||||
- [ ] `OdlByBatch`
|
||||
- [ ] `OdlGetCurrentAsync`
|
||||
- [ ] `OdlListGetFilt`
|
||||
- [ ] `OperatoriGetFilt`
|
||||
- [ ] `ParametriGetFilt`
|
||||
- [ ] `POdlGetByKey`
|
||||
- [ ] `POdlListByKitParent`
|
||||
- [ ] `ProcFLStats`
|
||||
- [ ] `StatoMacchina`
|
||||
- [ ] `TagConfGetKey`
|
||||
- [ ] `VocabolarioGetAll`
|
||||
|
||||
#### Fase 3: Refactoring Metodi di Scrittura e Invalidazione
|
||||
- [ ] `AnagGruppiDelete`
|
||||
- [ ] `AnagGruppiUpsert`
|
||||
- [ ] `ArticoliDeleteRecord`
|
||||
- [ ] `ArticoliUpdateRecord`
|
||||
- [ ] `ConfigResetCache`
|
||||
- [ ] `DossiersDeleteRecord`
|
||||
- [ ] `DossiersTakeParamsSnapshotLast`
|
||||
- [ ] `IstKitDelete`
|
||||
- [ ] `IstKitInsertByWKS`
|
||||
- [ ] `IstKitUpsert`
|
||||
- [ ] `PodlIstKitDelete`
|
||||
- [ ] `POdlDoSetup`
|
||||
- [ ] `POdlUpdateRecipe`
|
||||
- [ ] `POdlUpdateRecord`
|
||||
- [ ] `RecipeSetByPODL`
|
||||
- [ ] `TemplateKitDelete`
|
||||
- [ ] `TemplateKitUpsert` Fase 2: Refactoring Metodi di Lettura
|
||||
- [x] `ActionGetReq` (Completato)
|
||||
- [x] `TemplateKitFiltAsync`
|
||||
- [x] `AnagTipoArtLvAsync`
|
||||
- [x] `ElencoLinkAsync`
|
||||
- [x] `ConfigGetAllAsync`
|
||||
- [x] `DossiersGetLastFiltAsync`
|
||||
- [x] `ElencoGruppiFaseAsync`
|
||||
- [x] `IstKitFiltAsync`
|
||||
- [x] `ListGiacenzeAsync`
|
||||
- [x] `MacchineWithFluxAsync`
|
||||
- [x] `POdlListGetFiltAsync`
|
||||
- [x] `TksScoreAsync`
|
||||
- [x] `WipKitFiltAsync`
|
||||
- [x] `POdlGetByOdlAsync`
|
||||
- [x] `FluxLogGetLastFiltAsync`
|
||||
- [x] `FluxLogParetoAsync`
|
||||
- [ ] `AnagEventiGeneral`
|
||||
- [ ] `AnagEventiGetByMacch`
|
||||
- [ ] `AnagKeyValGetAll`
|
||||
|
||||
Reference in New Issue
Block a user