diff --git a/Jenkinsfile b/Jenkinsfile index b17c7238..1be512ea 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=743']) { + withEnv(['NEXT_BUILD_NUMBER=744']) { // env.versionNumber = VersionNumber(versionNumberString : '5.1.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '5.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/DettaglioMacchina.aspx b/MP-TAB/DettaglioMacchina.aspx index e224d90a..a880c1e2 100644 --- a/MP-TAB/DettaglioMacchina.aspx +++ b/MP-TAB/DettaglioMacchina.aspx @@ -23,7 +23,6 @@
-

diff --git a/MP-TAB/WebUserControls/mod_confProd.ascx b/MP-TAB/WebUserControls/mod_confProd.ascx index 400e0be4..859cc30c 100644 --- a/MP-TAB/WebUserControls/mod_confProd.ascx +++ b/MP-TAB/WebUserControls/mod_confProd.ascx @@ -76,13 +76,14 @@ Dati Incrementali
- ultima conferma --> <%: dtReqUpdate.ToString() %> + ultima conferma --> +
-
- +
+
-
+
+ @@ -94,7 +95,11 @@ [C2]
-
+
+ + +
+
CONFERMA
diff --git a/MP-TAB/WebUserControls/mod_confProd.ascx.cs b/MP-TAB/WebUserControls/mod_confProd.ascx.cs index 6146cef2..4371f4eb 100644 --- a/MP-TAB/WebUserControls/mod_confProd.ascx.cs +++ b/MP-TAB/WebUserControls/mod_confProd.ascx.cs @@ -49,15 +49,25 @@ namespace MoonProTablet.WebUserControls if (!Page.IsPostBack) { checkAll(); + resetParam(); doUpdate(); } } /// - /// Aggiorno valori produzione... + /// Reset parametri x calcolo pezzi (no pezzi lasciati, dataora attuale...) /// - public void doUpdate() + private void resetParam() { dtReqUpdate = DateTime.Now; + numPzLasciati = 0; + } + + /// + /// Aggiorno valori produzione alla data richiesta... + /// + /// + public void doUpdate() + { datiProdAct = DataLayer.obj.taStatoProd.GetData(idxMacchina, dtReqUpdate)[0]; // aggiorno visualizzazione... numPzProdotti = datiProdAct.PzTotODL; @@ -78,6 +88,27 @@ namespace MoonProTablet.WebUserControls } } /// + /// Numero pezzi da LASCIARE non dichiarati + /// + protected int numPzLasciati + { + set + { + txtNumLasciati.Text = value.ToString(); + } + get + { + int answ = 0; + try + { + answ = Convert.ToInt32(txtNumLasciati.Text); + } + catch + { } + return answ; + } + } + /// /// Numero pezzi PRODOTTI da ultima conferma /// protected int numPz2Rec @@ -287,6 +318,7 @@ namespace MoonProTablet.WebUserControls private void switchBtnConferma(bool showConf) { // aggiorno valori rilevati + resetParam(); doUpdate(); divInnovazioni.Visible = showConf; if (showConf) @@ -295,7 +327,7 @@ namespace MoonProTablet.WebUserControls lbtSalva.Visible = showConf; try { - lblPz2RecBuoni.Text = numPzConfermati.ToString(); + updatePzBuoni(); // sollevo evento! if (eh_inserting != null) { @@ -379,9 +411,31 @@ namespace MoonProTablet.WebUserControls /// private void updatePzBuoni() { - lblPz2RecBuoni.Text = (numPzProdotti2Rec - numPzScarto2Rec).ToString(); + // se ho dei pezzi lasciati RICALCOLO la data... + if (numPzLasciati > 0) + { + // calcolo la data.. + DS_ProdTempi.TempiCicloRilevatiDataTable tab = DataLayer.obj.taTempiCicloRilevati.getLastPzByMaccQta(idxMacchina, DateTime.Now, numPzLasciati); + if (tab.Rows.Count > 0) + { + dtReqUpdate = tab[0].DataOraRif.AddSeconds(1); + } + // aggiorno + doUpdate(); + } + // aggiorno la data calcolo + pezzi buoni... + lblDtRec.Text = dtReqUpdate.ToString(); + lblPz2RecBuoni.Text = numPzConfermati.ToString(); + } + /// + /// Update pz lasciati --> aggiorno! + /// + /// + /// + protected void txtNumLasciati_TextChanged(object sender, EventArgs e) + { + updatePzBuoni(); } - protected void ddlSubMacc_SelectedIndexChanged(object sender, EventArgs e) { subMaccSel = ddlSubMacc.SelectedValue; diff --git a/MP-TAB/WebUserControls/mod_confProd.ascx.designer.cs b/MP-TAB/WebUserControls/mod_confProd.ascx.designer.cs index 0d50029c..dc122a9a 100644 --- a/MP-TAB/WebUserControls/mod_confProd.ascx.designer.cs +++ b/MP-TAB/WebUserControls/mod_confProd.ascx.designer.cs @@ -120,6 +120,15 @@ namespace MoonProTablet.WebUserControls { /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl divInnovazioni; + /// + /// Controllo lblDtRec. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Label lblDtRec; + /// /// Controllo lblNumPezzi. /// @@ -174,6 +183,24 @@ namespace MoonProTablet.WebUserControls { /// protected global::System.Web.UI.WebControls.Label lblPz2RecBuoni; + /// + /// Controllo lblNumLasciati. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Label lblNumLasciati; + + /// + /// Controllo txtNumLasciati. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.TextBox txtNumLasciati; + /// /// Controllo lbtSalva. /// diff --git a/MapoDb/DS_ProdTempi.xsd b/MapoDb/DS_ProdTempi.xsd index 4b6e7978..e8ede2e1 100644 --- a/MapoDb/DS_ProdTempi.xsd +++ b/MapoDb/DS_ProdTempi.xsd @@ -96,6 +96,19 @@ SELECT IdxMacchina, CodArticolo, DataOraRif, TCMedio, PzProd FROM TempiCicloRile + + + + dbo.stp_TC_getDtLastPzByMacchinaQta + + + + + + + + + @@ -2373,7 +2386,7 @@ FROM v_RegistroControlli - + @@ -2447,7 +2460,7 @@ FROM v_RegistroControlli - + @@ -2476,7 +2489,7 @@ FROM v_RegistroControlli - + @@ -2488,7 +2501,7 @@ FROM v_RegistroControlli - + @@ -2513,7 +2526,7 @@ FROM v_RegistroControlli - + @@ -2551,7 +2564,7 @@ FROM v_RegistroControlli - + @@ -2590,7 +2603,7 @@ FROM v_RegistroControlli - + @@ -2635,7 +2648,7 @@ FROM v_RegistroControlli - + diff --git a/MapoDb/DS_ProdTempi.xss b/MapoDb/DS_ProdTempi.xss index ab9e6e6d..7652148a 100644 --- a/MapoDb/DS_ProdTempi.xss +++ b/MapoDb/DS_ProdTempi.xss @@ -4,30 +4,30 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - - - - + + + + - + - + - + - - + + - - - + + + \ No newline at end of file diff --git a/MapoDb/DS_ProdTempi1.Designer.cs b/MapoDb/DS_ProdTempi1.Designer.cs index 3f31757b..cf887595 100644 --- a/MapoDb/DS_ProdTempi1.Designer.cs +++ b/MapoDb/DS_ProdTempi1.Designer.cs @@ -14937,7 +14937,7 @@ SELECT IdxMacchina, CodArticolo, DataOraRif, TCMedio, PzProd FROM TempiCicloRile [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 IdxMacchina, CodArticolo, DataOraRif, TCMedio, PzProd FROM dbo.TempiCicloR" + @@ -14962,15 +14962,15 @@ SELECT IdxMacchina, CodArticolo, DataOraRif, TCMedio, PzProd FROM TempiCicloRile this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MAX", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 8, 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_TC_getMaxByMacchinaPeriodo"; + this._commandCollection[3].CommandText = "dbo.stp_TC_getDtLastPzByMacchinaQta"; 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("@Inizio", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Fine", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, 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("@DataOra", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumPz2Left", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 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_TC_getMedByMacchinaPeriodo"; + this._commandCollection[4].CommandText = "dbo.stp_TC_getMaxByMacchinaPeriodo"; 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("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -14978,12 +14978,20 @@ SELECT IdxMacchina, CodArticolo, DataOraRif, TCMedio, PzProd FROM TempiCicloRile this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Fine", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, 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_TC_getMinByMacchinaPeriodo"; + this._commandCollection[5].CommandText = "dbo.stp_TC_getMedByMacchinaPeriodo"; 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("@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].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Inizio", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Fine", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, 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_TC_getMinByMacchinaPeriodo"; + 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("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Inizio", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Fine", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -15078,22 +15086,22 @@ SELECT IdxMacchina, CodArticolo, DataOraRif, TCMedio, PzProd FROM TempiCicloRile [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_ProdTempi.TempiCicloRilevatiDataTable getMaxByMacchinaPeriodo(string IdxMacchina, global::System.Nullable Inizio, global::System.Nullable Fine) { + public virtual DS_ProdTempi.TempiCicloRilevatiDataTable getLastPzByMaccQta(string idxMacchina, global::System.Nullable DataOra, global::System.Nullable NumPz2Left) { this.Adapter.SelectCommand = this.CommandCollection[3]; - if ((IdxMacchina == null)) { + if ((idxMacchina == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } else { - this.Adapter.SelectCommand.Parameters[1].Value = ((string)(IdxMacchina)); + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(idxMacchina)); } - if ((Inizio.HasValue == true)) { - this.Adapter.SelectCommand.Parameters[2].Value = ((System.DateTime)(Inizio.Value)); + if ((DataOra.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[2].Value = ((System.DateTime)(DataOra.Value)); } else { this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; } - if ((Fine.HasValue == true)) { - this.Adapter.SelectCommand.Parameters[3].Value = ((System.DateTime)(Fine.Value)); + if ((NumPz2Left.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[3].Value = ((int)(NumPz2Left.Value)); } else { this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value; @@ -15107,7 +15115,7 @@ SELECT IdxMacchina, CodArticolo, DataOraRif, TCMedio, PzProd FROM TempiCicloRile [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_ProdTempi.TempiCicloRilevatiDataTable getMedByMacchinaPeriodo(string IdxMacchina, global::System.Nullable Inizio, global::System.Nullable Fine) { + public virtual DS_ProdTempi.TempiCicloRilevatiDataTable getMaxByMacchinaPeriodo(string IdxMacchina, global::System.Nullable Inizio, global::System.Nullable Fine) { this.Adapter.SelectCommand = this.CommandCollection[4]; if ((IdxMacchina == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; @@ -15136,7 +15144,7 @@ SELECT IdxMacchina, CodArticolo, DataOraRif, TCMedio, PzProd FROM TempiCicloRile [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_ProdTempi.TempiCicloRilevatiDataTable getMinByMacchinaPeriodo(string IdxMacchina, global::System.Nullable Inizio, global::System.Nullable Fine) { + public virtual DS_ProdTempi.TempiCicloRilevatiDataTable getMedByMacchinaPeriodo(string IdxMacchina, global::System.Nullable Inizio, global::System.Nullable Fine) { this.Adapter.SelectCommand = this.CommandCollection[5]; if ((IdxMacchina == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; @@ -15161,6 +15169,35 @@ SELECT IdxMacchina, CodArticolo, DataOraRif, TCMedio, PzProd FROM TempiCicloRile return dataTable; } + [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")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_ProdTempi.TempiCicloRilevatiDataTable getMinByMacchinaPeriodo(string IdxMacchina, global::System.Nullable Inizio, global::System.Nullable Fine) { + this.Adapter.SelectCommand = this.CommandCollection[6]; + if ((IdxMacchina == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(IdxMacchina)); + } + if ((Inizio.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[2].Value = ((System.DateTime)(Inizio.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + if ((Fine.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[3].Value = ((System.DateTime)(Fine.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value; + } + DS_ProdTempi.TempiCicloRilevatiDataTable dataTable = new DS_ProdTempi.TempiCicloRilevatiDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + [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")] diff --git a/SQL Utils/V5.1/MoonPro_1805.744.sql b/SQL Utils/V5.1/MoonPro_1805.744.sql new file mode 100644 index 00000000..66251ba8 Binary files /dev/null and b/SQL Utils/V5.1/MoonPro_1805.744.sql differ