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 | |
| parent | 70c0c5921c3c124779ec0d603e43d72e67def63f (diff) | |
| download | Tango-c03fb4a1b2aadd8952b321d08ca840e55fcee72d.tar.gz Tango-c03fb4a1b2aadd8952b321d08ca840e55fcee72d.zip | |
Revision of statistics and resumed jobs.
Diffstat (limited to 'Software/Visual_Studio/PPC')
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); |
