Merge branch 'release/ManNumIndexCB'

This commit is contained in:
Samuele Locatelli
2021-07-20 08:50:52 +02:00
4 changed files with 23 additions and 10 deletions
+11 -5
View File
@@ -2243,6 +2243,7 @@ namespace AppData
/// <returns></returns>
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
/// <param name="note">note opzionali</param>
/// <param name="pType">Tipo processo: 1 = stima, 2 = nesting, 3 = stima EXTENDED</param>
/// <param name="isValidation">Indica se sia validaizone (part o disegno) --> in tal caso MaxTime = 1</param>
/// <param name="numIndexStart">Numero di indice richiesto con cui partire x creare CART/BIN</param>
/// <returns></returns>
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;
+6
View File
@@ -113,6 +113,12 @@ namespace NKC_SDK
/// </summary>
public int ProcType { get; set; }
/// <summary>
/// Indice di aprtenza (per carrelli, bins...)
/// </summary>
public int NumIndexStart { get; set; } = 1;
#endregion Public Properties
}
@@ -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);
}
+4 -3
View File
@@ -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");
/// <summary>
/// URLK stringa di UPDATE...
/// URL stringa di UPDATE...
/// </summary>
protected string updateUrl(string package)
{