using SteamWare;
using System;
using System.Collections.Generic;
using System.Web;
namespace AppData
{
public class utils
{
///
///
///
///
///
public static string getPath(string filePath)
{
string answ = "";
try
{
answ = HttpContext.Current.Server.MapPath(filePath);
}
catch (Exception exc)
{
logger.lg.scriviLog($"Eccezione in decodifica path in persorso relativo all'app:{Environment.NewLine}{exc}", tipoLog.EXCEPTION);
}
return answ;
}
}
///
/// Classe che rappresenta la richiesta di AZIONI al NESTING
///
public struct commandRequest
{
///
/// ID del processo richiesto (generato in fase di import)
///
public int BatchID { get; set; }
///
/// Richiesta per il nesting: DoNesting / HaltNesting
///
public string ActionRequested { get; set; }
}
///
/// Classe che rappresenta la richiesta di processing di NESTING da inserire in REDIS
///
public struct batchRequest
{
///
/// ID del processo richiesto (generato in fase di import)
///
public int BatchID { get; set; }
///
/// Elenco ordini richeisti da processare / nestare
///
public List Orders { get; set; }
}
///
/// Struttura Ordine passata a NESTING
///
public struct Order
{
///
/// Cod ordine di NKC
///
public string OrderCod { get; set; }
///
/// Codice ordine esterno da cliente (HFA)
///
public string OrderExtCode { get; set; }
///
/// Plant di destinazione
///
public string DestPlant { get; set; }
///
/// Quantità di oggetti da produrre x singola riga di ordine
///
public int OrderQty { get; set; }
///
/// Elenco Items da produrre x ordine
///
public List- Items { get; set; }
}
///
/// Struttura Item passata a NESTING
///
public struct Item
{
///
/// Cod ITEM di NKC
///
public int ItemId { get; set; }
///
/// Codice ITEM esterno da cliente (HFA)
///
public string ItemExtCode { get; set; }
///
/// Quantità di Item per SINGOLO ordine
///
public int ItemrQty { get; set; }
///
/// ID del materiale dell'item
///
public int MatID { get; set; }
///
/// Path del disegno CAD dell'item da produrre x NESTING
///
public string CadFilePath { get; set; }
}
///
/// Classe che rappresenta stato ordine ricevutovia REDIS da NESTING
///
public class orderStatus
{
///
/// ID del processo di Nesting in corso (generato in fase di import)
///
public string BatchID { get; set; }
///
/// Status del procesos di nesting
///
public procStatus ProcessStatus { get; set; }
///
/// Note libere del nesting
///
public string ProcessNotes { get; set; }
///
/// Tempo di processing del Nesting espresso in Secondi
///
public double ProcessingRuntime { get; set; }
///
/// Tempo STIMATO di taglio calcolato dal Nesting espresso in Secondi
///
public double EstimatedWorktime { get; set; }
}
///
/// Enum degli stati ammessi epr il Nesting
///
public enum procStatus
{
waiting = 0,
running,
error,
completed,
aborted,
accepted,
refused
}
}
///
/// Valori decodificati
///
public class decodedData
{
///
/// Tipo codice decodificato
///
public codeType codeType { get; set; } = codeType.UNK;
///
/// Codice decodificato
///
public string code { get; set; } = "";
///
/// Codice decodificato in formato INT
///
public int codeInt { get; set; } = 0;
///
/// Descrizione associata
///
public string description { get; set; } = "";
///
/// Dato letto RAW
///
public string rawData { get; set; } = "";
}
///
/// Tipi di barcode gestiti
///
public enum codeType
{
UNK = 0,
Item,
ItemGeneric,
Material,
Sheet,
Stack,
Batch,
Cart,
Bin,
BinProcessed,
SecScreen
}
///
/// tipologia di report (FILE rdlc) gestito in stampa...
///
public enum reportRichiesto
{
paintLabel,
partLabel,
stackLabel
}
///
/// tipologia di DOCUMENTO gestito in stampa...
///
public enum tipoDocumento
{
docPaint,
docPart,
docStack,
docND
}
//public enum tipoSelettore
//{
// cdc,
// cellaMagazzino,
// magazzino,
// UDC_byPart
//}