diff --git a/Jenkinsfile b/Jenkinsfile
index bc063d42..e0433ef8 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -17,7 +17,7 @@ pipeline {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
- withEnv(['NEXT_BUILD_NUMBER=968']) {
+ withEnv(['NEXT_BUILD_NUMBER=973']) {
// env.versionNumber = VersionNumber(versionNumberString : '6.1.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '6.1.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.APP_NAME = 'MAPO'
diff --git a/MP-TAB/ODL.aspx.cs b/MP-TAB/ODL.aspx.cs
index a96c6f21..e9a53ca6 100644
--- a/MP-TAB/ODL.aspx.cs
+++ b/MP-TAB/ODL.aspx.cs
@@ -93,8 +93,9 @@ namespace MoonProTablet
///
private void Mod_ODL1_eh_reqUpdate(object sender, EventArgs e)
{
- // forzo update macchina...
+ // forzo update macchina...
DataLayer.obj.taMSE.forceRefreshMacchina(idxMacchina);
+ DataLayer.obj.taMSE.forceRecalc(0);
// update display!
mod_dettMacchina1.doUpdate();
}
diff --git a/MP-TAB/WebUserControls/mod_ODL.ascx.cs b/MP-TAB/WebUserControls/mod_ODL.ascx.cs
index 2c0ef305..771a4cac 100644
--- a/MP-TAB/WebUserControls/mod_ODL.ascx.cs
+++ b/MP-TAB/WebUserControls/mod_ODL.ascx.cs
@@ -47,8 +47,7 @@ namespace MoonProTablet.WebUserControls
get
{
string answ = "";
- // se è multi controllo
- if (DataLayer.isMulti(idxMacchina))
+ try
{
// verifico se SIA una tavola (ha char "#")
int iSharp = idxMacchina.IndexOf('#');
@@ -62,6 +61,8 @@ namespace MoonProTablet.WebUserControls
answ = idxMacchina.Replace(nomeTav, altraTav);
}
}
+ catch
+ { }
return answ;
}
}
@@ -527,11 +528,26 @@ namespace MoonProTablet.WebUserControls
// se è multi CHIUDO ODL x altra tavola...
if (isMulti)
{
- int idxOdlAltra = DataLayer.obj.taODL.getByMacchina(idxMaccAltraTav)[0].IdxODL;
- DataLayer.obj.taODL.fineProd(idxOdlAltra, idxMaccAltraTav);
- messaggio = String.Format("Registrata inizio attrezzaggio per ODL {0} (setup altra tavola)", idxOdlAltra);
- processaEvento(idxEvento, messaggio, idxOdlAltra);
- lblOut.Text += messaggio;
+ int idxOdlAltra = 0;
+ try
+ {
+ var tabOdl = DataLayer.obj.taODL.getByMacchina(idxMaccAltraTav);
+ if (tabOdl.Rows.Count > 0)
+ {
+ idxOdlAltra = DataLayer.obj.taODL.getByMacchina(idxMaccAltraTav)[0].IdxODL;
+ }
+ }
+ catch (Exception exc)
+ {
+ logger.lg.scriviLog("Durante recupero idxOdlAltra " + exc.ToString(), tipoLog.EXCEPTION);
+ }
+ if (idxOdlAltra > 0)
+ {
+ DataLayer.obj.taODL.fineProd(idxOdlAltra, idxMaccAltraTav);
+ messaggio = String.Format("Registrata inizio attrezzaggio per ODL {0} (setup altra tavola)", idxOdlAltra);
+ processaEvento(idxEvento, messaggio, idxOdlAltra);
+ lblOut.Text += messaggio;
+ }
}
// resetto contapezzi redis...
DataLayer.saveCounter(idxMacchina, "0");
@@ -709,11 +725,6 @@ namespace MoonProTablet.WebUserControls
DataLayer.obj.confermaProdMacchina(idxMacchina, memLayer.ML.CRI("modoConfProd"), rigaProd.pezziNonConfermati, 0, DateTime.Now);
}
}
- // sollevo evento!
- if (eh_reqUpdate != null)
- {
- eh_reqUpdate(this, new EventArgs());
- }
}
///
/// mostra dati ed opzione x split ODL
diff --git a/MapoDb/DS_ProdTempi.Designer.cs b/MapoDb/DS_ProdTempi.Designer.cs
index 40b44c42..e64d3867 100644
--- a/MapoDb/DS_ProdTempi.Designer.cs
+++ b/MapoDb/DS_ProdTempi.Designer.cs
@@ -24569,7 +24569,7 @@ SELECT RowNum, lastUpdate, IdxMacchina, CodMacchina, Nome, url, idxODL, CodArtic
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
private void InitCommandCollection() {
- this._commandCollection = new global::System.Data.SqlClient.SqlCommand[6];
+ this._commandCollection = new global::System.Data.SqlClient.SqlCommand[7];
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = @"SELECT RowNum, lastUpdate, IdxMacchina, CodMacchina, Nome, url, idxODL, CodArticolo, Disegno, NumPezzi, TCAssegnato, DataInizioODL, Semaforo, idxStato, DescrizioneStato, durata, PezziProd, PezziConf, TempoOn, TempoAuto, TempoRun,
@@ -24578,36 +24578,42 @@ FROM MappaStatoExpl";
this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[1].Connection = this.Connection;
- this._commandCollection[1].CommandText = "dbo.stp_MSE_refresh";
+ this._commandCollection[1].CommandText = "dbo.stp_MSE_recalc";
this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@maxAgeSec", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[2].Connection = this.Connection;
- this._commandCollection[2].CommandText = "dbo.stp_MSE_getByIdxMacchAndSub";
+ this._commandCollection[2].CommandText = "dbo.stp_MSE_refresh";
this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchSub", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[3].Connection = this.Connection;
- this._commandCollection[3].CommandText = "dbo.stp_MSE_getByIdxMacchina";
+ this._commandCollection[3].CommandText = "dbo.stp_MSE_getByIdxMacchAndSub";
this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchSub", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[4].Connection = this.Connection;
- this._commandCollection[4].CommandText = "dbo.stp_MSE_getData";
+ this._commandCollection[4].CommandText = "dbo.stp_MSE_getByIdxMacchina";
this._commandCollection[4].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@maxAgeSec", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[5] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[5].Connection = this.Connection;
- this._commandCollection[5].CommandText = "dbo.stp_MSE_getDataByOpr";
+ this._commandCollection[5].CommandText = "dbo.stp_MSE_getData";
this._commandCollection[5].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@maxAgeSec", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MatrOpr", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[6] = new global::System.Data.SqlClient.SqlCommand();
+ this._commandCollection[6].Connection = this.Connection;
+ this._commandCollection[6].CommandText = "dbo.stp_MSE_getDataByOpr";
+ this._commandCollection[6].CommandType = global::System.Data.CommandType.StoredProcedure;
+ this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@maxAgeSec", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MatrOpr", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -24639,7 +24645,7 @@ FROM MappaStatoExpl";
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
public virtual DS_ProdTempi.MappaStatoExplDataTable getByIdxMaccAndSub(string IdxMacchina, string IdxMacchSub) {
- this.Adapter.SelectCommand = this.CommandCollection[2];
+ this.Adapter.SelectCommand = this.CommandCollection[3];
if ((IdxMacchina == null)) {
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
}
@@ -24662,7 +24668,7 @@ FROM MappaStatoExpl";
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
public virtual DS_ProdTempi.MappaStatoExplDataTable getByIdxMacchina(string IdxMacchina) {
- this.Adapter.SelectCommand = this.CommandCollection[3];
+ this.Adapter.SelectCommand = this.CommandCollection[4];
if ((IdxMacchina == null)) {
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
}
@@ -24679,7 +24685,7 @@ FROM MappaStatoExpl";
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
public virtual DS_ProdTempi.MappaStatoExplDataTable getByRefreshData(global::System.Nullable maxAgeSec) {
- this.Adapter.SelectCommand = this.CommandCollection[4];
+ this.Adapter.SelectCommand = this.CommandCollection[5];
if ((maxAgeSec.HasValue == true)) {
this.Adapter.SelectCommand.Parameters[1].Value = ((int)(maxAgeSec.Value));
}
@@ -24696,7 +24702,7 @@ FROM MappaStatoExpl";
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
public virtual DS_ProdTempi.MappaStatoExplDataTable getByRefreshDataOpr(global::System.Nullable maxAgeSec, global::System.Nullable MatrOpr) {
- this.Adapter.SelectCommand = this.CommandCollection[5];
+ this.Adapter.SelectCommand = this.CommandCollection[6];
if ((maxAgeSec.HasValue == true)) {
this.Adapter.SelectCommand.Parameters[1].Value = ((int)(maxAgeSec.Value));
}
@@ -25708,8 +25714,36 @@ FROM MappaStatoExpl";
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
- public virtual int forceRefreshMacchina(string IdxMacchina) {
+ public virtual int forceRecalc(global::System.Nullable maxAgeSec) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1];
+ if ((maxAgeSec.HasValue == true)) {
+ command.Parameters[1].Value = ((int)(maxAgeSec.Value));
+ }
+ else {
+ command.Parameters[1].Value = global::System.DBNull.Value;
+ }
+ global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
+ if (((command.Connection.State & global::System.Data.ConnectionState.Open)
+ != global::System.Data.ConnectionState.Open)) {
+ command.Connection.Open();
+ }
+ int returnValue;
+ try {
+ returnValue = command.ExecuteNonQuery();
+ }
+ finally {
+ if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
+ command.Connection.Close();
+ }
+ }
+ return returnValue;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ public virtual int forceRefreshMacchina(string IdxMacchina) {
+ global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2];
if ((IdxMacchina == null)) {
command.Parameters[1].Value = global::System.DBNull.Value;
}
diff --git a/MapoDb/DS_ProdTempi.xsd b/MapoDb/DS_ProdTempi.xsd
index 058ee778..e7a9a8fc 100644
--- a/MapoDb/DS_ProdTempi.xsd
+++ b/MapoDb/DS_ProdTempi.xsd
@@ -1730,6 +1730,17 @@ SELECT RowNum, lastUpdate, IdxMacchina, CodMacchina, Nome, url, idxODL, CodArtic
+
+
+
+ dbo.stp_MSE_recalc
+
+
+
+
+
+
+