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; } } /// /// Struttura stack /// public struct Stack { /// /// Identificativo univoco stack /// public String StackId { get; set; } /// /// Num di fogli nello stack /// public int NumSheet { get; set; } /// /// Elenco Sheet previsti /// public List Sheets { get; set; } } /// /// Struttura Sheet /// public struct Sheet { /// /// Identificativo univoco Sheet /// public String SheetId { get; set; } /// /// Materiale /// public int MatID { get; set; } /// /// Tempo STIMATO di taglio calcolato dal Nesting espresso in Secondi /// public double EstimatedWorktime { get; set; } /// /// Programma x printing /// public string PrintProgram { get; set; } /// /// Programma x Machining /// public string MachiningProgram { get; set; } /// /// SVG del lavoro previsto /// public string Drawing { get; set; } } /// /// Classe che rappresenta stato ordine ricevuto via REDIS da NESTING /// public class baseNestAnsw { /// /// 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; } } /// /// Classe che rappresenta stato ordine ricevuto via REDIS da NESTING /// public class orderStatus : baseNestAnsw { /// /// ID del processo di Nesting in corso (generato in fase di import) /// public string BatchID { get; set; } } public class nestReplyBatch : baseNestAnsw { /// /// Elenco Items da produrre x ordine /// public List Items { get; set; } } public class nestReplyOffOrd : orderStatus { /// /// ID dell'ordine offlien da processare /// public string OffOrderID { get; set; } /// /// Elenco Items da produrre x ordine /// public List Items { get; set; } /// /// Elenco Stack previsti /// public List Stacks { 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 { cartLabel, paintLabelPre, paintLabelPost, partLabel, stackLabel } /// /// tipologia di DOCUMENTO gestito in stampa... /// public enum tipoDocumento { /// /// Etichetta per un BIN (pre esecuzione compito, es verniciatura) /// docBinPre, /// /// Etichetta per un BIN (POST esecuzione compito, es verniciatura) /// docBinPost, /// /// Etichetta per un CART /// docCart, /// /// Docuemtno per singolo ITEM: /// - QR code /// - num cart/bin /// - T/P/* (se va fatto qualcosa di speciale) /// - codice dmtx leggibile (es IT000023) su NUOVA riga /// docPart, /// /// doc per STACK /// docStack, /// /// NON DEFINITO /// docND } //public enum tipoSelettore //{ // cdc, // cellaMagazzino, // magazzino, // UDC_byPart //}