diff --git a/NKC_SDK/Objects.cs b/NKC_SDK/Objects.cs index ba9d536..17fa6c4 100644 --- a/NKC_SDK/Objects.cs +++ b/NKC_SDK/Objects.cs @@ -114,7 +114,7 @@ namespace NKC_SDK /// /// Cod ITEM di NKC /// - public int PartId { get; set; } + public int PartId { get; set; } = 0; /// /// Codice ITEM esterno da cliente (HFA) /// @@ -182,7 +182,18 @@ namespace NKC_SDK /// /// Num di fogli nello stack /// - public int NumSheet { get; set; } + public int NumSheet + { + get + { + int answ = 0; + if (SheetList != null) + { + answ = SheetList.Count; + } + return answ; + } + } /// /// Elenco Sheet previsti /// @@ -212,39 +223,39 @@ namespace NKC_SDK /// /// ID univoco invio del TASK /// - public string envNum { get; set; } = ""; + public string EnvNum { get; set; } = ""; /// /// Tipo di processing richiesto /// 1 = stima /// 2 = nesting /// - public int procType { get; set; } + public int ProcType { get; set; } = 0; /// /// Codice della amcchina x cui si effettua richiesta /// [JsonConverter(typeof(StringEnumConverter))] - public mType machineType { get; set; } + public mType MachineType { get; set; } = mType.Multiax; /// /// Tipo di ordine richiesto /// [JsonConverter(typeof(StringEnumConverter))] - public oType orderType { get; set; } + public oType OrderType { get; set; } = oType.BatchRequest; /// /// Status del processo di nesting /// - public procStatus ProcessStatus { get; set; } + public procStatus ProcessStatus { get; set; } = procStatus.waiting; /// /// Note libere del nesting /// - public string ProcessNotes { get; set; } + public string ProcessNotes { get; set; } = ""; /// /// Tempo di processing del Nesting espresso in Secondi /// - public double ProcessingRuntime { get; set; } + public double ProcessingRuntime { get; set; } = 0; /// /// Tempo STIMATO di taglio calcolato dal Nesting espresso in Secondi /// - public double EstimatedWorktime { get; set; } + public double EstimatedWorktime { get; set; } = 0; } /// /// Risposta NESTING x la STIMA iniziale @@ -254,7 +265,7 @@ namespace NKC_SDK /// /// Elenco Items da produrre x ordine /// - public List Items { get; set; } + public List PartList { get; set; } } /// /// Risposta NESTING x la STIMA iniziale @@ -264,7 +275,7 @@ namespace NKC_SDK /// /// Elenco Stack previsti /// - public List Stacks { get; set; } + public List BunkList { get; set; } } @@ -298,9 +309,9 @@ namespace NKC_SDK public List Items { get; set; } /// - /// Elenco Stack previsti + /// Elenco Bunk previsti /// - public List Stacks { get; set; } + public List Bunks { get; set; } } #endregion diff --git a/NKC_WF/Controllers/BatchProcController.cs b/NKC_WF/Controllers/BatchProcController.cs index 0717046..60c3616 100644 --- a/NKC_WF/Controllers/BatchProcController.cs +++ b/NKC_WF/Controllers/BatchProcController.cs @@ -107,9 +107,9 @@ namespace NKC_WF.Controllers * *************************************************/ - if (currBunk.orderType == oType.BatchRequest) + if (currBunk.OrderType == oType.BatchRequest) { - if (currBunk.procType == 1) + if (currBunk.ProcType == 1) { // deserializzo come BatchreqIniziale (stima) nestReplyBatchInitial rispStima = JsonConvert.DeserializeObject(content); @@ -128,7 +128,7 @@ namespace NKC_WF.Controllers answ = "OK"; } } - else if (currBunk.orderType == oType.OfflineOrder) + else if (currBunk.OrderType == oType.OfflineOrder) { // deserializzo come OfflineOrder nestReplyOffOrd rispNest = JsonConvert.DeserializeObject(content);