Integration 3.1a2 :

- aggiunta gestione ChosenOutput di barra (viene riportato in btm come UNLOAD).
This commit is contained in:
Dario Sassi
2026-02-09 12:07:45 +01:00
parent 0effcdbb5a
commit b76924be89
5 changed files with 41 additions and 6 deletions
+5 -3
View File
@@ -16,13 +16,14 @@ namespace ib.essetre.integration.egaltech
public class BTL
{
public string projectNumber ;
public int productionId ;
public int patternId ;
public int productionId ;
public int patternId ;
public string barLength ;
public string panelLength ;
public string panelWidth ;
public string barLoad90 ;
public int RefPos ;
public string barUnload ;
public int RefPos ;
public string panelDeltaX ;
public string panelDeltaY ;
public string panelDeltaZ ;
@@ -225,6 +226,7 @@ namespace ib.essetre.integration.egaltech
tw.WriteLine( "PROJID=" + projectNumber) ;
tw.WriteLine( "PRODID=" + (IsFromProject ? "0" : productionId.ToString())) ;
tw.WriteLine( "LOAD90=" + barLoad90) ;
tw.WriteLine( "UNLOAD=" + barUnload) ;
tw.WriteLine( "REFPOS=" + RefPos.ToString()) ;
tw.WriteLine( "PANELDELTAX=" + panelDeltaX) ;
tw.WriteLine( "PANELDELTAY=" + panelDeltaY) ;
+33
View File
@@ -588,6 +588,7 @@ namespace ib.essetre.integration.egaltech
btlObject.panelLength = GetBarLengthP( (int)dRow0["patternId"], (int)dRow0["productionId"]).ToString( "F3", CultureInfo.InvariantCulture) ;
btlObject.panelWidth = GetBarWidthP( (int)dRow0["patternId"], (int)dRow0["productionId"]).ToString( "F3", CultureInfo.InvariantCulture) ;
btlObject.barLoad90 = GetBarLoad90P( (int)dRow0["patternId"], (int)dRow0["productionId"]).ToString( CultureInfo.InvariantCulture) ;
btlObject.barUnload = GetBarOutput( (int)dRow0["patternId"], (int)dRow0["productionId"]).ToString( CultureInfo.InvariantCulture);
btlObject.RefPos = GetBarOriginP( (int)dRow0["patternId"], (int)dRow0["productionId"]) ;
// i Delta sono spostati di una posizione tra visualizzazione e salvataggio nel DB, qui si ripristina XYZ macchina
btlObject.panelDeltaX = GetBarDeltaZP((int)dRow0["patternId"], (int)dRow0["productionId"]).ToString("F3", CultureInfo.InvariantCulture);
@@ -1226,6 +1227,38 @@ namespace ib.essetre.integration.egaltech
return nLoad90 ;
}
//-------------------------------------------------------------------------------------------------------------
// Recupera il tipo di scarico nel caso Produzione (colonna "ChosenOutput")
private static int GetBarOutput(int patternId, int productionId)
{
int nOutput = 0;
string sqlBarLength = "SELECT ChosenOutput " +
"FROM dbo.vw_Pattern " +
"WHERE patternId = @firstId " +
"AND productionId = @secondId";
// Connessione al DB ed esecuzione query
using (SqlConnection cn = new SqlConnection(_SqlConnectionStr))
{
cn.Open();
using (SqlCommand sqlCommand = new SqlCommand(sqlBarLength, cn))
{
sqlCommand.Parameters.Add("@firstId", SqlDbType.Int);
sqlCommand.Parameters.Add("@secondId", SqlDbType.Int);
sqlCommand.Parameters["@firstId"].Value = patternId;
sqlCommand.Parameters["@secondId"].Value = productionId;
SqlDataReader reader = sqlCommand.ExecuteReader();
while (reader.Read())
{
nOutput = Convert.ToInt32(reader["ChosenOutput"]);
}
}
}
return nOutput;
}
//-------------------------------------------------------------------------------------------------------------
// Recupera l'indice dell'origine del pannello nel caso Produzione (colonna "RefPos")
private static int GetBarOriginP( int patternId, int productionId)
@@ -14,7 +14,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Egalware s.r.l.")]
[assembly: AssemblyProduct("Beam & Wall")]
[assembly: AssemblyCopyright("Copyright © 2018-2025 by Egalware s.r.l.")]
[assembly: AssemblyCopyright("Copyright © 2018-2026 by Egalware s.r.l.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -36,5 +36,5 @@ using System.Runtime.InteropServices;
// È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
// usando l'asterisco '*' come illustrato di seguito:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.1.1.1")]
[assembly: AssemblyFileVersion("3.1.1.1")]
[assembly: AssemblyVersion("3.1.1.2")]
[assembly: AssemblyFileVersion("3.1.1.2")]
Binary file not shown.
Binary file not shown.