diff --git a/MP-TAB3/Components/SelectCodArt.razor.cs b/MP-TAB3/Components/SelectCodArt.razor.cs
index f1a0b850..4fb4dd3b 100644
--- a/MP-TAB3/Components/SelectCodArt.razor.cs
+++ b/MP-TAB3/Components/SelectCodArt.razor.cs
@@ -105,7 +105,7 @@ namespace MP_TAB3.Components
if (!ListArtDisabled)
{
Log.Debug("START GetArticoli");
- var rawData = await MDataService.ArticoliGetSearch(10000, "*", searchVal);
+ var rawData = await MDataService.ArticoliGetSearch(10000,"*", "*", searchVal);
// trasformo!
if (rawData != null)
{
diff --git a/MP-TAB3/Components/TcHistoryFilter.razor.cs b/MP-TAB3/Components/TcHistoryFilter.razor.cs
index 004c0bab..f9898a35 100644
--- a/MP-TAB3/Components/TcHistoryFilter.razor.cs
+++ b/MP-TAB3/Components/TcHistoryFilter.razor.cs
@@ -137,7 +137,7 @@ namespace MP_TAB3.Components
if (!ListArtDisabled)
{
Log.Debug("START GetArticoli");
- var rawData = await MDataService.ArticoliGetSearch(10000, "*", searchVal);
+ var rawData = await MDataService.ArticoliGetSearch(10000,"*", "*", searchVal);
// trasformo!
if (rawData != null)
{
diff --git a/MP.Data/Controllers/MpSpecController.cs b/MP.Data/Controllers/MpSpecController.cs
index 969105e9..3a06287d 100644
--- a/MP.Data/Controllers/MpSpecController.cs
+++ b/MP.Data/Controllers/MpSpecController.cs
@@ -476,28 +476,6 @@ namespace MP.Data.Controllers
return dbResult;
}
- ///
- /// Elenco tabella Articoli da filtro
- ///
- ///
- ///
- ///
- public List ArticoliGetSearch(int numRecord, string searchVal = "")
- {
- List dbResult = new List();
- using (var dbCtx = new MoonProContext(options))
- {
- dbResult = dbCtx
- .DbSetArticoli
- .AsNoTracking()
- .Where(x => x.CodArticolo.Contains(searchVal) || x.DescArticolo.Contains(searchVal) || x.Disegno.Contains(searchVal) || string.IsNullOrEmpty(searchVal))
- .OrderBy(x => x.CodArticolo)
- .Take(numRecord)
- .ToList();
- }
- return dbResult;
- }
-
///
/// Elenco tabella Articoli da filtro
///
diff --git a/MP.Data/Services/ListSelectDataSrv.cs b/MP.Data/Services/ListSelectDataSrv.cs
index 2e49fc21..1452f71a 100644
--- a/MP.Data/Services/ListSelectDataSrv.cs
+++ b/MP.Data/Services/ListSelectDataSrv.cs
@@ -54,14 +54,14 @@ namespace MP.Data.Services
/// cod azienda, * = tutte
/// Ricerca testuale
///
- public async Task> ArticoliGetSearch(int numRecord, string azienda, string searchVal)
+ public async Task> ArticoliGetSearch(int numRecord, string tipoArt, string azienda, string searchVal)
{
string source = "DB";
Stopwatch sw = new Stopwatch();
sw.Start();
List? result = new List();
// cerco in _redisConn...
- string currKey = $"{redisBaseKey}:Art:{azienda}:{searchVal}:{numRecord}";
+ string currKey = $"{redisBaseKey}:Art:{azienda}:{tipoArt}:{searchVal}:{numRecord}";
RedisValue rawData = await _redisDb.StringGetAsync(currKey);
if (rawData.HasValue)
{
@@ -70,7 +70,7 @@ namespace MP.Data.Services
}
else
{
- result = await dbController.ArticoliGetSearchAsync(numRecord, azienda, searchVal);
+ result = await dbController.ArticoliGetSearchAsync(numRecord, tipoArt, azienda, searchVal);
// serializzp e salvo...
rawData = JsonConvert.SerializeObject(result);
await _redisDb.StringSetAsync(currKey, rawData, LongCache);
@@ -80,7 +80,7 @@ namespace MP.Data.Services
result = new List();
}
sw.Stop();
- Log.Debug($"ArticoliGetSearchAsync | azienda: {azienda} | searchVal: {searchVal} | numRecord: {numRecord} | {source} | {sw.Elapsed.TotalMilliseconds}ms");
+ Log.Trace($"ArticoliGetSearchAsync | azienda: {azienda} | tipoArt: {tipoArt} | searchVal: {searchVal} | numRecord: {numRecord} | {source} | {sw.Elapsed.TotalMilliseconds}ms");
return result;
}
diff --git a/MP.IOC/Data/MpDataService.cs b/MP.IOC/Data/MpDataService.cs
index 922965f3..8a0b1373 100644
--- a/MP.IOC/Data/MpDataService.cs
+++ b/MP.IOC/Data/MpDataService.cs
@@ -371,7 +371,7 @@ namespace MP.IOC.Data
}
else
{
- result = await Task.FromResult(SpecDbController.AnagStatiComm());
+ result = await SpecDbController.AnagStatiCommAsync();
// serializzo e salvo...
rawData = JsonConvert.SerializeObject(result);
await redisDb.StringSetAsync(Utils.redisStatoCom, rawData, getRandTOut(redisLongTimeCache));
@@ -425,7 +425,7 @@ namespace MP.IOC.Data
}
else
{
- result = await Task.FromResult(SpecDbController.AnagTipoArtLV());
+ result = await SpecDbController.AnagTipoArtLvAsync();
// serializzo e salvo...
rawData = JsonConvert.SerializeObject(result);
await redisDb.StringSetAsync(Utils.redisTipoArt, rawData, getRandTOut(redisLongTimeCache));
@@ -527,16 +527,18 @@ namespace MP.IOC.Data
/// Restitusice elenco articoli cercati
///
///
+ ///
+ ///
///
///
- public async Task> ArticoliGetSearch(int numRecord, string azienda, string searchVal)
+ public async Task> ArticoliGetSearchAsync(int numRecord, string tipoArt, string azienda, string searchVal)
{
List? result = new List();
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
string readType = "DB";
string sKey = string.IsNullOrEmpty(searchVal) ? "***" : searchVal;
- string currKey = $"{Utils.redisArtList}:{azienda}:{sKey}";
+ string currKey = $"{Utils.redisArtList}:{azienda}:{tipoArt}:{sKey}";
// cerco in redis dato valOut sel macchina...
RedisValue rawData = redisDb.StringGet(currKey);
if (rawData.HasValue)
@@ -546,7 +548,7 @@ namespace MP.IOC.Data
}
else
{
- result = await Task.FromResult(SpecDbController.ArticoliGetSearch(numRecord, azienda, searchVal));
+ result = await SpecDbController.ArticoliGetSearchAsync(numRecord, tipoArt, azienda, searchVal);
// serializzo e salvo...
rawData = JsonConvert.SerializeObject(result);
redisDb.StringSet(currKey, rawData, getRandTOut(redisLongTimeCache / 5));
@@ -557,7 +559,7 @@ namespace MP.IOC.Data
}
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
- Log.Debug($"ArticoliGetSearch | Read from {readType}: {ts.TotalMilliseconds}ms");
+ Log.Debug($"ArticoliGetSearchAsync | Read from {readType}: {ts.TotalMilliseconds}ms");
return result;
}
@@ -1095,9 +1097,9 @@ namespace MP.IOC.Data
/// Update chiave config
///
///
- public async Task ConfigUpdate(ConfigModel updRec)
+ public Task ConfigUpdateAsync(ConfigModel updRec)
{
- return await Task.FromResult(SpecDbController.ConfigUpdate(updRec));
+ return SpecDbController.ConfigUpdateAsync(updRec);
}
///
@@ -1310,7 +1312,7 @@ namespace MP.IOC.Data
///
public Task> ElencoAziende()
{
- return Task.FromResult(SpecDbController.AnagGruppiAziende());
+ return SpecDbController.AnagGruppiAziendeAsync();
}
///
@@ -2513,7 +2515,7 @@ namespace MP.IOC.Data
///
///
///
- public List OdlGetCurrent()
+ public async Task> OdlGetCurrentAsync()
{
List? dbResult = new List();
Stopwatch stopWatch = new Stopwatch();
@@ -2521,7 +2523,7 @@ namespace MP.IOC.Data
string readType = "DB";
string currKey = $"{Utils.redisOdlCurrByMac}";
// cerco in redis dato valOut sel macchina...
- RedisValue rawData = redisDb.StringGet(currKey);
+ RedisValue rawData = await redisDb.StringGetAsync(currKey);
if (rawData.HasValue)
{
try
@@ -2534,9 +2536,10 @@ namespace MP.IOC.Data
}
else
{
- dbResult = SpecDbController.OdlGetCurrent().Select(x => x.IdxMacchina).Distinct().ToList();
+ var rawList = await SpecDbController.OdlGetCurrentAsync();
+ dbResult = rawList.Select(x => x.IdxMacchina).Distinct().ToList();
rawData = JsonConvert.SerializeObject(dbResult);
- redisDb.StringSet(currKey, rawData, TimeSpan.FromSeconds(3));
+ await redisDb.StringSetAsync(currKey, rawData, TimeSpan.FromSeconds(3));
}
if (dbResult == null)
{
@@ -2544,7 +2547,7 @@ namespace MP.IOC.Data
}
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
- Log.Debug($"OdlGetCurrent | Read from {readType}: {ts.TotalMilliseconds}ms");
+ Log.Debug($"OdlGetCurrentAsync | Read from {readType}: {ts.TotalMilliseconds}ms");
return dbResult;
}
diff --git a/MP.IOC/MP.IOC.csproj b/MP.IOC/MP.IOC.csproj
index 0fcaf0ac..62cbd0db 100644
--- a/MP.IOC/MP.IOC.csproj
+++ b/MP.IOC/MP.IOC.csproj
@@ -4,7 +4,7 @@
net8.0
enable
enable
- 8.16.2605.2519
+ 8.16.2605.2716
diff --git a/MP.IOC/Resources/ChangeLog.html b/MP.IOC/Resources/ChangeLog.html
index 55973e10..0f957edb 100644
--- a/MP.IOC/Resources/ChangeLog.html
+++ b/MP.IOC/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MP-IOC
- Versione: 8.16.2605.2519
+ Versione: 8.16.2605.2716
Note di rilascio:
-
diff --git a/MP.IOC/Resources/VersNum.txt b/MP.IOC/Resources/VersNum.txt
index a68d1899..9a3dbb19 100644
--- a/MP.IOC/Resources/VersNum.txt
+++ b/MP.IOC/Resources/VersNum.txt
@@ -1 +1 @@
-8.16.2605.2519
+8.16.2605.2716
diff --git a/MP.IOC/Resources/manifest.xml b/MP.IOC/Resources/manifest.xml
index 324cc6c2..13b44d66 100644
--- a/MP.IOC/Resources/manifest.xml
+++ b/MP.IOC/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 8.16.2605.2519
+ 8.16.2605.2716
https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/MP.IOC.zip
https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/ChangeLog.html
false
diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj
index 5cae1802..d1b23d66 100644
--- a/MP.SPEC/MP.SPEC.csproj
+++ b/MP.SPEC/MP.SPEC.csproj
@@ -5,7 +5,7 @@
enable
enable
MP.SPEC
- 8.16.2605.2714
+ 8.16.2605.2716
1800a78a-6ff1-40f9-b490-87fb8bfc1394
en
diff --git a/MP.SPEC/Pages/Articoli.razor.cs b/MP.SPEC/Pages/Articoli.razor.cs
index 7e531d58..771bff51 100644
--- a/MP.SPEC/Pages/Articoli.razor.cs
+++ b/MP.SPEC/Pages/Articoli.razor.cs
@@ -269,7 +269,7 @@ namespace MP.SPEC.Pages
#region Private Methods
///
- /// Seleziona record x editing
+ /// Verifica cancellabilità record
///
///
///
diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html
index f9337c57..6f105936 100644
--- a/MP.SPEC/Resources/ChangeLog.html
+++ b/MP.SPEC/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MAPOSPEC
-
Versione: 8.16.2605.2714
+ Versione: 8.16.2605.2716
Note di rilascio:
-
diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt
index 55b93cf6..9a3dbb19 100644
--- a/MP.SPEC/Resources/VersNum.txt
+++ b/MP.SPEC/Resources/VersNum.txt
@@ -1 +1 @@
-8.16.2605.2714
+8.16.2605.2716
diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml
index a591e4cf..003046c0 100644
--- a/MP.SPEC/Resources/manifest.xml
+++ b/MP.SPEC/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 8.16.2605.2714
+ 8.16.2605.2716
https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip
https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html
false