TYPO + Fix salvataggio eventi (redis da svuotare)
This commit is contained in:
@@ -103,76 +103,6 @@ namespace NKC_WF.Controllers
|
||||
*
|
||||
**************************************/
|
||||
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Processa una chiamata POST per l'invio in blocco
|
||||
/// POST: api/Bunk
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public string Post()
|
||||
{
|
||||
int BunkId = 0;
|
||||
int BatchId = 0;
|
||||
string answ = "";
|
||||
// questa classe è derivata da Controller.Response... x cui recupero lo stream in altro modo...
|
||||
string content = "";
|
||||
System.Web.HttpContext.Current.Request.InputStream.Position = 0;
|
||||
using (var reader = new StreamReader(System.Web.HttpContext.Current.Request.InputStream, System.Text.Encoding.UTF8, true, 4096, true))
|
||||
{
|
||||
content = reader.ReadToEnd();
|
||||
}
|
||||
//Rest
|
||||
System.Web.HttpContext.Current.Request.InputStream.Position = 0;
|
||||
// procedo a deserializzare in blocco l'oggetto...
|
||||
try
|
||||
{
|
||||
// deserializzo.
|
||||
SheetWorkList sheetUpdated = JsonConvert.DeserializeObject<SheetWorkList>(content);
|
||||
if (sheetUpdated != null)
|
||||
{
|
||||
// 2020.01.16 salvo su mongoDb la risposta...
|
||||
ComLib.man.saveProdAnsw(sheetUpdated);
|
||||
|
||||
if (sheetUpdated.SheetList != null)
|
||||
{
|
||||
foreach (var currSheet in sheetUpdated.SheetList)
|
||||
{
|
||||
// se non nullo...
|
||||
if (currSheet != null)
|
||||
{
|
||||
DLMan.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
|
||||
DLMan.taIL.updateSheetStatus(currSheet.SheetId, 1, "WRK001");
|
||||
}
|
||||
// segnalo avanzamento su redis x pagina unload
|
||||
ComLib.advaceSheetRevByBunk(currSheet.BunkId);
|
||||
BunkId = currSheet.BunkId;
|
||||
answ = "OK";
|
||||
}
|
||||
}
|
||||
}
|
||||
var tabBunks = DLMan.taSTL.getByKey(BunkId);
|
||||
if (tabBunks.Count > 0)
|
||||
{
|
||||
BatchId = tabBunks[0].BatchID;
|
||||
}
|
||||
// ricalcolo stato BUNK
|
||||
ComLib.updateBatchPosition(BatchId);
|
||||
// INVALIDO eventuale valore BUNK in REDIS...
|
||||
ComLib.resetRedisBunkData(machine);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
answ = "NO";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Effettua la chiamata di update x un set di dati delle macchine
|
||||
|
||||
Reference in New Issue
Block a user