diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs
index 4d15966..7f9f736 100644
--- a/AppData/ComLib.cs
+++ b/AppData/ComLib.cs
@@ -169,8 +169,6 @@ namespace AppData
#region definizione classi impiegate con PROD
-
-
public static string PositionStatusDescr(object value)
{
string answ = "";
@@ -188,6 +186,12 @@ namespace AppData
case BatchPosition.StackDone:
answ = traduci("StackDone");
break;
+ case BatchPosition.Current:
+ answ = traduci("StackCurrent");
+ break;
+ case BatchPosition.Completed:
+ answ = traduci("StackCompleted");
+ break;
default:
break;
}
@@ -1719,6 +1723,49 @@ namespace AppData
return answ;
}
///
+ /// Recupera prossimo batch da DB (NEXT... da db x status... ok SOLO x singola macchina)
+ ///
+ protected int getNextBatch
+ {
+ get
+ {
+ int answ = 0;
+ try
+ {
+ var currData = DataLayer.man.taBL.getNextAvailable();
+ if (currData.Count > 0)
+ {
+ answ = currData[0].BatchID;
+ }
+ }
+ catch
+ { }
+ return answ;
+ }
+ }
+ ///
+ /// Recupera SHEET da batch e sstati permessi...
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected int getSheetIdByBatch(int BatchID, int minVal, int maxVal)
+ {
+ int answ = 0;
+ try
+ {
+ var tabSheet = DataLayer.man.taSHL.getByMLStatus(BatchID, minVal, maxVal);
+ if (tabSheet.Count > 0)
+ {
+ answ = tabSheet[0].SheetID;
+ }
+ }
+ catch
+ { }
+ return answ;
+ }
+ ///
/// Fornisce un dictionary di valori ATTUALI per una specifica macchina
///
///
@@ -1734,12 +1781,14 @@ namespace AppData
}
else
{
+ // recupero batch e sheet...
+ int batchId = getNextBatch;
// se non trovo creo un oggetto NUOVO e vuoto x ogni oggetto... e salvo...
- answ.Add("BatchID", "0");
- answ.Add("SheetID_load", "0");
- answ.Add("SheetID_print", "0");
- answ.Add("SheetID_work", "0");
- answ.Add("SheetID_unload", "0");
+ answ.Add("BatchID", batchId.ToString());
+ answ.Add("SheetID_load", getSheetIdByBatch(batchId, 0, 1).ToString());
+ answ.Add("SheetID_print", getSheetIdByBatch(batchId, 1, 2).ToString());
+ answ.Add("SheetID_work", getSheetIdByBatch(batchId, 2, 3).ToString());
+ answ.Add("SheetID_unload", getSheetIdByBatch(batchId, 3, 5).ToString());
// serializzo e salvo!
saveMachineData(machineCod, answ);
}
diff --git a/Jenkinsfile b/Jenkinsfile
index 194d45c..75623ab 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -17,7 +17,7 @@ pipeline {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
- withEnv(['NEXT_BUILD_NUMBER=212']) {
+ withEnv(['NEXT_BUILD_NUMBER=213']) {
// env.versionNumber = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.versionNumberBeta = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
diff --git a/NKC_WF/WebUserControls/cmp_taktList.ascx.cs b/NKC_WF/WebUserControls/cmp_taktList.ascx.cs
index b549567..d731cdb 100644
--- a/NKC_WF/WebUserControls/cmp_taktList.ascx.cs
+++ b/NKC_WF/WebUserControls/cmp_taktList.ascx.cs
@@ -12,7 +12,7 @@ namespace NKC_WF.WebUserControls
{
protected void Page_Load(object sender, EventArgs e)
{
- if(!Page.IsPostBack)
+ if (!Page.IsPostBack)
{
checkVisibility();
}
@@ -24,7 +24,7 @@ namespace NKC_WF.WebUserControls
grView.Visible = !divSelected.Visible;
// imposto css titolo...
string titleClass = "row font-weight-bold";
- if(divSelected.Visible)
+ if (divSelected.Visible)
{
titleClass += " table-primary";
}
@@ -78,11 +78,11 @@ namespace NKC_WF.WebUserControls
return answ;
}
///
- /// Converte il codice POSITION in effettivo campo
+ /// Converte il codice POSITION di un BATCH in traduzione
///
///
///
- public string PStatus(object _status)
+ public string BatchPositionStatus(object _status)
{
string answ = ComLib.PositionStatusDescr(_status);
return answ;