persistent 1 APPS.Halux.common.Batch 0 APPS.Halux.common.enu.ProductieLijn 1 %TimeStamp 1 APPS.Halux.common.enu.ProductieGroep 1 %Integer array 1 %Integer list 1 %Boolean 1 1 Set {*}=##class(APPS.Halux.common.impl.BatchImpl).%OpenId({ID}).IsActief() 1 Lijn:APPS.Halux.common.enu.ProductieLijn="" 1 1 %Status %TimeStamp %Integer ProductieLijn:APPS.Halux.common.enu.ProductieLijn TECH.Iterator APPS.Halux.common.enu.ProductieGroep APPS.Halux.common.enu.ProductieLijn Toelevering:DOM.LEV.Toelevering 0) && '..IsGeldigeProductieGroep(ProductieGroep)) { Do Errors.Insert("De productiegroep van de toelevering is verschillend van de productiegroep van de batch") } Set BijhorendeBatch = ##class(APPS.Halux.common.BatchService).%New().GeefBijhorendeBatch(Toelevering) If ($IsObject(BijhorendeBatch)) { Do Errors.Insert("Deze toelevering zit reeds in batch "_BijhorendeBatch.GeefBatchID()) } If (..ToeleveringenIndex.IsDefined(Toelevering.GeefToeNr())) { Do Errors.Insert("De toelevering zit reeds in deze batch") } If ((ProductieGroep = ##class(APPS.Halux.common.enu.ProductieGroep).Kast()) && ('..IsGeldigAfleverAdres(Toelevering))) { Do Errors.Insert("Het afleveradres van deze toelevering is anders dan de vorige") } If (Errors.Count() > 0) { Set MaakBatchError = ##class(APPS.Halux.common.impl.BatchError).%New() Set MaakBatchError.ToeleveringNummer = Toelevering.GeefToeNr() Set MaakBatchError.Boodschappen = Errors Set MaakBatchErrorLijst = ##class(%ListOfObjects).%New() Do ##class(TECH.ExceptionHandler).Throw(##class(APPS.Halux.common.impl.ToeleveringException).%New(MaakBatchError)) } Do ..ToeleveringenIndex.SetAt(1,Toelevering.GeefToeNr()) Do ..Toeleveringen.Insert(Toelevering.GeefToeNr()) Set ..ProductieGroep = ProductieGroep ]]> Toelevering:DOM.LEV.Toelevering %Boolean ..Toeleveringen.Count())) { If (..Toeleveringen.GetAt(i) = Toelevering.GeefToeNr()) { Do ..Toeleveringen.RemoveAt(i) Set Gevonden = 1 } Set i = i + 1 } } If (..Toeleveringen.Count() = 0) { Do ..CleanUp() } Quit Removed ]]> 1 Toelevering:DOM.LEV.Toelevering 1 %Boolean Order:DOM.OV.Order 1 %String ProductieGroep:%String 1 %Boolean %Boolean Do ..RaiseBatchRemovedEvent({ID}) DELETE 1 %Library.CacheStorage BatchImplDefaultData "BatchImpl" AanmaakTijdstip Lijn ProductieGroep Toeleveringen ToeleveringenIndex subnode "ToeleveringenIndex"