modifiche x evitare se possibile sovrapposizioni in fase lettura/scrittura DB x MP/IO + altro update test BENCH x IO
This commit is contained in:
@@ -162,7 +162,7 @@
|
||||
</site>
|
||||
<site name="MP-IO" id="2">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\samuele\Documents\VisualStudioProjects\MoonPro_dotnet\MP-IO" />
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\samuele.steamw\Documents\VisualStudioProject\MoonPro_dotnet\MP-IO" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:64103:localhost" />
|
||||
@@ -170,7 +170,7 @@
|
||||
</site>
|
||||
<site name="MP-Admin" id="3">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\samuele\Documents\VisualStudioProjects\MoonPro_dotnet\MP-Admin" />
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\samuele.steamw\Documents\VisualStudioProject\MoonPro_dotnet\MP-Admin" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:56734:localhost" />
|
||||
@@ -178,7 +178,7 @@
|
||||
</site>
|
||||
<site name="MoonProTablet" id="4">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\samuele\Documents\VisualStudioProjects\MoonPro_dotnet\MP-Tablet" />
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\samuele.steamw\Documents\VisualStudioProject\MoonPro_dotnet\MP-Tablet" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:56739:localhost" />
|
||||
@@ -194,7 +194,7 @@
|
||||
</site>
|
||||
<site name="MP-MON" id="6">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\samuele\Documents\VisualStudioProjects\MoonPro_dotnet\MP-MON" />
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\samuele.steamw\Documents\VisualStudioProject\MoonPro_dotnet\MP-MON" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:56580:localhost" />
|
||||
@@ -202,7 +202,7 @@
|
||||
</site>
|
||||
<site name="MP" id="7">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\samuele\Documents\VisualStudioProjects\MoonPro_dotnet\MP" />
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\samuele.steamw\Documents\VisualStudioProject\MoonPro_dotnet\MP" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:2809:localhost" />
|
||||
@@ -218,7 +218,7 @@
|
||||
</site>
|
||||
<site name="MP-Site(1)" id="9">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\samuele\Documents\VisualStudioProjects\MoonPro_dotnet\MP-Site" />
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\samuele.steamw\Documents\VisualStudioProject\MoonPro_dotnet\MP-Site" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:54807:localhost" />
|
||||
|
||||
+33
-19
@@ -65,8 +65,8 @@ namespace MP_IO.Controllers
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
// GET BENCH/RSETUP/100
|
||||
public string RSETUP(int? id)
|
||||
// GET BENCH/RCLEAN/100
|
||||
public string RCLEAN(int? id)
|
||||
{
|
||||
string answ = "ND";
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
@@ -88,6 +88,36 @@ namespace MP_IO.Controllers
|
||||
chiave = string.Format("test:{0}", i);
|
||||
memLayer.ML.redDelKey(chiave);
|
||||
}
|
||||
answ = "OK";
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
stopWatch.Stop();
|
||||
// Get the elapsed time as a TimeSpan value.
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
// accodo tempo!
|
||||
answ += string.Format("<hr/>Elapsed: {0}ms", ts.TotalMilliseconds);
|
||||
// ritorno
|
||||
return answ;
|
||||
}
|
||||
// GET BENCH/RSETUP/100
|
||||
public string RSETUP(int? id)
|
||||
{
|
||||
string answ = "ND";
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
// se id nullo --> KO!
|
||||
if (id == null)
|
||||
{
|
||||
answ = "KO";
|
||||
}
|
||||
else
|
||||
{
|
||||
string chiave;
|
||||
KeyValuePair<string, string>[] valori = new KeyValuePair<string, string>[2];
|
||||
try
|
||||
{
|
||||
// recupero tutti i record della tabella
|
||||
|
||||
// salvo il datasetet come insieme di hash in redis...
|
||||
@@ -107,7 +137,7 @@ namespace MP_IO.Controllers
|
||||
// Get the elapsed time as a TimeSpan value.
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
// accodo tempo!
|
||||
answ = string.Format("Elapsed: {0}ms", ts.TotalMilliseconds);
|
||||
answ += string.Format("<hr/>Elapsed: {0}ms", ts.TotalMilliseconds);
|
||||
// ritorno
|
||||
return answ;
|
||||
}
|
||||
@@ -129,22 +159,6 @@ namespace MP_IO.Controllers
|
||||
KeyValuePair<string, string>[] valori = new KeyValuePair<string, string>[2];
|
||||
try
|
||||
{
|
||||
//// svuoto i precedenti hash... CICLO!
|
||||
//for (int i = 0; i < 1000; i++)
|
||||
//{
|
||||
// chiave = string.Format("test:{0}", i);
|
||||
// memLayer.ML.redDelKey(chiave);
|
||||
//}
|
||||
//// recupero tutti i record della tabella
|
||||
|
||||
//// salvo il datasetet come insieme di hash in redis...
|
||||
//for (int i = 0; i < 1000; i++)
|
||||
//{
|
||||
// chiave = string.Format("test:{0}", i);
|
||||
// valori[0] = new KeyValuePair<string, string>("numero", i.ToString());
|
||||
// valori[1] = new KeyValuePair<string, string>("doppio", (i * 2).ToString());
|
||||
// memLayer.ML.redSaveHash(chiave, valori);
|
||||
//}
|
||||
// ora restituisco record completo dell'hash con ID indicato
|
||||
chiave = string.Format("test:{0}", id);
|
||||
valori = memLayer.ML.redGetHash(chiave);
|
||||
|
||||
+2
-8
@@ -5,6 +5,8 @@
|
||||
-->
|
||||
<configuration>
|
||||
<appSettings>
|
||||
<!--Impostazione gestione serializzazione variabili in sessione (es per Redis)-->
|
||||
<add key="serializeSession" value="true" />
|
||||
<!--gestione timeout "esteso" x chiamate SQL critiche, in secondi -->
|
||||
<add key="sqlLongCommandTimeout" value="600"/>
|
||||
<!--keep alive!-->
|
||||
@@ -32,14 +34,6 @@
|
||||
<add name="MoonProConnectionString" connectionString="Data Source=WIN2016-SQL;Initial Catalog=Donati_MoonProLAV_prod;Persist Security Info=True;User ID=sa;Password=keyhammer16;" providerName="System.Data.SqlClient"/>
|
||||
<add name="MapoDb.Properties.Settings.MoonProConnectionString" connectionString="Data Source=WIN2016-SQL;Initial Catalog=Donati_MoonProLAV_prod;Persist Security Info=True;User ID=sa;Password=keyhammer16;" providerName="System.Data.SqlClient"/>
|
||||
</connectionStrings>
|
||||
<!--
|
||||
For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367.
|
||||
|
||||
The following attributes can be set on the <httpRuntime> tag.
|
||||
<system.Web>
|
||||
<httpRuntime targetFramework="4.5.2" />
|
||||
</system.Web>
|
||||
-->
|
||||
<system.web>
|
||||
<customErrors mode="Off"/>
|
||||
<compilation debug="true" targetFramework="4.6.2"/>
|
||||
|
||||
@@ -12,19 +12,10 @@
|
||||
<section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<!--
|
||||
For a description of web.config changes for .NET 4.5 see http://go.microsoft.com/fwlink/?LinkId=235367.
|
||||
|
||||
The following attributes can be set on the <httpRuntime> tag.
|
||||
<system.Web>
|
||||
<httpRuntime targetFramework="4.5" />
|
||||
</system.Web>
|
||||
-->
|
||||
<system.web>
|
||||
<customErrors mode="RemoteOnly" defaultRedirect="Default.aspx" />
|
||||
<compilation debug="true" targetFramework="4.6.2" />
|
||||
<globalization uiCulture="it-IT" culture="it-IT" />
|
||||
<!--<sessionState mode="SQLServer" sqlConnectionString="data source=WIN2016-SQL; user id=sa;password=keyhammer16" cookieless="true" timeout="20" />-->
|
||||
<httpModules>
|
||||
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
|
||||
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
|
||||
@@ -38,32 +29,8 @@
|
||||
<add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" />
|
||||
</controls>
|
||||
</pages>
|
||||
<!--<sessionState mode="InProc" timeout="30" />-->
|
||||
<sessionState mode="Custom" customProvider="MySessionStateStore">
|
||||
<providers>
|
||||
<!-- For more details check https://github.com/Azure/aspnet-redis-providers/wiki -->
|
||||
<!-- Either use 'connectionString' OR 'settingsClassName' and 'settingsMethodName' OR use 'host','port','accessKey','ssl','connectionTimeoutInMilliseconds' and 'operationTimeoutInMilliseconds'. -->
|
||||
<!-- 'throwOnError','retryTimeoutInMilliseconds','databaseId' and 'applicationName' can be used with both options. -->
|
||||
<!--
|
||||
<add name="MySessionStateStore"
|
||||
host = "127.0.0.1" [String]
|
||||
port = "" [number]
|
||||
accessKey = "" [String]
|
||||
ssl = "false" [true|false]
|
||||
throwOnError = "true" [true|false]
|
||||
retryTimeoutInMilliseconds = "5000" [number]
|
||||
databaseId = "0" [number]
|
||||
applicationName = "" [String]
|
||||
connectionTimeoutInMilliseconds = "5000" [number]
|
||||
operationTimeoutInMilliseconds = "1000" [number]
|
||||
connectionString = "<Valid StackExchange.Redis connection string>" [String]
|
||||
settingsClassName = "<Assembly qualified class name that contains settings method specified below. Which basically return 'connectionString' value>" [String]
|
||||
settingsMethodName = "<Settings method should be defined in settingsClass. It should be public, static, does not take any parameters and should have a return type of 'String', which is basically 'connectionString' value.>" [String]
|
||||
loggingClassName = "<Assembly qualified class name that contains logging method specified below>" [String]
|
||||
loggingMethodName = "<Logging method should be defined in loggingClass. It should be public, static, does not take any parameters and should have a return type of System.IO.TextWriter.>" [String]
|
||||
redisSerializerType = "<Assembly qualified class name that implements Microsoft.Web.Redis.ISerializer>" [String]
|
||||
/>
|
||||
-->
|
||||
<add name="MySessionStateStore" type="Microsoft.Web.Redis.RedisSessionStateProvider" host="127.0.0.1" accessKey="" ssl="false" applicationName="MP_TAB" />
|
||||
</providers>
|
||||
</sessionState>
|
||||
|
||||
@@ -456,6 +456,8 @@ namespace MapoDb
|
||||
// continuo col resto
|
||||
try
|
||||
{
|
||||
// scrivo keep alive!!! (se encessario, altrimenti è in cache...)
|
||||
MapoDb.obj.scriviKeepAlive(idxMacchina, DateTime.Now);
|
||||
// ora processo e salvo il valore del microstato...
|
||||
MapoDb.obj.checkMicroStato(idxMacchina, valore, dataOraEvento, contatore);
|
||||
answ = "OK"; // registro in risposta che è andato tutto bene...
|
||||
|
||||
+38
-34
@@ -74,22 +74,23 @@ namespace MapoDb
|
||||
/// </summary>
|
||||
private void AvviaTabAdapt()
|
||||
{
|
||||
taEvList = new global::MapoDb.DS_applicazioneTableAdapters.EventListTableAdapter();
|
||||
taDiario = new global::MapoDb.DS_applicazioneTableAdapters.DiarioDiBordoTableAdapter();
|
||||
taAnagSt = new global::MapoDb.DS_applicazioneTableAdapters.AnagraficaStatiTableAdapter();
|
||||
taAnagEv = new global::MapoDb.DS_applicazioneTableAdapters.AnagraficaEventiTableAdapter();
|
||||
taMacchine = new global::MapoDb.DS_applicazioneTableAdapters.MacchineTableAdapter();
|
||||
taTranEv = new global::MapoDb.DS_applicazioneTableAdapters.TransizioneEventiTableAdapter();
|
||||
taTranSt = new global::MapoDb.DS_applicazioneTableAdapters.TransizioneStatiTableAdapter();
|
||||
taStatoMacchine = new global::MapoDb.DS_applicazioneTableAdapters.StatoMacchineTableAdapter();
|
||||
taKeepAlive = new global::MapoDb.DS_applicazioneTableAdapters.KeepAliveTableAdapter();
|
||||
taRRL = new global::MapoDb.DS_applicazioneTableAdapters.RemoteRebootLogTableAdapter();
|
||||
taTransIngr = new global::MapoDb.DS_applicazioneTableAdapters.TransizioneIngressiTableAdapter();
|
||||
taAnOpr = new global::MapoDb.DS_applicazioneTableAdapters.AnagraficaOperatoriTableAdapter();
|
||||
taDatiMacch = new global::MapoDb.DS_applicazioneTableAdapters.DatiMacchineTableAdapter();
|
||||
taMSM = new global::MapoDb.DS_applicazioneTableAdapters.MicroStatoMacchinaTableAdapter();
|
||||
taEvList = new DS_applicazioneTableAdapters.EventListTableAdapter();
|
||||
taDiario = new DS_applicazioneTableAdapters.DiarioDiBordoTableAdapter();
|
||||
taAnagSt = new DS_applicazioneTableAdapters.AnagraficaStatiTableAdapter();
|
||||
taAnagEv = new DS_applicazioneTableAdapters.AnagraficaEventiTableAdapter();
|
||||
taMacchine = new DS_applicazioneTableAdapters.MacchineTableAdapter();
|
||||
taTranEv = new DS_applicazioneTableAdapters.TransizioneEventiTableAdapter();
|
||||
taTranSt = new DS_applicazioneTableAdapters.TransizioneStatiTableAdapter();
|
||||
taStatoMacchine = new DS_applicazioneTableAdapters.StatoMacchineTableAdapter();
|
||||
taKeepAlive = new DS_applicazioneTableAdapters.KeepAliveTableAdapter();
|
||||
taRRL = new DS_applicazioneTableAdapters.RemoteRebootLogTableAdapter();
|
||||
taTransIngr = new DS_applicazioneTableAdapters.TransizioneIngressiTableAdapter();
|
||||
taAnOpr = new DS_applicazioneTableAdapters.AnagraficaOperatoriTableAdapter();
|
||||
taDatiMacch = new DS_applicazioneTableAdapters.DatiMacchineTableAdapter();
|
||||
taMSM = new DS_applicazioneTableAdapters.MicroStatoMacchinaTableAdapter();
|
||||
|
||||
taTCRilevati = new global::MapoDb.DS_ProdTempiTableAdapters.TempiCicloRilevatiTableAdapter();
|
||||
taDatiMacchine = new DS_ProdTempiTableAdapters.DatiMacchineTableAdapter();
|
||||
taTCRilevati = new DS_ProdTempiTableAdapters.TempiCicloRilevatiTableAdapter();
|
||||
}
|
||||
/// <summary>
|
||||
/// forza la connString x i vari table adapters
|
||||
@@ -112,6 +113,7 @@ namespace MapoDb
|
||||
taDatiMacch.Connection.ConnectionString = _connectionString;
|
||||
taMSM.Connection.ConnectionString = _connectionString;
|
||||
|
||||
taDatiMacchine.Connection.ConnectionString = _connectionString;
|
||||
taTCRilevati.Connection.ConnectionString = _connectionString;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -292,6 +294,7 @@ namespace MapoDb
|
||||
public DS_applicazioneTableAdapters.MicroStatoMacchinaTableAdapter taMSM;
|
||||
|
||||
// area tempi ciclo
|
||||
public DS_ProdTempiTableAdapters.DatiMacchineTableAdapter taDatiMacchine;
|
||||
public DS_ProdTempiTableAdapters.TempiCicloRilevatiTableAdapter taTCRilevati;
|
||||
|
||||
#endregion
|
||||
@@ -467,8 +470,6 @@ namespace MapoDb
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("[ChkMiSt]{2}---------------------------{2}Richiesta verifica INPUT per Macchina {0}, seriale {1}", idxMacchina, valore, Environment.NewLine), tipoLog.INFO);
|
||||
}
|
||||
// scrivo keep alive!
|
||||
scriviKeepAlive(idxMacchina, DateTime.Now);
|
||||
// formatto output
|
||||
inputComando answ = new inputComando();
|
||||
DS_applicazione.TransizioneIngressiDataTable TabTransIn;
|
||||
@@ -479,12 +480,13 @@ namespace MapoDb
|
||||
// recupero CodArticolo corretto
|
||||
try
|
||||
{
|
||||
DataLayer.obj.taDatiConfermati = new DS_ProdTempiTableAdapters.DatiConfermatiTableAdapter();
|
||||
CodArticolo = DataLayer.obj.taDatiMacchine.getByIdx(Convert.ToInt32(idxMacchina))[0].CodArticolo_A;
|
||||
// 2017.07.10 forzo init x errori "sovrapposizioni"
|
||||
taDatiMacchine = new DS_ProdTempiTableAdapters.DatiMacchineTableAdapter();
|
||||
CodArticolo = taDatiMacchine.getByIdx(Convert.ToInt32(idxMacchina))[0].CodArticolo_A;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("[ChkMiSt_4] - Eccezione in recupero CodArticolo:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
|
||||
logger.lg.scriviLog(string.Format("[ChkMiSt_4a] - Eccezione in recupero CodArticolo:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
|
||||
}
|
||||
// recupero next microstato
|
||||
//int? valINT = Convert.ToInt32(valore);
|
||||
@@ -502,7 +504,7 @@ namespace MapoDb
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("[ChkMiSt] - Eccezione in recupero riga Trans ingressi per idxMacchina {3} e valore {2}:{0}{1}", Environment.NewLine, exc, valINT, idxMacchina), tipoLog.EXCEPTION);
|
||||
logger.lg.scriviLog(string.Format("[ChkMiSt_5a] - - Eccezione in recupero riga Trans ingressi per idxMacchina {3} e valore {2}:{0}{1}", Environment.NewLine, exc, valINT, idxMacchina), tipoLog.EXCEPTION);
|
||||
}
|
||||
int _logLevel = memLayer.ML.confReadInt("_logLevel");
|
||||
// effettuo update vari
|
||||
@@ -512,7 +514,7 @@ namespace MapoDb
|
||||
{
|
||||
if (_logLevel > 5)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("[ChkMiSt] - Salvo Update Microstato:{0}macchina: {1} | valore seriale: {2} | next micro stato: {3}", Environment.NewLine, idxMacchina, valINT, rigaTransIn.next_IdxMicroStato), tipoLog.INFO);
|
||||
logger.lg.scriviLog(string.Format("[ChkMiSt_6a] - Salvo Update Microstato:{0}macchina: {1} | valore seriale: {2} | next micro stato: {3}", Environment.NewLine, idxMacchina, valINT, rigaTransIn.next_IdxMicroStato), tipoLog.INFO);
|
||||
}
|
||||
// 2017.06.09 forzo init x errori "sovrapposizioni"
|
||||
taMSM = new DS_applicazioneTableAdapters.MicroStatoMacchinaTableAdapter();
|
||||
@@ -523,19 +525,19 @@ namespace MapoDb
|
||||
{
|
||||
if (_logLevel > 5)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("[ChkMiSt] - Salvo evento:{0}macchina: {1} | tipoEvento: {2} | CodArticolo: {3} | contatore: {4} | valore: {5}", Environment.NewLine, idxMacchina, rigaTransIn.IdxTipoEvento, CodArticolo, contatore, valore), tipoLog.INFO);
|
||||
logger.lg.scriviLog(string.Format("[ChkMiSt_7a] - Salvo evento:{0}macchina: {1} | tipoEvento: {2} | CodArticolo: {3} | contatore: {4} | valore: {5}", Environment.NewLine, idxMacchina, rigaTransIn.IdxTipoEvento, CodArticolo, contatore, valore), tipoLog.INFO);
|
||||
}
|
||||
string valEsteso = string.Format("[{0}] {1}", contatore.PadLeft(3, '0'), valore);
|
||||
answ = scriviRigaEvento(idxMacchina, rigaTransIn.IdxTipoEvento, CodArticolo, valEsteso, 0, "-", dtEve, DateTime.Now); // aggiunto contatore!
|
||||
if (_logLevel > 5)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("[ChkMiSt] - Macchina {0} | seriale(INT) {1} | valEsteso {3} | answ {4}{2}---------------------------{2}", idxMacchina, valINT, Environment.NewLine, valEsteso, answ), tipoLog.INFO);
|
||||
logger.lg.scriviLog(string.Format("[ChkMiSt_a] - Macchina {0} | seriale(INT) {1} | valEsteso {3} | answ {4}{2}---------------------------{2}", idxMacchina, valINT, Environment.NewLine, valEsteso, answ), tipoLog.INFO);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("[ChkMiSt] - Eccezione:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
|
||||
logger.lg.scriviLog(string.Format("[ChkMiSt_8a] - Eccezione:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
@@ -553,8 +555,6 @@ namespace MapoDb
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("{2}---------------------------{2}Richiesta verifica INPUT per Macchina {0}, seriale {1}", idxMacchina, valore, Environment.NewLine), tipoLog.INFO);
|
||||
}
|
||||
// scrivo keep alive!
|
||||
scriviKeepAlive(idxMacchina, DateTime.Now);
|
||||
// formatto output
|
||||
inputComando answ = new inputComando();
|
||||
DS_applicazione.TransizioneIngressiDataTable TabTransIn;
|
||||
@@ -565,17 +565,21 @@ namespace MapoDb
|
||||
// recupero CodArticolo corretto
|
||||
try
|
||||
{
|
||||
CodArticolo = DataLayer.obj.taDatiMacchine.getByIdx(Convert.ToInt32(idxMacchina))[0].CodArticolo_A;
|
||||
// 2017.07.10 forzo init x errori "sovrapposizioni"
|
||||
taDatiMacchine = new DS_ProdTempiTableAdapters.DatiMacchineTableAdapter();
|
||||
CodArticolo = taDatiMacchine.getByIdx(Convert.ToInt32(idxMacchina))[0].CodArticolo_A;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("[ChkMiSt_3] - Eccezione in recupero CodArticolo:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
|
||||
logger.lg.scriviLog(string.Format("[ChkMiSt_4b] - Eccezione in recupero CodArticolo:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
|
||||
}
|
||||
// recupero next microstato
|
||||
//int? valINT = Convert.ToInt32(valore);
|
||||
int? valINT = 0;
|
||||
try
|
||||
{
|
||||
// 2017.06.09 forzo init x errori "sovrapposizioni"
|
||||
taTransIngr = new DS_applicazioneTableAdapters.TransizioneIngressiTableAdapter();
|
||||
valINT = int.Parse(valore, System.Globalization.NumberStyles.HexNumber);
|
||||
TabTransIn = taTransIngr.getByIdxMacchinaValore(idxMacchina, valINT);
|
||||
if (TabTransIn.Rows.Count > 0)
|
||||
@@ -585,7 +589,7 @@ namespace MapoDb
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Eccezione in recupero riga Trans ingressi per idxMacchina {3} e valore {2}:{0}{1}", Environment.NewLine, exc, valINT, idxMacchina), tipoLog.EXCEPTION);
|
||||
logger.lg.scriviLog(string.Format("[ChkMiSt_5b] - Eccezione in recupero riga Trans ingressi per idxMacchina {3} e valore {2}:{0}{1}", Environment.NewLine, exc, valINT, idxMacchina), tipoLog.EXCEPTION);
|
||||
}
|
||||
int _logLevel = memLayer.ML.confReadInt("_logLevel");
|
||||
// effettuo update vari
|
||||
@@ -595,7 +599,7 @@ namespace MapoDb
|
||||
{
|
||||
if (_logLevel > 5)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Salvo Update Microstato:{0}macchina: {1} | valore seriale: {2} | next micro stato: {3}", Environment.NewLine, idxMacchina, valINT, rigaTransIn.next_IdxMicroStato), tipoLog.INFO);
|
||||
logger.lg.scriviLog(string.Format("[ChkMiSt_6b] - Salvo Update Microstato:{0}macchina: {1} | valore seriale: {2} | next micro stato: {3}", Environment.NewLine, idxMacchina, valINT, rigaTransIn.next_IdxMicroStato), tipoLog.INFO);
|
||||
}
|
||||
// salvo nuovo microstato...
|
||||
taMSM.updateQuery(rigaTransIn.next_IdxMicroStato, dtEve, valore, idxMacchina);
|
||||
@@ -604,18 +608,18 @@ namespace MapoDb
|
||||
{
|
||||
if (_logLevel > 5)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Salvo evento:{0}macchina: {1} | tipoEvento: {2} | CodArticolo: {3}", Environment.NewLine, idxMacchina, rigaTransIn.IdxTipoEvento, CodArticolo), tipoLog.INFO);
|
||||
logger.lg.scriviLog(string.Format("[ChkMiSt_7b] - Salvo evento:{0}macchina: {1} | tipoEvento: {2} | CodArticolo: {3}", Environment.NewLine, idxMacchina, rigaTransIn.IdxTipoEvento, CodArticolo), tipoLog.INFO);
|
||||
}
|
||||
answ = scriviRigaEvento(idxMacchina, rigaTransIn.IdxTipoEvento, CodArticolo, valore, 0, "-", dtEve, DateTime.Now);
|
||||
if (_logLevel > 5)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Macchina {0}, seriale(INT) {1}{2}---------------------------{2}", idxMacchina, valINT, Environment.NewLine), tipoLog.INFO);
|
||||
logger.lg.scriviLog(string.Format("[ChkMiSt_b] -Macchina {0}, seriale(INT) {1}{2}---------------------------{2}", idxMacchina, valINT, Environment.NewLine), tipoLog.INFO);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Eccezione:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
|
||||
logger.lg.scriviLog(string.Format("[ChkMiSt_8b] - Eccezione:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
|
||||
Reference in New Issue
Block a user