diff --git a/Jenkinsfile b/Jenkinsfile index 1f6313b..f3cda57 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,7 +11,7 @@ pipeline { steps { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=328']) { + withEnv(['NEXT_BUILD_NUMBER=329']) { // env.versionNumber = VersionNumber(versionNumberString : '1.1.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '1.1.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.versionNumberBeta = VersionNumber(versionNumberString : '1.1.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') diff --git a/NKC_WF/Controllers/PrintQueueController.cs b/NKC_WF/Controllers/PrintQueueController.cs index e206093..a10d87b 100644 --- a/NKC_WF/Controllers/PrintQueueController.cs +++ b/NKC_WF/Controllers/PrintQueueController.cs @@ -213,7 +213,7 @@ namespace NKC_WF.Controllers /// /// Restituisce numero jobs aperti (stato = 0...), se 0 = NESSUNO - /// GET: api/PrintQueue/GetCount/|queue01|queue02|queue03| + /// GET: api/PrintQueue?queueList=|queueOffline| /// /// Elenco code delimitate da |..| /// diff --git a/NKC_WF/Controllers/getMUCssController.cs b/NKC_WF/Controllers/getMUCssController.cs index dc201de..47437ef 100644 --- a/NKC_WF/Controllers/getMUCssController.cs +++ b/NKC_WF/Controllers/getMUCssController.cs @@ -38,6 +38,7 @@ namespace NKC_WF.Controllers { // var base string answ = ""; + string redKeyZero = $"{ComLib.machineUnloadArea(0)}:Css"; if (sheetID > 0) { // TTL standard @@ -52,10 +53,18 @@ namespace NKC_WF.Controllers } // RICALCOLO SOLO SE non trovo in REDIS (perché invalidato) if (string.IsNullOrEmpty(answ)) - // se vuoto lo calcolo... { + // se vuoto lo calcolo... answ = ComLib.getCurrentCss(sheetID); } + // salvo ANCHE per foglio 0... + memLayer.ML.setRSV(redKeyZero, answ, 60); + + } + else + { + // leggo ultimo... + answ = memLayer.ML.getRSV(redKeyZero); } // restituisco css return answ; diff --git a/NKC_WF/NKC_WF.csproj b/NKC_WF/NKC_WF.csproj index 44bcbf8..acd3b3d 100644 --- a/NKC_WF/NKC_WF.csproj +++ b/NKC_WF/NKC_WF.csproj @@ -538,16 +538,24 @@ Always - - + + Always + + + Always + - - + + Always + + + Always + Always diff --git a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs index 5ae0ea6..2dde18a 100644 --- a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs @@ -1,7 +1,9 @@ using AppData; +using Newtonsoft.Json; using NKC_SDK; using SteamWare; using System; +using System.Drawing.Imaging; namespace NKC_WF.WebUserControls { @@ -71,6 +73,8 @@ namespace NKC_WF.WebUserControls } } + protected string redMachUnloadTable = "NKC:SERV:MACH_UNLOAD:TABLES"; + /// /// Sheet selezionato... /// @@ -395,19 +399,6 @@ namespace NKC_WF.WebUserControls default: break; } - - - // cerco su DB - - // certo lavorazioni accessorie - - // cerco destinazione CART/BIN - - // salvo in hiddenField - - // mostro output (compreso che mi aspetto entro 30 sec lettura cart/Bin) - - } /// /// Mostra INFO ed effettua reset vari... @@ -451,9 +442,9 @@ namespace NKC_WF.WebUserControls } catch { } + // elimino item sel... + itemIdSelected = 0; } - // elimino item sel... - itemIdSelected = 0; resetShowData(); ComLib.resetItemPickup(SheetID, DeviceId); } @@ -555,14 +546,46 @@ namespace NKC_WF.WebUserControls { get { - return DataLayer.man.taBN.getByItemID(itemIdSelected); + DS_App.BinsDataTable answ = null; + string redKey = $"{redMachUnloadTable}:currBinTab:{itemIdSelected}"; + string rawVal = memLayer.ML.getRSV(redKey); + // cerco su redis... + if (string.IsNullOrEmpty(rawVal)) + { + // se non trovo --> DB + answ = DataLayer.man.taBN.getByItemID(itemIdSelected); + string rawData = JsonConvert.SerializeObject(answ); + //salvo in redis... TTL 2 sec + memLayer.ML.setRSV(redKey, rawData, 2); + } + else + { + answ = JsonConvert.DeserializeObject(rawVal); + } + return answ; } } protected DS_App.CartsDataTable currCartTab { get { - return DataLayer.man.taCR.getByItemID(itemIdSelected); + DS_App.CartsDataTable answ = null; + string redKey = $"{redMachUnloadTable}:currCartTab:{itemIdSelected}"; + string rawVal = memLayer.ML.getRSV(redKey); + // cerco su redis... + if (string.IsNullOrEmpty(rawVal)) + { + // se non trovo --> DB + answ = DataLayer.man.taCR.getByItemID(itemIdSelected); + string rawData = JsonConvert.SerializeObject(answ); + //salvo in redis... TTL 2 sec + memLayer.ML.setRSV(redKey, rawData, 2); + } + else + { + answ = JsonConvert.DeserializeObject(rawVal); + } + return answ; } } diff --git a/NKC_WF/site/MachineUnload.aspx b/NKC_WF/site/MachineUnload.aspx index 49aa670..3e19e52 100644 --- a/NKC_WF/site/MachineUnload.aspx +++ b/NKC_WF/site/MachineUnload.aspx @@ -40,7 +40,7 @@
- + diff --git a/NKC_WF/site/MachineUnload.aspx.cs b/NKC_WF/site/MachineUnload.aspx.cs index cd362f0..54445d6 100644 --- a/NKC_WF/site/MachineUnload.aspx.cs +++ b/NKC_WF/site/MachineUnload.aspx.cs @@ -143,7 +143,6 @@ namespace NKC_WF // ogni x cicli resetto batch/Foglio if (counter % 15 == 0) { - //BatchId = -3; SheetId = -3; } // ora faccio verifiche @@ -155,7 +154,7 @@ namespace NKC_WF upnlStats.Update(); } // faccio update bin/cart ogni pari/dispari... - else if (counter % 2 == 0) + if (counter % 2 == 0) { cmp_MU_carts.doUpdate(); upnlCarts.Update();