aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Shared/Statistics
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2024-07-14 23:06:47 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2024-07-14 23:06:47 +0300
commitc03fb4a1b2aadd8952b321d08ca840e55fcee72d (patch)
tree453cc2986a60c87ddff21bff348d6d35d7ed1c2e /Software/Visual_Studio/PPC/Tango.PPC.Shared/Statistics
parent70c0c5921c3c124779ec0d603e43d72e67def63f (diff)
downloadTango-c03fb4a1b2aadd8952b321d08ca840e55fcee72d.tar.gz
Tango-c03fb4a1b2aadd8952b321d08ca840e55fcee72d.zip
Revision of statistics and resumed jobs.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Shared/Statistics')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Shared/Statistics/JobRunComposition.cs24
1 files changed, 24 insertions, 0 deletions
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();