diff --git a/NKC_WF/Controllers/SheetController.cs b/NKC_WF/Controllers/SheetController.cs
index d9bdb2a..b16f1e1 100644
--- a/NKC_WF/Controllers/SheetController.cs
+++ b/NKC_WF/Controllers/SheetController.cs
@@ -79,6 +79,7 @@ namespace NKC_WF.Controllers
// https://weblog.west-wind.com/posts/2013/dec/13/accepting-raw-request-body-content-with-aspnet-web-api
// https://weblog.west-wind.com/posts/2017/sep/14/accepting-raw-request-body-content-in-aspnet-core-api-controllers
int BunkId = 0;
+ int BatchId = 0;
if (sheetUpdated != null)
{
// 2020.01.16 salvo su mongoDb la risposta...
@@ -104,12 +105,18 @@ namespace NKC_WF.Controllers
}
// segnalo avanzamento su redis x pagina unload
ComLib.advaceSheetRevByBunk(currSheet.BunkId);
+ // calcolo Batch
BunkId = currSheet.BunkId;
}
}
+ var tabBunks = DataLayer.man.taSTL.getByKey(BunkId);
+ if (tabBunks.Count > 0)
+ {
+ BatchId = tabBunks[0].BatchID;
+ }
}
// ricalcolo stato BUNK
- ComLib.updateBatchPosition(BunkId);
+ ComLib.updateBatchPosition(BatchId);
// INVALIDO eventuale valore BUNK in REDIS...
ComLib.resetRedisBunkData();
}
@@ -154,7 +161,7 @@ namespace NKC_WF.Controllers
DataLayer.man.taSHL.updateDate(currSheet.SheetId, currSheet.Printing.DtStart, currSheet.Printing.DtEnd, currSheet.Machining.DtStart, currSheet.Machining.DtEnd, currSheet.Unloading.DtStart, currSheet.Unloading.DtEnd, (int)currSheet.Status);
// SE machining completato --> status a LAVORATO x item!
if (currSheet.Machining.DtEnd != null)
- {
+ {
// hard coded su multiax
DataLayer.man.taIL.updateSheetStatus(currSheet.SheetId, 1, "WRK001");
}
diff --git a/NKC_WF/WebUserControls/cmp_barcode.ascx b/NKC_WF/WebUserControls/cmp_barcode.ascx
index c5663ef..dc5f8d2 100644
--- a/NKC_WF/WebUserControls/cmp_barcode.ascx
+++ b/NKC_WF/WebUserControls/cmp_barcode.ascx
@@ -2,4 +2,5 @@
-
<%: traduci("BunkReading") %>
+
<%: traduci("BatchCurrent") %>
TOT SHEETS:
diff --git a/NKC_WF/WebUserControls/cmp_stackLoading.ascx.cs b/NKC_WF/WebUserControls/cmp_stackLoading.ascx.cs
index 7908706..2610210 100644
--- a/NKC_WF/WebUserControls/cmp_stackLoading.ascx.cs
+++ b/NKC_WF/WebUserControls/cmp_stackLoading.ascx.cs
@@ -76,7 +76,10 @@ namespace NKC_WF.WebUserControls
bool doRaiseEv = false;
// processo evento..
lastCmd = cmp_barcode.inputAcquired.ToUpper();
- if (lastCmd == "") doRaiseEv = true;
+ if (lastCmd == "")
+ {
+ doRaiseEv = true;
+ }
// processiamo barcode letto
decodedData decoData = DataLayer.man.decodeBcode(lastCmd);
switch (decoData.codeType)
@@ -178,7 +181,7 @@ namespace NKC_WF.WebUserControls
break;
}
// reset comando
- cmp_barcode.inputAcquired = "";
+ cmp_barcode.resetInput();
// aggiorno...
doUpdate();
// se richiesto faccio raiseEvent
@@ -280,13 +283,11 @@ namespace NKC_WF.WebUserControls
cmp_stackNextloading.doUpdate();
// segnalo avanzamento su redis x pagina unload
ComLib.advaceSheetRevByBunk(BatchIdCurr);
+ // controllo update stato BATCH/BUNK
+ ComLib.updateBatchPosition(BatchIdCurr);
raiseEvent();
}
}
- protected void lbtAdvanceBunk_Click(object sender, EventArgs e)
- {
- // simula invio barcode del PROSSIMO BUNK (SE necessario)
- }
}
}
\ No newline at end of file
diff --git a/NKC_WF/WebUserControls/cmp_stackNextloading.ascx b/NKC_WF/WebUserControls/cmp_stackNextloading.ascx
index 021445d..5dbbb7c 100644
--- a/NKC_WF/WebUserControls/cmp_stackNextloading.ascx
+++ b/NKC_WF/WebUserControls/cmp_stackNextloading.ascx
@@ -20,12 +20,12 @@
PREVIOUS BUNK:
- (
/2)
+ (
)
CURRENT BUNK:
- (
/2)
+ (
)
@@ -61,7 +61,7 @@
-
<%: traduci("CollectRedo") %>
+
<%: traduci("CollectRedo") %>
@@ -70,7 +70,7 @@
sheets:
| printed:
@@ -103,7 +103,7 @@
-
<%: traduci("CollectRedoOnEnd") %>
+
<%: traduci("CollectRedoOnEnd") %>
diff --git a/NKC_WF/site/MachineLoad.aspx.cs b/NKC_WF/site/MachineLoad.aspx.cs
index f290b92..1f5a2fe 100644
--- a/NKC_WF/site/MachineLoad.aspx.cs
+++ b/NKC_WF/site/MachineLoad.aspx.cs
@@ -2,28 +2,34 @@
namespace NKC_WF
{
- public partial class MachineLoad : BasePage
- {
- protected void Page_Load(object sender, EventArgs e)
+ public partial class MachineLoad : BasePage
{
- if (!Page.IsPostBack)
- {
- ((SiteContent)this.Master).showSearch = false;
- }
- cmp_stackLoading.eh_doRefresh += Cmp_stackLoading_eh_doRefresh;
- }
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!Page.IsPostBack)
+ {
+ ((SiteContent)this.Master).showSearch = false;
+ }
+ forceRefresh();
+ cmp_stackLoading.eh_doRefresh += Cmp_stackLoading_eh_doRefresh;
+ }
- private void Cmp_stackLoading_eh_doRefresh(object sender, EventArgs e)
- {
- cmp_ML_ShDet.BatchId = cmp_stackLoading.BatchIdCurr;
- cmp_ML_ShDet1.BatchId = cmp_stackLoading.BatchIdCurr;
- cmp_ML_ShDet2.BatchId = cmp_stackLoading.BatchIdCurr;
- cmp_ML_ShDet3.BatchId = cmp_stackLoading.BatchIdCurr;
- // refresh vari!
- cmp_ML_ShDet.doUpdate();
- cmp_ML_ShDet1.doUpdate();
- cmp_ML_ShDet2.doUpdate();
- cmp_ML_ShDet3.doUpdate();
+ private void Cmp_stackLoading_eh_doRefresh(object sender, EventArgs e)
+ {
+ forceRefresh();
+ }
+
+ private void forceRefresh()
+ {
+ cmp_ML_ShDet.BatchId = cmp_stackLoading.BatchIdCurr;
+ cmp_ML_ShDet1.BatchId = cmp_stackLoading.BatchIdCurr;
+ cmp_ML_ShDet2.BatchId = cmp_stackLoading.BatchIdCurr;
+ cmp_ML_ShDet3.BatchId = cmp_stackLoading.BatchIdCurr;
+ // refresh vari!
+ cmp_ML_ShDet.doUpdate();
+ cmp_ML_ShDet1.doUpdate();
+ cmp_ML_ShDet2.doUpdate();
+ cmp_ML_ShDet3.doUpdate();
+ }
}
- }
}
\ No newline at end of file