Update gen
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using NKC_SDK;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace NKC_WF.WebUserControls
|
||||
@@ -29,18 +30,93 @@ namespace NKC_WF.WebUserControls
|
||||
sb.AppendLine("DEBUG INFO:");
|
||||
if (estimAnsw != null)
|
||||
{
|
||||
// elenchi x ricerca duplicati
|
||||
List<int> partListEstim = new List<int>();
|
||||
List<int> partListEstimDupl = new List<int>();
|
||||
try
|
||||
{
|
||||
sb.AppendLine($"ESTIM: EnvNum: {estimAnsw.EnvNum} | Worktime: {estimAnsw.EstimatedWorktime / 60:N2} min | Processing Runtime {estimAnsw.ProcessingRuntime / 60:N2} min | Parts #: {estimAnsw.PartList.Count}");
|
||||
foreach (var part in estimAnsw.PartList)
|
||||
{
|
||||
if (partListEstim.Contains(part.PartId))
|
||||
{
|
||||
partListEstimDupl.Add(part.PartId);
|
||||
}
|
||||
else
|
||||
{
|
||||
partListEstim.Add(part.PartId);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
try
|
||||
{
|
||||
sb.AppendLine($"ESTIM: EnvNum: {estimAnsw.EnvNum} | Worktime: {estimAnsw.EstimatedWorktime / 60:N2} min | Processing Runtime {estimAnsw.ProcessingRuntime / 60:N2} min | Parts #: {estimAnsw.PartList.Count} | Distinct Part # {partListEstim.Count}");
|
||||
// se ho duplicati indico:
|
||||
if (partListEstimDupl.Count > 0)
|
||||
{
|
||||
sb.AppendLine("---------------------");
|
||||
sb.AppendLine($"ESTIM: FOUND {partListEstimDupl.Count} duplicate:");
|
||||
foreach (var partId in partListEstimDupl)
|
||||
{
|
||||
sb.AppendLine($"{partId}");
|
||||
}
|
||||
sb.AppendLine("---------------------");
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
if (nestAnsw != null)
|
||||
{
|
||||
// elenchi x ricerca duplicati
|
||||
List<int> partListNest = new List<int>();
|
||||
List<int> partListNestDupl = new List<int>();
|
||||
try
|
||||
{
|
||||
sb.AppendLine($"NEST: EnvNum: {nestAnsw.EnvNum} | Worktime: {nestAnsw.EstimatedWorktime / 60:N2} min | Processing Runtime {nestAnsw.ProcessingRuntime / 60:N2} min | Bunks #: {nestAnsw.BunkList.Count} | Carts #: {nestAnsw.CartList.Count}");
|
||||
foreach (var bunk in nestAnsw.BunkList)
|
||||
{
|
||||
foreach (var sheet in bunk.SheetList)
|
||||
{
|
||||
foreach (var part in sheet.PartList)
|
||||
{
|
||||
if (partListNest.Contains(part.PartId))
|
||||
{
|
||||
partListNestDupl.Add(part.PartId);
|
||||
}
|
||||
else
|
||||
{
|
||||
partListNest.Add(part.PartId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
//il tot delle part è in bunk > Sheet > part
|
||||
int totPartNum = 0;
|
||||
foreach (var bunk in nestAnsw.BunkList)
|
||||
{
|
||||
foreach (var sheet in bunk.SheetList)
|
||||
{
|
||||
totPartNum += sheet.PartList.Count;
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
sb.AppendLine($"NEST: EnvNum: {nestAnsw.EnvNum} | Worktime: {nestAnsw.EstimatedWorktime / 60:N2} min | Processing Runtime {nestAnsw.ProcessingRuntime / 60:N2} min | Bunks #: {nestAnsw.BunkList.Count} | Carts #: {nestAnsw.CartList.Count} | Parts #: {totPartNum}");
|
||||
// se ho duplicati indico:
|
||||
if (partListNestDupl.Count > 0)
|
||||
{
|
||||
sb.AppendLine("---------------------");
|
||||
sb.AppendLine($"ESTIM: FOUND {partListNestDupl.Count} duplicate:");
|
||||
foreach (var partId in partListNestDupl)
|
||||
{
|
||||
sb.AppendLine($"{partId}");
|
||||
}
|
||||
sb.AppendLine("---------------------");
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
Reference in New Issue
Block a user