Continuo migrazione repository
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>8.16.2606.113</Version>
|
||||
<Version>8.16.2606.118</Version>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP_TAB3</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 8.16.2606.113</h4>
|
||||
<h4>Versione: 8.16.2606.118</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2606.113
|
||||
8.16.2606.118
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2606.113</version>
|
||||
<version>8.16.2606.118</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>
|
||||
|
||||
@@ -33,6 +33,7 @@ namespace MP.Data.Controllers
|
||||
|
||||
#region Public Methods
|
||||
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Stacca un nuovo counter x il tipo richiesto
|
||||
/// </summary>
|
||||
@@ -91,7 +92,7 @@ namespace MP.Data.Controllers
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce l'anagrafica EVENTI generalmente disponibile per OGNI macchina
|
||||
@@ -231,6 +232,8 @@ namespace MP.Data.Controllers
|
||||
|
||||
return numRes != 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Elenco valori ammessi x Stati commessa (es Yacht Baglietto)
|
||||
@@ -369,6 +372,7 @@ namespace MP.Data.Controllers
|
||||
.ToListAsync();
|
||||
}
|
||||
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Elenco tabella Articoli da filtro
|
||||
/// </summary>
|
||||
@@ -409,7 +413,8 @@ namespace MP.Data.Controllers
|
||||
.OrderBy(x => x.CodArticolo)
|
||||
.Take(numRecord)
|
||||
.ToListAsync();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Elenco tabella Articoli NON IMPIEGATI (da stored stp_ART_getUsed) Async
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using MP.Data.DbModels;
|
||||
using MP.Data.Repository.Anag;
|
||||
using Newtonsoft.Json;
|
||||
using NLog;
|
||||
using StackExchange.Redis;
|
||||
@@ -20,8 +21,9 @@ namespace MP.Data.Services
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public ListSelectDataSrv(IConfiguration configuration, IConnectionMultiplexer redConn) : base(configuration, redConn)
|
||||
public ListSelectDataSrv(IConfiguration configuration, IConnectionMultiplexer redConn, IAnagRepository anagRepository) : base(configuration, redConn)
|
||||
{
|
||||
_anagRepository = anagRepository;
|
||||
// conf DB
|
||||
string connStr = _configuration.GetConnectionString("MP.All");
|
||||
if (string.IsNullOrEmpty(connStr))
|
||||
@@ -70,7 +72,7 @@ namespace MP.Data.Services
|
||||
}
|
||||
else
|
||||
{
|
||||
result = await dbController.ArticoliGetSearchAsync(numRecord, tipoArt, azienda, searchVal);
|
||||
result = await _anagRepository.ArticoliGetSearchAsync(numRecord, tipoArt, azienda, searchVal);
|
||||
// serializzp e salvo...
|
||||
rawData = JsonConvert.SerializeObject(result);
|
||||
await _redisDb.StringSetAsync(currKey, rawData, LongCache);
|
||||
@@ -267,6 +269,7 @@ namespace MP.Data.Services
|
||||
#region Private Fields
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
private readonly IAnagRepository _anagRepository;
|
||||
private bool _disposed = false;
|
||||
private string redisBaseKey = "MP:ALL:Cache";
|
||||
|
||||
@@ -382,7 +385,7 @@ namespace MP.Data.Services
|
||||
}
|
||||
answ = true;
|
||||
}
|
||||
return answ;
|
||||
return answ;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ namespace MP.SPEC.Data
|
||||
using var activity = ActivitySource.StartActivity("AnagCountersGetNextAsync");
|
||||
AnagCountersModel result = new AnagCountersModel();
|
||||
string source = "DB";
|
||||
result = await dbController.AnagCountersGetNextAsync(cntType);
|
||||
result = await _anagRepository.AnagCountersGetNextAsync(cntType);
|
||||
activity?.SetTag("data.source", source);
|
||||
activity?.Stop();
|
||||
LogTrace($"AnagCountersGetNextAsync | {source} | {activity?.Duration.TotalMilliseconds}ms");
|
||||
@@ -176,7 +176,7 @@ namespace MP.SPEC.Data
|
||||
expiration: GetRandTOut(redisLongTimeCache),
|
||||
fetchFunc: async () =>
|
||||
{
|
||||
return await dbController.AnagEventiGeneralAsync() ?? new List<vSelEventiBCodeModel>();
|
||||
return await _anagRepository.AnagEventiGeneralAsync() ?? new List<vSelEventiBCodeModel>();
|
||||
},
|
||||
tagList: [Utils.redisEventList]
|
||||
);
|
||||
@@ -191,7 +191,7 @@ namespace MP.SPEC.Data
|
||||
using var activity = ActivitySource.StartActivity("AnagGruppiDeleteAsync");
|
||||
bool result = false;
|
||||
string source = "DB";
|
||||
result = await dbController.AnagGruppiDeleteAsync(updRec);
|
||||
result = await _anagRepository.AnagGruppiDeleteAsync(updRec);
|
||||
// elimino cache redis...
|
||||
await FlushFusionCacheAsync(Utils.redisAnagGruppi);
|
||||
activity?.SetTag("data.source", source);
|
||||
@@ -210,7 +210,7 @@ namespace MP.SPEC.Data
|
||||
using var activity = ActivitySource.StartActivity("AnagGruppiUpsertAsync");
|
||||
bool result = false;
|
||||
string source = "DB";
|
||||
result = await dbController.AnagGruppiUpsertAsync(UpdRec);
|
||||
result = await _anagRepository.AnagGruppiUpsertAsync(UpdRec);
|
||||
// elimino cache redis...
|
||||
await FlushFusionCacheAsync(Utils.redisAnagGruppi);
|
||||
activity?.SetTag("data.source", source);
|
||||
@@ -328,7 +328,6 @@ namespace MP.SPEC.Data
|
||||
public async Task<List<AnagArticoliModel>> ArticoliGetSearchAsync(int numRecord, string tipoArt, string azienda, string searchVal)
|
||||
{
|
||||
string sKey = string.IsNullOrWhiteSpace(searchVal) ? "***" : searchVal.Trim();
|
||||
|
||||
string redisKey = $"{Utils.redisArtList}:{tipoArt}:{azienda}:{sKey}:{numRecord}";
|
||||
|
||||
return await GetOrFetchAsync(
|
||||
@@ -336,7 +335,8 @@ namespace MP.SPEC.Data
|
||||
cacheKey: redisKey,
|
||||
expiration: GetRandTOut(redisLongTimeCache),
|
||||
fetchFunc: async () =>
|
||||
await dbController.ArticoliGetSearchAsync(numRecord, tipoArt, azienda, searchVal) ?? new List<AnagArticoliModel>(),
|
||||
await _anagRepository.ArticoliGetSearchAsync(numRecord, tipoArt, azienda, searchVal) ?? new List<AnagArticoliModel>(),
|
||||
//await dbController.ArticoliGetSearchAsync(numRecord, tipoArt, azienda, searchVal) ?? new List<AnagArticoliModel>(),
|
||||
tagList: [Utils.redisArtList, $"{Utils.redisArtList}:Search"]
|
||||
);
|
||||
}
|
||||
@@ -648,7 +648,7 @@ namespace MP.SPEC.Data
|
||||
cacheKey: $"{Utils.redisAnagGruppi}:Aziende",
|
||||
expiration: GetRandTOut(redisLongTimeCache * 2),
|
||||
fetchFunc: async () =>
|
||||
await dbController.AnagGruppiAziendeAsync() ?? new List<AnagGruppiModel>(),
|
||||
await _anagRepository.AnagGruppiAziendeAsync() ?? new List<AnagGruppiModel>(),
|
||||
tagList: [Utils.redisAnagGruppi, $"{Utils.redisAnagGruppi}:Aziende"]
|
||||
);
|
||||
}
|
||||
@@ -663,7 +663,7 @@ namespace MP.SPEC.Data
|
||||
operationName: "ElencoGruppiFaseAsync",
|
||||
cacheKey: $"{Utils.redisAnagGruppi}:FASE",
|
||||
expiration: GetRandTOut(redisLongTimeCache),
|
||||
fetchFunc: async () => await dbController.AnagGruppiFaseAsync() ?? new List<AnagGruppiModel>(),
|
||||
fetchFunc: async () => await _anagRepository.AnagGruppiFaseAsync() ?? new List<AnagGruppiModel>(),
|
||||
tagList: [Utils.redisAnagGruppi]
|
||||
);
|
||||
}
|
||||
@@ -693,7 +693,7 @@ namespace MP.SPEC.Data
|
||||
operationName: "ElencoRepartiDtoAsync",
|
||||
cacheKey: $"{Utils.redisAnagGruppi}:REPARTO",
|
||||
expiration: GetRandTOut(redisLongTimeCache),
|
||||
fetchFunc: async () => await dbController.AnagGruppiRepartoDtoAsync() ?? new(),
|
||||
fetchFunc: async () => await _anagRepository.AnagGruppiRepartoDtoAsync() ?? new(),
|
||||
tagList: [Utils.redisAnagGruppi]
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.SPEC</RootNamespace>
|
||||
<Version>8.16.2606.118</Version>
|
||||
<Version>8.16.2606.119</Version>
|
||||
<UserSecretsId>1800a78a-6ff1-40f9-b490-87fb8bfc1394</UserSecretsId>
|
||||
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 8.16.2606.118</h4>
|
||||
<h4>Versione: 8.16.2606.119</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2606.118
|
||||
8.16.2606.119
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2606.118</version>
|
||||
<version>8.16.2606.119</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.2606.0113</Version>
|
||||
<Version>8.16.2606.0118</Version>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo statistiche MAPO</i>
|
||||
<h4>Versione: 8.16.2606.0113</h4>
|
||||
<h4>Versione: 8.16.2606.0118</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2606.0113
|
||||
8.16.2606.0118
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2606.0113</version>
|
||||
<version>8.16.2606.0118</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>
|
||||
|
||||
Reference in New Issue
Block a user