Index: APPS/Halux/PPS/Activiteit/impl/WerklijstItemsUitvoerder.cls.xml =================================================================== diff -u -r60116 -r60310 --- APPS/Halux/PPS/Activiteit/impl/WerklijstItemsUitvoerder.cls.xml (.../WerklijstItemsUitvoerder.cls.xml) (revision 60116) +++ APPS/Halux/PPS/Activiteit/impl/WerklijstItemsUitvoerder.cls.xml (.../WerklijstItemsUitvoerder.cls.xml) (revision 60310) @@ -66,33 +66,45 @@ Set SamengesteldeLijst = ##class(APPS.Halux.PPS.dto.UitvoeringInfoLijst).%New() #dim SamengesteldeLijstIterator AS TECH.ListIterator = ##class(TECH.ListIterator).%New(SamengesteldeLijst) #dim UitvoeringLijstIterator AS TECH.ListIterator = ##class(TECH.ListIterator).%New(UitvoeringInfoLijst) - - while UitvoeringLijstIterator.HasNext() && 0 { + #dim KopieMat As APPS.Halux.PPS.Activiteit.impl.common.dto.MattenUitvoeringInfo + #dim LijstAantallen As %ListOfDataTypes = ##class(%ListOfDataTypes).%New("") + + while UitvoeringLijstIterator.HasNext() { #dim Mat As APPS.Halux.PPS.Activiteit.impl.common.dto.MattenUitvoeringInfo = UitvoeringLijstIterator.Next() #dim OvereenkomstigeMatGevonden As %Boolean = $$$False #dim Batch As APPS.Halux.common.Batch = ##class(APPS.ApplicatieContext).Instance().GeefProductieAPI().GeefBatchService().GeefBatch(Mat.BatchID) - If ( $IsObject(Mat) && (..IsProductiegroepKast(Batch) || (..IsProductiegroepProbox(Batch))) && (Mat.%ClassName(1)="APPS.Halux.PPS.Activiteit.impl.common.dto.MattenUitvoeringInfo") ){ + If ( $IsObject(Mat) && (..IsProductiegroepKast(Batch) || (..IsProductiegroepProbox(Batch))) && (Mat.%ClassName(1)="APPS.Halux.PPS.Activiteit.impl.common.dto.MattenUitvoeringInfo")) { + Do LijstAantallen.Insert(Mat.Aantal) while ((SamengesteldeLijstIterator.HasNext()) && ($$$Not(OvereenkomstigeMatGevonden))){ #dim Mat2 As APPS.Halux.PPS.Activiteit.impl.common.dto.MattenUitvoeringInfo = SamengesteldeLijstIterator.Next() - If ((Mat.ToeDos = Mat2.ToeDos) &&(Mat.Diepte = Mat2.Diepte) && (Mat.Breedte = Mat2.Breedte) && (Mat.MateriaalId = Mat2.MateriaalId) && (Mat.KleurId = Mat2.KleurId) && (Mat.BewerkingBreedte = Mat2.BewerkingBreedte) && (Mat.BewerkingDiepte = Mat2.BewerkingDiepte)){ + If ((Mat.ToeDos = Mat2.ToeDos) && (Mat.Diepte = Mat2.Diepte) && (Mat.Breedte = Mat2.Breedte) && (Mat.MateriaalId = Mat2.MateriaalId) && (Mat.KleurId = Mat2.KleurId) && (Mat.BewerkingBreedte = Mat2.BewerkingBreedte) && (Mat.BewerkingDiepte = Mat2.BewerkingDiepte)){ Set OvereenkomstigeMatGevonden = $$$True Set Mat2.Aantal= Mat2.Aantal+Mat.Aantal } } - If (SamengesteldeLijst.Count()=0 || $$$Not(OvereenkomstigeMatGevonden)){ + If (SamengesteldeLijst.Count()=0 || $$$Not(OvereenkomstigeMatGevonden)) { Do SamengesteldeLijst.Insert(Mat) } Do SamengesteldeLijstIterator.Reset() } } - If (0 && (SamengesteldeLijst.Count()>0) && ((..IsProductiegroepKast(Batch)) || (..IsProductiegroepProbox(Batch)))){ + If ((SamengesteldeLijst.Count()>0) && ((..IsProductiegroepKast(Batch)) || (..IsProductiegroepProbox(Batch)))){ Set UitvoeringResultaat = Verwerker.VerwerkUitvoeringInfoLijst(SamengesteldeLijst,ActiviteitParameters) + Do UitvoeringLijstIterator.Reset() + #dim i = 1 + While UitvoeringLijstIterator.HasNext() { + #dim TeCorrigerenMat As APPS.Halux.PPS.Activiteit.impl.common.dto.MattenUitvoeringInfo = UitvoeringLijstIterator.Next() + Set TeCorrigerenMat.Aantal = LijstAantallen.GetAt(i) + Do TeCorrigerenMat.Save() + Set i = i+1 + } } else { Set UitvoeringResultaat = Verwerker.VerwerkUitvoeringInfoLijst(UitvoeringInfoLijst,ActiviteitParameters) } } } + quit UitvoeringResultaat ]]> Index: vhTestFiles/IntegratieTests/Productie.Planning.ActieveBatches.Legrabox.Aansturing/TestLBXFree/StartBatch/LBX voormontage_001_GekoppeldeIK_MattenLijst.txt =================================================================== diff -u -r60116 -r60310 --- vhTestFiles/IntegratieTests/Productie.Planning.ActieveBatches.Legrabox.Aansturing/TestLBXFree/StartBatch/LBX voormontage_001_GekoppeldeIK_MattenLijst.txt (.../LBX voormontage_001_GekoppeldeIK_MattenLijst.txt) (revision 60116) +++ vhTestFiles/IntegratieTests/Productie.Planning.ActieveBatches.Legrabox.Aansturing/TestLBXFree/StartBatch/LBX voormontage_001_GekoppeldeIK_MattenLijst.txt (.../LBX voormontage_001_GekoppeldeIK_MattenLijst.txt) (revision 60310) @@ -6,8 +6,7 @@ ---------|----|------------------------|------|------|------------|-------| Toelev | # | Mat | D | B | ink D | ink B | ---------|----|------------------------|------|------|------------|-------| - 2222 | 1 |AS-Fiber Antraciet | 373 | 1500 | - | 520 | - 2222 | 1 |AS-Fiber Antraciet | 373 | 1500 | - | 520 | + 2222 | 2 |AS-Fiber Antraciet | 373 | 1500 | - | 520 | ---------|----|------------------------|------|------|------------|-------| \ No newline at end of file