Merge branch 'develop'
This commit is contained in:
Vendored
+1
-1
@@ -12,7 +12,7 @@ pipeline {
|
||||
steps {
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=1289']) {
|
||||
withEnv(['NEXT_BUILD_NUMBER=1290']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '6.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '6.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
env.APP_NAME = 'MAPO'
|
||||
|
||||
@@ -705,7 +705,7 @@ namespace MP_IO.Controllers
|
||||
/// <returns></returns>
|
||||
public string getCurrODL(string id)
|
||||
{
|
||||
// attenzione! poiché nell'URL il carattere "#" fiene filtrato ci aspettiamo il carattere "|" che poi trasformiamo ora in "#"
|
||||
// attenzione! poiché nell'URL il carattere "#" viene filtrato ci aspettiamo il carattere "|" che poi trasformiamo ora in "#"
|
||||
id = id.Replace("|", "#");
|
||||
string answ = "";
|
||||
try
|
||||
|
||||
+36
-20
@@ -1038,10 +1038,6 @@ namespace MapoDb
|
||||
{
|
||||
// default: 0, non registrato come cautela...
|
||||
string answ = "0";
|
||||
if (qty == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(qty));
|
||||
}
|
||||
// controllo per proseguire
|
||||
if (!string.IsNullOrEmpty(idxMacchina) && !string.IsNullOrEmpty(qty))
|
||||
{
|
||||
@@ -1054,14 +1050,16 @@ namespace MapoDb
|
||||
var currData = currODLRowTab(idxMacchina);
|
||||
// registro evento 120 --> contapezzi in blocco !!!HARD CODED!!! !!!FIXME!!!
|
||||
int idxEvento = 120;
|
||||
MapoDb.obj.scriviRigaEventoBarcode(idxMacchina, idxEvento, currData[0].CodArticolo, qty);
|
||||
// istanziato un NUOVO oggetto x scrivere...
|
||||
MapoDb connDb = new MapoDb();
|
||||
connDb.scriviRigaEventoBarcode(idxMacchina, idxEvento, currData[0].CodArticolo, qty);
|
||||
}
|
||||
// registro in risposta che è andato tutto bene... ovvero la qty richiesta...
|
||||
answ = qty;
|
||||
}
|
||||
else
|
||||
{
|
||||
string errore = "Errore: mancano parametri macchina/incremento";
|
||||
string errore = $"Errore: mancano parametri macchina/incremento: idxMacchina {idxMacchina} | qty {qty}";
|
||||
logger.lg.scriviLog(errore, tipoLog.ERROR);
|
||||
answ = errore;
|
||||
}
|
||||
@@ -1229,7 +1227,13 @@ namespace MapoDb
|
||||
{
|
||||
if (idxMacchina != "" && currODL != "")
|
||||
{
|
||||
memLayer.ML.setRSV(currODLHash(idxMacchina), currODL, memLayer.ML.CRI("currOdlCacheDur"));
|
||||
int currOdlCacheDur = memLayer.ML.CRI("currOdlCacheDur");
|
||||
// se ODL fosse 0 USO DURATA CACHE 1/4...
|
||||
if (currODL == "0")
|
||||
{
|
||||
currOdlCacheDur = currOdlCacheDur / 4;
|
||||
}
|
||||
memLayer.ML.setRSV(currODLHash(idxMacchina), currODL, currOdlCacheDur);
|
||||
// registro in risposta che è andato tutto bene...
|
||||
answ = "OK";
|
||||
}
|
||||
@@ -1926,7 +1930,9 @@ namespace MapoDb
|
||||
}
|
||||
else
|
||||
{
|
||||
answTab = MapoDb.obj.currODLTab(idxMacchina);
|
||||
// istanzio un NUOVO oggetto lettura
|
||||
MapoDb connDb = new MapoDb();
|
||||
answTab = connDb.currODLTab(idxMacchina);
|
||||
// salvo in redis...
|
||||
rCall = JsonConvert.SerializeObject(answTab);
|
||||
int currOdlRowCacheDur = memLayer.ML.CRI("currOdlRowCacheDur");
|
||||
@@ -1940,7 +1946,9 @@ namespace MapoDb
|
||||
}
|
||||
else
|
||||
{
|
||||
answTab = MapoDb.obj.currODLTab(idxMacchina);
|
||||
// istanzio un NUOVO oggetto lettura
|
||||
MapoDb connDb = new MapoDb();
|
||||
answTab = connDb.currODLTab(idxMacchina);
|
||||
}
|
||||
return answTab;
|
||||
}
|
||||
@@ -2058,7 +2066,7 @@ namespace MapoDb
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("[pzCounterTC] Impossibile recuperare dati ODL x idxMacchina {0}", idxMacchina), tipoLog.WARNING);
|
||||
// sleep...
|
||||
System.Threading.Thread.Sleep(taSP_ms_ant * 2);
|
||||
Thread.Sleep(taSP_ms_ant * 2);
|
||||
// riprovo lettura...
|
||||
okDatiProd = getStatoProd(idxMacchina, ref datiProdAct, dataRif);
|
||||
maxTry--;
|
||||
@@ -2067,15 +2075,24 @@ namespace MapoDb
|
||||
// ora proseguo SE ho trovato i dati...
|
||||
if (okDatiProd)
|
||||
{
|
||||
// ...a questo punto recupero DAVVERO i dati (o almeno ci provo...)
|
||||
try
|
||||
if (datiProdAct != null)
|
||||
{
|
||||
// controllo
|
||||
answ = datiProdAct[0].PzTotODL;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("[pzCounterTC] Eccezione in recupero PzTotODL x idxMacchina {0}{1}{2}", idxMacchina, Environment.NewLine, exc), tipoLog.EXCEPTION);
|
||||
if (datiProdAct.Count > 0)
|
||||
{
|
||||
if (!datiProdAct[0].IsPzTotODLNull())
|
||||
{
|
||||
// ...a questo punto recupero DAVVERO i dati (o almeno ci provo...)
|
||||
try
|
||||
{
|
||||
// controllo
|
||||
answ = datiProdAct[0].PzTotODL;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("[pzCounterTC] Eccezione in recupero PzTotODL x idxMacchina {0}{1}{2}", idxMacchina, Environment.NewLine, exc), tipoLog.EXCEPTION);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -2097,10 +2114,9 @@ namespace MapoDb
|
||||
try
|
||||
{
|
||||
// recupero con stored NUOVA...
|
||||
//2020.01.31 NUOVO oggetto singleton
|
||||
//2020.01.31 NUOVO oggetto (NON singleton)
|
||||
DataLayer man = new DataLayer();
|
||||
datiProdAct = man.taStatoProd.GetData(idxMacchina, dataRif);
|
||||
//datiProdAct = DataLayer.obj.taStatoProd.GetData(idxMacchina, dataRif);
|
||||
if (datiProdAct.Rows.Count > 0)
|
||||
{
|
||||
// solo SE ho idxODL (altrimenti loggo errore)
|
||||
|
||||
+29
-23
@@ -190,22 +190,25 @@ namespace MapoDb
|
||||
try
|
||||
{
|
||||
tabTransStati = taTranSt.GetUserForcedTransitions(IdxMacchina, IdxTipo);
|
||||
if (tabTransStati.Count > 0)
|
||||
if (tabTransStati != null)
|
||||
{
|
||||
rigaTransStati = tabTransStati[0];
|
||||
// solo se cambia stato...
|
||||
if (rigaTransStati.IdxStato != rigaTransStati.next_IdxStato)
|
||||
if (tabTransStati.Count > 0)
|
||||
{
|
||||
taDiario.InsStatoBatch(IdxMacchina, InizioStato, rigaTransStati.next_IdxStato, CodArt, Value, MatrOpr, pallet);
|
||||
// aggiorno MSE
|
||||
DataLayer.obj.taMSE.forceRecalc(0, IdxMacchina);
|
||||
rigaTransStati = tabTransStati[0];
|
||||
// solo se cambia stato...
|
||||
if (rigaTransStati.IdxStato != rigaTransStati.next_IdxStato)
|
||||
{
|
||||
taDiario.InsStatoBatch(IdxMacchina, InizioStato, rigaTransStati.next_IdxStato, CodArt, Value, MatrOpr, pallet);
|
||||
// aggiorno MSE
|
||||
DataLayer.obj.taMSE.forceRecalc(0, IdxMacchina);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_logLevel > 6)
|
||||
else
|
||||
{
|
||||
logger.lg.scriviLog($"Non trovata riga per: BARCODE | IdxMacchina: {IdxMacchina} | IdxTipo: {IdxTipo} | CodArt: {CodArt} | Value: {Value} | MatrOpr: {MatrOpr} | pallet: {pallet}", tipoLog.INFO);
|
||||
if (_logLevel > 6)
|
||||
{
|
||||
logger.lg.scriviLog($"Non trovata riga per: BARCODE | IdxMacchina: {IdxMacchina} | IdxTipo: {IdxTipo} | CodArt: {CodArt} | Value: {Value} | MatrOpr: {MatrOpr} | pallet: {pallet}", tipoLog.INFO);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -220,23 +223,26 @@ namespace MapoDb
|
||||
try
|
||||
{
|
||||
tabTransStati = taTranSt.GetHwTransitions(IdxMacchina, IdxTipo);
|
||||
if (tabTransStati.Count > 0)
|
||||
if (tabTransStati != null)
|
||||
{
|
||||
rigaTransStati = tabTransStati[0];
|
||||
if (rigaTransStati != null)
|
||||
if (tabTransStati.Count > 0)
|
||||
{
|
||||
// solo se cambia stato...
|
||||
if (rigaTransStati.IdxStato != rigaTransStati.next_IdxStato)
|
||||
rigaTransStati = tabTransStati[0];
|
||||
if (rigaTransStati != null)
|
||||
{
|
||||
taDiario.InsStatoBatch(IdxMacchina, InizioStato, rigaTransStati.next_IdxStato, CodArt, Value, MatrOpr, pallet);
|
||||
// solo se cambia stato...
|
||||
if (rigaTransStati.IdxStato != rigaTransStati.next_IdxStato)
|
||||
{
|
||||
taDiario.InsStatoBatch(IdxMacchina, InizioStato, rigaTransStati.next_IdxStato, CodArt, Value, MatrOpr, pallet);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_logLevel > 6)
|
||||
else
|
||||
{
|
||||
logger.lg.scriviLog($"Non trovata riga per: HW | IdxMacchina: {IdxMacchina} | IdxTipo: {IdxTipo} | CodArt: {CodArt} | Value: {Value} | MatrOpr: {MatrOpr} | pallet: {pallet}", tipoLog.INFO);
|
||||
if (_logLevel > 6)
|
||||
{
|
||||
logger.lg.scriviLog($"Non trovata riga per: HW | IdxMacchina: {IdxMacchina} | IdxTipo: {IdxTipo} | CodArt: {CodArt} | Value: {Value} | MatrOpr: {MatrOpr} | pallet: {pallet}", tipoLog.INFO);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user