namespace EgwCoreLib.Lux.Core.RestPayload { /// /// Classe per deserializzazione risposta stima lavorabilità e tempi x macchina /// public class MachineCalcResultDTO { #region Public Properties /// /// Nome macchina /// public string Name { get; set; } = ""; /// /// Numero di parts totali /// public int NumParts { get => PartList.Count; } /// /// Numero di Parts con errori di calcolo /// public int NumPartsCalcFail { get => PartListCalcFail.Count(); } /// /// Numero di Parts NON OK (errori calcolo o non lavorabili) /// public int NumPartsKo { get => PartListKo.Count(); } /// /// Numero di Parts NON lavorabili /// public int NumPartsNotMach { get => PartListNotMach.Count(); } /// /// Numero di Parts lavorabili dalla macchina /// public int NumPartsOk { get => PartListOk.Count(); } /// /// Elenco delle parts ed esito stima lavorabilità /// public List PartList { get; set; } = new List(); /// /// Elenco parts con errori calcolo /// public List PartListCalcFail { get => PartList.Where(x => x.CalcResult == Enums.PartVerificationResult.CALCULATIONFAILED).ToList(); } /// /// Elenco delle parts KO / non "healthy" (non lavorabili o errore calcolo) /// public List PartListKo { get => PartList.Where(x => x.CalcResult != Enums.PartVerificationResult.MACHINABLE).ToList(); } /// /// Elenco parts NON lavorabili /// public List PartListNotMach { get => PartList.Where(x => x.CalcResult == Enums.PartVerificationResult.NOTMACHINABLE).ToList(); } /// /// Elenco parts lavorabili /// public List PartListOk { get => PartList.Where(x => x.CalcResult == Enums.PartVerificationResult.MACHINABLE).ToList(); } #endregion Public Properties } }