diff --git a/NKC_WF/Controllers/BatchProcController.cs b/NKC_WF/Controllers/BatchProcController.cs index ad115a1..d281887 100644 --- a/NKC_WF/Controllers/BatchProcController.cs +++ b/NKC_WF/Controllers/BatchProcController.cs @@ -277,18 +277,8 @@ namespace NKC_WF.Controllers // deserializzo come OfflineOrder nestReplyOffOrd rispNest = JsonConvert.DeserializeObject(content); // SALVO!!! - - answ = "OK"; } - - -#if false - foreach (var item in currBunk.SheetList) - { - DataLayer.man.taSHL.updateDate(item.SheetId, item.Printing.DtStart, item.Printing.DtEnd, item.Machining.DtStart, item.Machining.DtEnd, item.Unloading.DtStart, item.Unloading.DtEnd); - } -#endif } else { diff --git a/NKC_WF/Controllers/BunkController.cs b/NKC_WF/Controllers/BunkController.cs index bd53c5f..f22ec72 100644 --- a/NKC_WF/Controllers/BunkController.cs +++ b/NKC_WF/Controllers/BunkController.cs @@ -72,7 +72,7 @@ namespace NKC_WF.Controllers /// - /// Effettua la chaimata di update + /// Effettua la chiamata di update /// /// /// @@ -90,6 +90,11 @@ namespace NKC_WF.Controllers foreach (var item in currBunk.SheetList) { DataLayer.man.taSHL.updateDate(item.SheetId, item.Printing.DtStart, item.Printing.DtEnd, item.Machining.DtStart, item.Machining.DtEnd, item.Unloading.DtStart, item.Unloading.DtEnd); + // SE machining completato --> status a LAVORATO! + if (item.Machining.DtEnd != null) + { + DataLayer.man.taIL.updateSheetStatus(item.SheetId, 1, "PROD"); + } } } // INVALIDO eventuale valore BUNK in REDIS... @@ -125,6 +130,11 @@ namespace NKC_WF.Controllers foreach (var item in currBunk.SheetList) { DataLayer.man.taSHL.updateDate(item.SheetId, item.Printing.DtStart, item.Printing.DtEnd, item.Machining.DtStart, item.Machining.DtEnd, item.Unloading.DtStart, item.Unloading.DtEnd); + // SE machining completato --> status a LAVORATO! + if (item.Machining.DtEnd != null) + { + DataLayer.man.taIL.updateSheetStatus(item.SheetId, 1, "PROD"); + } } } answ = "OK"; diff --git a/NKC_WF/WebUserControls/cmp_batchList.ascx.cs b/NKC_WF/WebUserControls/cmp_batchList.ascx.cs index 55b7b43..ff8054f 100644 --- a/NKC_WF/WebUserControls/cmp_batchList.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchList.ascx.cs @@ -148,7 +148,7 @@ namespace NKC_WF.WebUserControls bool answ = false; int status = -1; int.TryParse(_status.ToString(), out status); - if (status > 3) + if (status > 3 && status < 8) { answ = true; } diff --git a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs index 10e08ad..89ae304 100644 --- a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs @@ -23,6 +23,16 @@ namespace NKC_WF.WebUserControls return hfDeviceId.Value; } } + /// + /// Postazione attuale (per ora cablata) + /// + protected string PlaceId + { + get + { + return "WRK001"; + } + } /// /// Sheet selezionato... @@ -265,7 +275,7 @@ namespace NKC_WF.WebUserControls else { // dichiaro che è depositato - DataLayer.man.taIL.updateStatus(itemIdSelected, 4, "WRK001"); + DataLayer.man.taIL.updateStatus(itemIdSelected, 4, PlaceId); lblDestination.Text = $"Item {itemIdSelected} PUT IN CART {rawData}"; // elimino item sel... ComLib.resetItemPickup(SheetID, DeviceId); @@ -285,7 +295,7 @@ namespace NKC_WF.WebUserControls else { // dichiaro che è depositato - DataLayer.man.taIL.updateStatus(itemIdSelected, 5, "WRK001"); + DataLayer.man.taIL.updateStatus(itemIdSelected, 5, PlaceId); lblDestination.Text = $"Item {itemIdSelected} PUT IN BIN {rawData}"; // elimino item sel... ComLib.resetItemPickup(SheetID, DeviceId); @@ -348,7 +358,7 @@ namespace NKC_WF.WebUserControls case 2: case 3: // salvo che è in STATO 2 (picked up) --> HARD CODED su macchna WRK001 - DataLayer.man.taIL.updateStatus(itemRow.ItemID, 2, "WRK001"); + DataLayer.man.taIL.updateStatus(itemRow.ItemID, 2, PlaceId); // verifico cosa devo mostrare come PROX passaggio... showCart = itemRow.ProcessesReq == "0"; showBin = itemRow.ProcessesReq == "2"; @@ -411,7 +421,6 @@ namespace NKC_WF.WebUserControls } } - private void resetIcons() { lblDestination.CssClass = "text-secondary"; @@ -496,7 +505,7 @@ namespace NKC_WF.WebUserControls protected void lbtCancel_Click(object sender, EventArgs e) { // resetto item selezionato... - DataLayer.man.taIL.updateStatus(itemIdSelected, 1, "WRK001"); + DataLayer.man.taIL.updateStatus(itemIdSelected, 1, PlaceId); itemIdSelected = 0; showItemDetail(false, null, false); } @@ -506,7 +515,7 @@ namespace NKC_WF.WebUserControls if (tabSheet.Count == 1) { // resetto sheet selezionato... - DataLayer.man.taIL.updateSheetStatusPU(tabSheet[0].SheetID, "WRK001"); + DataLayer.man.taIL.updateSheetStatusPU(tabSheet[0].SheetID, PlaceId); itemIdSelected = 0; showItemDetail(false, null, false); } @@ -519,7 +528,7 @@ namespace NKC_WF.WebUserControls protected void lbtParkArea_Click(object sender, EventArgs e) { // resetto item selezionato... - DataLayer.man.taIL.updateStatus(itemIdSelected, 3, "WRK001"); + DataLayer.man.taIL.updateStatus(itemIdSelected, 3, PlaceId); itemIdSelected = 0; showItemDetail(false, null, false); lblMessage.Text = "Item Parked"; @@ -532,7 +541,7 @@ namespace NKC_WF.WebUserControls protected void lbtScrapped_Click(object sender, EventArgs e) { // resetto item selezionato... - DataLayer.man.taIL.updateStatus(itemIdSelected, 990, "WRK001"); + DataLayer.man.taIL.updateStatus(itemIdSelected, 990, PlaceId); //itemIdSelected = 0; //showItemDetail(true, null, false); lblMessage.Text = "Item Set SCRAPPED";