diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2022-03-01 14:19:50 +0200 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2022-03-01 14:19:50 +0200 |
| commit | 38052847502dd46b47269addae91aef0aa8fb747 (patch) | |
| tree | acb339261eb604991b71edfeb21e626e44a01a58 /Software/Visual_Studio/Tango.BL/Builders | |
| parent | 1f6b9e23c21b2f31781f4372378a965c109657ca (diff) | |
| download | Tango-38052847502dd46b47269addae91aef0aa8fb747.tar.gz Tango-38052847502dd46b47269addae91aef0aa8fb747.zip | |
Group Repeating - add logic in Dyeing.
Related Work Items: #6229
Diffstat (limited to 'Software/Visual_Studio/Tango.BL/Builders')
3 files changed, 20 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Tango.BL/Builders/JobBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/JobBuilder.cs index 0f1a868a4..970309a96 100644 --- a/Software/Visual_Studio/Tango.BL/Builders/JobBuilder.cs +++ b/Software/Visual_Studio/Tango.BL/Builders/JobBuilder.cs @@ -85,5 +85,13 @@ namespace Tango.BL.Builders Context.JobRuns.Where(x => x.JobGuid == Entity.Guid).OrderBy(x => x.StartDate).ToList(); }); } + + public virtual JobBuilder WithSegmentsGroups() + { + return AddStep(7, () => + { + Context.SegmentsGroups.Where(x => x.JobGuid == Entity.Guid).OrderBy(x => x.SegmentIndex).ToList(); + }); + } } } diff --git a/Software/Visual_Studio/Tango.BL/Builders/JobsCollectionBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/JobsCollectionBuilder.cs index e5db5d7e1..c155e7020 100644 --- a/Software/Visual_Studio/Tango.BL/Builders/JobsCollectionBuilder.cs +++ b/Software/Visual_Studio/Tango.BL/Builders/JobsCollectionBuilder.cs @@ -52,5 +52,16 @@ namespace Tango.BL.Builders } }); } + + public virtual JobsCollectionBuilder WithSegmentsGroups() + { + return AddStep(3, () => + { + foreach (var job in Entities.ToList()) + { + Context.SegmentsGroups.Where(x => x.JobGuid == job.Guid).OrderBy(x => x.SegmentIndex).ToList(); + } + }); + } } } diff --git a/Software/Visual_Studio/Tango.BL/Builders/MachineBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/MachineBuilder.cs index fd9d14baa..c9c13c389 100644 --- a/Software/Visual_Studio/Tango.BL/Builders/MachineBuilder.cs +++ b/Software/Visual_Studio/Tango.BL/Builders/MachineBuilder.cs @@ -49,7 +49,7 @@ namespace Tango.BL.Builders { return AddStep(3, () => { - new JobsCollectionBuilder(Context).Set(x => x.MachineGuid == Entity.Guid).WithSegments().Build(); + new JobsCollectionBuilder(Context).Set(x => x.MachineGuid == Entity.Guid).WithSegments().WithSegmentsGroups().Build(); }); } |
