Index: APPS/Halux/common/ProductieSequentie.cls.xml =================================================================== diff -u -r32564 -r38673 --- APPS/Halux/common/ProductieSequentie.cls.xml (.../ProductieSequentie.cls.xml) (revision 32564) +++ APPS/Halux/common/ProductieSequentie.cls.xml (.../ProductieSequentie.cls.xml) (revision 38673) @@ -191,16 +191,13 @@ Do ..Init() #dim ProductTypeAPI As DOM.PM.ProductTypeAPI = ##class(DOM.DomeinContext).Instance().GeefProductTypeAPI() - #dim Sortering As TECH.MultiDim = "" - #dim Batch As APPS.Halux.common.Batch = ..GeefBatch() - #dim ToeleveringIterator As TECH.Iterator = Batch.GeefToeleveringIterator() - #dim SequentieNummer As %Integer = 0 + #dim ToeleveringIterator As TECH.Iterator = ..GeefBatch().GeefToeleveringIterator() + #dim Sortering As TECH.MultiDim + While (ToeleveringIterator.HasNext()) { + #dim SorteringPerToelevering As TECH.MultiDim #dim Toelevering As DOM.AKP.Toelevering = ToeleveringIterator.Next() - - Kill Sortering - #dim ProductLijnIterator As TECH.Iterator = Toelevering.GeefTypeToeleveringLijnIterator(##class(DOM.AKP.enu.ToeleveringLijnType).Product()) While (ProductLijnIterator.HasNext()) { @@ -210,11 +207,22 @@ #dim MaatwerkProduct As DOM.PM.MaatwerkProduct = ProductTypeAPI.GeefMaatwerkProduct(ProductLijn.GeefProductID()) #dim ProductieSequentieItems As %ListOfObjects = ..MaakProductieSequentieItems(Toelevering, ProductLijn) - Do ..VulAanSorteringVoorProductieSequentieItems(.Sortering, ProductieSequentieItems, MaatwerkProduct) + Do ..VulAanSorteringVoorProductieSequentieItems(.SorteringPerToelevering, ProductieSequentieItems, MaatwerkProduct) } - - Do ##class(TECH.ListUtils).AppendList(..SequentieItems, ..GeefGesorteerdeProductieSequentieItems(.Sortering, .SequentieNummer)) + + Do ..VulInToeleveringSequentieNummer(.SorteringPerToelevering) + Merge Sortering = SorteringPerToelevering + Kill SorteringPerToelevering } + + #dim SequentieNummer As %Integer = 0 + #dim Iterator As TECH.Iterator = ##class(TECH.ArrayMultiDimIterator).%New(.Sortering) + while (Iterator.HasNext()) { + #dim Item As APPS.Halux.common.ProductieSequentieItem = Iterator.Next() + Set Item.SequentieNummer = $Increment(SequentieNummer) + Set Item.GroepSequentieNummer = Item.SequentieNummer + do ..SequentieItems.Insert(Item) + } ]]> @@ -377,23 +385,17 @@ ]]> - - + + 1 -%ListOfObjects -ELEMENTTYPE="APPS.Halux.common.ProductieSequentieItem"