diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2024-07-14 23:06:47 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2024-07-14 23:06:47 +0300 |
| commit | c03fb4a1b2aadd8952b321d08ca840e55fcee72d (patch) | |
| tree | 453cc2986a60c87ddff21bff348d6d35d7ed1c2e /Software/Visual_Studio/PPC/Tango.PPC.Shared | |
| parent | 70c0c5921c3c124779ec0d603e43d72e67def63f (diff) | |
| download | Tango-c03fb4a1b2aadd8952b321d08ca840e55fcee72d.tar.gz Tango-c03fb4a1b2aadd8952b321d08ca840e55fcee72d.zip | |
Revision of statistics and resumed jobs.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Shared')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.Shared/Statistics/JobRunComposition.cs | 24 |
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(); |
