PROG
- fix missing file x IOB (errore in assegnazione modifica pre salvataggio in EFCore)
This commit is contained in:
@@ -869,21 +869,21 @@ namespace MP.FileData.Controllers
|
||||
DateTime adesso = DateTime.Now;
|
||||
using (MoonPro_ProgContext localDbCtx = new MoonPro_ProgContext(_configuration))
|
||||
{
|
||||
// SOLO SE richiesto forzatura tags
|
||||
if (forceTag)
|
||||
// elenco Tags
|
||||
List<TagModel> currTags = localDbCtx.DbSetTags.ToList();
|
||||
FileModel currItem = null;
|
||||
foreach (var item in updFiles)
|
||||
{
|
||||
// elenco Tags
|
||||
List<TagModel> currTags = localDbCtx.DbSetTags.ToList();
|
||||
FileModel currItem = null;
|
||||
foreach (var item in updFiles)
|
||||
{
|
||||
// recupero record da DB...
|
||||
currItem = localDbCtx
|
||||
.DbSetProgFile
|
||||
.Where(x => x.FileId == item.FileId)
|
||||
.Include(x => x.Tags)
|
||||
.FirstOrDefault();
|
||||
// recupero record da DB...
|
||||
currItem = localDbCtx
|
||||
.DbSetProgFile
|
||||
.Where(x => x.FileId == item.FileId)
|
||||
.Include(x => x.Tags)
|
||||
.FirstOrDefault();
|
||||
|
||||
// SOLO SE richiesto forzatura tags
|
||||
if (forceTag)
|
||||
{
|
||||
List<string> Tags = new List<string>();
|
||||
List<TagModel> Tag4File = new List<TagModel>();
|
||||
// se necessario bonifico filename...
|
||||
@@ -933,30 +933,24 @@ namespace MP.FileData.Controllers
|
||||
// salvo i tags relativi ai files
|
||||
currItem.Tags.Clear();
|
||||
currItem.Tags = Tag4File;
|
||||
//localDbCtx.Entry(currItem).State = EntityState.Modified;
|
||||
}
|
||||
//localDbCtx.SaveChanges();
|
||||
}
|
||||
try
|
||||
{
|
||||
// salvo
|
||||
localDbCtx.SaveChanges();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Errore in salvataggio FileSetChecked{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
#if false
|
||||
// update comunque data-ora
|
||||
foreach (var item in updFiles)
|
||||
{
|
||||
// salvo update file
|
||||
item.LastCheck = adesso;
|
||||
localDbCtx.Entry(item).State = EntityState.Modified;
|
||||
}
|
||||
#endif
|
||||
// update comunque data-ora e stato missing
|
||||
currItem.DiskStatus = FileState.Ok;
|
||||
currItem.LastCheck = adesso;
|
||||
localDbCtx.Entry(currItem).State = EntityState.Modified;
|
||||
|
||||
}
|
||||
|
||||
// salvo
|
||||
try
|
||||
{
|
||||
localDbCtx.SaveChanges();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Errore in salvataggio FileSetChecked{Environment.NewLine}{exc}");
|
||||
}
|
||||
answ = true;
|
||||
}
|
||||
GC.Collect();
|
||||
@@ -977,21 +971,21 @@ namespace MP.FileData.Controllers
|
||||
DateTime adesso = DateTime.Now;
|
||||
using (MoonPro_ProgContext localDbCtx = new MoonPro_ProgContext(_configuration))
|
||||
{
|
||||
// SOLO SE richiesto forzatura tags
|
||||
if (forceTag)
|
||||
// elenco Tags
|
||||
List<TagModel> currTags = localDbCtx.DbSetTags.ToList();
|
||||
FileModel currItem = null;
|
||||
foreach (var item in missFiles)
|
||||
{
|
||||
// elenco Tags
|
||||
List<TagModel> currTags = localDbCtx.DbSetTags.ToList();
|
||||
FileModel currItem = null;
|
||||
foreach (var item in missFiles)
|
||||
{
|
||||
// recupero record da DB...
|
||||
currItem = localDbCtx
|
||||
.DbSetProgFile
|
||||
.Where(x => x.FileId == item.FileId)
|
||||
.Include(x => x.Tags)
|
||||
.FirstOrDefault();
|
||||
// recupero record da DB...
|
||||
currItem = localDbCtx
|
||||
.DbSetProgFile
|
||||
.Where(x => x.FileId == item.FileId)
|
||||
.Include(x => x.Tags)
|
||||
.FirstOrDefault();
|
||||
|
||||
// SOLO SE richiesto forzatura tags
|
||||
if (forceTag)
|
||||
{
|
||||
List<string> Tags = new List<string>();
|
||||
List<TagModel> Tag4File = new List<TagModel>();
|
||||
// se necessario bonifico filename...
|
||||
@@ -1043,18 +1037,13 @@ namespace MP.FileData.Controllers
|
||||
currItem.Tags = Tag4File;
|
||||
//localDbCtx.Entry(currItem).State = EntityState.Modified;
|
||||
}
|
||||
//localDbCtx.SaveChanges();
|
||||
}
|
||||
// update comunque data-ora e stato missing
|
||||
currItem.DiskStatus = FileState.Missing;
|
||||
currItem.LastCheck = adesso;
|
||||
localDbCtx.Entry(currItem).State = EntityState.Modified;
|
||||
}
|
||||
|
||||
// update comunque data-ora e stato missing
|
||||
foreach (var item in missFiles)
|
||||
{
|
||||
// salvo update file
|
||||
item.DiskStatus = FileState.Missing;
|
||||
item.LastCheck = adesso;
|
||||
localDbCtx.Entry(item).State = EntityState.Modified;
|
||||
}
|
||||
try
|
||||
{
|
||||
// salvo
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace MP.Prog.Components
|
||||
setupMessages.Add("Inizio Analisi Archivio...");
|
||||
await InvokeAsync(StateHasChanged);
|
||||
await ArchiveCheck(maxHour);
|
||||
await Task.Delay(400);
|
||||
await Task.Delay(200);
|
||||
ClearMessage();
|
||||
await ReloadData();
|
||||
}
|
||||
@@ -99,7 +99,7 @@ namespace MP.Prog.Components
|
||||
setupMessages.Add($"Inizio Analisi Archivio | Archivio {idxMacchina}");
|
||||
await InvokeAsync(StateHasChanged);
|
||||
await ArchiveSingleCheck(idxMacchina, 0);
|
||||
await Task.Delay(400);
|
||||
await Task.Delay(200);
|
||||
ClearMessage();
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RootNamespace>MP.Prog</RootNamespace>
|
||||
<Version>6.16.2410.2910</Version>
|
||||
<Version>6.16.2410.2917</Version>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo gestione Programmi MAPO</i>
|
||||
<h4>Versione: 6.16.2410.2910</h4>
|
||||
<h4>Versione: 6.16.2410.2917</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2410.2910
|
||||
6.16.2410.2917
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2410.2910</version>
|
||||
<version>6.16.2410.2917</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>
|
||||
|
||||
@@ -54,13 +54,17 @@
|
||||
"DefaultSearch": "##"
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"DefaultConnection": "Server=SQL2016DEV;Database=MoonPro_PROG;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.Prog;",
|
||||
"MP.Prog": "Server=SQL2016DEV;Database=MoonPro_PROG;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.Prog;",
|
||||
|
||||
"DefaultConnection": "Server=W2019-SQL-STEAM;Database=MoonPro_PROG;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.Prog;",
|
||||
"MP.Prog": "Server=W2019-SQL-STEAM;Database=MoonPro_PROG;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.Prog;",
|
||||
//"DefaultConnection": "Server=SQL2016DEV;Database=MoonPro_PROG;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.Prog;",
|
||||
//"MP.Prog": "Server=SQL2016DEV;Database=MoonPro_PROG;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.Prog;",
|
||||
"Redis": "localhost:26379,serviceName=devel,DefaultDatabase=5,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false"
|
||||
},
|
||||
"ServerConf": {
|
||||
"FolderBasePath": "\\\\stor01",
|
||||
"Prog.ApiUrl": "https://iis01.egalware.com/MP/PROG"
|
||||
"Prog.ApiUrl": "https://office.egalware.com/MP/PROG"
|
||||
//"Prog.ApiUrl": "https://iis01.egalware.com/MP/PROG"
|
||||
},
|
||||
"SpecialConf": {
|
||||
"AppUrl": "/MP/PROG",
|
||||
|
||||
Reference in New Issue
Block a user