diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index 95b7d34..92ae17f 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -2243,6 +2243,7 @@ namespace AppData /// public static bool checkSendBatchSplit(int BatchID) { + int nextIndex = 1; bool batchSent = false; bool batchProcessed = false; DataLayer DLMan = new DataLayer(); @@ -2251,6 +2252,7 @@ namespace AppData // NKC2: controllo SE sia un batch tipo ancestor (1° invio) if (currType == BatchType.Ancestor) { + nextIndex = 10; // recupero batch descendant var tabDesc = ComLib.BatchDescendant(BatchID); if (tabDesc != null && tabDesc.Count > 0) @@ -2267,7 +2269,8 @@ namespace AppData // --> invio batch if (tabItems.Count > 0) { - ComLib.sendBatchReq(item.BatchID, "Nesting", 2, false); + // primo parto da indice 10... + ComLib.sendBatchReq(item.BatchID, "Nesting", 2, false, nextIndex); // registro su DB nesting iniziato... DLMan.taBL.updateStatus(item.BatchID, (int)BatchStatus.NestRequested, "", -1); batchProcessed = true; @@ -2305,6 +2308,7 @@ namespace AppData // ciclo x tutte le righe che NON fossero con nesting effettuato foreach (var item in tabDesc) { + nextIndex += 50; batchProcessed = false; // se c'è qualcosa da processare lo richiede if (item.STATUS == 2) @@ -2316,7 +2320,7 @@ namespace AppData // --> invio batch if (tabItems.Count > 0) { - ComLib.sendBatchReq(item.BatchID, "Nesting", 2, false); + ComLib.sendBatchReq(item.BatchID, "Nesting", 2, false, nextIndex); // registro su DB nesting iniziato... DLMan.taBL.updateStatus(item.BatchID, (int)BatchStatus.NestRequested, "", -1); batchProcessed = true; @@ -2350,8 +2354,9 @@ namespace AppData /// note opzionali /// Tipo processo: 1 = stima, 2 = nesting, 3 = stima EXTENDED /// Indica se sia validaizone (part o disegno) --> in tal caso MaxTime = 1 + /// Numero di indice richiesto con cui partire x creare CART/BIN /// - public static bool sendBatchReq(int BatchID, string note, int pType, bool isValidation) + public static bool sendBatchReq(int BatchID, string note, int pType, bool isValidation, int numIndexStart) { DataLayer DLMan = new DataLayer(); bool answ = false; @@ -2444,7 +2449,8 @@ namespace AppData ProcType = pType, MachineType = mType.Multiax, OrderType = oType.BatchRequest, - OrderList = listOrder + OrderList = listOrder, + NumIndexStart = numIndexStart }; // serializzo @@ -2498,7 +2504,7 @@ namespace AppData if (nextBatchId > 0) { // richiedo! - sendBatchReq(nextBatchId, "Estimation", 1, true); + sendBatchReq(nextBatchId, "Estimation", 1, true, 1); // registro su DB nesting iniziato... QUANDO MI RISPONDE dovrò verificare che era un batch x VALIDAZIONE DLMan.taBL.updateStatus(nextBatchId, (int)BatchStatus.EstimationRequested, "", 0); answ = true; diff --git a/NKC_SDK/Objects.cs b/NKC_SDK/Objects.cs index 833682f..7fd9c7a 100644 --- a/NKC_SDK/Objects.cs +++ b/NKC_SDK/Objects.cs @@ -113,6 +113,12 @@ namespace NKC_SDK /// public int ProcType { get; set; } + + /// + /// Indice di aprtenza (per carrelli, bins...) + /// + public int NumIndexStart { get; set; } = 1; + #endregion Public Properties } diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs index 15604ad..ea0222b 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs @@ -105,7 +105,7 @@ namespace NKC_WF.WebUserControls { // invia a redis una richiesta... ComLib.sendMaterials(); - ComLib.sendBatchReq(BatchId, "Estimation", 3, false); + ComLib.sendBatchReq(BatchId, "Estimation", 3, false, 0); // registro su DB nesting iniziato... DLMan.taBL.updateStatus(BatchId, (int)BatchStatus.EstimationRequested, "", 0); @@ -160,7 +160,7 @@ namespace NKC_WF.WebUserControls else { // invio il batch corrente - ComLib.sendBatchReq(BatchId, "Nesting", 2, false); + ComLib.sendBatchReq(BatchId, "Nesting", 2, false, 1); // registro su DB nesting iniziato... DLMan.taBL.updateStatus(BatchId, (int)BatchStatus.NestRequested, "", -1); } diff --git a/NKC_WF/site/UpdMan.aspx.cs b/NKC_WF/site/UpdMan.aspx.cs index 7837fd1..e2654b7 100644 --- a/NKC_WF/site/UpdMan.aspx.cs +++ b/NKC_WF/site/UpdMan.aspx.cs @@ -87,7 +87,8 @@ namespace NKC_WF.site doDownload(caller, riga); // calcolo elapsed time come TimeSpan value. TimeSpan ts = stopWatch.Elapsed; - resultsMsg = $"OK: {caller} downloaded, {ts.TotalSeconds:0.000} sec | {updateUrl(caller)} --> {localDownloadPath(caller)}"; + string updUrl = riga.IsAuth ? updateUrlAuth(riga.AppName) : updateUrl(riga.AppName); + resultsMsg = $"OK: {caller} downloaded, {ts.TotalSeconds:0.000} sec | {updUrl} --> {localDownloadPath(riga.PackName)}"; } } // aggiorno messaggio @@ -127,7 +128,7 @@ namespace NKC_WF.site else { UpdateMan.obj.downloadLatest(updateUrl(caller), localDownloadPath(caller), caller); - numDone++; + numDone++; } } return numDone; @@ -165,7 +166,7 @@ namespace NKC_WF.site protected UpdateMan updManAuth = new UpdateMan("SWDownloader", "viaD@nte16"); /// - /// URLK stringa di UPDATE... + /// URL stringa di UPDATE... /// protected string updateUrl(string package) {