aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs1
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Printing/PrintingConfiguration.cs1
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Resume/DefaultJobResumeManager.cs1
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Resume/JobResumeModel.cs2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Shared/Statistics/JobRunComposition.cs24
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs1
6 files changed, 30 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs
index 2ffa84992..970bbcd04 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs
@@ -774,6 +774,7 @@ namespace Tango.PPC.Jobs.ViewModels
printConfig.FirstUnitStartPosition = ResumeModel.FirstUnitStartPosition;
printConfig.GlobalStartPosition = ResumeModel.GlobalStartPosition;
printConfig.RemainingUnits = ResumeModel.RemainingUnits;
+ printConfig.ResumeProgress = ResumeModel.ResumeProgress;
//LogManager.Log($"!!!!! Start Job resume : FirstUnitStartPosition = {ResumeModel.FirstUnitStartPosition} GlobalStartPosition = {ResumeModel.GlobalStartPosition} RemainingUnits = {ResumeModel.RemainingUnits}", LogCategory.Debug);
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Printing/PrintingConfiguration.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Printing/PrintingConfiguration.cs
index ff406cefd..9ab000fc1 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Printing/PrintingConfiguration.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Printing/PrintingConfiguration.cs
@@ -11,5 +11,6 @@ namespace Tango.PPC.Common.Printing
public int RemainingUnits { get; set; }
public double GlobalStartPosition { get; set; }
public double FirstUnitStartPosition { get; set; }
+ public double ResumeProgress { get; set; }
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resume/DefaultJobResumeManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resume/DefaultJobResumeManager.cs
index 5f819d34d..4c4e3f169 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resume/DefaultJobResumeManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resume/DefaultJobResumeManager.cs
@@ -55,6 +55,7 @@ namespace Tango.PPC.Common.Resume
model.FirstUnitStartPosition = e.JobHandler.Status.CurrentUnitProgress;
model.RemainingUnits = e.JobHandler.Status.RemainingUnits;
model.GlobalStartPosition = e.JobHandler.JobStatus.Progress;
+ model.ResumeProgress = e.JobHandler.Status.ProgressMinusSettingUp;
if (insert)
{
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resume/JobResumeModel.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resume/JobResumeModel.cs
index 40386566e..db5d4d3d9 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resume/JobResumeModel.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resume/JobResumeModel.cs
@@ -17,5 +17,7 @@ namespace Tango.PPC.Common.Resume
public double GlobalStartPosition { get; set; }
public double FirstUnitStartPosition { get; set; }
+
+ public double ResumeProgress { get; set; }
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Shared/Statistics/JobRunComposition.cs b/Software/Visual_Studio/PPC/Tango.PPC.Shared/Statistics/JobRunComposition.cs
index c18d56693..86e1c7771 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Shared/Statistics/JobRunComposition.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Shared/Statistics/JobRunComposition.cs
@@ -4,6 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.BL.DTO;
+using Tango.BL.Enumerations;
namespace Tango.PPC.Shared.Statistics
{
@@ -12,6 +13,29 @@ namespace Tango.PPC.Shared.Statistics
public JobRunDTO JobRun { get; set; }
public PresentationJob Job { get; set; }
+ public double Distance
+ {
+ get
+ {
+ double actualStartPosition = 0;
+ double actualEndPosition = 0;
+
+ actualStartPosition = JobRun.MachineType == MachineTypes.Eureka.ToInt32() ? JobRun.ActualStartPosition * 4 : JobRun.ActualStartPosition;
+
+ if (JobRun.ActualEndPosition > 0)
+ {
+ actualEndPosition = JobRun.MachineType == MachineTypes.Eureka.ToInt32() ? JobRun.ActualEndPosition * 4 : JobRun.ActualEndPosition;
+ }
+ else
+ {
+ actualEndPosition = JobRun.MachineType == MachineTypes.Eureka.ToInt32() ? JobRun.EndPosition * 4 : JobRun.EndPosition;
+ }
+
+ return actualEndPosition - actualStartPosition;
+ }
+ }
+
+
public JobRunComposition()
{
Job = new PresentationJob();
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
index 990e5e416..bcf0715fa 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
@@ -128,6 +128,7 @@ namespace Tango.PPC.UI.Printing
config.ResumeConfig.FirstUnitStartPosition = printConfig.FirstUnitStartPosition;
config.ResumeConfig.GlobalStartPosition = printConfig.GlobalStartPosition;
config.ResumeConfig.RemainingUnits = printConfig.RemainingUnits;
+ config.ResumeConfig.ResumeProgress = printConfig.ResumeProgress;
}
handler = await _machineProvider.MachineOperator.Print(job, config);