Aggiunto note x test soitaab

This commit is contained in:
Samuele Locatelli
2023-11-17 19:32:07 +01:00
parent 6699d4b467
commit a4d74ffa4a
4 changed files with 9 additions and 73 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ MAX_PZ_INCR_PERC=1000
; conf parametri memoria READ/WRITE
PARAM_CONF=SIMUL_01.json
;test gestione logfile (eg: soitaab)
EnabelPodlManFull=false
EnabelPodlManFull=true
CodGruppoIob=STEAMWARE-SIM-FASE-01
;conf test FTP
+2 -9
View File
@@ -4339,15 +4339,8 @@ namespace IOB_WIN_NEXT.Iob
protected string lastArtDescr
{
get
{
string answ = redisMan.getRSV(redKeyProdLastArt);
return answ;
}
set
{
redisMan.setRSV(redKeyProdLastArt, value);
}
get => redisMan.getRSV(redKeyProdLastArt);
set => redisMan.setRSV(redKeyProdLastArt, value);
}
protected List<ArtRow> ListaArticoli { get; set; } = new List<ArtRow>();
+3 -4
View File
@@ -654,7 +654,6 @@ namespace IOB_WIN_NEXT.Iob
bool answ = false;
// leggo direttamente il file di test in area c:\temp
if (Directory.Exists(logDirPath))
{
string filePath = Path.Combine(logDirPath, $"Report-{DateTime.Today.Day}.txt");
@@ -1426,13 +1425,13 @@ namespace IOB_WIN_NEXT.Iob
{
// per prima cosa fluxLog a prescindere...
sVal = $"[LOGFILE]{currData[0]}|{currData[1]}";
// ...e chiamo accodamento
// ...e chiamo accodamento, ridonante?!?
accodaFLog(sVal, qEncodeFLog(fLog2send.dtRif, currData[0], currData[1]));
switch (currData[0])
{
case "END":
// se è un end --> è comunque NON + runnning
// se è un end --> è comunque NON + running
isRunningState = false; // chiudo batch precedente + in elenco (SE era valido...)
if (!string.IsNullOrEmpty(lastProdBatch.codArt))
{
@@ -1510,7 +1509,7 @@ namespace IOB_WIN_NEXT.Iob
// se trovato --> invio start/stop PODL
if (listPOdl != null && listPOdl.Count > 0)
{
var currPodl = listPOdl.FirstOrDefault();
var currPodl = listPOdl.OrderBy(x => x.IdxPromessa).FirstOrDefault();
if (currPodl != null)
{
currIdxPOdl = currPodl.IdxPromessa;
+3 -59
View File
@@ -358,65 +358,6 @@ namespace IOB_WIN_NEXT.IobFile
private bool processProdDataTable(DateTime adesso)
{
bool fatto = false;
#if false
string tabNameIn = "ProdData";
string tabNameOut = "ProdDataToMes";
// cerco info sui SignLog (ToMes e letti)
var currSignLogRead = elencoSyncState.FirstOrDefault(x => x.TableName == tabNameIn);
// se nullo inizializzo
if (currSignLogRead == null)
{
currSignLogRead = new SyncStateModel()
{
LastIdx = 0,
LastUpdate = adesso,
TableName = tabNameIn,
Note = "Init"
};
}
var currSignLogSent = elencoSyncState.FirstOrDefault(x => x.TableName == tabNameOut);
// se nullo inizializzo
if (currSignLogSent == null)
{
currSignLogSent = new SyncStateModel()
{
LastIdx = 0,
LastUpdate = adesso,
TableName = tabNameOut,
Note = "Init"
};
}
// verifica se ci siano dati da trasmettere (sui valori LastIdx)
if (currSignLogRead.LastIdx > currSignLogSent.LastIdx)
{
// recupero i dati dal DB...
var data2send = dbProxy.MachProdDataGetNew(currSignLogSent.LastIdx);
// se ho dati preparo invio
if (data2send != null && data2send.Count > 0)
{
foreach (var sLog2send in data2send)
{
// se il record è apertura PODL chiamo apertura
trySetupPODL(0);
// se il record è chiusura PODL chiamo chiusura... DOPO aver cercato PODL
// --> ODL
tryClosePODL(0);
}
}
// aggiorno idx inviato...
currSignLogSent.Note = $"Updated from {currSignLogRead.LastIdx}";
currSignLogSent.LastUpdate = adesso;
currSignLogSent.LastIdx = currSignLogRead.LastIdx;
fatto = true;
}
// alla fine aggiorno i dati inviati!
dbProxy.SyncStateUpsert(currSignLogSent);
#endif
return fatto;
}
@@ -450,6 +391,7 @@ namespace IOB_WIN_NEXT.IobFile
// ora prendo SOLAMENTE le righe nuove
logNew = logAct
.Where(x => x.dtRif > fileLastEnd.dtRif)
.OrderBy(x => x.dtRif)
.ToList();
}
else
@@ -468,6 +410,7 @@ namespace IOB_WIN_NEXT.IobFile
// estraggo solo info x sig log
sigLogData = logNew
.Where(x => x.valString.StartsWith("START") || x.valString.StartsWith("HOLD") || x.valString.StartsWith("END"))
.OrderBy(x => x.dtRif)
.ToList();
// processo le righe nuove trasformando al volo SOLO eventi...
@@ -652,6 +595,7 @@ namespace IOB_WIN_NEXT.IobFile
// salvo in last il valore di act...
redisMan.setRSV(redKeyLogfileLast, fileAct);
// calcolo B_input valido
var lastRec = sigLogData.LastOrDefault();
if (lastRec != null)